巴林闲侠 2 years ago
parent
commit
5368f3ef91
  1. 14
      web/client/src/sections/service/components/pushModal.jsx

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

@ -35,6 +35,7 @@ function pushModal (props) {
const [deviceProportion, setDeviceProportion] = useState(undefined); // const [deviceProportion, setDeviceProportion] = useState(undefined); //
const [subType, setSubType] = useState([]); // const [subType, setSubType] = useState([]); //
const [factorShow, setFactorShow] = useState([]); // const [factorShow, setFactorShow] = useState([]); //
const [firstPass, setFirstPass] = useState(true)
// //
@ -89,10 +90,7 @@ function pushModal (props) {
} }
}) })
setProjectStructure(data) setProjectStructure(data)
if (editObj.id && firstPass) {
if (!editObj.id) {
form.current.setValue('strucId', ProjectId)
} else {
let FactorId = [] let FactorId = []
if (alter?.pomsStrucFactorId) { if (alter?.pomsStrucFactorId) {
for (let key in alter?.pomsStrucFactorId) { for (let key in alter?.pomsStrucFactorId) {
@ -102,6 +100,9 @@ function pushModal (props) {
} else { } else {
setFactorShow(ProjectId) setFactorShow(ProjectId)
} }
setFirstPass(false)
} else {
form.current.setValue('strucId', ProjectId)
} }
form.current.validate(['strucId', 'timeType']) form.current.validate(['strucId', 'timeType'])
setStructure(false) setStructure(false)
@ -202,7 +203,7 @@ function pushModal (props) {
<Form <Form
labelPosition="left" labelPosition="left"
labelAlign="right" labelAlign="right"
labelWidth="130px" labelWidth="128px"
onValueChange={(values, field) => { onValueChange={(values, field) => {
for (var key in field) { for (var key in field) {
if (key == 'tactics') { if (key == 'tactics') {
@ -370,7 +371,7 @@ function pushModal (props) {
分钟则通过信鸽服务发送一条通知信息 分钟则通过信鸽服务发送一条通知信息
</span> </span>
} }
style={{ width: 198 }}> style={{ width: 173 }}>
持续时长推送机制 持续时长推送机制
</Form.Radio> </Form.Radio>
<Form.Radio <Form.Radio
@ -400,7 +401,6 @@ function pushModal (props) {
异常率推送机制 异常率推送机制
</Form.Radio> </Form.Radio>
</div> </div>
</Form.RadioGroup> </Form.RadioGroup>
</div> </div>
<div> <div>

Loading…
Cancel
Save