From 91e232bb0b910f3670bdbccd65cc218d55e1eda9 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 06 十二月 2022 16:08:20 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/menu/components/card/data-card/options.jsx |   67 +++++++++++++++++++++++++++++++--
 1 files changed, 62 insertions(+), 5 deletions(-)

diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx
index 7db4e04..8026bd2 100644
--- a/src/menu/components/card/data-card/options.jsx
+++ b/src/menu/components/card/data-card/options.jsx
@@ -1,21 +1,38 @@
-import { fromJS } from 'immutable'
 import MenuUtils from '@/utils/utils-custom.js'
 
 /**
  * @description Wrap琛ㄥ崟閰嶇疆淇℃伅
  */
-export default function (wrap, subtype, columns = [], id = '', supNodes = [], setting) {
+export default function (wrap, subtype, columns = [], id = '', supNodes = [], setting, buttons = []) {
   let appType = sessionStorage.getItem('appType')
   let MenuType = ''
-  let menu = fromJS(window.GLOB.customMenu).toJS()
+  let menu = window.GLOB.customMenu
   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'
   }
   let modules = []
   if (subtype === 'propcard' || subtype === 'datacard') {
-    modules = MenuUtils.getSupModules(menu.components, id) || []
+    modules = MenuUtils.getSupModules(menu.components, id, menu.interfaces)
+
+    if (subtype === 'propcard' && wrap.supModule && wrap.supModule.length > 0 && wrap.supModule[0] !== 'empty') {
+      let has = MenuUtils.checkSupModules(modules, wrap.supModule.slice(-1)[0])
+      if (!has) {
+        wrap.supModule = ''
+      }
+    }
   }
 
   let roleList = sessionStorage.getItem('sysRoles')
@@ -82,14 +99,26 @@
       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: 'autoExec', 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'
     },
     {
@@ -160,6 +189,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'
     },
@@ -283,6 +315,21 @@
     },
     {
       type: 'radio',
+      field: 'display',
+      label: '鏄剧ず鎺у埗',
+      initval: wrap.display || 'normal',
+      required: false,
+      options: [
+        {value: 'normal', label: '姝e父鏄剧ず'},
+        {value: 'hidden', label: '涓嶅彲瑙�'},
+      ],
+      controlFields: [
+        {field: 'empty', values: ['normal']},
+      ],
+      forbid: subtype !== 'propcard'
+    },
+    {
+      type: 'radio',
       field: 'empty',
       label: '绌哄�奸殣钘�',
       initval: wrap.empty || 'show',
@@ -295,6 +342,16 @@
       ],
     },
     {
+      type: 'select',
+      field: 'autoExec',
+      label: '鑷姩鎵ц',
+      initval: wrap.autoExec || '',
+      tooltip: '鏁版嵁鏇存柊鏃惰嚜鍔ㄦ墽琛屾寜閽�傛敞锛氭鎸夐挳鎵ц鎴愬姛鍚庤皑鎱庨�夋嫨鍒锋柊椤癸紝閬垮厤閫犳垚寰幆鎵ц銆�',
+      required: false,
+      options: buttons,
+      forbid: subtype !== 'propcard'
+    },
+    {
       type: 'radio',
       field: 'jump',
       label: '椤甸潰璺宠浆',

--
Gitblit v1.8.0