From 4cc738e535d1a20701d206e12cf9de8cc5a01170 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 01 六月 2024 15:24:12 +0800
Subject: [PATCH] Merge branch 'develop'

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

diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx
index 91f71f7..29de319 100644
--- a/src/menu/components/card/data-card/options.jsx
+++ b/src/menu/components/card/data-card/options.jsx
@@ -1,4 +1,4 @@
-import MenuUtils from '@/utils/utils-custom.js'
+import MenuUtils, { getInterfaces } from '@/utils/utils-custom.js'
 
 /**
  * @description Wrap琛ㄥ崟閰嶇疆淇℃伅
@@ -9,16 +9,10 @@
   let ispop = sessionStorage.getItem('editMenuType') === 'popview'
   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 (subtype === 'propcard') {
+    interfaces = getInterfaces()
   }
   let modules = []
   if (subtype === 'propcard' || subtype === 'datacard') {
@@ -159,7 +153,7 @@
       field: 'datatype',
       label: '鏁版嵁鏉ユ簮',
       initval: wrap.datatype || 'dynamic',
-      tooltip: '閫夋嫨闈欐�佸�硷紝鏃犻渶閰嶇疆鏁版嵁婧愩��',
+      tooltip: '閫夋嫨闈欐�佹椂锛屾棤闇�閰嶇疆鏁版嵁婧愶紝鍙睍绀轰笂绾х粍浠舵垨url鍙傛暟瀛楁銆�',
       required: false,
       options: [
         {value: 'dynamic', label: '鍔ㄦ��', priKeyType: 'static'},
@@ -187,38 +181,17 @@
       options: interfaces,
       reset_source: true,
       forbid: subtype !== 'propcard',
-      callback: (map, record) => {
+      callback: (record) => {
         if (!record.publicId) return
         
-        let interfaces = window.GLOB.customMenu.interfaces || []
-        
-        let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[0]
+        let d = interfaces.filter(m => m.value === record.publicId)[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)
+        return {
+          broadcast: d.columns,
+          jumpField: d.columns,
+          link: d.columns
         }
       }
     },
@@ -287,11 +260,9 @@
       required: false,
       linkField: 'datatype',
       options: [
-        {ParentID: 'static', value: 'static', label: '闈欐�佸��'},
-        {ParentID: 'dynamic', value: 'static', label: '闈欐�佸��'},
+        {ParentID: '', 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: '鎷兼帴鍊�'},
       ],
@@ -427,6 +398,7 @@
       label: '璇煶鎾姤',
       initval: wrap.broadcast || '',
       tooltip: '璇煶鎾姤鍦ㄧЩ鍔ㄧ鏈夋晥銆傛敞锛氬湪H5涓浣跨敤闊抽閾炬帴锛屾坊鍔犲畾鏃跺櫒鏃讹紝鍙惊鐜挱鎶�',
+      timestamp: new Date().getTime(),
       required: false,
       options: columns,
       forbid: !columns || appType !== 'mob' || subtype !== 'propcard'
@@ -525,6 +497,7 @@
       label: '鎺у埗瀛楁',
       initval: wrap.jumpField || '',
       tooltip: '褰撳瓧娈靛�间负true鏃惰Е鍙戣烦杞��',
+      timestamp: new Date().getTime(),
       required: true,
       options: columns,
       forbid: subtype !== 'propcard' || appType !== 'mob'
@@ -544,6 +517,7 @@
       label: '閾炬帴瀛楁',
       initval: wrap.link || '',
       tooltip: '璺宠浆閾炬帴涓烘煡璇㈡暟鎹殑杩斿洖鍊笺��',
+      timestamp: new Date().getTime(),
       required: true,
       options: columns,
       forbid: subtype !== 'propcard' || appType !== 'mob'

--
Gitblit v1.8.0