| | |
| | | * @version: |
| | | * @Date: 2024-06-19 20:34:27 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-06-22 23:40:02 |
| | | * @LastEditTime: 2024-06-28 10:51:56 |
| | | */ |
| | | |
| | | import { ActionItem, BasicColumn } from '/@/components/Table'; |
| | |
| | | fixed: undefined, |
| | | }; |
| | | |
| | | /** |
| | | * @description: 一些自定义方法 |
| | | * @return {*} |
| | | */ |
| | | const methods = { |
| | | /** |
| | | * @description: 获取新增按钮的行为 |
| | | * @return {*} |
| | | */ |
| | | CreateAction: () => { |
| | | CreateAction: (fnName: string) => { |
| | | return { |
| | | action: 'drawer', //drawer(打开左侧抽屉框) | go(跳转到新的页面) |
| | | }; |
| | | }, |
| | | /** |
| | | * @description: 产品绑定工艺路线操作字段自定义按钮 |
| | | * @description: 操作字段自定义按钮 |
| | | * @return {*} |
| | | */ |
| | | ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => { |
| | |
| | | VAR_VALUE: d.values['val'], |
| | | }; |
| | | }, |
| | | OpenSelectItem:(openItemModal: Fn) => { |
| | | openItemModal(true, { |
| | | title: '过程变量列表', |
| | | schemas: [ |
| | | { |
| | | field: 'VAR_CODE', |
| | | component: 'Input', |
| | | label: '过程变量编码', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | OpenSelectItem: (openItemModal: Fn, ...args) => { |
| | | openItemModal(true, { |
| | | title: '过程变量列表', |
| | | schemas: [ |
| | | { |
| | | field: 'VAR_CODE', |
| | | component: 'Input', |
| | | label: '过程变量编码', |
| | | colProps: { |
| | | span: 12, |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('过程变量编码'), |
| | | dataIndex: 'VAR_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('过程变量名称'), |
| | | dataIndex: 'VAR_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_LABEL_PV', |
| | | rowKey: 'VAR_CODE', |
| | | searchInfo: {TABLE_NAME: 'BAS_LABEL_PV'} |
| | | }); |
| | | } |
| | | }, |
| | | ], |
| | | ItemColumns: [ |
| | | { |
| | | title: t('过程变量编码'), |
| | | dataIndex: 'VAR_CODE', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 200, |
| | | }, |
| | | { |
| | | title: t('过程变量名称'), |
| | | dataIndex: 'VAR_NAME', |
| | | resizable: true, |
| | | sorter: true, |
| | | width: 180, |
| | | }, |
| | | ], |
| | | tableName: 'BAS_LABEL_PV', |
| | | rowKey: 'VAR_CODE', |
| | | searchInfo: { TABLE_NAME: 'BAS_LABEL_PV' }, |
| | | }); |
| | | }, |
| | | }; |
| | | |
| | | return [methods, ActionColumn]; |