From e81590f75a37a557485db72eb5de5d52ffaa8f47 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 21 Aug 2024 16:26:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD=E5=8A=A0lo?= =?UTF-8?q?ading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/eam/adjustRecord/index.vue | 6 ++++-- src/views/eam/applicationRecord/index.vue | 7 ++++--- src/views/eam/basicEamProductionline/index.vue | 8 ++++---- src/views/eam/basicEamWorkshop/index.vue | 8 ++++---- src/views/eam/basicFaultCause/index.vue | 8 ++++---- src/views/eam/basicFaultType/index.vue | 9 +++++---- src/views/eam/basicInspectionOption/index.vue | 9 +++++---- src/views/eam/basicMaintenanceOption/index.vue | 8 ++++---- src/views/eam/basicSpotCheckOption/index.vue | 8 ++++---- src/views/eam/classTypeRole/index.vue | 9 +++++---- src/views/eam/countRecord/index.vue | 7 ++++--- src/views/eam/countadjustPlan/index.vue | 8 ++++---- src/views/eam/countadjustWork/index.vue | 8 +++++--- src/views/eam/documentType/index.vue | 8 ++++---- src/views/eam/documentTypeSelectSet/index.vue | 8 ++++---- src/views/eam/equipmentAccounts/index.vue | 8 ++++---- src/views/eam/equipmentInspectionDetail/index.vue | 8 +++++--- src/views/eam/equipmentInspectionMain/index.vue | 8 ++++---- src/views/eam/equipmentInspectionRecordDetail/index.vue | 9 +++++---- src/views/eam/equipmentInspectionRecordMain/index.vue | 8 ++++---- src/views/eam/equipmentMainPart/index.vue | 8 ++++---- src/views/eam/equipmentMaintenanceMain/index.vue | 9 +++++---- src/views/eam/equipmentMaintenanceRecordDetail/index.vue | 9 +++++---- src/views/eam/equipmentMaintenanceRecordMain/index.vue | 8 ++++---- src/views/eam/equipmentManufacturer/index.vue | 8 ++++---- src/views/eam/equipmentRepairJobDetail/index.vue | 8 +++++--- src/views/eam/equipmentRepairJobMain/index.vue | 9 +++++---- src/views/eam/equipmentRepairRecordDetail/index.vue | 8 ++++---- src/views/eam/equipmentRepairRecordMain/index.vue | 8 ++++---- src/views/eam/equipmentReportRepairRequest/index.vue | 8 ++++---- .../supplierdeliver/purchaseMain/index.vue | 8 ++++---- 31 files changed, 134 insertions(+), 117 deletions(-) diff --git a/src/views/eam/adjustRecord/index.vue b/src/views/eam/adjustRecord/index.vue index e144d3276..0300f868b 100644 --- a/src/views/eam/adjustRecord/index.vue +++ b/src/views/eam/adjustRecord/index.vue @@ -59,6 +59,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' + import { usePageLoading } from '@/hooks/web/usePageLoading' + const { loadStart, loadDone } = usePageLoading() // 采购订单 defineOptions({ name: 'AdjustRecord' }) @@ -242,12 +244,12 @@ // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await AdjustRecordMainApi.exportAdjustRecordMain(tableObject.params) download.excel(data, '备件申领记录主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/applicationRecord/index.vue b/src/views/eam/applicationRecord/index.vue index 236597418..b378aa323 100644 --- a/src/views/eam/applicationRecord/index.vue +++ b/src/views/eam/applicationRecord/index.vue @@ -113,6 +113,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' //import approveDetail from '@/components/Detail/src/approveDetail.vue' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购订单 defineOptions({ name: 'ApplicationRecord' }) @@ -280,18 +282,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ApplicationRecordMainApi.exportApplicationRecordMain(tableObject.params) download.excel(data, '备件申领记录主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/basicEamProductionline/index.vue b/src/views/eam/basicEamProductionline/index.vue index 38b483ed9..f4f90e6db 100644 --- a/src/views/eam/basicEamProductionline/index.vue +++ b/src/views/eam/basicEamProductionline/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import * as BasicEamWorkshopApi from "@/api/eam/basicEamWorkshop"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'BasicEamProductionline' }) const message = useMessage() // 消息弹窗 @@ -261,18 +262,17 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await BasicEamProductionlineApi.exportBasicEamProductionline(tableObject.params) download.excel(data, '生产线.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/basicEamWorkshop/index.vue b/src/views/eam/basicEamWorkshop/index.vue index 5f9f85977..20689c65f 100644 --- a/src/views/eam/basicEamWorkshop/index.vue +++ b/src/views/eam/basicEamWorkshop/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import * as BasicFaultCauseApi from "@/api/eam/basicFaultCause"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'BasicEamWorkshop' }) const message = useMessage() // 消息弹窗 @@ -260,18 +261,17 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await BasicEamWorkshopApi.exportBasicEamWorkshop(tableObject.params) download.excel(data, 'EAM车间.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/basicFaultCause/index.vue b/src/views/eam/basicFaultCause/index.vue index b2157ca64..05904df94 100644 --- a/src/views/eam/basicFaultCause/index.vue +++ b/src/views/eam/basicFaultCause/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'BasicFaultCause' }) const message = useMessage() // 消息弹窗 @@ -243,18 +244,17 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await BasicFaultCauseApi.exportBasicFaultCause(tableObject.params) download.excel(data, '故障原因.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/basicFaultType/index.vue b/src/views/eam/basicFaultType/index.vue index 8296e6fa9..7708345a9 100644 --- a/src/views/eam/basicFaultType/index.vue +++ b/src/views/eam/basicFaultType/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import * as BasicInspectionOptionApi from "@/api/eam/basicInspectionOption"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'BasicFaultType' }) const message = useMessage() // 消息弹窗 @@ -244,18 +245,18 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() + const data = await BasicFaultTypeApi.exportBasicFaultType(tableObject.params) download.excel(data, '故障类型.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/basicInspectionOption/index.vue b/src/views/eam/basicInspectionOption/index.vue index e99246247..ee06a61f3 100644 --- a/src/views/eam/basicInspectionOption/index.vue +++ b/src/views/eam/basicInspectionOption/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import ItemForm from "@/views/eam/basicInspectionOption/itemSelectSetForm.vue"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'BasicInspectionOption' }) const message = useMessage() // 消息弹窗 @@ -262,18 +263,18 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() + const data = await BasicInspectionOptionApi.exportBasicInspectionOption(tableObject.params) download.excel(data, '巡检方案.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/basicMaintenanceOption/index.vue b/src/views/eam/basicMaintenanceOption/index.vue index 533e2f1f2..4efbf9318 100644 --- a/src/views/eam/basicMaintenanceOption/index.vue +++ b/src/views/eam/basicMaintenanceOption/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import ItemForm from "@/views/eam/basicMaintenanceOption/itemSelectSetForm.vue"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'BasicMaintenanceOption' }) const message = useMessage() // 消息弹窗 @@ -263,18 +264,17 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await BasicMaintenanceOptionApi.exportBasicMaintenanceOption(tableObject.params) download.excel(data, '保养方案.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/basicSpotCheckOption/index.vue b/src/views/eam/basicSpotCheckOption/index.vue index b4bd13352..e6e7e2ca1 100644 --- a/src/views/eam/basicSpotCheckOption/index.vue +++ b/src/views/eam/basicSpotCheckOption/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import ItemForm from "@/views/eam/basicSpotCheckOption/itemSelectSetForm.vue"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'BasicSpotCheckOption' }) const message = useMessage() // 消息弹窗 @@ -253,18 +254,17 @@ const getData = async() => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await BasicSpotCheckOptionApi.exportBasicSpotCheckOption(tableObject.params) download.excel(data, '点检方案.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/classTypeRole/index.vue b/src/views/eam/classTypeRole/index.vue index 8ac96d67b..de046605b 100644 --- a/src/views/eam/classTypeRole/index.vue +++ b/src/views/eam/classTypeRole/index.vue @@ -70,7 +70,8 @@ import { Role } from '@/views/system/role/role.data' import * as WorkshopApi from '@/api/wms/workshop' import { Workshop } from '@/views/wms/basicDataManage/factoryModeling/workshop/workshop.data' import * as InspectionItemSelectSetApi from "@/api/eam/inspectionItemSelectSet"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ClassTypeRole' }) @@ -264,18 +265,18 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() + const data = await ClassTypeRoleApi.exportClassTypeRole(tableObject.params) download.excel(data, '厂区班组角色维护.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/countRecord/index.vue b/src/views/eam/countRecord/index.vue index b8a269b1b..086e0ca4b 100644 --- a/src/views/eam/countRecord/index.vue +++ b/src/views/eam/countRecord/index.vue @@ -59,7 +59,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' - + import { usePageLoading } from '@/hooks/web/usePageLoading' + const { loadStart, loadDone } = usePageLoading() // 采购订单 defineOptions({ name: 'CountRecord' }) @@ -259,12 +260,12 @@ // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await CountRecordMainApi.exportCountRecordMain(tableObject.params) download.excel(data, '备件申领记录主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/countadjustPlan/index.vue b/src/views/eam/countadjustPlan/index.vue index efa6eb661..c4b9b5e8f 100644 --- a/src/views/eam/countadjustPlan/index.vue +++ b/src/views/eam/countadjustPlan/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'CountadjustPlan' }) const message = useMessage() // 消息弹窗 @@ -196,18 +197,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await CountadjustPlanApi.exportCountadjustPlan(tableObject.params) download.excel(data, '备件盘点计划.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/countadjustWork/index.vue b/src/views/eam/countadjustWork/index.vue index 43cda52ff..bcdbff7ea 100644 --- a/src/views/eam/countadjustWork/index.vue +++ b/src/views/eam/countadjustWork/index.vue @@ -101,7 +101,8 @@ import * as CountJobDetailApi from '@/api/eam/countJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购订单 defineOptions({ name: 'CountadjustWork' }) @@ -280,12 +281,13 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() + const data = await CountJobMainApi.exportCountJobMain(tableObject.params) download.excel(data, '备件申领记录主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/documentType/index.vue b/src/views/eam/documentType/index.vue index 83df2ab37..4a7226a71 100644 --- a/src/views/eam/documentType/index.vue +++ b/src/views/eam/documentType/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'DocumentType' }) const message = useMessage() // 消息弹窗 @@ -212,18 +213,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await DocumentTypeApi.exportDocumentType(tableObject.params) download.excel(data, '文档类型.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/documentTypeSelectSet/index.vue b/src/views/eam/documentTypeSelectSet/index.vue index 83677d5b9..f0c5c0f1d 100644 --- a/src/views/eam/documentTypeSelectSet/index.vue +++ b/src/views/eam/documentTypeSelectSet/index.vue @@ -69,7 +69,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import ItemForm from "@/views/eam/documentTypeSelectSet/itemSelectSetForm.vue"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'DocumentTypeSelectSet' }) const message = useMessage() // 消息弹窗 @@ -252,18 +253,17 @@ const handleDisable = async (id: number) => { /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await DocumentTypeSelectSetApi.exportDocumentTypeSelectSet(tableObject.params) download.excel(data, '文档类型选择集.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentAccounts/index.vue b/src/views/eam/equipmentAccounts/index.vue index f41b4f823..c7caba7ff 100644 --- a/src/views/eam/equipmentAccounts/index.vue +++ b/src/views/eam/equipmentAccounts/index.vue @@ -114,7 +114,8 @@ import * as ProductionlineApi from '@/api/wms/productionline' import * as EquipmentSupplierApi from '@/api/eam/equipmentSupplier' import * as EquipmentManufacturerApi from '@/api/eam/equipmentManufacturer' import * as UserApi from '@/api/system/user' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentAccounts' }) @@ -340,18 +341,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await EquipmentAccountsApi.exportEquipmentAccounts(tableObject.params) download.excel(data, '设备台账.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentInspectionDetail/index.vue b/src/views/eam/equipmentInspectionDetail/index.vue index b90cb77e2..c72492ef0 100644 --- a/src/views/eam/equipmentInspectionDetail/index.vue +++ b/src/views/eam/equipmentInspectionDetail/index.vue @@ -65,6 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentInspectionDetail' }) @@ -196,18 +198,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() + const data = await EquipmentInspectionDetailApi.exportEquipmentInspectionDetail(tableObject.params) download.excel(data, '巡检工单子.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentInspectionMain/index.vue b/src/views/eam/equipmentInspectionMain/index.vue index 13573deec..60d116355 100644 --- a/src/views/eam/equipmentInspectionMain/index.vue +++ b/src/views/eam/equipmentInspectionMain/index.vue @@ -95,7 +95,8 @@ import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data"; import * as ToolItemApi from "@/api/eam/toolAccounts"; import * as EquipmentSpotCheckMainApi from "@/api/eam/equipmentSpotCheckMain"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentInspectionMain' }) @@ -502,18 +503,17 @@ const getData2=(val)=> { /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await EquipmentInspectionMainApi.exportEquipmentInspectionMain(tableObject.params) download.excel(data, '巡检工单主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentInspectionRecordDetail/index.vue b/src/views/eam/equipmentInspectionRecordDetail/index.vue index e188d70d4..61e5e42a6 100644 --- a/src/views/eam/equipmentInspectionRecordDetail/index.vue +++ b/src/views/eam/equipmentInspectionRecordDetail/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentInspectionRecordDetail' }) const message = useMessage() // 消息弹窗 @@ -196,18 +197,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() + const data = await EquipmentInspectionRecordDetailApi.exportEquipmentInspectionRecordDetail(tableObject.params) download.excel(data, '巡检记录子.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentInspectionRecordMain/index.vue b/src/views/eam/equipmentInspectionRecordMain/index.vue index cb5ac2ab6..ea1b47451 100644 --- a/src/views/eam/equipmentInspectionRecordMain/index.vue +++ b/src/views/eam/equipmentInspectionRecordMain/index.vue @@ -76,7 +76,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentInspectionRecordMain' }) const message = useMessage() // 消息弹窗 @@ -207,18 +208,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await EquipmentInspectionRecordMainApi.exportEquipmentInspectionRecordMain(tableObject.params) download.excel(data, '巡检记录主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentMainPart/index.vue b/src/views/eam/equipmentMainPart/index.vue index 6af6d2835..5c0d507a9 100644 --- a/src/views/eam/equipmentMainPart/index.vue +++ b/src/views/eam/equipmentMainPart/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentMainPart' }) const message = useMessage() // 消息弹窗 @@ -246,18 +247,17 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await EquipmentMainPartApi.exportEquipmentMainPart(tableObject.params) download.excel(data, '主要部件.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentMaintenanceMain/index.vue b/src/views/eam/equipmentMaintenanceMain/index.vue index 4c13406f2..bacf1906a 100644 --- a/src/views/eam/equipmentMaintenanceMain/index.vue +++ b/src/views/eam/equipmentMaintenanceMain/index.vue @@ -105,7 +105,8 @@ import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data"; import * as ToolItemApi from "@/api/eam/toolAccounts"; import * as EquipmentInspectionMainApi from "@/api/eam/equipmentInspectionMain"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentMaintenanceMain' }) const message = useMessage() // 消息弹窗 @@ -497,18 +498,18 @@ const onChange = (field, item) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() + const data = await EquipmentMaintenanceMainApi.exportEquipmentMaintenanceMain(tableObject.params) download.excel(data, '设备保养工单主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentMaintenanceRecordDetail/index.vue b/src/views/eam/equipmentMaintenanceRecordDetail/index.vue index 87a9e8567..ba1174787 100644 --- a/src/views/eam/equipmentMaintenanceRecordDetail/index.vue +++ b/src/views/eam/equipmentMaintenanceRecordDetail/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentMaintenanceRecordDetail' }) const message = useMessage() // 消息弹窗 @@ -196,18 +197,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() + const data = await EquipmentMaintenanceRecordDetailApi.exportEquipmentMaintenanceRecordDetail(tableObject.params) download.excel(data, '保养记录子.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentMaintenanceRecordMain/index.vue b/src/views/eam/equipmentMaintenanceRecordMain/index.vue index 230d20ae4..49ef347cd 100644 --- a/src/views/eam/equipmentMaintenanceRecordMain/index.vue +++ b/src/views/eam/equipmentMaintenanceRecordMain/index.vue @@ -89,7 +89,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import {maintainExperienceBtn} from "@/utils/disposition/defaultButtons"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentMaintenanceRecordMain' }) const message = useMessage() // 消息弹窗 @@ -252,18 +253,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await EquipmentMaintenanceRecordMainApi.exportEquipmentMaintenanceRecordMain(tableObject.params) download.excel(data, '设备保养记录主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentManufacturer/index.vue b/src/views/eam/equipmentManufacturer/index.vue index 9db5fb151..ee6d8ab63 100644 --- a/src/views/eam/equipmentManufacturer/index.vue +++ b/src/views/eam/equipmentManufacturer/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentManufacturer' }) const message = useMessage() // 消息弹窗 @@ -212,18 +213,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await EquipmentManufacturerApi.exportEquipmentManufacturer(tableObject.params) download.excel(data, '设备制造商.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentRepairJobDetail/index.vue b/src/views/eam/equipmentRepairJobDetail/index.vue index bdfae4458..4f2733ae5 100644 --- a/src/views/eam/equipmentRepairJobDetail/index.vue +++ b/src/views/eam/equipmentRepairJobDetail/index.vue @@ -65,6 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentRepairJobDetail' }) @@ -196,18 +198,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() + const data = await EquipmentRepairJobDetailApi.exportEquipmentRepairJobDetail(tableObject.params) download.excel(data, '维修工单子.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentRepairJobMain/index.vue b/src/views/eam/equipmentRepairJobMain/index.vue index f8746d3d6..ec5018162 100644 --- a/src/views/eam/equipmentRepairJobMain/index.vue +++ b/src/views/eam/equipmentRepairJobMain/index.vue @@ -96,7 +96,8 @@ import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; import {ToolAccounts} from "@/views/eam/toolAccounts/toolAccounts.data"; import * as ToolItemApi from "@/api/eam/toolAccounts"; import {mainListCancelBtn} from "@/utils/disposition/defaultButtons"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentRepairJobMain' }) const message = useMessage() // 消息弹窗 @@ -578,18 +579,18 @@ const onChange = (field, item) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() + const data = await EquipmentRepairJobMainApi.exportEquipmentRepairJobMain(tableObject.params) download.excel(data, '维修工单主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentRepairRecordDetail/index.vue b/src/views/eam/equipmentRepairRecordDetail/index.vue index 3c55b1ec7..56f4ec050 100644 --- a/src/views/eam/equipmentRepairRecordDetail/index.vue +++ b/src/views/eam/equipmentRepairRecordDetail/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentRepairRecordDetail' }) const message = useMessage() // 消息弹窗 @@ -196,18 +197,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await EquipmentRepairRecordDetailApi.exportEquipmentRepairRecordDetail(tableObject.params) download.excel(data, '设备维修记录子.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentRepairRecordMain/index.vue b/src/views/eam/equipmentRepairRecordMain/index.vue index 981a8f384..b7ca3b3fc 100644 --- a/src/views/eam/equipmentRepairRecordMain/index.vue +++ b/src/views/eam/equipmentRepairRecordMain/index.vue @@ -104,7 +104,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import {repairExperienceBtn} from "@/utils/disposition/defaultButtons"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentRepairRecordMain' }) const message = useMessage() // 消息弹窗 @@ -278,20 +279,19 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await EquipmentRepairRecordMainApi.exportEquipmentRepairRecordMain( tableObject.params ) download.excel(data, '设备维修记录主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/equipmentReportRepairRequest/index.vue b/src/views/eam/equipmentReportRepairRequest/index.vue index 7cabe2eab..b9a65fbcd 100644 --- a/src/views/eam/equipmentReportRepairRequest/index.vue +++ b/src/views/eam/equipmentReportRepairRequest/index.vue @@ -68,7 +68,8 @@ import * as EquipmentItemApi from "@/api/eam/equipmentAccounts"; import { ToolAccounts } from "@/views/eam/toolAccounts/toolAccounts.data"; import * as ToolItemApi from "@/api/eam/toolAccounts"; import * as EquipmentReportRepairApi from "@/api/eam/equipmentReportRepairRequest"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'EquipmentReportRepairRequest' }) const message = useMessage() // 消息弹窗 @@ -340,18 +341,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await EquipmentReportRepairRequestApi.exportEquipmentReportRepairRequest(tableObject.params) download.excel(data, '设报修申请.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue index 77e6c244a..a6b0182b8 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMain/index.vue @@ -101,10 +101,11 @@ import * as ItembasicApi from '@/api/wms/itembasic' import TableDetail from '@/components/TableDetail/src/TableDetail.vue' import { formatDate } from '@/utils/formatTime' + import { usePageLoading } from '@/hooks/web/usePageLoading' + const { loadStart, loadDone } = usePageLoading() // 采购订单 defineOptions({ name: 'PurchaseMain' }) - const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 const route = useRoute() // 路由信息 @@ -483,19 +484,18 @@ console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searc } /** 导出按钮操作 */ - const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchaseMainApi.exportPurchaseMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } }