From 2f0009c750de4d47a18cce4a5a403fa83ba0c209 Mon Sep 17 00:00:00 2001
From: baoshiwei <baoshiwei@shlanbao.cn>
Date: 星期三, 02 七月 2025 08:58:27 +0800
Subject: [PATCH] feat(report): 新增设备稼动率统计功能

---
 eims-ui/apps/web-antd/src/views/eims/maint-plan/index.vue |   38 +++++++++++++++++++++++++++++++-------
 1 files changed, 31 insertions(+), 7 deletions(-)

diff --git a/eims-ui/apps/web-antd/src/views/eims/maint-plan/index.vue b/eims-ui/apps/web-antd/src/views/eims/maint-plan/index.vue
index ff7c4d5..4190da9 100644
--- a/eims-ui/apps/web-antd/src/views/eims/maint-plan/index.vue
+++ b/eims-ui/apps/web-antd/src/views/eims/maint-plan/index.vue
@@ -3,7 +3,7 @@
 
 import { onMounted, ref } from 'vue';
 
-import { Page, useVbenDrawer, type VbenFormProps } from '@vben/common-ui';
+import { Page, useVbenDrawer, useVbenModal, type VbenFormProps } from '@vben/common-ui';
 import { $t } from '@vben/locales';
 import { addFullName, getPopupContainer, getVxePopupContainer } from '@vben/utils';
 
@@ -11,17 +11,20 @@
 
 import { useVbenVxeGrid, vxeCheckboxChecked, type VxeGridProps, vxeSortEvent } from '#/adapter/vxe-table';
 import { delMaintPlan, listMaintPlan, maintPlanExport } from '#/api/eims/maint-plan';
-import { listMaintStand } from '#/api/eims/maint-stand';
 import { generateCode } from '#/api/eims/utils';
 import { getDeptTree, userList } from '#/api/system/user';
 import { MAINT_ORDER_STATUS } from '#/constants/dict';
 import { commonDownloadExcel } from '#/utils/file/download';
-import BasisSubTable from '#/views/eims/components/basis-sub-table.vue';
 import maintOrderDrawer from '#/views/eims/maint-order/maint-order-drawer.vue';
-import { columns as maintSrandCol } from '#/views/eims/maint-stand/data';
 
 import { columns, querySchema } from './data';
 import maintPlanDrawer from './maint-plan-drawer.vue';
+import maintPlanImportModal from './maint-plan-import-modal.vue';
+
+
+defineExpose({
+  tableSelect
+});
 
 const formOptions: VbenFormProps = {
   commonConfig: {
@@ -92,6 +95,17 @@
   connectedComponent: maintOrderDrawer,
 });
 
+/**
+ * 瀵煎叆
+ */
+const [MaintPlanImportModal, maintPlanImportModalApi] = useVbenModal({
+  connectedComponent: maintPlanImportModal
+});
+
+function handleImport() {
+  maintPlanImportModalApi.open();
+}
+
 function handleAdd() {
   maintPlanDrawerApi.setData({});
   maintPlanDrawerApi.open();
@@ -145,6 +159,7 @@
   }
   const planOrder = {
     equId: record.equId,
+    planId: record.id,
     equName: record.equName,
     maintUser: record.maintUser,
     maintUserName: record.maintUserName,
@@ -153,7 +168,8 @@
     maintType: record.maintType,
     planTime: record.maintNextTime,
     status: MAINT_ORDER_STATUS.DAIBAOYANG,
-    maintCode: code
+    maintCode: code,
+    maintName: record.maintName
   };
 
   maintOrderDrawerApi.setData({ planOrder });
@@ -230,16 +246,24 @@
 onMounted(async () => {
   await setupDeptSelect();
 });
+
+// 閫変腑鏁版嵁
+function tableSelect() {
+  return tableApi.grid.getCheckboxRecords();
+}
 </script>
 
 <template>
   <Page :auto-content-height="true">
     <div class="flex h-full gap-[8px] flex-col">
-      <BasicTable class="h-2/3" table-title="淇濆吇璁″垝鍒楄〃">
+      <BasicTable  table-title="淇濆吇璁″垝鍒楄〃">
         <template #toolbar-tools>
           <Space>
             <a-button v-access:code="['eims:maintPlan:export']" @click="handleDownloadExcel">
               {{ $t('pages.common.export') }}
+            </a-button>
+            <a-button v-access:code="['eims:maintPlan:import']" @click="handleImport">
+              {{ $t('pages.common.import') }}
             </a-button>
             <a-button
               :disabled="!vxeCheckboxChecked(tableApi)"
@@ -285,9 +309,9 @@
           </Dropdown>
         </template>
       </BasicTable>
-      <BasisSubTable :columns="maintSrandCol" :list-api="listMaintStand" :req-value="equId" class="h-1/3" req-key="equId" title="淇濆吇瀹炴柦椤圭洰" />
     </div>
     <MaintPlanDrawer @reload="tableApi.query()" />
     <MaintOrderDrawer @reload="tableApi.query()" />
+    <MaintPlanImportModal @reload="tableApi.query()" />
   </Page>
 </template>

--
Gitblit v1.9.3