From 985b26624b69ad91b9e3a723c19bd4bbf1a36250 Mon Sep 17 00:00:00 2001 From: Surpriseplus <845948745@qq.com> Date: 星期五, 03 三月 2023 13:03:47 +0800 Subject: [PATCH] 空间查询列表细化,工点表添加挂接信息界面 --- src/views/Archive/index.vue | 58 +++++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 41 insertions(+), 17 deletions(-) diff --git a/src/views/Archive/index.vue b/src/views/Archive/index.vue index 745f391..9e00435 100644 --- a/src/views/Archive/index.vue +++ b/src/views/Archive/index.vue @@ -54,7 +54,7 @@ > <el-option v-for="item in categoryOptions" - :key="item.value" + :key="item.key" :label="item.value" :value="item.key" > @@ -551,6 +551,7 @@ > <template slot-scope="scope"> <el-link + v-if="matchState(scope, /[]/)" @click="setAttatchDetail(scope.$index, scope.row)" class="elLink" >{{ $t('common.see') }}</el-link> @@ -1207,6 +1208,15 @@ this.signGetPublicKey(); }, methods: { + matchState(state = "", reg) { + var row = state.row; + var name = row.name; + if (name.indexOf('.pdf') != -1 || name.indexOf('.jpg') != -1 || name.indexOf('.gif') != -1 || name.indexOf('.png') != -1 || name.indexOf('.jpeg') != -1) { + return true; + } + + return false; + }, // 闄勪欢=>琛ㄦ牸閫夋嫨 handleAttatchChange(val) { this.attacgSelection = val; @@ -1967,14 +1977,19 @@ return; } var val = data.result; - val = val.filter((res) => { + if (val) { + val = val.filter((res) => { + res.mold = "鏁版嵁搴�" + res.isShow = false + return res; + }) + this.listData.count = data.count; + this.monthdata = data.result; + } else { + this.listData.count = 0; + this.monthdata = []; + } - res.mold = "鏁版嵁搴�" - res.isShow = false - return res; - }) - this.listData.count = data.count; - this.monthdata = data.result; }, //鏌ヨ鏂囦欢鏁版嵁 async getQueryFileData() { @@ -1996,16 +2011,22 @@ this.$message.error('鏂囦欢鏁版嵁鍒楄〃璋冪敤澶辫触'); } var val = data.result; - val = val.filter((res) => { - var type = "." + res.type; - res.name = res.name.replaceAll(type, "") - res.mold = "鏂囦欢" - res.isShow = false - return res; - }) + if (val) { + val = val.filter((res) => { + var type = "." + res.type; + res.name = res.name.replaceAll(type, "") + res.mold = "鏂囦欢" + res.isShow = false + return res; + }) - this.monthdata = val; - this.listData.count = data.count; + this.monthdata = val; + this.listData.count = data.count; + } else { + this.monthdata = []; + this.listData.count = 0; + } + }, //鏌ヨ鏁版嵁 getAllTabesData() { @@ -2035,6 +2056,7 @@ if (data.code != 200) { this.$message.error('璧勬枡绫诲埆鍒楄〃璋冪敤澶辫触'); } + this.categoryOptions = data.result; }, //鍏抽敭瀛楁煡璇� @@ -2050,7 +2072,9 @@ }, //璧勬枡绫诲埆涓嬫媺妗嗗�兼敼鍙樿Е鍙� categorySelectChange(model, prop, options) { + this.getAllTabesData(); + }, // 椤圭洰鍚嶇О涓嬫媺妗嗗�兼敼鍙樿Е鍙� itemSelectChange(model, prop, options) { -- Gitblit v1.9.3