qingyiay
2023-07-12 905afa72079ff4948534bd96b9b7866b20291825
pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail.vue
@@ -116,7 +116,21 @@
                  @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
@@ -162,6 +176,7 @@
<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 {
@@ -190,6 +205,7 @@
            isModify: false,
            // 上传图片
            fileList1: [],
            BaseUrl
         };
      },
@@ -220,7 +236,9 @@
                        ...v,
                        modifyProductName: '',
                        modifygoodsName: '',
                        fileList: []
                        fileList: [],
                        inspectionJpg: v.inspectionJpg.split(','),
                        isImage: v.inspectionJpg
                     }
                  })
                  this.showWeighCopy = JSON.parse(JSON.stringify(this.showWeigh))
@@ -276,7 +294,7 @@
                  ...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(',')
               }
            })
@@ -337,7 +355,6 @@
         // 删除图片
         deletePic(event) {
            this.showWeigh[event.name].fileList.splice(event.index, 1);
            // this[`fileList${event.name}`].splice(event.index, 1);
         },
         // 新增图片
         async afterRead(event) {
@@ -374,7 +391,6 @@
                  name: 'file',
                  formData: {},
                  success: res => {
                     this.showWeigh[num].fileList.push(JSON.parse(res.data).data.url)
                     resolve(`${BaseUrl}${JSON.parse(res.data).data.url}`);
                  }
               });