| | |
| | | <div> |
| | | <BasicTable @register="registerTable"> |
| | | <template #toolbar> |
| | | <a-button type="primary" @click="handleCreate"> 新增工艺路线 </a-button> |
| | | <a-button type="primary" @click="handleCreate" preIcon="add_02|svg"> 新增 </a-button> |
| | | </template> |
| | | <template #action="{ record }"> |
| | | <TableAction |
| | |
| | | { |
| | | icon: 'clarity:note-edit-line', |
| | | onClick: handleEdit.bind(null, record), |
| | | name: undefined, |
| | | }, |
| | | { |
| | | icon: 'gphDesign|svg', |
| | | onClick: handleDesign.bind(null, record), |
| | | name: undefined, |
| | | }, |
| | | { |
| | | icon: 'ant-design:delete-outlined', |
| | |
| | | placement: 'left', |
| | | confirm: handleDelete.bind(null, record), |
| | | }, |
| | | name: undefined, |
| | | }, |
| | | ]" |
| | | /> |
| | |
| | | go('/RouteDetail/' + record.ID); |
| | | } else { |
| | | createErrorModal({ |
| | | title: t('提示'), |
| | | title: t('警告'), |
| | | content: t('工艺路线未启用不能设计'), |
| | | getContainer: () => document.body, |
| | | }); |
| | |
| | | function handleDelete(record: Recordable) { |
| | | console.log(record); |
| | | //删除工艺路线 |
| | | const apiAction = DeleteRoute(record); |
| | | const apiAction = DeleteRoute(record.ID); |
| | | apiAction.then((action) => { |
| | | if (action.IsSuccessed) { |
| | | reload(); |