瀏覽代碼

update Role.vue

reghao 3 月之前
父節點
當前提交
62d783c045
共有 1 個文件被更改,包括 6 次插入18 次删除
  1. 6 18
      src/views/devops/rbac/Role.vue

+ 6 - 18
src/views/devops/rbac/Role.vue

@@ -33,7 +33,7 @@
         >
           <template slot-scope="scope">
             <el-tag>
-              {{ scope.row.total }}
+              {{ scope.row.totalUsers }}
             </el-tag>
             <el-button
               style="margin-top: 5px; margin-left: 5px"
@@ -45,9 +45,12 @@
         </el-table-column>
         <el-table-column
           prop="scope"
-          label="授权资源"
+          label="拥有的资源"
         >
           <template slot-scope="scope">
+            <el-tag>
+              {{ scope.row.totalMenus }}
+            </el-tag>
             <el-button
               style="margin-top: 5px; margin-left: 5px"
               size="mini"
@@ -56,19 +59,6 @@
             >设置</el-button>
           </template>
         </el-table-column>
-        <el-table-column
-          fixed="right"
-          label="操作"
-          width="90"
-        >
-          <template slot-scope="scope">
-            <el-button
-              type="danger"
-              size="mini"
-              @click="handleDelete(scope.$index, scope.row)"
-            >删除</el-button>
-          </template>
-        </el-table-column>
       </el-table>
     </el-main>
 
@@ -213,14 +203,12 @@ export default {
       formData.append('menuIds', this.roleMenuIds)
       updateRoleMenu(formData).then(resp => {
         this.$message.info(resp.msg)
+        this.getData()
       }).catch(error => {
         this.$message.error(error.message)
       }).finally(() => {
         this.showUpdateDialog = false
       })
-    },
-    handleDelete(index, row) {
-      this.$message.info('delete role ' + row.name)
     }
   }
 }