Browse Source

问题修改

dev
deartibers 2 years ago
parent
commit
aeacbe624a
  1. 42
      web/client/src/sections/service/components/pushModal.jsx
  2. 22
      web/client/src/sections/service/containers/emPush.jsx

42
web/client/src/sections/service/components/pushModal.jsx

@ -123,6 +123,11 @@ function pushModal (props) {
delete obj.interval2
delete obj.interval3
delete obj.deviceProportion
dispatch(service.postPush({ pushId: editObj.id, ...obj, msg: '编辑推送配置' })).then((res) => {//(PEP)
if (res.success) {
close();
}
})
} else {
Notification.error({
content: '即时推送时间不能大于1440分钟',
@ -153,6 +158,11 @@ function pushModal (props) {
delete obj.interval2
delete obj.interval3
delete obj.deviceProportion
dispatch(service.postPush({ pushId: editObj.id, ...obj, msg: '编辑推送配置' })).then((res) => {//(PEP)
if (res.success) {
close();
}
})
} else {
Notification.error({
content: '持续时长推送时间不能大于1440分钟',
@ -183,6 +193,11 @@ function pushModal (props) {
delete obj.interval2
delete obj.interval3
delete obj.deviceProportion
dispatch(service.postPush({ pushId: editObj.id, ...obj, msg: '编辑推送配置' })).then((res) => {//(PEP)
if (res.success) {
close();
}
})
} else if (obj.interval3 <= 720 && obj.deviceProportion > 100) {
Notification.error({
content: '异常率推送异常率不能超过100%',
@ -224,11 +239,6 @@ function pushModal (props) {
})
}
}
dispatch(service.postPush({ pushId: editObj.id, ...obj, msg: '编辑推送配置' })).then((res) => {//(PEP)
if (res.success) {
close();
}
})
}
else {
let obj = JSON.parse(JSON.stringify(values))
@ -247,6 +257,11 @@ function pushModal (props) {
delete obj.interval2
delete obj.interval3
delete obj.deviceProportion
dispatch(service.postPush({ ...obj, msg: '新增推送配置' })).then((res) => {//(PEP)
if (res.success) {
close();
}
})
} else {
Notification.error({
content: '即时推送时间不能大于1440分钟',
@ -277,6 +292,11 @@ function pushModal (props) {
delete obj.interval2
delete obj.interval3
delete obj.deviceProportion
dispatch(service.postPush({ ...obj, msg: '新增推送配置' })).then((res) => {//(PEP)
if (res.success) {
close();
}
})
} else {
Notification.error({
content: '持续时长推送时间不能大于1440分钟',
@ -307,6 +327,11 @@ function pushModal (props) {
delete obj.interval2
delete obj.interval3
delete obj.deviceProportion
dispatch(service.postPush({ ...obj, msg: '新增推送配置' })).then((res) => {//(PEP)
if (res.success) {
close();
}
})
} else if (obj.interval3 <= 720 && obj.deviceProportion > 100) {
Notification.error({
content: '异常率推送异常率不能超过100%',
@ -348,11 +373,6 @@ function pushModal (props) {
})
}
}
dispatch(service.postPush({ ...obj, msg: '新增推送配置' })).then((res) => {//(PEP)
if (res.success) {
close();
}
})
}
})
}
@ -414,6 +434,8 @@ function pushModal (props) {
<Form.Input
field="name"
label='策略名称:'
maxLength={15}
disabled={pushEdit}
style={{ width: 695 }}
initValue={editObj?.name || ""}
placeholder="请输入策略名称"

22
web/client/src/sections/service/containers/emPush.jsx

@ -182,14 +182,17 @@ const EmPush = (props) => {
]
function expandRowRender (record, index) {
return (
<div style={{ display: 'flex' }}>
<div style={{}}>
结构物
{
record.structure?.map((item, index) => {
return (
<div key={index} style={{ marginRight: 5, padding: '1px 17px', color: '#0F7EFB', background: 'rgba(221,237,255,0.38)' }}>
<span key={index} style={{
marginRight: 5, padding: '1px 17px', color: '#0F7EFB',
display: 'inline-block', marginBottom: 5
}}>
{item.name}
</div>
</span>
)
})
}
@ -558,20 +561,17 @@ const EmPush = (props) => {
placeholder="请输入或选择关键词"
/>
<Form.Select
label='推送类型:'
label='推送机制:'
labelPosition="left"
field='alarmType'
field='tactics'
style={{ width: 116, marginRight: 10, color: "#F9F9F9", }}
placeholder="全部"
filter
showClear
>
<Form.Select.Option value="data_outages">数据中断</Form.Select.Option>
<Form.Select.Option value="data_exception">数据异常</Form.Select.Option>
<Form.Select.Option value="strategy_hit">策略命中</Form.Select.Option>
<Form.Select.Option value="video_exception">视频异常</Form.Select.Option>
<Form.Select.Option value="app_exception">应用异常</Form.Select.Option>
<Form.Select.Option value="device_exception">设备异常</Form.Select.Option>
<Form.Select.Option value="immediately">即时推送机制</Form.Select.Option>
<Form.Select.Option value="continue">持续时长推送机制</Form.Select.Option>
<Form.Select.Option value="abnormal_rate">异常率推送机制</Form.Select.Option>
</Form.Select>
<Form.Select
label='启用状态:'

Loading…
Cancel
Save