diff --git a/.env.development b/.env.development index f274a46..2c8d108 100644 --- a/.env.development +++ b/.env.development @@ -2,10 +2,11 @@ NODE_ENV = 'development' # 本地环境接口地址(/api/index.ts文件中使用) -# VITE_API_URL = 'http://192.168.34.155:6677' +VITE_API_URL = 'http://192.168.34.155:6688' +# VITE_API_URL = 'http://183.63.230.59:6090' # VITE_API_URL = 'http://2xliv7gs.shenzhuo.vip:55296' VITE_WPAPI_URL = "http://jxjzw.zhgdyun.com:8081" -VITE_API_URL = "http://jxjzw.zhgdyun.com:9013" +# VITE_API_URL = "http://jxjzw.zhgdyun.com:9013" # 上传 # VITE_ULD_API_URL = 'http://192.168.34.155:8012/onlinePreview?url=' diff --git a/.env.production b/.env.production index dacb3ae..200711f 100644 --- a/.env.production +++ b/.env.production @@ -3,8 +3,8 @@ NODE_ENV = "production" # 线上环境接口地址(easymock) # VITE_API_URL = "http://139.9.66.234:6688" -# VITE_API_URL = 'http://10.75.253.12:6090' -VITE_API_URL = 'http://183.63.230.59:6090' +VITE_API_URL = 'http://10.75.253.12:6090' +# VITE_API_URL = 'http://183.63.230.59:6090' # VITE_API_URL = "http://jxjzw.zhgdyun.com:9013" VITE_WPAPI_URL = "http://jxjzw.zhgdyun.com:8081" # VITE_API_URL = "http://101.43.164.214:6688" diff --git a/src/views/goverment/huizhou/userManagement/roleManage/index.vue b/src/views/goverment/huizhou/userManagement/roleManage/index.vue index 3ebe20e..7f5ac51 100644 --- a/src/views/goverment/huizhou/userManagement/roleManage/index.vue +++ b/src/views/goverment/huizhou/userManagement/roleManage/index.vue @@ -347,6 +347,9 @@ const saveItem = async (formEl: FormInstance | undefined, form: any) => { if (!formEl) return; await formEl.validate(async (valid, fields) => { if (valid) { + if (!store.enterpriseType.includes(1)) { + delete form.roleType; + } if (form.roleId) { // console.log(form.dictCode); const res = await editRole(form); diff --git a/src/views/goverment/huizhou/userManagement/userManage/index.vue b/src/views/goverment/huizhou/userManagement/userManage/index.vue index 96e6f3f..c3d1910 100644 --- a/src/views/goverment/huizhou/userManagement/userManage/index.vue +++ b/src/views/goverment/huizhou/userManagement/userManage/index.vue @@ -150,9 +150,9 @@ const store = GlobalStore(); const roleList = ref([]); // 角色列表 const engineerProjectList = ref([]); // 项目列表 const enterpriseList = ref([]); // 企业列表 -const typeList = ref([]); +const typeList = ref([] as any); const ruleFormRef = ref(); -const departmentList = ref([]); +const departmentList = ref([] as any); const visible = ref(false); const authorityVisible = ref(false); const title = ref(""); @@ -376,6 +376,7 @@ const handleEditItem = async (index: number, row: any) => { } await getRoleData(); visible.value = true; + ruleFormRef.value.clearValidate(); }; // 删除用户信息 @@ -390,6 +391,9 @@ const saveItem = async (formEl: FormInstance | undefined, form: any) => { if (!formEl) return; await formEl.validate(async (valid, fields) => { if (valid) { + if (!store.enterpriseType.includes(1)) { + delete form.accountType; + } if (form.userId) { const res = await editUser(form); proTable.value.getTableList(); @@ -411,15 +415,15 @@ const saveItem = async (formEl: FormInstance | undefined, form: any) => { }); }; onMounted(async () => { - const res1 = await getTreeList({ deptId: "", status: 1 }); - departmentList.value = res1.result.map(i => { + const res1: any = await getTreeList({ deptId: "", status: 1 }); + departmentList.value = res1.result.map((i: any) => { return { label: i.deptName, value: i.deptId }; }); const res2: any = await getentNamelist({}); - enterpriseList.value = res2.result.map(item => { + enterpriseList.value = res2.result.map((item: any) => { return { label: item.enterpriseName, value: item.enterpriseSn @@ -427,7 +431,7 @@ onMounted(async () => { }); const res3: any = await engineerList({}); - engineerProjectList.value = res3.result.map(item => { + engineerProjectList.value = res3.result.map((item: any) => { return { label: item.engineeringName, value: item.engineeringSn