Commit c1ea8d44 authored by xiongjinke's avatar xiongjinke

修改

parent a4d36f93
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<template v-if="isInfo"> <template v-if="isInfo">
<!-- 企业信息 --> <!-- 企业信息 -->
<div class="view-content"> <div class="view-content">
<Info :companyInfo="iscompanyInfo" /> <Info :companyInfo="companyInfo" />
</div> </div>
<!-- 基本信息 --> <!-- 基本信息 -->
<div class="view-content"> <div class="view-content">
...@@ -99,6 +99,13 @@ export default { ...@@ -99,6 +99,13 @@ export default {
iscompanyInfo:{} iscompanyInfo:{}
} }
}, },
watch: {
"customerIds"(newVal, oldVal) {
if(newVal){
this.customerInfos()
}
}
},
created() { created() {
this.infos = this.customerInfo this.infos = this.customerInfo
this.iscompanyInfo = this.companyInfo ? this.companyInfo : {} this.iscompanyInfo = this.companyInfo ? this.companyInfo : {}
...@@ -132,9 +139,12 @@ export default { ...@@ -132,9 +139,12 @@ export default {
}, },
customerInfos(){ customerInfos(){
this.isInfo = false
customerInfo(this.customerIds).then(res=>{ customerInfo(this.customerIds).then(res=>{
this.infos = res.data this.$nextTick(()=>{
this.handleQuery() this.infos = res.data
this.handleQuery()
})
}) })
}, },
focusNowedits(e){ focusNowedits(e){
......
...@@ -167,10 +167,10 @@ export default { ...@@ -167,10 +167,10 @@ export default {
}, },
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
next(vm => { next(vm => {
if(from.name == 'CustomList'){ if (to.query.customerId){
if (to.query.path){ let customerId = to.query.customerId
vm.currentPath.pathName = to.query.path vm.association(customerId)
} vm.currentPath.pathName = to.query.path
} }
}) })
}, },
...@@ -230,9 +230,9 @@ export default { ...@@ -230,9 +230,9 @@ export default {
customerInfo(id).then(res => { customerInfo(id).then(res => {
if (res.code == 200) { if (res.code == 200) {
if (res.data.userId == this.$store.state.user.userId) { if (res.data.userId == this.$store.state.user.userId) {
this.customerInfo = res.data
this.customerId = res.data.customerId
this.$nextTick(() => { this.$nextTick(() => {
this.customerInfo = res.data
this.customerId = res.data.customerId
this.isCustomer = true this.isCustomer = true
this.isCompanyId = true this.isCompanyId = 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