From f3d4db769ba9b51b799d981511a710fd443d0e08 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 21 四月 2025 12:18:03 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/menu/components/editor/braft-editor/options.jsx |   99 ++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 77 insertions(+), 22 deletions(-)

diff --git a/src/menu/components/editor/braft-editor/options.jsx b/src/menu/components/editor/braft-editor/options.jsx
index 922cc66..91f403e 100644
--- a/src/menu/components/editor/braft-editor/options.jsx
+++ b/src/menu/components/editor/braft-editor/options.jsx
@@ -7,14 +7,15 @@
   let isprint = sessionStorage.getItem('MenuType') === 'billPrint'
   let ispop = sessionStorage.getItem('editMenuType') === 'popview'
   let menu = window.GLOB.customMenu
-
   let interfaces = []
+
   if (menu.interfaces) {
     menu.interfaces.forEach(item => {
       if (item.status === 'true') {
         interfaces.push({
           value: item.uuid,
-          label: item.name
+          label: item.name,
+          columns: JSON.parse(JSON.stringify(item.columns))
         })
       }
     })
@@ -28,6 +29,20 @@
     }
   } else {
     roleList = []
+  }
+
+  let tbStyle = wrap.tbStyle ? wrap.tbStyle.split(' ') : []
+  let splitLine = 'false'
+  if (tbStyle.includes('deep-split')) {
+    tbStyle = tbStyle.filter(n => n !== 'deep-split')
+    splitLine = 'true'
+  }
+  let loads = []
+  if (wrap.loaded === 'true') {
+    loads.push('loaded')
+  }
+  if (wrap.preload === 'true') {
+    loads.push('preload')
   }
 
   const cardWrapForm = [
@@ -84,23 +99,15 @@
       required: true,
       options: interfaces,
       reset_source: true,
-      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 _field = map.get('field')
-
-        if (_field) {
-          _field.options = columns
-          _field.oriOptions = columns
-          map.set('field', _field)
+        return {
+          field: d.columns
         }
       }
     },
@@ -109,6 +116,7 @@
       field: 'field',
       label: '鏂囨湰瀛楁',
       initval: wrap.field || '',
+      timestamp: new Date().getTime(),
       required: false,
       options: columns
     },
@@ -131,25 +139,72 @@
       initval: wrap.empty || 'show',
       tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�',
       required: false,
-      skip: true,
       options: [
         {value: 'show', label: '鍚�'},
         {value: 'hidden', label: '鏄�'},
       ],
     },
     {
-      type: 'radio',
-      field: 'firstTr',
-      label: '琛ㄦ牸棣栬',
-      initval: wrap.firstTr || 'deep',
-      tooltip: '瀵屾枃鏈腑table鐨勯琛岃儗鏅鑹层��',
+      type: 'checkbox',
+      field: 'tbStyle',
+      label: '琛ㄦ牸鏍峰紡',
+      initval: tbStyle,
+      tooltip: '瀵屾枃鏈腑琛ㄦ牸鐨勬牱寮忥紝娉細閫夋嫨鈥滆竟妗嗗姞绮椻�濇垨鈥滆竟妗嗛鑹插姞娣扁�濇椂鈥滄棤杈规鈥濇棤鏁堛��',
       required: false,
       options: [
-        {value: 'deep', label: '娣辫壊'},
-        {value: 'light', label: '娴呰壊'},
+        {value: 'th-light', label: '琛ㄥご閫忔槑'},
+        {value: 'tb-flex', label: '鍒楃瓑瀹�'},
+        {value: 'no-border', label: '鏃犺竟妗�'},
+        {value: 'bold-border', label: '杈规鍔犵矖'},
+        {value: 'deep-border', label: '杈规棰滆壊鍔犳繁'},
+        {value: 'word-break', label: '寮哄埗鎹㈣'},
+      ],
+      span: 24
+    },
+    {
+      type: 'radio',
+      field: 'splitLine',
+      label: '鍒嗗壊绾垮姞娣�',
+      initval: splitLine,
+      required: false,
+      options: [
+        {value: 'false', label: '鍚�'},
+        {value: 'true', label: '鏄�'},
+      ],
+    },
+    {
+      type: 'checkbox',
+      field: 'loads',
+      label: '甯冨眬璋冩暣',
+      initval: loads,
+      required: false,
+      tooltip: '棰勫鐞嗗叆鍙俬tml銆乨ata锛岃繑鍥炰慨鏀瑰悗鐨刪tml锛涘悗澶勭悊鍏ュ弬涓篽tml锛屽彲閫氳繃椤甸潰鍏冪礌鐨勬牱寮忚皟鏁村苟杩斿洖澶勭悊鍚庣殑html銆�',
+      options: [
+        {value: 'preload', label: '棰勫鐞�'},
+        {value: 'loaded', label: '鍚庡鐞�'},
+      ],
+      controlFields: [
+        {field: 'prefunc', values: ['preload']},
+        {field: 'loadedfunc', values: ['loaded']},
       ]
     },
     {
+      type: 'codemirror',
+      field: 'prefunc',
+      label: '棰勫鐞嗚剼鏈�',
+      initval: wrap.prefunc || '',
+      required: true,
+      span: 24
+    },
+    {
+      type: 'codemirror',
+      field: 'loadedfunc',
+      label: '鍚庡鐞嗚剼鏈�',
+      initval: wrap.loadedfunc || '',
+      required: true,
+      span: 24
+    },
+    {
       type: 'radio',
       field: 'permission',
       label: '鏉冮檺楠岃瘉',

--
Gitblit v1.8.0