From 1d552a3bad95caae4af15322df28e6240b797693 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Thu, 13 Aug 2026 15:32:06 +0800
Subject: [PATCH] feat: app视频封面图
---
uniapps/work-app/src/subPackages/workDetail/index.vue | 63 ++++++++++++++++++++++---------
1 files changed, 44 insertions(+), 19 deletions(-)
diff --git a/uniapps/work-app/src/subPackages/workDetail/index.vue b/uniapps/work-app/src/subPackages/workDetail/index.vue
index e393afb..dd1fa26 100644
--- a/uniapps/work-app/src/subPackages/workDetail/index.vue
+++ b/uniapps/work-app/src/subPackages/workDetail/index.vue
@@ -39,7 +39,7 @@
</div>
<div class="orderRow">
<div class="rowTitle">工单状态</div>
- <template v-if="[1, 3].includes(workDetailData.eventStatus)">
+ <!-- <template v-if="[1, 3].includes(workDetailData.eventStatus)">
<picker
mode="selector"
:range="statusOptions"
@@ -53,8 +53,8 @@
<text class="picker-arrow">▼</text>
</div>
</picker>
- </template>
- <div v-else>{{ getStatusLabel(workDetailData.eventStatus) }}</div>
+ </template> -->
+ <div>{{ getStatusLabel(workDetailData.eventStatus) }}</div>
</div>
<div class="orderRow">
<div class="rowTitle">工单处置人</div>
@@ -83,7 +83,12 @@
</div>
<div class="orderRow">
<div class="rowTitle">工单位置</div>
- <div class="rowAddress" @click="jumpMap(workDetailData)">{{ workDetailData.eventLocation }}</div>
+ <div class="" v-if="workDetailData.attachmentType == 3">
+ {{ workDetailData.areaCode }}
+ </div>
+ <div v-else class="rowAddress" @click="jumpMap(workDetailData)">
+ {{ workDetailData.eventLocation }}
+ </div>
</div>
</div>
</div>
@@ -160,7 +165,7 @@
<script setup>
// import { getShowImg, getSmallImg } from '@/utils/util'
-import { getGddetailedData, backGdApi, shareCacheApi, updateStatus } from '/src/api/work/index.js'
+import { getGddetailedData, backGdApi, shareCacheApi, updateStatus, addDisposeRecord } from '/src/api/work/index.js'
import { getWebViewUrl } from '@/utils/index.js'
import WebViewPlus from '@/components/WebViewPlus.vue'
import { onShow } from '@dcloudio/uni-app'
@@ -175,7 +180,7 @@
const showCompleteModal = ref(false)
const completeContent = ref('')
const completing = ref(false)
-const AI_IMG_CACHE_KEY_PREFIX = 'work-detail-ai-img-'
+const PREVIEW_IMG_CACHE_KEY_PREFIX = 'work-detail-ai-img-'
// 状态选项列表
const statusOptions = [
@@ -194,28 +199,30 @@
return option?.name || ''
})
+// 页面加载时读取预览图缓存
onLoad(async options => {
eventNum.value = options.id
- const aiImgCacheKey = `${AI_IMG_CACHE_KEY_PREFIX}${options.id}`
- const aiImg = uni.getStorageSync(aiImgCacheKey)
- uni.removeStorageSync(aiImgCacheKey)
- await getDataList(options.id, aiImg)
+ const previewImgCacheKey = `${PREVIEW_IMG_CACHE_KEY_PREFIX}${options.id}`
+ const previewUrl = uni.getStorageSync(previewImgCacheKey)
+ uni.removeStorageSync(previewImgCacheKey)
+ await getDataList(options.id, previewUrl)
checkEnvironment()
viewUrl.value = getWebViewUrl('/workDetail', { workDetailData: JSON.stringify(workDetailData.value) })
})
+// 页面显示时刷新工单详情
onShow(() => {
getDataList(eventNum.value)
})
-// 获取工单详情并保留 AI 图片
-const getDataList = async (val, aiImg) => {
+// 获取工单详情并保留预览原图
+const getDataList = async (val, previewUrl) => {
const params = {
id: val,
}
const res = await getGddetailedData(params)
const response = res.data.data
- workDetailData.value = { ...response, aiImg: aiImg || workDetailData.value.aiImg }
+ workDetailData.value = { ...response, previewUrl: previewUrl || workDetailData.value.previewUrl }
}
// 获取状态文本
@@ -294,11 +301,12 @@
current: currentIndex,
})
}
+// 获取详情预览图片列表
const getImageList = computed(() => {
const imageArr = []
const detail = workDetailData.value
if (detail.eventImageUrl) {
- imageArr.push(detail.aiImg || detail.eventImageUrl)
+ imageArr.push(detail.previewUrl || detail.eventImageUrl)
}
return imageArr
})
@@ -400,10 +408,18 @@
}
completing.value = true
try {
- await updateStatus({
+ // await updateStatus({
+ // eventId: workDetailData.value.id,
+ // targetStatus: 4,
+ // operateContent,
+ // })
+ await addDisposeRecord({
eventId: workDetailData.value.id,
- targetStatus: 4,
- operateContent,
+ disposeContent: operateContent,
+ recordType: 1,
+ targetEventStatus: 4,
+ updateEventStatus: true,
+ // attachUrl: ''
})
uni.showToast({ title: '操作成功', icon: 'success' })
setTimeout(() => {
@@ -538,6 +554,11 @@
.workDetailContainer {
// 添加导航栏高度的padding-top,避免内容被遮挡
padding-top: 88rpx;
+ height: 100vh;
+ box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
:deep() {
.u-navbar__content {
background: url('https://wrj.shuixiongit.com/aiskyminio/cloud-bucket/ztzf_app_assets/images/user/bg.png')
@@ -565,6 +586,7 @@
}
}
.detailTop {
+ flex-shrink: 0;
// #ifdef APP-PLUS
padding-top: 60rpx;
// #endif
@@ -600,12 +622,15 @@
}
.worderContainer {
+ flex: 1;
+ min-height: 0;
padding: 0 24rpx;
padding-bottom: 4rpx;
background: #f6f6f6;
margin-top: 20rpx;
- height: calc(100vh - 530rpx);
- overflow: auto;
+ overflow-y: auto;
+ overflow-x: hidden;
+ -webkit-overflow-scrolling: touch;
}
.workOrderContent {
margin-top: 30epx;
--
Gitblit v1.9.3