buhuazhen
2026-05-27 2f3f713465e0a538dfa49fc187b8b8d84b3f0a55
src/views/equipmentManagement/inspectionManagement/index.vue
@@ -70,6 +70,17 @@
                    class="no-data">--</span>
            </div>
          </template>
          <template #status="{ row }">
            <el-tag v-if="row.status === 'EXPIRED'"
                    type="danger"
                    size="small">已过期</el-tag>
            <el-tag v-else-if="row.status === 'IN_PROGRESS'"
                    type="warning"
                    size="small">巡检中</el-tag>
            <el-tag v-else
                    type="info"
                    size="small">待巡检</el-tag>
          </template>
        </PIMTable>
      </div>
    </el-card>
@@ -127,7 +138,7 @@
  const pageNum = ref(1);
  const pageSize = ref(10);
  // 列配置
  // 列配置(基础列,不含状态)
  const columns = ref([
    { prop: "taskName", label: "巡检任务名称", minWidth: 160 },
    { prop: "remarks", label: "备注", minWidth: 150 },
@@ -227,6 +238,15 @@
    radioChange("taskManage");
  });
  // 状态列配置(仅定时任务记录显示)
  const statusColumn = {
    prop: "status",
    label: "状态",
    minWidth: 100,
    dataType: "slot",
    slot: "status"
  };
  // 单选变化
  const radioChange = value => {
    if (value === "taskManage") {
@@ -240,6 +260,7 @@
      const operationColumn = getOperationColumn(["upload", "viewFile"]);
      tableColumns.value = [
        ...columns.value,
        statusColumn,  // 定时任务记录添加状态列
        ...(operationColumn ? [operationColumn] : []),
      ];
      operationsArr.value = ["upload", "viewFile"];