From ac1d52c46ff9019fcc93cf3d5e7ab17cf850824e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 10 八月 2023 16:05:24 +0800
Subject: [PATCH] 2023-08-10

---
 src/menu/components/card/data-card/options.jsx |  105 ++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 81 insertions(+), 24 deletions(-)

diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx
index 49358f7..37be9fa 100644
--- a/src/menu/components/card/data-card/options.jsx
+++ b/src/menu/components/card/data-card/options.jsx
@@ -62,6 +62,10 @@
     }
   }
 
+  if (wrap.datatype === 'public' && MenuType === 'billPrint') {
+    wrap.datatype = 'static'
+  }
+
   const cardWrapForm = [
     {
       type: 'text',
@@ -99,14 +103,14 @@
       options: [
         {value: 'dynamic', label: '鍔ㄦ��', priKeyType: 'static'},
         {value: 'static', label: '闈欐��', priKeyType: 'static'},
-        {value: 'public', label: '鍏叡鏁版嵁婧�', priKeyType: 'static'},
+        {value: 'public', label: '鍏叡鏁版嵁婧�', priKeyType: 'static', disabled: MenuType === 'billPrint'},
       ],
       linkFields: ['priKeyType'],
       controlFields: [
-        {field: 'goback', values: ['dynamic']},
+        {field: 'goback', values: ['dynamic', 'public']},
         {field: 'empty', values: ['dynamic', 'public']},
-        {field: 'jump', values: ['dynamic']},
-        {field: 'autoExec', values: ['dynamic']},
+        {field: 'jump', values: ['dynamic', 'public']},
+        {field: 'broadcast', values: ['dynamic', 'public']},
         {field: 'supModule', values: ['static']},
         {field: 'publicId', values: ['public']},
       ],
@@ -119,7 +123,42 @@
       initval: wrap.publicId || '',
       required: true,
       options: interfaces,
-      forbid: subtype !== 'propcard'
+      reset_source: true,
+      forbid: subtype !== 'propcard',
+      callback: (map, record) => {
+        if (!record.publicId) return
+        
+        let interfaces = window.GLOB.customMenu.interfaces || []
+        
+        let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0]
+        
+        if (!d || !d.columns) return
+        let columns = JSON.parse(JSON.stringify(d.columns))
+
+        let _broadcast = map.get('broadcast')
+
+        if (_broadcast && !_broadcast.forbid) {
+          _broadcast.options = columns
+          _broadcast.oriOptions = columns
+          map.set('broadcast', _broadcast)
+        }
+        
+        let _jumpField = map.get('jumpField')
+
+        if (_jumpField && !_jumpField.forbid) {
+          _jumpField.options = columns
+          _jumpField.oriOptions = columns
+          map.set('jumpField', _jumpField)
+        }
+
+        let _link = map.get('link')
+
+        if (_link && !_link.forbid) {
+          _link.options = columns
+          _link.oriOptions = columns
+          map.set('link', _link)
+        }
+      }
     },
     {
       type: 'radio',
@@ -237,22 +276,13 @@
         {value: 'backFont', label: '鑳屾櫙+鏂囧瓧'},
         {value: 'font', label: '鏂囧瓧'},
         {value: 'tabs', label: '鏍囩椤�'},
-        ...(subtype === 'datacard' && appType === 'mob' ? [{value: 'check', label: '鍕鹃��'}] : [])
+        ...(subtype === 'datacard' ? [
+          {value: 'check', label: '鍕鹃�夛紙鍦嗘锛�'},
+          {value: 'check square', label: '鍕鹃�夛紙鏂规锛�'}
+        ] : [])
       ],
       forbid: subtype === 'tablecard'
     },
-    // {
-    //   type: 'radio',
-    //   field: 'checkAll',
-    //   label: '鍏ㄩ��',
-    //   initval: wrap.checkAll || 'hidden',
-    //   required: false,
-    //   options: [
-    //     {value: 'hidden', label: '闅愯棌'},
-    //     {value: 'show', label: '鏄剧ず'},
-    //   ],
-    //   forbid: subtype !== 'datacard' || appType !== 'mob'
-    // },
     {
       type: 'radio',
       field: 'cardFloat',
@@ -282,13 +312,26 @@
     },
     {
       type: 'radio',
+      field: 'parity',
+      label: '濂囧伓鑳屾櫙',
+      initval: wrap.parity || 'false',
+      tooltip: '鍋舵暟琛屼細娣诲姞鑳屾櫙鑹层��',
+      required: false,
+      options: [
+        {value: 'false', label: '鏃�'},
+        {value: 'true', label: '鏈�'},
+      ],
+      forbid: subtype === 'propcard'
+    },
+    {
+      type: 'radio',
       field: 'printType',
       label: '缁勪欢绫诲瀷',
       initval: wrap.printType || 'content',
-      tooltip: '閫夋嫨绫诲瀷涓恒�婇〉鐪�/椤佃剼銆嬫椂锛屾墦鍗扮殑姣忛〉閲岄兘浼氬甫鏈夎缁勪欢銆�',
+      tooltip: '閫夋嫨绫诲瀷涓恒�婇〉鐪�/椤佃剼銆嬫椂锛屾墦鍗扮殑姣忛〉閲岄兘浼氬甫鏈夎缁勪欢銆傛敞锛氶〉鐪夐〉鑴氫腑鏂囨湰鍏冪礌灏嗘浛鎹� @pageIndex@锛堥〉鐮侊級銆丂total@锛堟�绘暟锛夈�丂date@锛堝綋鍓嶆棩鏈燂級銆丂datetime@锛堝綋鍓嶆椂闂达級锛屼娇鐢ㄥ垎椤靛弬鏁版椂娉ㄦ剰鎵撳嵃妯℃澘鐨勯〉闈㈠竷灞�浣跨敤鍒嗛〉銆�',
       required: false,
       options: [
-        {value: 'content', label: '鍐呭'},
+        {value: 'content', label: '灞炴�у崱'},
         {value: 'headerOrfooter', label: '椤电湁/椤佃剼'},
       ],
       controlFields: [
@@ -310,7 +353,7 @@
       field: 'broadcast',
       label: '璇煶鎾姤',
       initval: wrap.broadcast || '',
-      tooltip: '璇煶鎾姤鍦ㄧЩ鍔ㄧapp涓湁鏁堛�傛敞锛氫娇鐢ㄨ闊虫挱鎶ユ椂锛屾暟鎹簮涓嶈浣跨敤鍚屾鏌ヨ锛屾坊鍔犲畾鏃跺櫒鏃讹紝鍙惊鐜挱鎶�',
+      tooltip: '璇煶鎾姤鍦ㄧЩ鍔ㄧ鏈夋晥銆傛敞锛氬湪H5涓浣跨敤闊抽閾炬帴锛屾坊鍔犲畾鏃跺櫒鏃讹紝鍙惊鐜挱鎶�',
       required: false,
       options: columns,
       forbid: !columns || appType !== 'mob' || subtype !== 'propcard'
@@ -333,6 +376,7 @@
       field: 'display',
       label: '鏄剧ず鎺у埗',
       initval: wrap.display || 'normal',
+      tooltip: '褰撲娇鐢ㄥ睘鎬у崱杩涜鏌愪簺涓氬姟鎿嶄綔锛屼笖涓嶉渶瑕佸睍绀哄崱鐗囦俊鎭椂锛屽彲璁剧疆涓轰笉鍙銆�',
       required: false,
       options: [
         {value: 'normal', label: '姝e父鏄剧ず'},
@@ -381,6 +425,7 @@
       controlFields: [
         {field: 'jumpField', values: ['menu', 'link']},
         {field: 'joint', values: ['menu', 'link']},
+        {field: 'open', values: ['menu', 'link']},
         {field: 'menu', values: ['menu']},
         {field: 'link', values: ['link']},
       ],
@@ -391,7 +436,7 @@
       field: 'jumpField',
       label: '鎺у埗瀛楁',
       initval: wrap.jumpField || '',
-      tooltip: '褰撳瓧娈靛�间负true鏃�',
+      tooltip: '褰撳瓧娈靛�间负true鏃惰Е鍙戣烦杞��',
       required: true,
       options: columns,
       forbid: subtype !== 'propcard' || appType !== 'mob'
@@ -424,6 +469,18 @@
       options: [
         {value: 'true', label: '鏄�'},
         {value: 'false', label: '鍚�'},
+      ],
+      forbid: subtype !== 'propcard' || appType !== 'mob'
+    },
+    {
+      type: 'radio',
+      field: 'open',
+      label: '鎵撳紑鏂瑰紡',
+      initval: wrap.open || 'blank',
+      required: false,
+      options: [
+        {value: 'blank', label: '鏂扮獥鍙�'},
+        {value: 'self', label: '褰撳墠绐楀彛'},
       ],
       forbid: subtype !== 'propcard' || appType !== 'mob'
     },
@@ -493,13 +550,13 @@
       type: 'radio',
       field: 'permission',
       label: '鏉冮檺楠岃瘉',
-      initval: wrap.permission || 'false',
+      initval: wrap.permission || (!appType ? 'true' : 'false'),
       required: false,
       options: [
         {value: 'true', label: '鍚敤'},
         {value: 'false', label: '绂佺敤'},
       ],
-      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
+      forbid: sessionStorage.getItem('editMenuType') === 'popview'
     },
     {
       type: 'multiselect',

--
Gitblit v1.8.0