提交 002997b6 authored 作者: matian's avatar matian

fix:路由传参页面传递数据丢失问题修复

上级 9f673055
...@@ -72,11 +72,13 @@ export default { ...@@ -72,11 +72,13 @@ export default {
}, },
// 查看 // 查看
toPayDetail(row) { toPayDetail(row) {
row = JSON.stringify(row)
const dealList = JSON.stringify(this.dealList)
this.$router.push({ this.$router.push({
name: 'paydetail', name: 'paydetail',
params: { query: {
row: row, row: row,
dealList: this.dealList dealList: dealList
} }
}) })
} }
......
...@@ -57,10 +57,12 @@ export default { ...@@ -57,10 +57,12 @@ export default {
}, },
methods: { methods: {
toDeal(row) { toDeal(row) {
row = JSON.stringify(row)
const dealList = JSON.stringify(this.dealList)
this.$router.push({ this.$router.push({
name: 'deal', name: 'deal',
params: { query: {
dealList: this.dealList, dealList: dealList,
row: row row: row
} }
}) })
......
...@@ -120,8 +120,8 @@ export default { ...@@ -120,8 +120,8 @@ export default {
} }
}, },
mounted() { mounted() {
this.row = this.$route.params.row this.row = JSON.parse(this.$route.query.row)
this.dealList = this.$route.params.dealList this.dealList = JSON.parse(this.$route.query.dealList)
}, },
methods: { methods: {
handleChange(file, fileList) { handleChange(file, fileList) {
......
...@@ -70,8 +70,8 @@ export default { ...@@ -70,8 +70,8 @@ export default {
} }
}, },
mounted() { mounted() {
this.row = this.$route.params.row this.row = JSON.parse(this.$route.query.row)
this.dealList = this.$route.params.dealList this.dealList = JSON.parse(this.$route.query.dealList)
} }
} }
</script> </script>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论