From 1f9def3ba3bef13148b67fe4be05832e4c3667a5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 30 十二月 2023 20:22:01 +0800
Subject: [PATCH] 2023-12-30

---
 src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx |   89 +++++++++++++++++++++++++-------------------
 1 files changed, 51 insertions(+), 38 deletions(-)

diff --git a/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx b/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx
index 453f22e..b54089c 100644
--- a/src/menu/components/chart/antv-dashboard/chartcompile/formconfig.jsx
+++ b/src/menu/components/chart/antv-dashboard/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)
@@ -43,14 +45,13 @@
       required: true
     },
     {
-      type: 'number',
+      type: 'styleInput',
       key: 'height',
-      label: '楂樺害',
+      label: '鍥捐〃楂樺害',
       initVal: card.height,
-      min: 100,
-      max: 1000,
-      decimal: 0,
-      required: true
+      tooltip: '鍥捐〃缁樺浘鍖哄煙鐨勯珮搴︼紝涓嶅寘鎷爣棰樺強鍐呭杈硅窛銆�',
+      required: true,
+      options: ['px', 'vh', 'vw']
     },
     {
       type: 'radio',
@@ -62,7 +63,19 @@
         {value: 'true', text: '鍚敤'},
         {value: 'false', text: '绂佺敤'},
       ],
-      forbid: !appType
+      forbid: !appType || ispop || isprint
+    },
+    {
+      type: 'radio',
+      key: 'cacheLocal',
+      label: '鏈湴缂撳瓨',
+      initVal: card.cacheLocal || 'true',
+      required: false,
+      options: [
+        {value: 'true', text: '缁ф壙鑿滃崟'},
+        {value: 'false', text: '绂佺敤'},
+      ],
+      forbid: ispop || isprint
     },
     {
       type: 'select',
@@ -72,7 +85,7 @@
       multi: true,
       required: false,
       options: roleList,
-      forbid: !!appType
+      forbid: !!appType || isprint
     }
   ]
 }
@@ -82,7 +95,7 @@
  * @param {Array}  columns    // 鏄剧ず鍒�
  */
 export function getOptionForm (card, columns) {
-  let appType = sessionStorage.getItem('appType')
+  // let appType = sessionStorage.getItem('appType')
   let yfields = columns.filter(item => /^(Int|Decimal)/ig.test(item.datatype))
 
   return [
@@ -136,20 +149,20 @@
         value: 'false',
         text: '涓嶄娇鐢�'
       }]
-    }, {
-      type: 'radio',
-      key: 'download',
-      label: '瀵煎嚭鍥剧墖',
-      initVal: card.download || 'forbid',
-      required: false,
-      forbid: appType === 'mob',
-      options: [{
-        value: 'forbid',
-        text: '绂佺敤'
-      }, {
-        value: 'enable',
-        text: '鍚敤'
-      }]
+    // }, {
+    //   type: 'radio',
+    //   key: 'download',
+    //   label: '瀵煎嚭鍥剧墖',
+    //   initVal: card.download || 'forbid',
+    //   required: false,
+    //   forbid: appType === 'mob',
+    //   options: [{
+    //     value: 'forbid',
+    //     text: '绂佺敤'
+    //   }, {
+    //     value: 'enable',
+    //     text: '鍚敤'
+    //   }]
     },
     // {
     //   type: 'radio',
@@ -186,7 +199,7 @@
  * @param {Array}  columns    // 鏄剧ず鍒�
  */
 export function getRadioOptionForm (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))
 
@@ -251,20 +264,20 @@
         value: 'false',
         text: '涓嶄娇鐢�'
       }]
-    }, {
-      type: 'radio',
-      key: 'download',
-      label: '瀵煎嚭鍥剧墖',
-      initVal: card.download || 'forbid',
-      required: false,
-      forbid: appType === 'mob',
-      options: [{
-        value: 'forbid',
-        text: '绂佺敤'
-      }, {
-        value: 'enable',
-        text: '鍚敤'
-      }]
+    // }, {
+    //   type: 'radio',
+    //   key: 'download',
+    //   label: '瀵煎嚭鍥剧墖',
+    //   initVal: card.download || 'forbid',
+    //   required: false,
+    //   forbid: appType === 'mob',
+    //   options: [{
+    //     value: 'forbid',
+    //     text: '绂佺敤'
+    //   }, {
+    //     value: 'enable',
+    //     text: '鍚敤'
+    //   }]
     },
     {
       type: 'color',

--
Gitblit v1.8.0