张含笑
2025-10-13 3d08674227b35c1dee6dbd26a3e011bbfaf1dddf
src/subPackages/workDetail/index.vue
@@ -36,10 +36,11 @@
      <div class="workOrderContent">
         <div class="workOrderTitle">工单内容</div>
         <div class="workOrderContainer">
            <div>工单名称:{{workDetailData.event_name}}</div>
            <div>工单类型:{{workDetailData.$type}}</div>
            <div>工单类型:{{workDetailData.type}}</div>
            <div>关联任务:{{workDetailData.job_name}}</div>
            <div>工单创建人:{{workDetailData.creator}}</div>
            <div>工单创建人:{{workDetailData.event_num?.slice(0, 2) === 'AI' ? 'AI 小飞':workDetailData.creator}}</div>
            <div>事件地址:{{workDetailData.address}}</div>
            <div>关联算法:{{workDetailData.ai_types}}</div>
            <div>发起部门:{{workDetailData.dept_name}}</div>
@@ -52,9 +53,21 @@
         <div class="leftBtn" @click="leftClick">
            上一页
         </div>
         <div class="btngroups">
            <up-button type="primary" text="通过"></up-button>
            <up-button type="error" text="不通过"></up-button>
         <div class="btngroups" v-if="workDetailData.status===2">
            <up-button type="primary" text="通过"  @click="approveTicket"></up-button>
            <up-button type="error" text="不通过" @click="rejectTicket"></up-button>
         </div>
         <div class="btngroups" v-else-if="workDetailData.status===0">
            <up-button type="primary" text="受理"  @click="approveAndDispatch"></up-button>
            <up-button type="error" text="不受理" @click="rejectTicket"></up-button>
         </div>
         <div class="btngroups" v-else-if="workDetailData.status===3">
            <up-button type="primary" text="完成工单" @click="completeTicket"></up-button>
            <up-button type="error" text="取消"></up-button>
         </div>
         <div class="btngroups" v-else="workDetailData.status===4">
            <up-button type="error" text="取消"></up-button>
         </div>
         <div class="leftBtn" @click="rightClick">
            下一页
@@ -65,7 +78,9 @@
</template>
<script setup>
   import {getStepInfo,getList} from '/src/api/work/index.js'
   import {getStepInfo,getList,flowEvent} from '/src/api/work/index.js'
   const eventNum = ref('');
   const currentStatus = ref('')
   const stepResponse = ref([]);
@@ -106,7 +121,7 @@
     const response = res.data.data.records;
     workDetailData.value = response[0];
     currentStatus.value = workDetailData.value.status;
     console.log('详情',response);
   }
   // 步骤条
   const calculateCurrentStep = (status) => {
@@ -121,6 +136,7 @@
   const getStepInfoData = async (val) => {
     const res = await getStepInfo(val);
     stepResponse.value = res.data.data;
     console.log('stepResponse',stepResponse.value)
     currentStep.value = calculateCurrentStep(currentStatus.value);
   }
   // 图片预览
@@ -130,6 +146,17 @@
         current: 0
      });
   };
   // 通过
   const approveTicket=()=>{}
   // // 不通过
   const rejectTicket=()=>{}
   // // 受理
   const approveAndDispatch=()=>{}
   // // 不受理
   // const rejectTicket=()=>{}
   // // 完成工单
   // const completeTicket=()=>{}
   // 取消
</script>
<style lang="scss" scoped>