From cf8103f1c09fc43f3df643ea8f2a22cc26af74e8 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期三, 20 九月 2023 08:56:48 +0800
Subject: [PATCH] 代码提交
---
Source/UBCS-WEB/src/views/authority/datascope.vue | 33 +++++++++++++++++++++++++++------
1 files changed, 27 insertions(+), 6 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/authority/datascope.vue b/Source/UBCS-WEB/src/views/authority/datascope.vue
index d0e0160..4a32fa0 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"
@@ -13,6 +14,7 @@
@row-save="rowSave"
@search-change="searchChange"
@search-reset="searchReset"
+ @row-click="clickRowChange"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@@ -51,6 +53,7 @@
:before-open="beforeOpenScope"
@search-change="searchChangeScope"
@search-reset="searchResetScope"
+ @row-click="clickRowChangeScope"
@selection-change="selectionChangeScope"
@current-change="currentChangeScope"
@size-change="sizeChangeScope"
@@ -116,7 +119,7 @@
option: {
lazy: true,
tip: false,
- simplePage: true,
+ // simplePage: true,
searchShow: true,
searchMenuSpan: 6,
dialogWidth: "60%",
@@ -130,6 +133,7 @@
delBtn: false,
menuWidth: 150,
dialogClickModal: false,
+ highlightCurrentRow: true, //琛岄�変腑鏃堕珮浜�
column: [
{
label: "鑿滃崟鍚嶇О",
@@ -158,7 +162,7 @@
label: "涓婄骇鑿滃崟",
prop: "parentId",
type: "tree",
- dicUrl: "/api/blade-system/menu/tree",
+ dicUrl: "/api/ubcs-system/menu/tree",
hide: true,
props: {
label: "title"
@@ -317,6 +321,7 @@
menuWidth: 200,
dialogWidth: 900,
dialogClickModal: false,
+ highlightCurrentRow: true, //琛岄�変腑鏃堕珮浜�
column: [
{
label: "鏉冮檺鍚嶇О",
@@ -353,7 +358,7 @@
{
label: "瑙勫垯绫诲瀷",
type: "select",
- dicUrl: "/api/blade-system/dict/dictionary?code=data_scope_type",
+ dicUrl: "/api/ubcs-system/dict/dictionary?code=data_scope_type",
props: {
label: "dictValue",
value: "dictKey"
@@ -535,8 +540,15 @@
this.onLoad(this.page, params);
done();
},
+ clickRowChange(row){
+ this.$refs.crud.toggleSelection();
+ this.selectionList = row;
+ this.$refs.crud.setCurrentRow(row);
+ this.$refs.crud.toggleRowSelection(row); //閫変腑褰撳墠琛�
+ },
selectionChange(list) {
this.selectionList = list;
+ this.$refs.crud.setCurrentRow(this.selectionList[list.length-1]);
},
selectionClear() {
this.selectionList = [];
@@ -587,8 +599,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();
});
@@ -596,7 +610,7 @@
treeLoad(tree, treeNode, resolve) {
const parentId = tree.id;
getLazyMenuList(parentId).then(res => {
- resolve(res.data.data);
+ resolve(res.data.data.records);
});
},
// 鏁版嵁鏉冮檺妯″潡
@@ -703,8 +717,15 @@
this.onLoadScope(this.pageScope, params);
done();
},
+ clickRowChangeScope(row){
+ this.$refs.crudScope.toggleSelection();
+ this.selectionList = row;
+ this.$refs.crudScope.setCurrentRow(row);
+ this.$refs.crudScope.toggleRowSelection(row); //閫変腑褰撳墠琛�
+ },
selectionChangeScope(list) {
this.selectionListScope = list;
+ this.$refs.crudScope.setCurrentRow(this.selectionList[list.length-1]);
},
currentChangeScope(currentPage) {
this.pageScope.currentPage = currentPage;
--
Gitblit v1.9.3