From 9bd1864202a5b6a84416734c335c2cc7cef102b9 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Mon, 28 Feb 2022 15:44:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AD=89=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/header/index.vue | 5 +++-- src/pages/account/login/index.vue | 11 +++++++---- src/pages/project/add/index.vue | 23 ++++++++++++----------- src/pages/system/list/staff.vue | 9 ++++++--- src/router/index.js | 4 ++-- src/setting.js | 6 +++--- 6 files changed, 33 insertions(+), 25 deletions(-) diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue index 115812c..f72e487 100644 --- a/src/layouts/header/index.vue +++ b/src/layouts/header/index.vue @@ -8,10 +8,10 @@
- {{ customer ? customerName : userName }} + {{ customerName || userName }}
- 个人中心 + 个人中心 修改密码
@@ -58,6 +58,7 @@ export default { ]) }, mounted() { + console.log(33, this.customer, this.userName) this.getSystemDetail(); this.getUserDetail(); }, diff --git a/src/pages/account/login/index.vue b/src/pages/account/login/index.vue index c9de844..bdf557c 100644 --- a/src/pages/account/login/index.vue +++ b/src/pages/account/login/index.vue @@ -131,13 +131,16 @@ export default { if (res && res.status == 30001) { this.phoneVisible = true; } - this.getVerImg(); - this.loginForm.code = ""; + this.getVerImg() + this.loginForm.code = '' util.local.set(Setting.tokenKey, res.data.token, Setting.tokenExpires); this.SET_FROM(false) this.getRole() this.queryCustomer() - }).catch(res => {}) + }).catch(res => { + this.getVerImg() + this.loginForm.code = '' + }) } else { return util.errorMsg("请检查表单数据"); } @@ -153,7 +156,7 @@ export default { this.$get(this.api.isClient).then(res => { util.successMsg("登录成功"); this.setCustomer(res.customer); - this.setCustomerName(res.customerName); + res.customerName && this.setCustomerName(res.customerName); // let redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : "/index"; this.$router.replace('/index'); }).catch(res => {}); diff --git a/src/pages/project/add/index.vue b/src/pages/project/add/index.vue index a41741a..a808c55 100644 --- a/src/pages/project/add/index.vue +++ b/src/pages/project/add/index.vue @@ -102,21 +102,21 @@ - + - + - + @@ -142,13 +142,14 @@ - +
@@ -161,6 +162,9 @@ export default { teacherVisible: false, roleList: [], // 角色列表 orgList: [], // 员工组织架构列表 + casProps: { + value: 'id' + }, teacherForm: { accountId: "", account: "", @@ -304,18 +308,17 @@ export default { this.isAdd = true; this.teacherVisible = true; this.orgList = this.$refs.org.orgList; - // console.log(JSON.stringify(this.orgList)); }, getStaffDetail(accountId) { // 获取员工详情 this.$get(`${this.api.staffDetail}?accountId=${accountId}`).then(res => { let { data } = res; this.teacherForm = data; - // this.roleList = data.roleAndDeptList - this.teacherForm.roleValue = data.roleAndDeptList.map(i => i.roleName); + this.teacherForm.roleValue = data.roleAndDeptList.map(i => i.roleId); this.teacherForm.roleAndDeptList = data.roleAndDeptList.map(i => { i.cascaderValue = [i.staffArchitectureId, i.gradeId] return i; }); + console.log(22, this.teacherForm) }).catch(res => {}); }, resetPassword(row) { // 重置密码 diff --git a/src/router/index.js b/src/router/index.js index af8fcd5..d80cecb 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -229,7 +229,7 @@ function getPermission() { console.log(permissionRouters, "处理好的"); const station = permissionRouters.findIndex(e => e.name === 'station') console.log(333, station) - if (station) { + if (station !== -1) { permissionRouters[station].children.push({ name: `stationPreview`, path: `/station/preview`, @@ -243,7 +243,7 @@ function getPermission() { router.app.$options.store.commit("routers", nav); let redirect = [{ path: "/index", - redirect: station ? '/station' : permissionRouters[0].path + redirect: station !== -1 ? '/station' : permissionRouters[0].path }]; router.addRoutes(redirect); router.addRoutes(permissionRouters); diff --git a/src/setting.js b/src/setting.js index cdbd4cd..81ad999 100644 --- a/src/setting.js +++ b/src/setting.js @@ -37,11 +37,11 @@ if (isHh) { bankPath = `${bankPath}/banksystem` title = "职站服务端管理系统"; } else if (isDev) { - jumpPath = "http://192.168.31.154:8087/"; + jumpPath = "http://192.168.31.125:8087/"; bankPath = `http://192.168.31.125:8093` // host = "http://www.occupationlab.com:9000/";//线上 - // host = "http://39.108.250.202:9000/"; // 中台测试服 - host = "http://192.168.31.151:9000/"; // 榕 + host = "http://39.108.250.202:9000/"; // 中台测试服 + // host = "http://192.168.31.151:9000/"; // 榕 // host = 'http://192.168.31.137:9000/'; // 赓 title = "职站服务端管理系统"; } else {