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,10 +139,13 @@ export default { ...@@ -132,10 +139,13 @@ export default {
}, },
customerInfos(){ customerInfos(){
this.isInfo = false
customerInfo(this.customerIds).then(res=>{ customerInfo(this.customerIds).then(res=>{
this.$nextTick(()=>{
this.infos = res.data this.infos = res.data
this.handleQuery() this.handleQuery()
}) })
})
}, },
focusNowedits(e){ focusNowedits(e){
this.nowedit = e this.nowedit = e
......
...@@ -167,11 +167,11 @@ export default { ...@@ -167,11 +167,11 @@ 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.association(customerId)
vm.currentPath.pathName = to.query.path vm.currentPath.pathName = to.query.path
} }
}
}) })
}, },
created() { created() {
...@@ -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.$nextTick(() => {
this.customerInfo = res.data this.customerInfo = res.data
this.customerId = res.data.customerId this.customerId = res.data.customerId
this.$nextTick(() => {
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