From 697c405ac874da346e74df40266763370355154d Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期六, 08 三月 2025 15:40:25 +0800
Subject: [PATCH] ASN单

---
 src/views/tigerprojects/system/lowcode/detail/detail.vue |   40 +++++++++++++++++++++++++---------------
 1 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/src/views/tigerprojects/system/lowcode/detail/detail.vue b/src/views/tigerprojects/system/lowcode/detail/detail.vue
index e6c3c57..4518d72 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,27 +142,35 @@
   /* 琛ㄥ崟涓彃妲芥覆鏌撴寜閽墦寮�妯℃�佹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']}鍒楄〃`,
-    api: getListByPage,
-    searchInfo: { TABLE_NAME: objParams['Name'], ...objParams['keyFieldValues'] },
-    columns: GetBaseColumns(),
+    title: `${CurrTabInfo.tableTitle}鍒楄〃`,
+    api: getListByPage, //閫氱敤鏌ヨ鏂规硶
+    searchInfo: {
+      TABLE_NAME: CurrTabInfo.entityName,
+      NeedInclude: CurrTabInfo.NeedInclude,
+      ...objParams['keyFieldValues'],
+    }, //鏌ヨ鏉′欢涓殑TABLE_NAME浼犲叆椤电淇℃伅涓搴旂殑瀹炰綋鍚岰urrTabInfo.entityName
+    columns: GetBaseColumns(CurrTabInfo.entityName), //浼犲叆椤电淇℃伅涓搴旂殑瀹炰綋鍚岰urrTabInfo.entityName鑾峰彇琛ㄦ牸瀛楁淇℃伅
     formConfig: {
       labelWidth: 140,
-      schemas: GetSearchForm(),
+      schemas: GetSearchForm(CurrTabInfo.entityName), //浼犲叆椤电淇℃伅涓搴旂殑瀹炰綋鍚岰urrTabInfo.entityName鑾峰彇鏌ヨ琛ㄥ崟鐨勫瓧娈典俊鎭�
     },
     useSearchForm: true,
     showTableSetting: true,
     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 +184,7 @@
     const params = {
       record,
       isUpdate: true,
-      ifSave: objParams.value['ifSave'],
+      ifSave: objParams['ifSave'],
       entityName: props.entityName,
       formJson: GetCrudForm(), //getFormSchema(`${entityName.value}_Crud`),
       cType,
@@ -187,7 +196,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;
     }

--
Gitblit v1.9.3