From 25ef4e85586c27433c865b69c67ccf5a380b93a7 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期二, 05 十二月 2023 13:52:07 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 99 +++++++++++++++++++++++++++---------------------- 1 files changed, 55 insertions(+), 44 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue index 21a9cb1..72f90ae 100644 --- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue +++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue @@ -7,27 +7,32 @@ <div> <div> <div style="display: flex; flex-direction: column;"> - <div style="display: flex;"> - <el-button v-if="permissionList.TreeAddStatus" plain size="small" type="primary" @click="TreeAdd">娣诲姞 + <div style="display: flex;justify-content: space-around"> + <el-button v-if="permissionList.TreeAddStatus" plain size="mini" type="primary" @click="TreeAdd">娣诲姞 </el-button> - <el-button v-if="permissionList.TreeEditStatus" plain size="small" type="primary" @click="TreeEdit">淇敼 + <el-button v-if="permissionList.TreeEditStatus" plain size="mini" type="primary" @click="TreeEdit">淇敼 </el-button> - <el-button v-if="permissionList.TreeDelStatus" plain size="small" type="primary" @click="TreeDel">鍒犻櫎 - </el-button> - <el-button v-if="permissionList.flushedStatus" plain size="small" type="primary" @click="flushed">鍒锋柊 + <el-button v-if="permissionList.TreeDelStatus" plain size="mini" type="primary" @click="TreeDel">鍒犻櫎 </el-button> </div> - <div style="display: flex; margin-top: 10px"> - <el-button v-if="permissionList.EnableStatus" plain size="small" type="primary" @click="Enable">鍚敤 + <div style="display: flex; margin-top: 10px;justify-content: space-around"> + <el-button v-if="permissionList.flushedStatus" plain size="mini" type="primary" @click="flushed">鍒锋柊 </el-button> - <el-button v-if="permissionList.DeactivateStatus" plain size="small" type="primary" @click="Deactivate"> + <el-button v-if="permissionList.EnableStatus" plain size="mini" type="primary" @click="Enable">鍚敤 + </el-button> + <el-button v-if="permissionList.DeactivateStatus" plain size="mini" type="primary" @click="Deactivate"> 鍋滅敤 </el-button> - <el-button v-if="permissionList.ImportExcelStatus" plain size="small" type="primary" + </div> + <div style="display: flex; margin-top: 10px;justify-content: space-around"> + <el-button v-if="permissionList.ImportExcelStatus" plain size="mini" type="primary" @click.native="ImportExcel">瀵煎叆 </el-button> - <el-button v-if="permissionList.ExportExcelStatus" plain size="small" type="primary" + <el-button v-if="permissionList.ExportExcelStatus" plain size="mini" type="primary" @click="ExportExcel">瀵煎嚭 + </el-button> + <el-button v-if="permissionList.ExportExcelStatus" plain size="mini" type="primary" + @click="testHandler">娴嬭瘯 </el-button> </div> </div> @@ -35,12 +40,12 @@ </div> </div> <!-- 宸︿晶鏍�--> - <div style="height: calc(100vh - 230px);overflow: auto"> + <div style="height: calc(100vh - 230px);overflow: auto;"> <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" :defaultExpandAll="false" :option="Treeoption" class="classifyTree" - style="height: calc(100vh - 280px)" + style="height: calc(100vh - 280px);" @node-click="nodeClick" > </avue-tree> @@ -423,7 +428,8 @@ upVersion, stopLose, startRelease, - exportClassify + exportClassify, + flowingDependencyGen } from "@/api/template/templateAttr"; import {defaultReferDataGrid, referDataGrid} from '@/api/MasterData/master' import func from "@/util/func"; @@ -879,6 +885,18 @@ created() { }, methods: { + 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 +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; - } }, //鍚敤鍜屽仠鐢ㄩ兘鍏堝垽鏂姸鎬� //鍚敤 -- Gitblit v1.9.3