From beaed6d077e7c3e9abfad68acb8c587835b5a406 Mon Sep 17 00:00:00 2001 From: baoshiwei <baoshiwei@shlanbao.cn> Date: 星期六, 12 四月 2025 16:17:16 +0800 Subject: [PATCH] feat(eims): 添加点检计划和保养计划的导入功能 --- eims-ui/apps/web-antd/src/views/eims/maint-plan/index.vue | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 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 2927a97..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'; @@ -15,11 +15,11 @@ 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, querySchema } from './data'; import maintPlanDrawer from './maint-plan-drawer.vue'; +import maintPlanImportModal from './maint-plan-import-modal.vue'; defineExpose({ @@ -95,6 +95,17 @@ connectedComponent: maintOrderDrawer, }); +/** + * 瀵煎叆 + */ +const [MaintPlanImportModal, maintPlanImportModalApi] = useVbenModal({ + connectedComponent: maintPlanImportModal +}); + +function handleImport() { + maintPlanImportModalApi.open(); +} + function handleAdd() { maintPlanDrawerApi.setData({}); maintPlanDrawerApi.open(); @@ -157,7 +168,8 @@ maintType: record.maintType, planTime: record.maintNextTime, status: MAINT_ORDER_STATUS.DAIBAOYANG, - maintCode: code + maintCode: code, + maintName: record.maintName }; maintOrderDrawerApi.setData({ planOrder }); @@ -250,6 +262,9 @@ <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)" danger @@ -297,5 +312,6 @@ </div> <MaintPlanDrawer @reload="tableApi.query()" /> <MaintOrderDrawer @reload="tableApi.query()" /> + <MaintPlanImportModal @reload="tableApi.query()" /> </Page> </template> -- Gitblit v1.9.3