Commit 7c393795 authored by Damon's avatar Damon

上传照片对应组件错误

parent 6a02cead
;
(function() {
let NODE_ENV = 'prod'; // dev:开发环境 | test:测试环境 | prod:生产环境
let NODE_ENV = 'test'; // dev:开发环境 | test:测试环境 | prod:生产环境
let ENV_VAR = null;
if (process.env.NODE_ENV === "development") {
if (NODE_ENV === 'dev') {
......
......@@ -45,7 +45,7 @@
</xh-select>
<view v-else-if="item.formType==='file'">
<xh-files
:ref="`fileChild${itemIndex}`"
:ref="`fileChild${groupIndex}${itemIndex}`"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :partnerCompanyId="partnerCompanyId" :categoryId="categoryId" :value='form[item.fieldsName] || []'
@value-change="fieldValueChange">
<template v-slot>
......@@ -586,7 +586,7 @@
// ------------------------- 以下方法为上传组件相关 -------------------------
// 弹出上传选项
selectUpload(item, groupIndex, itemIndex){
const imgList = this.$refs[`fileChild${itemIndex}`][0].imgList
const imgList = this.$refs[`fileChild${groupIndex}${itemIndex}`][0].imgList
if (imgList.length === 10) {
return this.$refs.uToast.show({
title: '图片已超出最大数量',
......@@ -614,7 +614,7 @@
if(val && val.length > 0){
const files = val.map(v => v.path)
const value = await this.saveToTask(files)
this.$refs[`fileChild${this.photoItem.itemIndex}`][0].setTmpValue(value)
this.$refs[`fileChild${this.photoItem.groupIndex}${this.photoItem.itemIndex}`][0].setTmpValue(value)
}
this.takeStatus = false
},
......@@ -629,7 +629,7 @@
sizeType: ['compressed']
}
const value = await this.chooseImg(options)
self.$refs[`fileChild${self.photoItem.itemIndex}`][0].setTmpValue(value)
self.$refs[`fileChild${self.photoItem.groupIndex}${self.photoItem.itemIndex}`][0].setTmpValue(value)
return
}
// 使用拍照工具拍摄
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment