| | |
| | | <template #statusRef="{ row }"> |
| | | <el-tag v-if="row.status === 2" type="danger">失败</el-tag> |
| | | <el-tag v-if="row.status === 1" type="success">完结</el-tag> |
| | | <el-tag v-if="row.status === 3" type="warning">待验收</el-tag> |
| | | <el-tag v-if="row.status === 0" type="warning">待保养</el-tag> |
| | | </template> |
| | | <template #operation="{ row }"> |
| | | <!-- 这个功能跟新增保养功能一模一样,有啥意义? --> |
| | | <!-- <el-button |
| | | type="primary" |
| | | text |
| | | @click="addMaintain(row)" |
| | | > |
| | | 新增保养 |
| | | </el-button> --> |
| | | <el-button |
| | | type="primary" |
| | | link |
| | | :disabled="row.status === 1" |
| | | :disabled="row.status === 1 || row.status === 3" |
| | | @click="editPlan(row.id)" |
| | | > |
| | | 编辑 |
| | | </el-button> |
| | | <el-button |
| | | v-if="row.status === 0" |
| | | type="success" |
| | | link |
| | | :disabled="row.status === 1" |
| | | @click="addMaintain(row)" |
| | | > |
| | | 保养 |
| | | </el-button> |
| | | <el-button |
| | | v-if="row.status === 3" |
| | | type="success" |
| | | link |
| | | @click="openAcceptanceDialog(row)" |
| | | > |
| | | 验收审批 |
| | | </el-button> |
| | | <el-button |
| | | type="danger" |
| | |
| | | </el-tabs> |
| | | <PlanModal ref="planModalRef" @ok="getTableData" /> |
| | | <MaintenanceModal ref="maintainModalRef" @ok="getTableData" /> |
| | | <AcceptanceModal ref="acceptanceModalRef" @ok="getTableData" /> |
| | | <FormDia ref="formDiaRef" @closeDia="getScheduledTableData" /> |
| | | <FileListDialog |
| | | ref="fileListDialogRef" |
| | |
| | | import PlanModal from './Form/PlanModal.vue' |
| | | import MaintenanceModal from './Form/MaintenanceModal.vue' |
| | | import FormDia from './Form/formDia.vue' |
| | | import AcceptanceModal from './Form/AcceptanceModal.vue' |
| | | import FileListDialog from '@/components/Dialog/FileListDialog.vue' |
| | | import { |
| | | getUpkeepPage, |
| | |
| | | deviceMaintenanceTaskList, |
| | | deviceMaintenanceTaskDel, |
| | | deviceMaintenanceTaskChangeEnable, |
| | | maintenanceAcceptance, |
| | | } from '@/api/equipmentManagement/upkeep' |
| | | import { |
| | | listMaintenanceTaskFiles, |
| | |
| | | const planModalRef = ref() |
| | | // 保养弹窗控制器 |
| | | const maintainModalRef = ref() |
| | | // 验收审批弹窗控制器 |
| | | const acceptanceModalRef = ref() |
| | | // 定时任务弹窗控制器 |
| | | const formDiaRef = ref() |
| | | // 附件弹窗 |
| | |
| | | prop: "status", |
| | | dataType: "slot", |
| | | slot: "statusRef", |
| | | }, |
| | | { |
| | | label: "验收人", |
| | | align: "center", |
| | | prop: "acceptanceName", |
| | | formatData: (cell) => cell || "-", |
| | | }, |
| | | { |
| | | label: "验收时间", |
| | | align: "center", |
| | | prop: "acceptanceTime", |
| | | formatData: (cell) => |
| | | cell ? dayjs(cell).format("YYYY-MM-DD HH:mm:ss") : "-", |
| | | }, |
| | | { |
| | | label: "验收备注", |
| | | align: "center", |
| | | prop: "acceptanceRemark", |
| | | formatData: (cell) => cell || "-", |
| | | }, |
| | | { |
| | | fixed: "right", |
| | |
| | | await fetchMaintenanceTaskFiles(row.id) |
| | | } |
| | | |
| | | // 打开验收审批弹窗 |
| | | const openAcceptanceDialog = (row) => { |
| | | acceptanceModalRef.value.open(row.id, row) |
| | | } |
| | | |
| | | // 刷新附件列表 |
| | | const refreshFileList = async () => { |
| | | if (!currentMaintenanceTaskId.value) return |