林倩 3 gadi atpakaļ
vecāks
revīzija
9abfb3e21a

+ 23 - 29
src/pages/appfun-auth-manage/role-auth-manage/roleView.vue

@@ -31,12 +31,7 @@
         <!-- 角色操作栏 -->
         <operate-bar :pageOptList="userOptList" @submitPageOpt="receviceOpt"></operate-bar>
         <!-- 角色列表 -->
-        <dg-table
-          ref="userConditionTable"
-          :data="persionListData"
-          row-key="id"
-          @selection-change="handleSelectChange"
-        >
+        <dg-table ref="userConditionTable" :data="persionListData" row-key="id" @selection-change="handleSelectChange">
           <dg-table-column type="selection" width="50"></dg-table-column>
           <dg-table-column prop="name" align="center" width="120" label="姓名"></dg-table-column>
           <dg-table-column prop="idcard" align="center" label="身份证号码"></dg-table-column>
@@ -158,7 +153,7 @@ export default {
         staffJson: '',
         delStaffJson: ''
       },
-      page: 0, 
+      page: 0,
       size: 10
     };
   },
@@ -227,35 +222,34 @@ export default {
         page: this.page,
         size: this.size,
         searchCondition: this.userCondition
-      }
+      };
 
       that.persionListData = [];
       that.checkedPersionData = [];
       that.deleteIds = [];
       // 人员列表和选中人员
-      Promise.all([
-        roleAuthApi.persionListByOrgRole(userParams),
-        roleAuthApi.getChecked(queryCheckedParams)
-      ]).then((res) => {
-        // console.log(res);
-        that.persionListData = res[0].data.content;
-        that.persionListData.map((item) => {
-          that.$set(item, 'activeTime', '长期');
-          // item["activeTime"] = "长期"; //列表一开始写死
-        });
-        let checkeds = res[1];
-        that.$nextTick(() => {
-          for (let k = 0; k < checkeds.length; k++) {
-            for (let m = 0; m < that.persionListData.length; m++) {
-              if (that.persionListData[m].id == checkeds[k].staffId) {
-                that.$refs.userConditionTable.toggleRowSelection(that.persionListData[m], true);
-                that.persionListData[m].activeTime = checkeds[k].activeTime;
-                break;
+      Promise.all([roleAuthApi.persionListByOrgRole(userParams), roleAuthApi.getChecked(queryCheckedParams)]).then(
+        (res) => {
+          // console.log(res);
+          that.persionListData = res[0].data.content;
+          that.persionListData.map((item) => {
+            that.$set(item, 'activeTime', '长期');
+            // item["activeTime"] = "长期"; //列表一开始写死
+          });
+          let checkeds = res[1];
+          that.$nextTick(() => {
+            for (let k = 0; k < checkeds.length; k++) {
+              for (let m = 0; m < that.persionListData.length; m++) {
+                if (that.persionListData[m].id == checkeds[k].staffId) {
+                  that.$refs.userConditionTable.toggleRowSelection(that.persionListData[m], true);
+                  that.persionListData[m].activeTime = checkeds[k].activeTime;
+                  break;
+                }
               }
             }
-          }
-        });
-      });
+          });
+        }
+      );
     },
     handleSelectChange(selection) {
       this.checkedPersionData = selection;