forked from drone/command-center-dashboard

罗广辉
2025-04-13 d6e731d4e6b8c97707ee1a6cf455d6cc1f9e8e6f
src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue
@@ -1,18 +1,18 @@
<!-- 任务统计表格 -->
<template>
  <SearchBox @search="searchClick" @addTask="handleAddTask"></SearchBox>
  <div class="task-intermediate-content">
    <el-table :data="jobListData" style="width: 100%" height="calc(100vh - 180px)">
    <SearchBox @search="searchClick" @addTask="handleAddTask"></SearchBox>
    <el-table :data="jobListData" style="width: 100%" height="calc(100vh - 502px)">
      <el-table-column label="序号" width="60">
        <template #default="scope">
          {{ (jobListParams.current - 1) * jobListParams.size + 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="job_info_num" label="任务编号" show-overflow-tooltip />
      <el-table-column prop="name" label="任务名称" show-overflow-tooltip />
      <el-table-column prop="dept_name" label="所属部门"  />
      <el-table-column prop="device_names" label="所属机巢"  />
      <el-table-column prop="ai_type_str" label="关联算法"  />
      <el-table-column prop="ai_type_str" label="关联算法" show-overflow-tooltip />
      <el-table-column label="任务状态" >
        <template #default="scope">
          {{ scope.row.status ? getStatusText(scope.row.status) : ''  }}
@@ -24,16 +24,16 @@
      <el-table-column prop="creator_name" label="创建人" />
      <el-table-column label="操作" >
        <template #default="scope">
          <el-button link type="primary" @click="handleDetail(scope.row)">查看</el-button>
          <el-button class="current-details" link type="primary" @click="handleDetail(scope.row)">查看</el-button>
        </template>
      </el-table-column>
    </el-table>
    <div class="pagination">
      <el-pagination
      <el-pagination class="ztzf-pagination"
        v-model:current-page="jobListParams.current"
        v-model:page-size="jobListParams.size"
        :page-sizes="[10, 20, 30, 50]"
        layout="total, sizes, prev, pager, next"
        layout="prev, pager, next, sizes, jumper"
        :total="total"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
@@ -54,7 +54,7 @@
const jobListParams = reactive({
  current: 1,
  size: 10,
  size: 5,
  searchParams:{}
});
const jobListData = ref([]);
@@ -72,7 +72,7 @@
const getStatusText = (status) => {
  const statusMap = {
    1: '待执行',
    2: '执行中',
    2: '执行中',
    3: '已完成',
    4: '已取消',
    5: '执行失败'
@@ -119,40 +119,61 @@
});
</script>
<style lang="scss">
.task-intermediate-content {
  .el-table__body tr {
    background: #0B1D38;
    border-bottom: 1px solid;
    border-image: linear-gradient(270deg, rgba(81, 168, 255, 0), rgba(48, 111, 202, 1), rgba(81, 168, 255, 0)) 2 2;
  }
  .el-pagination__sizes {
        .el-select {
          .el-input__wrapper {
            background-color: #021022;
            box-shadow: 0 0 0 1px #1479EF inset;
          }
        }
      }
}
</style>
<style lang="scss" scoped>
.task-intermediate-content {
  position: absolute;
  top: 400px;
  width: calc(100% - 80px);
  left: 40px;
  height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 16px 38px 16px 38px;
  background: linear-gradient( 27deg, #1F3E7A 0%, rgba(31,62,122,0.35) 79%, rgba(31,62,122,0) 100%);
  padding: 14px 18px;
  :deep(.el-table) {
    margin-top: 12px;
    background-color: transparent;
    --el-table-tr-bg-color: transparent;
    --el-table-border-color: rgba(255, 255, 255, 0.1);
    --el-table-header-bg-color: rgba(31, 62, 122, 0.5);
    --el-table-header-text-color: #fff;
    --el-table-text-color: #fff;
    .el-table__header {
      background: #0F1929;
      box-shadow: inset 0px -50px 50px 0px rgba(27,148,255,0.13);
      border-radius: 20px 0px 0px 0px;
      border-bottom: 2px solid;
      border-image: linear-gradient(90deg, rgba(81, 168, 255, 0), rgba(48, 111, 202, 1), rgba(81, 168, 255, 0)) 2 2;
    }
    .el-table__body tr:hover > td {
      background-color: rgba(31, 62, 122, 0.3) !important;
    }
  }
  .current-details {
    width: 53px;
    height: 27px;
    background: #001F4E;
    border-radius: 0px 0px 0px 0px;
    border: 1px solid #51A8FF;
  }
  .pagination {
    padding: 20px 0;
    // padding: 20px 0;
    display: flex;
    justify-content: flex-end;
    :deep(.el-pagination) {
      --el-pagination-bg-color: transparent;
      --el-pagination-text-color: #fff;
      --el-pagination-button-color: #fff;
      --el-pagination-hover-color: #409eff;
    }
    justify-content: center;
  }
}
</style>
</style>