Pārlūkot izejas kodu

用户编辑传入 pid

cc12458 1 gadu atpakaļ
vecāks
revīzija
38b601835a
2 mainītis faili ar 8 papildinājumiem un 6 dzēšanām
  1. 3 2
      src/api/system.js
  2. 5 4
      src/views/system/UserSytem.vue

+ 3 - 2
src/api/system.js

@@ -272,10 +272,11 @@ export function addUserMsg(data) {
 };
 };
 
 
 // 获取用户详细信息
 // 获取用户详细信息
-export function getUserDetail(data) {
+export function getUserDetail(data, pid) {
     return request({
     return request({
         url: `/portal/userMgr/${data}`,
         url: `/portal/userMgr/${data}`,
-        method: 'get'
+        method: 'get',
+        params: { pid }
     })
     })
 };
 };
 
 

+ 5 - 4
src/views/system/UserSytem.vue

@@ -648,7 +648,7 @@ export default {
         type: "warning"
         type: "warning"
       })
       })
         .then(() => {
         .then(() => {
-          this.getUserDetail(scope.row.userid);
+          this.getUserDetail(scope.row.userid, scope.row);
           setTimeout(() => {
           setTimeout(() => {
             this.editUserMsg(pid, state == 0 ? "1" : "0");
             this.editUserMsg(pid, state == 0 ? "1" : "0");
           }, 500);
           }, 500);
@@ -658,7 +658,7 @@ export default {
     // 编辑数据
     // 编辑数据
     editData(scope) {
     editData(scope) {
       this.type = "edit";
       this.type = "edit";
-      this.getUserDetail(scope.row.userid);
+      this.getUserDetail(scope.row.userid, scope.row);
       this.diaform.pid = scope.row.pid;
       this.diaform.pid = scope.row.pid;
       this.showDialog = true;
       this.showDialog = true;
     },
     },
@@ -1113,8 +1113,9 @@ export default {
       }
       }
     },
     },
     // 获取用户详细信息
     // 获取用户详细信息
-    async getUserDetail(id) {
-      let res = await getUserDetail(id);
+    async getUserDetail(id, row) {
+      if (!row) row = {}
+      let res = await getUserDetail(id, row.pid);
       if (res.ResultCode == 0) {
       if (res.ResultCode == 0) {
         this.diaform = {
         this.diaform = {
           pid: res.Data.pid,
           pid: res.Data.pid,