zhangback
2025-12-17 e3aa75fc78f6561e3315f4a11789a4f09fdaea57
ui/car_wx_app/pages/examine/index.vue
@@ -352,6 +352,8 @@
</template>
<script>
import {uploadImage} from "@/common/upload";
function groupBy(array, key){
  return array.reduce((acc, item) => {
    const groupKey = String(item[key]);
@@ -893,10 +895,15 @@
        sizeType: ['original', 'compressed'],
        sourceType: ['album', 'camera'],
        success: (res) => {
          const tempFilePaths = res.tempFilePaths;
          const imgUrl = tempFilePaths[0];
          uploadImage(imgUrl).then(res2=>{
            this.uploadAreas[index].imageUrl = res.url;
            // const tempFilePath = res.tempFilePaths[0];
            // // 上传图片到服务器
            // this.uploadAreaPic(tempFilePath, index);
          })
          const tempFilePath = res.tempFilePaths[0];
          // 上传图片到服务器
          this.uploadAreaPic(tempFilePath, index);
        }
      });
    },
@@ -957,7 +964,7 @@
          // 验证是否至少上传了一张图片
          // 收集所有上传的图片地址(用逗号分隔)
          const voucherUrls = this.uploadAreas.map(item => item.imageUrl && item.imageUrl !== '').join(',');
          const voucherUrls = this.uploadAreas.filter(item => item.imageUrl!=='').map(item => item.imageUrl).join(',');
          this.form.voucherUrl = voucherUrls;
          this.$refs.uForm.validate().then(res => {