From c62724a2cdbafa3c660538955acbedafa5a01871 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 01 六月 2024 15:25:21 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/menu/components/editor/braft-editor/options.jsx |   80 +++++++++++++++++++++++++++++++++------
 1 files changed, 67 insertions(+), 13 deletions(-)

diff --git a/src/menu/components/editor/braft-editor/options.jsx b/src/menu/components/editor/braft-editor/options.jsx
index 0cf69e3..e0bb4a2 100644
--- a/src/menu/components/editor/braft-editor/options.jsx
+++ b/src/menu/components/editor/braft-editor/options.jsx
@@ -4,6 +4,22 @@
 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 = []
+
+  if (menu.interfaces) {
+    menu.interfaces.forEach(item => {
+      if (item.status === 'true') {
+        interfaces.push({
+          value: item.uuid,
+          label: item.name,
+          columns: JSON.parse(JSON.stringify(item.columns))
+        })
+      }
+    })
+  }
 
   if (roleList) {
     try {
@@ -52,18 +68,41 @@
       options: [
         {value: 'dynamic', label: '鍔ㄦ��'},
         {value: 'static', label: '闈欐��'},
+        {value: 'public', label: '鍏叡鏁版嵁婧�'},
       ],
       controlFields: [
-        {field: 'field', values: ['dynamic']},
-        {field: 'encryption', values: ['dynamic']},
+        {field: 'field', values: ['dynamic', 'public']},
+        {field: 'empty', values: ['dynamic', 'public']},
+        {field: 'publicId', values: ['public']},
+        {field: 'encryption', values: ['dynamic', 'public']},
       ]
+    },
+    {
+      type: 'select',
+      field: 'publicId',
+      label: '鏁版嵁婧�',
+      initval: wrap.publicId || '',
+      required: true,
+      options: interfaces,
+      reset_source: true,
+      callback: (record) => {
+        if (!record.publicId) return
+
+        let d = interfaces.filter(m => m.value === record.publicId)[0]
+
+        if (!d || !d.columns) return
+
+        return {
+          field: d.columns
+        }
+      }
     },
     {
       type: 'select',
       field: 'field',
       label: '鏂囨湰瀛楁',
       initval: wrap.field || '',
-      tooltip: '閫夋嫨鍔ㄦ�佸�兼椂锛岄渶璁剧疆鏂囨湰瀛楁鎵嶅彲鐢熸晥銆�',
+      timestamp: new Date().getTime(),
       required: false,
       options: columns
     },
@@ -80,14 +119,29 @@
       ]
     },
     {
-      type: 'number',
-      field: 'minHeight',
-      label: '鏈�灏忛珮搴�',
-      initval: wrap.minHeight || '',
-      min: 0,
-      max: 3000,
-      precision: 0,
-      required: false
+      type: 'radio',
+      field: 'empty',
+      label: '绌哄�奸殣钘�',
+      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鐨勯琛岃儗鏅鑹层��',
+      required: false,
+      options: [
+        {value: 'deep', label: '娣辫壊'},
+        {value: 'light', label: '娴呰壊'},
+      ]
     },
     {
       type: 'radio',
@@ -99,7 +153,7 @@
         {value: 'true', label: '鍚敤'},
         {value: 'false', label: '绂佺敤'},
       ],
-      forbid: !appType
+      forbid: !appType || ispop || isprint
     },
     {
       type: 'multiselect',
@@ -108,7 +162,7 @@
       initval: wrap.blacklist || [],
       required: false,
       options: roleList,
-      forbid: !!appType
+      forbid: !!appType || isprint
     },
   ]
 

--
Gitblit v1.8.0