From 49f09cc6f8ff8c30a75ed1a9d6f510b69b73962a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 12 十二月 2023 21:05:37 +0800
Subject: [PATCH] 2023-12-12

---
 src/menu/components/editor/braft-editor/options.jsx |   41 +++++++++++++++++++++++++++++++++++++----
 1 files changed, 37 insertions(+), 4 deletions(-)

diff --git a/src/menu/components/editor/braft-editor/options.jsx b/src/menu/components/editor/braft-editor/options.jsx
index 3c33098..922cc66 100644
--- a/src/menu/components/editor/braft-editor/options.jsx
+++ b/src/menu/components/editor/braft-editor/options.jsx
@@ -4,6 +4,8 @@
 export default function (wrap, columns) {
   let appType = sessionStorage.getItem('appType')
   let roleList = sessionStorage.getItem('sysRoles')
+  let isprint = sessionStorage.getItem('MenuType') === 'billPrint'
+  let ispop = sessionStorage.getItem('editMenuType') === 'popview'
   let menu = window.GLOB.customMenu
 
   let interfaces = []
@@ -80,14 +82,33 @@
       label: '鏁版嵁婧�',
       initval: wrap.publicId || '',
       required: true,
-      options: interfaces
+      options: interfaces,
+      reset_source: true,
+      callback: (map, record) => {
+        if (!record.publicId) return
+
+        let interfaces = window.GLOB.customMenu.interfaces || []
+
+        let d = interfaces.filter(m => m.uuid === record.publicId && m.status === 'true')[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)
+        }
+      }
     },
     {
       type: 'select',
       field: 'field',
       label: '鏂囨湰瀛楁',
       initval: wrap.field || '',
-      tooltip: '閫夋嫨鍔ㄦ�佸�兼椂锛岄渶璁剧疆鏂囨湰瀛楁鎵嶅彲鐢熸晥锛屼娇鐢ㄥ叕鍏辨暟鎹簮鏃讹紝闇�鍏堜繚瀛樻暟鎹簮鍚庡啀閫夊彇鏂囨湰瀛楁銆�',
       required: false,
       options: columns
     },
@@ -118,6 +139,18 @@
     },
     {
       type: 'radio',
+      field: 'firstTr',
+      label: '琛ㄦ牸棣栬',
+      initval: wrap.firstTr || 'deep',
+      tooltip: '瀵屾枃鏈腑table鐨勯琛岃儗鏅鑹层��',
+      required: false,
+      options: [
+        {value: 'deep', label: '娣辫壊'},
+        {value: 'light', label: '娴呰壊'},
+      ]
+    },
+    {
+      type: 'radio',
       field: 'permission',
       label: '鏉冮檺楠岃瘉',
       initval: wrap.permission || 'false',
@@ -126,7 +159,7 @@
         {value: 'true', label: '鍚敤'},
         {value: 'false', label: '绂佺敤'},
       ],
-      forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview'
+      forbid: !appType || ispop || isprint
     },
     {
       type: 'multiselect',
@@ -135,7 +168,7 @@
       initval: wrap.blacklist || [],
       required: false,
       options: roleList,
-      forbid: !!appType
+      forbid: !!appType || isprint
     },
   ]
 

--
Gitblit v1.8.0