gaoluyang
2025-07-01 4585e2a346de2e3305e24954bbb39cdbb7e1b0ce
src/views/inspectionManagement/index.vue
@@ -1,18 +1,10 @@
<template>
  <div class="app-container">
    <el-form :inline="true" :model="queryParams" class="search-form">
      <el-form-item label="时间">
      <el-form-item label="搜索">
        <el-input
            v-model="queryParams.supplierName"
            placeholder="请输入"
            clearable
            :style="{ width: '100%' }"
        />
      </el-form-item>
      <el-form-item label="设备名称">
        <el-input
            v-model="queryParams.coal"
            placeholder="请输入"
            v-model="queryParams.searchAll"
            placeholder="请输入关键字"
            clearable
            :style="{ width: '100%' }"
        />
@@ -127,8 +119,7 @@
const viewQrCodeFiles = ref()
// 查询参数
const queryParams = reactive({
  supplierName: "",
  coal: "",
  searchAll: "",
})
// 当前标签
const activeTab = ref("task");
@@ -156,11 +147,22 @@
const pageSize = ref(10);
const columns = ref([
  { prop: "taskName", label: "巡检任务名称", minWidth: 160 },
  { prop: "port", label: "地点", minWidth: 120 },
  { prop: "inspectionLocation", label: "地点", minWidth: 120 },
  { prop: "remarks", label: "备注", minWidth: 150 },
  { prop: "inspector", label: "执行巡检人", minWidth: 150 },
  { prop: "inspector", label: "频次", minWidth: 150 },
  { prop: "inspector", label: "开始日期", minWidth: 150 },
  { prop: "frequencyType", label: "频次", minWidth: 150,
    formatter: (row, column, cellValue) => {
    if (cellValue === 'DAILY') {
      return '每日';
    } else if (cellValue === 'MONTHLY') {
      return '每月';
    } else if (cellValue === 'WEEKLY') {
      return '每周';
    } else {
      return '季度'
    }
    }},
  { prop: "frequencyDetail", label: "开始日期与时间", minWidth: 150 },
  { prop: "registrant", label: "登记人", minWidth: 100 },
  { prop: "createTime", label: "登记日期", minWidth: 100 },
]);
@@ -181,12 +183,15 @@
  getList();
};
const radioChange = (value) => {
  if (value !== "task") {
  if (value === "taskManage") {
    tableColumns.value = columns.value;
    operationsArr.value = ['edit']
  } else if (value === "task") {
    tableColumns.value = columns.value;
    operationsArr.value = ['viewFile']
  } else {
    tableColumns.value = columns1.value;
    operationsArr.value = ['viewFile']
    operationsArr.value = ['edit']
  }
  getList();
}