From cb9ade2afd2a367ad767bc605ab7086c695dd010 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 09 十二月 2022 15:53:32 +0800 Subject: [PATCH] 2022-12-09 --- src/menu/components/form/step-form/options.jsx | 40 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 39 insertions(+), 1 deletions(-) diff --git a/src/menu/components/form/normal-form/options.jsx b/src/menu/components/form/step-form/options.jsx similarity index 72% rename from src/menu/components/form/normal-form/options.jsx rename to src/menu/components/form/step-form/options.jsx index 13dddcf..4011d4e 100644 --- a/src/menu/components/form/normal-form/options.jsx +++ b/src/menu/components/form/step-form/options.jsx @@ -1,3 +1,5 @@ +import MenuUtils from '@/utils/utils-custom.js' + /** * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ @@ -14,6 +16,17 @@ } } else { roleList = [] + } + + let modules = [] + let menu = window.GLOB.customMenu + modules = MenuUtils.getSupModules(menu.components, config.uuid, menu.interfaces) + + if (wrap.supModule && wrap.supModule.length > 0 && wrap.supModule[0] !== 'empty') { + let has = MenuUtils.checkSupModules(modules, wrap.supModule.slice(-1)[0]) + if (!has) { + wrap.supModule = '' + } } const wrapForm = [ @@ -39,13 +52,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']}, ] }, { @@ -93,6 +109,19 @@ }, { type: 'radio', + field: 'goback', + label: '绌哄�艰繑鍥�', + initval: wrap.goback || 'false', + tooltip: '褰撴煡璇㈡暟鎹负绌烘椂锛岃繑鍥炰笂涓�鐣岄潰銆�', + required: false, + options: [ + {value: 'true', label: '鏄�'}, + {value: 'false', label: '鍚�'}, + ], + forbid: appType !== 'mob' + }, + { + type: 'radio', field: 'permission', label: '鏉冮檺楠岃瘉', initval: wrap.permission || 'false', @@ -104,6 +133,15 @@ 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