From 05db93c48c69b1fc5db8bb2fce4c37014e92e450 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期二, 19 八月 2025 10:01:30 +0800
Subject: [PATCH] 代码初始化
---
h5/pages/workOrder_dca/workOrder_dca.vue | 97 ++++++++++++++++++++++++++----------------------
1 files changed, 52 insertions(+), 45 deletions(-)
diff --git a/h5/pages/workOrder_dca/workOrder_dca.vue b/h5/pages/workOrder_dca/workOrder_dca.vue
index 485b5ae..d734612 100644
--- a/h5/pages/workOrder_dca/workOrder_dca.vue
+++ b/h5/pages/workOrder_dca/workOrder_dca.vue
@@ -2,6 +2,7 @@
<view class="dca" v-if="info">
<view class="dca_head">
<text>浠诲姟{{returnStatus(info.status)}}</text>
+ <text>宸ュ崟鍙凤細{{info.code}}</text>
</view>
<u-gap height="5" bgColor="#EFEFEF"></u-gap>
<view class="dca_list">
@@ -16,7 +17,7 @@
<view class="dca_list_item" style="flex-direction: column;">
<view class="dca_list_item_label">鍥剧墖</view>
<view class="dca_list_item_tu" v-if="info.multifileList">
- <view class="dca_list_item_tu_item" v-for="(item, index) in info.multifileList" :key="index">
+ <view class="dca_list_item_tu_item" v-for="(item, index) in info.multifileList" :key="index" @click="previewImage(item.fileurlFull, info.multifileList.map(item => item.fileurlFull))">
<image :src="item.fileurlFull" mode="widthFix"></image>
</view>
<view class="dca_list_item_tu_zw"></view>
@@ -32,7 +33,7 @@
<view class="lc">
<view class="lc_item" v-for="(item, index) in info.logList" :key="index">
<view class="lc_item_dian"></view>
- <view class="lc_item_xian" v-if="info.logList.length === 1 ? false : index === 0"></view>
+ <view class="lc_item_xian" v-if="info.logList.length === 1 ? false : index !== info.logList.length - 1"></view>
<view class="lc_item_title">{{item.title}}</view>
<view class="lc_item_info">{{item.companyName}}/{{item.userName}} {{item.createDate}}</view>
<view class="lc_item_content" v-if="![0,4].includes(item.objType)">
@@ -52,8 +53,8 @@
<view class="lc_item_content_item">
<view class="lc_item_content_item_label">鍥剧墖锛�</view>
<view class="lc_item_content_item_img" v-if="item.multifileList">
- <view class="image" v-for="(item, index) in item.multifileList" :key="index">
- <image :src="item.fileurlFull" mode="widthFix"></image>
+ <view class="image" v-for="(child, index) in item.multifileList" :key="index" @click="previewImage(child.fileurlFull, item.multifileList.map(item => item.fileurlFull))">
+ <image :src="child.fileurlFull" mode="widthFix"></image>
</view>
<view class="imagezw"></view>
<view class="imagezw"></view>
@@ -65,7 +66,7 @@
</view>
<view class="lc_item_content" v-else-if="item.objType === 4">
<view class="lc_item_content_item">
- <view class="lc_item_content_item_label">宸插偓淇冿細</view>
+ <!-- <view class="lc_item_content_item_label">宸插偓淇冿細</view> -->
<view class="lc_item_content_item_val">
<text>{{item.content}}</text>
</view>
@@ -75,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">
@@ -99,12 +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"
- style="margin-top: 15rpx;" />
+ folder="WORKORDER_LOG_FILE_PATH"
+ @dele="deletePic"
+ @getFileList="afterRead"
+ style="margin-top: 15rpx;"
+ />
</u-form-item>
</u--form>
</view>
@@ -124,12 +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"
- style="margin-top: 15rpx;" />
+ folder="WORKORDER_LOG_FILE_PATH"
+ @dele="deletePic"
+ @getFileList="afterRead"
+ style="margin-top: 15rpx;"
+ />
</u-form-item>
</u--form>
</view>
@@ -139,7 +144,9 @@
</template>
<script>
+ import UploadImage from '@/components/uploadImage/uploadImage.vue'
export default {
+ components: { UploadImage },
data() {
return {
id: null,
@@ -183,6 +190,21 @@
this.getDetails()
},
methods: {
+ // 宸ュ崟鍌績
+ async urge() {
+ let res = await this.$u.api.urge({ workorderId: this.info.id })
+ if (res.code === 200) {
+ uni.showToast({ title: '鍌績鎴愬姛', icon: 'none' })
+ this.getDetails()
+ this.show2 = false
+ }
+ },
+ previewImage(current, urls) {
+ uni.previewImage({
+ current,
+ urls
+ });
+ },
closeGB() {
this.canScroll()
this.show1 = false
@@ -209,8 +231,8 @@
}).then(res =>{
console.log(res)
if (res.errCode === 0) {
- this.model.passOnUserName = res.result.userList.map(item => item.name)
- this.model.passOnUserId = res.result.userList.map(item => item.id)
+ this.model.passOnUserName = res.result.userList.map(item => item.name).join(',')
+ this.model.passOnUserId = res.result.userList.map(item => item.id).join(',')
}
})
},
@@ -222,11 +244,13 @@
info: that.model.info,
passOnUserId: that.model.passOnUserId,
multifileList: that.model.multifileList,
- workorderId: that.info.id
+ workorderId: that.info.id,
+ passOnType: this.info.status
})
if (res.code === 200) {
uni.showToast({ title: '鎿嶄綔鎴愬姛', icon: 'none' })
that.canScroll()
+ uni.$emit('update')
that.show = false
that.getDetails()
}
@@ -251,6 +275,7 @@
workorderId: that.info.id
})
if (res.code === 200) {
+ uni.$emit('update')
uni.showToast({ title: '鎿嶄綔鎴愬姛', icon: 'none' })
that.canScroll()
that.show1 = false
@@ -268,30 +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) {
- 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