From fe21d23b147ed5cec22b4f76a88840b05495d4ad Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 18 六月 2022 22:33:59 +0800 Subject: [PATCH] 2022-06-18 --- src/menu/components/form/normal-form/options.jsx | 35 +++++++++++++++++++++++++++++++++-- 1 files changed, 33 insertions(+), 2 deletions(-) diff --git a/src/menu/components/form/normal-form/options.jsx b/src/menu/components/form/normal-form/options.jsx index 1d8278c..fa3eb97 100644 --- a/src/menu/components/form/normal-form/options.jsx +++ b/src/menu/components/form/normal-form/options.jsx @@ -1,3 +1,6 @@ +import { fromJS } from 'immutable' +import MenuUtils from '@/utils/utils-custom.js' + /** * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ @@ -9,12 +12,16 @@ if (roleList) { try { roleList = JSON.parse(roleList) - } catch { + } catch (e) { roleList = [] } } else { roleList = [] } + + let modules = [] + let menu = fromJS(window.GLOB.customMenu).toJS() + modules = MenuUtils.getSupModules(menu.components, config.uuid) || [] const wrapForm = [ { @@ -39,13 +46,16 @@ { type: 'radio', field: 'datatype', - label: '鍒濆鍊�', + label: '鏁版嵁鏉ユ簮', initval: wrap.datatype || 'static', tooltip: '鍒濆鍊兼潵婧愪簬鏁版嵁婧愭垨琛ㄥ崟榛樿鍊笺��', required: false, options: [ {value: 'dynamic', label: '鍔ㄦ��'}, {value: 'static', label: '闈欐��'}, + ], + controlFields: [ + {field: 'supModule', values: ['static']}, ] }, { @@ -92,6 +102,27 @@ forbid: config.subtype === 'tabform' }, { + type: 'radio', + field: 'permission', + label: '鏉冮檺楠岃瘉', + initval: wrap.permission || 'false', + required: false, + options: [ + {value: 'true', label: '鍚敤'}, + {value: 'false', label: '绂佺敤'}, + ], + forbid: !appType + }, + { + type: 'cascader', + field: 'supModule', + label: '涓婄骇缁勪欢', + initval: wrap.supModule || [], + required: false, + options: modules, + allowClear: true + }, + { type: 'multiselect', field: 'blacklist', label: '榛戝悕鍗�', -- Gitblit v1.8.0