From a13255b4129ee8a7a7b7e1ecd8e02dd2c78f7c17 Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期四, 16 一月 2025 16:19:20 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/plt-web/plt-web-ui/src/views/system/role/index.vue |  102 ++++++++++++++++++++++++++++++++++++--------------
 1 files changed, 73 insertions(+), 29 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/system/role/index.vue b/Source/plt-web/plt-web-ui/src/views/system/role/index.vue
index 55308b2..2cc1f1b 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/role/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/role/index.vue
@@ -14,22 +14,61 @@
       @row-click="rowClickHandler"
       @row-save="rowSaveHandler"
       @row-update="rowUpdateHandler"
-      @row-del="rowDeleteHandler"
     >
       <template slot="menuLeft" slot-scope="scope">
-        <el-button v-if="permissionList.delBtn" icon="el-icon-delete" plain size="small" type="danger"
-                   @click="allDelHandler">鍒犻櫎
+        <el-button v-if="permissionList.addBtn" class="button-custom-icon" size="small" type="primary"
+                   @click="$refs.roleCrud.rowAdd()">
+          <icon-show :name="permissionList.addBtn.source"></icon-show>
+          鏂� 澧�
         </el-button>
-        <el-button v-if="permissionList.assignMembersBtn" icon="el-icon-school" plain size="small" type="primary"
-                   @click="assignMembersHandler">鍒嗛厤鎴愬憳
+        <el-button v-if="permissionList.delBtn" class="button-custom-icon" plain size="small" type="danger"
+                   @click="allDelHandler">
+          <icon-show :name="permissionList.delBtn.source"></icon-show>
+          鍒犻櫎
         </el-button>
-        <el-button v-if="permissionList.statisticsBtn" icon="el-icon-user" plain size="small" type="primary"
-                   @click="statisticsHandler">缁熻
+        <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>
+          缁熻
         </el-button>
-        <el-button v-if="permissionList.importRoleBtn" icon="el-icon-upload2" plain size="small" type="primary"
-                   @click="upLoadRole">瀵煎叆瑙掕壊
+        <el-button v-if="permissionList.importRoleBtn" class="button-custom-icon" plain size="small" type="primary"
+                   @click="upLoadRole">
+          <icon-show :name="permissionList.importRoleBtn.source"></icon-show>
+          瀵煎叆瑙掕壊
         </el-button>
-        <el-button v-if="permissionList.exportBtn" icon="el-icon-download" plain size="small" type="primary">瀵煎嚭
+        <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary">
+          <icon-show :name="permissionList.exportBtn.source"></icon-show>
+          瀵煎嚭
+        </el-button>
+      </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"
+          type="text"
+          @click="handleEdit(row, index)"
+        >
+          <icon-show :name="permissionList.editBtn.source"></icon-show>
+          缂栬緫
+        </el-button>
+        <el-button
+          v-if="permissionList.delBtn"
+          size="small"
+          type="text"
+          @click="handleDel(row, index)"
+        >
+          <icon-show :name="permissionList.delBtn.source"></icon-show>
+          鍒犻櫎
         </el-button>
       </template>
 
@@ -153,17 +192,17 @@
         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].assignMembers, false),
-        importRoleBtn: this.vaildData(this.permission[this.$route.query.id].importRole, false),
-        statisticsBtn: this.vaildData(this.permission[this.$route.query.id].statistics, 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),
       };
     },
     option() {
       return {
         ...basicOption,
-        addBtn: this.permissionList.addBtn,
-        delBtn: this.permissionList.delBtn,
-        editBtn: this.permissionList.editBtn,
+        addBtn: false,
+        delBtn: false,
+        editBtn: false,
         dialogTop: 0,
         dialogWidth: '30%',
         column: column,
@@ -181,6 +220,11 @@
         this.page.total = res.data.total;
         this.tableLoading = false;
       })
+    },
+
+    // 缂栬緫鎸夐挳
+    handleEdit(row, index) {
+      this.$refs.roleCrud.rowEdit(row, index);
     },
 
     // 鍒楀ご鍒锋柊
@@ -248,7 +292,7 @@
     },
 
     // 鍒犻櫎
-    rowDeleteHandler(row) {
+    handleDel(row, index) {
       let params = {
         ids: row.oid
       }
@@ -301,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 = [];

--
Gitblit v1.9.3