diff --git a/anrui-system-ui/src/api/User/login.js b/anrui-system-ui/src/api/User/login.js
index f12ed2314c..e4472168b1 100644
--- a/anrui-system-ui/src/api/User/login.js
+++ b/anrui-system-ui/src/api/User/login.js
@@ -42,6 +42,13 @@ class user {
method: 'get'
})
}
+ getOrgListByUserSid(data) {
+ return request({
+ url: '/portal/v1/sysuser/getOrgListByUserSid',
+ method: 'get',
+ params: data
+ })
+ }
}
export default new user()
diff --git a/anrui-system-ui/src/store/modules/user.js b/anrui-system-ui/src/store/modules/user.js
index ccc864a4d8..a5c891d503 100644
--- a/anrui-system-ui/src/store/modules/user.js
+++ b/anrui-system-ui/src/store/modules/user.js
@@ -41,7 +41,9 @@ const actions = {
Orgname: data.organizationName,
dwjb: data.dwjb,
pNameAndDepartmentNameAndPostName: data.pNameAndDepartmentNameAndPostName,
- roleName: data.roleName
+ roleName: data.roleName,
+ defaultOrgPathName: data.defaultOrgPathName,
+ defaultOrgPath: data.defaultOrgPath
}
commit('SET_UESRINFO', user)
window.sessionStorage.setItem('userSid', user.userSid)
@@ -50,6 +52,8 @@ const actions = {
window.sessionStorage.setItem('name', user.name)
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', user.pNameAndDepartmentNameAndPostName)
window.sessionStorage.setItem('roleName', user.roleName)
+ window.sessionStorage.setItem('defaultOrgPathName', user.defaultOrgPathName)
+ window.sessionStorage.setItem('defaultOrgPath', user.defaultOrgPath)
resolve(data)
}).catch(error => {
reject(error)
diff --git a/anrui-system-ui/src/views/Home/Home.vue b/anrui-system-ui/src/views/Home/Home.vue
index f175c62b5e..3b87e27e6b 100644
--- a/anrui-system-ui/src/views/Home/Home.vue
+++ b/anrui-system-ui/src/views/Home/Home.vue
@@ -3,10 +3,13 @@
@@ -238,6 +241,7 @@ export default {
title: '系统管理'
}],
userInfo: {},
+ orgDept_list: [],
shuliang: {
workCount: ''
},
@@ -253,6 +257,8 @@ export default {
departmentName: '',
name: '',
pNameAndDepartmentNameAndPostName: '',
+ defaultOrgPathName: '',
+ defaultOrgPath: '',
roleName: '',
year: ''
}
@@ -267,6 +273,8 @@ export default {
this.Orgname = window.sessionStorage.getItem('Orgname')
this.departmentName = window.sessionStorage.getItem('departmentName')
this.pNameAndDepartmentNameAndPostName = window.sessionStorage.getItem('pNameAndDepartmentNameAndPostName')
+ this.defaultOrgPathName = window.sessionStorage.getItem('defaultOrgPathName')
+ this.defaultOrgPath = window.sessionStorage.getItem('defaultOrgPath')
this.roleName = window.sessionStorage.getItem('roleName')
this.name = window.sessionStorage.getItem('name')
var nowDate = new Date()
@@ -285,6 +293,11 @@ export default {
this.timer = setInterval(this.getNum, 20000)
}
})
+ User.getOrgListByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
+ if (res.success) {
+ this.orgDept_list= res.data
+ }
+ })
},
getNum() {
getTodoNum(window.sessionStorage.getItem('userSid')).then((resp) => {
@@ -360,26 +373,41 @@ export default {
toNavbar(name) {
let myPopup = window.open(name + '?token=' + getStorage(), '_blank')
},
+ changeOrg(value) {
+ const choose = this.orgDept_list.filter((item) => item.orgName === value)
+ this.defaultOrgPathName = choose[0].orgName
+ this.defaultOrgPath = choose[0].orgPath
+ },
toNav(index, name, titleName) {
+ const organizationData = {
+ defaultOrgPathName: this.defaultOrgPathName,
+ defaultOrgPath: this.defaultOrgPath
+ }
if (index == '9') {
// this.$router.push({path: '/index'})
let myPopup = window.open('/#/index', '_blank')
} else if (index == '7') {
+ // let myPopup = window.open('http://127.0.0.1:9531/base/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
let myPopup = window.open('http://anrui.yyundong.com/base/#/' + '?token=' + getStorage(), '_blank')
// let myPopup = window.open('http://120.46.172.184/base/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '8') {
+ // let myPopup = window.open('http://127.0.0.1:9531/message/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
let myPopup = window.open('http://anrui.yyundong.com/message/#/' + '?token=' + getStorage(), '_blank')
// let myPopup = window.open('http://120.46.172.184/message/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '1') {
- let myPopup = window.open('http://anrui.yyundong.com/scm/#/' + '?token=' + getStorage(), '_blank')
+ // let myPopup = window.open('http://127.0.0.1:9531/scm/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
+ let myPopup = window.open('http://anrui.yyundong.com/scm/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
// let myPopup = window.open('http://120.46.172.184/scm/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '4') {
+ // let myPopup = window.open('http://127.0.0.1:9531/fin/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
let myPopup = window.open('http://anrui.yyundong.com/fin/#/' + '?token=' + getStorage(), '_blank')
// let myPopup = window.open('http://120.46.172.184/fin/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '5') {
+ // let myPopup = window.open('http://127.0.0.1:9531/manage/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
let myPopup = window.open('http://anrui.yyundong.com/manage/#/' + '?token=' + getStorage(), '_blank')
// let myPopup = window.open('http://120.46.172.184/manage/#/' + '?token=' + getStorage(), '_blank')
} else if (index == '0') {
+ // let myPopup = window.open('http://127.0.0.1:9531/buscenter/#/' + '?token=' + getStorage() + '&organizationData=' + encodeURI((JSON.stringify(organizationData))), '_blank')
let myPopup = window.open('http://anrui.yyundong.com/buscenter/#/' + '?token=' + getStorage(), '_blank')
// let myPopup = window.open('http://120.46.172.184/buscenter/#/' + '?token=' + getStorage(), '_blank')
}
@@ -592,4 +620,12 @@ p {
font-size: 14px !important;
}
}
+.selectStyle {
+ ::v-deep .el-input__inner {
+ border: 0px !important;
+ background-color: #0294d7 !important;
+ font-size: 17px;
+ color: #FFFFFF;
+ }
+}