From 60e314a94c0d3bea34c8fae19b9f81db9170176d Mon Sep 17 00:00:00 2001
From: xiejun <xj@2023>
Date: 星期四, 19 十月 2023 16:33:19 +0800
Subject: [PATCH] 分类xmlbug更改
---
Source/UBCS-WEB/src/views/authority/apiscope.vue | 66 +++++++++++++++++++++-----------
1 files changed, 43 insertions(+), 23 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/authority/apiscope.vue b/Source/UBCS-WEB/src/views/authority/apiscope.vue
index 0163862..431957b 100644
--- a/Source/UBCS-WEB/src/views/authority/apiscope.vue
+++ b/Source/UBCS-WEB/src/views/authority/apiscope.vue
@@ -1,23 +1,25 @@
<template>
<basic-container>
<avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :permission="permissionList"
- :before-open="beforeOpen"
- @row-del="rowDel"
- @row-update="rowUpdate"
- @row-save="rowSave"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad"
- @tree-load="treeLoad">
+ :table-loading="loading"
+ :page.sync="page"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :permission="permissionList"
+ :before-open="beforeOpen"
+ @row-del="rowDel"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @row-click="clickRowChange"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ @tree-load="treeLoad">
<template slot-scope="{row}" slot="menu">
<el-button type="text"
icon="el-icon-setting"
@@ -50,6 +52,7 @@
:before-open="beforeOpenScope"
@search-change="searchChangeScope"
@search-reset="searchResetScope"
+ @row-click="clickRowChangeResetScope"
@selection-change="selectionChangeScope"
@current-change="currentChangeScope"
@size-change="sizeChangeScope"
@@ -111,8 +114,9 @@
menu: true,
option: {
lazy: true,
+ columnBtn:false,
tip: false,
- simplePage: true,
+ //simplePage: true,
searchShow: true,
searchMenuSpan: 6,
dialogWidth: "60%",
@@ -154,7 +158,7 @@
label: "涓婄骇鑿滃崟",
prop: "parentId",
type: "tree",
- dicUrl: "/api/blade-system/menu/tree",
+ dicUrl: "/api/ubcs-system/menu/tree",
hide: true,
props: {
label: "title"
@@ -348,7 +352,7 @@
{
label: "鎺ュ彛绫诲瀷",
type: "select",
- dicUrl: "/api/blade-system/dict/dictionary?code=api_scope_type",
+ dicUrl: "/api/ubcs-system/dict/dictionary?code=api_scope_type",
props: {
label: "dictValue",
value: "dictKey"
@@ -457,8 +461,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 = [];
@@ -505,8 +516,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();
});
@@ -514,7 +527,7 @@
treeLoad(tree, treeNode, resolve) {
const parentId = tree.id;
getLazyMenuList(parentId).then(res => {
- resolve(res.data.data);
+ resolve(res.data.data.records);
});
},
// 鏁版嵁鏉冮檺妯″潡
@@ -615,8 +628,15 @@
this.onLoadScope(this.pageScope, params);
done();
},
+ clickRowChangeResetScope(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