|  |  | 
 |  |  |         <el-space v-if="activeRadio !== 'task'"> | 
 |  |  |           <el-button type="primary" :icon="Plus" @click="handleAdd(undefined)">新建</el-button> | 
 |  |  |           <el-button type="danger" :icon="Delete" @click="handleDelete">删除</el-button> | 
 |  |  |           <!-- <el-button type="info" plain :icon="Download">导出</el-button> --> | 
 |  |  |           <el-button @click="handleOut">导出</el-button> | 
 |  |  |         </el-space> | 
 |  |  |         <el-space v-else> | 
 |  |  |           <el-button @click="handleOut">导出</el-button> | 
 |  |  |         </el-space> | 
 |  |  |       </div> | 
 |  |  |       <div> | 
 |  |  | 
 |  |  | <script setup> | 
 |  |  | import { Delete, Plus } from "@element-plus/icons-vue"; | 
 |  |  | import { onMounted, ref, reactive, getCurrentInstance, nextTick } from "vue"; | 
 |  |  | import { ElMessageBox } from "element-plus"; | 
 |  |  |  | 
 |  |  | // 组件引入 | 
 |  |  | import Pagination from "@/components/Pagination/index.vue"; | 
 |  |  | 
 |  |  | const handleSelectionChange = (selection) => { | 
 |  |  |   selectedRows.value = selection; | 
 |  |  | }; | 
 |  |  |  | 
 |  |  | // 导出 | 
 |  |  | const handleOut = () => { | 
 |  |  |   ElMessageBox.confirm("选中的内容将被导出,是否确认导出?", "导出", { | 
 |  |  |     confirmButtonText: "确认", | 
 |  |  |     cancelButtonText: "取消", | 
 |  |  |     type: "warning", | 
 |  |  |   }) | 
 |  |  |     .then(() => { | 
 |  |  |       // 根据当前选中的标签页调用不同的导出接口 | 
 |  |  |       if (activeRadio.value === "taskManage") { | 
 |  |  |         // 定时任务管理 | 
 |  |  |         proxy.download("/timingTask/export", {}, "定时任务管理.xlsx"); | 
 |  |  |       } else if (activeRadio.value === "task") { | 
 |  |  |         // 定时任务记录 | 
 |  |  |         proxy.download("/inspectionTask/export", {}, "定时任务记录.xlsx"); | 
 |  |  |       } | 
 |  |  |     }) | 
 |  |  |     .catch(() => { | 
 |  |  |       proxy.$modal.msg("已取消"); | 
 |  |  |     }); | 
 |  |  | }; | 
 |  |  | </script> | 
 |  |  |  | 
 |  |  | <style scoped> | 
 
 |  |  | 
 |  |  |           <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(); | 
 |  |  | }); | 
 
 |  |  | 
 |  |  |           <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(); | 
 |  |  | }); |