|  |  | 
 |  |  |           <el-button type="success" icon="Van" @click="addRepair"> | 
 |  |  |             新增报修 | 
 |  |  |           </el-button> | 
 |  |  |           <el-button @click="handleOut"> | 
 |  |  |             导出 | 
 |  |  |           </el-button> | 
 |  |  |           <el-button | 
 |  |  |             type="danger" | 
 |  |  |             icon="Delete" | 
 |  |  | 
 |  |  | <script setup> | 
 |  |  | import { usePaginationApi } from "@/hooks/usePaginationApi"; | 
 |  |  | import { getRepairPage, delRepair } from "@/api/equipmentManagement/repair"; | 
 |  |  | import { onMounted } from "vue"; | 
 |  |  | import { onMounted, getCurrentInstance } from "vue"; | 
 |  |  | import RepairModal from "./Modal/RepairModal.vue"; | 
 |  |  | import { ElMessageBox, ElMessage } from "element-plus"; | 
 |  |  | import dayjs from "dayjs"; | 
 |  |  | 
 |  |  | defineOptions({ | 
 |  |  |   name: "设备报修", | 
 |  |  | }); | 
 |  |  |  | 
 |  |  | const { proxy } = getCurrentInstance(); | 
 |  |  |  | 
 |  |  | // 模态框实例 | 
 |  |  | const repairModalRef = ref(); | 
 |  |  | 
 |  |  |   }); | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | // 导出 | 
 |  |  | const handleOut = () => { | 
 |  |  |   ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", { | 
 |  |  |     confirmButtonText: "确认", | 
 |  |  |     cancelButtonText: "取消", | 
 |  |  |     type: "warning", | 
 |  |  |   }) | 
 |  |  |     .then(() => { | 
 |  |  |       proxy.download("/device/repair/export", {}, "设备报修.xlsx"); | 
 |  |  |     }) | 
 |  |  |     .catch(() => { | 
 |  |  |       ElMessage.info("已取消"); | 
 |  |  |     }); | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | onMounted(() => { | 
 |  |  |   getTableData(); | 
 |  |  | }); |