From 9b51b2a07769ee049937e16dd45d8c36c87dcc3c Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期五, 08 十二月 2023 17:13:01 +0800 Subject: [PATCH] 主数据 枚举配置模板配置 参照配置表格显示问题处理 --- Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 89 +++++++++++++++++++++++++------------------- 1 files changed, 50 insertions(+), 39 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue index 21a9cb1..91b2025 100644 --- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue +++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue @@ -31,16 +31,19 @@ </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" :defaultExpandAll="false" :option="Treeoption" class="classifyTree" - style="height: calc(100vh - 280px)" + style="height: calc(100vh - 290px)" @node-click="nodeClick" > </avue-tree> @@ -50,7 +53,7 @@ <el-dialog v-loading="AddLoading" :before-close="TreeEscHandler" :title="this.TreeFlag ? '娣诲姞鍒嗙被' :'娣诲姞涓婚搴�'" :visible.sync="TreeAddFormVisible" append-to-body style="width: 1700px;margin: auto"> - <el-form ref="myForm" :model="TreeAddform" :rules="rules"> + <el-form ref="myForm" :model="TreeAddform" :rules= "rules"> <el-form-item :label="this.TreeFlag ? '鍒嗙被缂栧彿锛�' :'涓婚搴撶紪鍙凤細'" label-width="150px" prop="id" style="display: inline-block"> <el-input v-model="TreeAddform.id" autocomplete="off" style="width: 170px"></el-input> @@ -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