From 91e232bb0b910f3670bdbccd65cc218d55e1eda9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 06 十二月 2022 16:08:20 +0800 Subject: [PATCH] Merge branch 'develop' --- src/menu/components/card/data-card/options.jsx | 83 ++++++++++++++++++++++++++++++++++++----- 1 files changed, 72 insertions(+), 11 deletions(-) diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx index 18c7a2c..8026bd2 100644 --- a/src/menu/components/card/data-card/options.jsx +++ b/src/menu/components/card/data-card/options.jsx @@ -1,20 +1,38 @@ -import { fromJS } from 'immutable' import MenuUtils from '@/utils/utils-custom.js' /** * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ -export default function (wrap, subtype, columns = [], id = '', supNodes = []) { +export default function (wrap, subtype, columns = [], id = '', supNodes = [], setting, buttons = []) { let appType = sessionStorage.getItem('appType') let MenuType = '' - let menu = fromJS(window.GLOB.customMenu).toJS() + let menu = window.GLOB.customMenu + let laypage = setting && setting.laypage !== 'false' + let interfaces = [] + if (subtype === 'propcard' && menu.interfaces) { + menu.interfaces.forEach(item => { + if (item.status === 'true') { + interfaces.push({ + value: item.uuid, + label: item.name + }) + } + }) + } if (menu.parentId === 'BillPrintTemp') { MenuType = 'billPrint' } let modules = [] if (subtype === 'propcard' || subtype === 'datacard') { - modules = MenuUtils.getSupModules(menu.components, id) || [] + modules = MenuUtils.getSupModules(menu.components, id, menu.interfaces) + + if (subtype === 'propcard' && wrap.supModule && wrap.supModule.length > 0 && wrap.supModule[0] !== 'empty') { + let has = MenuUtils.checkSupModules(modules, wrap.supModule.slice(-1)[0]) + if (!has) { + wrap.supModule = '' + } + } } let roleList = sessionStorage.getItem('sysRoles') @@ -81,14 +99,26 @@ options: [ {value: 'dynamic', label: '鍔ㄦ��', priKeyType: 'static'}, {value: 'static', label: '闈欐��', priKeyType: 'static'}, + {value: 'public', label: '鍏叡鏁版嵁婧�', priKeyType: 'static'}, ], linkFields: ['priKeyType'], controlFields: [ {field: 'goback', values: ['dynamic']}, - {field: 'empty', values: ['dynamic']}, + {field: 'empty', values: ['dynamic', 'public']}, {field: 'jump', values: ['dynamic']}, + {field: 'autoExec', values: ['dynamic']}, {field: 'supModule', values: ['static']}, + {field: 'publicId', values: ['public']}, ], + forbid: subtype !== 'propcard' + }, + { + type: 'select', + field: 'publicId', + label: '鏁版嵁婧�', + initval: wrap.publicId || '', + required: true, + options: interfaces, forbid: subtype !== 'propcard' }, { @@ -113,17 +143,19 @@ field: 'pagestyle', label: '鍒嗛〉椋庢牸', initval: wrap.pagestyle || 'page', - tooltip: '鏁版嵁婧愰�夋嫨鍒嗛〉鏃舵湁鏁堛�傛敞锛氭粦鍔ㄥ姞杞藉彧鏈夌涓�涓湁鏁�', + tooltip: '鏁版嵁婧愰�夋嫨鍒嗛〉鏃舵湁鏁堛�傛敞锛氬脊鎬у竷灞�鏃跺浐瀹氫负椤电爜銆�', required: false, + disabled: !laypage, options: [ {value: 'page', label: '椤电爜'}, - {value: 'switch', label: '宸﹀彸鍒囨崲', forbid: appType === 'mob'}, + {value: 'switch', label: '宸﹀彸鍒囨崲', forbid: appType === 'mob' || subtype === 'tablecard'}, {value: 'slide', label: '婊戝姩鍔犺浇', forbid: appType !== 'mob'}, + {value: 'more', label: '鏌ョ湅鏇村'}, ], controlFields: [ {field: 'slidetip', values: ['slide']}, ], - forbid: !(subtype === 'datacard' || (subtype === 'tablecard' && appType === 'mob')) + forbid: subtype === 'propcard' }, { type: 'radio', @@ -157,6 +189,9 @@ {ParentID: 'dynamic', value: 'static', label: '闈欐�佸��'}, {ParentID: 'dynamic', value: 'dynamic', label: '鍔ㄦ�佸��'}, {ParentID: 'dynamic', value: 'joint', label: '鎷兼帴鍊�'}, + {ParentID: 'public', value: 'static', label: '闈欐�佸��'}, + {ParentID: 'public', value: 'dynamic', label: '鍔ㄦ�佸��'}, + {ParentID: 'public', value: 'joint', label: '鎷兼帴鍊�'}, ], forbid: subtype !== 'propcard' }, @@ -186,6 +221,7 @@ {value: 'active', label: '澶栭槾褰�'}, {value: 'backFont', label: '鑳屾櫙+鏂囧瓧'}, {value: 'font', label: '鏂囧瓧'}, + {value: 'tabs', label: '鏍囩椤�'}, ...(subtype === 'datacard' && appType === 'mob' ? [{value: 'check', label: '鍕鹃��'}] : []) ], forbid: subtype === 'tablecard' @@ -279,6 +315,21 @@ }, { type: 'radio', + field: 'display', + label: '鏄剧ず鎺у埗', + initval: wrap.display || 'normal', + required: false, + options: [ + {value: 'normal', label: '姝e父鏄剧ず'}, + {value: 'hidden', label: '涓嶅彲瑙�'}, + ], + controlFields: [ + {field: 'empty', values: ['normal']}, + ], + forbid: subtype !== 'propcard' + }, + { + type: 'radio', field: 'empty', label: '绌哄�奸殣钘�', initval: wrap.empty || 'show', @@ -289,6 +340,16 @@ {value: 'show', label: '鍚�'}, {value: 'hidden', label: '鏄�'}, ], + }, + { + type: 'select', + field: 'autoExec', + label: '鑷姩鎵ц', + initval: wrap.autoExec || '', + tooltip: '鏁版嵁鏇存柊鏃惰嚜鍔ㄦ墽琛屾寜閽�傛敞锛氭鎸夐挳鎵ц鎴愬姛鍚庤皑鎱庨�夋嫨鍒锋柊椤癸紝閬垮厤閫犳垚寰幆鎵ц銆�', + required: false, + options: buttons, + forbid: subtype !== 'propcard' }, { type: 'radio', @@ -391,9 +452,9 @@ { type: 'text', field: 'controlVal', - label: '鎺у埗鍊�', + label: '绂佺敤鍊�', initval: wrap.controlVal || '', - tooltip: '褰撳瓧娈靛�间笌鎺у埗鍊肩浉绛夋椂锛岃鏁版嵁浼氱鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', + tooltip: '褰撳瓧娈靛�间笌绂佺敤鍊肩浉绛夋椂锛岃鏁版嵁浼氱鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', required: false, forbid: subtype !== 'datacard' }, @@ -441,7 +502,7 @@ initval: wrap.slidetip || wrap.slidetip === '' ? wrap.slidetip : '娌℃湁鏇村浜�', tooltip: '婊戝姩鍔犺浇鑷冲簳閮ㄦ椂鐨勬彁绀轰俊鎭��', required: false, - forbid: appType !== 'mob' || subtype === 'propcard' + forbid: !laypage || appType !== 'mob' || subtype === 'propcard' }, { type: 'table', -- Gitblit v1.8.0