From 069da66fbe2748d51b1f3bc63f9ae00e660083c6 Mon Sep 17 00:00:00 2001 From: riku <risaku@163.com> Date: 星期一, 04 十一月 2024 14:45:18 +0800 Subject: [PATCH] 场景报告模块(暂存) --- src/views/fysp/check/components/ArbitraryPhoto.vue | 27 ++++++++++++++++----------- 1 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/views/fysp/check/components/ArbitraryPhoto.vue b/src/views/fysp/check/components/ArbitraryPhoto.vue index bd24994..058136a 100644 --- a/src/views/fysp/check/components/ArbitraryPhoto.vue +++ b/src/views/fysp/check/components/ArbitraryPhoto.vue @@ -134,12 +134,11 @@ this.defaultFile.forEach((imgItem) => { if (imgItem.url == i.url) { i.isSelect = true; + this.selectedImgUrlList.push(i); } }); }); }, - - deep: true } }, mounted() { @@ -160,6 +159,9 @@ // } this.typeImgMap.clear(); this.typeList = []; + + const imgMap = new Map(); + const _typeList = []; mediafileApi.getRoutineByStGuid(this.subtask.stGuid).then((res) => { this.isEmpty = false; let data = res.data; @@ -171,7 +173,7 @@ let businesstypeid = e.businesstypeid; let businesstype = e.businesstype; let hasThisType = false; - this.typeImgMap.forEach((v, k, m) => { + imgMap.forEach((v, k, m) => { if (k == businesstypeid) { hasThisType = true; var isAlreadyHas = false; @@ -190,14 +192,16 @@ } }); if (!hasThisType) { - this.typeImgMap.set(businesstypeid, Array.of(e)); - this.typeList.push(e); + imgMap.set(businesstypeid, Array.of(e)); + _typeList.push(e); } this.imgUrlList.push(e); // TODO imgUrl鍏ㄥ眬閰嶇疆 e.url = $fysp.imgUrl + e.extension1 + e.guid + '.jpg'; e.isSelect = false; } + this.typeImgMap = imgMap; + this.typeList = _typeList; this.initSelectedTab(); }); }, @@ -263,14 +267,15 @@ let result = []; if (!isOk) { this.$emit('selectByAnyPhonoEvent', result); - } - for (const item of this.imgUrlList) { - if (item.isSelect == true) { - result.push(item); + } else { + for (const item of this.imgUrlList) { + if (item.isSelect == true) { + result.push(item); + } } + this.isClose = true; + this.$emit('selectByAnyPhonoEvent', result); } - this.isClose = true; - this.$emit('selectByAnyPhonoEvent', result); } } }; -- Gitblit v1.9.3