| | |
| | | @click="productNamePopoverShow(i)"></u-tag> |
| | | </view> |
| | | </view> |
| | | <view class="" |
| | | <view style="display: flex;margin-top: 20rpx;margin-left: 20rpx;" |
| | | v-if="item.isImage"> |
| | | <view style="width: 100px;" |
| | | v-for="(val,index) in item.inspectionJpg" |
| | | :key="index"> |
| | | <u--image :showLoading="true" |
| | | :src="`${BaseUrl}${val}`" |
| | | width="80px" |
| | | height="80px"> |
| | | <view slot="error" |
| | | style="font-size: 24rpx;">加载失败</view> |
| | | </u--image> |
| | | </view> |
| | | </view> |
| | | <view v-else |
| | | style="margin-top: 8rpx;"> |
| | | <u-upload :fileList="item.fileList" |
| | | deletable |
| | |
| | | <script> |
| | | import { BaseUrl } from '@/api/publicInterface.js'; |
| | | import { onlineurl } from '@/api/request.js' |
| | | import backtop from '../../../../../uni_modules/uview-ui/libs/config/props/backtop'; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | isModify: false, |
| | | // 上传图片 |
| | | fileList1: [], |
| | | BaseUrl |
| | | |
| | | }; |
| | | }, |
| | |
| | | ...v, |
| | | modifyProductName: '', |
| | | modifygoodsName: '', |
| | | fileList: [] |
| | | fileList: [], |
| | | inspectionJpg: v.inspectionJpg.split(','), |
| | | isImage: v.inspectionJpg |
| | | } |
| | | }) |
| | | this.showWeighCopy = JSON.parse(JSON.stringify(this.showWeigh)) |
| | |
| | | ...v, |
| | | breed: this.showWeighCopy[i].modifyProductName ? this.showWeighCopy[i].breed : v.breed, |
| | | spec: this.showWeighCopy[i].modifyProductName ? this.showWeighCopy[i].spec : v.spec, |
| | | inspectionJpg: v.fileList.join(',') |
| | | inspectionJpg: v.fileList.map(v => v.url.replace(BaseUrl, '')).join(',') |
| | | |
| | | } |
| | | }) |
| | |
| | | // 删除图片 |
| | | deletePic(event) { |
| | | this.showWeigh[event.name].fileList.splice(event.index, 1); |
| | | // this[`fileList${event.name}`].splice(event.index, 1); |
| | | }, |
| | | // 新增图片 |
| | | async afterRead(event) { |
| | |
| | | name: 'file', |
| | | formData: {}, |
| | | success: res => { |
| | | this.showWeigh[num].fileList.push(JSON.parse(res.data).data.url) |
| | | resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`); |
| | | } |
| | | }); |