From 745815f637e5385b2cbc23a6ae02401bb8b6c675 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期六, 08 三月 2025 14:22:36 +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 dfffafd..4326f66 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']();
@@ -141,11 +142,12 @@
   /* 琛ㄥ崟涓彃妲芥覆鏌撴寜閽墦寮�妯℃�佹useModal鏂规硶 */
   const modals = GetUseModals && isFunction(GetUseModals) ? GetUseModals() : { useModalData: {} };
   const useModalData = ref(modals['useModalData']);
+  const CurrTabInfo = objParams['Tabs'].filter(q=>q.entityName == props.entityName)[0];
   const [registerTable, { getForm, reload, setProps }] = useTable({
-    title: `${objParams['firstTitle']}鍒楄〃`,
+    title: `${CurrTabInfo.tableTitle}鍒楄〃`,
     api: getListByPage,
-    searchInfo: { TABLE_NAME: objParams['Name'], ...objParams['keyFieldValues'] },
-    columns: GetBaseColumns(),
+    searchInfo: { TABLE_NAME: CurrTabInfo.entityName, ...objParams['keyFieldValues'] },
+    columns: GetBaseColumns(CurrTabInfo.entityName),
     formConfig: {
       labelWidth: 140,
       schemas: GetSearchForm(),
@@ -155,13 +157,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 +179,7 @@
     const params = {
       record,
       isUpdate: true,
-      ifSave: false,
+      ifSave: objParams['ifSave'],
       entityName: props.entityName,
       formJson: GetCrudForm(), //getFormSchema(`${entityName.value}_Crud`),
       cType,
@@ -187,7 +191,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 +222,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,
@@ -242,7 +247,7 @@
         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