作者 朱兆平

优化页面传参,切换页面参数丢失后,对象为空的校验

... ... @@ -889,6 +889,7 @@
import loginUserInfo from '@/api/base.js'
import {mapActions, mapGetters} from 'vuex'
import {loginedUserInfo} from "../../api/user";
import jsutil from "@/common/js/util";
export default {
name:'Origmaster',
data() {
... ... @@ -1397,11 +1398,19 @@
},
/*获取默认值*/
getDefaultData(){
if(
jsutil.checkNull(this.$route.query)
&& jsutil.checkNull(this.$route.query.flightno)
&& jsutil.checkNull(this.$route.query.flightdate)
&& jsutil.checkNull(this.$route.query.originstation)
&& jsutil.checkNull(this.$route.query.destinationstation)
) {
this.defaultQuery.flightno = JSON.parse(this.$route.query.flightno);
this.defaultQuery.flightdate = JSON.parse(this.$route.query.flightdate);
this.defaultQuery.originstation = JSON.parse(this.$route.query.originstation);
this.defaultQuery.destinationstation = JSON.parse(this.$route.query.destinationstation);
this.defaultQuery.awba=JSON.parse(this.$route.query.awba);
this.defaultQuery.awba = JSON.parse(this.$route.query.awba);
}
},
/*获取默认数据列表*/
... ...