forked from drone/command-center-dashboard

罗广辉
2025-04-21 2800fa4f32f3900509cb4d6eefaf2bfaf54efdd7
src/components/DeviceJobDetails/JobRelatedEvents.vue
@@ -2,15 +2,15 @@
   <div class="machineTableDetailsTitle"><span>关联事件</span></div>
   <div class="ztzf-table">
      <el-table
      :row-class-name="tableRowClassName"
         :row-class-name="tableRowClassName"
         :data="list"
         style="width: 100%"
         :row-style="{ height: '38px', fontSize: '14px', 'text-align': 'center' }"
         :header-cell-style="{ 'text-align': 'center', height: '36px', fontSize: '14px' }"
      >
         <el-table-column prop="id" label="事件编号" />
         <el-table-column prop="event_num" label="事件编号" />
         <el-table-column show-overflow-tooltip prop="event_name" label="事件名称" />
         <el-table-column show-overflow-tooltip prop="create_user" label="所属单位" />
         <el-table-column show-overflow-tooltip prop="dept_name" label="所属单位" />
         <el-table-column show-overflow-tooltip prop="remark" label="事件内容" />
         <el-table-column show-overflow-tooltip prop="ai_types" label="关联算法" />
         <el-table-column prop="status" label="工单状态">
@@ -20,7 +20,6 @@
               <div class="processing" v-if="scope.row.status === 3">处理中</div>
               <div class="done" v-if="scope.row.status === 4">已完成</div>
               <div class="ended" v-if="scope.row.status === 5">已完结</div>
            </template>
         </el-table-column>
         <el-table-column label="操作" width="80">
@@ -31,7 +30,7 @@
      </el-table>
   </div>
   <el-pagination
   class="ztzf-pagination"
      class="ztzf-pagination"
      background
      :page-sizes="[10, 20, 30, 50]"
      v-model:current-page="sizeParams.current"
@@ -49,7 +48,7 @@
const list = ref()
const params = ref({
   wayLineJodInfoId: null,
   way_line_jod_info_id: null,
})
const sizeParams = ref({
   current: 1,
@@ -58,23 +57,21 @@
const store = useStore()
const child_sn = computed(() => store.state.home.singleUavHome.child_sn)
const total = ref(10)
const distribution = row => {
   ElMessage.warning('正在加急开发中...')
}
const examine = row => {
   ElMessage.warning('正在加急开发中...')
   const orderNumber = row.event_num
   const adminUrl = import.meta.env.VITE_APP_ADMIN_URL
   const targetPath = `/tickets/ticket?orderNumber=${orderNumber}`;
   window.open(`${adminUrl}?redirect=${encodeURIComponent(targetPath)}`, '_blank');
}
const wayLineJodInfoId = inject('wayLineJodInfoId')
const getList = () => {
   params.value.wayLineJodInfoId = wayLineJodInfoId.value
   params.value.way_line_jod_info_id = wayLineJodInfoId.value
   getDeviceEventList(params.value, sizeParams.value).then(res => {
      const resData = res?.data?.data || {}
      list.value = resData.records
      total.value = resData.total
   })
}
@@ -111,23 +108,23 @@
}
// 待处理
.pending{
color: #FF7411;
.pending {
   color: #ff7411;
}
// 待审核
.reviewed{
color: #8CFEA7;
.reviewed {
   color: #8cfea7;
}
// 处理中
.processing{
color: #FFC398;
.processing {
   color: #ffc398;
}
// 已完成
.done{
color: #AFD9FB;
.done {
   color: #afd9fb;
}
// 已完结
.ended{
color: #11C4FF;
.ended {
   color: #11c4ff;
}
</style>