From 137fb8ea6af2789b3238b22bac31d80bced41dfe Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 28 七月 2021 11:39:39 +0800 Subject: [PATCH] 2021-07-28 --- src/menu/components/card/data-card/wrapsetting/settingform/index.jsx | 58 ++++++++++++++++++++++++++++++++++------------------------ 1 files changed, 34 insertions(+), 24 deletions(-) diff --git a/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx b/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx index 08b58e2..d1c8eb0 100644 --- a/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx +++ b/src/menu/components/card/data-card/wrapsetting/settingform/index.jsx @@ -6,14 +6,17 @@ class SettingForm extends Component { static propTpyes = { - dict: PropTypes.object, // 瀛楀吀椤� - config: PropTypes.object, // 鍗$墖琛屼俊鎭� - wrap: PropTypes.object, // 鏁版嵁婧愰厤缃� - inputSubmit: PropTypes.func // 鍥炶溅浜嬩欢 + dict: PropTypes.object, + config: PropTypes.object, + wrap: PropTypes.object, + inputSubmit: PropTypes.func } state = { - roleList: [] + roleList: [], + appType: sessionStorage.getItem('appType'), + cardType: this.props.wrap.cardType, + MenuType: '' } UNSAFE_componentWillMount () { @@ -28,7 +31,13 @@ roleList = [] } - this.setState({roleList}) + let MenuType = '' + + if (window.GLOB.customMenu && window.GLOB.customMenu.parentId === 'BillPrintTemp') { + MenuType = 'billPrint' + } + + this.setState({roleList, MenuType}) } handleConfirm = () => { @@ -55,7 +64,7 @@ render() { const { wrap, config } = this.props const { getFieldDecorator } = this.props.form - const { roleList } = this.state + const { roleList, MenuType, appType, cardType } = this.state const formItemLayout = { labelCol: { @@ -132,7 +141,7 @@ )} </Form.Item> </Col> : null} - {config.subtype === 'datacard' ? <Col span={12}> + {config.subtype === 'datacard' || (config.subtype === 'tablecard' && appType === 'mob') ? <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="鏁版嵁婧愪腑閫夋嫨鍒嗛〉鏃舵湁鏁堛��"> <Icon type="question-circle" /> @@ -144,7 +153,8 @@ })( <Radio.Group> <Radio value="page">椤电爜</Radio> - <Radio value="switch">宸﹀彸鍒囨崲</Radio> + {appType !== 'mob' ? <Radio value="switch">宸﹀彸鍒囨崲</Radio> : null} + {appType === 'mob' ? <Radio value="slide">婊戝姩鍔犺浇</Radio> : null} </Radio.Group> )} </Form.Item> @@ -154,10 +164,22 @@ {getFieldDecorator('cardType', { initialValue: wrap.cardType || '' })( - <Radio.Group style={{whiteSpace: 'nowrap'}}> + <Radio.Group style={{whiteSpace: 'nowrap'}} onChange={(e) => this.setState({cardType: e.target.value})}> <Radio key="" value=""> 涓嶅彲閫� </Radio> <Radio key="radio" value={'radio'}> 鍗曢�� </Radio> {config.subtype !== 'propcard' ? <Radio key="checkbox" value={'checkbox'}> 澶氶�� </Radio> : null} + </Radio.Group> + )} + </Form.Item> + </Col> : null} + {config.subtype === 'datacard' && appType === 'mob' && cardType === 'checkbox' ? <Col span={12}> + <Form.Item label="鍏ㄩ��"> + {getFieldDecorator('checkAll', { + initialValue: wrap.checkAll || 'hidden' + })( + <Radio.Group> + <Radio key="hidden" value="hidden"> 闅愯棌 </Radio> + <Radio key="show" value="show"> 鏄剧ず </Radio> </Radio.Group> )} </Form.Item> @@ -180,7 +202,7 @@ )} </Form.Item> </Col> : null} - {config.subtype !== 'tablecard' ? <Col span={12}> + {config.subtype !== 'tablecard' && appType !== 'mob' ? <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="榧犳爣鎮诞浜庡崱鐗囦笂鏂规椂锛屽崱鐗囨斁澶�1.05鍊嶃��"> <Icon type="question-circle" /> @@ -197,19 +219,7 @@ )} </Form.Item> </Col> : null} - {config.subtype === 'tablecard' ? <Col span={12}> - <Form.Item label={ - <Tooltip placement="topLeft" title="琛ㄦ牸楂樺害锛岃秴鍑烘椂婊氬姩锛岄珮搴︿负绌烘椂鏍规嵁鍐呭鑷�傚簲銆�"> - <Icon type="question-circle" /> - 楂樺害 - </Tooltip> - }> - {getFieldDecorator('height', { - initialValue: wrap.height - })(<InputNumber min={100} max={2000} precision={0} onPressEnter={this.handleSubmit} />)} - </Form.Item> - </Col> : null} - {config.subtype === 'propcard' ? <Col span={12}> + {config.subtype === 'propcard' && MenuType === 'billPrint' ? <Col span={12}> <Form.Item label={ <Tooltip placement="topLeft" title="閫夋嫨绫诲瀷涓恒�婇〉鐪�/椤佃剼銆嬫椂锛屾墦鍗扮殑姣忛〉閲岄兘浼氬甫鏈夎缁勪欢銆�"> <Icon type="question-circle" /> -- Gitblit v1.8.0