吉安感知网项目-前端
张含笑
2026-02-04 9ef7060d926cdd1e0c692d8f7ff1dc0ccccca656
uniapps/work-app/src/subPackages/workDetail/index.vue
@@ -104,10 +104,7 @@
<script setup>
// import { getShowImg, getSmallImg } from '@/utils/util'
import {getGddetailedData,backGdApi} from '/src/api/work/index.js'
import dayjs from 'dayjs'
const formatDate = dateString => {
  return dayjs(dateString).format('MM/DD HH:mm')
}
const eventNum = ref('')
// 工单内容
const workDetailData = ref({})
@@ -124,7 +121,33 @@
  }
  const res = await getGddetailedData(params)
  const response = res.data.data
  workDetailData.value = response
  workDetailData.value = {
    "id": "2018864760937254914",
    "resultId": "2017478141446979593",
    "workOrderId": "2018863924349767681",
    "disposeUser": "2017129821759934466",
    "disposeDept": "2018565297651924994",
    "longitude": 113.31,
    "latitude": 23.11,
    "eventStatus": 1,
    "areaCode": "440100",
    "eventNum": "CE20260204095042001",
    "eventLocation": "广东省广州市越秀区白云街道广州大桥西南约185米",
    "shootTime": "2026-01-20 16:04:58",
    "eventImageUrl": "https://wrj.shuixiongit.com/minio/cloud-bucket/78611c83-8fb3-47c9-a18c-0349137bb30c/DJI_202601171733_001_78611c83-8fb3-47c9-a18c-0349137bb30c/DJI_20260117173534_0004_V.jpeg",
    "disposeUserName": "zhx",
    "disposeDeptName": "吉安市政府",
    "distributeUserName": "管理员",
    "distributeDeptName": "吉安市政府",
    "distributeTime": "2026-02-04 09:50:42",
    "createUser": "1123598821738675201",
    "createDept": "2018565297651924994",
    "createTime": "2026-02-04 09:50:42",
    "updateUser": "1123598821738675201",
    "updateTime": "2026-02-04 09:50:42",
    "status": 1,
    "isDeleted": 0
  }
}
// 检查运行环境
const checkEnvironment = () => {
@@ -137,7 +160,7 @@
  isH5.value = true
  // #endif
  console.log('当前环境:', isH5.value ? 'H5' : 'App')
  // console.log('当前环境:', isH5.value ? 'H5' : 'App')
}
// 图片预览
const previewImage = index => {
@@ -155,10 +178,7 @@
    const smallUrl = detail.eventImageUrl
    imageArr.push(smallUrl)
  }
  // if (detail.update_photo_url) {
  //   const smallUrl = detail.update_photo_url
  //   imageArr.push(smallUrl)
  // }
  return imageArr
})
// 跳转地图
@@ -226,7 +246,7 @@
// 复制链接
const copyLink = async () => {
   const shareUrl = 'https://example.com/workDetail?eventNum=' + workDetailData.value.event_num
   const shareUrl = 'http://192.168.1.157:5179/mobile-web-view/work/workDetail/index?workDetailData=' + encodeURIComponent(JSON.stringify(workDetailData.value))
   try {
      await uni.setClipboardData({
         data: shareUrl,
@@ -276,7 +296,7 @@
         type: 0,
         title: workDetailData.value.event_name || '工单详情',
         summary: '查看工单详情',
         href: 'https://example.com/workDetail?eventNum=' + workDetailData.value.event_num,
         href: 'http://192.168.1.157:5179/mobile-web-view/work/workDetail/index?workDetailData=' + encodeURIComponent(JSON.stringify(workDetailData.value)) ,
         imageUrl: workDetailData.value.eventImageUrl,
         success: () => {
            uni.showToast({ title: '分享成功', icon: 'success' })