From e13278606d3facef443c5c65e07b42c52c7a38d5 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 22 十一月 2023 17:12:46 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/src/views/system/dept.vue | 47 +++++++++++++++++++++++++++++------------------
1 files changed, 29 insertions(+), 18 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/system/dept.vue b/Source/UBCS-WEB/src/views/system/dept.vue
index 02063bd..ce22ee0 100644
--- a/Source/UBCS-WEB/src/views/system/dept.vue
+++ b/Source/UBCS-WEB/src/views/system/dept.vue
@@ -1,6 +1,7 @@
<template>
<basic-container>
<avue-crud :option="option"
+ :page.sync="page"
:table-loading="loading"
:data="data"
ref="crud"
@@ -21,22 +22,22 @@
@on-load="onLoad"
@tree-load="treeLoad">
<template slot="menuLeft">
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- v-if="permission.dept_delete"
- plain
- @click="handleDelete">鍒� 闄�
+ <el-button v-if="permissionList.delBtn"
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ @click="handleDelete">
+ 鍒� 闄�
</el-button>
</template>
<template slot-scope="scope" slot="menu">
- <el-button
+ <el-button v-if="permissionList.addChildBtn"
type="text"
icon="el-icon-circle-plus-outline"
size="small"
- @click.stop="handleAdd(scope.row,scope.index)"
- v-if="userInfo.role_name.includes('admin')"
- >鏂板瀛愰」
+ @click.stop="handleAdd(scope.row,scope.index)">
+ 鏂板瀛愰」
</el-button>
</template>
<template slot-scope="{row}"
@@ -75,7 +76,10 @@
option: {
lazy: true,
tip: false,
- simplePage: true,
+ height:'auto',
+ maxHeight:600,
+ columnBtn:false,
+ //simplePage: true,
searchShow: true,
searchMenuSpan: 6,
tree: true,
@@ -83,6 +87,8 @@
index: true,
selection: true,
viewBtn: true,
+ editBtn: true,
+ delBtn: true,
menuWidth: 300,
dialogClickModal: false,
highlightCurrentRow: true, //琛岄�変腑鏃堕珮浜�
@@ -189,14 +195,18 @@
data: []
};
},
+ created() {
+
+ },
computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
- addBtn: this.vaildData(this.permission.dept_add, false),
- viewBtn: this.vaildData(this.permission.dept_view, false),
- delBtn: this.vaildData(this.permission.dept_delete, false),
- editBtn: this.vaildData(this.permission.dept_edit, false)
+ addBtn: this.vaildData(this.permission.dept.dept_add, false),
+ viewBtn: this.vaildData(this.permission.dept.dept_view, false),
+ delBtn: this.vaildData(this.permission.dept.dept_delete, false),
+ editBtn: this.vaildData(this.permission.dept.dept_edit, false),
+ addChildBtn: this.vaildData(this.permission.dept.dept_add_child,false),
};
},
ids() {
@@ -352,8 +362,9 @@
},
onLoad(page, params = {}) {
this.loading = true;
- getLazyList(this.parentId, Object.assign(params, this.query)).then(res => {
- this.data = res.data.data;
+ getLazyList(this.parentId,Object.assign(params, this.query),this.page.currentPage, this.page.pageSize).then(res => {
+ this.data = res.data.data.records;
+ this.page.total=res.data.data.total
this.loading = false;
this.selectionClear();
});
@@ -361,7 +372,7 @@
treeLoad(tree, treeNode, resolve) {
const parentId = tree.id;
getLazyList(parentId).then(res => {
- resolve(res.data.data);
+ resolve(res.data.data.records);
});
}
}
--
Gitblit v1.9.3