From 015b4f31cebbecf6f6da760ed2f8af3da721e802 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 18 四月 2025 16:17:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
h5/pages/report_dca/report_dca.vue | 58 +++++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 49 insertions(+), 9 deletions(-)
diff --git a/h5/pages/report_dca/report_dca.vue b/h5/pages/report_dca/report_dca.vue
index 4a3cc72..0c857ff 100644
--- a/h5/pages/report_dca/report_dca.vue
+++ b/h5/pages/report_dca/report_dca.vue
@@ -37,6 +37,7 @@
:fileList="model.multifileList"
@afterRead="afterRead"
@delete="deletePic"
+ multiple
name="1"
style="margin-top: 15rpx;" />
</u-form-item>
@@ -189,6 +190,19 @@
this.show2 = false
},
next() {
+ this.model.submitDate = ''
+ this.model.happenTime = ''
+ this.model.companyName = ''
+ this.model.localtionName = ''
+ this.model.localtionId = ''
+ this.model.typeId = ''
+ this.model.typeName = ''
+ this.model.notifier = ''
+ this.model.dcaYesNum = 0
+ this.model.dcaNoNum = 0
+ this.model.dcaNoProblemDTOList = []
+ this.model.multifileList = []
+ this.model.type = 1
this.canScroll()
this.show6 = false
},
@@ -264,24 +278,50 @@
},
// 鏂板鍥剧墖
async afterRead(event) {
+ var that = this
+ uni.showLoading({ title: '涓婁紶涓�...', mask: true })
uni.uploadFile({
- url: this.$baseUrl + '/web/public/upload',
- filePath: event.file.url,
- name: "file",
+ url: this.$baseUrl + '/web/public/uploadBatch',
+ files: event.file.map(e => {
+ return { name: 'files', uri: e.url }
+ }),
formData: {
- folder: "WORKORDER_FILE_PATH"
- },
- success: (res) => {
+ folder: "WORKORDER_FILE_PATH",
+ },
+ success(res) {
+ uni.hideLoading();
let obj = JSON.parse(res.data)
if (obj.code === 200) {
- obj.data.fileurl = obj.data.imgaddr
- this.model.multifileList.push(obj.data)
+ console.log(obj.data)
+ obj.data.forEach(item => {
+ item.fileurl = item.imgaddr
+ })
+ that.model.multifileList = [...that.model.multifileList, ...obj.data]
}
}
- });
+ })
+ // uni.uploadFile({
+ // url: this.$baseUrl + '/web/public/upload',
+ // filePath: event.file.url,
+ // name: "file",
+ // formData: {
+ // folder: "WORKORDER_FILE_PATH"
+ // },
+ // success: (res) => {
+ // let obj = JSON.parse(res.data)
+ // if (obj.code === 200) {
+ // obj.data.fileurl = obj.data.imgaddr
+ // this.model.multifileList.push(obj.data)
+ // }
+ // }
+ // });
},
submit() {
this.$refs.uForm.validate().then(res => {
+ if (this.total === 0) return uni.showToast({
+ title: '璇烽�夋嫨瑙傚療椤�',
+ icon: 'none'
+ })
this.show4 = true
}).catch(errors => {
--
Gitblit v1.9.3