| | |
| | | this.defaultFile.forEach((imgItem) => { |
| | | if (imgItem.url == i.url) { |
| | | i.isSelect = true; |
| | | this.selectedImgUrlList.push(i); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | deep: true |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | // } |
| | | 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; |
| | |
| | | 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; |
| | |
| | | } |
| | | }); |
| | | 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(); |
| | | }); |
| | | }, |
| | |
| | | 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); |
| | | } |
| | | } |
| | | }; |