From ec6a9332b48cc338dba730daab21b91d37a421f5 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 27 Jul 2021 10:48:24 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E7=99=BB=E5=BD=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Login.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/views/Login.vue b/src/views/Login.vue index 68c6752..83da3f9 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -197,15 +197,13 @@ export default { path:'/customer' }); localStorage.setItem('ms_username', this.param.username); - // 作用未知,暂时注释 - // let user = res.message.retvalue - // this.$store.commit("userLoginData", { userLogin_id : user.userId,userName: user.userName,roleId: user.roleId}); }).catch(err => { console.log(err,'reserr'); if(err.status===30001){ this.phoneVisible = true + }else if(err.status == 10004){ + this.blur() } - // this.$message.error(err.message) }); } else { this.$message.error('请输入账号/密码/验证码'); @@ -407,5 +405,6 @@ img{ display: flex; justify-content: space-between; border-bottom: 0; + background-color: transparent; } \ No newline at end of file From 76b55f786a89b5a7b9551a9aa5a429c1b3b02c9a Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 28 Jul 2021 15:25:20 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/index.js | 6 ++- src/utils/api.js | 5 ++- src/utils/http.js | 2 + src/views/customer/AddCustomer.vue | 19 +++++++++ src/views/data/Framework.vue | 52 +++++++++++++++++++------ src/views/data/Introduce.vue | 26 ++++++------- src/views/data/Product.vue | 22 ++++++++--- src/views/user/AddUser.vue | 62 +++++++++++++++++++++++------- 8 files changed, 147 insertions(+), 47 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 6a2df30..cf4b3bc 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -15,7 +15,8 @@ const store = new Vuex.Store({ userLoginId: '', userName: '', roleId: '', - loginToken: '' + loginToken: '', + schoolId: '' }, mutations:{ userAvatar(state,payload){ @@ -48,6 +49,9 @@ const store = new Vuex.Store({ tokenData (state, payload) { state.loginToken = payload.loginToken }, + schoolIdData (state, payload) { + state.schoolId = payload.schoolId + }, } }); diff --git a/src/utils/api.js b/src/utils/api.js index 6e179c3..d3a64fb 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -25,10 +25,11 @@ export default { delCustomers: `${host}/nakadai/nakadai/customer/delCustomers`, updateCustomer: `${host}/nakadai/nakadai/customer/updateCustomer`, addCustomer: `${host}/nakadai/nakadai/customer/addCustomer`, -// /nakadai/nakadai/customer/queryCustomerDetails queryCustomer: `${host}/nakadai/nakadai/customer/queryCustomer`, - queryCustomerDetails: `${host}/nakadai/nakadai/customer/queryCustomerDetails`, + saveOrUpdate:`${host}/data/data/role/saveOrUpdate`, + doAssign:`${host}/data/data/permission/doAssign`, + updateCustomerByRoleId:`${host}/nakadai/nakadai/customer/updateCustomerByRoleId`, resetPwdCustomer: `${host}/nakadai/nakadai/customer/resetPwd`, queryCustomerIsExists: `${host}/nakadai/nakadai/customer/queryCustomerIsExists`, diff --git a/src/utils/http.js b/src/utils/http.js index 532b93d..9e8a8f0 100644 --- a/src/utils/http.js +++ b/src/utils/http.js @@ -25,6 +25,8 @@ axios.interceptors.request.use(config => { if(token){ config.headers.token = token } + let schoolId = store.state.schoolId + if(schoolId) config.headers.schoolId = store.state.schoolId return config; }, err => { Message.error({ diff --git a/src/views/customer/AddCustomer.vue b/src/views/customer/AddCustomer.vue index 5e35c29..c71d0a5 100644 --- a/src/views/customer/AddCustomer.vue +++ b/src/views/customer/AddCustomer.vue @@ -511,6 +511,25 @@ export default { }).catch((res) => {}) }else{ this.$post(this.api.addCustomer,data).then((res) => { + let customerId = res.customerId + this.$store.commit('schoolIdData',{schoolId: this.form.schoolId}) + this.$post(this.api.saveOrUpdate,{ + clientId: 0, + id: '', + roleName: '超级管理员', + remark: '拥有一切权限', + isPort: 2 + }).then(res => { + let roleId = res.roleId + let perData = { + roleId, + permissionId: ["1408370117262635009","1409351488911056897","1409351867862228993","1408370186435096578","1409352518310699009","1409352550615228418","1409352584240963585","1409352623344459778","1409352647054860289","1409352682471563266","1409352720786530305","1409352742290726913","1408370244584927233","1409352872662278146","1409352903574298626","1409352923509825538","1409352940068937730","1409353018443702273"], + isPort: 2 + } + this.$post(this.api.doAssign,perData).then(res => {}).catch(res => {}) + this.$post(`${this.api.updateCustomerByRoleId}?customerId=${customerId}&roleId=${roleId}`).then(res => {}).catch(res => {}) + }).catch(res => {}) + this.$message.success('添加成功') this.goback() }).catch((res) => {}) diff --git a/src/views/data/Framework.vue b/src/views/data/Framework.vue index 9c40f78..297b378 100644 --- a/src/views/data/Framework.vue +++ b/src/views/data/Framework.vue @@ -22,7 +22,7 @@
- +
@@ -41,7 +41,7 @@ {{scope.row.dataSize}}M - +