From ebd0ec4f51288042b6fc5bf714b1febbb63cfacc Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Fri, 09 Jan 2026 18:03:49 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 uniapps/work-app/src/subPackages/workDetail/index.vue |  322 ++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 268 insertions(+), 54 deletions(-)

diff --git a/uniapps/work-app/src/subPackages/workDetail/index.vue b/uniapps/work-app/src/subPackages/workDetail/index.vue
index 8adecf1..fcd14bd 100644
--- a/uniapps/work-app/src/subPackages/workDetail/index.vue
+++ b/uniapps/work-app/src/subPackages/workDetail/index.vue
@@ -1,68 +1,282 @@
-<!-- 工单详情 - 包含待审核、待处理、处理中、已完成 -->
+<!-- 工单详情 -->
 <template>
   <div class="workDetailContainer">
-    <WebViewPlus
-      ref="sWebViewRef"
-      :src="`${viewUrl}`"
-      @webMessage="onPostMessage"
-    />
+    <div class="detailTop">
+      <div class="image-container">
+        <u-swiper
+          class="detailImage"
+          :list="getImageList"
+          mode="round"
+          indicator
+          indicatorMode="dot"
+          indicatorActiveColor="#4C85FF"
+          indicatorInactiveColor="#fff"
+          indicatorPosition="center"
+          height="410rpx"
+          @click="previewImage"
+        ></u-swiper>
+        <!--				<div class="detailTitle">-->
+        <!--					<div class="titleText">-->
+        <!--						<div class="itemName">{{workDetailData.event_name}}</div>-->
+        <!--						<div class="itemTime">{{formatDate(workDetailData.create_time)}}</div>-->
+        <!--					</div>-->
+        <!--				</div>-->
+      </div>
+    </div>
+
+    <!-- 工单内容 -->
+    <div class="worderContainer">
+      <div class="workOrderContent">
+        <div class="workOrderTitle">工单内容</div>
+        <div class="workOrderContainer">
+          <div class="orderRow">
+            <div class="rowTitle">工单编号</div>
+            <div>{{workDetailData.event_num}}</div>
+          </div>
+          <div class="orderRow">
+            <div class="rowTitle">工单处置人</div>
+            <div>{{workDetailData.event_num?.slice(0, 2) === 'AI' ? 'AI 小飞':workDetailData.creator}}
+            </div>
+          </div>
+          <div class="orderRow">
+            <div class="rowTitle">处置部门</div>
+            <div>{{ workDetailData.dept_name }}</div>
+          </div>
+          <div class="orderRow">
+            <div class="rowTitle">拍摄时间</div>
+            <div>{{ workDetailData.create_time }}</div>
+          </div>
+          <div class="orderRow">
+            <div class="rowTitle">分发人员</div>
+            <div>{{ workDetailData.remark }}</div>
+          </div>
+          <div class="orderRow">
+            <div class="rowTitle">分发部门</div>
+            <div>{{ workDetailData.remark }}</div>
+          </div>
+
+          <div class="orderRow">
+            <div class="rowTitle">分发时间</div>
+            <div>{{ workDetailData.create_time }}</div>
+          </div>
+          <div class="orderRow">
+            <div class="rowTitle">工单位置</div>
+            <div class="rowAddress" @click="jumpMap(workDetailData)">{{ workDetailData.address }}</div>
+          </div>
+        </div>
+      </div>
+
+    </div>
+    <!-- 操作按钮 -->
+    <div class="actionButton">
+      <div class="btngroups" >
+        <up-button type="primary" color="#AEAEAE" text="退回"></up-button>
+        <up-button type="primary" color="#1D6FE9" text="确认"></up-button>
+      </div>
+    </div>
   </div>
+
 </template>
 
 <script setup>
-import { getWebViewUrl } from "@/utils/index.js";
-import { onLoad } from "@dcloudio/uni-app";
-import { useUserStore } from "@/store/index.js";
-const userStore = useUserStore();
-const userInfo = userStore.userInfo;
-const sWebViewRef = ref(null);
-const viewUrl = ref("");
-onLoad((options) => {
-  const eventNum = options.eventNum;
-  viewUrl.value = getWebViewUrl("/workDetail", {
-    eventNum: eventNum,
-    totalNum: options.totalNum,
-    keyword: options.keyword,
-    aiType: options.aiType,
-    wLJobInfoId: options.wLJobInfoId,
-    status: options.status,
-    current: options.current,
-  });
+// import { getShowImg, getSmallImg } from '@/utils/util'
+import {getList,flowEvent} 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({})
+onLoad(async (options) => {
+  eventNum.value = options.eventNum;
+  await getDataList(eventNum.value);
+
 });
-
-function onPostMessage(data) {
-  if (data.type === "workback") {
-    // #ifdef MP-WEIXIN
-    if ("fun" in data && data.fun === "add") {
-      uni.setStorageSync("joinParams", {
-        type: "add",
-      });
-    }
-    // #endif
-
-    // #ifndef MP-WEIXIN
-    uni.setStorageSync("joinParams", {
-      type: "add",
-    });
-    uni.switchTab({
-      url: `/pages/work/index?addLog=111`,
-      // url: '/pages/work/index'
-    });
-    // #endif
-  } else if (data.type === "jumpMapNav") {
-    // #ifndef MP-WEIXIN
-    uni.navigateTo({
-      url: `/subPackages/workDetail/mapWork/index?currentItem=${data.eventNum}`,
-    });
-    // #endif
+const getDataList = async (val) => {
+  const params = {
+    current: 1,
+    size: 9999,
+    source: 1,
+    event_name: val
   }
+  const res = await getList(params);
+  const response = res.data.data.records;
+  workDetailData.value = response[0];
+
+  console.log('详情',response);
+}
+// 图片预览
+
+const previewImage = (index) => {
+  if (getImageList.value.length === 0) return;
+  const currentIndex = typeof index === 'number' ? index : 0;
+  uni.previewImage({
+    urls: getImageList.value,
+    current: currentIndex
+  });
+};
+const getImageList =computed(()=>{
+  const imageArr = []
+  const detail = workDetailData.value
+  if (detail.photo_url) {
+    const smallUrl = detail.photo_url
+    imageArr.push(smallUrl)
+  }
+  if (detail.update_photo_url) {
+    const smallUrl =detail.update_photo_url
+    imageArr.push(smallUrl)
+  }
+  return imageArr
+})
+// 跳转地图
+const jumpMap = item => {
+  uni.navigateTo({
+    url: `/subPackages/workDetail/mapWork/index?eventNum=${item.event_num}`,
+  })
 }
 </script>
-
 <style lang="scss" scoped>
 .workDetailContainer {
-  width: 100%;
-  height: 100%;
-  background-size: cover;
+  .detailTop {
+    .image-container {
+      position: relative;
+      width: 100%;
+      height: 410rpx;
+
+      .detailImage {
+        width: 100%;
+        height: 100%;
+        display: block;
+        object-fit: cover;
+      }
+      // 轮播图容器
+      :deep(.u-swiper) {
+        // 指示器容器 - 修改为居中对齐
+        .u-swiper__indicator {
+          position: absolute;
+          left: 50%;
+          transform: translateX(-50%);
+          bottom: 20rpx;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          z-index: 10;
+
+        }
+        .u-swiper-indicator__wrapper__dot--active{
+          width: 5px !important;
+        }
+      }
+      .detailTitle {
+        position: absolute;
+        left: 0;
+        top: 0;
+        width: 100%;
+        height: 60rpx;
+        line-height: 60rpx;
+        background: rgba(7, 7, 7, 0.4);
+
+      }
+
+      .titleText {
+        display: flex;
+        width: 100%;
+        justify-content: space-between;
+        align-items: center;
+        color: #fff;
+
+        .itemName, .itemTime {
+          font-family: Source Han Sans CN, Source Han Sans CN;
+          font-weight: 400;
+          font-size: 28rpx;
+          color: #FFFFFF;
+        }
+        .itemName {
+          padding-left: 20rpx;
+        }
+        .itemTime{
+          padding-right: 20rpx;
+        }
+      }
+    }
+  }
+
+  .worderContainer {
+    padding: 0 24rpx;
+    padding-bottom: 4rpx;
+    background: #f6f6f6;
+    margin-top: 20rpx;
+  }
+  .workOrderContent {
+    margin-top: 30epx;
+    background-color: #fff;
+    border-radius: 12rpx;
+    padding: 20rpx;
+    margin-bottom: 34rpx;
+    .workOrderTitle {
+      font-family: Source Han Sans CN, Source Han Sans CN;
+      font-weight: bold;
+      font-size: 32rpx;
+      color: #222324;
+    }
+    .workOrderContainer {
+      .orderRow {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        min-height: 96rpx;
+        border-bottom: 1px solid #f5f5f5;
+        color: #7b7b7b;
+        .rowTitle {
+          font-family: Source Han Sans CN, Source Han Sans CN;
+          font-weight: 400;
+          font-size: 30rpx;
+          color: #222324;
+          white-space: nowrap;
+
+        }
+        .rowAddress {
+          font-family: Source Han Sans CN, Source Han Sans CN;
+          font-weight: 400;
+          font-size: 28rpx;
+          color: #1D6FE9;
+          //white-space: nowrap;
+          ///* 禁止换行 */
+          //overflow: hidden;
+          //text-overflow: ellipsis;
+          // max-width: 74%;
+          padding-top: 1px;
+          padding-left: 5px;
+          padding-right: 2px;
+        }
+      }
+    }
+  }
+
+  .actionButton {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 61px;
+
+    border-radius: 6px 6px 6px 6px;
+
+    .btngroups {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      :deep(.u-button){
+        width: 276rpx !important;
+        height: 100rpx !important;
+        &:last-child {
+          margin-left: 30rpx;
+        }
+      }
+
+    }
+  }
 }
 </style>

--
Gitblit v1.9.3