From eed5279d84fd59bc32f060a31b4006590cee4320 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 一月 2024 17:01:59 +0800
Subject: [PATCH] Merge branch 'master' into positec

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

diff --git a/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx
index d6bb257..06a5266 100644
--- a/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx
+++ b/src/menu/components/chart/antv-pie/chartcompile/formconfig.jsx
@@ -46,24 +46,24 @@
   return [
     {
       type: 'text',
-      key: 'title',
+      field: 'title',
       label: '鏍囬',
-      initVal: card.title,
+      initval: card.title,
       required: false
     },
     {
       type: 'text',
-      key: 'name',
+      field: 'name',
       label: '缁勪欢鍚嶇О',
-      initVal: card.name,
+      initval: card.name,
       tooltip: '鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�',
       required: true
     },
     {
       type: 'number',
-      key: 'width',
+      field: 'width',
       label: '瀹藉害',
-      initVal: card.width,
+      initval: card.width,
       tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��',
       min: 1,
       max: 24,
@@ -72,75 +72,67 @@
     },
     {
       type: 'styleInput',
-      key: 'height',
+      field: 'height',
       label: '鍥捐〃楂樺害',
-      initVal: card.height,
+      initval: card.height,
       tooltip: '鍥捐〃缁樺浘鍖哄煙鐨勯珮搴︼紝涓嶅寘鎷爣棰樺強鍐呭杈硅窛銆�',
       required: true,
       options: ['px', 'vh', 'vw']
     },
     {
-      type: 'cascader',
-      key: 'linkmenu',
+      type: isApp ? 'select' : 'cascader',
+      field: 'linkmenu',
       label: '鍏宠仈鑿滃崟',
-      initVal: card.linkmenu || [],
-      tooltip: '鍙屽嚮楗煎浘锛屼細鎵撳紑鍏宠仈鐨勮彍鍗曘��',
+      initval: card.linkmenu || (isApp ? '' : []),
+      tooltip: '鐐瑰嚮楗煎浘锛屼細鎵撳紑鍏宠仈鐨勮彍鍗曘��',
       required: false,
-      forbid: isApp,
-      options: menulist
-    },
-    {
-      type: 'select',
-      key: 'linkmenu',
-      label: '鍏宠仈鑿滃崟',
-      initVal: card.linkmenu || '',
-      tooltip: '鍙屽嚮楗煎浘锛屼細鎵撳紑鍏宠仈鐨勮彍鍗曘��',
-      required: false,
-      forbid: !isApp,
-      options: menulist
-    },
-    {
-      type: 'radio',
-      key: 'open',
-      label: '鎵撳紑鏂瑰紡',
-      initVal: card.open || 'blank',
-      required: false,
-      forbid: !isApp,
-      options: [
-        { value: 'blank', text: '鏂扮獥鍙�' },
-        { value: 'self', text: '褰撳墠绐楀彛' }
+      forbid: appType === 'mob',
+      options: menulist,
+      controlFields: [
+        {field: 'open', notNull: true },
       ]
     },
     {
       type: 'radio',
-      key: 'permission',
+      field: 'open',
+      label: '鎵撳紑鏂瑰紡',
+      initval: card.open || 'blank',
+      required: false,
+      forbid: appType !== 'pc',
+      options: [
+        { value: 'blank', label: '鏂扮獥鍙�' },
+        { value: 'self', label: '褰撳墠绐楀彛' }
+      ]
+    },
+    {
+      type: 'radio',
+      field: 'permission',
       label: '鏉冮檺楠岃瘉',
-      initVal: card.permission || 'false',
+      initval: card.permission || 'false',
       required: false,
       options: [
-        {value: 'true', text: '鍚敤'},
-        {value: 'false', text: '绂佺敤'},
+        {value: 'true', label: '鍚敤'},
+        {value: 'false', label: '绂佺敤'},
       ],
       forbid: !appType || ispop || isprint
     },
     {
       type: 'radio',
-      key: 'cacheLocal',
+      field: 'cacheLocal',
       label: '鏈湴缂撳瓨',
-      initVal: card.cacheLocal || 'true',
+      initval: card.cacheLocal || 'true',
       required: false,
       options: [
-        {value: 'true', text: '缁ф壙鑿滃崟'},
-        {value: 'false', text: '绂佺敤'},
+        {value: 'true', label: '缁ф壙鑿滃崟'},
+        {value: 'false', label: '绂佺敤'},
       ],
       forbid: ispop || isprint
     },
     {
-      type: 'select',
-      key: 'blacklist',
+      type: 'multiselect',
+      field: 'blacklist',
       label: '榛戝悕鍗�',
-      initVal: card.blacklist || [],
-      multi: true,
+      initval: card.blacklist || [],
       required: false,
       options: roleList,
       forbid: !!appType || isprint
@@ -153,55 +145,61 @@
  * @param {Array}  columns    // 鏄剧ず鍒�
  */
 export function getOptionForm (card, columns) {
-  let appType = sessionStorage.getItem('appType')
+  // 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))
 
   return [
     {
       type: 'radio',
-      key: 'shape',
+      field: 'shape',
       label: '褰㈢姸',
-      initVal: card.shape || 'pie',
+      initval: card.shape || 'pie',
       required: false,
       options: [
-        { value: 'pie', text: '楗煎浘' },
-        { value: 'ring', text: '鐜浘' },
-        { value: 'nest', text: '宓屽' },
-        { value: 'nightingale', text: '鍗椾竵鏍煎皵鍥�' }
+        { value: 'pie', label: '楗煎浘' },
+        { value: 'ring', label: '鐜浘' },
+        { value: 'nest', label: '宓屽' }
+      ],
+      controlFields: [
+        {field: 'type', values: ['nest']},
+        {field: 'legend', values: ['pie', 'ring']},
+        {field: 'show', values: ['pie', 'ring']},
+        {field: 'splitLine', values: ['pie', 'ring']},
+        {field: 'splitColor', values: ['pie', 'ring']},
+        {field: 'innerRadius', values: ['nest', 'ring']},
       ]
     },
     {
       type: 'select',
-      key: 'Xaxis',
+      field: 'Xaxis',
       label: '鍚嶇О',
-      initVal: card.Xaxis || '',
+      initval: card.Xaxis || '',
       required: true,
       options: xfields
     },
     {
       type: 'select',
-      key: 'Yaxis',
+      field: 'Yaxis',
       label: '鍊�',
-      initVal: card.Yaxis || '',
+      initval: card.Yaxis || '',
       required: true,
       options: yfields
     },
     {
       type: 'select',
-      key: 'type',
+      field: 'type',
       label: '绫诲瀷',
-      initVal: card.type || '',
+      initval: card.type || '',
       tooltip: '鍐呯幆鐨勫垎绫诲瓧娈点��',
       required: true,
       options: xfields,
-      hidden: card.shape !== 'nest',
     },
     {
       type: 'select',
-      key: 'legend',
+      field: 'legend',
       label: '鍥句緥浣嶇疆',
-      initVal: card.legend || 'bottom',
+      initval: card.legend || 'bottom',
       required: false,
       options: [
         { field: 'bottom', label: '涓�' },
@@ -218,13 +216,12 @@
         { field: 'left-bottom', label: '宸︿笅' },
         { field: 'hidden', label: '闅愯棌' }
       ],
-      hidden: card.shape === 'nest',
     },
     {
       type: 'number',
-      key: 'radius',
+      field: 'radius',
       label: '澶栫幆',
-      initVal: card.radius || 75,
+      initval: card.radius || 75,
       tooltip: '鍥惧舰鎵�鍗犲尯鍩熺殑鐧惧垎鐜囥��',
       min: 30,
       max: 100,
@@ -233,134 +230,137 @@
     },
     {
       type: 'number',
-      key: 'innerRadius',
+      field: 'innerRadius',
       label: '鍐呯幆',
-      initVal: card.innerRadius || 0,
+      initval: card.innerRadius || 0,
       tooltip: '鍐呴儴绌虹櫧鍖哄煙鍗犲浘褰㈢殑鐧惧垎鐜囥��',
       min: 0,
       max: 90,
       decimal: 0,
-      hidden: !card.shape || card.shape === 'pie',
       required: true
     },
     {
       type: 'radio',
-      key: 'tooltip',
+      field: 'tooltip',
       label: '鎮诞鎻愮ず',
-      initVal: card.tooltip || 'true',
+      initval: card.tooltip || 'true',
       required: false,
       options: [{
         value: 'true',
-        text: '鏄剧ず'
+        label: '鏄剧ず'
       }, {
         value: 'false',
-        text: '闅愯棌'
+        label: '闅愯棌'
       }]
     },
     {
       type: 'radio',
-      key: 'show',
+      field: 'show',
       label: '鏍煎紡鍖�',
-      initVal: card.show || 'value',
+      initval: card.show || 'value',
       required: false,
       options: [{
         value: 'value',
-        text: '鏃�'
+        label: '鏃�'
       }, {
         value: 'percent',
-        text: '鐧惧垎姣�'
+        label: '鐧惧垎姣�'
       }]
     },
     {
       type: 'radio',
-      key: 'label',
+      field: 'label',
       label: '鏍囨敞',
-      initVal: card.label || 'false',
+      initval: card.label || 'false',
       required: false,
       options: [{
         value: 'false',
-        text: '闅愯棌'
+        label: '闅愯棌'
       }, {
         value: 'inner',
-        text: '鍐呬晶'
-      }, {
-        value: 'outer',
-        text: '铚樿洓'
+        label: '鍐呬晶'
       }, {
         value: 'normal',
-        text: '甯歌'
-      }],
-    }, {
-      type: 'radio',
-      key: 'download',
-      label: '瀵煎嚭鍥剧墖',
-      initVal: card.download || 'forbid',
-      required: false,
-      forbid: appType === 'mob',
-      options: [{
-        value: 'forbid',
-        text: '绂佺敤'
+        label: '澶栦晶'
       }, {
-        value: 'enable',
-        text: '鍚敤'
-      }]
+        value: 'outer',
+        label: '铚樿洓'
+      }],
+    // }, {
+    //   type: 'radio',
+    //   field: 'download',
+    //   label: '瀵煎嚭鍥剧墖',
+    //   initval: card.download || 'forbid',
+    //   required: false,
+    //   forbid: appType === 'mob',
+    //   options: [{
+    //     value: 'forbid',
+    //     label: '绂佺敤'
+    //   }, {
+    //     value: 'enable',
+    //     label: '鍚敤'
+    //   }]
     }, {
       type: 'radio',
-      key: 'empty',
+      field: 'empty',
       label: '绌哄�奸殣钘�',
-      initVal: card.empty || 'show',
+      initval: card.empty || 'show',
       tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�',
       required: false,
       options: [
-        {value: 'show', text: '鍚�'},
-        {value: 'hidden', text: '鏄�'},
+        {value: 'show', label: '鍚�'},
+        {value: 'hidden', label: '鏄�'},
       ],
     }, {
       type: 'number',
-      key: 'splitLine',
+      field: 'splitLine',
       label: '鍒嗛殧绾�',
-      initVal: card.splitLine || '',
+      initval: card.splitLine || '',
       tooltip: '鍒嗛殧绾跨殑瀹藉害銆�',
       min: 0,
       max: 20,
       decimal: 0,
-      required: false
-    }, {
-      type: 'color',
-      key: 'splitColor',
-      label: '鍒嗛殧鑹�',
-      initVal: card.splitColor || '#ffffff',
-      tooltip: '鍒嗛殧绾跨殑棰滆壊锛屽瓨鍦ㄥ垎闅旂嚎鏃舵湁鏁堛��',
-      required: false
-    }, {
-      type: 'color',
-      key: 'color',
-      label: '鑹茬郴',
-      initVal: card.color || 'rgba(0, 0, 0, 0.85)',
-      tooltip: '鍧愭爣杞村強绀轰緥绛夋彁绀烘枃瀛椾娇鐢ㄧ殑棰滆壊銆�',
-      required: false
-    }, {
-      type: 'select',
-      key: 'interaction',
-      label: '浜や簰鏁堟灉',
-      initVal: card.interaction || [],
-      multi: true,
       required: false,
-      forbid: appType === 'mob',
-      options: [
-        { value: 'element-active', label: '鍏冪礌鑱氱劍' },
-        { value: 'element-selected', label: '鍏冪礌閫変腑锛堝閫夛級' },
-        { value: 'element-single-selected', label: '鍏冪礌閫変腑锛堝崟閫夛級' },
-        // { value: 'active-region', label: '鑳屾櫙妗�' },
-        // { value: 'view-zoom', label: '瑙嗗浘缂╂斁' },
-        { value: 'element-highlight', label: '鍏冪礌楂樹寒' },
-        // { value: 'element-highlight-by-color', label: '鍚岃壊鍏冪礌楂樹寒' },
-        // { value: 'element-highlight-by-x', label: '鍚孹杞村厓绱犻珮浜�' },
-        { value: 'legend-filter', label: '鍥句緥杩囨护' },
-        { value: 'legend-active', label: '鍥句緥鑱氱劍' },
-        { value: 'legend-highlight', label: '鍥句緥楂樹寒' },
-        // { value: 'brush', label: '閫夋杩囨护' },
+      controlFields: [
+        {field: 'splitColor', notNull: true}
       ]
+    }, {
+      type: 'color',
+      field: 'splitColor',
+      label: '鍒嗛殧鑹�',
+      initval: card.splitColor || '#ffffff',
+      tooltip: '鍒嗛殧绾跨殑棰滆壊銆�',
+      allowClear: true,
+      required: false
+    // }, {
+    //   type: 'color',
+    //   field: 'color',
+    //   label: '鑹茬郴',
+    //   initval: card.color || 'rgba(0, 0, 0, 0.85)',
+    //   tooltip: '绀轰緥绛夋彁绀烘枃瀛椾娇鐢ㄧ殑棰滆壊銆�',
+    //   required: false
+    // } , {
+    //   type: 'select',
+    //   field: 'interaction',
+    //   label: '浜や簰鏁堟灉',
+    //   initval: card.interaction || [],
+    //   multi: true,
+    //   required: false,
+    //   forbid: appType === 'mob',
+    //   options: [
+    //     { value: 'element-active', label: '鍏冪礌鑱氱劍' },
+    //     { value: 'element-selected', label: '鍏冪礌閫変腑锛堝閫夛級' },
+    //     { value: 'element-single-selected', label: '鍏冪礌閫変腑锛堝崟閫夛級' },
+    //     // { value: 'active-region', label: '鑳屾櫙妗�' },
+    //     // { value: 'view-zoom', label: '瑙嗗浘缂╂斁' },
+    //     { value: 'element-highlight', label: '鍏冪礌楂樹寒' },
+    //     // { value: 'element-highlight-by-color', label: '鍚岃壊鍏冪礌楂樹寒' },
+    //     // { value: 'element-highlight-by-x', label: '鍚孹杞村厓绱犻珮浜�' },
+    //     { value: 'legend-filter', label: '鍥句緥杩囨护' },
+    //     { value: 'legend-active', label: '鍥句緥鑱氱劍' },
+    //     { value: 'legend-highlight', label: '鍥句緥楂樹寒' },
+    //     // { value: 'brush', label: '閫夋杩囨护' },
+    //   ]
     }
   ]
 }

--
Gitblit v1.8.0