| | |
| | | |
| | | 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'; |
| | | |
| | |
| | | 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({ |
| | |
| | | connectedComponent: maintOrderDrawer, |
| | | }); |
| | | |
| | | /** |
| | | * 导入 |
| | | */ |
| | | const [MaintPlanImportModal, maintPlanImportModalApi] = useVbenModal({ |
| | | connectedComponent: maintPlanImportModal |
| | | }); |
| | | |
| | | function handleImport() { |
| | | maintPlanImportModalApi.open(); |
| | | } |
| | | |
| | | function handleAdd() { |
| | | maintPlanDrawerApi.setData({}); |
| | | maintPlanDrawerApi.open(); |
| | |
| | | maintType: record.maintType, |
| | | planTime: record.maintNextTime, |
| | | status: MAINT_ORDER_STATUS.DAIBAOYANG, |
| | | maintCode: code |
| | | maintCode: code, |
| | | maintName: record.maintName |
| | | }; |
| | | |
| | | maintOrderDrawerApi.setData({ planOrder }); |
| | |
| | | <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 |
| | |
| | | </div> |
| | | <MaintPlanDrawer @reload="tableApi.query()" /> |
| | | <MaintOrderDrawer @reload="tableApi.query()" /> |
| | | <MaintPlanImportModal @reload="tableApi.query()" /> |
| | | </Page> |
| | | </template> |