1.传参数之前添加JSON.stringify
this.$router.push({
path: '/operation/transportTask/dispatchDetails',
query: {
parentRoute: '/operation/transportTask',
taskName: this.multipleSelect[0].taskName,
omPublicOrderId: JSON.stringify(this.omPublicOrderIdList),
omOrderTaskId: JSON.stringify(this.omOrderTaskIdList)
}
})
2.接收参数JSON.parse
this.omPublicIds = JSON.parse(this.$route.query.omPublicOrderId)
this.omOrderTaskIdList = JSON.parse(this.$route.query.omOrderTaskId)
3.这样刷新浏览器的时候,数组就不会自动变成字符串了。