From c29a6c5cd3f232ab61d9e97df17c63cf1e4b0755 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 07 十二月 2023 11:46:14 +0800 Subject: [PATCH] 分类路径注入,过滤默认属性、过滤表单不显示导致分类注入失败bug修改 --- Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 117 ++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 65 insertions(+), 52 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue index 32f60ef..0fe3d8e 100644 --- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue +++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue @@ -31,9 +31,12 @@ </el-button> </div> </div> - <div style="display: flex;justify-content: space-around;margin-top: 5px;margin-bottom: 5px"> + <div style="display: flex;margin-top: 5px;margin-bottom: 5px"> + <el-button v-if="permissionList.flowingBtnStuatus" plain size="mini" type="primary" @click="testHandler">娴佹按澶勭悊 + </el-button> </div> </div> + </div> <!-- 宸︿晶鏍�--> <div style="height: calc(100vh - 230px);overflow: auto"> <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" @@ -102,7 +105,6 @@ :nodeList="nodeList" @MasterHandler="MasterHandler" @flushed="flushed" @referTreeForm="referTreeForm"></classifyTreeform> </el-dialog> - </div> </basic-container> </el-aside> <el-main> @@ -423,7 +425,8 @@ upVersion, stopLose, startRelease, - exportClassify + exportClassify, + flowingDependencyGen } from "@/api/template/templateAttr"; import {defaultReferDataGrid, referDataGrid} from '@/api/MasterData/master' import func from "@/util/func"; @@ -433,6 +436,7 @@ name: "classifyTrees.vue", data() { return { + activeName: 'first', masterRow: null, AddLoading: false, // 瀹氫箟涓�涓彉閲忔潵淇濆瓨鏍戣姹傜殑鏁伴噺 @@ -817,6 +821,7 @@ FindStatus: this.vaildData(this.permission.classifyTree.manage_search, false), TemRefreshStatus: this.vaildData(this.permission.classifyTree.manage_break, false), CloneBtnStuatus: this.vaildData(this.permission.classifyTree.manage_clone, false), + flowingBtnStuatus: this.vaildData(this.permission.classifyTree.tree_flowing, false), } }, crudTreeOption() { @@ -879,6 +884,21 @@ created() { }, methods: { + handleTabClick(){ + + }, + testHandler(){ + if(this.nodeClickList.length <=0 ){ + this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒') + return; + } + console.log(this.nodeClickList.oid) + flowingDependencyGen(this.nodeClickList.oid).then(res => { + this.$message.success('鎿嶄綔鎴愬姛') + }).catch(res => { + this.$message.error(res) + }) + }, // switch switchChange() { this.TreeAddform.isParticipateCheck = this.TreeAddform.codeKeyAttrValue === true ? 1 : 0; @@ -1114,6 +1134,7 @@ }, //鍒嗙被鏍戞暟鎹鐞� getAttr() { + this.loading = true; return new Promise((resolve, reject) => { getAtrrList() .then(res => { @@ -1132,6 +1153,7 @@ } return item; }); + this.loading = false; resolve(); // 瀹屾垚璇锋眰锛岃皟鐢╮esolve鏂规硶 }) .catch(error => { @@ -1185,35 +1207,31 @@ this.$refs.myForm.clearValidate(); }, //鏍戣妭鐐规坊鍔犱簨浠� - TreeAddHandler() { + async TreeAddHandler() { if ((!this.TreeAddform.id || !this.TreeAddform.name) || (this.TreeFlagCode && !this.TreeAddform.btmTypeName)) { this.$message.warning('璇疯緭鍏ュ唴瀹癸紒'); - } else { + return; + } + try { const data = this.TreeAddform; this.$set(data, "parentCodeClassifyOid", this.nodeClickList.oid); - TreeSave(data) - .then(() => { - this.$message({ - type: "success", - message: "娣诲姞鎴愬姛!", - }); - Object.keys(this.TreeAddform).forEach(key => { - this.TreeAddform[key] = ""; - this.TreeAddform.codeKeyAttrValue = true; - this.TreeAddform.isParticipateCheck = 1; - }); - this.getAttr(); - this.TreeAddFormVisible = false; - //娣诲姞瀹屾垚鍚庡彸渚ф竻绌� - this.ProData = []; - this.Formlist = []; - }) - .catch((res) => { - this.$message({ - type: "warning", - message: res, - }); - }); + await TreeSave(data) + this.$message.success("娣诲姞鎴愬姛!"); + Object.keys(this.TreeAddform).forEach(key => { + this.TreeAddform[key] = ""; + }); + this.TreeAddform.codeKeyAttrValue = true; + this.TreeAddform.isParticipateCheck = 1; + this.getAttr(); + this.TreeAddFormVisible = false; + //娣诲姞瀹屾垚鍚庡彸渚ф竻绌� + this.ProData = []; + this.Formlist = []; + } catch (res) { + this.$message({ + type: "warning", + message: res, + }); } }, //鏍戣妭鐐瑰垹闄ゆ寜閽� @@ -1284,20 +1302,12 @@ } }, //鏍戝埛鏂� - flushed() { - this.loading = true; - this.getAttr() - .then(() => { - this.loading = false; - this.$refs.tree.setCurrentKey(null); - this.nodeClickList = {} - this.TreeList = [] - this.TreeFlagCode = true; - }) - .catch(error => { - this.loading = false; - console.error(error); - }); + async flushed() { + await this.getAttr() + this.$refs.tree.setCurrentKey(null); + this.nodeClickList = {} + this.TreeList = [] + this.TreeFlagCode = true; }, //鍚敤鍜屽仠鐢ㄩ兘鍏堝垽鏂姸鎬� //鍚敤 @@ -1321,12 +1331,14 @@ type: 'warning' }); if (confirmResult) { - await TreeEnable(this.nodeClickList); - this.$message({ - type: 'success', - message: '鍚敤鎴愬姛!' - }); + await TreeEnable(this.nodeClickList).then(res => { + this.$message({ + type: 'success', + message: '鍚敤鎴愬姛!' + }); + }) await this.getAttr(); + } else { this.$message({ type: 'info', @@ -1362,11 +1374,12 @@ type: 'warning' }); if (confirmResult) { - await TreeDeactivate(this.nodeClickList); - this.$message({ - type: 'success', - message: '鍋滅敤鎴愬姛!' - }); + await TreeDeactivate(this.nodeClickList).then(res => { + this.$message({ + type: 'success', + message: '鍋滅敤鎴愬姛!' + }); + }) this.nodeClickList['flag'] = true; await this.getAttr(); } else { -- Gitblit v1.9.3