田源
2025-01-16 404966637eda6881a0f17683c5aacc7c1c34aed8
Source/plt-web/plt-web-ui/src/views/system/role/index.vue
@@ -26,11 +26,6 @@
          <icon-show :name="permissionList.delBtn.source"></icon-show>
          删除
        </el-button>
        <el-button v-if="permissionList.assignMembersBtn" class="button-custom-icon" plain size="small" type="primary"
                   @click="assignMembersHandler">
          <icon-show :name="permissionList.assignMembersBtn.source"></icon-show>
          分配成员
        </el-button>
        <el-button v-if="permissionList.statisticsBtn" class="button-custom-icon" plain size="small" type="primary"
                   @click="statisticsHandler">
          <icon-show :name="permissionList.statisticsBtn.source"></icon-show>
@@ -48,6 +43,15 @@
      </template>
      <template slot="menu" slot-scope="{ row, index }">
        <el-button
          v-if="permissionList.assignMembersBtn"
          size="small"
          type="text"
          @click="assignMembersHandler(row, index)"
        >
          <icon-show :name="permissionList.assignMembersBtn.source"></icon-show>
          分配成员
        </el-button>
        <el-button
          v-if="permissionList.editBtn"
          size="small"
@@ -188,7 +192,7 @@
        delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false),
        editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false),
        exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false),
        assignMembersBtn: this.vaildData(this.permission[this.$route.query.id].FREEZE, false),
        assignMembersBtn: this.vaildData(this.permission[this.$route.query.id].ASSIGN, false),
        importRoleBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false),
        statisticsBtn: this.vaildData(this.permission[this.$route.query.id].DISCARD, false),
      };
@@ -341,19 +345,19 @@
    },
    // 分配成员
    assignMembersHandler() {
      if (this.selectList.length <= 0) {
        this.$message.warning('请选择角色进行成员分配!');
        return;
      }
      if (this.selectList.length > 1) {
        this.$message.warning('一次只能对一个角色进行分配成员操作!');
        return;
      }
    assignMembersHandler(row,index) {
      // if (this.selectList.length <= 0) {
      //   this.$message.warning('请选择角色进行成员分配!');
      //   return;
      // }
      //
      // if (this.selectList.length > 1) {
      //   this.$message.warning('一次只能对一个角色进行分配成员操作!');
      //   return;
      // }
      Promise.all([
        listUserUnInRoleOid({pkRole: this.selectList[0].oid}),
        listUserByRoleOid({pkRole: this.selectList[0].oid})
        listUserUnInRoleOid({pkRole: row.oid}),
        listUserByRoleOid({pkRole: row.oid})
      ]).then(([unInRoleRes, byRoleRes]) => {
        this.leftRoleData = [];
        this.rightRoleData = [];