From 2dc0ff994bb96eacc472442fde6cfb38b05959e9 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 07 五月 2022 17:29:13 +0800 Subject: [PATCH] 2022-05-07 --- src/tabviews/custom/components/card/prop-card/index.jsx | 21 ++++ src/views/pcdesign/index.jsx | 14 ++ src/menu/components/share/actioncomponent/dragaction/card.jsx | 3 src/templates/zshare/formconfig.jsx | 15 +++ src/menu/components/share/actioncomponent/formconfig.jsx | 15 +++ src/templates/sharecomponent/actioncomponent/actionform/index.jsx | 18 +- src/menu/components/card/cardcellcomponent/dragaction/action.jsx | 2 src/templates/comtableconfig/index.jsx | 1 src/templates/subtableconfig/index.jsx | 1 src/menu/components/share/actioncomponent/actionform/index.jsx | 20 ++-- src/tabviews/custom/components/carousel/prop-card/index.jsx | 23 ++++ src/tabviews/custom/index.jsx | 12 ++ src/views/mobdesign/index.scss | 6 + src/views/pcdesign/index.scss | 6 + src/tabviews/custom/components/card/balcony/index.jsx | 18 +++ src/views/menudesign/index.scss | 6 + src/tabviews/subtable/index.jsx | 4 src/tabviews/subtabtable/index.jsx | 4 src/templates/sharecomponent/actioncomponent/index.scss | 6 + src/tabviews/commontable/index.jsx | 3 src/views/mobdesign/index.jsx | 12 ++ src/menu/popview/index.jsx | 38 +++++++ src/templates/sharecomponent/actioncomponent/dragaction/card.jsx | 2 src/views/menudesign/index.jsx | 39 +++++++ 24 files changed, 258 insertions(+), 31 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/dragaction/action.jsx b/src/menu/components/card/cardcellcomponent/dragaction/action.jsx index 8aa9cc2..816abe9 100644 --- a/src/menu/components/card/cardcellcomponent/dragaction/action.jsx +++ b/src/menu/components/card/cardcellcomponent/dragaction/action.jsx @@ -68,7 +68,7 @@ {hasProfile ? <ProfileOutlined className="profile" title="setting" onClick={() => profileCard(id)} /> : null} </div> } trigger="hover"> - <div ref={node => drag(drop(node))} className={'ant-col card-button-cell ant-col-' + card.width} onDoubleClick={(e) => {e.stopPropagation(); doubleClickCard(id)}}> + <div ref={node => drag(drop(node))} className={'ant-col card-button-cell ant-col-' + card.width + (card.hidden === 'true' ? ' mk-hidden' : '')} onDoubleClick={(e) => {e.stopPropagation(); doubleClickCard(id)}}> <div style={{opacity: isDragging ? 0 : 1, ...card.wrapStyle}}> {btnElement} </div> diff --git a/src/menu/components/share/actioncomponent/actionform/index.jsx b/src/menu/components/share/actioncomponent/actionform/index.jsx index 112140c..7e218b0 100644 --- a/src/menu/components/share/actioncomponent/actionform/index.jsx +++ b/src/menu/components/share/actioncomponent/actionform/index.jsx @@ -11,16 +11,16 @@ const { TextArea } = Input const MkEditIcon = asyncComponent(() => import('@/components/mkIcon')) const acTyOptions = { - pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'refreshTab', 'position', 'tipTitle'], - prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'refreshTab', 'position', 'tipTitle'], - exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'refreshTab'], - excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width'], - excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'resetPageIndex', 'pagination', 'search', 'width'], - popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'syncComponent', 'clickouter'], - tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'linkmenu', 'width'], - innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'open'], - funcbutton: ['label', 'OpenType', 'funcType', 'show', 'swipe', 'icon', 'class', 'color', 'width'], - form: ['label', 'OpenType', 'formType', 'intertype', 'Ot', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'open', 'refreshTab', 'title'] + pop: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'refreshTab', 'position', 'tipTitle', 'hidden'], + prompt: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'refreshTab', 'position', 'tipTitle', 'hidden'], + exec: ['label', 'OpenType', 'intertype', 'Ot', 'show', 'swipe', 'icon', 'class', 'color', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'openmenu', 'open', 'refreshTab', 'hidden'], + excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'sheet', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'switchTab', 'width', 'hidden'], + excelOut: ['label', 'OpenType', 'intertype', 'show', 'icon', 'class', 'color', 'execSuccess', 'execError', 'syncComponent', 'switchTab', 'resetPageIndex', 'pagination', 'search', 'width', 'hidden'], + popview: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'popClose', 'resetPageIndex', 'width', 'display', 'ratio', 'syncComponent', 'clickouter', 'hidden'], + tab: ['label', 'Ot', 'OpenType', 'show', 'icon', 'class', 'color', 'linkmenu', 'width', 'hidden'], + innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'open', 'hidden'], + funcbutton: ['label', 'OpenType', 'funcType', 'show', 'swipe', 'icon', 'class', 'color', 'width', 'hidden'], + form: ['label', 'OpenType', 'formType', 'intertype', 'Ot', 'execSuccess', 'execError', 'resetPageIndex', 'syncComponent', 'width', 'open', 'refreshTab', 'title', 'hidden'] } class ActionForm extends Component { diff --git a/src/menu/components/share/actioncomponent/dragaction/card.jsx b/src/menu/components/share/actioncomponent/dragaction/card.jsx index 9ff2c22..2f251a7 100644 --- a/src/menu/components/share/actioncomponent/dragaction/card.jsx +++ b/src/menu/components/share/actioncomponent/dragaction/card.jsx @@ -50,6 +50,9 @@ _class = 'swiper swiper-' + card.color show = 'button' } + if (card.hidden === 'true') { + _class += ' mk-hidden' + } let warning = null if (card.OpenType === 'innerpage' && !card.pageTemplate) { warning = <WarningOutlined style={{color: 'orange', marginLeft: '5px'}}/> diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx index 2ce0980..819b4ba 100644 --- a/src/menu/components/share/actioncomponent/formconfig.jsx +++ b/src/menu/components/share/actioncomponent/formconfig.jsx @@ -891,6 +891,21 @@ initVal: card.closeText || '', required: false, }, + { + type: 'radio', + key: 'hidden', + label: '闅愯棌', + initVal: card.hidden || 'false', + tooltip: '闅愯棌鍚庢寜閽湪椤甸潰涓笉鏄剧ず锛屼笖涓嶅弬涓庢潈闄愬垎閰嶃��', + required: false, + options: [{ + value: 'false', + text: '鍚�' + }, { + value: 'true', + text: '鏄�' + }] + } ] return forms diff --git a/src/menu/popview/index.jsx b/src/menu/popview/index.jsx index e820385..487b78a 100644 --- a/src/menu/popview/index.jsx +++ b/src/menu/popview/index.jsx @@ -237,7 +237,7 @@ }) } - getMenuMessage = () => { + getMenuMessage = (delButtons) => { const { config } = this.state let buttons = [] let _sort = 1 @@ -252,6 +252,10 @@ traversal(item.components) } else if (item.type === 'card' || (item.type === 'table' && item.subtype === 'tablecard')) { item.action && item.action.forEach(btn => { + if (btn.hidden === 'true') { + delButtons.push(btn.uuid) + return + } this.checkBtn(btn) buttons.push(`select '${btn.uuid}' as menuid, '${item.name + '-' + btn.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ @@ -259,12 +263,20 @@ item.subcards && item.subcards.forEach(card => { card.elements && card.elements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') { + delButtons.push(cell.uuid) + return + } this.checkBtn(cell) buttons.push(`select '${cell.uuid}' as menuid, '${item.name + '-' + cell.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ }) card.backElements && card.backElements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') { + delButtons.push(cell.uuid) + return + } this.checkBtn(cell) buttons.push(`select '${cell.uuid}' as menuid, '${item.name + '-' + cell.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ @@ -274,6 +286,10 @@ item.subcards.forEach(card => { card.elements && card.elements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') { + delButtons.push(cell.uuid) + return + } this.checkBtn(cell) buttons.push(`select '${cell.uuid}' as menuid, '${item.name + '-' + cell.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ @@ -282,18 +298,30 @@ } else if (item.type === 'balcony') { item.elements && item.elements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') { + delButtons.push(cell.uuid) + return + } this.checkBtn(cell) buttons.push(`select '${cell.uuid}' as menuid, '${item.name + '-' + cell.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ }) } else if (item.type === 'line' || item.type === 'bar' || item.type === 'chart') { item.action && item.action.forEach(btn => { + if (btn.hidden === 'true') { + delButtons.push(btn.uuid) + return + } this.checkBtn(btn) buttons.push(`select '${btn.uuid}' as menuid, '${item.name + '-' + btn.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ }) } else if (item.type === 'table' && (item.subtype === 'normaltable' || item.subtype === 'editable')) { item.action && item.action.forEach(btn => { + if (btn.hidden === 'true') { + delButtons.push(btn.uuid) + return + } this.checkBtn(btn) buttons.push(`select '${btn.uuid}' as menuid, '${item.name + '-' + btn.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ @@ -301,6 +329,10 @@ item.cols && item.cols.forEach(col => { if (col.type !== 'action') return col.elements.forEach(btn => { + if (btn.hidden === 'true') { + delButtons.push(btn.uuid) + return + } this.checkBtn(btn) buttons.push(`select '${btn.uuid}' as menuid, '${item.name + '-' + btn.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ @@ -354,7 +386,6 @@ submitConfig = () => { const { btn } = this.props - const { delButtons } = this.state let config = fromJS(this.state.config).toJS() if ((config.cacheUseful === 'true' && !config.cacheTime) || !config.MenuNo || !config.MenuName) { @@ -402,13 +433,14 @@ LText: [] } + let delButtons = fromJS(this.state.delButtons).toJS() if (sessionStorage.getItem('appType') === 'pc') { param.TypeCharOne = sessionStorage.getItem('kei_no') param.Typename = 'pc' btnParam.LText = '' } else { - btnParam.LText = this.getMenuMessage() + btnParam.LText = this.getMenuMessage(delButtons) btnParam.LText = btnParam.LText.join(' union all ') btnParam.LText = Utils.formatOptions(btnParam.LText) btnParam.timestamp = moment().format('YYYY-MM-DD HH:mm:ss') diff --git a/src/tabviews/commontable/index.jsx b/src/tabviews/commontable/index.jsx index 3b32650..c57cdb6 100644 --- a/src/tabviews/commontable/index.jsx +++ b/src/tabviews/commontable/index.jsx @@ -159,7 +159,7 @@ // 鏉冮檺杩囨护 if (this.props.menuType !== 'HS') { - config.action = config.action.filter(item => permAction[item.uuid]) + config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid]) config.tabgroups.forEach(group => { group.sublist = group.sublist.filter(tab => { if (tab.supMenu === 'mainTable') { @@ -169,6 +169,7 @@ }) }) } else { + config.action = config.action.filter(item => item.hidden !== 'true') config.tabgroups.forEach(group => { group.sublist = group.sublist.map(tab => { if (tab.supMenu === 'mainTable') { diff --git a/src/tabviews/custom/components/card/balcony/index.jsx b/src/tabviews/custom/components/card/balcony/index.jsx index c92528f..313f2b9 100644 --- a/src/tabviews/custom/components/card/balcony/index.jsx +++ b/src/tabviews/custom/components/card/balcony/index.jsx @@ -119,6 +119,7 @@ MKEmitter.addListener('reloadData', this.reloadData) MKEmitter.addListener('syncBalconyData', this.syncBalconyData) MKEmitter.addListener('resetSelectLine', this.resetParentParam) + MKEmitter.addListener('queryModuleParam', this.queryModuleParam) MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult) this.handleTimer() } @@ -135,6 +136,7 @@ MKEmitter.removeListener('reloadData', this.reloadData) MKEmitter.removeListener('syncBalconyData', this.syncBalconyData) MKEmitter.removeListener('resetSelectLine', this.resetParentParam) + MKEmitter.removeListener('queryModuleParam', this.queryModuleParam) MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult) } @@ -283,6 +285,22 @@ } } + /** + * @description 瀵煎嚭Excel鏃讹紝鑾峰彇椤甸潰鎼滅储鎺掑簭绛夊弬鏁� + */ + queryModuleParam = (menuId, btnId) => { + const { config } = this.state + + if (config.uuid !== menuId) return + + MKEmitter.emit('returnModuleParam', config.uuid, btnId, { + arr_field: '', + orderBy: '', + search: [], + menuName: config.name + }) + } + reloadData = (menuId) => { const { config } = this.state diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx index 921b4a9..7afcd7a 100644 --- a/src/tabviews/custom/components/card/prop-card/index.jsx +++ b/src/tabviews/custom/components/card/prop-card/index.jsx @@ -129,6 +129,7 @@ componentDidMount () { MKEmitter.addListener('reloadData', this.reloadData) MKEmitter.addListener('resetSelectLine', this.resetParentParam) + MKEmitter.addListener('queryModuleParam', this.queryModuleParam) MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult) this.handleTimer() } @@ -144,6 +145,7 @@ } MKEmitter.removeListener('reloadData', this.reloadData) MKEmitter.removeListener('resetSelectLine', this.resetParentParam) + MKEmitter.removeListener('queryModuleParam', this.queryModuleParam) MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult) } @@ -292,6 +294,25 @@ } } + /** + * @description 瀵煎嚭Excel鏃讹紝鑾峰彇椤甸潰鎼滅储鎺掑簭绛夊弬鏁� + */ + queryModuleParam = (menuId, btnId) => { + const { mainSearch } = this.props + const { config } = this.state + + if (config.uuid !== menuId) return + + let searches = config.setting.useMSearch && mainSearch ? mainSearch : [] + + MKEmitter.emit('returnModuleParam', config.uuid, btnId, { + arr_field: '', + orderBy: '', + search: searches, + menuName: config.name + }) + } + reloadData = (menuId) => { const { config } = this.state diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx index 34f0eb3..f4f51b7 100644 --- a/src/tabviews/custom/components/carousel/prop-card/index.jsx +++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx @@ -97,7 +97,8 @@ componentDidMount () { MKEmitter.addListener('reloadData', this.reloadData) MKEmitter.addListener('resetSelectLine', this.resetParentParam) - MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult) + MKEmitter.addListener('queryModuleParam', this.queryModuleParam) + MKEmitter.addListener('refreshByButtonResult', this.refreshByButtonResult) } shouldComponentUpdate (nextProps, nextState) { @@ -110,6 +111,7 @@ } MKEmitter.removeListener('reloadData', this.reloadData) MKEmitter.removeListener('resetSelectLine', this.resetParentParam) + MKEmitter.removeListener('queryModuleParam', this.queryModuleParam) MKEmitter.removeListener('refreshByButtonResult', this.refreshByButtonResult) } @@ -182,6 +184,25 @@ } } + /** + * @description 瀵煎嚭Excel鏃讹紝鑾峰彇椤甸潰鎼滅储鎺掑簭绛夊弬鏁� + */ + queryModuleParam = (menuId, btnId) => { + const { mainSearch } = this.props + const { config } = this.state + + if (config.uuid !== menuId) return + + let searches = config.setting.useMSearch && mainSearch ? mainSearch : [] + + MKEmitter.emit('returnModuleParam', config.uuid, btnId, { + arr_field: '', + orderBy: '', + search: searches, + menuName: config.name + }) + } + reloadData = (menuId) => { const { config } = this.state diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx index e4b0bdd..f3d603c 100644 --- a/src/tabviews/custom/index.jsx +++ b/src/tabviews/custom/index.jsx @@ -593,6 +593,8 @@ let tabId = this.props.Tab ? this.props.Tab.uuid : '' // 寮圭獥鏍囩鎸夐挳Id if (item.action && item.action.length > 0) { item.action = item.action.filter(cell => { + if (item.hidden === 'true') return false + cell.logLabel = item.$menuname + '-' + cell.label cell.ContainerId = this.state.ContainerId cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : '' @@ -631,6 +633,8 @@ card.elements = card.elements.filter(cell => { if (cell.eleType === 'button') { + if (cell.hidden === 'true') return false + cell.logLabel = item.$menuname + '-' + cell.label cell.Ot = cell.Ot || 'requiredSgl' cell.ContainerId = this.state.ContainerId @@ -659,6 +663,8 @@ }) card.backElements = card.backElements.filter(cell => { if (cell.eleType === 'button') { + if (cell.hidden === 'true') return false + cell.logLabel = item.$menuname + '-' + cell.label cell.Ot = cell.Ot || 'requiredSgl' cell.ContainerId = this.state.ContainerId @@ -692,6 +698,8 @@ } item.elements = item.elements.filter(cell => { if (cell.eleType === 'button') { + if (cell.hidden === 'true') return false + cell.logLabel = item.$menuname + '-' + cell.label cell.ContainerId = this.state.ContainerId cell.syncComponentId = cell.syncComponent ? (cell.syncComponent.pop() || '') : '' @@ -718,6 +726,8 @@ let _hasheight = card.style.height && card.style.height !== 'auto' card.elements = card.elements.filter(cell => { if (cell.eleType === 'button') { + if (cell.hidden === 'true') return false + cell.logLabel = item.$menuname + '-' + cell.label cell.Ot = cell.Ot || 'requiredSgl' cell.ContainerId = this.state.ContainerId @@ -748,6 +758,8 @@ item.cols = item.cols.filter(col => { if (col.type !== 'action') return true col.elements = col.elements.filter(cell => { + if (cell.hidden === 'true') return false + cell.logLabel = item.$menuname + '-' + cell.label cell.Ot = cell.Ot || 'requiredSgl' cell.ContainerId = this.state.ContainerId diff --git a/src/tabviews/subtable/index.jsx b/src/tabviews/subtable/index.jsx index 5f39261..b71b95a 100644 --- a/src/tabviews/subtable/index.jsx +++ b/src/tabviews/subtable/index.jsx @@ -134,7 +134,9 @@ // 鏉冮檺杩囨护 if (this.props.menuType !== 'HS') { - config.action = config.action.filter(item => permAction[item.uuid]) + config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid]) + } else { + config.action = config.action.filter(item => item.hidden !== 'true') } config.search = Utils.initSearchVal(config.search) diff --git a/src/tabviews/subtabtable/index.jsx b/src/tabviews/subtabtable/index.jsx index 9343c02..5919a9d 100644 --- a/src/tabviews/subtabtable/index.jsx +++ b/src/tabviews/subtabtable/index.jsx @@ -129,7 +129,9 @@ // 鏉冮檺杩囨护 if (this.props.menuType !== 'HS') { - config.action = config.action.filter(item => permAction[item.uuid]) + config.action = config.action.filter(item => item.hidden !== 'true' && permAction[item.uuid]) + } else { + config.action = config.action.filter(item => item.hidden !== 'true') } config.search = Utils.initSearchVal(config.search) diff --git a/src/templates/comtableconfig/index.jsx b/src/templates/comtableconfig/index.jsx index 8117f1c..276f105 100644 --- a/src/templates/comtableconfig/index.jsx +++ b/src/templates/comtableconfig/index.jsx @@ -378,6 +378,7 @@ } _config.action.forEach(item => { + if (item.hidden === 'true') return _sort++ if (item.OpenType === 'popview') { btntabs.push({ diff --git a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx index fcaf733..66d820d 100644 --- a/src/templates/sharecomponent/actioncomponent/actionform/index.jsx +++ b/src/templates/sharecomponent/actioncomponent/actionform/index.jsx @@ -13,15 +13,15 @@ const { TextArea } = Input const actionTypeOptions = { - pop: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output', 'tipTitle'], - prompt: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output', 'tipTitle'], - exec: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output'], - excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'icon', 'class', 'sheet', 'execSuccess', 'execError'], - excelOut: ['label', 'OpenType', 'intertype', 'icon', 'class', 'execSuccess', 'execError', 'pagination', 'search'], - popview: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose', 'display', 'ratio', 'clickouter'], - tab: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'linkmenu'], - innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position'], - funcbutton: ['label', 'OpenType', 'funcType', 'icon', 'class'] + pop: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output', 'tipTitle', 'hidden'], + prompt: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output', 'tipTitle', 'hidden'], + exec: ['label', 'position', 'OpenType', 'intertype', 'Ot', 'icon', 'class', 'execSuccess', 'execError', 'openmenu', 'output', 'hidden'], + excelIn: ['label', 'Ot', 'OpenType', 'intertype', 'icon', 'class', 'sheet', 'execSuccess', 'execError', 'hidden'], + excelOut: ['label', 'OpenType', 'intertype', 'icon', 'class', 'execSuccess', 'execError', 'pagination', 'search', 'hidden'], + popview: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'tabType', 'linkTab', 'popClose', 'display', 'ratio', 'clickouter', 'hidden'], + tab: ['label', 'Ot', 'OpenType', 'icon', 'class', 'position', 'linkmenu', 'hidden'], + innerpage: ['label', 'Ot', 'OpenType', 'pageTemplate', 'icon', 'class', 'position', 'hidden'], + funcbutton: ['label', 'OpenType', 'funcType', 'icon', 'class', 'hidden'] } class MainSearch extends Component { diff --git a/src/templates/sharecomponent/actioncomponent/dragaction/card.jsx b/src/templates/sharecomponent/actioncomponent/dragaction/card.jsx index 21a74ec..f4b209a 100644 --- a/src/templates/sharecomponent/actioncomponent/dragaction/card.jsx +++ b/src/templates/sharecomponent/actioncomponent/dragaction/card.jsx @@ -58,7 +58,7 @@ <div className="page-card" style={{ opacity: opacity}}> <div ref={node => drag(drop(node))}> <Button - className={'mk-btn mk-' + card.class} + className={'mk-btn mk-' + card.class + (card.hidden === 'true' ? ' mk-hidden' : '')} icon={card.icon} key={card.uuid} onDoubleClick={() => doubleClickCard(id)} diff --git a/src/templates/sharecomponent/actioncomponent/index.scss b/src/templates/sharecomponent/actioncomponent/index.scss index cfa9c43..4404955 100644 --- a/src/templates/sharecomponent/actioncomponent/index.scss +++ b/src/templates/sharecomponent/actioncomponent/index.scss @@ -6,6 +6,12 @@ > .ant-row { min-height: 65px; } + .mk-hidden { + text-decoration: line-through!important; + span { + text-decoration: line-through!important; + } + } .page-card { display: inline-block; margin: 0px 0px 0px 0px; diff --git a/src/templates/subtableconfig/index.jsx b/src/templates/subtableconfig/index.jsx index c7f9293..48109a9 100644 --- a/src/templates/subtableconfig/index.jsx +++ b/src/templates/subtableconfig/index.jsx @@ -361,6 +361,7 @@ let btntabs = [] _config.action.forEach((item, index) => { + if (item.hidden === 'true') return if (item.OpenType === 'popview') { btntabs.push(`select '${item.uuid}' as MenuID ,'${item.linkTab}' as Tabid,'${item.label}' as TabName ,'${(index + 1) * 10}' as Sort`) } diff --git a/src/templates/zshare/formconfig.jsx b/src/templates/zshare/formconfig.jsx index a5f39fd..a5e2a61 100644 --- a/src/templates/zshare/formconfig.jsx +++ b/src/templates/zshare/formconfig.jsx @@ -1493,6 +1493,21 @@ initVal: card.reason || '', required: false }, + { + type: 'radio', + key: 'hidden', + label: '闅愯棌', + initVal: card.hidden || 'false', + tooltip: '闅愯棌鍚庢寜閽湪椤甸潰涓笉鏄剧ず锛屼笖涓嶅弬涓庢潈闄愬垎閰嶃��', + required: false, + options: [{ + value: 'false', + text: '鍚�' + }, { + value: 'true', + text: '鏄�' + }] + } ] } diff --git a/src/views/menudesign/index.jsx b/src/views/menudesign/index.jsx index f07b1fe..7a1b16c 100644 --- a/src/views/menudesign/index.jsx +++ b/src/views/menudesign/index.jsx @@ -456,7 +456,7 @@ }) } - getMenuMessage = () => { + getMenuMessage = (delButtons) => { const { config } = this.state let buttons = [] let _sort = 1 @@ -471,6 +471,10 @@ traversal(item.components) } else if (item.type === 'card' || (item.type === 'table' && item.subtype === 'tablecard')) { item.action && item.action.forEach(btn => { + if (btn.hidden === 'true') { + delButtons.push(btn.uuid) + return + } this.checkBtn(btn) buttons.push(`select '${btn.uuid}' as menuid, '${item.name + '-' + btn.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ @@ -478,12 +482,20 @@ item.subcards.forEach(card => { card.elements && card.elements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') { + delButtons.push(cell.uuid) + return + } this.checkBtn(cell) buttons.push(`select '${cell.uuid}' as menuid, '${item.name + '-' + cell.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ }) card.backElements && card.backElements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') { + delButtons.push(cell.uuid) + return + } this.checkBtn(cell) buttons.push(`select '${cell.uuid}' as menuid, '${item.name + '-' + cell.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ @@ -493,6 +505,10 @@ item.subcards.forEach(card => { card.elements && card.elements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') { + delButtons.push(cell.uuid) + return + } this.checkBtn(cell) buttons.push(`select '${cell.uuid}' as menuid, '${item.name + '-' + cell.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ @@ -501,18 +517,30 @@ } else if (item.type === 'balcony') { item.elements && item.elements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') { + delButtons.push(cell.uuid) + return + } this.checkBtn(cell) buttons.push(`select '${cell.uuid}' as menuid, '${item.name + '-' + cell.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ }) } else if (item.type === 'line' || item.type === 'bar' || item.type === 'chart') { item.action && item.action.forEach(btn => { + if (btn.hidden === 'true') { + delButtons.push(btn.uuid) + return + } this.checkBtn(btn) buttons.push(`select '${btn.uuid}' as menuid, '${item.name + '-' + btn.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ }) } else if (item.type === 'table' && (item.subtype === 'normaltable' || item.subtype === 'editable')) { item.action && item.action.forEach(btn => { + if (btn.hidden === 'true') { + delButtons.push(btn.uuid) + return + } this.checkBtn(btn) buttons.push(`select '${btn.uuid}' as menuid, '${item.name + '-' + btn.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ @@ -520,6 +548,10 @@ item.cols && item.cols.forEach(col => { if (col.type !== 'action') return col.elements.forEach(btn => { + if (btn.hidden === 'true') { + delButtons.push(btn.uuid) + return + } this.checkBtn(btn) buttons.push(`select '${btn.uuid}' as menuid, '${item.name + '-' + btn.label}' as menuname, '${_sort * 10}' as Sort`) _sort++ @@ -555,7 +587,7 @@ } submitConfig = () => { - const { MenuType, delButtons, copyButtons, thawButtons } = this.state + const { MenuType, copyButtons, thawButtons } = this.state let config = fromJS(this.state.config).toJS() if (MenuType === 'billPrint' && (!config.firstCount || !config.everyPCount)) { @@ -622,9 +654,10 @@ LText: [] } + let delButtons = fromJS(this.state.delButtons).toJS() let btnIds = '' // 鐢ㄤ簬澶嶅埗鎸夐挳鐨勮繃婊� if (MenuType !== 'billPrint') { - btnParam.LText = this.getMenuMessage() + btnParam.LText = this.getMenuMessage(delButtons) btnParam.LText = btnParam.LText.join(' union all ') btnIds = btnParam.LText diff --git a/src/views/menudesign/index.scss b/src/views/menudesign/index.scss index b19dd66..e8b1e83 100644 --- a/src/views/menudesign/index.scss +++ b/src/views/menudesign/index.scss @@ -4,6 +4,12 @@ .pc-menu-view { background: #000; min-height: 100vh; + .mk-hidden { + text-decoration: line-through!important; + span { + text-decoration: line-through!important; + } + } >.menu-body { width: 100vw; height: 100vh; diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index 7734346..99dab83 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -937,6 +937,8 @@ return null } else if (item.type === 'card' || (item.type === 'table' && item.subtype === 'tablecard')) { item.action && item.action.forEach(btn => { + if (btn.hidden === 'true') return + this.checkBtn(btn) m.children.push({ key: btn.uuid, @@ -946,6 +948,8 @@ item.subcards.forEach(card => { card.elements && card.elements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') return + this.checkBtn(cell) m.children.push({ key: cell.uuid, @@ -957,6 +961,8 @@ item.subcards.forEach(card => { card.elements && card.elements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') return + this.checkBtn(cell) m.children.push({ key: cell.uuid, @@ -967,6 +973,8 @@ } else if (item.type === 'balcony') { item.elements && item.elements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') return + this.checkBtn(cell) m.children.push({ key: cell.uuid, @@ -993,6 +1001,8 @@ }) } else if (item.type === 'table' && item.subtype === 'normaltable') { item.action && item.action.forEach(btn => { + if (btn.hidden === 'true') return + this.checkBtn(btn) m.children.push({ key: btn.uuid, @@ -1002,6 +1012,8 @@ item.cols && item.cols.forEach(col => { if (col.type !== 'action') return col.elements.forEach(btn => { + if (btn.hidden === 'true') return + this.checkBtn(btn) m.children.push({ key: btn.uuid, diff --git a/src/views/mobdesign/index.scss b/src/views/mobdesign/index.scss index 0881850..0361f83 100644 --- a/src/views/mobdesign/index.scss +++ b/src/views/mobdesign/index.scss @@ -1,6 +1,12 @@ .mk-mob-view { min-height: 100vh; + .mk-hidden { + text-decoration: line-through!important; + span { + text-decoration: line-through!important; + } + } >.view-spin { position: absolute; z-index: 3; diff --git a/src/views/pcdesign/index.jsx b/src/views/pcdesign/index.jsx index d5519f2..735a34d 100644 --- a/src/views/pcdesign/index.jsx +++ b/src/views/pcdesign/index.jsx @@ -913,6 +913,8 @@ return null } else if (item.type === 'card' || (item.type === 'table' && item.subtype === 'tablecard')) { item.action && item.action.forEach(btn => { + if (btn.hidden === 'true') return + this.checkBtn(btn) m.children.push({ key: btn.uuid, @@ -925,6 +927,8 @@ item.subcards.forEach(card => { card.elements && card.elements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') return + this.checkBtn(cell) m.children.push({ key: cell.uuid, @@ -936,6 +940,8 @@ }) card.backElements && card.backElements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') return + this.checkBtn(cell) m.children.push({ key: cell.uuid, @@ -950,6 +956,8 @@ item.subcards.forEach(card => { card.elements && card.elements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') return + this.checkBtn(cell) m.children.push({ key: cell.uuid, @@ -963,6 +971,8 @@ } else if (item.type === 'balcony') { item.elements && item.elements.forEach(cell => { if (cell.eleType !== 'button') return + if (cell.hidden === 'true') return + this.checkBtn(cell) m.children.push({ key: cell.uuid, @@ -992,6 +1002,8 @@ }) } else if (item.type === 'table' && (item.subtype === 'normaltable' || item.subtype === 'editable')) { item.action && item.action.forEach(btn => { + if (btn.hidden === 'true') return + this.checkBtn(btn) m.children.push({ key: btn.uuid, @@ -1004,6 +1016,8 @@ item.cols && item.cols.forEach(col => { if (col.type !== 'action') return col.elements.forEach(btn => { + if (btn.hidden === 'true') return + this.checkBtn(btn) m.children.push({ key: btn.uuid, diff --git a/src/views/pcdesign/index.scss b/src/views/pcdesign/index.scss index b8689fe..8fe64a1 100644 --- a/src/views/pcdesign/index.scss +++ b/src/views/pcdesign/index.scss @@ -5,6 +5,12 @@ background: #000; min-height: 100vh; + .mk-hidden { + text-decoration: line-through!important; + span { + text-decoration: line-through!important; + } + } >.view-spin { position: absolute; z-index: 3; -- Gitblit v1.8.0