场站增加钉钉推送
This commit is contained in:
@@ -36,6 +36,7 @@ export default function StationManage() {
|
||||
|
||||
// 监听钉钉推送开关状态,用于联动显示隐藏、动态校验
|
||||
const dingTalkPushWatch = Form.useWatch('dingTalkPush', form);
|
||||
const dingTalkOrderPushWatch = Form.useWatch(['dingTalkOrderPush'], form);
|
||||
|
||||
// 分区弹窗
|
||||
const [areaVisible, setAreaVisible] = useState(false);
|
||||
@@ -133,6 +134,7 @@ export default function StationManage() {
|
||||
form.setFieldsValue({
|
||||
status: 1,
|
||||
dingTalkPush: 0,
|
||||
dingTalkOrderPush: 0,
|
||||
emailPush: 0,
|
||||
alertPush: 0
|
||||
});
|
||||
@@ -145,6 +147,7 @@ export default function StationManage() {
|
||||
form.setFieldsValue({
|
||||
...record,
|
||||
status: record.status === 1,
|
||||
dingTalkOrderPush: record.dingTalkOrderPush === 1,
|
||||
dingTalkPush: record.dingTalkPush === 1,
|
||||
emailPush: record.emailPush === 1,
|
||||
alertPush: record.alertPush === 1,
|
||||
@@ -157,6 +160,7 @@ export default function StationManage() {
|
||||
const params = {
|
||||
...values,
|
||||
status: values.status ? 1 : 0,
|
||||
dingTalkOrderPush: values.dingTalkOrderPush ? 1 : 0,
|
||||
dingTalkPush: values.dingTalkPush ? 1 : 0,
|
||||
emailPush: values.emailPush ? 1 : 0,
|
||||
alertPush: values.alertPush ? 1 : 0,
|
||||
@@ -357,17 +361,22 @@ export default function StationManage() {
|
||||
<Divider orientation="left">消息推送配置</Divider>
|
||||
|
||||
<Row gutter={16}>
|
||||
<Col span={8}>
|
||||
<Form.Item name="dingTalkPush" label="钉钉推送" valuePropName="checked">
|
||||
<Col span={6}>
|
||||
<Form.Item name="dingTalkPush" label="钉钉告警推送" valuePropName="checked">
|
||||
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Col span={6}>
|
||||
<Form.Item name="dingTalkOrderPush" label="钉钉工单推送" valuePropName="checked">
|
||||
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<Form.Item name="emailPush" label="邮件推送" valuePropName="checked">
|
||||
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Col span={6}>
|
||||
<Form.Item name="alertPush" label="告警弹窗推送" valuePropName="checked">
|
||||
<Switch checkedChildren="开启" unCheckedChildren="关闭" />
|
||||
</Form.Item>
|
||||
@@ -375,7 +384,7 @@ export default function StationManage() {
|
||||
</Row>
|
||||
|
||||
{/* 钉钉开关开启才显示Token、密钥 */}
|
||||
{dingTalkPushWatch ? (
|
||||
{dingTalkPushWatch || dingTalkOrderPushWatch ? (
|
||||
<Row gutter={16}>
|
||||
<Col span={12}>
|
||||
<Form.Item
|
||||
|
||||
Reference in New Issue
Block a user