| | |
| | | import { DeleteEntity, getListByPage, SaveEntity } from '/@/api/tigerapi/system'; |
| | | import { useMessage } from '/@/hooks/web/useMessage'; |
| | | import { cloneDeep, isFunction } from 'lodash-es'; |
| | | import { isNullOrUnDef } from '/@/utils/is'; |
| | | import { isNullOrEmpty, isNullOrUnDef } from '/@/utils/is'; |
| | | import { CustModalParams } from '/@/api/tigerapi/model/systemModel'; |
| | | import { EntityCustFunctionType } from '/@/api/tigerapi/model/basModel'; |
| | | |
| | |
| | | }; |
| | | // 可以使用createImgPreview返回的 PreviewActions 来控制预览逻辑,实现类似幻灯片、自动旋转之类的骚操作 |
| | | createImgPreview({ |
| | | imageList: [dataSource.filter((q) => q.WORK_ORDER == others.value.WORK_ORDER)[0].LABEL_VIEW_PATH], |
| | | imageList: [ |
| | | dataSource.filter((q) => q.WORK_ORDER == others.value.WORK_ORDER)[0].LABEL_VIEW_PATH, |
| | | ], |
| | | defaultWidth: 700, |
| | | rememberState: true, |
| | | onImgLoad, |
| | |
| | | * @description: 删除行 |
| | | * @param {*} record |
| | | * @return {*} |
| | | */ |
| | | */ |
| | | function handleDel(record: EditRecordRow) { |
| | | //删除 |
| | | DeleteEntity(record, ctype.value).then((action) => { |
| | | if (action.IsSuccessed) { |
| | | reload(); |
| | | } |
| | | }); |
| | | if (!isNullOrEmpty(record.WORK_ORDER)) { |
| | | //删除 |
| | | DeleteEntity(record, ctype.value).then((action) => { |
| | | if (action.IsSuccessed) { |
| | | try { |
| | | const data = cloneDeep(record.editValueRefs); |
| | | console.log(data); |
| | | //TODO 此处将数据提交给服务器保存 |
| | | const [{ CustFunc }] = isNullOrUnDef(custImport.value['default']) |
| | | ? EntityCustFunction.value |
| | | : custImport.value['default'](); |
| | | if (CustFunc && isFunction(CustFunc)) { |
| | | CustFunc({ |
| | | others: others.value, |
| | | ctype: 'delete', |
| | | values: record, |
| | | }); |
| | | } |
| | | } catch (error) { |
| | | msg.error({ content: t('删除失败'), key: 'saving' }); |
| | | } |
| | | reload(); |
| | | } |
| | | }); |
| | | }else{ |
| | | msg.error({ content: t('没有需要删除的变量'), key: 'saving' }); |
| | | } |
| | | } |
| | | |
| | | /** |