| | |
| | | </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" |
| | |
| | | <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> |
| | |
| | | </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> |
| | |
| | | |
| | | <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' |
| | |
| | | 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 = [ |
| | |
| | | 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 } |
| | | } |
| | | |
| | | // 获取状态文本 |
| | |
| | | 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 |
| | | }) |
| | |
| | | } |
| | | 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(() => { |
| | |
| | | .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') |
| | |
| | | } |
| | | } |
| | | .detailTop { |
| | | flex-shrink: 0; |
| | | // #ifdef APP-PLUS |
| | | padding-top: 60rpx; |
| | | // #endif |
| | |
| | | } |
| | | |
| | | .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; |