From 53b9fb93d0376eb02bb996935f1720b4e95cd897 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 12 十月 2022 14:41:06 +0800
Subject: [PATCH] 2022-10-12

---
 src/menu/components/card/data-card/options.jsx |   52 +++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 41 insertions(+), 11 deletions(-)

diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx
index 6db48b9..3733162 100644
--- a/src/menu/components/card/data-card/options.jsx
+++ b/src/menu/components/card/data-card/options.jsx
@@ -4,10 +4,22 @@
 /**
  * @description Wrap琛ㄥ崟閰嶇疆淇℃伅
  */
-export default function (wrap, subtype, columns = [], id = '', supNodes = []) {
+export default function (wrap, subtype, columns = [], id = '', supNodes = [], setting) {
   let appType = sessionStorage.getItem('appType')
   let MenuType = ''
   let menu = fromJS(window.GLOB.customMenu).toJS()
+  let laypage = setting && setting.laypage !== 'false'
+  let interfaces = []
+  if (subtype === 'propcard' && menu.interfaces) {
+    menu.interfaces.forEach(item => {
+      if (item.status === 'true') {
+        interfaces.push({
+          value: item.uuid,
+          label: item.name
+        })
+      }
+    })
+  }
 
   if (menu.parentId === 'BillPrintTemp') {
     MenuType = 'billPrint'
@@ -81,14 +93,25 @@
       options: [
         {value: 'dynamic', label: '鍔ㄦ��', priKeyType: 'static'},
         {value: 'static', label: '闈欐��', priKeyType: 'static'},
+        {value: 'public', label: '鍏叡鏁版嵁婧�', priKeyType: 'static'},
       ],
       linkFields: ['priKeyType'],
       controlFields: [
         {field: 'goback', values: ['dynamic']},
-        {field: 'empty', values: ['dynamic']},
+        {field: 'empty', values: ['dynamic', 'public']},
         {field: 'jump', values: ['dynamic']},
         {field: 'supModule', values: ['static']},
+        {field: 'publicId', values: ['public']},
       ],
+      forbid: subtype !== 'propcard'
+    },
+    {
+      type: 'select',
+      field: 'publicId',
+      label: '鏁版嵁婧�',
+      initval: wrap.publicId || '',
+      required: true,
+      options: interfaces,
       forbid: subtype !== 'propcard'
     },
     {
@@ -113,17 +136,19 @@
       field: 'pagestyle',
       label: '鍒嗛〉椋庢牸',
       initval: wrap.pagestyle || 'page',
-      tooltip: '鏁版嵁婧愰�夋嫨鍒嗛〉鏃舵湁鏁堛�傛敞锛氭粦鍔ㄥ姞杞藉彧鏈夌涓�涓湁鏁�',
+      tooltip: '鏁版嵁婧愰�夋嫨鍒嗛〉鏃舵湁鏁堛�傛敞锛氬脊鎬у竷灞�鏃跺浐瀹氫负椤电爜銆�',
       required: false,
+      disabled: !laypage,
       options: [
         {value: 'page', label: '椤电爜'},
-        {value: 'switch', label: '宸﹀彸鍒囨崲', forbid: appType === 'mob'},
+        {value: 'switch', label: '宸﹀彸鍒囨崲', forbid: appType === 'mob' || subtype === 'tablecard'},
         {value: 'slide', label: '婊戝姩鍔犺浇', forbid: appType !== 'mob'},
+        {value: 'more', label: '鏌ョ湅鏇村'},
       ],
       controlFields: [
         {field: 'slidetip', values: ['slide']},
       ],
-      forbid: !(subtype === 'datacard' || (subtype === 'tablecard' && appType === 'mob'))
+      forbid: subtype === 'propcard'
     },
     {
       type: 'radio',
@@ -157,6 +182,9 @@
         {ParentID: 'dynamic', value: 'static', label: '闈欐�佸��'},
         {ParentID: 'dynamic', value: 'dynamic', label: '鍔ㄦ�佸��'},
         {ParentID: 'dynamic', value: 'joint', label: '鎷兼帴鍊�'},
+        {ParentID: 'public', value: 'static', label: '闈欐�佸��'},
+        {ParentID: 'public', value: 'dynamic', label: '鍔ㄦ�佸��'},
+        {ParentID: 'public', value: 'joint', label: '鎷兼帴鍊�'},
       ],
       forbid: subtype !== 'propcard'
     },
@@ -171,7 +199,8 @@
         {value: 'false', label: '鏃�'},
         {value: 'init', label: '鍒濆鍖�'},
         {value: 'always', label: '鏁版嵁鍔犺浇'},
-      ]
+      ],
+      forbid: subtype === 'tablecard'
     },
     {
       type: 'select',
@@ -185,9 +214,10 @@
         {value: 'active', label: '澶栭槾褰�'},
         {value: 'backFont', label: '鑳屾櫙+鏂囧瓧'},
         {value: 'font', label: '鏂囧瓧'},
+        {value: 'tabs', label: '鏍囩椤�'},
         ...(subtype === 'datacard' && appType === 'mob' ? [{value: 'check', label: '鍕鹃��'}] : [])
-      ]
-      // forbid: subtype !== 'propcard'
+      ],
+      forbid: subtype === 'tablecard'
     },
     // {
     //   type: 'radio',
@@ -390,9 +420,9 @@
     {
       type: 'text',
       field: 'controlVal',
-      label: '鎺у埗鍊�',
+      label: '绂佺敤鍊�',
       initval: wrap.controlVal || '',
-      tooltip: '褰撳瓧娈靛�间笌鎺у埗鍊肩浉绛夋椂锛岃鏁版嵁浼氱鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�',
+      tooltip: '褰撳瓧娈靛�间笌绂佺敤鍊肩浉绛夋椂锛岃鏁版嵁浼氱鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�',
       required: false,
       forbid: subtype !== 'datacard'
     },
@@ -440,7 +470,7 @@
       initval: wrap.slidetip || wrap.slidetip === '' ? wrap.slidetip : '娌℃湁鏇村浜�',
       tooltip: '婊戝姩鍔犺浇鑷冲簳閮ㄦ椂鐨勬彁绀轰俊鎭��',
       required: false,
-      forbid: appType !== 'mob'
+      forbid: !laypage || appType !== 'mob' || subtype === 'propcard'
     },
     {
       type: 'table',

--
Gitblit v1.8.0