From f4b9504cad034ddcdef21c2081d14a4984fcd2d3 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 15 七月 2024 17:14:48 +0800
Subject: [PATCH] 2024-07-15

---
 src/menu/components/card/data-card/options.jsx |   70 ++++++++++++++--------------------
 1 files changed, 29 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..6a799d2 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
         }
       }
     },
@@ -236,8 +209,21 @@
       controlFields: subtype !== 'propcard' ? [
         {field: 'printHeight', values: ['flex']},
         {field: 'cardFloat', values: ['grid']},
+        {field: 'zHeight', values: ['grid']},
       ] : [{field: 'cardFloat', values: ['grid']}],
       forbid: subtype === 'tablecard'
+    },
+    {
+      type: 'number',
+      field: 'zHeight',
+      label: '鏈�澶ч珮搴�',
+      initval: wrap.zHeight || '',
+      tooltip: '鍗$墖鍐呭鍖虹殑鏈�澶ч珮搴︼紙涓嶅寘鍚爣棰樸�佺炕椤电瓑鍏冪礌锛夛紝娣诲姞楂樺害鍚庣粍浠朵腑绗竴涓睘鎬у崱灏嗗浐瀹氫簬澶撮儴銆傛敞锛氬皬浜庣瓑浜�100澶т簬0鏃朵负楂樺害鐨勭櫨鍒嗘瘮锛屽皬浜�0鏃朵负绐楀彛楂樺害鍑忓幓姝ゅ�笺��',
+      min: -1000,
+      max: 3000,
+      precision: 0,
+      required: false,
+      forbid: subtype !== 'datacard' || appType === 'mob'
     },
     {
       type: 'radio',
@@ -287,11 +273,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 +411,7 @@
       label: '璇煶鎾姤',
       initval: wrap.broadcast || '',
       tooltip: '璇煶鎾姤鍦ㄧЩ鍔ㄧ鏈夋晥銆傛敞锛氬湪H5涓浣跨敤闊抽閾炬帴锛屾坊鍔犲畾鏃跺櫒鏃讹紝鍙惊鐜挱鎶�',
+      timestamp: new Date().getTime(),
       required: false,
       options: columns,
       forbid: !columns || appType !== 'mob' || subtype !== 'propcard'
@@ -525,6 +510,7 @@
       label: '鎺у埗瀛楁',
       initval: wrap.jumpField || '',
       tooltip: '褰撳瓧娈靛�间负true鏃惰Е鍙戣烦杞��',
+      timestamp: new Date().getTime(),
       required: true,
       options: columns,
       forbid: subtype !== 'propcard' || appType !== 'mob'
@@ -544,6 +530,7 @@
       label: '閾炬帴瀛楁',
       initval: wrap.link || '',
       tooltip: '璺宠浆閾炬帴涓烘煡璇㈡暟鎹殑杩斿洖鍊笺��',
+      timestamp: new Date().getTime(),
       required: true,
       options: columns,
       forbid: subtype !== 'propcard' || appType !== 'mob'
@@ -591,6 +578,7 @@
       tooltip: '鐢ㄤ簬鎺у埗琛屾暟鎹槸鍚﹀彲閫夋嫨銆�',
       required: false,
       allowClear: true,
+      joint: true,
       options: columns,
       controlFields: [
         {field: 'controlVal', notNull: true},

--
Gitblit v1.8.0