From ec7f3f3675efc96b59caa40c5ada96600eb60650 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期四, 26 十月 2023 17:17:01 +0800
Subject: [PATCH] 前端按钮权限功能增加: 接口权限界面、应用管理界面、编码规则管理界面、数据权限界面、菜单权限界面、岗位管理界面、角色权限管理界面、租户管理界面、顶部菜单界面

---
 Source/UBCS-WEB/src/views/authority/datascope.vue |   28 +++++++++++++++++-----------
 1 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/Source/UBCS-WEB/src/views/authority/datascope.vue b/Source/UBCS-WEB/src/views/authority/datascope.vue
index 68ec880..8d585a9 100644
--- a/Source/UBCS-WEB/src/views/authority/datascope.vue
+++ b/Source/UBCS-WEB/src/views/authority/datascope.vue
@@ -3,6 +3,7 @@
     <avue-crud :option="option"
                :table-loading="loading"
                :data="data"
+               :page.sync="page"
                ref="crud"
                v-model="form"
                :permission="permissionList"
@@ -21,10 +22,10 @@
                @on-load="onLoad"
                @tree-load="treeLoad">
       <template slot-scope="{row}" slot="menu">
-        <el-button type="text"
+        <el-button v-if="permissionList.settingBtn"
+                   type="text"
                    icon="el-icon-setting"
                    size="small"
-                   v-if="permission.data_scope_setting"
                    plain
                    style="border: 0;background-color: transparent !important;"
                    @click.stop="handleDataScope(row)">鏉冮檺閰嶇疆
@@ -58,7 +59,8 @@
                    @size-change="sizeChangeScope"
                    @on-load="onLoadScope">
           <template slot="menuLeft">
-            <el-button type="danger"
+            <el-button v-if="permissionList.delBtn"
+                       type="danger"
                        size="small"
                        icon="el-icon-delete"
                        plain
@@ -117,8 +119,9 @@
         watchMode: true,
         option: {
           lazy: true,
+          columnBtn:false,
           tip: false,
-          simplePage: true,
+          // simplePage: true,
           searchShow: true,
           searchMenuSpan: 6,
           dialogWidth: "60%",
@@ -424,10 +427,11 @@
       ...mapGetters(["permission"]),
       permissionList() {
         return {
-          addBtn: this.vaildData(this.permission.menu_add, false),
-          viewBtn: this.vaildData(this.permission.menu_view, false),
-          delBtn: this.vaildData(this.permission.menu_delete, false),
-          editBtn: this.vaildData(this.permission.menu_edit, false)
+          addBtn: this.vaildData(this.permission.data_scope.data_scope_add, false),
+          viewBtn: this.vaildData(this.permission.data_scope.data_scope_view, false),
+          delBtn: this.vaildData(this.permission.data_scope.data_scope_delete, false),
+          editBtn: this.vaildData(this.permission.data_scope.data_scope_edit, false),
+          settingBtn: this.vaildData(this.permission.data_scope.data_scope_setting,false),
         };
       },
       ids() {
@@ -598,8 +602,10 @@
       },
       onLoad(page, params = {}) {
         this.loading = true;
-        getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => {
-          this.data = res.data.data;
+        getLazyMenuList(this.parentId, Object.assign(params, this.query), page.currentPage, page.pageSize).then(res => {
+          const data = res.data.data;
+          this.data = data.records;
+          this.page.total = data.total;
           this.loading = false;
           this.selectionClear();
         });
@@ -607,7 +613,7 @@
       treeLoad(tree, treeNode, resolve) {
         const parentId = tree.id;
         getLazyMenuList(parentId).then(res => {
-          resolve(res.data.data);
+          resolve(res.data.data.records);
         });
       },
       // 鏁版嵁鏉冮檺妯″潡

--
Gitblit v1.9.3