From c2cb12bcd295512de34023fd3b0943fc8ab75f34 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期二, 19 八月 2025 09:31:41 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 h5/pages/riskReporting/riskReporting.vue |   58 ++++++++++++++++++++--------------------------------------
 1 files changed, 20 insertions(+), 38 deletions(-)

diff --git a/h5/pages/riskReporting/riskReporting.vue b/h5/pages/riskReporting/riskReporting.vue
index c413af3..d20b899 100644
--- a/h5/pages/riskReporting/riskReporting.vue
+++ b/h5/pages/riskReporting/riskReporting.vue
@@ -33,15 +33,17 @@
 				<u--textarea v-model="model.riskInfo" placeholder="璇疯緭鍏ラ闄╂弿杩�" style="margin-top: 15rpx;" maxlength="200" count></u--textarea>
 			</u-form-item>
 			<u-form-item label="涓婁紶鍥剧墖" labelWidth="120" prop="multifileList" labelPosition="top" borderBottom>
-				<u-upload
-				:fileList="model.multifileList"
-				@afterRead="afterRead"
-				@delete="deletePic"
-				name="1"
-				style="margin-top: 15rpx;" />
+				<UploadImage
+					:fileList="model.multifileList"
+					folder="WORKORDER_FILE_PATH"
+					@dele="deletePic"
+					@getFileList="afterRead"
+					style="margin-top: 15rpx;"
+				/>
 			</u-form-item>
 			<u-form-item label="閫氱煡浜�" labelWidth="120" prop="notifier" borderBottom required>
-				<u--input v-model="model.notifier" border="none" placeholder="璇疯緭鍏ラ�氱煡浜�" disabledColor="#ffffff" disabled></u--input>
+				<u--textarea v-model="model.notifier" border="none" placeholder="璇疯緭鍏ラ�氱煡浜�" disabledColor="#ffffff"
+					disabled></u--textarea>
 			</u-form-item>
 		</u--form>
 		<u-button type="primary" text="鎻愪氦" @click="submit" style="margin-top: 60rpx;"></u-button>
@@ -85,9 +87,10 @@
 
 <script>
 	import { mapState } from 'vuex'
+	import UploadImage from '@/components/uploadImage/uploadImage.vue'
 	import pengTree from '@/uni_modules/peng-tree/peng-tree/peng-tree.vue'
 	export default {
-		components: { pengTree },
+		components: { pengTree, UploadImage },
 		computed: {
 			...mapState(['userInfo'])
 		},
@@ -206,20 +209,19 @@
 				}
 			},
 			next() {
-				this.model.name = ''
+				this.canScroll()
+				this.show4 = false
+			},
+			next1() {
 				this.model.submitDate = uni.$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd hh:MM:ss')
-				this.model.companyName = ''
 				this.model.happenTime = ''
 				this.model.localtionId = ''
 				this.model.localtionName = ''
 				this.model.typeId = ''
 				this.model.typeName = ''
 				this.model.riskInfo = ''
-				this.model.notifier = ''
 				this.model.multifileList = []
 				this.model.type = 3
-				this.canScroll()
-				this.show4 = false
 			},
 			toDesc() {
 				uni.navigateTo({
@@ -229,33 +231,12 @@
 				this.show4 = false
 			},
 			// 鍒犻櫎鍥剧墖
-			deletePic(event) {
-				this.model.multifileList.forEach((item, index) => {
-					if (item.imgaddr === event.file.imgaddr) {
-						this.model.multifileList.splice(index, 1)
-					}
-				})
+			deletePic(index) {
+				this.model.multifileList.splice(index, 1)
 			},
 			// 鏂板鍥剧墖
-			async afterRead(event) {
-				var that = this
-				uni.showLoading({ title: '涓婁紶涓�...', mask: true })
-				uni.uploadFile({
-					url: that.$baseUrl + '/web/public/upload',
-					filePath: event.file.url,
-					name: "file",
-					formData: {
-						folder: "WORKORDER_FILE_PATH"
-					},	
-					success: (res) => {
-						uni.hideLoading();
-						let obj = JSON.parse(res.data)
-						if (obj.code === 200) {
-							obj.data.fileurl = obj.data.imgaddr
-							that.model.multifileList.push(obj.data)
-						}
-					}
-				});
+			async afterRead(arr) {
+				this.model.multifileList = [...this.model.multifileList, ...arr]
 			},
 			// 鎻愪氦
 			submit() {
@@ -263,6 +244,7 @@
 				that.$refs.uForm.validate().then(async () => {
 					let res = await that.$u.api.workOrderCreate(that.model)
 					if (res.code === 200) {
+						that.next1()
 						that.id = res.data
 						that.stopScroll()
 						that.show4 = true

--
Gitblit v1.9.3