From f6626b05f1275cc2f8ca77f773d4f6a6af1b0a89 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 21 十一月 2022 16:11:55 +0800
Subject: [PATCH] 2022-11-21

---
 src/menu/components/card/data-card/options.jsx |   29 ++++++++++++++++++++---------
 1 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx
index 7297108..c750cfc 100644
--- a/src/menu/components/card/data-card/options.jsx
+++ b/src/menu/components/card/data-card/options.jsx
@@ -1,4 +1,3 @@
-import { fromJS } from 'immutable'
 import MenuUtils from '@/utils/utils-custom.js'
 
 /**
@@ -7,21 +6,33 @@
 export default function (wrap, subtype, columns = [], id = '', supNodes = [], setting) {
   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 = (menu.interfaces || []).map(item => {
-    return {
-      value: item.uuid,
-      label: item.name
-    }
-  })
+  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')

--
Gitblit v1.8.0