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/index.vue |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/src/views/tigerprojects/system/lowcode/detail/index.vue b/src/views/tigerprojects/system/lowcode/detail/index.vue
index f64f685..0d23006 100644
--- a/src/views/tigerprojects/system/lowcode/detail/index.vue
+++ b/src/views/tigerprojects/system/lowcode/detail/index.vue
@@ -10,14 +10,13 @@
   <PageWrapper :title="pageTitle" :content="contentStr" contentBackground @back="goBack">
     <template #footer>
       <a-tabs default-active-key="detail" v-model:activeKey="currentKey" @tabClick="tabClkcallback">
-        <a-tab-pane key="detailfirst" :tab="firstTabName" />
-        <a-tab-pane key="detailsecond" :tab="secondTabName" />
+        <a-tab-pane v-for="t in TabList" :tab="t.name" :key="t.key" />
       </a-tabs>
     </template>
     <div>
-      <div v-if="currentKey == 'detailfirst'">
+      <div  v-for="t in TabList" :key="t.key">
         <Suspense>
-          <detail :entityName="entityName" />
+          <detail :entityName="t.entityName" v-if="currentKey == t.key"/>
         </Suspense>
       </div>
     </div>
@@ -25,20 +24,17 @@
 </template>
 
 <script lang="ts" setup>
-  import { ref, provide, Ref, defineAsyncComponent } from 'vue';
+  import { ref, reactive, provide, Ref, defineAsyncComponent } from 'vue';
   import { useRoute } from 'vue-router';
   import { PageWrapper } from '/@/components/Page';
   import { useTabs } from '/@/hooks/web/useTabs';
   import { Tabs } from 'ant-design-vue';
   import { useGo } from '/@/hooks/web/usePage';
-  import { OpenCustModal, custOnChange } from '../data';
+  import { custOnChange } from '../data';
   import { useI18n } from '/@/hooks/web/useI18n';
-  import { useMessage } from '/@/hooks/web/useMessage';
-  import { useGlobSetting } from '/@/hooks/setting';
 
   const { t } = useI18n();
   const detail = defineAsyncComponent(() => import('./detail.vue'));
-  const { createMessage } = useMessage();
   const route = useRoute();
   // const objParams = ref(JSON.parse(decodeURI(route.params?.id as string)));
   const routeParams = ref(JSON.parse(decodeURI(route.params?.id as string)));
@@ -51,17 +47,17 @@
   const go = useGo();
   const pageTitle = ref(objParams.value.pageTitle);
   const contentStr = ref(objParams.value.contentStr);
-  const firstTabName = ref(objParams.value.firstTabName);
-  const secondTabName = ref(objParams.value.secondTabName);
+  // const firstTabName = ref(objParams.value.firstTabName);
+  // const secondTabName = ref(objParams.value.secondTabName);
+  const TabList = reactive(objParams.value.Tabs);
   const entityName = ref(routeParams.value.Name);
   const detailName = ref(objParams.value.detailName);
-  const globSetting = useGlobSetting();
   const crudColSlots = ref<any>(objParams.value.colSlots);
   const keyFieldValues = ref<any>(null);
   provide<Ref<any>>('objParams', objParams.value);
   provide<Ref<any>>('keyFieldValues', keyFieldValues);
 
-  var currentKey = ref('detailfirst');
+  var currentKey = ref(TabList[0].key);
   const { setTitle } = useTabs();
 
   // 璁剧疆Tab鐨勬爣棰橈紙涓嶄細褰卞搷椤甸潰鏍囬锛�

--
Gitblit v1.9.3