前台vue代码
export default {
name: 'Logistics',
data () {
return {
processes: [
{
id: '1',
message: '新员工入职教育培训',
status: '2'
},
{
id: '2',
message: '参画申请',
status: '2'
}
]
}
},
methods: {
update (index) {
let params = {
params: this.processes
}
this.axios
.post('/api/updateNode', params)
.then(response => {
console.log(response.data)
})
.catch(response => {
console.log(response)
})
}
}
}
后台用RequestBody接受json数据
@PostMapping("/updateNode")
public ResponseEntity<JsonResult> updateNode(@RequestBody String params){
JSONObject j1 = JSONObject.parseObject(params);
List<Node> nodes = JSONObject.parseArray(j1.getJ