From 5046d0d13dc6a8563b8e54e31913bc44cfa1072f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 26 四月 2022 19:23:18 +0800 Subject: [PATCH] 2022-04-26 --- src/mob/components/tabs/antv-tabs/options.jsx | 92 +++++++++++++++++++++++++++++++++++++++------ 1 files changed, 79 insertions(+), 13 deletions(-) diff --git a/src/mob/components/tabs/antv-tabs/options.jsx b/src/mob/components/tabs/antv-tabs/options.jsx index 43ac1d4..74643d9 100644 --- a/src/mob/components/tabs/antv-tabs/options.jsx +++ b/src/mob/components/tabs/antv-tabs/options.jsx @@ -1,8 +1,10 @@ +import MenuUtils from '@/utils/utils-custom.js' + /** * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ export function getTabForm(tab, setting) { - let appType = sessionStorage.getItem('appType') + // let appType = sessionStorage.getItem('appType') let roleList = sessionStorage.getItem('sysRoles') if (roleList) { @@ -23,7 +25,6 @@ initval: tab.label || '', required: true, focus: true, - span: 22 }, { type: 'mkicon', @@ -32,7 +33,6 @@ initval: tab.icon || '', required: false, allowClear: true, - span: 22 }, // { // type: 'radio', @@ -48,15 +48,40 @@ // span: 22 // }, { - type: 'multiselect', - field: 'blacklist', - label: '榛戝悕鍗�', - initval: tab.blacklist || [], - required: false, - options: roleList, - forbid: !!appType, - span: 22 + type: 'text', + field: 'controlVal', + label: '闅愯棌鏍囪', + initval: tab.controlVal || '', + tooltip: '褰撶鐢ㄥ瓧娈靛�间笌闅愯棌鏍囪鐩哥瓑鏃讹紝鏍囩椤典細闅愯棌銆�', + required: false }, + { + type: 'color', + field: 'backgroundColor', + label: '鑳屾櫙(鍐呭鍖�)', + initval: tab.backgroundColor || 'transparent', + required: false, + }, + { + type: 'radio', + field: 'hide', + label: '闅愯棌', + initval: tab.hide || 'false', + required: false, + options: [ + {value: 'false', label: '鍚�'}, + {value: 'true', label: '鏄�'}, + ], + }, + // { + // type: 'multiselect', + // field: 'blacklist', + // label: '榛戝悕鍗�', + // initval: tab.blacklist || [], + // required: false, + // options: roleList, + // forbid: !!appType, + // }, ] return tabForm @@ -65,7 +90,9 @@ /** * @description tabs琛ㄥ崟閰嶇疆淇℃伅 */ -export function getTabsSetForm(setting) { +export function getTabsSetForm(setting, uuid) { + let modules = MenuUtils.getSupModules(window.GLOB.customMenu.components, uuid) || [] + const tabForm = [ { type: 'text', @@ -112,7 +139,46 @@ {value: 'flex', label: '寮规�у竷灞�'}, {value: 'inline-block', label: '瀹氬'}, ], - } + }, + { + type: 'cascader', + field: 'supModule', + label: '涓婄骇缁勪欢', + initval: setting.supModule || [], + tooltip: '鏍囩缁勫彲浠ラ�夋嫨涓婄骇缁勪欢锛屽~鍏ョ鐢ㄥ瓧娈碉紝鐢ㄤ簬鎺у埗鏍囩闅愯棌銆�', + required: false, + allowClear: true, + options: modules, + controlFields: [ + {field: 'controlField', notNull: true}, + ], + }, + { + type: 'text', + field: 'controlField', + label: '绂佺敤瀛楁', + initval: setting.controlField || '', + tooltip: '鐢ㄤ簬鎺у埗鏍囩闅愯棌鐨勫瓧娈碉紝鍦ㄦ爣绛句腑濉叆闅愯棌鏍囪銆�', + required: true + }, + { + type: 'color', + field: 'backgroundColor', + label: '鑳屾櫙(鏍囬鏍�)', + initval: setting.backgroundColor || 'transparent', + required: false + }, + { + type: 'radio', + field: 'permission', + label: '鏉冮檺楠岃瘉', + initval: setting.permission || 'false', + required: false, + options: [ + {value: 'true', label: '鍚敤'}, + {value: 'false', label: '绂佺敤'}, + ] + }, ] return tabForm -- Gitblit v1.8.0