From bf292de8879e2ce71696cb3ddc4dc8fa88d91a20 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 10 六月 2022 16:51:22 +0800 Subject: [PATCH] 2022-06-10 --- src/tabviews/custom/components/card/cardcellList/index.jsx | 12 ++-- src/mob/components/menubar/normal-menubar/menucomponent/index.jsx | 2 src/menu/components/table/normal-table/options.jsx | 4 src/menu/components/card/data-card/options.jsx | 10 ++- src/menu/components/card/table-card/index.jsx | 2 src/tabviews/zshare/actionList/popupbutton/index.jsx | 2 src/mob/components/menubar/normal-menubar/index.jsx | 18 +++++ src/components/normalform/modalform/mkRadio/index.jsx | 4 src/tabviews/custom/components/share/normalTable/index.scss | 4 + src/menu/components/card/data-card/index.jsx | 4 src/tabviews/custom/components/table/edit-table/normalTable/index.jsx | 36 ++++++++---- src/menu/components/form/normal-form/options.jsx | 2 src/tabviews/custom/components/share/normalTable/index.jsx | 18 ++++-- src/menu/components/share/copycomponent/index.jsx | 10 ++ src/mob/modalconfig/index.jsx | 3 src/views/mobdesign/index.jsx | 2 src/utils/utils.js | 10 ++- 17 files changed, 98 insertions(+), 45 deletions(-) diff --git a/src/components/normalform/modalform/mkRadio/index.jsx b/src/components/normalform/modalform/mkRadio/index.jsx index 212df13..088ed0e 100644 --- a/src/components/normalform/modalform/mkRadio/index.jsx +++ b/src/components/normalform/modalform/mkRadio/index.jsx @@ -80,10 +80,10 @@ } render() { - const { value, options } = this.state + const { value, options, config } = this.state return ( - <Radio.Group style={{whiteSpace: 'nowrap'}} value={value} onChange={this.onChange}> + <Radio.Group style={{whiteSpace: 'nowrap'}} disabled={config.disabled} value={value} onChange={this.onChange}> {options.map(option => <Radio key={option.value} disabled={option.disabled} value={option.value}>{option.label}</Radio>)} </Radio.Group> ) diff --git a/src/menu/components/card/data-card/index.jsx b/src/menu/components/card/data-card/index.jsx index e81688c..67eea0f 100644 --- a/src/menu/components/card/data-card/index.jsx +++ b/src/menu/components/card/data-card/index.jsx @@ -568,8 +568,8 @@ getWrapForms = () => { const { card } = this.state - - return getWrapForm(card.wrap, card.subtype, card.columns, card.uuid, card.supNodes) + + return getWrapForm(card.wrap, card.subtype, card.columns, card.uuid, card.supNodes, card.setting) } updateWrap = (res) => { diff --git a/src/menu/components/card/data-card/options.jsx b/src/menu/components/card/data-card/options.jsx index 18c7a2c..64bbde6 100644 --- a/src/menu/components/card/data-card/options.jsx +++ b/src/menu/components/card/data-card/options.jsx @@ -4,10 +4,11 @@ /** * @description Wrap琛ㄥ崟閰嶇疆淇℃伅 */ -export default function (wrap, subtype, columns = [], id = '', supNodes = []) { +export default function (wrap, subtype, columns = [], id = '', supNodes = [], setting) { let appType = sessionStorage.getItem('appType') let MenuType = '' let menu = fromJS(window.GLOB.customMenu).toJS() + let laypage = setting && setting.laypage !== 'false' if (menu.parentId === 'BillPrintTemp') { MenuType = 'billPrint' @@ -115,6 +116,7 @@ initval: wrap.pagestyle || 'page', tooltip: '鏁版嵁婧愰�夋嫨鍒嗛〉鏃舵湁鏁堛�傛敞锛氭粦鍔ㄥ姞杞藉彧鏈夌涓�涓湁鏁�', required: false, + disabled: !laypage, options: [ {value: 'page', label: '椤电爜'}, {value: 'switch', label: '宸﹀彸鍒囨崲', forbid: appType === 'mob'}, @@ -391,9 +393,9 @@ { type: 'text', field: 'controlVal', - label: '鎺у埗鍊�', + label: '绂佺敤鍊�', initval: wrap.controlVal || '', - tooltip: '褰撳瓧娈靛�间笌鎺у埗鍊肩浉绛夋椂锛岃鏁版嵁浼氱鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', + tooltip: '褰撳瓧娈靛�间笌绂佺敤鍊肩浉绛夋椂锛岃鏁版嵁浼氱鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', required: false, forbid: subtype !== 'datacard' }, @@ -441,7 +443,7 @@ initval: wrap.slidetip || wrap.slidetip === '' ? wrap.slidetip : '娌℃湁鏇村浜�', tooltip: '婊戝姩鍔犺浇鑷冲簳閮ㄦ椂鐨勬彁绀轰俊鎭��', required: false, - forbid: appType !== 'mob' || subtype === 'propcard' + forbid: !laypage || appType !== 'mob' || subtype === 'propcard' }, { type: 'table', diff --git a/src/menu/components/card/table-card/index.jsx b/src/menu/components/card/table-card/index.jsx index 9fb3c24..50f198d 100644 --- a/src/menu/components/card/table-card/index.jsx +++ b/src/menu/components/card/table-card/index.jsx @@ -434,7 +434,7 @@ getWrapForms = () => { const { card } = this.state - return getWrapForm(card.wrap, card.subtype) + return getWrapForm(card.wrap, card.subtype, null, null, null, card.setting) } updateWrap = (res) => { diff --git a/src/menu/components/form/normal-form/options.jsx b/src/menu/components/form/normal-form/options.jsx index 13dddcf..412d523 100644 --- a/src/menu/components/form/normal-form/options.jsx +++ b/src/menu/components/form/normal-form/options.jsx @@ -39,7 +39,7 @@ { type: 'radio', field: 'datatype', - label: '鍒濆鍊�', + label: '鏁版嵁鏉ユ簮', initval: wrap.datatype || 'static', tooltip: '鍒濆鍊兼潵婧愪簬鏁版嵁婧愭垨琛ㄥ崟榛樿鍊笺��', required: false, diff --git a/src/menu/components/share/copycomponent/index.jsx b/src/menu/components/share/copycomponent/index.jsx index 74bacff..62c57e2 100644 --- a/src/menu/components/share/copycomponent/index.jsx +++ b/src/menu/components/share/copycomponent/index.jsx @@ -7,8 +7,8 @@ class CopyComponent extends Component { static propTpyes = { - btnlog: PropTypes.array, - handlelog: PropTypes.func + type: PropTypes.string, + card: PropTypes.object } trigger = () => { @@ -24,6 +24,12 @@ _val.$srcId = srcid } + if (type === 'menucell') { + _val.setting.type = 'linkmenu' + _val.setting.linkMenuId = '' + _val.setting.copyMenuId = '' + } + _val = window.btoa(window.encodeURIComponent(JSON.stringify(_val))) } catch (e) { message.warning('澶嶅埗澶辫触锛岃閲嶈瘯锛�') diff --git a/src/menu/components/table/normal-table/options.jsx b/src/menu/components/table/normal-table/options.jsx index cf01415..04ab313 100644 --- a/src/menu/components/table/normal-table/options.jsx +++ b/src/menu/components/table/normal-table/options.jsx @@ -218,9 +218,9 @@ { type: 'text', field: 'controlVal', - label: '鎺у埗鍊�', + label: '绂佺敤鍊�', initval: wrap.controlVal || '', - tooltip: '褰撳瓧娈靛�间笌鎺у埗鍊肩浉绛夋椂锛岃鏁版嵁浼氱鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', + tooltip: '褰撳瓧娈靛�间笌绂佺敤鍊肩浉绛夋椂锛岃鏁版嵁浼氱鐢紝澶氫釜鍊肩敤閫楀彿鍒嗛殧銆�', required: false }, { diff --git a/src/mob/components/menubar/normal-menubar/index.jsx b/src/mob/components/menubar/normal-menubar/index.jsx index bca54f3..53d4e1f 100644 --- a/src/mob/components/menubar/normal-menubar/index.jsx +++ b/src/mob/components/menubar/normal-menubar/index.jsx @@ -225,6 +225,22 @@ }, 200) } + filterComponent = (config) => { + let item = null + config.subMenus.forEach(menu => { + if (menu.setting.type === 'linkmenu' && menu.setting.linkMenuId === '') { + item = menu + } + }) + + this.updateComponent(config) + + setTimeout(() => { + let node = document.getElementById(item.uuid) + node && node.click() + }, 200) + } + move = (item, direction) => { let card = fromJS(this.state.card).toJS() @@ -286,7 +302,7 @@ <EditOutlined style={{color: '#1890ff'}} title="缂栬緫"/> </NormalForm> <CopyComponent type="menubar" card={card}/> - <PasteComponent config={card} options={['menucell']} updateConfig={this.updateComponent} /> + <PasteComponent config={card} options={['menucell']} updateConfig={this.filterComponent} /> <FontColorsOutlined className="style" title="璋冩暣鏍峰紡" onClick={this.changeStyle} /> <UserComponent config={card}/> <DeleteOutlined className="close" title="鍒犻櫎缁勪欢" onClick={() => this.props.deletecomponent(card.uuid)} /> diff --git a/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx b/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx index daac1c6..863c894 100644 --- a/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx +++ b/src/mob/components/menubar/normal-menubar/menucomponent/index.jsx @@ -160,7 +160,7 @@ </div>} <div className="menu-name" style={{opacity: !card.setting.name ? 0 : 1}}>{card.setting.name || '鏄庣'}</div> <RightOutlined className="menu-right" /> - {!card.setting.name ? <NormalForm title="鑿滃崟缂栬緫" width={900} update={this.updateSetting} cancel={() => this.props.deleteElement(card, 'direct')} getForms={this.getSettingForms}> + {!card.setting.name || (card.setting.type === 'linkmenu' && card.setting.linkMenuId === '') ? <NormalForm title="鑿滃崟缂栬緫" width={900} update={this.updateSetting} cancel={() => this.props.deleteElement(card, 'direct')} getForms={this.getSettingForms}> <span id={card.uuid}></span> </NormalForm> : null} </div> diff --git a/src/mob/modalconfig/index.jsx b/src/mob/modalconfig/index.jsx index 6be97f8..aedd93b 100644 --- a/src/mob/modalconfig/index.jsx +++ b/src/mob/modalconfig/index.jsx @@ -442,6 +442,7 @@ } render () { + const { btn } = this.props const { config, dict, saving } = this.state return ( @@ -472,7 +473,7 @@ <div className="mob-shell-inner"> <div className="am-navbar"> <LeftOutlined /> - <div className="am-navbar-title">{config.setting.title}</div> + <div className="am-navbar-title">{btn.label}</div> {config.setting.btnPosition === 'top' ? <Button className="modal-submit-top">{config.setting.btnName || '纭畾'}</Button> : null} </div> <DragElement diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index 21d6ad7..fd968c0 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -355,9 +355,9 @@ if (mark.icon) { if (mark.position === 'front') { - val = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {val}</span> + val = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {val}</span> } else { - val = <span>{val} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + val = <span>{val} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } } } @@ -436,9 +436,9 @@ if (mark.icon) { if (mark.position === 'front') { - val = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {val}</span> + val = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {val}</span> } else { - val = <span>{val} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + val = <span>{val} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } } } @@ -730,9 +730,9 @@ if (mark.icon) { if (mark.position === 'front') { - val = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {val}</span> + val = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {val}</span> } else { - val = <span>{val} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + val = <span>{val} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } } } diff --git a/src/tabviews/custom/components/share/normalTable/index.jsx b/src/tabviews/custom/components/share/normalTable/index.jsx index d80adcc..0aa9953 100644 --- a/src/tabviews/custom/components/share/normalTable/index.jsx +++ b/src/tabviews/custom/components/share/normalTable/index.jsx @@ -135,10 +135,12 @@ if (mark.icon) { if (mark.position === 'front') { - content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + content = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {content}</span> } else { - content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + content = <span>{content} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } + } else if (mark.innerStyle) { + content = <span style={mark.innerStyle}>{content}</span> } } if (col.blur) { @@ -195,10 +197,12 @@ if (mark.icon) { if (mark.position === 'front') { - content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + content = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {content}</span> } else { - content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + content = <span>{content} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } + } else if (mark.innerStyle) { + content = <span style={mark.innerStyle}>{content}</span> } } @@ -349,10 +353,12 @@ if (mark.icon) { if (mark.position === 'front') { - content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + content = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {content}</span> } else { - content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + content = <span>{content} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } + } else if (mark.innerStyle) { + content = <span style={mark.innerStyle}>{content}</span> } } diff --git a/src/tabviews/custom/components/share/normalTable/index.scss b/src/tabviews/custom/components/share/normalTable/index.scss index a6ffaf4..cdc9b52 100644 --- a/src/tabviews/custom/components/share/normalTable/index.scss +++ b/src/tabviews/custom/components/share/normalTable/index.scss @@ -28,6 +28,10 @@ cursor: not-allowed; --mk-table-color: #bcbcbc; + span, div { + color: #bcbcbc!important; + } + .ant-btn { cursor: not-allowed; } diff --git a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx index a628ea3..556364e 100644 --- a/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx +++ b/src/tabviews/custom/components/table/edit-table/normalTable/index.jsx @@ -313,10 +313,12 @@ if (mark.icon) { if (mark.position === 'front') { - content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + content = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {content}</span> } else { - content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + content = <span>{content} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } + } else if (mark.innerStyle) { + content = <span style={mark.innerStyle}>{content}</span> } } @@ -405,10 +407,12 @@ if (mark.icon) { if (mark.position === 'front') { - content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + content = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {content}</span> } else { - content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + content = <span>{content} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } + } else if (mark.innerStyle) { + content = <span style={mark.innerStyle}>{content}</span> } } @@ -477,10 +481,12 @@ if (mark.icon) { if (mark.position === 'front') { - content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + content = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {content}</span> } else { - content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + content = <span>{content} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } + } else if (mark.innerStyle) { + content = <span style={mark.innerStyle}>{content}</span> } } @@ -728,10 +734,12 @@ if (mark.icon) { if (mark.position === 'front') { - content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + content = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {content}</span> } else { - content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + content = <span>{content} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } + } else if (mark.innerStyle) { + content = <span style={mark.innerStyle}>{content}</span> } } children = content @@ -779,10 +787,12 @@ if (mark.icon) { if (mark.position === 'front') { - content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + content = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {content}</span> } else { - content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + content = <span>{content} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } + } else if (mark.innerStyle) { + content = <span style={mark.innerStyle}>{content}</span> } } children = content @@ -836,10 +846,12 @@ if (mark.icon) { if (mark.position === 'front') { - content = <span><MkIcon style={{color: mark.color}} type={mark.icon} /> {content}</span> + content = <span><MkIcon style={mark.innerStyle} type={mark.icon} /> {content}</span> } else { - content = <span>{content} <MkIcon style={{color: mark.color}} type={mark.icon} /></span> + content = <span>{content} <MkIcon style={mark.innerStyle} type={mark.icon} /></span> } + } else if (mark.innerStyle) { + content = <span style={mark.innerStyle}>{content}</span> } } diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx index 5cbcba9..696a0c3 100644 --- a/src/tabviews/zshare/actionList/popupbutton/index.jsx +++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx @@ -228,6 +228,8 @@ if (btn.popClose !== 'never') { MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.popClose, btn) } + + btn.syncComponentId && MKEmitter.emit('reloadData', btn.syncComponentId) } getPop = () => { diff --git a/src/utils/utils.js b/src/utils/utils.js index a753811..e021fe6 100644 --- a/src/utils/utils.js +++ b/src/utils/utils.js @@ -2067,7 +2067,7 @@ */ export function getMark (marks, record, style = {}) { let icon = null - let color = null + let innerStyle = null let position = null style = JSON.parse(JSON.stringify(style)) @@ -2100,20 +2100,24 @@ if (type === 'font') { style.color = mark.color + innerStyle = {color: mark.color} } else if (type === 'background') { style.background = mark.color if (mark.fontColor) { style.color = mark.fontColor + innerStyle = {color: mark.fontColor} } } else if (type === 'underline') { style.textDecoration = 'underline' style.color = mark.color + innerStyle = {color: mark.color, textDecoration: 'underline'} } else if (type === 'line-through') { style.textDecoration = 'line-through' style.color = mark.color + innerStyle = {color: mark.color, textDecoration: 'line-through'} } else if (type.indexOf('icon') > -1) { icon = mark.signType[mark.signType.length - 1] - color = mark.color + innerStyle = {color: mark.color} if (type === 'iconfront' || mark.signType[1] === 'front') { position = 'front' } else { @@ -2127,7 +2131,7 @@ return { style, icon, - color, + innerStyle, position } } diff --git a/src/views/mobdesign/index.jsx b/src/views/mobdesign/index.jsx index 054e8b5..0caf370 100644 --- a/src/views/mobdesign/index.jsx +++ b/src/views/mobdesign/index.jsx @@ -1632,7 +1632,7 @@ error = `鎼滅储鏉′欢銆�${item.name}銆嬫湭璁剧疆鎼滅储瀛楁锛乣 } } - if (item.wrap && item.wrap.pagestyle === 'slide') { + if (item.wrap && item.wrap.pagestyle === 'slide' && item.pageable && item.setting.laypage !== 'false') { swipes.push(item.name) } -- Gitblit v1.8.0