Browse Source

用户列表异常,链属列表信息,企业详情修改信息优化

sqg 3 năm trước cách đây
mục cha
commit
3a564b8cc4

+ 8 - 0
front-vue/src/api/service/rel/companyRel.js

@@ -8,6 +8,14 @@ export function listRel(query) {
     params: query
   })
 }
+// 平台查询我的链属列表
+export function getListRel(query) {
+  return request({
+    url: '/sc-service/rel/getListRel',
+    method: 'get',
+    params: query
+  })
+}
 
 // 查询链属未认证列表
 export function sparelist(query) {

+ 11 - 4
front-vue/src/views/service/company/detailCompany.vue

@@ -439,13 +439,16 @@ export default {
                             lock: true,
                             text: "Loading",
                             spinner: "el-icon-loading",
-                            background: "rgba(0, 0, 0, 0.9)",
-                        });
+                            background: "rgba(0, 0, 0, 0.7)",
+                        })
                         updateCompanyInfor(self.form).then((response) => {
                             this.msgSuccess("修改成功");
-                            this.created();
+                            loading.close();
+                            this.$store.dispatch("tagsView/delView", this.$route);
+                            this.$router.go(-1);
+                        }).catch((response) => {
+                            loading.close();
                         });
-                        loading.close();
                     }
                 }
             });
@@ -459,6 +462,10 @@ export default {
             this.$store.dispatch("tagsView/delView", this.$route);
             this.$router.go(-1);
         },
+        cancelNext(){
+            this.$store.dispatch("tagsView/delView", this.$route);
+            this.$router.go(-1);
+        },
         /* 下载 */
         handleFilePreview(fileUrl) {
             this.$confirm('是否确认下载"' + fileUrl.name + '"附件?', "警告", {

+ 47 - 20
front-vue/src/views/service/rel/companyRel.vue

@@ -434,7 +434,7 @@
 <script>
 import {
   listRel, sparelist, listCompany, addRel, updateRel, listAllCompany, 
-  delRel, removeSpare, listCompanyQuery, getUser, againInvite
+  delRel, removeSpare, listCompanyQuery, getUser, againInvite, getListRel
 } from "@/api/service/rel/companyRel";
 import { uploadFileNew } from "@/api/common/file";
 import { getToken } from "@/utils/auth";
@@ -647,10 +647,9 @@ export default {
     this.getDicts("sys_scp_status").then(response => {
       this.scpStatusOptions = response.data;
     });
-    this.getList();
+    this.getUser();
     this.getSpare();
     this.getCompanyList();
-    this.getUser();
   },
   mounted() {
     this.columnQuery();
@@ -720,7 +719,7 @@ export default {
     },
     /** 下载模板操作 */
     importTemplate() {
-      this.download('//relImport/importTemplate', {
+      this.download('/sc-service/relImport/importTemplate', {
         ...this.queryParams
       }, `链属模板_${new Date().getTime()}.xls`)
     },
@@ -739,7 +738,7 @@ export default {
       this.upload.isUploading = false;
       this.$refs.upload.clearFiles();
       this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
-      this.getList();
+      this.getUser();
       this.getSpare();
       this.getCompanyList();
     },
@@ -750,6 +749,32 @@ export default {
     /** 查询链属列表 */
     getList() {
       this.loading = true;
+      if(this.companyId == '000000'){
+        getListRel(this.queryParams).then(response => {
+          let list = response.data.records;
+          this.loginId = response.msg;
+          for (let i = 0; i < list.length; i++) {
+              if (list[i].launchCompanyId == response.msg) {
+                    list[i].receive = false;
+                    list[i].launch = true;
+                    list[i].spare = false;
+              }else if(list[i].launchReceiveScrCompanyId == response.msg){
+                    list[i].launch = false;
+                    list[i].receive = true;
+                    list[i].spare = false;
+              }else if(list[i].scpCompanyId == response.msg){
+                    list[i].launch = false;
+                    list[i].receive = false;
+                    list[i].spare = true;
+              }
+          }
+          this.companyRelList = list;
+          console.log(12312313123)
+          console.log(this.companyRelList)
+          this.total = response.data.total;
+          this.loading = false;
+        });
+      }else {
        listRel(this.queryParams).then(response => {
           let list = response.data.records;
           this.loginId = response.msg;
@@ -773,8 +798,8 @@ export default {
           console.log(this.companyRelList)
           this.total = response.data.total;
           this.loading = false;
-        }
-      );
+        });
+      }
     },
 
     // 未认证列表
@@ -861,7 +886,7 @@ export default {
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
-      this.getList();
+      this.getUser();
     },
     /** 未认证搜索按钮操作 */
     handleSpareQuery() {
@@ -942,7 +967,7 @@ submitForm() {
             this.msgSuccess("新增成功");
             loading.close();
             this.open = false;
-            this.getList();
+            this.getUser();
             this.getSpare();
             this.getCompanyList();
           }).catch((response) => {
@@ -965,7 +990,7 @@ submitForm() {
           return updateRel(launchScrId,state);
         }).then(() => {
           this.msgSuccess("链属成功");
-          this.getList();
+          this.getUser();
           this.getSpare();
           this.getCompanyList();
         })
@@ -986,7 +1011,7 @@ submitForm() {
           return updateRel(launchScrId,state);
         }).then(() => {
           this.msgSuccess("链属成功");
-          this.getList();
+          this.getUser();
           this.getSpare();
           this.getCompanyList();
         })
@@ -1013,7 +1038,7 @@ submitForm() {
           return updateRel(launchScrId,state);
         }).then(() => {
           this.msgSuccess("邀请成功");
-          this.getList();
+          this.getUser();
           this.getSpare();
           this.getCompanyList();
         })
@@ -1034,7 +1059,7 @@ submitForm() {
           return updateRel(launchScrId,state);
         }).then(() => {
           this.msgSuccess("邀请成功");
-          this.getList();
+          this.getUser();
           this.getSpare();
           this.getCompanyList();
         })
@@ -1061,7 +1086,7 @@ submitForm() {
           return updateRel(launchScrId,state);
         }).then(() => {
           this.msgSuccess("拒绝成功");
-          this.getList();
+          this.getUser();
           this.getSpare();
           this.getCompanyList();
         })
@@ -1083,7 +1108,7 @@ submitForm() {
           return updateRel(launchScrId,state);
         }).then(() => {
           this.msgSuccess("拒绝成功");
-          this.getList();
+          this.getUser();
           this.getSpare();
           this.getCompanyList();
         })
@@ -1109,7 +1134,7 @@ submitForm() {
           return delRel(launchScrId);
         }).then(() => {
           this.msgSuccess("解绑成功");
-          this.getList();
+          this.getUser();
           this.getSpare();
           this.getCompanyList();
         })
@@ -1130,7 +1155,7 @@ submitForm() {
           return delRel(launchScrId);
         }).then(() => {
           this.msgSuccess("解绑成功");
-          this.getList();
+          this.getUser();
           this.getSpare();
           this.getCompanyList();
         })
@@ -1155,7 +1180,7 @@ submitForm() {
           return removeSpare(scpId);
         }).then(() => {
           this.msgSuccess("解绑成功");
-          this.getList();
+          this.getUser();
           this.getSpare();
           this.getCompanyList();
         })
@@ -1179,7 +1204,7 @@ submitForm() {
       againInvite(row).then(response => {
         }).then(() => {
           this.msgSuccess("重邀成功");
-          this.getList();
+          this.getUser();
           this.getSpare();
           this.getCompanyList();
           loading.close();
@@ -1193,12 +1218,14 @@ submitForm() {
       getUser().then(response => {
           this.userId = response.data.userId;
           this.scyTypeNow = response.data.scyType;
+          this.companyId = response.data.companyId;
           if(this.scyTypeNow == '01'){
             this.handleRel = true;
           }else {
             this.handleRel = false;
           }
-        })
+          this.getList();
+      })
     }
   }
 };

+ 21 - 5
front-vue/src/views/system/user/index.vue

@@ -1166,9 +1166,28 @@ export default {
       this.reset();
       this.peoplpeName = true;
       this.getFormTreeselect();
-      const userId = row.userId || this.ids;
+      const userId = row.userId;
       const scyId = row.scyId;
-      this.form = row;
+      const remark = row.remark;
+      const email = row.email;
+      const deptId =  row.deptId;
+      const nickName = row.nickName;
+      const userName = row.userName;
+      if(remark){
+      this.$set(this.form, "remark", remark);
+      }
+      if(email){
+      this.$set(this.form, "email", email);
+      }
+      if(deptId){
+      this.$set(this.form, "deptId", deptId);
+      }
+      if(nickName){
+      this.$set(this.form, "nickName", nickName);
+      }
+      if(userName){
+      this.$set(this.form, "userName", userName);
+      }
       getUser(userId, scyId).then((response) => {
         this.uinParams.ssId = response.data.staffCode;
         this.getRodept(scyId);
@@ -1176,12 +1195,9 @@ export default {
         this.roleOptions = response.roles;
         this.form.postIds = response.postIds;
         this.$set(this.form, "roleIds", response.roleIds);
-        // this.form.roleIds = response.roleIds;
         this.open = true;
         this.leave = true;
         this.title = "修改用户";
-        this.form.password = "";
-        this.query = this.form;
       });
     },
     /** 重置密码按钮操作 */