|
|
@@ -53,12 +53,19 @@ export default {
|
|
|
itemData: {}
|
|
|
}
|
|
|
},
|
|
|
- created () {
|
|
|
- if (this.$route.query.id) {
|
|
|
- // 获取数据明细
|
|
|
- this.onGetDetails(this.$route.query.id)
|
|
|
+ watch: {
|
|
|
+ '$route.query.id' (val) {
|
|
|
+ if (val) {
|
|
|
+ this.onGetDetails(val)
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
+ // created () {
|
|
|
+ // if (this.$route.query.id) {
|
|
|
+ // // 获取数据明细
|
|
|
+ // this.onGetDetails(this.$route.query.id)
|
|
|
+ // }
|
|
|
+ // },
|
|
|
methods: {
|
|
|
onClose () {
|
|
|
this.$router.push(this.$route.path)
|