From 90fce6d89901ce0fb68ae9ea897b636679e8906d Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期一, 11 九月 2023 10:58:17 +0800
Subject: [PATCH] 主数据首页默认100条数据
---
Source/UBCS-WEB/src/views/code/code.vue | 76 ++++++++++++++++++++++++++++---------
1 files changed, 57 insertions(+), 19 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/code/code.vue b/Source/UBCS-WEB/src/views/code/code.vue
index f69b252..65295a7 100644
--- a/Source/UBCS-WEB/src/views/code/code.vue
+++ b/Source/UBCS-WEB/src/views/code/code.vue
@@ -47,7 +47,7 @@
</el-button>
<el-button
v-show="scope.row.lcStatus == 'Editing' ? true : false"
- :disabled="releadDisabled"
+ :loading="releadDisabled"
icon="el-icon-position"
plain
size="small"
@@ -284,6 +284,8 @@
@row-click="codeOtherCloneRuleRowClick"
@size-change="sizeChange"
@selection-change="selectionOtherCloneCodeRuleChange"
+ @search-change="searchOtherCloneChange"
+ @search-reset="searchOtherCloneReset"
@on-load="onLoad"
>
</avue-crud>
@@ -326,6 +328,7 @@
append-to-body
title="杞Щ鎵�鏈夎��"
width="30%"
+ class= "avue-dialog avue-dialog--top"
>
<el-select v-model="ruleOwner" class="selects" placeholder="璇烽�夋嫨">
<el-option
@@ -468,7 +471,7 @@
append-to-body
class="avue-dialog avue-dialog--top"
destroy-on-close
- style="height: 100vh"
+ style="height: 110vh"
title="鐮佹鐮佸�肩鐞�"
top="-3%"
@close="clearFixedOrClassifyForm('close')"
@@ -482,8 +485,9 @@
style="height: 60vh; margin-bottom: -40px"
>
<basic-container>
- <div class="abox">
+ <div class="abox" v-for="item in classifyValueTreeData">
<avue-tree
+ :node-key="item.oid"
:data="classifyValueTreeData"
:option="classisyValueTreeOption"
style="height: calc(60vh - 100px);"
@@ -1274,9 +1278,8 @@
<el-button
:disabled="!showbtn"
type="primary"
- @click="saveOrEditBasicCode"
- >淇� 瀛�</el-button
- >
+ :loading="isLoadingSecCodeAddBtn"
+ @click="saveOrEditBasicCode">淇� 瀛�</el-button>
<el-button @click="addBasicCodeSettingBox = false">鍙� 娑�</el-button>
</div>
@@ -1455,11 +1458,11 @@
import { mapGetters } from "vuex";
import { getByRoleUserList } from "@/api/system/user";
import func from "@/util/func";
-import logeVue from '../docking/loge.vue';
export default {
data() {
return {
+ nodeKey:'',
ruleForm: {},
query: {},
loading: true,
@@ -1474,6 +1477,7 @@
optionRule: optionRule,
data: [],
currentRuleLcStatus: "",
+
/*鍏嬮殕瀵硅瘽妗嗘帶鍒跺彉閲�*/
cloneSettingBox: false,
cloneTableLoading: false,
@@ -1484,11 +1488,15 @@
name: "",
description: "",
},
+
/*浠庡叾浠栬鍒欏厠闅嗙爜娈�*/
cloneOtherCodeRuleSettingBox: false,
cloneBasicOption: cloneBasicOption,
cloneCodeRuleOption: cloneCodeRuleOption,
- selectionOtherCloneCodeBasicList: [], // 褰撳墠閫変腑鐨勫熀纭�鐮佹
+ selectionOtherCloneCodeBasicList: [], // 姝ょ晫闈㈠唴褰撳墠閫変腑鐨勫熀纭�鐮佹
+ selectionOtherCloneCodeRuleList: [], // 姝ょ晫闈㈠唴褰撳墠閫変腑鐨勭紪鐮佽鍒�
+ otherCloneQuery: {}, // 鏌ヨ鏉′欢瀵硅薄
+
/** 杞Щ鎵�鏈夎�呭璇濇 */
escapeOwnerVisible: false,
ruleAdminUserList: [], //瑙勫垯绠$悊鍛樺垪琛�
@@ -1544,6 +1552,7 @@
selectionBasicList: [],
addBasicCodeSettingBox: false,
showbtn: false, //鍩虹鐮佹鏂板鏄惁鏄剧ず鍩虹鐮佹
+ isLoadingSecCodeAddBtn: false,
basicSecDialogTitle: "", //鍩虹鐮佹绗竴灞傚璇濇鏍囬
basicSecOnlyRead: false, //鏂板鍩虹鐮佹琛ㄥ崟鏄惁鍙
@@ -1748,6 +1757,7 @@
});
},
methods: {
+
/** 杞Щ瑙勫垯鎵�鏈夎�呭璇濇 */
escapeOwner() {
if (this.selectionList.length === 0) {
@@ -2392,6 +2402,7 @@
"conditionMap[codeclassifysecoid]": row.oid,
};
treeCodeClassifyValue(condtionData).then((res) => {
+ // console.log('res',res)
this.classifyValueTreeData = res.data;
//console.log(res.data);
});
@@ -2514,6 +2525,7 @@
updateStatus(oid, update) {
updateStatus({ oid: oid, ts: new Date().getTime, update: update }).then(
() => {
+ this.releadDisabled = false;
this.onLoad(this.page);
this.$message({
type: "success",
@@ -2528,8 +2540,8 @@
/** 鍙戝竷缂栫爜瑙勫垯 */
async enableOrDeactivatse(oid, update) {
if (update === "release") {
- // 閬垮厤鐢ㄦ埛閲嶅鐐瑰嚮鎸夐挳
this.releadDisabled = true;
+ // 閬垮厤鐢ㄦ埛閲嶅鐐瑰嚮鎸夐挳
await checkLikeCodeRule(oid)
.then((res) => {
//console.log(res)
@@ -2540,17 +2552,15 @@
distinguishCancelAndClose: true,
confirmButtonText: "缁х画鍙戝竷",
cancelButtonText: "鍙栨秷",
- })
- .then(() => {
+ }).then(() => {
this.updateStatus(oid, update);
this.releadDisabled = false;
- })
- .catch((action) => {
- this.releadDisabled = false;
+ }).catch((action) => {
this.$message({
type: "info",
message: "鍙栨秷鍙戝竷!",
});
+ this.releadDisabled = false;
});
}
})
@@ -2561,6 +2571,7 @@
this.updateStatus(oid, update);
}
},
+
/** 鎵撳紑缂栫爜瑙勫垯鍏嬮殕瀵硅瘽妗�*/
openCodeRuleDialog() {
if (!this.tipsMessage(this.selectionList)) {
@@ -2608,6 +2619,7 @@
);
//console.log(data);
},
+
/** 鎵撳紑浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�*/
openOtherCodeRuleDialog() {
if (!this.tipsMessage(this.selectionList)) {
@@ -2619,7 +2631,7 @@
}
this.cloneOtherCodeRuleSettingBox = true;
},
- //** 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�-鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨*/
+ /** 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹瀵硅瘽妗�-鍗曞嚮缂栫爜瑙勫垯瀹炵幇琛岄�夋嫨*/
codeOtherCloneRuleRowClick(row) {
this.$refs.crudCloneCodeRuleOther.toggleSelection();
this.selectionOtherCloneCodeRuleList = row;
@@ -2654,7 +2666,27 @@
this.selectionOtherCloneCodeBasicList[list.length - 1]
);
},
- /** 浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹淇℃伅*/
+ /** 浠庡叾浠栬鍒欏厠闅嗙爜娈电晫闈㈤噸缃悳绱㈠姛鑳� */
+ searchOtherCloneReset() {
+ this.otherCloneQuery = {};
+ this.onLoad(this.page);
+ },
+ /** 浠庡叾浠栬鍒欏厠闅嗙爜娈电晫闈㈡悳绱㈠姛鑳�*/
+ searchOtherCloneChange(params, done) {
+ this.page.currentPage = 1;
+ // 澶氫釜conditionMap杩欐牱浼犲弬锛屽揩閫熸煡璇㈤粯璁ら噰鐢ㄦā绯婃煡璇�
+ let requestData = {};
+ if (params) {
+ Object.keys(params).forEach((key) => {
+ requestData["conditionMap" + "[" + key + "_like]"] =
+ params[key].trim();
+ });
+ }
+ this.otherCloneQuery = requestData;
+ this.onLoad(this.page,requestData);
+ done();
+ },
+ /** 淇濆瓨浠庡叾浠栫紪鐮佽鍒欎腑鍏嬮殕鐮佹淇℃伅*/
saveOtherCodeBasic() {
let oid = this.selectionList[0].oid;
let fromDialogPkCodebasic = this.selectionOtherCloneCodeBasicList;
@@ -2692,6 +2724,7 @@
}
);
},
+
/** 娓呯┖鐮佸��*/
clearAllCodeSec() {
if (this.selectionList.length == 0) {
@@ -2793,10 +2826,12 @@
}
done();
},
+ // 缂栫爜瑙勫垯蹇�熸煡璇㈤噸缃�
searchReset() {
this.query = {};
this.onLoad(this.page);
},
+ // 缂栫爜瑙勫垯蹇�熸煡璇�
searchChange(params, done) {
this.page.currentPage = 1;
// 澶氫釜conditionMap杩欐牱浼犲弬锛屽揩閫熸煡璇㈤粯璁ら噰鐢ㄦā绯婃煡璇�
@@ -2808,7 +2843,7 @@
});
}
this.query = requestData;
- this.onLoad(this.page);
+ this.onLoad(this.page, this.query);
done();
},
/** 缂栫爜瑙勫垯褰撳墠閫変腑琛屽彉鍖栫殑鏃跺�欒Е鍙�*/
@@ -2846,7 +2881,7 @@
},
onLoad(page, params = {}) {
this.loading = true;
- gridCodeRule(page.currentPage, page.pageSize, this.query).then((res) => {
+ gridCodeRule(page.currentPage, page.pageSize, params).then((res) => {
//console.log(res.data);
const data = res.data.data;
this.page.total = data.total;
@@ -2871,6 +2906,7 @@
/** 闃叉鎵撳紑杩囩紪杈戠獥鍙d箣鍚庤〃鍗曚腑瀛樺湪鍊硷紝鎵�浠ラ渶瑕佹竻绌�,骞跺垵濮嬪寲form琛ㄥ崟灞炴��*/
clearBasicAddForm() {
this.form = this.$options.data().form;
+ //this.isLoadingSecCodeAddBtn = false;
// this.changeSectypeFormItems(null);
},
/** 鎵撳紑鏂板绐楀彛*/
@@ -2912,6 +2948,7 @@
},
/** 鏂板鍩虹鐮佹*/
async saveOrEditBasicCode() {
+ this.isLoadingSecCodeAddBtn = true;
if (
this.selectionList[0].oid == null ||
this.selectionList[0].oid == ""
@@ -2966,6 +3003,7 @@
// 鍏抽棴瀵硅瘽妗�
this.addBasicCodeSettingBox = false;
}
+ this.isLoadingSecCodeAddBtn = false;
},
/** 鍥犱负elementui鐨勮〃鍗曟牎楠岃缃笉涓婃墍浠ラ噰鐢ㄥ垽鏂殑鏂瑰紡鏉ュ仛琛ㄥ崟妫�楠屾柟寮�*/
checkForm() {
@@ -3206,8 +3244,8 @@
this.loadingBasic = true;
}
// console.log(row.oid);
- //瀛樺偍褰撳墠鍏宠仈鐨勭紪鐮佽鍒欑浉鍏充俊鎭�
if (row != "" || row != null) {
+ //瀛樺偍褰撳墠鍏宠仈鐨勭紪鐮佽鍒欑浉鍏充俊鎭�
this.currentCodeRuleOid = row.oid;
this.currentRuleLcStatus = row.lcStatus;
this.sendGridCodeBasicSec({ pkCodeRule: row.oid }, false);
--
Gitblit v1.9.3