Commit 8c41a350 authored by caixingbing's avatar caixingbing

*

parent 580745ce
...@@ -201,7 +201,7 @@ export default { ...@@ -201,7 +201,7 @@ export default {
async handleQuery() { async handleQuery() {
let res = await infoHeader({companyId:this.companyId}) let res = await infoHeader({companyId:this.companyId})
if(res.code==200){ if(res.code==200){
this.companyInfo = res.data this.companyInfo = res.data || {}
if(this.companyInfo.companyName){ if(this.companyInfo.companyName){
this.$nextTick(()=>{ this.$nextTick(()=>{
document.getElementById('tagTitle').innerText = this.companyInfo.companyName document.getElementById('tagTitle').innerText = this.companyInfo.companyName
......
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
</div> </div>
<div class="zbph-account">招标动态 <div class="zbph-account">招标动态
<div class="labels"> <div class="labels">
<div :class="{'on':datatype==3}" @click="getDT(3)">近</div> <div :class="{'on':datatype==3}" @click="getDT(3)">近7</div>
<div :class="{'on':datatype==2}" @click="getDT(2)">近三十</div> <div :class="{'on':datatype==2}" @click="getDT(2)">近30</div>
<div :class="{'on':datatype==1}" @click="getDT(1)">近</div> <div :class="{'on':datatype==1}" @click="getDT(1)">近5</div>
</div> </div>
</div> </div>
<div id="myEcharts" style="width: 100%;height:250px; margin: 0 auto;"></div> <div id="myEcharts" style="width: 100%;height:250px; margin: 0 auto;"></div>
...@@ -117,7 +117,7 @@ export default { ...@@ -117,7 +117,7 @@ export default {
methods: { methods: {
async handleBid(){ async handleBid(){
let res = await bidDataGroup({cid: this.companyId, spanId: this.datatype}) let res = await bidDataGroup({cid: this.companyId, spanId: this.datatype})
if(res.code==200){ if(res.code==200 && res.data){
let {totalCount, lastYearCount, bidAmount} = res.data let {totalCount, lastYearCount, bidAmount} = res.data
this.dataAll = {totalCount, lastYearCount, bidAmount} this.dataAll = {totalCount, lastYearCount, bidAmount}
this.dtdata=res.data.groupCount.map(item=>{ this.dtdata=res.data.groupCount.map(item=>{
......
...@@ -78,7 +78,7 @@ export default { ...@@ -78,7 +78,7 @@ export default {
methods: { methods: {
async handleQuery(){ async handleQuery(){
let res = await projectTenderDataGroup({cid: this.companyId, type: this.activeIndex}) let res = await projectTenderDataGroup({cid: this.companyId, type: this.activeIndex})
if(res.code==200 && res.data.length>0){ if(res.code==200 && res.data){
let data = res.data, totalVal = data.map(item => item.value).reduce((prev, cur) => prev + cur) let data = res.data, totalVal = data.map(item => item.value).reduce((prev, cur) => prev + cur)
this.viewData = data.map(item => { this.viewData = data.map(item => {
let it = {name:item.name, value:item.value, percent:parseFloat(Number(Number(item.value)/Number(totalVal)*100).toFixed(2))+'%'} let it = {name:item.name, value:item.value, percent:parseFloat(Number(Number(item.value)/Number(totalVal)*100).toFixed(2))+'%'}
...@@ -164,9 +164,11 @@ export default { ...@@ -164,9 +164,11 @@ export default {
}, },
watch: { watch: {
statistic(newVal, oldVal) { statistic(newVal, oldVal) {
if(newVal){
this.handleStatistic() this.handleStatistic()
} }
} }
}
} }
</script> </script>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</div> </div>
<div class="company-title"> <div class="company-title">
<div class="company-name"> <div class="company-name">
{{companyInfo.companyName || ''}} {{companyInfo.companyName || '--'}}
</div> </div>
<div class="company-tag"> <div class="company-tag">
<div style="float: left;margin-top: 8px;" class="company-history" v-if="companyInfo.historyNames && companyInfo.historyNames.length>0"> <div style="float: left;margin-top: 8px;" class="company-history" v-if="companyInfo.historyNames && companyInfo.historyNames.length>0">
...@@ -306,9 +306,11 @@ export default { ...@@ -306,9 +306,11 @@ export default {
this.getClaimStatus() //获取企业认领状态 this.getClaimStatus() //获取企业认领状态
}, },
statistic(newVal, oldVal) { statistic(newVal, oldVal) {
if(newVal){
this.handleStatistic() this.handleStatistic()
} }
} }
}
} }
</script> </script>
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
async handleQuery() { async handleQuery() {
let res = await bondCreditRating({cid: this.companyId}) let res = await bondCreditRating({cid: this.companyId})
if(res.code==200){ if(res.code==200){
this.operList = res.data this.operList = res.data || []
this.$nextTick(() => { this.$nextTick(() => {
this.companySwiper() this.companySwiper()
}) })
......
...@@ -195,9 +195,11 @@ export default { ...@@ -195,9 +195,11 @@ export default {
}, },
watch: { watch: {
statistic(newVal, oldVal) { statistic(newVal, oldVal) {
if(newVal){
this.handView() this.handView()
} }
} }
}
} }
</script> </script>
......
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