diff --git a/src/components/Sidebar.vue b/src/components/Sidebar.vue index 42a6367..d2b84e8 100644 --- a/src/components/Sidebar.vue +++ b/src/components/Sidebar.vue @@ -56,17 +56,17 @@ export default { return { items: [ { - icon: 'el-icon-lx-home', + icon: 'el-icon-school', index: 'customer', title: '客户管理' }, { - icon: 'el-icon-lx-cascades', + icon: 'el-icon-user', index: 'user', title: '用户管理' }, { - icon: 'el-icon-lx-copy', + icon: 'el-icon-shopping-bag-2', index: 'order', title: '订单管理' }, @@ -76,12 +76,12 @@ export default { // title: '服务配置' // }, { - icon: 'el-icon-lx-emoji', + icon: 'el-icon-document-checked', index: 'curriculum', title: '课程管理' }, { - icon: 'el-icon-lx-emoji', + icon: 'el-icon-notebook-2', index: 'data', title: '数据管理' } 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 ae15a03..cdff824 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/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 diff --git a/src/views/customer/AddCustomer.vue b/src/views/customer/AddCustomer.vue index c91eddd..8a72c3f 100644 --- a/src/views/customer/AddCustomer.vue +++ b/src/views/customer/AddCustomer.vue @@ -522,6 +522,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..2eb25c4 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 - +