| | |
| | | * @version: |
| | | * @Date: 2024-06-22 00:58:43 |
| | | * @LastEditors: Ben Lin |
| | | * @LastEditTime: 2024-07-02 19:59:39 |
| | | * @LastEditTime: 2024-07-04 11:21:56 |
| | | */ |
| | | import { Ref, h } from 'vue'; |
| | | import { DeleteEntity, getEntity } from '/@/api/tigerapi/system'; |
| | |
| | | import { formatToDateTime } from '/@/utils/dateUtil'; |
| | | import { Tag } from 'ant-design-vue'; |
| | | import { useDrawer } from '/@/components/Drawer'; |
| | | import { EditOperation, Search } from '../data'; |
| | | import { EditOperation, Search, custDel } from '../data'; |
| | | |
| | | function _default() { |
| | | const ActionColumn: BasicColumn = { |
| | |
| | | * @description: 获取新增按钮的行为 |
| | | * @return {*} |
| | | */ |
| | | CreateAction: (fnName: string) => { |
| | | CreateAction: (type: string) => { |
| | | return { |
| | | action: 'drawer', //drawer(打开左侧抽屉框) | go(跳转到新的页面) |
| | | }; |
| | |
| | | */ |
| | | ActionItem: (params: Recordable<any>, data, ...args): ActionItem[] => { |
| | | if (!isNullOrUnDef(data[1])) { |
| | | data[1].popConfirm.confirm = rsnGrpDel.bind(null, args, params); |
| | | data[1].popConfirm.confirm = custDel.bind(null, args, params); |
| | | } |
| | | return data; |
| | | }, |
| | |
| | | submitFunc: () => Search('BAS_REASON', data, args[0]), //自定义查询提交按钮的方法,触发查询提交事件 |
| | | }, |
| | | useSearchForm: true, |
| | | showTableSetting: true, |
| | | showTableSetting: false, |
| | | bordered: true, |
| | | canResize: true, |
| | | showIndexColumn: false, |
| | |
| | | } |
| | | return data; |
| | | }, |
| | | OthersValues: (val: string, id: string) => { |
| | | KeyFieldValues: (val: string, id: string) => { |
| | | return { RSNG_CODE: val }; |
| | | }, |
| | | /** |
| | |
| | | } |
| | | }; |
| | | }, |
| | | GetUseForm: () => { |
| | | return {}; |
| | | }, |
| | | }; |
| | | |
| | | /* 以下是内部方法,不export,供上面的方法调用 */ |
| | | |
| | | /** |
| | | * @description: 自定义删除方法 |
| | | * @param {Fn} args |
| | | * @param {*} params |
| | | * @return {*} |
| | | */ |
| | | function rsnGrpDel(args: Fn[], params: {}) { |
| | | if (!isNullOrEmpty(params['data'])) { |
| | | var _data = params['data'].value.filter((item) => item['ID'] != params['record']['ID']); |
| | | params['data'].value = _data; |
| | | args[6]({ |
| | | dataSource: [], |
| | | }); |
| | | args[6]({ |
| | | dataSource: params['data'], |
| | | }); |
| | | args[1](); |
| | | } else { |
| | | DeleteEntity(params['record'], params['entityName']).then((action) => { |
| | | if (action.IsSuccessed) { |
| | | args[1](); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | const baseColumns = { |
| | | BAS_REASON: [ |