From 6732cd7a4e0fd7ea083d4ae11254bde35adb1ee4 Mon Sep 17 00:00:00 2001 From: xiejun <xj@2023> Date: 星期五, 17 十一月 2023 01:39:20 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue | 128 +++++++++++++++++++++++++++++------------- 1 files changed, 89 insertions(+), 39 deletions(-) diff --git a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue index 5b22a87..69351e6 100644 --- a/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue +++ b/Source/UBCS-WEB/src/components/Theme/ThemeClassifyTrees.vue @@ -3,26 +3,38 @@ <el-container> <!-- 宸︿晶鑿滃崟--> <el-aside> - <basic-container style="overflow:hidden;"> + <basic-container> <div> <div> <div style="display: flex; flex-direction: column;"> <div style="display: flex;"> - <el-button plain size="small" type="primary" @click="TreeAdd">娣诲姞</el-button> - <el-button plain size="small" type="primary" @click="TreeEdit">淇敼</el-button> - <el-button plain size="small" type="primary" @click="TreeDel">鍒犻櫎</el-button> - <el-button plain size="small" type="primary" @click="flushed">鍒锋柊</el-button> + <el-button plain size="small" type="primary" @click="TreeAdd" v-if="permissionList.TreeAddStatus">娣诲姞</el-button> + <el-button plain size="small" type="primary" @click="TreeEdit" v-if="permissionList.TreeEditStatus">淇敼</el-button> + <el-button plain size="small" type="primary" @click="TreeDel" v-if="permissionList.TreeDelStatus">鍒犻櫎</el-button> + <el-button plain size="small" type="primary" @click="flushed" v-if="permissionList.flushedStatus">鍒锋柊</el-button> </div> <div style="display: flex; margin-top: 10px"> - <el-button plain size="small" type="primary" @click="Enable">鍚敤</el-button> - <el-button plain size="small" type="primary" @click="Deactivate">鍋滅敤</el-button> - <el-button plain size="small" type="primary" @click.native="ImportExcel">瀵煎叆</el-button> - <el-button plain size="small" type="primary" @click="ExportExcel">瀵煎嚭</el-button> + <el-button plain size="small" type="primary" @click="Enable" v-if="permissionList.EnableStatus">鍚敤</el-button> + <el-button plain size="small" type="primary" @click="Deactivate" v-if="permissionList.DeactivateStatus">鍋滅敤</el-button> + <el-button plain size="small" type="primary" @click.native="ImportExcel" v-if="permissionList.ImportExcelStatus">瀵煎叆</el-button> + <el-button plain size="small" type="primary" @click="ExportExcel" v-if="permissionList.ExportExcelStatus">瀵煎嚭</el-button> </div> </div> <div style="display: flex;justify-content: space-around;margin-top: 5px;margin-bottom: 5px"> </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)" + @node-click="nodeClick" + > + </avue-tree> + </div> + <!-- 鏍戣妭鐐规坊鍔犲璇濇--> <el-dialog v-loading="AddLoading" :before-close="TreeEscHandler" :title="this.TreeFlag ? '娣诲姞鍒嗙被' :'娣诲姞涓婚搴�'" :visible.sync="TreeAddFormVisible" append-to-body @@ -51,6 +63,16 @@ <el-input v-model="TreeAddform.codeKeyAttrRepeatOidName" autocomplete="off" style="width: 585px" @focus="Keyfouce"></el-input> </el-form-item> + <el-form-item label="鏄惁鍙備笌鍏抽敭灞炴�ф牎楠岋細" label-width="170px"> + <el-switch + v-model="TreeAddform.codeKeyAttrValue" + active-text="鏄�" + inactive-text="鍚�" + active-color="#13ce66" + inactive-color="#ff4949" + @change="switchChange"> + </el-switch> + </el-form-item> <el-form-item label="鐩镐技鏌ヨ瑙勫垯锛�" label-width="150px"> <el-input v-model="TreeAddform.codeResembleRuleOidName" autocomplete="off" style="width: 585px" @focus="simFouce"></el-input> @@ -69,14 +91,6 @@ :nodeList="nodeList" @MasterHandler="MasterHandler" @flushed="flushed" @referTreeForm="referTreeForm"></classifyTreeform> </el-dialog> - <avue-tree ref="tree" v-model="CloneTreeAvueform" v-loading="loading" :data="CloneTreedata" - :defaultExpandAll="false" - :option="Treeoption" - class="classifyTree" - style="height: calc(100vh - 230px);" - @node-click="nodeClick" - > - </avue-tree> </div> </basic-container> </el-aside> @@ -103,9 +117,9 @@ </template> <template slot="menuLeft"> - <el-button plain size="small" type="primary" @click="FindeHanler">鏌ヨ</el-button> - <el-button plain size="small" type="primary" @click="TemRefresh">鍒锋柊</el-button> - <el-button plain size="small" type="primary" @click="CloneBtn">浠庡叾瀹冩ā鏉垮厠闅�</el-button> + <el-button plain size="small" type="primary" @click="FindeHanler" v-if="permissionList.FindStatus">鏌ヨ</el-button> + <el-button plain size="small" type="primary" @click="TemRefresh" v-if="permissionList.TemRefreshStatus">鍒锋柊</el-button> + <el-button plain size="small" type="primary" @click="CloneBtn" v-if="permissionList.CloneBtnStuatus">浠庡叾瀹冩ā鏉垮厠闅�</el-button> <!-- 鏌ヨ瀵硅瘽妗�--> <el-dialog :visible.sync="FindFormVisible" append-to-body title="楂樼骇鏌ヨ"> <div> @@ -142,7 +156,7 @@ <avue-tree ref="cloneTree" v-model="TreeAvueform" v-loading="loading" :data="Treedata" :defaultExpandAll="false" :option="Treeoption" - style="height: 50.5vh;margin-right: 10px" + style="height: 50.5vh;margin-right: 10px;width: 300px" @node-click="ClonenodeClick" > </avue-tree> @@ -400,13 +414,9 @@ } from "@/api/template/templateAttr"; import {defaultReferDataGrid, referDataGrid} from '@/api/MasterData/master' import func from "@/util/func"; - +import {mapGetters} from "vuex"; export default { name: "classifyTrees.vue", - //浣跨敤inject鎺ユ敹鍙傛暟 - //Treeoption宸︿晶鏍戞柊澧炶〃鍗曢」 Treedata宸︿晶鏍戣妭鐐� 閰嶇疆椤� crudTreeOption鍙充晶琛ㄦ牸閰嶇疆椤� crudTreeData鍙充晶琛ㄦ牸鏄剧ず鍐呭 - //Treeform鍙充晶琛ㄥ崟閰嶇疆椤� - inject: ["crudTreeData"], data() { return { masterRow: null, @@ -475,6 +485,7 @@ Option: { addBtn: false, index: true, + columnBtn:false, border: true, menu: false, height: 380, @@ -585,7 +596,9 @@ //缂栫爜瑙勫垯 codeRuleOidName: "", //瀛樺偍鐨勪笟鍔$被鍨� - btmTypeName: "" + btmTypeName: "", + codeKeyAttrValue:true, + isParticipateCheck:1 }, rules: { id: [ @@ -666,6 +679,7 @@ CloneSelect: [], //鍏嬮殕妯℃澘option ClonecrudTreeOption: { + columnBtn:false, index: true, border: true, menu: false, @@ -761,7 +775,6 @@ } }, watch: {}, - //tab鏍忛粯璁ゆ槸琛ㄦ牸 mounted() { this.type = this.tabOption.column[0]; this.getAttr(); @@ -776,10 +789,27 @@ }, true) }, computed: { + ...mapGetters(["permission"]), + permissionList(){ + return{ + TreeAddStatus:this.vaildData(this.permission.classifyTree.tree_add,false), + TreeEditStatus:this.vaildData(this.permission.classifyTree.tree_edit,false), + TreeDelStatus:this.vaildData(this.permission.classifyTree.tree_delete,false), + flushedStatus:this.vaildData(this.permission.classifyTree.tree_break,false), + EnableStatus:this.vaildData(this.permission.classifyTree.tree_enable,false), + DeactivateStatus:this.vaildData(this.permission.classifyTree.tree_stop,false), + ImportExcelStatus:this.vaildData(this.permission.classifyTree.tree_import,false), + ExportExcelStatus:this.vaildData(this.permission.classifyTree.tree_export,false), + 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), + } + }, crudTreeOption() { return { index: true, border: true, + columnBtn:false, height: 180, addBtn: this.Formlist.length <= 0 && this.nodeClickList != "", editBtn: false, @@ -833,9 +863,13 @@ } }, created() { - }, methods: { + // switch + switchChange(){ + this.TreeAddform.isParticipateCheck = this.TreeAddform.codeKeyAttrValue === true ? 1 : 0; + // console.log(this.TreeAddform.isParticipateCheck) + }, //瀛樺偍鐨勪笟鍔$被鍨嬪叧闂� BtmEscHandler() { this.SelectFInd = ''; @@ -895,7 +929,7 @@ //缂栫爜瑙勫垯鏌ヨ SelectFindeHandler() { const masterParameter = {}; - masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`; + masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd; this.MasterdefaultRend(masterParameter) }, //缂栫爜瑙勫垯纭畾 @@ -910,6 +944,7 @@ this.$set(this.TreeAddform, 'codeRuleOidName', this.masterName) this.$set(this.TreeAddform, 'codeRuleOid', this.masterOid) this.$emit('MasterHandler', this.loneTreeNewForm) + this.masterRow=null; } }, //缂栫爜鎺ュ彛 @@ -939,12 +974,13 @@ this.KeySelectLIst = [] this.$set(this.TreeAddform, 'codeKeyAttrRepeatOidName', this.KeyName) this.$set(this.TreeAddform, 'codeKeyAttrRepeatOid', this.KeyOid) + this.masterRow=null; } }, //鍏抽敭灞炴�ф煡璇� KeySelectFindeHandler() { const masterParameter = {}; - masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`; + masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd; this.KeydefaultRend(masterParameter) }, //鍏抽敭灞炴�ф帴鍙� @@ -983,12 +1019,13 @@ this.$set(this.TreeAddform, 'codeResembleRuleOidName', this.simName) this.$set(this.TreeAddform, 'codeResembleRuleOid', this.simOid) this.$emit('MasterHandler', this.loneTreeNewForm) + this.masterRow=null; } }, //鐩镐技椤规煡璇� SimSelectFindeHandler() { const masterParameter = {}; - masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`; + masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd; this.simdefaultRend(masterParameter) }, // 鐩镐技椤瑰閫� @@ -1028,12 +1065,13 @@ this.$set(this.TreeAddform, 'btmTypeName', this.btmName) this.$set(this.TreeAddform, 'btmTypeId', this.btmOid) this.$emit('MasterHandler', this.loneTreeNewForm) + this.masterRow=null; } }, //涓氬姟绫诲瀷鏌ヨ BtmSelectFindeHandler() { const masterParameter = {}; - masterParameter[`conditionMap['${this.SelectValue}']`] = `*${this.SelectFInd}*`; + masterParameter[`conditionMap['${this.SelectValue}']`] = this.SelectFInd; this.btmdefaultRend(masterParameter); }, //涓氬姟绫诲瀷澶氶�� @@ -1116,7 +1154,13 @@ }, //鏍戣妭鐐瑰彇娑堜簨浠� TreeEscHandler() { - this.TreeAddform = {}; + for (let key in this.TreeAddform) { + if (key !== 'codeKeyAttrValue' && key !== 'isParticipateCheck') { + this.TreeAddform[key] = ""; + } + } + this.TreeAddform.codeKeyAttrValue = true; + this.TreeAddform.isParticipateCheck = 1; this.TreeAddFormVisible = false; // 鍏抽棴寮圭獥娓呯┖鏍¢獙 this.$refs.myForm.clearValidate(); @@ -1136,6 +1180,8 @@ }); Object.keys(this.TreeAddform).forEach(key => { this.TreeAddform[key] = ""; + this.TreeAddform.codeKeyAttrValue = true; + this.TreeAddform.isParticipateCheck = 1; }); this.getAttr(); this.TreeAddFormVisible = false; @@ -1224,7 +1270,10 @@ this.getAttr() setTimeout(() => { this.loading = false; - this.nodeClickList = "" + this.$refs.tree.setCurrentKey(null); + this.nodeClickList = {} + this.TreeList = [] + this.TreeFlagCode = true; }, 600); }, //鍚敤鍜屽仠鐢ㄩ兘鍏堝垽鏂姸鎬� @@ -1326,6 +1375,10 @@ this.crudOid = '' } this.TreeList = res3.data.data; + if(this.TreeList.isParticipateCheck === null || this.TreeList.isParticipateCheck === undefined ||this.TreeList.isParticipateCheck === ""){ + this.$set(this.TreeList,"isParticipateCheck",1) + return + } } catch (error) { this.$message.error(error); } @@ -1611,7 +1664,7 @@ } .el-aside { - height: calc(100% - 30px); + //height: calc(100% - 30px); } .el-main { @@ -1637,6 +1690,3 @@ } </style> -/sa[pr -[ -syulep -- Gitblit v1.9.3