From f3d4db769ba9b51b799d981511a710fd443d0e08 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 21 四月 2025 12:18:03 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/menu/components/chart/antv-X6/chartcompile/formconfig.jsx |  183 ++++++++++++---------------------------------
 1 files changed, 49 insertions(+), 134 deletions(-)

diff --git a/src/menu/components/chart/antv-X6/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-X6/chartcompile/formconfig.jsx
index 9eed12a..eb79052 100644
--- a/src/menu/components/chart/antv-X6/chartcompile/formconfig.jsx
+++ b/src/menu/components/chart/antv-X6/chartcompile/formconfig.jsx
@@ -1,3 +1,6 @@
+
+import MenuUtils from '@/utils/utils-custom.js'
+
 /**
  * @description 鑾峰彇鍥捐〃瑙嗗浘閰嶇疆琛ㄥ崟
  * @param {object} card       // 鍥捐〃瀵硅薄
@@ -106,7 +109,8 @@
       tooltip: '鐐瑰嚮鑺傜偣鏃惰Е鍙戠殑浜嬩欢銆�',
       required: false,
       options: [
-        {value: '', label: '鏁版嵁鍒囨崲'},
+        {value: '', label: '鏃�'},
+        {value: 'switch', label: '鏁版嵁鍒囨崲'},
         {value: 'menu', label: '鑿滃崟'},
         {value: 'menus', label: '鑿滃崟缁�'}
       ],
@@ -115,7 +119,6 @@
         {field: 'menus', values: ['menus']},
         {field: 'menuType', values: ['menus']},
         {field: 'open', values: ['menu', 'menus']},
-        {field: 'joint', values: ['menu', 'menus']},
       ]
     },
     {
@@ -148,24 +151,13 @@
       forbid: appType !== 'pc'
     },
     {
-      type: 'radio',
-      field: 'joint',
-      label: '鍙傛暟鎷兼帴',
-      initval: card.joint || 'true',
-      required: false,
-      options: [
-        {value: 'true', label: '鏄�'},
-        {value: 'false', label: '鍚�'},
-      ],
-    },
-    {
       type: 'table',
       field: 'menus',
       label: '鑿滃崟缁�',
       initval: card.menus || [],
       required: true,
       span: 24,
-      actions: appType === 'pc' ? ['view'] : [],
+      actions: ['edit', 'del', 'add', 'move', 'view'],
       columns: [
         {
           title: '鏍囪瘑',
@@ -197,136 +189,71 @@
  * @param {object} card       // 鍥捐〃瀵硅薄
  * @param {Array}  columns    // 鏄剧ず鍒�
  */
-export function getOptionForm (card, columns) {
+export function getOptionForm (card, uuid) {
+  let menu = window.GLOB.customMenu
+  let modules = MenuUtils.getSupModules(menu.components, uuid, menu.interfaces)
+
   return [
     {
       type: 'select',
       field: 'subtype',
-      label: '绫诲瀷',
-      initval: card.subtype || 'mindmap',
+      label: '鍥捐〃绫诲瀷',
+      initval: card.subtype || 'xflow',
       required: true,
       options: [{
-        value: 'mindmap',
-        label: '鎬濈淮瀵煎浘'
+        value: 'xflow',
+        label: '娴佺▼鍥�'
       }, {
-        value: 'indentTree',
-        label: '缂╄繘鏂囦欢鏍�'
-      }, {
-        value: 'kapmap',
-        label: '鐭ヨ瘑鍥捐氨鏍�'
+        value: 'lane',
+        label: '娉抽亾鍥�'
       }],
       controlFields: [
-        {field: 'dirField', values: ['mindmap']},
-        {field: 'nodeColor', values: ['mindmap']},
-        // {field: 'collapsed', values: ['indentTree', 'kapmap']},
-      ]
+        {field: 'gridType', values: ['xflow']},
+        {field: 'backgroundColor', values: ['xflow']}
+      ],
     },
     {
       type: 'radio',
-      field: 'rootType',
-      label: '鏍硅妭鐐瑰彇鍊�',
-      initval: card.rootType || 'fixed',
-      tooltip: '閫夋嫨涓婄骇鏃讹紝璇峰~鍐欐牴鑺傜偣鐨勬枃鏈拰鍊肩殑瀛楁鍚�',
+      field: 'function',
+      label: '鍔熻兘',
+      initval: card.function || 'show',
       required: true,
-      options: [{
-        value: 'fixed',
-        label: '鍥哄畾鍊�'
-      }, {
-        value: 'supvalue',
-        label: '涓婄骇缁勪欢'
-      }, {
-        value: 'line',
-        label: '琛�'
-      }],
+      options: [
+        {value: 'edit', label: '娴佺▼缂栬緫'},
+        {value: 'show', label: '娴佺▼灞曠ず'},
+      ],
       controlFields: [
-        {field: 'rootLabel', values: ['fixed', 'supvalue']},
-        {field: 'rootValue', values: ['fixed', 'supvalue']},
-        {field: 'mark', values: ['line']},
+        {field: 'empty', values: ['show']}
       ]
     },
     {
-      type: 'text',
-      field: 'rootValue',
-      label: '鏍硅妭鐐瑰��',
-      initval: card.rootValue || '',
-      required: true
-    },
-    {
-      type: 'text',
-      field: 'rootLabel',
-      label: '鏍硅妭鐐规枃鏈�',
-      initval: card.rootLabel || '',
-      required: true
-    },
-    {
-      type: 'select',
-      field: 'valueField',
-      label: '鍊煎瓧娈�',
-      initval: card.valueField || '',
-      required: true,
-      options: columns
-    },
-    {
-      type: 'select',
-      field: 'labelField',
-      label: '鏂囨湰瀛楁',
-      initval: card.labelField || '',
-      required: true,
-      options: columns
-    },
-    {
-      type: 'select',
-      field: 'parentField',
-      label: '涓婄骇瀛楁',
-      initval: card.parentField || '',
-      required: true,
-      options: columns
-    },
-    {
-      type: 'text',
-      field: 'mark',
-      label: '椤剁骇鏍囪瘑',
-      initval: card.mark || '',
-      tooltip: '涓婄骇瀛楁鍊间笌椤剁骇鏍囪瘑鐩稿悓鏃讹紝瑙嗕负鏍硅妭鐐广��',
-      required: true
-    },
-    {
-      type: 'select',
-      field: 'dirField',
-      label: '鏂瑰悜鎺у埗',
-      initval: card.dirField || '',
+      type: 'cascader',
+      field: 'supModule',
+      label: '涓婄骇缁勪欢',
+      initval: card.supModule || [],
       required: false,
-      options: columns,
-      controlFields: [
-        {field: 'dirSign', notNull: true},
-        {field: 'leftColor', notNull: true},
-      ]
+      options: modules,
+      allowClear: true
     },
     {
-      type: 'text',
-      field: 'dirSign',
-      label: '宸﹀悜鏍囪',
-      initval: card.dirSign || '',
-      tooltip: '褰撹妭鐐瑰�间笌鏍囪鐩稿悓鏃惰妭鐐逛俊鎭綅浜庤妭鐐瑰乏渚э紝澶氫釜鍊艰鐢ㄩ�楀彿鍒嗛殧銆�',
-      required: false
+      type: 'radio',
+      field: 'gridType',
+      label: '缃戞牸',
+      initval: card.gridType || 'none',
+      required: false,
+      options: [
+        {value: 'none', label: '鏃�'},
+        {value: 'dot', label: '鐐圭姸缃戞牸'},
+        {value: 'mesh', label: '缃戠姸缃戞牸'}
+      ],
     },
     {
       type: 'color',
-      field: 'nodeColor',
-      label: '鑺傜偣棰滆壊',
-      initval: card.nodeColor || '#1890ff',
-      tooltip: '鍙充晶鑺傜偣鐨勬爣璁伴鑹层��',
-      colorType: 'hex',
-      required: false
-    },
-    {
-      type: 'color',
-      field: 'leftColor',
-      label: '宸﹁妭鐐归鑹�',
-      initval: card.leftColor || '#26C281',
-      tooltip: '宸︿晶鑺傜偣鐨勬爣璁伴鑹层��',
-      colorType: 'hex',
-      required: false
+      field: 'backgroundColor',
+      label: '鑳屾櫙鑹�',
+      initval: card.backgroundColor || '',
+      required: false,
+      allowClear: true
     },
     {
       type: 'radio',
@@ -339,18 +266,6 @@
         {value: 'show', label: '鍚�'},
         {value: 'hidden', label: '鏄�'},
       ],
-    },
-    {
-      type: 'radio',
-      field: 'collapsed',
-      label: '鑺傜偣鍚堝苟',
-      initval: card.collapsed || 'false',
-      tooltip: '涓�绾ц妭鐐规槸鍚﹀悎骞躲��',
-      required: false,
-      options: [
-        {value: 'false', label: '鍚�'},
-        {value: 'true', label: '鏄�'},
-      ],
-    },
+    }
   ]
 }

--
Gitblit v1.8.0