gongchunyi
5 天以前 3d2a1e5bc593cd137a7923407d593fdeadacea17
src/views/equipmentManagement/upkeep/index.vue
@@ -78,6 +78,11 @@
            <template #operation="{ row }">
              <el-button type="primary"
                         link
                         @click="handleDetail(row)">
                详情
              </el-button>
              <el-button type="primary"
                         link
                         @click="editScheduledTask(row)">
                编辑
              </el-button>
@@ -177,6 +182,11 @@
                      type="warning">待保养</el-tag>
            </template>
            <template #operation="{ row }">
              <el-button type="primary"
                         link
                         @click="handleRecordDetail(row)">
                详情
              </el-button>
              <!-- 这个功能跟新增保养功能一模一样,有啥意义? -->
              <!-- <el-button
              type="primary"
@@ -219,6 +229,8 @@
                      @ok="getTableData" />
    <FormDia ref="formDiaRef"
             @closeDia="getScheduledTableData" />
    <DetailDia ref="detailDiaRef" />
    <RecordDetailDia ref="recordDetailDiaRef" />
    <FileList v-if="fileDialogVisible"
              v-model:visible="fileDialogVisible"
              :record-type="'device_maintenance'"
@@ -241,6 +253,8 @@
  import PlanModal from "./Form/PlanModal.vue";
  import MaintenanceModal from "./Form/MaintenanceModal.vue";
  import FormDia from "./Form/formDia.vue";
  import DetailDia from "./Form/detailDia.vue";
  import RecordDetailDia from "./Form/RecordDetailDia.vue";
  import {
    getUpkeepPage,
    delUpkeep,
@@ -263,6 +277,10 @@
  const maintainModalRef = ref();
  // 定时任务弹窗控制器
  const formDiaRef = ref();
  // 定时任务详情弹窗控制器
  const detailDiaRef = ref();
  // 保养记录详情弹窗控制器
  const recordDetailDiaRef = ref();
  // 附件弹窗
  const fileListDialogRef = ref(null);
  const fileDialogVisible = ref(false);
@@ -314,7 +332,7 @@
    {
      prop: "frequencyType",
      label: "频次",
      minWidth: 50,
      minWidth: 80,
      // PIMTable 使用的是 formatData,而不是 Element-Plus 的 formatter
      formatData: cell =>
        ({
@@ -371,7 +389,7 @@
      dataType: "slot",
      slot: "operation",
      align: "center",
      width: "150px",
      width: "160px",
    },
  ]);
@@ -445,7 +463,7 @@
      dataType: "slot",
      slot: "operation",
      align: "center",
      width: "350px",
      width: "250px",
    },
  ]);
@@ -503,6 +521,14 @@
    if (row) {
      nextTick(() => {
        formDiaRef.value?.openDialog("edit", row);
      });
    }
  };
  const handleDetail = row => {
    if (row) {
      nextTick(() => {
        detailDiaRef.value?.openDialog(row);
      });
    }
  };
@@ -578,6 +604,14 @@
    maintainModalRef.value.open(row.id, row);
  };
  const handleRecordDetail = row => {
    if (row) {
      nextTick(() => {
        recordDetailDiaRef.value?.openDialog(row);
      });
    }
  };
  const addPlan = () => {
    planModalRef.value.openModal();
  };