| | |
| | | import { |
| | | deleteProcessListener, |
| | | getProcessListenerPage, |
| | | importProcessListener, |
| | | importProcessListenerTemplate, |
| | | } from '#/api/bpm/processListener'; |
| | | import { $t } from '#/locales'; |
| | | |
| | | import ImportModalComponent from '#/components/import-modal'; |
| | | |
| | | import { useGridColumns, useGridFormSchema } from './data'; |
| | | import Form from './modules/form.vue'; |
| | | |
| | | const [FormModal, formModalApi] = useVbenModal({ |
| | | connectedComponent: Form, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | const [ImportModal, importModalApi] = useVbenModal({ |
| | | connectedComponent: ImportModalComponent, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | |
| | | /** 创建流程监听器 */ |
| | | function handleCreate() { |
| | | formModalApi.setData(null).open(); |
| | | } |
| | | |
| | | /** 导入流程监听器 */ |
| | | function handleImport() { |
| | | importModalApi |
| | | .setData({ |
| | | title: $t('ui.actionTitle.import', ['流程监听器']), |
| | | fileName: '流程监听器导入模板.xls', |
| | | importFn: importProcessListener, |
| | | templateFn: importProcessListenerTemplate, |
| | | }) |
| | | .open(); |
| | | } |
| | | |
| | | /** 编辑流程监听器 */ |
| | |
| | | |
| | | <template> |
| | | <Page auto-content-height><FormModal @success="handleRefresh" /> |
| | | <ImportModal @success="handleRefresh" /> |
| | | <Grid table-title="流程监听器"> |
| | | <template #toolbar-tools> |
| | | <TableAction |
| | |
| | | auth: ['bpm:process-listener:create'], |
| | | onClick: handleCreate, |
| | | }, |
| | | { |
| | | label: $t('ui.actionTitle.import', ['流程监听器']), |
| | | type: 'primary', |
| | | icon: ACTION_ICON.UPLOAD, |
| | | auth: ['bpm:process-listener:import'], |
| | | onClick: handleImport, |
| | | }, |
| | | ]" |
| | | /> |
| | | </template> |