From 8ffdc354d93def23f046ad29dd5528b02444ec3d Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 28 八月 2021 17:53:43 +0800 Subject: [PATCH] 2021-08-28 --- src/menu/components/card/cardcellcomponent/formconfig.jsx | 11 +++++ src/mob/searchconfig/settingform/index.jsx | 12 ++++++ src/tabviews/custom/components/card/cardcellList/index.jsx | 4 ++ src/mob/components/topbar/normal-navbar/index.jsx | 27 ++++++++++++- src/menu/datasource/verifycard/settingform/index.jsx | 19 +++++++++ src/menu/components/card/cardcellcomponent/elementform/index.jsx | 2 6 files changed, 72 insertions(+), 3 deletions(-) diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx index 1a5f1d4..380f71e 100644 --- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx +++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx @@ -14,7 +14,7 @@ const cardTypeOptions = { sequence: ['eleType', 'width'], - text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link'], + text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link', 'noValue'], number: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix'], picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link'], video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop'], diff --git a/src/menu/components/card/cardcellcomponent/formconfig.jsx b/src/menu/components/card/cardcellcomponent/formconfig.jsx index f77d270..92ccfc4 100644 --- a/src/menu/components/card/cardcellcomponent/formconfig.jsx +++ b/src/menu/components/card/cardcellcomponent/formconfig.jsx @@ -308,6 +308,17 @@ }, { type: 'radio', + key: 'noValue', + label: '绌哄��', + initVal: card.noValue || 'show', + required: false, + options: [ + { value: 'show', text: '鏄剧ず' }, + { value: 'hide', text: '闅愯棌' } + ] + }, + { + type: 'radio', key: 'link', label: '閾炬帴', initVal: card.link || '', diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx index d7916a3..a460ba1 100644 --- a/src/menu/datasource/verifycard/settingform/index.jsx +++ b/src/menu/datasource/verifycard/settingform/index.jsx @@ -137,6 +137,14 @@ } } + onSysInter = (e) => { + let value = e.target.value + + if (value === 'true') { + this.props.form.setFieldsValue({interface: window.GLOB.mainSystemApi}) + } + } + changeSupModule = (val) => { this.setState({supModule: val}) } @@ -210,6 +218,17 @@ </Radio.Group>)} </Form.Item> </Col> + {interType === 'outer' ? <Col span={8}> + <Form.Item label="绯荤粺鎺ュ彛"> + {getFieldDecorator('sysInterface', { + initialValue: setting.sysInterface || 'false' + })( + <Radio.Group onChange={this.onSysInter}> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> + </Radio.Group>)} + </Form.Item> + </Col> : null} {interType === 'system' ? <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title={'鑷畾涔夎剼鏈腑鐨勫彉閲忥紙闄ゆ姤閿欏強鍙敤瀛楁澶栵級锛岄渶浠ユ鏍囪瘑寮�澶淬��'}> diff --git a/src/mob/components/topbar/normal-navbar/index.jsx b/src/mob/components/topbar/normal-navbar/index.jsx index f92afda..84a1fb9 100644 --- a/src/mob/components/topbar/normal-navbar/index.jsx +++ b/src/mob/components/topbar/normal-navbar/index.jsx @@ -38,6 +38,7 @@ subtype: card.subtype, wrap: { type: 'navbar', height: 50, title: 'NavBar', back: 'true', search: 'false', logout: 'false' }, style: {boxShadow: '0 0 3px #D9D9D9', shadowColor: '#D9D9D9', shadowBlur: '3px', paddingLeft: '10px', paddingRight: '10px', lineHeight: '2.8', fontSize: '18px' }, + searchStyle: {} } if (card.config) { @@ -94,7 +95,13 @@ if (comIds[0] !== card.uuid) return - let _card = {...card, style} + let _card = fromJS(card).toJS() + + if (comIds[1] === 'search') { + _card.searchStyle = style + } else { + _card.style = style + } this.setState({ card: _card @@ -107,6 +114,12 @@ const { card } = this.state MKEmitter.emit('changeStyle', [card.uuid], ['font', 'background', 'border', 'padding', 'shadow'], card.style) + } + + changeSearchStyle = () => { + const { card } = this.state + + MKEmitter.emit('changeStyle', [card.uuid, 'search'], ['font', 'background', 'border'], card.searchStyle || {}) } clickComponent = (e) => { @@ -199,7 +212,17 @@ </div> {card.wrap.type !== 'search' ? <div className="am-navbar-title">{card.wrap.title || ''}</div> : - <div className="am-navbar-search" onDoubleClick={this.setSearch}><div className="search-bar"><Icon type="search" /></div></div> + <div className="am-navbar-search" onDoubleClick={this.setSearch}> + <Popover overlayClassName="mk-popover-control-wrap" mouseLeaveDelay={0.2} mouseEnterDelay={0.2} content={ + <div className="mk-popover-control"> + <Icon className="style" title="璋冩暣鏍峰紡" onClick={this.changeSearchStyle} type="font-colors" /> + </div> + } trigger="hover"> + <div style={card.searchStyle} className="search-bar"> + {card.search && card.search.setting.scan === 'true' ? <Icon type="scan" /> : <Icon type="search" />} + </div> + </Popover> + </div> } <div className="am-navbar-right"> {card.wrap.search === 'true' ? <Icon type="search" onDoubleClick={this.setSearch}/> : null} diff --git a/src/mob/searchconfig/settingform/index.jsx b/src/mob/searchconfig/settingform/index.jsx index c5a5443..8949a75 100644 --- a/src/mob/searchconfig/settingform/index.jsx +++ b/src/mob/searchconfig/settingform/index.jsx @@ -197,6 +197,18 @@ </Form.Item> </Col> {type === 'search' ? <Col span={12}> + <Form.Item label="鎵爜"> + {getFieldDecorator('scan', { + initialValue: config.setting.scan || 'false' + })( + <Radio.Group> + <Radio value="true">寮�鍚�</Radio> + <Radio value="false">鍏抽棴</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> : null} + {type === 'search' ? <Col span={12}> <Form.Item label="榛戝悕鍗�"> {getFieldDecorator('blacklist', { initialValue: config.setting.blacklist || [] diff --git a/src/tabviews/custom/components/card/cardcellList/index.jsx b/src/tabviews/custom/components/card/cardcellList/index.jsx index 5d1e62b..c04f694 100644 --- a/src/tabviews/custom/components/card/cardcellList/index.jsx +++ b/src/tabviews/custom/components/card/cardcellList/index.jsx @@ -299,6 +299,10 @@ val = data[card.field] } + if (val === '' && card.noValue === 'hide') { // 绌哄�奸殣钘� + return null + } + if (val !== '' && card.format) { if (card.format === 'YYYY-MM-DD' && /^[1-9]\d{3}(-|\/)(0[1-9]|1[0-2])(-|\/)(0[1-9]|[1-2][0-9]|3[0-1])/.test(val)) { val = `${val.substr(0, 4)}-${val.substr(5, 2)}-${val.substr(8, 2)}` -- Gitblit v1.8.0