From 3f3817a39238b262155cd5ec76fa351bb344602d Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期三, 01 一月 2025 21:33:57 +0800 Subject: [PATCH] 打印工单流程卡 --- src/views/tigerprojects/system/lowcode/detail/detail.vue | 35 ++++++++++++++++++++--------------- 1 files changed, 20 insertions(+), 15 deletions(-) diff --git a/src/views/tigerprojects/system/lowcode/detail/detail.vue b/src/views/tigerprojects/system/lowcode/detail/detail.vue index 14ba342..dd62fa0 100644 --- a/src/views/tigerprojects/system/lowcode/detail/detail.vue +++ b/src/views/tigerprojects/system/lowcode/detail/detail.vue @@ -65,7 +65,7 @@ </template> <script lang="ts" setup> import { Ref, inject, onMounted, ref } from 'vue'; - import { BasicTable, useTable, TableAction } from '/@/components/Table'; + import { BasicTable, useTable, TableAction, ActionItem } from '/@/components/Table'; import { BasicForm, useForm } from '/@/components/Form/index'; import { useDrawer } from '/@/components/Drawer'; import GeneralModal from '/@/views/components/GeneralModal.vue'; @@ -128,6 +128,7 @@ GetUseForm, GetUseModals, }, + ActionColumn ] = isNullOrUnDef(custImport.value['default']) ? EntityCustFunction.value : custImport.value['default'](); @@ -155,13 +156,15 @@ bordered: true, canResize: true, showIndexColumn: false, - actionColumn: { - width: 130, - title: '鎿嶄綔', - dataIndex: 'action', - slots: { customRender: 'action' }, - fixed: undefined, - }, //鑷畾涔夋搷浣滃垪 + actionColumn: ActionColumn + ? ActionColumn + : { + width: 120, + title: '鎿嶄綔', + dataIndex: 'action', + slots: { customRender: 'action' }, + fixed: 'right', + }, //鑷畾涔夋搷浣滃垪 }); onMounted(() => {}); @@ -175,7 +178,7 @@ const params = { record, isUpdate: true, - ifSave: false, + ifSave: objParams['ifSave'], entityName: props.entityName, formJson: GetCrudForm(), //getFormSchema(`${entityName.value}_Crud`), cType, @@ -187,7 +190,8 @@ selectVals, colSlots, }; - const actionItem = GenerateActionButton(params, buttons, openDrawer, reload); + const _actionItem: ActionItem[] = []; + const actionItem = GenerateActionButton(params, buttons, openDrawer, reload,_actionItem); if (isNullOrUnDef(custImport.value['default'])) { return actionItem; } @@ -217,7 +221,7 @@ if (isNullOrUnDef(custImport.value['default'])) { openDrawer(true, { isUpdate: false, - ifSave: false, + ifSave: objParams.value['ifSave'], entityName: props.entityName, formJson: _cruds, //getFormSchema(`${entityName.value}_Crud`), crudColSlots: colSlots.value, @@ -226,22 +230,23 @@ }); } else { const [{ CreateAction }] = custImport.value['default'](); - const result = CreateAction(fnName); + const result = CreateAction(props.entityName); switch (result.action) { case 'go': + sessionStorage.removeItem(`${result.params.Name}_update_params`); // 灏嗗璞¤浆鎹负JSON瀛楃涓插苟淇濆瓨鍒皊essionStorage sessionStorage.setItem( - `${result.params.Name}_params`, + `${result.params.Name}_update_params`, encodeURI(JSON.stringify(result.params)), ); go( - `/${result.url}/${encodeURI(JSON.stringify({ sName: result.params.Name, Name: result.params.Name }))}`, + `/${result.url}/${encodeURI(JSON.stringify({ sName: `${result.params.Name}_update`, Name: result.params.Name }))}`, ); break; case 'drawer': openDrawer(true, { isUpdate: false, - ifSave: false, + ifSave: objParams.value['ifSave'], entityName: props.entityName, formJson: _cruds, //getFormSchema(`${entityName.value}_Crud`), crudColSlots: colSlots.value, -- Gitblit v1.9.3