From ee50d5424a093209d1c5c549f4578107893b22f8 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期四, 05 十一月 2020 18:40:54 +0800 Subject: [PATCH] 2020-11-05 --- src/menu/datasource/verifycard/settingform/index.jsx | 67 +++++++++++++++++++++++---------- 1 files changed, 47 insertions(+), 20 deletions(-) diff --git a/src/menu/datasource/verifycard/settingform/index.jsx b/src/menu/datasource/verifycard/settingform/index.jsx index de9225c..09621e4 100644 --- a/src/menu/datasource/verifycard/settingform/index.jsx +++ b/src/menu/datasource/verifycard/settingform/index.jsx @@ -20,6 +20,7 @@ state = { interType: this.props.setting.interType || 'system', + laypage: this.props.setting.laypage || 'true', modules: [], useMSearch: this.props.setting.useMSearch || 'false' } @@ -174,7 +175,7 @@ render() { const { setting, menu, columns, config } = this.props const { getFieldDecorator } = this.props.form - const { interType, modules, useMSearch } = this.state + const { interType, modules, useMSearch, laypage } = this.state const formItemLayout = { labelCol: { @@ -237,6 +238,32 @@ </Radio.Group>)} </Form.Item> </Col> + {interType === 'system' ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'鑷畾涔夎剼鏈腑鐨勫彉閲忥紙闄ゆ姤閿欏強鍙敤瀛楁澶栵級锛岄渶浠ユ鏍囪瘑寮�澶淬��'}> + <Icon type="question-circle" /> + 鍙橀噺鏍囪瘑 + </Tooltip> + }> + {getFieldDecorator('varMark', { + initialValue: setting.varMark || '', + rules: [ + { + required: true, + message: this.props.dict['form.required.input'] + '鍙橀噺鏍囪瘑!' + }, + { + pattern: /^[a-zA-Z_]*$/ig, + message: '璇蜂娇鐢ㄥ瓧姣嶆垨_' + }, + { + max: 3, + message: '鏈�澶氫笁涓瓧绗︺��' + } + ] + })(<Input placeholder={''} autoComplete="off" />)} + </Form.Item> + </Col> : null} {interType === 'inner' ? <Col span={8}> <Form.Item label={tooltip ? <Tooltip placement="topLeft" title={tooltip}> @@ -367,29 +394,12 @@ )} </Form.Item> </Col> - {!config.pageable ? <Col span={8}> - <Form.Item label={ - <Tooltip placement="topLeft" title={'鍒濆鍖栧姞杞芥椂锛屾槸鍚︿笌鍏朵粬缁勪欢涓�鍚屽姞杞芥暟鎹紝娉細浠呭湪浣跨敤绯荤粺鍑芥暟锛屼笖鍒濆鍖栧姞杞芥暟鎹椂鏈夋晥锛屽垎椤佃姹傛椂鏃犳晥銆�'}> - <Icon type="question-circle" /> - 鍚屾鏌ヨ - </Tooltip> - }> - {getFieldDecorator('sync', { - initialValue: setting.sync || 'true' - })( - <Radio.Group> - <Radio value="true">鏄�</Radio> - <Radio value="false">鍚�</Radio> - </Radio.Group> - )} - </Form.Item> - </Col> : null} {config.pageable ? <Col span={8}> <Form.Item label="鍒嗛〉"> {getFieldDecorator('laypage', { - initialValue: setting.laypage || 'false' + initialValue: setting.laypage || 'true' })( - <Radio.Group> + <Radio.Group onChange={(e) => this.setState({laypage: e.target.value})}> <Radio value="true">鏄�</Radio> <Radio value="false">鍚�</Radio> </Radio.Group> @@ -414,6 +424,23 @@ })(<InputNumber min={1} max={500} precision={0} />)} </Form.Item> </Col> : null} + {!config.pageable || (config.pageable && laypage === 'false') ? <Col span={8}> + <Form.Item label={ + <Tooltip placement="topLeft" title={'鍒濆鍖栧姞杞芥椂锛屾槸鍚︿笌鍏朵粬缁勪欢涓�鍚屽姞杞芥暟鎹紝娉細浠呭湪浣跨敤绯荤粺鍑芥暟锛屼笖鍒濆鍖栧姞杞芥暟鎹椂鏈夋晥锛屽垎椤佃姹傛椂鏃犳晥銆�'}> + <Icon type="question-circle" /> + 鍚屾鏌ヨ + </Tooltip> + }> + {getFieldDecorator('sync', { + initialValue: setting.sync || 'true' + })( + <Radio.Group> + <Radio value="true">鏄�</Radio> + <Radio value="false">鍚�</Radio> + </Radio.Group> + )} + </Form.Item> + </Col> : null} <Col span={8}> <Form.Item label={ <Tooltip placement="topLeft" title={'浼樺厛浣跨敤鍚岀骇鐨勬悳绱㈡潯浠剁粍浠讹紝鍚岀骇鎼滅储涓嶅瓨鍦ㄦ椂锛屼緷娆″悜涓婇�夊彇锛屼笌褰撳墠缁勪欢鐨勬悳绱㈡潯浠朵竴鍚岀敤浣滄暟鎹繃婊わ紙褰撳墠缁勪欢鐨勬悳绱㈡潯浠朵紭鍏堬級銆�'}> -- Gitblit v1.8.0