From cbc4fc2e4dce714c5d5723746368266915868007 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期二, 28 二月 2023 15:44:06 +0800 Subject: [PATCH] 项目管理界面优化,字典管理页面左侧树界面优化,数据上传版本显示错误优化,综合展示二三维切换效果优化 --- src/views/datamanage/dictionaryManage.vue | 97 ++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 84 insertions(+), 13 deletions(-) diff --git a/src/views/datamanage/dictionaryManage.vue b/src/views/datamanage/dictionaryManage.vue index 89890a5..9b1e90b 100644 --- a/src/views/datamanage/dictionaryManage.vue +++ b/src/views/datamanage/dictionaryManage.vue @@ -11,7 +11,23 @@ class="dictionary_leftTree subpage_Div" style="border: 1px solid #dcdfe6;" > - <ul> + <el-input + size="small" + v-model="filterInput" + style="width: 200px" + :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueone')" + suffix-icon="el-icon-search" + ></el-input> + + <el-tree + :data="domainData" + :props="defaultProps" + :default-expand-all="true" + @node-click="getTableDesc" + :filter-node-method="filterNode" + ref="tree" + ></el-tree> + <!-- <ul> <li @click="getTableDesc(item)" v-for="(item, i) in optionCount" @@ -20,7 +36,7 @@ > {{ item.tabDesc }} </li> - </ul> + </ul> --> </div> <div class="right subpage_Div"> @@ -38,9 +54,17 @@ v-model="formInline.tab" :placeholder="$t('shuJuGuanLi.lable3')" style="width: 200px" - ><i slot="suffix" class="el-icon-search" @click="getSelectDictTab" style="padding-right: 8px"></i></el-input> + ><i + slot="suffix" + class="el-icon-search" + @click="getSelectDictTab" + style="padding-right: 8px" + ></i></el-input> </el-form-item> - <el-form-item style="float: right" size="small"> + <el-form-item + style="float: right" + size="small" + > <el-button v-if="btnStatus.insert" icon="el-icon-edit" @@ -55,7 +79,7 @@ @click="DelFormData" type="danger" >{{ $t("common.delete") }}</el-button> -<!-- <el-button + <!-- <el-button icon="el-icon-search" size="small" @click="getSelectDictTab" @@ -553,6 +577,7 @@ components: { MyBread }, data() { return { + filterInput: "", activeName: "", formInline: [], listData: { @@ -581,13 +606,42 @@ insert: false, update: false, }, + domainData: [ + { + val: "鍩虹鏁版嵁", + children: [], + }, + { + val: "涓氬姟鏁版嵁", + children: [], + }, + { + val: "鍏冩暟鎹�", + children: [], + }, + ], + defaultProps: { + children: "children", + label: "val", + }, }; + }, + watch: { + + filterInput(val) { + this.$refs.tree.filter(val); + }, }, created() { this.getSelectDictTab(); this.showPermsBtn(); }, methods: { + filterNode(value, data) { + if (!value) return true; + + return data.val.indexOf(value) !== -1; + }, //鏂板 async insertFromData() { const data = await insertDict(this.insertform); @@ -732,14 +786,31 @@ if (data.code != 200) { this.$message.error("涓嬫媺璋冪敤澶辫触"); } - - this.optionCount = data.result; - this.insertform.tab = data.result[0].tab; - this.insertform.tabDesc = data.result[0].tabDesc; - this.insertform.ns = data.result[0].ns; - this.listData.tab = data.result[0].tab; - this.listData.ns = data.result[0].ns; - this.activeName = data.result[0].tab; + let bdres = data.result.filter((item) => item.ns == "bd"); + let bsres = data.result.filter((item) => item.ns == "bs"); + let mdres = data.result.filter((item) => item.ns == "md"); + for (var i in bdres) { + // bdres[i].val = bdres[i].tabDesc + '(' + bdres[i].tab + ')'; + bdres[i].val = bdres[i].tabDesc; + } + for (var i in bsres) { + // bsres[i].val = bsres[i].tabDesc + '(' + bsres[i].tab + ')'; + bsres[i].val = bsres[i].tabDesc; + } + for (var i in mdres) { + // bsres[i].val = bsres[i].tabDesc + '(' + bsres[i].tab + ')'; + mdres[i].val = mdres[i].tabDesc; + } + this.domainData[0].children = bdres; + this.domainData[1].children = bsres; + this.domainData[2].children = mdres; + var val = this.domainData[0].children; + this.insertform.tab = val[0].tab; + this.insertform.tabDesc = val[0].tabDesc; + this.insertform.ns = val[0].ns; + this.listData.tab = val[0].tab; + this.listData.ns = val[0].ns; + this.activeName = val[0].tab; this.startQueryNameData(); }, }, -- Gitblit v1.9.3