//createUser 确定的,params位置的对象
const params={
moduleId :2
}
const onSubmit=function({ createUser = 1, ...params }) {
const postFunc = params.moduleId ? updateMonitoringTemplate : addMonitoringTemplate
postFunc({createUser, ...params}).then(()=>{
//...
}
)
}