From a99caad99c3c19e85edd03f2fe425a0630033ac5 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 20 十一月 2024 16:09:11 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/menu/components/editor/braft-editor/options.jsx | 89 ++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 84 insertions(+), 5 deletions(-) diff --git a/src/menu/components/editor/braft-editor/options.jsx b/src/menu/components/editor/braft-editor/options.jsx index f788ef9..44defce 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 }, @@ -81,6 +120,46 @@ }, { type: 'radio', + field: 'empty', + label: '绌哄�奸殣钘�', + initval: wrap.empty || 'show', + tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岄殣钘忚缁勪欢銆�', + required: false, + options: [ + {value: 'show', label: '鍚�'}, + {value: 'hidden', label: '鏄�'}, + ], + }, + { + type: 'checkbox', + field: 'tbStyle', + label: '琛ㄦ牸鏍峰紡', + initval: wrap.tbStyle ? wrap.tbStyle.split(' ') : [], + tooltip: '瀵屾枃鏈腑琛ㄦ牸鐨勬牱寮忥紝娉細閫夋嫨鈥滆竟妗嗗姞绮椻�濇垨鈥滆竟妗嗛鑹插姞娣扁�濇椂鈥滄棤杈规鈥濇棤鏁堛��', + required: false, + options: [ + {value: 'th-light', label: '琛ㄥご閫忔槑'}, + {value: 'tb-flex', label: '鍒楃瓑瀹�'}, + {value: 'no-border', label: '鏃犺竟妗�'}, + {value: 'bold-border', label: '杈规鍔犵矖'}, + {value: 'deep-border', label: '杈规棰滆壊鍔犳繁'}, + ], + span: 24 + }, + // { + // 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', @@ -89,7 +168,7 @@ {value: 'true', label: '鍚敤'}, {value: 'false', label: '绂佺敤'}, ], - forbid: !appType || sessionStorage.getItem('editMenuType') === 'popview' + forbid: !appType || ispop || isprint }, { type: 'multiselect', @@ -98,7 +177,7 @@ initval: wrap.blacklist || [], required: false, options: roleList, - forbid: !!appType + forbid: !!appType || isprint }, ] -- Gitblit v1.8.0