| | |
| | | component: 'RadioGroup', |
| | | componentProps: { |
| | | buttonStyle: 'solid', |
| | | disabled: false, |
| | | disabled: true, |
| | | optionType: 'button', |
| | | options: getDictOptions(DICT_TYPE.COMMON_STATUS, 'number'), |
| | | }, |
| | |
| | | } |
| | | |
| | | /** 列表的字段 */ |
| | | export function useGridColumns( |
| | | onStatusChange?: ( |
| | | newStatus: number, |
| | | row: MesMdItemApi.Item, |
| | | ) => PromiseLike<boolean | undefined>, |
| | | ): VxeTableGridOptions<MesMdItemApi.Item>['columns'] { |
| | | export function useGridColumns(): VxeTableGridOptions<MesMdItemApi.Item>['columns'] { |
| | | return [ |
| | | { |
| | | field: 'code', |
| | |
| | | { |
| | | field: 'status', |
| | | title: '状态', |
| | | width: 120, |
| | | width: 100, |
| | | align: 'center', |
| | | cellRender: { |
| | | attrs: { beforeChange: onStatusChange }, |
| | | name: 'CellSwitch', |
| | | props: { |
| | | checkedValue: CommonStatusEnum.ENABLE, |
| | | unCheckedValue: CommonStatusEnum.DISABLE, |
| | | }, |
| | | name: 'CellDict', |
| | | props: { type: DICT_TYPE.COMMON_STATUS }, |
| | | }, |
| | | }, |
| | | { |