|  |  | 
 |  |  |           <el-button type="success" icon="Van" @click="addPlan"> | 
 |  |  |             新增计划 | 
 |  |  |           </el-button> | 
 |  |  |           <el-button @click="handleOut"> | 
 |  |  |             导出 | 
 |  |  |           </el-button> | 
 |  |  |           <el-button | 
 |  |  |             type="danger" | 
 |  |  |             icon="Delete" | 
 |  |  | 
 |  |  | <script setup> | 
 |  |  | import { usePaginationApi } from "@/hooks/usePaginationApi"; | 
 |  |  | import { getUpkeepPage, delUpkeep } from "@/api/equipmentManagement/upkeep"; | 
 |  |  | import { onMounted } from "vue"; | 
 |  |  | import { onMounted, getCurrentInstance } from "vue"; | 
 |  |  | import PlanModal from "./Modal/PlanModal.vue"; | 
 |  |  | import MaintenanceModal from "./Modal/MaintenanceModal.vue"; | 
 |  |  | import dayjs from "dayjs"; | 
 |  |  | 
 |  |  | defineOptions({ | 
 |  |  |   name: "设备保养", | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | const { proxy } = getCurrentInstance(); | 
 |  |  |  | 
 |  |  | // 计划弹窗控制器 | 
 |  |  | const planModalRef = ref(); | 
 |  |  | 
 |  |  |   }); | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | // 导出 | 
 |  |  | const handleOut = () => { | 
 |  |  |   ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", { | 
 |  |  |     confirmButtonText: "确认", | 
 |  |  |     cancelButtonText: "取消", | 
 |  |  |     type: "warning", | 
 |  |  |   }) | 
 |  |  |     .then(() => { | 
 |  |  |       proxy.download("/device/maintenance/export", {}, "设备保养.xlsx"); | 
 |  |  |     }) | 
 |  |  |     .catch(() => { | 
 |  |  |       ElMessage.info("已取消"); | 
 |  |  |     }); | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | onMounted(() => { | 
 |  |  |   getTableData(); | 
 |  |  | }); |