From 0245e64a9dff794903e546c3bdf9fef7efeefdf1 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 十二月 2022 16:09:04 +0800 Subject: [PATCH] Merge branch 'master' into positec --- src/menu/components/form/simple-form/options.jsx | 43 +++++++++++++++++++++++++++++++++++++------ 1 files changed, 37 insertions(+), 6 deletions(-) diff --git a/src/menu/components/form/simple-form/options.jsx b/src/menu/components/form/simple-form/options.jsx index 12b0542..889190a 100644 --- a/src/menu/components/form/simple-form/options.jsx +++ b/src/menu/components/form/simple-form/options.jsx @@ -1,4 +1,3 @@ -import { fromJS } from 'immutable' import MenuUtils from '@/utils/utils-custom.js' /** @@ -23,21 +22,28 @@ if (appType === 'mob') { config.subcards[0].fields.forEach(f => { - if (f.field && ['select', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { + if (f.field && ['select', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { fields.push(f) } }) } else { config.subcards[0].fields.forEach(f => { - if (f.field && ['select', 'link', 'text', 'number'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { + if (f.field && ['select', 'link', 'text', 'number', 'textarea'].includes(f.type) && f.hidden !== 'true' && f.readonly !== 'true') { fields.push(f) } }) } let modules = [] - let menu = fromJS(window.GLOB.customMenu).toJS() - modules = MenuUtils.getSupModules(menu.components, config.uuid) + 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 = [ { @@ -129,7 +135,7 @@ }, { type: 'radio', - field: 'subEnable', + field: 'enable', label: '鎻愪氦', initval: wrap.enable || 'true', required: false, @@ -140,6 +146,31 @@ }, { type: 'radio', + field: 'closeEnable', + label: '鍏抽棴', + initval: wrap.closeEnable || 'false', + tooltip: '绠$悊绯荤粺涓細鍏抽棴褰撳墠鏍囩锛屽瓙搴旂敤涓负杩斿洖涓婁竴椤点��', + required: false, + options: [ + {value: 'true', label: '鏄剧ず'}, + {value: 'false', label: '闅愯棌'}, + ] + }, + { + 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', -- Gitblit v1.8.0