| | |
| | | import type { VxeTableGridOptions } from '#/adapter/vxe-table'; |
| | | import type { MesPdParameterApi } from '#/api/mes/pro/processdesign/parameter'; |
| | | |
| | | import { Page, useVbenModal } from '../../../../packages/effects/common-ui/src'; |
| | | import { Page, useVbenModal } from '@vben/common-ui'; |
| | | |
| | | import { Button, message } from 'ant-design-vue'; |
| | | |
| | |
| | | exportParameterExcel, |
| | | } from '#/api/mes/pro/processdesign/parameter'; |
| | | import { $t } from '#/locales'; |
| | | import { downloadFileFromBlobPart } from '../../../../packages/utils/src'; |
| | | import { downloadFileFromBlobPart } from '@vben/utils'; |
| | | |
| | | import { useGridColumns, useGridFormSchema } from './data'; |
| | | import Form from './modules/form.vue'; |
| | | import ProcessLinkDialog from './modules/process-link-dialog.vue'; |
| | | |
| | | const [FormModal, formModalApi] = useVbenModal({ |
| | | connectedComponent: Form, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | const [ProcessLinkModal, processLinkModalApi] = useVbenModal({ |
| | | connectedComponent: ProcessLinkDialog, |
| | | destroyOnClose: true, |
| | | }); |
| | | |
| | | /** 刷新表格 */ |
| | | function handleRefresh() { |
| | | gridApi.query(); |
| | | } |
| | | |
| | | /** 查看该参数被哪些工序绑定 */ |
| | | function handleViewProcessLink(row: MesPdParameterApi.Parameter) { |
| | | processLinkModalApi |
| | | .setData({ paramId: row.id, paramName: row.paramName }) |
| | | .open(); |
| | | } |
| | | |
| | | /** 创建工艺参数 */ |
| | |
| | | |
| | | <template> |
| | | <Page auto-content-height><FormModal @success="handleRefresh" /> |
| | | <ProcessLinkModal /> |
| | | <Grid table-title="工艺参数列表"> |
| | | <template #toolbar-tools> |
| | | <TableAction |
| | |
| | | <TableAction |
| | | :actions="[ |
| | | { |
| | | label: '关联工序', |
| | | type: 'link', |
| | | icon: ACTION_ICON.LINK, |
| | | auth: ['mes:pd:parameter:update'], |
| | | onClick: handleViewProcessLink.bind(null, row), |
| | | }, |
| | | { |
| | | label: $t('common.edit'), |
| | | type: 'link', |
| | | icon: ACTION_ICON.EDIT, |