| | |
| | | |
| | | 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, |