From 0e76431e5bc06a60c8103b39aa3b26f05bb2b810 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 24 十一月 2022 16:38:02 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx |  119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 118 insertions(+), 1 deletions(-)

diff --git a/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx
index b6c5913..35b9d60 100644
--- a/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx
+++ b/src/menu/components/chart/antv-G6/chartcompile/formconfig.jsx
@@ -2,7 +2,7 @@
  * @description 鑾峰彇鍥捐〃瑙嗗浘閰嶇疆琛ㄥ崟
  * @param {object} card       // 鍥捐〃瀵硅薄
  */
-export function getBaseForm (card) {
+export function getBaseForm (card, columns) {
   let appType = sessionStorage.getItem('appType')
   let roleList = sessionStorage.getItem('sysRoles')
   if (roleList) {
@@ -13,6 +13,32 @@
     }
   } else {
     roleList = []
+  }
+
+  let menulist = []
+
+  if (appType === 'pc') {
+    menulist = sessionStorage.getItem('appMenus')
+    if (menulist) {
+      try {
+        menulist = JSON.parse(menulist)
+      } catch (e) {
+        menulist = []
+      }
+    } else {
+      menulist = []
+    }
+  } else if (appType === '') {
+    menulist = sessionStorage.getItem('fstMenuList')
+    if (menulist) {
+      try {
+        menulist = JSON.parse(menulist)
+      } catch (e) {
+        menulist = []
+      }
+    } else {
+      menulist = []
+    }
   }
 
   return [
@@ -71,6 +97,97 @@
       required: false,
       options: roleList,
       forbid: !!appType
+    },
+    {
+      type: 'radio',
+      field: 'click',
+      label: '鐐瑰嚮浜嬩欢',
+      initval: card.click || '',
+      tooltip: '鐐瑰嚮鑺傜偣鏃惰Е鍙戠殑浜嬩欢銆�',
+      required: false,
+      options: [
+        {value: '', label: '鏁版嵁鍒囨崲'},
+        {value: 'menu', label: '鑿滃崟'},
+        {value: 'menus', label: '鑿滃崟缁�'}
+      ],
+      controlFields: [
+        {field: 'menu', values: ['menu']},
+        {field: 'menus', values: ['menus']},
+        {field: 'menuType', values: ['menus']},
+        {field: 'open', values: ['menu', 'menus']},
+        {field: 'joint', values: ['menu', 'menus']},
+      ]
+    },
+    {
+      type: appType === '' ? 'cascader' : 'select',
+      field: 'menu',
+      label: '鍏宠仈鑿滃崟',
+      initval: card.menu || (appType === '' ? [] : ''),
+      required: true,
+      extendName: 'MenuNo',
+      options: menulist
+    },
+    {
+      type: 'select',
+      field: 'menuType',
+      label: '鑿滃崟绫诲瀷',
+      initval: card.menuType || '',
+      required: true,
+      options: columns
+    },
+    {
+      type: 'radio',
+      field: 'open',
+      label: '鎵撳紑鏂瑰紡',
+      initval: card.open || 'blank',
+      required: false,
+      options: [
+        {value: 'blank', label: '鏂扮獥鍙�'},
+        {value: 'self', label: '褰撳墠绐楀彛'},
+      ],
+      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'] : [],
+      columns: [
+        {
+          title: '鏍囪瘑',
+          dataIndex: 'sign',
+          inputType: 'input',
+          editable: true,
+          unique: true,
+          required: false,
+          width: '35%'
+        },
+        {
+          title: '鑿滃崟',
+          dataIndex: 'menu',
+          inputType: !appType ? 'cascader' : 'select',
+          editable: true,
+          required: true,
+          extends: !appType ? 'Menu' : [{key: 'label', value: 'label'}],
+          width: '35%',
+          render: (text, record) => record.label,
+          options: menulist
+        }
+      ]
     }
   ]
 }

--
Gitblit v1.8.0