From d76744a052cc15e327d6a07c34140a55aca5b2c4 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期四, 07 十二月 2023 11:46:26 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 85 ++++++++++++++++++++++++------------------ 1 files changed, 48 insertions(+), 37 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue index 21a9cb1..a8f99fe 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,10 +884,23 @@ created() { }, methods: { + handleTabClick(){ + + }, + testHandler(){ + if(this.nodeClickList.length <=0 ){ + this.$message.warning('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹紒') + return; + } + 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; - // console.log(this.TreeAddform.isParticipateCheck) }, //瀛樺偍鐨勪笟鍔$被鍨嬪叧闂� BtmEscHandler() { @@ -1114,6 +1132,7 @@ }, //鍒嗙被鏍戞暟鎹鐞� getAttr() { + this.loading = true; return new Promise((resolve, reject) => { getAtrrList() .then(res => { @@ -1132,6 +1151,7 @@ } return item; }); + this.loading = false; resolve(); // 瀹屾垚璇锋眰锛岃皟鐢╮esolve鏂规硶 }) .catch(error => { @@ -1185,35 +1205,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, + }); } }, //鏍戣妭鐐瑰垹闄ゆ寜閽� @@ -1285,16 +1301,11 @@ }, //鏍戝埛鏂� async flushed() { - this.loading = true; - try { await this.getAttr() this.$refs.tree.setCurrentKey(null); this.nodeClickList = {} this.TreeList = [] this.TreeFlagCode = true; - } finally { - this.loading = false; - } }, //鍚敤鍜屽仠鐢ㄩ兘鍏堝垽鏂姸鎬� //鍚敤 @@ -1333,7 +1344,7 @@ }); } } catch (error) { - console.error(error); + // console.error(error); } finally { this.loading = false; } @@ -1376,7 +1387,7 @@ }); } } catch (error) { - console.error(error); + // console.error(error); } finally { this.loading = false; } @@ -1446,7 +1457,7 @@ } }, treeClick(e) { - console.log(e); + // console.log(e); }, //鍩烘湰淇℃伅琛ㄥ崟鍒锋柊 referTreeForm() { -- Gitblit v1.9.3