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/layouts/default/menu/index.vue |   66 +++++++++++++++++++++------------
 1 files changed, 42 insertions(+), 24 deletions(-)

diff --git a/src/layouts/default/menu/index.vue b/src/layouts/default/menu/index.vue
index 1da1679..6230c96 100644
--- a/src/layouts/default/menu/index.vue
+++ b/src/layouts/default/menu/index.vue
@@ -2,24 +2,24 @@
   import type { PropType, CSSProperties } from 'vue';
 
   import { computed, defineComponent, unref, toRef } from 'vue';
-  import { BasicMenu } from '/@/components/Menu';
-  import { SimpleMenu } from '/@/components/SimpleMenu';
-  import { AppLogo } from '/@/components/Application';
+  import { BasicMenu } from '@/components/Menu';
+  import { SimpleMenu } from '@/components/SimpleMenu';
+  import { AppLogo } from '@/components/Application';
 
-  import { MenuModeEnum, MenuSplitTyeEnum } from '/@/enums/menuEnum';
+  import { MenuModeEnum, MenuSplitTyeEnum } from '@/enums/menuEnum';
 
-  import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
-  import { ScrollContainer } from '/@/components/Container';
+  import { useMenuSetting } from '@/hooks/setting/useMenuSetting';
+  import { ScrollContainer } from '@/components/Container';
 
-  import { useGo } from '/@/hooks/web/usePage';
+  import { useGo } from '@/hooks/web/usePage';
   import { useSplitMenu } from './useLayoutMenu';
-  import { openWindow } from '/@/utils';
-  import { propTypes } from '/@/utils/propTypes';
-  import { isNullOrUnDef, isUrl } from '/@/utils/is';
-  import { useRootSetting } from '/@/hooks/setting/useRootSetting';
-  import { useAppInject } from '/@/hooks/web/useAppInject';
-  import { useDesign } from '/@/hooks/web/useDesign';
-import { getEntity } from '/@/api/tigerapi/system';
+  import { openWindow } from '@/utils';
+  import { propTypes } from '@/utils/propTypes';
+  import { isHttpUrl, isNullOrUnDef } from '@/utils/is';
+  import { useRootSetting } from '@/hooks/setting/useRootSetting';
+  import { useAppInject } from '@/hooks/web/useAppInject';
+  import { useDesign } from '@/hooks/web/useDesign';
+  import { getEntity } from '/@/api/tigerapi/system';
 
   export default defineComponent({
     name: 'LayoutMenu',
@@ -111,30 +111,48 @@
        * @param menu
        */
 
-       function handleMenuClick(path: string) {
-        if (path.split('/').length > 1 && path.split('/')[2] == 'LC') {
-            getEntity({
-            sqlcmd: `ASSEMBLY_NAME ='${path.split('/')[1]}'`,
+      function handleMenuClick(path: string) {
+        if (path.split('/').length > 2 && path.split('/')[2] == 'LC') {
+          getEntity({
+            sqlcmd: `CODE_NAME ='${path.split('/')[1]}'`,
             entityName: 'SYS_LOW_CODE',
+            order: '',
           }).then((data) => {
             var searchForms = JSON.parse(data.Data.Items[0].SEARCH_FORM_JSON);
             let colSlots = [] as string[];
             for (const i in searchForms) {
-              if(!isNullOrUnDef(searchForms[i]['colSlot'])){
-                colSlots.push('form-'+searchForms[i]['colSlot']);
+              if (!isNullOrUnDef(searchForms[i]['colSlot'])) {
+                colSlots.push('form-' + searchForms[i]['colSlot']);
               }
             }
 
             var _cruds = JSON.parse(data.Data.Items[0].FORM_JSON);
             let crudColSlots = [] as string[];
             for (const i in _cruds) {
-              if(!isNullOrUnDef(_cruds[i]['colSlot'])){
+              if (!isNullOrUnDef(_cruds[i]['colSlot'])) {
                 crudColSlots.push(_cruds[i]['colSlot']);
               }
             }
-            const id = { ID: path.split('/')[1], colSlots: colSlots, crudColSlots: crudColSlots };
+            const id = { ID:path.split('/')[1], EntityName: data.Data.Items[0].ASSEMBLY_NAME, colSlots: colSlots, crudColSlots: crudColSlots };
             go(`/${path.split('/')[1]}/${path.split('/')[2]}/${encodeURI(JSON.stringify(id))}`);
           });
+        } else if (
+          (path.split('/').length > 2 && path.split('/')[2] == 'High') ||
+          path.split('/')[2] == 'CP'
+        ) {
+          const id = {
+            Name: path.split('/')[1],
+            Title: `${path.split('/')[1]}`,
+            colSlots: [],
+            crudColSlots: [],
+            OtherTableName: [],
+            SessionName:
+              `${path.split('/')[1]}_update` /* session鍚嶏紝鐢ㄦ潵浼犻�掑弬鏁帮紝涓嶅湪娴忚鍣ㄥ湴鍧�鏍忔樉绀� */,
+          };
+          // 灏嗗璞¤浆鎹负JSON瀛楃涓插苟淇濆瓨鍒皊essionStorage
+          sessionStorage.removeItem(`${id.SessionName}_params`);
+          sessionStorage.setItem(`${id.SessionName}_params`, encodeURI(JSON.stringify(id)));
+          go(`/${path.split('/')[1]}/${path.split('/')[2]}/${encodeURI(JSON.stringify({ sName: id.SessionName, Name: id.Name }))}`);
         } else {
           go(path);
         }
@@ -145,7 +163,7 @@
        * @param menu
        */
       async function beforeMenuClickFn(path: string) {
-        if (!isUrl(path)) {
+        if (!isHttpUrl(path)) {
           return true;
         }
         openWindow(path);
@@ -207,7 +225,7 @@
       padding: 10px 4px 10px 10px;
 
       img {
-        width: 150px; //@logo-width;
+        width: @logo-width;
         height: @logo-width;
       }
     }

--
Gitblit v1.9.3