Commit c73d67d1 authored by wenmo's avatar wenmo

[Fix-211][web]Fix to form linkage

parent d9d02af5
......@@ -43,7 +43,7 @@ const DingTalkForm: React.FC<AlertInstanceFormProps> = (props) => {
handleSubmit(buildJSONData(formVals,fieldsValue));
};
const renderContent = (formVals) => {
const renderContent = () => {
return (
<>
<Divider>钉钉配置</Divider>
......
......@@ -34,6 +34,7 @@ const WeChatForm: React.FC<AlertInstanceFormProps> = (props) => {
} = props;
const onValuesChange = (change: any,all: any)=>{
console.log(change);
setFormVals({...formVals,...change});
};
......@@ -43,7 +44,7 @@ const WeChatForm: React.FC<AlertInstanceFormProps> = (props) => {
handleSubmit(buildJSONData(formVals,fieldsValue));
};
const renderContent = (formVals) => {
const renderContent = () => {
return (
<>
<Divider>微信企业号配置</Divider>
......@@ -65,7 +66,7 @@ const WeChatForm: React.FC<AlertInstanceFormProps> = (props) => {
<Radio value='群聊'>群聊</Radio>
</Radio.Group>
</Form.Item>
{ (formVals.sendType === "群聊") &&
{ (formVals.sendType == "群聊") &&
<>
<Form.Item
name="webhook"
......@@ -87,7 +88,7 @@ const WeChatForm: React.FC<AlertInstanceFormProps> = (props) => {
<Switch checkedChildren="启用" unCheckedChildren="禁用"
defaultChecked={formVals.isAtAll}/>
</Form.Item>
{ ( formVals.sendType === "群聊" && formVals.isAtAll===false )&&
{ ( !formVals.isAtAll )&&
<Form.Item
name="users"
label="被@用户"
......@@ -98,7 +99,7 @@ const WeChatForm: React.FC<AlertInstanceFormProps> = (props) => {
}
</>
}
{ formVals.sendType === "应用" &&
{ (!formVals.sendType||formVals.sendType == "应用") &&
<>
<Form.Item
name="corpId"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment