forked from drone/command-center-dashboard

chenyao
2025-04-11 867dfdb36aed68626f55d12ef20d3596d7ea5446
src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
@@ -76,10 +76,41 @@
            <el-table-column prop="name" label="任务名称" />
            <el-table-column prop="device_names" label="所属机巢" />
            <el-table-column prop="ai_type_str" label="关联算法" />
            <el-table-column prop="status" label="任务状态" />
            <el-table-column prop="status" label="任务状态">
               <template #default="scope">
                  <span
                     :class="
                        scope.row.status == 1
                           ? 'pending '
                           : scope.row.status == 2
                           ? 'distributed'
                           : scope.row.status == 3
                           ? 'finish '
                           : scope.row.status == 4
                           ? 'cancel '
                           : 'fail '
                     "
                     >{{
                        scope.row.status == 1
                           ? '待执行'
                           : scope.row.status == 2
                           ? '执行中'
                           : scope.row.status == 3
                           ? '完成'
                           : scope.row.status == 4
                           ? '取消'
                           : '失败'
                     }}</span
                  >
               </template>
            </el-table-column>
            <el-table-column prop="industry_type_str" label="任务类型" />
            <el-table-column prop="begin_time" label="任务时间" />
            <el-table-column prop="name" label="关联事件" />
            <el-table-column prop="event_number" label="关联事件">
               <template #default="scope">
                  <span>{{ scope.row.event_number ? scope.row.event_number : '/' }}</span>
               </template>
            </el-table-column>
            <el-table-column label="操作" width="80"> <div class="view">查看</div></el-table-column>
         </el-table>
      </div>
@@ -90,7 +121,6 @@
            v-model:page-size="pageParams.limit"
            :page-sizes="[10, 20, 30, 50]"
            background
            :disabled="disabled"
            layout=" prev, pager, next, jumper"
            :total="total"
            @size-change="handleSizeChange"
@@ -134,8 +164,8 @@
const taskDetailData = ref([])
// 表格参数
const taskDetailParams = reactive({
   page: 1,
   limit: 10,
   current: 1,
   size: 10,
   searchParams: {},
})
// 分页
@@ -171,7 +201,6 @@
   taskDetailParams.page = 1
   taskDetailParams.limit = 10
   taskDetailParams.searchParams = searchForm
   console.log('taskDetailParams.value', taskDetailParams)
   getJobList()
}
// 分页大小改变
@@ -190,7 +219,6 @@
      if (res.data.code !== 0) return
      taskDetailData.value = res.data.data.records
      total.value = res.data.data.total
      console.log('任务列表', taskDetailData.value)
   })
}
// 机巢列表数据
@@ -312,6 +340,7 @@
   left: 50%;
   transform: translateX(-50%);
   border-radius: 4px;
   bottom: 5px;
}
:deep(.el-pagination button) {
   background: center center no-repeat none !important;
@@ -403,6 +432,22 @@
   line-height: 27px;
   cursor: pointer;
}
// 任务状态颜色
.pending {
   color: #e36913;
}
.distributed {
   color: #ffc398;
}
.finish {
   color: #afd9fb;
}
.cancel {
   color: #11c4ff;
}
.fail {
   color: #8cfea7;
}
</style>
<style lang="scss">
.inspection-rask-details-dialog {
@@ -469,7 +514,12 @@
      width: 100%;
      border-bottom: 1px solid;
      border-image: linear-gradient(90deg, rgba(25, 162, 255, 0) 10%, rgba(20, 125, 202, 1) 50%, rgba(25, 162, 255, 0) 90%)
      border-image: linear-gradient(
            90deg,
            rgba(25, 162, 255, 0) 10%,
            rgba(20, 125, 202, 1) 50%,
            rgba(25, 162, 255, 0) 90%
         )
         2 2 2 2;
   }
   .el-table .success-row {
@@ -482,7 +532,12 @@
      width: 100%;
      border-bottom: 1px solid;
      border-image: linear-gradient(90deg, rgba(25, 162, 255, 0) 10%, rgba(20, 125, 202, 1) 79%, rgba(25, 162, 255, 0) 90%)
      border-image: linear-gradient(
            90deg,
            rgba(25, 162, 255, 0) 10%,
            rgba(20, 125, 202, 1) 79%,
            rgba(25, 162, 255, 0) 90%
         )
         2 2 2 2;
   }
   .el-scrollbar__thumb {