mirror of https://github.com/openspug/spug
fix issue
parent
ffa4b841b5
commit
76b5ea39de
|
@ -28,6 +28,20 @@ export default observer(function Ext1Setup1() {
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const info = store.deploy;
|
const info = store.deploy;
|
||||||
|
let modePlaceholder;
|
||||||
|
switch (info['rst_notify']['mode']) {
|
||||||
|
case '0':
|
||||||
|
modePlaceholder = '已关闭'
|
||||||
|
break
|
||||||
|
case '1':
|
||||||
|
modePlaceholder = 'https://oapi.dingtalk.com/robot/send?access_token=xxx'
|
||||||
|
break
|
||||||
|
case '3':
|
||||||
|
modePlaceholder = 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx'
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
modePlaceholder = '请输入'
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<Form labelCol={{span: 6}} wrapperCol={{span: 14}}>
|
<Form labelCol={{span: 6}} wrapperCol={{span: 14}}>
|
||||||
<Form.Item required label="发布环境" style={{marginBottom: 0}}>
|
<Form.Item required label="发布环境" style={{marginBottom: 0}}>
|
||||||
|
@ -88,7 +102,7 @@ export default observer(function Ext1Setup1() {
|
||||||
disabled={store.isReadOnly || info['rst_notify']['mode'] === '0'}
|
disabled={store.isReadOnly || info['rst_notify']['mode'] === '0'}
|
||||||
value={info['rst_notify']['value']}
|
value={info['rst_notify']['value']}
|
||||||
onChange={e => info['rst_notify']['value'] = e.target.value}
|
onChange={e => info['rst_notify']['value'] = e.target.value}
|
||||||
placeholder="请输入"/>
|
placeholder={modePlaceholder}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item wrapperCol={{span: 14, offset: 6}}>
|
<Form.Item wrapperCol={{span: 14, offset: 6}}>
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -29,6 +29,20 @@ export default observer(function Ext2Setup1() {
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
const info = store.deploy;
|
const info = store.deploy;
|
||||||
|
let modePlaceholder;
|
||||||
|
switch (info['rst_notify']['mode']) {
|
||||||
|
case '0':
|
||||||
|
modePlaceholder = '已关闭'
|
||||||
|
break
|
||||||
|
case '1':
|
||||||
|
modePlaceholder = 'https://oapi.dingtalk.com/robot/send?access_token=xxx'
|
||||||
|
break
|
||||||
|
case '3':
|
||||||
|
modePlaceholder = 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx'
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
modePlaceholder = '请输入'
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<Form labelCol={{span: 6}} wrapperCol={{span: 14}}>
|
<Form labelCol={{span: 6}} wrapperCol={{span: 14}}>
|
||||||
<Form.Item required label="发布环境" style={{marginBottom: 0}}>
|
<Form.Item required label="发布环境" style={{marginBottom: 0}}>
|
||||||
|
@ -84,7 +98,7 @@ export default observer(function Ext2Setup1() {
|
||||||
disabled={store.isReadOnly || info['rst_notify']['mode'] === '0'}
|
disabled={store.isReadOnly || info['rst_notify']['mode'] === '0'}
|
||||||
value={info['rst_notify']['value']}
|
value={info['rst_notify']['value']}
|
||||||
onChange={e => info['rst_notify']['value'] = e.target.value}
|
onChange={e => info['rst_notify']['value'] = e.target.value}
|
||||||
placeholder="请输入"/>
|
placeholder={modePlaceholder}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item wrapperCol={{span: 14, offset: 6}}>
|
<Form.Item wrapperCol={{span: 14, offset: 6}}>
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -43,6 +43,21 @@ export default observer(function () {
|
||||||
Object.assign(store.record, form.getFieldsValue(), {command: cleanCommand(command)})
|
Object.assign(store.record, form.getFieldsValue(), {command: cleanCommand(command)})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let modePlaceholder;
|
||||||
|
switch (store.record.rst_notify.mode) {
|
||||||
|
case '0':
|
||||||
|
modePlaceholder = '已关闭'
|
||||||
|
break
|
||||||
|
case '1':
|
||||||
|
modePlaceholder = 'https://oapi.dingtalk.com/robot/send?access_token=xxx'
|
||||||
|
break
|
||||||
|
case '3':
|
||||||
|
modePlaceholder = 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx'
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
modePlaceholder = '请输入'
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form form={form} initialValues={store.record} labelCol={{span: 6}} wrapperCol={{span: 14}}>
|
<Form form={form} initialValues={store.record} labelCol={{span: 6}} wrapperCol={{span: 14}}>
|
||||||
<Form.Item required label="任务类型" style={{marginBottom: 0}}>
|
<Form.Item required label="任务类型" style={{marginBottom: 0}}>
|
||||||
|
@ -82,7 +97,7 @@ export default observer(function () {
|
||||||
</Select>
|
</Select>
|
||||||
)}
|
)}
|
||||||
disabled={store.record.rst_notify.mode === '0'}
|
disabled={store.record.rst_notify.mode === '0'}
|
||||||
placeholder="请输入"/>
|
placeholder={modePlaceholder}/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item name="desc" label="备注信息">
|
<Form.Item name="desc" label="备注信息">
|
||||||
<Input.TextArea placeholder="请输入模板备注信息"/>
|
<Input.TextArea placeholder="请输入模板备注信息"/>
|
||||||
|
|
Loading…
Reference in New Issue