From 5d3661fd40aa5fe0f669edb18b1c2aed458fb4e8 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期二, 11 六月 2024 14:03:58 +0800
Subject: [PATCH] 低代码更新,工单更新

---
 src/layouts/default/menu/index.vue |   32 +++++++++++++++++++++++++++++---
 1 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/src/layouts/default/menu/index.vue b/src/layouts/default/menu/index.vue
index 1fa9d55..974add8 100644
--- a/src/layouts/default/menu/index.vue
+++ b/src/layouts/default/menu/index.vue
@@ -15,10 +15,11 @@
   import { useSplitMenu } from './useLayoutMenu';
   import { openWindow } from '/@/utils';
   import { propTypes } from '/@/utils/propTypes';
-  import { isUrl } from '/@/utils/is';
+  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';
 
   export default defineComponent({
     name: 'LayoutMenu',
@@ -110,8 +111,33 @@
        * @param menu
        */
 
-      function handleMenuClick(path: string) {
-        go(path);
+       function handleMenuClick(path: string) {
+        if (path.split('/').length > 1 && path.split('/')[2] == 'LC') {
+          getEntity({
+          sqlcmd: `ASSEMBLY_NAME ='${path.split('/')[1]}'`,
+          entityName: 'SYS_LOW_CODE',
+        }).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']);
+            }
+          }
+
+          var _cruds = JSON.parse(data.Data.Items[0].FORM_JSON);
+          let crudColSlots = [] as string[];
+          for (const i in _cruds) {
+            if(!isNullOrUnDef(_cruds[i]['colSlot'])){
+              crudColSlots.push(_cruds[i]['colSlot']);
+            }
+          }
+          const id = { ID: path.split('/')[1], colSlots: colSlots, crudColSlots: crudColSlots };
+          go(`/${path.split('/')[1]}/${path.split('/')[2]}/${encodeURI(JSON.stringify(id))}`);
+          });
+        } else {
+          go(path);
+        }
       }
 
       /**

--
Gitblit v1.9.3