| | |
| | | if (this.uploadList !== val) { |
| | | this.uploadList = this.getUploadList(val) |
| | | this.fileList = this.getUploadList(val) |
| | | console.log(this.fileList,'this.fileList this.fileList') |
| | | this.$emit('getUploaderImg',this.fileList) |
| | | } |
| | | }, |
| | | isShowCrop(value) { |
| | |
| | | <el-table-column align="left"> |
| | | <template slot-scope="scope"> |
| | | <zt-uploader :image="image" v-model="dataForm[scope.row.busiField]" multiple :limit="scope.row.fileLimit" :file-type="scope.row.fileType" |
| | | :accept="scope.row.accept" :file-size="scope.row.fileSize" @input="change(scope.row.busiField)"/> |
| | | :accept="scope.row.accept" :file-size="scope.row.fileSize" @getUploaderImg="getUploaderImg" @input="change(scope.row.busiField)"/> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | return null |
| | | }, |
| | | change(busiField) { |
| | | console.log(busiField,'busiField busiField') |
| | | this.fields.forEach(field => { |
| | | if (field.busiField === busiField) { |
| | | field.files.length = 0 |
| | | this.dataForm[busiField].forEach(file => field.files.push(file)) |
| | | } |
| | | }) |
| | | }, |
| | | getUploaderImg(list){ |
| | | // this.imageList = list |
| | | if(list[0].url){ |
| | | this.$emit('getImageUrl',list[0].url) |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | <div :style="'height:'+ (151+image.height)+'px'" class="el-wt-border-left"> |
| | | <span>{{dataForm.environ.testEnvirontDiagram}}</span> |
| | | <config-uploader busi-type="test_environt_diagram" model-name="dataForm" :dataForm="dataForm" |
| | | @getImageUrl="getImageUrl" |
| | | v-model="dataForm.files"/> |
| | | <div> |
| | | <!-- <el-image :src="dataForm.imgUrl" :width="" :height=""></el-image>--> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | data() { |
| | | return { |
| | | image: { |
| | | url:'', |
| | | width:'', |
| | | height:1, |
| | | }, |
| | | dataForm: { |
| | |
| | | addDiscrepancyRow(){ |
| | | this.dataForm.environAnalysisList.push({}) |
| | | }, |
| | | getImageUrl(url){ |
| | | this.image.url = url |
| | | console.log(this.image.url,' this.image.url') |
| | | }, |
| | | // 表单提交 |
| | | async formSubmit() { |
| | | let res = await this.$http[!this.dataForm.id ? 'post' : 'put']('/project/Environ/', this.dataForm) |