1、vue前端
export default {
name: 'downcardlist',
data() {
return {
person_righttable: [], //已选择的人员
device_righttable: [], //已分配设备
weektimesList:[],
}
},
methods:{
downcardlist:function(downCardListVOList){
let downCardListVOList={
"baseCustomerList":this.person_righttable,
"deviceList":this.device_righttable,
"weektimesList":this.weektimesList
}
downCardList(JSON.stringify(downCardListVOList)).then(res=>{
console.log(res)
})
},
}
js:代码
export function downCardList(downCardListVOList) {
return request({
url: '/door/cardlist/downCardList',
headers: {
'Content-Type': 'application/json'
},
method: 'post',
data: downCardListVOList
})
}
2、后端接收
@PostMapping("/downCardList")
public R downCardList(@RequestBody Map<String,List<Object>> downCardListVOList){
System.out.println(downCardListVOList.size());
downCardListVOList.forEach((k,v)->{
log.info("key:{}",k);
log.info("value:{}",v);
});
return R.ok();
}
版权声明:本文为weixin_38424794原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。