From 8b0614d79c2bf5f147a5fb2318cc259241595ac8 Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 10 Jun 2020 23:50:30 +0800 Subject: [PATCH] =?UTF-8?q?U=20=E4=BC=98=E5=8C=96=E7=9B=91=E6=8E=A7?= =?UTF-8?q?=E4=B8=AD=E5=BF=83=E8=A1=A8=E5=8D=95=E5=B8=AE=E5=8A=A9=E6=8F=90?= =?UTF-8?q?=E7=A4=BA=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_web/src/pages/monitor/Form.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/spug_web/src/pages/monitor/Form.js b/spug_web/src/pages/monitor/Form.js index b413266..89990ee 100644 --- a/spug_web/src/pages/monitor/Form.js +++ b/spug_web/src/pages/monitor/Form.js @@ -31,7 +31,11 @@ class ComForm extends React.Component { {label: '钉钉', 'value': '3'}, {label: '邮件', 'value': '4'}, {label: '企业微信', 'value': '5'}, - ] + ], + helpMap: { + '1': '返回HTTP状态码200-399则判定为正常,其他为异常。', + '4': '脚本执行退出状态码为 0 则判定为正常,其他为异常。' + } } } @@ -105,8 +109,8 @@ class ComForm extends React.Component { render() { const info = store.record; - const {loading, extra, addr, showTmp, page, modeOptions} = this.state; - const {getFieldDecorator} = this.props.form; + const {loading, extra, addr, showTmp, page, modeOptions, helpMap} = this.state; + const {getFieldDecorator, getFieldValue} = this.props.form; const [b1, b2] = this.verifyButtonStatus(); return (
- + {getFieldDecorator('type', {initialValue: info['type'] || '1'})( this.handleExtra('2', e)}/> - + this.handleExtra('3', e)}/> - this.setState({showTmp: true})}>从模板添加}> + this.setState({showTmp: true})}>从模板添加}> this.handleExtra('4', cleanCommand(e))}/>