Commit 218f1389 authored by xiongjinke's avatar xiongjinke

修改

parent fff0095f
...@@ -167,15 +167,37 @@ export default { ...@@ -167,15 +167,37 @@ export default {
}, },
watch: { watch: {
'$route'(to, from) { '$route'(to, from) {
// 检测查询参数的变化 if(to.name == 'PartyA' && to.query.customerId){
if (to.query.customerId) { if (to.query.customerId && to.query.path == 'business' || to.query.path == 'gjjl') {
if (this.companyId == 0) { if (this.companyId == 0) {
let customerId = to.query.customerId customerInfo(to.query.customerId).then(res => {
this.association(customerId) if (res.code == 200) {
if (res.data.userId == this.$store.state.user.userId) {
this.$nextTick(() => {
this.customerInfo = res.data
this.customerId = res.data.customerId
this.isCustomer = true
this.isCompany = false
this.currentPath.pathName = this.$route.query.path || 'business'
this.companyInfo = {
companyName: this.customerInfo.companyName
}
document.getElementById('tagTitle').innerText = this.customerInfo.companyName
})
}
}
})
}
if (to.query.customerId == this.customerId && to.query.path) {
this.currentPath.pathName = to.query.path
} }
} }
if (to.query.path) { }else{
this.currentPath.pathName = to.query.path if(from.name == 'PartyA' && !from.query.customerId){
this.$nextTick(() => {
this.isCompany = true
})
}
} }
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment