//
componentDidMount = () => {
//
if (this.props.beloneProjectList.length == "0") {
if (!this.props.loading) {
this.props.dispatch({ type: "eventDetectionData/updateLoading", payload: { loading: true } });
Service.getFaciProjectList().then((data) => {
console.log("getFaciProjectList",data);
if (data.success) {
const list = data.faciProjectList || [];
this.props.dispatch({ type: "eventDetectionData/updateProjectList", payload: { beloneProjectList: list } });
}
this.props.dispatch({ type: "eventDetectionData/updateLoading", payload: { loading: false } });
});
}
}
//
if (this.props.monitorPointList.length == "0") {
if (!this.props.loading) {
this.props.dispatch({ type: "eventDetectionData/updateLoading", payload: { loading: true } });
Service.findAllEquipPoint().then((data) => {
console.log("findAllEquipPoint",data);
if (data.success) {
const list = data.monitorPointList || [];
this.props.dispatch({ type: "eventDetectionData/updateMonitorPointList", payload: { monitorPointList: list } });
}
this.props.dispatch({ type: "eventDetectionData/updateLoading", payload: { loading: false } });
});
}
}
//onAutoSubmitonSubmit
this.onAutoSubmit();
}
onAutoSubmit () {
const queryobj = { }
this.props.onSubmit(queryobj);
}
//
onSubmit (e) {
e.preventDefault()
const queryobj = this.props.form.getFieldsValue()
console.log("AAAAA",queryobj)
let query = {}
query = { ...queryobj }
this.props.onSubmit(query)
}
//
handleReset = () => {
this.props.form.resetFields();
console.log("",this.props.form.getFieldsValue());
}
this is my part of the code, the query results are self-executing, when you click reset, the query results will be checked again, but what I want to achieve is to click the reset button without refreshing the queried data. Only reset query conditions;