wangting
2024-12-04 ed52d8cb0db78eb8bff70329ac01a38d50d7f672
Source/plt-web/plt-web-ui/src/views/system/role/index.vue
@@ -30,7 +30,7 @@
      </template>
    </avue-crud>
    <!-- 分配角色穿梭框   -->
    <!-- 分配成员穿梭框   -->
    <transfer ref="transfer" :left-role-data="leftRoleData" :right-role-data="rightRoleData"
              :transferTitle="transferTitle" title="角色添加成员"
              @transferSend="roleSendHandler">
@@ -113,6 +113,7 @@
        refreshBtn: false,
        addBtn: false,
        menu: false,
        header:false,
        column: [
          {
            label: '部门',
@@ -181,7 +182,7 @@
        this.$refs.roleCrud,
        this.lastIndex,
        (newIndex) => { this.lastIndex = newIndex; },
        () => { this.selectList = []; }
        () => { this.selectList = [row]; }
      );
    },
@@ -189,7 +190,6 @@
    rowSaveHandler(row, done, loading) {
      delete row.roleClassifyText;
      addRole(row).then(res => {
        console.log(res)
        if (res.data.code === 200) {
          this.$message.success(res.data.obj);
          this.getTableList();
@@ -212,7 +212,6 @@
        }
      }).catch(err => {
        loading();
        console.log(err);
      });
    },
@@ -284,6 +283,8 @@
        listUserUnInRoleOid({pkRole: this.selectList[0].oid}),
        listUserByRoleOid({pkRole: this.selectList[0].oid})
      ]).then(([unInRoleRes, byRoleRes]) => {
        this.leftRoleData=[];
        this.rightRoleData=[];
        if (unInRoleRes.data.code === 200 && byRoleRes.data.code === 200) {
          const leftData = [...unInRoleRes.data.data, ...byRoleRes.data.data];
          // 组装好穿梭框可用数据
@@ -296,8 +297,6 @@
          this.rightRoleData = byRoleRes.data.data.map(item => item.oid);
          this.$refs.transfer.visible = true;
        }
      }).catch(err => {
        console.error(err);
      });
    },
@@ -311,8 +310,6 @@
      saveRight(params).then(res => {
        this.$message.success(res.data.obj);
        this.getTableList();
      }).catch(err => {
        this.$message.error(err)
      })
    },
@@ -328,7 +325,6 @@
        return;
      }
      listUserByRoleOid({pkRole: this.selectList[0].oid}).then(res => {
        console.log(res)
        if (res.data.code === 200) {
          const data = res.data.data;
          this.countData = data.map(item => {
@@ -341,8 +337,6 @@
          });
          this.statisticsVisible = true;
        }
      }).catch(err => {
        console.log(err)
      })
    },