吉安感知网项目-前端
张含笑
2026-01-23 d4930b89571906ae723e882ce43f3451dc4a404f
feat:退回
2 files modified
29 ■■■■■ changed files
uniapps/work-app/src/api/work/index1.js 8 ●●●●● patch | view | raw | blame | history
uniapps/work-app/src/subPackages/workDetail/index.vue 21 ●●●● patch | view | raw | blame | history
uniapps/work-app/src/api/work/index1.js
@@ -48,3 +48,11 @@
    params,
  })
}
// 退回工单
export const backGdApi = (data) => {
  return request({
    url: '/drone-gd/workOrder/gdClueEvent/reject',
    method: 'post',
    data,
  })
}
uniapps/work-app/src/subPackages/workDetail/index.vue
@@ -45,12 +45,6 @@
                    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>
@@ -98,7 +92,7 @@
    <!-- 操作按钮 -->
    <div class="actionButton">
      <div class="btngroups">
        <up-button type="primary" color="#AEAEAE" text="退回"></up-button>
        <up-button type="primary" color="#AEAEAE" text="退回" @click="rejectTicket"></up-button>
        <up-button type="primary" color="#1D6FE9" text="确认"></up-button>
      </div>
    </div>
@@ -108,7 +102,7 @@
<script setup>
// import { getShowImg, getSmallImg } from '@/utils/util'
import { ref, computed } from 'vue'
import {getGddetailedData} from '/src/api/work/index1.js'
import {getGddetailedData,backGdApi} from '/src/api/work/index1.js'
import dayjs from 'dayjs'
const formatDate = dateString => {
  return dayjs(dateString).format('MM/DD HH:mm')
@@ -129,10 +123,8 @@
  workDetailData.value = response
  console.log('详情', workDetailData.value)
}
// 图片预览
const previewImage = index => {
  if (getImageList.value.length === 0) return
  const currentIndex = typeof index === 'number' ? index : 0
@@ -160,6 +152,15 @@
    url: `/subPackages/workDetail/mapWork/index?eventNum=${item.event_num}`,
  })
}
// 退回
const rejectTicket = () => {
  const id = workDetailData.value.id
  backGdApi({eventId : id}).then(res => {
    uni.showToast({
      title: '退回成功',
      icon: 'success',
    })
  })
// 分享模态框状态
const showShareModal = ref(false)