forked from drone/command-center-dashboard

张含笑
2025-04-10 2b3277dffa7afccba13ab281bf0a3e8c0b9cbc3f
src/views/Home/HomeLeft/InspectionRaskDetails/InspectionRaskDetailsDialog.vue
@@ -1,12 +1,18 @@
 <!--  巡检任务情况-详情 -->
<template>
   <el-dialog
      class="data-dialog"
      v-model="isShowDetailsDialog"
      title="巡检任务详情"
      :width="pxToRem(1000)"
      :close-on-click-modal="false"
      :destroy-on-close="true"
   >
      <template #header="{ titleId, titleClass }">
         <div class="my-header">
            <img src="/src/assets/images/home/homeLeft/inspection-union.png" alt="" />
            <span :id="titleId" :class="titleClass">巡检任务详情</span>
         </div>
      </template>
      <!-- 搜索 -->
      <el-form :model="searchForm" inline>
         <div class="search-row">
@@ -47,28 +53,36 @@
               />
            </el-form-item>
            <el-form-item>
               <el-button @click="handleReset">重置</el-button>
               <el-button type="primary" @click="handleSearch">查询</el-button>
               <div class="reset" @click="handleReset"></div>
               <div class="searchs" @click="handleSearch"></div>
            </el-form-item>
         </div>
      </el-form>
      <!-- 表格 -->
      <el-table :data="taskDetailData" style="width: 100%">
         <el-table-column label="序号" width="60">
            <template #default="scope">
               {{ (taskDetailParams.page - 1) * taskDetailParams.limit + scope.$index + 1 }}
            </template>
         </el-table-column>
         <el-table-column prop="job_info_num" label="任务编号" />
         <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="industry_type_str" label="任务类型" />
         <el-table-column prop="begin_time" label="任务时间" />
         <el-table-column prop="name" label="关联事件" />
         <el-table-column label="操作"> <el-button link type="primary" size="small">查看</el-button></el-table-column>
      </el-table>
      <div class="tabledata">
         <el-table
            :data="taskDetailData"
            :row-class-name="tableRowClassName"
            :row-style="{ height: '58px', fontSize: '14px', 'text-align': 'center' }"
            :header-cell-style="{ 'text-align': 'center', height: '36px', fontSize: '14px' }"
         >
            <el-table-column label="序号" type="index" width="60">
               <template #default="{ $index }">
                  {{ ($index + 1).toString().padStart(2, '0') }}
               </template>
            </el-table-column>
            <!-- 事件状态:0 =待处理,1=待分拨,2=待处理,3=处理中,4=已完成 5=已完结 -->
            <el-table-column prop="job_info_num" label="任务编号" />
            <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="industry_type_str" label="任务类型" />
            <el-table-column prop="begin_time" label="任务时间" />
            <el-table-column prop="name" label="关联事件" />
            <el-table-column label="操作" width="80"> <div class="view">查看</div></el-table-column>
         </el-table>
      </div>
      <!-- 分页 -->
      <div class="pagination">
         <el-pagination
@@ -77,7 +91,7 @@
            :page-sizes="[10, 20, 30, 50]"
            background
            :disabled="disabled"
            layout="total, sizes, prev, pager, next, jumper"
            layout=" prev, pager, next, jumper"
            :total="total"
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
@@ -176,6 +190,7 @@
      if (res.data.code !== 0) return
      taskDetailData.value = res.data.data.records
      total.value = res.data.data.total
      console.log('任务列表', taskDetailData.value)
   })
}
// 机巢列表数据
@@ -200,6 +215,13 @@
const algorithmChange = val => {
   searchForm.ai_types = val
}
const tableRowClassName = ({ row, rowIndex }) => {
   if (rowIndex % 2 === 1) {
      return 'warning-row'
   } else {
      return 'success-row'
   }
}
onMounted(() => {
   requestDictionary()
   getJobList()
@@ -211,6 +233,7 @@
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin: 0 37px;
   .el-form-item {
      flex: 1;
   }
@@ -218,7 +241,6 @@
:deep(.el-form) {
   .el-form-item {
      margin-bottom: 0;
      margin-right: 20px;
      .el-form-item__label {
         color: #fff;
      }
@@ -236,13 +258,235 @@
}
:deep() {
   .el-table .el-table__cell {
      padding: 0 !important;
   }
   .el-table thead {
      border-bottom: 1px solid;
      border: 1px solid;
      border-image: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1), rgba(255, 255, 255, 0)) 1 1;
      color: var(--el-table-header-text-color);
      background: #102441;
   }
   .el-date-editor.el-input,
   .el-date-editor.el-input__wrapper {
      height: var(--el-input-height, var(--el-component-size));
      width: 0 !important;
   }
   .el-select__wrapper {
      background: #012a50;
      height: 100%;
      padding-left: 20px;
      border: 1px solid #51a8ff;
      box-shadow: none !important;
   }
   .el-select__selected-item {
      font-family: Source Han Sans CN, Source Han Sans CN, serif;
      line-height: 18px;
      font-weight: 400;
      font-size: 16px;
      color: #296aca;
   }
   .el-input__wrapper {
      background: #012a50 !important;
      box-shadow: none !important;
      border: 1px solid #178bff;
   }
   .el-input__inner::placeholder {
      color: #296aca;
   }
   .el-form-item__label {
      font-family: Segoe UI, Segoe UI;
      font-weight: 400;
      font-size: 16px;
      color: #ffffff;
   }
   .el-date-editor .el-range-separator {
      color: #ffffff !important;
   }
}
.pagination {
   margin-top: 20px;
:deep(.el-pagination) {
   position: absolute;
   left: 50%;
   transform: translateX(-50%);
   border-radius: 4px;
}
:deep(.el-pagination button) {
   background: center center no-repeat none !important;
   color: #8eb8ea !important;
}
:deep(.el-pager li) {
   background: none !important;
   color: #8eb8ea !important;
}
:deep(.el-pager li.is-active) {
   background: #021022 !important;
   border-radius: 0px 0px 0px 0px;
   border: 1px solid #1479ef;
   color: #c7e1ff !important;
}
:deep(.el-pagination__goto) {
   color: #c7e1ff !important;
}
:deep(.el-pagination__classifier) {
   color: #c7e1ff !important;
}
:deep(.el-pager .el-input__wrapper) {
   background: #021022 !important;
   color: #c7e1ff !important;
   border: 1px solid #1479ef !important;
   z-index: 1;
}
.el-table {
   color: #fff;
   --el-table-border-color: var(--el-border-color-lighter);
   --el-table-border: none !important;
   --el-table-text-color: #fff !important;
   --el-table-header-text-color: #fff !important;
   --el-table-row-hover-bg-color: none !important;
   --el-table-current-row-bg-color: none !important;
   --el-table-header-bg-color: none !important;
   --el-table-fixed-box-shadow: none !important;
   --el-table-bg-color: none !important;
   --el-table-tr-bg-color: none !important;
   --el-table-expanded-cell-bg-color: none !important;
   --el-table-fixed-left-column: inset 10px 0 10px -10px rgba(0, 0, 0, 0.15);
   --el-table-fixed-right-column: inset -10px 0 10px -10px rgba(0, 0, 0, 0.15);
}
.el-table__header {
   width: 0 !important;
}
.el-table__body {
   border-collapse: collapse;
}
:deep(.el-table .el-table__cell) {
   padding: 0 !important;
   text-align: center !important;
}
.my-header {
   display: inline-block;
   vertical-align: middle;
   margin-left: 12px;
}
.reset {
   width: 137px;
   height: 32px;
   cursor: pointer;
   background: url('/src/assets/images/home/homeLeft/‌inspection-reset.png') no-repeat center;
   background-size: 100% 100%;
}
.searchs {
   margin-left: 23px;
   cursor: pointer;
   width: 137px;
   height: 32px;
   background: url('/src/assets/images/home/homeLeft/in‌spection-select.png') no-repeat center;
   background-size: 100% 100%;
}
.tabledata {
   padding: 0 16px;
   overflow: hidden;
   height: 640px;
   overflow-y: scroll !important;
}
.view {
   width: 53px;
   height: 27px;
   background: #001f4e;
   border-radius: 0px 0px 0px 0px;
   border: 1px solid #51a8ff;
   font-size: 14px;
   color: #ffffff;
   text-align: center;
   line-height: 27px;
   cursor: pointer;
}
</style>
<style>
.data-dialog {
   width: 1270px;
   height: 856px;
   background: #0f1929;
   box-shadow: inset 0px -50px 50px 0px rgba(27, 148, 255, 0.13);
   border-radius: 20px 0px 0px 0px;
   border: 2px solid;
   padding: 0 !important;
   border-image: linear-gradient(
         180deg,
         rgba(81, 168, 255, 0),
         rgba(48, 111, 202, 1),
         rgba(255, 255, 255, 1),
         rgba(27, 148, 255, 1)
      )
      2 2;
}
/* 头部 */
.el-dialog__header {
   width: 1270px;
   height: 47px;
   margin-bottom: 14px;
   background: url('/src/assets/images/home/homeLeft/inspection-vector.png') no-repeat center;
   background-size: 100% 100%;
   font-weight: bold;
   font-size: 16px;
   line-height: 47px;
}
.el-dialog .el-dialog__header {
   /* margin: 0px !important; */
   padding: 0px !important;
   padding-left: 0px !important;
}
/* 头部 */
.el-dialog__title {
   width: 112px;
   height: 19px;
   font-family: Segoe UI, Segoe UI;
   font-weight: bold;
   font-size: 16px;
   line-height: 16px;
   text-shadow: 0px 0px 5px rgba(154, 218, 255, 0.6);
   text-align: left;
   font-style: normal;
   text-transform: none;
   background: linear-gradient(90deg, #fbfdff 0%, #86d4ff 100%);
   margin-left: 16px;
   -webkit-background-clip: text; /* 背景被裁剪成文字的前景色 */
   -webkit-text-fill-color: transparent; /* 文字填充颜色变透明 */
}
.el-table__inner-wrapper:before {
   height: 0 !important;
}
.el-table .warning-row {
   --el-table-tr-bg-color: rgba(22, 43, 74, 0.79);
}
.el-table .warning-row::after {
   position: absolute;
   content: '';
   left: 0;
   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%)
      2 2 2 2;
}
.el-table .success-row {
   --el-table-tr-bg-color: #0b1d38;
}
.el-table .success-row::after {
   position: absolute;
   content: '';
   left: 0;
   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%)
      2 2 2 2;
}
.el-scrollbar__thumb {
   background: #13c6ff !important;
}
</style>