From c8804ceb1fe2dea76f9949c5ea04423876ee2c81 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 28 六月 2024 14:02:47 +0800
Subject: [PATCH] 2024-06-28

---
 src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx |   80 ++++++++++++++++++----------------------
 1 files changed, 36 insertions(+), 44 deletions(-)

diff --git a/src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx b/src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx
index 2434abd..7294517 100644
--- a/src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx
+++ b/src/menu/components/chart/chart-custom/chartcompile/formconfig.jsx
@@ -5,6 +5,8 @@
 export function getBaseForm (card) {
   let appType = sessionStorage.getItem('appType')
   let roleList = sessionStorage.getItem('sysRoles')
+  let isprint = sessionStorage.getItem('MenuType') === 'billPrint'
+  let ispop = sessionStorage.getItem('editMenuType') === 'popview'
   if (roleList) {
     try {
       roleList = JSON.parse(roleList)
@@ -18,35 +20,35 @@
   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: 'radio',
-      key: 'chartType',
+      field: 'chartType',
       label: '鍥捐〃绫诲瀷',
-      initVal: card.chartType || 'antv',
+      initval: card.chartType || 'antv',
       required: true,
       options: [
-        { value: 'antv', text: 'antv' },
-        { value: 'echarts', text: 'echarts' }
+        { value: 'antv', label: 'antv5.0' },
+        { value: 'echarts', label: 'echarts' }
       ]
     },
     {
       type: 'number',
-      key: 'width',
+      field: 'width',
       label: '瀹藉害',
-      initVal: card.width,
+      initval: card.width,
       tooltip: '鏍呮牸甯冨眬锛屾瘡琛岀瓑鍒嗕负24鍒椼��',
       min: 1,
       max: 24,
@@ -55,55 +57,45 @@
     },
     {
       type: 'styleInput',
-      key: 'height',
+      field: 'height',
       label: '鍥捐〃楂樺害',
-      initVal: card.height,
+      initval: card.height,
       tooltip: '鍥捐〃缁樺浘鍖哄煙鐨勯珮搴︼紝涓嶅寘鎷爣棰樺強鍐呭杈硅窛銆�',
       required: true,
       options: ['px', 'vh', 'vw']
     },
     {
       type: 'radio',
-      key: 'permission',
+      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 || sessionStorage.getItem('editMenuType') === 'popview'
+      forbid: !appType || ispop || isprint
     },
     {
-      type: 'select',
-      key: 'blacklist',
+      type: 'radio',
+      field: 'cacheLocal',
+      label: '鏈湴缂撳瓨',
+      initval: card.cacheLocal || 'true',
+      required: false,
+      options: [
+        {value: 'true', label: '缁ф壙鑿滃崟'},
+        {value: 'false', label: '绂佺敤'},
+      ],
+      forbid: ispop || isprint
+    },
+    {
+      type: 'multiselect',
+      field: 'blacklist',
       label: '榛戝悕鍗�',
-      initVal: card.blacklist || [],
-      multi: true,
+      initval: card.blacklist || [],
       required: false,
       options: roleList,
-      forbid: !!appType
-    },
-    // {
-    //   type: 'cascader',
-    //   key: 'linkmenu',
-    //   label: '鍏宠仈鑿滃崟',
-    //   initVal: card.linkmenu || [],
-    //   tooltip: '鍦ㄤ娇鐢ㄦ煴褰㈠浘涓旀湭鍚敤鑷畾涔夎缃椂鏈夋晥銆�',
-    //   required: false,
-    //   forbid: appType === 'pc' || appType === 'mob',
-    //   options: menulist
-    // },
-    // {
-    //   type: 'select',
-    //   key: 'linkmenu',
-    //   label: '鍏宠仈鑿滃崟',
-    //   initVal: card.linkmenu || '',
-    //   tooltip: '鍙屽嚮鏌辩姸鍥撅紝浼氭墦寮�鍏宠仈鐨勮彍鍗曘��',
-    //   required: false,
-    //   forbid: appType !== 'pc',
-    //   options: menulist
-    // },
-    
+      forbid: !!appType || isprint
+    }
   ]
 }
\ No newline at end of file

--
Gitblit v1.8.0