Browse Source

修复机构 用户密码

Shannon_mu 3 years ago
parent
commit
a998187760

+ 2 - 2
userCenter/src/config/env.development.js

@@ -8,12 +8,12 @@
 module.exports = {
 module.exports = {
   edition: "development",
   edition: "development",
   Env: "prod", // // 测试环境 dev |  正式环境 prod
   Env: "prod", // // 测试环境 dev |  正式环境 prod
-  // baseUrl: "http://114.135.61.188:18093/login/login", // 项目地址
+  // baseUrl: "http://114.135.61.188:18093/sc-login/", // 项目地址
   // baseApi: "http://10.0.0.62:8081", // 本地api请求地址
   // baseApi: "http://10.0.0.62:8081", // 本地api请求地址
   // baseMapApi: "http://114.135.61.187:38082", // arcgis API
   // baseMapApi: "http://114.135.61.187:38082", // arcgis API
   // baseImgApi: "http://114.135.61.187:38082", // 图片api请求地址
   // baseImgApi: "http://114.135.61.187:38082", // 图片api请求地址
   // baseExcelApi: "http://114.135.61.187:38082", // excel请求地址
   // baseExcelApi: "http://114.135.61.187:38082", // excel请求地址
-  // loginUrl: "http://114.135.61.188:18093/login/login",
+  // loginUrl: "http://114.135.61.188:18093/sc-login/",
   // websoketUrl:'114.135.61.187:38081',
   // websoketUrl:'114.135.61.187:38081',
   // warnDetailUrl:"http://114.135.61.188:18093/dispatch/warnDetail",// 综合调度系统-系统管理-报警管理-报警详情界面
   // warnDetailUrl:"http://114.135.61.188:18093/dispatch/warnDetail",// 综合调度系统-系统管理-报警管理-报警详情界面
   // taskManagementUrl:"http://114.135.61.188:18093/maintenance/taskManagement",// 运维管理系统-巡检管理-任务管理界面
   // taskManagementUrl:"http://114.135.61.188:18093/maintenance/taskManagement",// 运维管理系统-巡检管理-任务管理界面

+ 2 - 2
userCenter/src/config/env.production.js

@@ -8,12 +8,12 @@
 module.exports = {
 module.exports = {
   edition: "production",
   edition: "production",
   Env: "prod", // // 测试环境 dev |  正式环境 prod
   Env: "prod", // // 测试环境 dev |  正式环境 prod
-  baseUrl: "http://114.135.61.188:18093/login/login", // 项目地址
+  baseUrl: "http://114.135.61.188:18093/sc-login/", // 项目地址
   baseApi: "http://114.135.61.187:38081", // 本地api请求地址
   baseApi: "http://114.135.61.187:38081", // 本地api请求地址
   baseMapApi: "http://114.135.61.187:38082", // arcgis API
   baseMapApi: "http://114.135.61.187:38082", // arcgis API
   baseImgApi: "http://114.135.61.187:38082", // 图片api请求地址
   baseImgApi: "http://114.135.61.187:38082", // 图片api请求地址
   baseExcelApi: "http://114.135.61.187:38082", // excel请求地址
   baseExcelApi: "http://114.135.61.187:38082", // excel请求地址
-  loginUrl: "http://114.135.61.188:18093/login/login",
+  loginUrl: "http://114.135.61.188:18093/sc-login/",
   websoketUrl:'114.135.61.187:38081',
   websoketUrl:'114.135.61.187:38081',
   warnDetailUrl:"http://114.135.61.188:18093/dispatch/warnDetail",// 综合调度系统-系统管理-报警管理-报警详情界面
   warnDetailUrl:"http://114.135.61.188:18093/dispatch/warnDetail",// 综合调度系统-系统管理-报警管理-报警详情界面
   taskManagementUrl:"http://114.135.61.188:18093/maintenance/taskManagement",// 运维管理系统-巡检管理-任务管理界面
   taskManagementUrl:"http://114.135.61.188:18093/maintenance/taskManagement",// 运维管理系统-巡检管理-任务管理界面

+ 55 - 55
userCenter/src/views/system/menus/index.vue

@@ -163,19 +163,19 @@ export default {
                     this.familyOptions = [{ id: data.id, name: data.name }];
                     this.familyOptions = [{ id: data.id, name: data.name }];
                     const params = JSON.parse(
                     const params = JSON.parse(
                         JSON.stringify({
                         JSON.stringify({
-                                id: '',
-                                parentMenuId: data.id, //上级菜单
-                                name:'', //名称
-                                englishName: '', //英文名称
-                                seq: '', //排序
-                                linkPath: '', //链接
-                                menuImage: '', //图标
-                                menuDynamicImage: '', //动态图标
-                                permissionFlag: '', //功能码
-                                showState: 1, //状态
-                                remark: '', //备注
-                                isAdmin: 0, //超级管理员菜单
-                                isTenant: 1 //租户菜单
+                            id: '',
+                            parentMenuId: data.id, //上级菜单
+                            name: '', //名称
+                            englishName: '', //英文名称
+                            seq: '', //排序
+                            linkPath: '', //链接
+                            menuImage: '', //图标
+                            menuDynamicImage: '', //动态图标
+                            permissionFlag: '', //功能码
+                            showState: 1, //状态
+                            remark: '', //备注
+                            isAdmin: 0, //超级管理员菜单
+                            isTenant: 1 //租户菜单
                         })
                         })
                     );
                     );
                     this.rightData = params;
                     this.rightData = params;
@@ -186,7 +186,6 @@ export default {
                 .catch(() => {});
                 .catch(() => {});
         },
         },
         editMenu(data) {
         editMenu(data) {
-            // this.treeClick(data);
             new Promise((resolve, reject) => {
             new Promise((resolve, reject) => {
                 if (this.isEdit) {
                 if (this.isEdit) {
                     this.$msgBox('您编辑的内容尚未保存,是否继续?', ' ')
                     this.$msgBox('您编辑的内容尚未保存,是否继续?', ' ')
@@ -201,8 +200,8 @@ export default {
                 }
                 }
             })
             })
                 .then(() => {
                 .then(() => {
+                    this.fun(data);
                     this.isEdit = 'edit';
                     this.isEdit = 'edit';
-                    this.setFamily(data.id);
                     this.$nextTick(() => {
                     this.$nextTick(() => {
                         this.$refs.tree.setCurrentKey(data.id);
                         this.$refs.tree.setCurrentKey(data.id);
                     });
                     });
@@ -237,55 +236,56 @@ export default {
                 }
                 }
             });
             });
         },
         },
+        fun(params) {
+            const {
+                id = '',
+                parentMenuId = '', //上级菜单
+                name = '', //名称
+                englishName = '', //英文名称
+                seq = '', //排序
+                linkPath = '', //链接
+                menuImage = '', //图标
+                menuDynamicImage = '', //动态图标
+                permissionFlag = '', //功能码
+                showState = 1, //状态
+                remark = '', //备注
+                isAdmin = 1, //超级管理员菜单
+                isTenant = 1 //租户菜单
+            } = params;
+            this.setFamily(id);
+            Object.assign(this.rightData, {
+                id,
+                parentMenuId, //上级菜单
+                name, //名称
+                englishName, //英文名称
+                seq, //排序
+                linkPath, //链接
+                menuImage, //图标
+                menuDynamicImage, //动态图标
+                permissionFlag, //功能码
+                showState, //状态
+                remark, //备注
+                isAdmin, //超级管理员菜单
+                isTenant //租户菜单
+            });
+            this.$nextTick(() => {
+                this.$refs.tree.setCurrentKey(this.rightData.id);
+            });
+        },
         treeClick(params) {
         treeClick(params) {
             if (this.rightData.id == params.id) return;
             if (this.rightData.id == params.id) return;
-             this.$refs.form.initFrom('form')
-            const fun = () => {
-                this.isEdit = false;
-                const {
-                    id = '',
-                    parentMenuId = '', //上级菜单
-                    name = '', //名称
-                    englishName = '', //英文名称
-                    seq = '', //排序
-                    linkPath = '', //链接
-                    menuImage = '', //图标
-                    menuDynamicImage = '', //动态图标
-                    permissionFlag = '', //功能码
-                    showState = 1, //状态
-                    remark = '', //备注
-                    isAdmin = 1, //超级管理员菜单
-                    isTenant = 1 //租户菜单
-                } = params;
-                this.setFamily(id);
-                Object.assign(this.rightData, {
-                    id,
-                    parentMenuId, //上级菜单
-                    name, //名称
-                    englishName, //英文名称
-                    seq, //排序
-                    linkPath, //链接
-                    menuImage, //图标
-                    menuDynamicImage, //动态图标
-                    permissionFlag, //功能码
-                    showState, //状态
-                    remark, //备注
-                    isAdmin, //超级管理员菜单
-                    isTenant //租户菜单
-                });
-                this.$nextTick(() => {
-                    this.$refs.tree.setCurrentKey(this.rightData.id);
-                });
-            };
+            this.$refs.form.initFrom('form');
             if (this.isEdit) {
             if (this.isEdit) {
                 this.$msgBox('您编辑的内容尚未保存,是否继续?', ' ')
                 this.$msgBox('您编辑的内容尚未保存,是否继续?', ' ')
                     .then(() => {
                     .then(() => {
-                        fun();
+                        this.isEdit = false;
+                        this.fun(params);
                     })
                     })
                     .catch(() => {});
                     .catch(() => {});
                 return;
                 return;
             }
             }
-            fun();
+            this.isEdit = false;
+            this.fun(params);
         },
         },
         setFamily(id) {
         setFamily(id) {
             this.familyArr = familyTree(this.menuList, id);
             this.familyArr = familyTree(this.menuList, id);

+ 43 - 67
userCenter/src/views/system/organs/index.vue

@@ -55,7 +55,7 @@
                     <!-- <span v-else-if="isEdit == 'edit'">编辑-{{ title }}</span> -->
                     <!-- <span v-else-if="isEdit == 'edit'">编辑-{{ title }}</span> -->
                     <span v-else>{{ title }}</span>
                     <span v-else>{{ title }}</span>
                 </h3>
                 </h3>
-                <rightFrom :menuList="menuList" :formData="rightData" ref="form" :isEdit="isEdit" />
+                <rightFrom :menuList="menuList" :formData="rightData" ref="form" :isEdit="isEdit" @getList="getList" />
             </el-main>
             </el-main>
         </el-container>
         </el-container>
     </div>
     </div>
@@ -74,8 +74,8 @@ export const familyTree = (arr1 = [], id) => {
                 temp.push(item);
                 temp.push(item);
                 forFn(arr1, item.parentId);
                 forFn(arr1, item.parentId);
                 break;
                 break;
-            } else if (item.children) {
-                forFn(item.children, id1);
+            } else if (item.orgs) {
+                forFn(item.orgs, id1);
             }
             }
         }
         }
     };
     };
@@ -145,13 +145,6 @@ export default {
             })
             })
                 .then(() => {
                 .then(() => {
                     this.isEdit = 'add';
                     this.isEdit = 'add';
-                    // if (data.id) {
-                    //     this.familyArr = [{ name: '添加子菜单模块' }];
-                    //     this.familyOptions = [{ id: data.id, name: data.name }];
-                    // } else {
-                    //     this.familyArr = [{ name: '添加顶级菜单模块' }];
-                    //     this.familyOptions = [{ id: 0, name: '顶级菜单' }];
-                    // }
                     const params = JSON.parse(
                     const params = JSON.parse(
                         JSON.stringify({
                         JSON.stringify({
                             id: '',
                             id: '',
@@ -167,11 +160,7 @@ export default {
                             remark: '' //备注
                             remark: '' //备注
                         })
                         })
                     );
                     );
-                    // params.parentId = data.id;
                     this.rightData = params;
                     this.rightData = params;
-                    // this.$nextTick(() => {
-                    //     this.$refs.tree1.setCurrentKey(params.parentId);
-                    // });
                 })
                 })
                 .catch(() => {});
                 .catch(() => {});
         },
         },
@@ -190,27 +179,18 @@ export default {
                 }
                 }
             })
             })
                 .then(() => {
                 .then(() => {
+                    this.title = data.orgName;
+                    this.fun(data);
                     this.isEdit = 'edit';
                     this.isEdit = 'edit';
-                    this.setFamily(data.id);
-                    const params = JSON.parse(JSON.stringify(data));
-                    const initParams = JSON.parse(JSON.stringify(bodyContent));
-                    params.permissionList = _.isArray(params.permissionList)
-                        ? params.permissionList.concat(initParams.permissionList)
-                        : initParams.permissionList;
-                    // this.$refs.form.clearValidate();
-                    this.data = params;
                     this.$nextTick(() => {
                     this.$nextTick(() => {
-                        this.$refs.tree1.setCurrentKey(this.data.id);
+                        this.$refs.tree1.setCurrentKey(data.id);
                     });
                     });
                 })
                 })
                 .catch(() => {});
                 .catch(() => {});
         },
         },
         deleteMenus(data) {
         deleteMenus(data) {
             const { id, orgName } = data;
             const { id, orgName } = data;
-            // if (id == 0) {
-            //     this.$message.error('组织机构不能删除!');
-            //     return;
-            // }
+            this.treeClick(data);
             this.$msgBox(`刪除机构 "${orgName}"`, '删除后将无法恢复,请问是否继续?')
             this.$msgBox(`刪除机构 "${orgName}"`, '删除后将无法恢复,请问是否继续?')
                 .then(() => {
                 .then(() => {
                     this.$http.post('/org/deleteAll', id).then(({ status, data, msg }) => {
                     this.$http.post('/org/deleteAll', id).then(({ status, data, msg }) => {
@@ -230,65 +210,61 @@ export default {
                 })
                 })
                 .catch(() => {});
                 .catch(() => {});
         },
         },
+        fun(params) {
+            const {
+                id = '',
+                orgType = '', //机构类型
+                parentOrgId = '', //上级机构
+                orgAreaId = '', //所属区域
+                orgName = '', //机构名称
+                orgState = 1, //状态
+                orgLeaderName = '', //负责人
+                orgLeaderPhone = '', //手机号
+                orgLeaderSex = '', //性别
+                orgLeaderEmail = '', //邮箱
+                remark = '' //备注
+            } = params;
+            Object.assign(this.rightData, {
+                id,
+                orgType, //机构类型
+                parentOrgId, //上级机构
+                orgAreaId, //所属区域
+                orgName, //机构名称
+                orgState, //状态
+                orgLeaderName, //负责人
+                orgLeaderPhone, //手机号
+                orgLeaderSex, //性别
+                orgLeaderEmail, //邮箱
+                remark //备注
+            });
+            this.$nextTick(() => {
+                this.$refs.tree1.setCurrentKey(this.rightData.id);
+            });
+        },
         treeClick(params) {
         treeClick(params) {
             if (this.rightData.id == params.id) return;
             if (this.rightData.id == params.id) return;
-            const fun = () => {
-                this.isEdit = false;
-                const {
-                    id = '',
-                    orgType = '', //机构类型
-                    parentOrgId = '', //上级机构
-                    orgAreaId = '', //所属区域
-                    orgName = '', //机构名称
-                    orgState = 1, //状态
-                    orgLeaderName = '', //负责人
-                    orgLeaderPhone = '', //手机号
-                    orgLeaderSex = '', //性别
-                    orgLeaderEmail = '', //邮箱
-                    remark = '' //备注
-                } = params;
-                this.setFamily(id);
-                Object.assign(this.rightData, {
-                    id,
-                    orgType, //机构类型
-                    parentOrgId, //上级机构
-                    orgAreaId, //所属区域
-                    orgName, //机构名称
-                    orgState, //状态
-                    orgLeaderName, //负责人
-                    orgLeaderPhone, //手机号
-                    orgLeaderSex, //性别
-                    orgLeaderEmail, //邮箱
-                    remark //备注
-                });
-                this.$nextTick(() => {
-                    this.$refs.tree1.setCurrentKey(this.rightData.id);
-                });
-            };
             if (this.isEdit) {
             if (this.isEdit) {
                 this.$msgBox('您编辑的内容尚未保存,是否继续?', ' ')
                 this.$msgBox('您编辑的内容尚未保存,是否继续?', ' ')
                     .then(() => {
                     .then(() => {
                         this.title = params.orgName;
                         this.title = params.orgName;
-                        fun();
+                        this.isEdit = false;
+                        this.fun(params);
                     })
                     })
                     .catch(() => {});
                     .catch(() => {});
                 return;
                 return;
             }
             }
-            fun();
+            this.isEdit = false;
+            this.fun(params);
             this.title = params.orgName;
             this.title = params.orgName;
         },
         },
         getList() {
         getList() {
             this.$http.postForm('/org/getOrgTree', { orgType: '' }).then(({ status, data, msg }) => {
             this.$http.postForm('/org/getOrgTree', { orgType: '' }).then(({ status, data, msg }) => {
                 if (status === 0 && data) {
                 if (status === 0 && data) {
                     this.organList = [{ orgs: data, orgName: '组织机构', id: 0 }];
                     this.organList = [{ orgs: data, orgName: '组织机构', id: 0 }];
+                    this.isEdit = false;
                     this.treeClick(data[0]);
                     this.treeClick(data[0]);
                 }
                 }
             });
             });
-        },
-        setFamily(id) {
-            this.familyArr = familyTree(this.menuList, id);
-            // const len = this.familyArr.length;
-            // this.familyOptions = len < 2 ? [{ id: 0, name: '顶级菜单' }] : [this.familyArr[len - 2]];
         }
         }
     },
     },
     created() {
     created() {

+ 3 - 2
userCenter/src/views/system/organs/popups/EditForm.vue

@@ -291,18 +291,19 @@ export default {
                 // if (this.formData.parentOrgId == '') {
                 // if (this.formData.parentOrgId == '') {
                 //     this.formData.parentOrgId = 0;
                 //     this.formData.parentOrgId = 0;
                 // }
                 // }
+                debugger;
                 let data = JSON.parse(JSON.stringify(newData)),
                 let data = JSON.parse(JSON.stringify(newData)),
                     method = 'post',
                     method = 'post',
                     url = '/org/insert';
                     url = '/org/insert';
-                if ('edit' == this.formData.todo) {
+                if ('edit' == this.isEdit) {
                     url = '/org/update';
                     url = '/org/update';
                 }
                 }
                 this.$http[method](url, data)
                 this.$http[method](url, data)
                     .then(({ status, data, msg }) => {
                     .then(({ status, data, msg }) => {
                         if (0 == status) {
                         if (0 == status) {
+                            this.$emit('getList');
                             this.$message.success(msg);
                             this.$message.success(msg);
                             this.formData.callback && this.formData.callback();
                             this.formData.callback && this.formData.callback();
-                            this.$emit('close');
                         } else {
                         } else {
                             this.$message.error(msg);
                             this.$message.error(msg);
                         }
                         }

+ 87 - 35
userCenter/src/views/system/users/popups/AddOrEditUserInfo.vue

@@ -9,14 +9,21 @@
 <template>
 <template>
     <div class="alert-body__main_content">
     <div class="alert-body__main_content">
         <zz-form :cols="formCols" :data="formData" :rules="formRules" :errors="formErrors" labelWidth="120" ref="form">
         <zz-form :cols="formCols" :data="formData" :rules="formRules" :errors="formErrors" labelWidth="120" ref="form">
+            <el-input slot="password" type="password" v-model="formData.password"></el-input>
+            <el-input slot="passwordOK" type="password" v-model="formData.passwordOK"></el-input>
             <el-select slot="status" v-model="formData.enableState">
             <el-select slot="status" v-model="formData.enableState">
                 <el-option v-for="(item, index) in allStatus" :key="index" :label="item.label" :value="item.id">{{ item.label }}</el-option>
                 <el-option v-for="(item, index) in allStatus" :key="index" :label="item.label" :value="item.id">{{ item.label }}</el-option>
             </el-select>
             </el-select>
             <el-input slot="roleId" v-if="noAllRoleId" v-model="formData.roleName" disabled></el-input>
             <el-input slot="roleId" v-if="noAllRoleId" v-model="formData.roleName" disabled></el-input>
             <el-select v-else slot="roleId" v-model="formData.roleId">
             <el-select v-else slot="roleId" v-model="formData.roleId">
-                <el-option v-show="item.roleState" v-for="(item, index) in allRoleId" :key="index" :label="item.roleName" :value="item.id">{{
-                    item.roleName
-                }}</el-option>
+                <el-option
+                    v-show="item.roleState"
+                    v-for="(item, index) in allRoleId"
+                    :key="index"
+                    :label="item.roleName"
+                    :value="item.id"
+                    >{{ item.roleName }}</el-option
+                >
             </el-select>
             </el-select>
             <el-select slot="userType" v-model="formData.userType">
             <el-select slot="userType" v-model="formData.userType">
                 <el-option v-for="(item, index) in allUserType" :key="index" :label="item.dictValue" :value="item.dictCode">{{
                 <el-option v-for="(item, index) in allUserType" :key="index" :label="item.dictValue" :value="item.dictCode">{{
@@ -27,7 +34,7 @@
                 :props="defaultProps"
                 :props="defaultProps"
                 slot="companyOrgId"
                 slot="companyOrgId"
                 class="new-select-tree"
                 class="new-select-tree"
-                selectTreeTitle='组织机构'
+                selectTreeTitle="组织机构"
                 width="320"
                 width="320"
                 treeWidth="320"
                 treeWidth="320"
                 :options="organListCompany"
                 :options="organListCompany"
@@ -39,7 +46,7 @@
                 :props="defaultProps"
                 :props="defaultProps"
                 slot="deptOrgId"
                 slot="deptOrgId"
                 class="new-select-tree"
                 class="new-select-tree"
-                selectTreeTitle='组织机构'
+                selectTreeTitle="组织机构"
                 width="320"
                 width="320"
                 treeWidth="320"
                 treeWidth="320"
                 :options="organListdepartment"
                 :options="organListdepartment"
@@ -88,6 +95,12 @@
 <script>
 <script>
 import envConfig from '@/config';
 import envConfig from '@/config';
 // import SelectTree from '@/components/common/SelectTree.vue';
 // import SelectTree from '@/components/common/SelectTree.vue';
+
+const length_null = () => {
+    let pattern = /^.{6,20}$/,
+        message = `请输入不少于六位数密码且不超过20`;
+    return { pattern, required: true, message: message, trigger: 'blur' };
+};
 export default {
 export default {
     props: ['params'],
     props: ['params'],
     components: {
     components: {
@@ -95,11 +108,32 @@ export default {
     },
     },
 
 
     data() {
     data() {
+        var validatePassContrast = (rule, value, callback) => {
+            if (value === '') {
+                callback(new Error('请输入密码'));
+            } else {
+                if (this.formData.password !== value) {
+                    callback(new Error('两次密码不一致'));
+                }
+                callback();
+            }
+        };
+        var validatePass = (rule, value, callback) => {
+            if (value === '') {
+                callback(new Error('请输入密码'));
+            } else {
+                if (value.length < 6) {
+                    callback(new Error('密码位数不得少于6位'));
+                }
+                callback();
+            }
+        };
+
         return {
         return {
             token: {
             token: {
                 [localStorage.getItem('SC_token') && 'Authorization']: 'Bearer ' + localStorage.getItem('SC_token')
                 [localStorage.getItem('SC_token') && 'Authorization']: 'Bearer ' + localStorage.getItem('SC_token')
             },
             },
-            isLoginUser:false,
+            isLoginUser: false,
             envConfig: envConfig,
             envConfig: envConfig,
             organList: [
             organList: [
                 {
                 {
@@ -111,8 +145,8 @@ export default {
                     display: true
                     display: true
                 }
                 }
             ],
             ],
-            organListCompany:[],
-            organListdepartment:[],
+            organListCompany: [],
+            organListdepartment: [],
 
 
             defaultProps: {
             defaultProps: {
                 value: 'id', // 唯一标识
                 value: 'id', // 唯一标识
@@ -128,6 +162,8 @@ export default {
                 enableState: '1',
                 enableState: '1',
                 id: '',
                 id: '',
                 phone: '',
                 phone: '',
+                password: '',
+                passwordOK: '',
                 photo: '',
                 photo: '',
                 remark: '',
                 remark: '',
                 roleId: '',
                 roleId: '',
@@ -150,8 +186,8 @@ export default {
                 }
                 }
             ],
             ],
             allRoleId: [],
             allRoleId: [],
-            noAllRoleId:false,
-            noIdInAllRoleId:false,
+            noAllRoleId: false,
+            noIdInAllRoleId: false,
             allUserType: [],
             allUserType: [],
             formCols: [
             formCols: [
                 [
                 [
@@ -175,6 +211,16 @@ export default {
                         prop: 'phone',
                         prop: 'phone',
                         input: true
                         input: true
                     },
                     },
+                    {
+                        label: '密码',
+                        prop: 'password',
+                        slot: 'password'
+                    },
+                    {
+                        label: '确认密码',
+                        prop: 'passwordOK',
+                        slot: 'passwordOK'
+                    },
                     {
                     {
                         label: '状态',
                         label: '状态',
                         prop: 'enableState',
                         prop: 'enableState',
@@ -241,12 +287,20 @@ export default {
                 // deptOrgId: [this.$valid.selectRequired('所属部门')],
                 // deptOrgId: [this.$valid.selectRequired('所属部门')],
                 username: [this.$valid.inputRequired('用户名')],
                 username: [this.$valid.inputRequired('用户名')],
                 phone: [this.$valid.patternPhone()],
                 phone: [this.$valid.patternPhone()],
+                password: [{ required: true, validator: validatePass, trigger: 'blur' }],
+                passwordOK: [{ required: true, validator: validatePassContrast, trigger: 'blur' }],
                 enableState: [this.$valid.inputRequired('状态')],
                 enableState: [this.$valid.inputRequired('状态')],
-                userType: [this.$valid.selectRequired('用户类型')],
+                userType: [this.$valid.selectRequired('用户类型')]
             },
             },
             formErrors: {}
             formErrors: {}
         };
         };
-    },    
+    },
+    watch: {
+        'formData.passwordOK'(val) {
+            if (this.formData.password !== val) {
+            }
+        }
+    },
     methods: {
     methods: {
         delformphoto() {
         delformphoto() {
             this.formData.photo = '';
             this.formData.photo = '';
@@ -272,7 +326,7 @@ export default {
                     .then(({ status, data, msg }) => {
                     .then(({ status, data, msg }) => {
                         loading.close();
                         loading.close();
                         if (0 == status) {
                         if (0 == status) {
-                            if(this.isLoginUser){
+                            if (this.isLoginUser) {
                                 this.$store.commit('setcCruUserInfo', this.formData);
                                 this.$store.commit('setcCruUserInfo', this.formData);
                             }
                             }
                             this.$message.success(msg);
                             this.$message.success(msg);
@@ -295,48 +349,46 @@ export default {
                 this.formData.photo = response.data;
                 this.formData.photo = response.data;
             }
             }
         },
         },
-        selectedcompanyOrgId(e){
-            this.formData.deptOrgId="";
-            this.formData.deptOrgName="";
+        selectedcompanyOrgId(e) {
+            this.formData.deptOrgId = '';
+            this.formData.deptOrgName = '';
             // 获取 部门树e
             // 获取 部门树e
-            this.$http.postForm('/org/getOrgUserTree', { orgType: 'department',id:e }).then(({ status, data, msg }) => {
+            this.$http.postForm('/org/getOrgUserTree', { orgType: 'department', id: e }).then(({ status, data, msg }) => {
                 if (status === 0) {
                 if (status === 0) {
-                    // console.log(data);                    
-                    this.organListdepartment = data?data:[]; 
+                    // console.log(data);
+                    this.organListdepartment = data ? data : [];
                 }
                 }
             });
             });
-            
         }
         }
     },
     },
     created() {
     created() {
         this.getselectAll();
         this.getselectAll();
         // this.getcompanyTree();
         // this.getcompanyTree();
-        this.formData = JSON.stringify(this.params.data)!== '{}' ? this.params.data : this.formData;
+        this.formData = JSON.stringify(this.params.data) !== '{}' ? this.params.data : this.formData;
         this.organList = this.params.organList ? this.params.organList : this.organList;
         this.organList = this.params.organList ? this.params.organList : this.organList;
         this.organListCompany = this.params.organListCompany ? this.params.organListCompany : this.organListCompany;
         this.organListCompany = this.params.organListCompany ? this.params.organListCompany : this.organListCompany;
         this.organListdepartment = this.params.organListdepartment ? this.params.organListdepartment : this.organListdepartment;
         this.organListdepartment = this.params.organListdepartment ? this.params.organListdepartment : this.organListdepartment;
         this.allRoleId = this.params.allRoleId ? this.params.allRoleId : this.allRoleId;
         this.allRoleId = this.params.allRoleId ? this.params.allRoleId : this.allRoleId;
         this.allUserType = this.params.allUserType ? this.params.allUserType : this.allUserType;
         this.allUserType = this.params.allUserType ? this.params.allUserType : this.allUserType;
-        this.isLoginUser = this.formData.id==this.$store.getters['getCruUserInfo'].id?true:false;
-        if(this.isLoginUser){
+        this.isLoginUser = this.formData.id == this.$store.getters['getCruUserInfo'].id ? true : false;
+        if (this.isLoginUser) {
             this.formCols = this.formColsEdit;
             this.formCols = this.formColsEdit;
         }
         }
-        if(this.allRoleId.length===0){
-            this.noAllRoleId = true
-        }else{
+        if (this.allRoleId.length === 0) {
+            this.noAllRoleId = true;
+        } else {
             // console.log(this.allRoleId);
             // console.log(this.allRoleId);
-            
-            this.noIdInAllRoleId = this.allRoleId.every((v,i)=>{
-                return v.id !== this.formData.roleId
-            })
+
+            this.noIdInAllRoleId = this.allRoleId.every((v, i) => {
+                return v.id !== this.formData.roleId;
+            });
             // console.log(this.noIdInAllRoleId);
             // console.log(this.noIdInAllRoleId);
-            if(this.noIdInAllRoleId){
+            if (this.noIdInAllRoleId) {
                 this.allRoleId.push({
                 this.allRoleId.push({
-                    id:this.formData.roleId,
-                    roleName:this.formData.roleName
-                })
+                    id: this.formData.roleId,
+                    roleName: this.formData.roleName
+                });
             }
             }
-            
         }
         }
     }
     }
 };
 };

+ 1 - 1
userCenter/src/views/system/users/popups/edituser.vue

@@ -221,7 +221,7 @@ export default {
                                     confirmButtonText: '确定',
                                     confirmButtonText: '确定',
                                     showClose:false,
                                     showClose:false,
                                 }).then(()=>{
                                 }).then(()=>{
-                                    window.open('http://114.135.61.188:18093/login/login', '_self');
+                                    window.open('http://114.135.61.188:18093/sc-login/', '_self');
                                     window.relogin = false;
                                     window.relogin = false;
                                     localStorage.removeItem('SC_token');
                                     localStorage.removeItem('SC_token');
                                     return;
                                     return;