From e41a64966b7832baffe96c21d1ea77ef6adb2905 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 14 十月 2021 18:31:55 +0800
Subject: [PATCH] 2021-10-14

---
 src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx
index 195f5b0..a4d79f5 100644
--- a/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx
+++ b/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx
@@ -8,7 +8,8 @@
  * @param {object} card       // 鍥捐〃瀵硅薄
  */
 export function getBaseForm (card) {
-  let isApp = sessionStorage.getItem('appType') === 'pc'
+  let appType = sessionStorage.getItem('appType')
+  let isApp = appType === 'pc' || appType === 'mob'
   let menulist = null
 
   if (isApp) {
@@ -27,7 +28,7 @@
           return item
         })
       }
-    } catch {
+    } catch (e) {
       menulist = []
     }
   } else {
@@ -38,7 +39,7 @@
   if (roleList) {
     try {
       roleList = JSON.parse(roleList)
-    } catch {
+    } catch (e) {
       roleList = []
     }
   } else {
@@ -83,15 +84,6 @@
       required: true
     },
     {
-      type: 'select',
-      key: 'blacklist',
-      label: '榛戝悕鍗�',
-      initVal: card.blacklist || [],
-      multi: true,
-      required: false,
-      options: roleList
-    },
-    {
       type: 'cascader',
       key: 'linkmenu',
       label: '鍏宠仈鑿滃崟',
@@ -122,6 +114,16 @@
         { value: 'blank', text: '鏂扮獥鍙�' },
         { value: 'self', text: '褰撳墠绐楀彛' }
       ]
+    },
+    {
+      type: 'select',
+      key: 'blacklist',
+      label: '榛戝悕鍗�',
+      initVal: card.blacklist || [],
+      multi: true,
+      required: false,
+      options: roleList,
+      forbid: !!appType
     }
   ]
 }
@@ -131,6 +133,7 @@
  * @param {Array}  columns    // 鏄剧ず鍒�
  */
 export function getOptionForm (card, columns) {
+  let appType = sessionStorage.getItem('appType')
   let xfields = columns.filter(item => /^Nvarchar/ig.test(item.datatype))
   let yfields = columns.filter(item => /^(Int|Decimal)/ig.test(item.datatype))
 
@@ -314,6 +317,7 @@
       initVal: card.interaction || [],
       multi: true,
       required: false,
+      forbid: appType === 'mob',
       options: [
         { value: 'element-active', label: '鍏冪礌鑱氱劍' },
         { value: 'element-selected', label: '鍏冪礌閫変腑锛堝閫夛級' },

--
Gitblit v1.8.0