Commit 750df460 authored by shaoan123's avatar shaoan123

修改策略下发的bug

parent 70ecf5f9
Pipeline #27708 skipped with stages
......@@ -25,7 +25,7 @@ const AddModal = props => {
const [predictCode, setPredictCode] = useState([]); //预测编码列表
const [deviceList, setDeviceList] = useState([]); //设备列表
const [card, setCard] = useState([]); //卡片列表值
const [dateArr, setDateArr] = useState({ DeviationType: '', DeviationValue: '', DurationType: '', DurationValue: '' }); //偏移量,时段时长
const [dateArr, setDateArr] = useState({ DeviationType: '秒', DeviationValue: 0, DurationType: '秒', DurationValue: 0}); //偏移量,时段时长
const [source, setSource] = useState([])
const [showTime, setShowTime] = useState(true)
const [PredictID, setPredictID] = useState()
......@@ -107,7 +107,7 @@ const AddModal = props => {
setCard([])
setDeviceList([])
setShowTime(true)
setDateArr({ DeviationType: '秒', DeviationValue: '', DurationType: '秒', DurationValue: '' })
setDateArr({ DeviationType: '秒', DeviationValue: 0, DurationType: '秒', DurationValue: 0})
}
else {
let { DeviationType, DeviationValue, DurationType, DurationValue } = formObj
......@@ -285,7 +285,7 @@ const AddModal = props => {
value === '时段控制' ? setShowTime(true) : setShowTime(false)
const newArr = { ...dateArr }
newArr.DurationValue = 0
newArr.DurationType = ''
newArr.DurationType = ''
setDateArr(newArr)
}
return (
......
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