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/workOrder_dca/workOrder_dca.vue | 86 ++++++++++++------------------------------
1 files changed, 25 insertions(+), 61 deletions(-)
diff --git a/h5/pages/workOrder_dca/workOrder_dca.vue b/h5/pages/workOrder_dca/workOrder_dca.vue
index abaa3f4..d734612 100644
--- a/h5/pages/workOrder_dca/workOrder_dca.vue
+++ b/h5/pages/workOrder_dca/workOrder_dca.vue
@@ -76,11 +76,13 @@
</view>
</view>
</view>
- <view style="width: 100%; height: calc(84rpx + env(safe-area-inset-bottom));"></view>
- <view class="footer">
- <view class="footer_btn" :style="info.passOnButton === 0 ? 'background-color: #3875C5; color: #ffffff;' : ''" @click="openGB" v-if="info.closeButton === 1">闂鍏抽棴</view>
- <view class="footer_btn" style="background-color: #3875C5; color: #ffffff;" @click="openFP" v-if="info.passOnButton === 1">浠诲姟鍒嗛厤</view>
- </view>
+ <template v-if="info.closeButton === 1 || info.passOnButton === 1">
+ <view style="width: 100%; height: calc(84rpx + env(safe-area-inset-bottom));"></view>
+ <view class="footer">
+ <view class="footer_btn" :style="info.passOnButton === 0 ? 'background-color: #3875C5; color: #ffffff;' : ''" @click="openGB" v-if="info.closeButton === 1">闂鍏抽棴</view>
+ <view class="footer_btn" style="background-color: #3875C5; color: #ffffff;" @click="openFP" v-if="info.passOnButton === 1">浠诲姟鍒嗛厤</view>
+ </view>
+ </template>
<!-- 浠诲姟鍒嗛厤 -->
<u-popup :show="show" :round="10" mode="bottom">
<view class="fp">
@@ -100,13 +102,13 @@
maxlength="200" count></u--textarea>
</u-form-item>
<u-form-item label="涓婁紶鍥剧墖" labelWidth="80" prop="multifileList" labelPosition="top">
- <u-upload
+ <UploadImage
:fileList="model.multifileList"
- @afterRead="afterRead"
- @delete="deletePic"
- name="2"
- multiple
- style="margin-top: 15rpx;" />
+ folder="WORKORDER_LOG_FILE_PATH"
+ @dele="deletePic"
+ @getFileList="afterRead"
+ style="margin-top: 15rpx;"
+ />
</u-form-item>
</u--form>
</view>
@@ -126,13 +128,13 @@
maxlength="200" count></u--textarea>
</u-form-item>
<u-form-item label="涓婁紶鍥剧墖" labelWidth="120" prop="multifileList" labelPosition="top" required>
- <u-upload
+ <UploadImage
:fileList="model.multifileList"
- @afterRead="afterRead"
- @delete="deletePic"
- name="1"
- multiple
- style="margin-top: 15rpx;" />
+ folder="WORKORDER_LOG_FILE_PATH"
+ @dele="deletePic"
+ @getFileList="afterRead"
+ style="margin-top: 15rpx;"
+ />
</u-form-item>
</u--form>
</view>
@@ -142,7 +144,9 @@
</template>
<script>
+ import UploadImage from '@/components/uploadImage/uploadImage.vue'
export default {
+ components: { UploadImage },
data() {
return {
id: null,
@@ -289,52 +293,12 @@
}
},
// 鍒犻櫎鍥剧墖
- 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)
},
// 鏂板鍥剧墖
- afterRead(event) {
- var that = this
- uni.showLoading({ title: '涓婁紶涓�...', mask: true })
- uni.uploadFile({
- url: this.$baseUrl + '/web/public/uploadBatch',
- files: event.file.map(e => {
- return { name: 'files', uri: e.url }
- }),
- formData: {
- folder: "WORKORDER_LOG_FILE_PATH",
- },
- success(res) {
- uni.hideLoading();
- let obj = JSON.parse(res.data)
- if (obj.code === 200) {
- 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_LOG_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)
- // }
- // }
- // });
+ afterRead(arr) {
+ this.model.multifileList = [...this.model.multifileList, ...arr]
}
}
}
--
Gitblit v1.9.3