|
@@ -95,6 +95,7 @@ export default {
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ allBool: [],
|
|
|
showChart: false,
|
|
|
// 年度项目统计
|
|
|
years: {
|
|
@@ -251,9 +252,15 @@ export default {
|
|
|
watch: {
|
|
|
params (newval) {
|
|
|
this.getChartData(newval)
|
|
|
+ },
|
|
|
+ allBool: {
|
|
|
+ handler (newval) {
|
|
|
+ console.log(newval)
|
|
|
+ this.$emit('showEmpty', newval)
|
|
|
+ },
|
|
|
+ deep: true
|
|
|
}
|
|
|
},
|
|
|
- computed: {},
|
|
|
mounted () {
|
|
|
this.getChartData(this.initParams)
|
|
|
},
|
|
@@ -318,26 +325,26 @@ export default {
|
|
|
},
|
|
|
// 画像数据
|
|
|
async getChartData (newval) {
|
|
|
- // {
|
|
|
- // buyer: decodeURIComponent(this.$route.params.entName)
|
|
|
- // }
|
|
|
+ this.allBool = []
|
|
|
const res = await getUnitChart(newval)
|
|
|
if (res.error_code === 0) {
|
|
|
if (res.data && Object.keys(res.data).length > 0) {
|
|
|
this.showChart = true
|
|
|
this.initData('', res.data)
|
|
|
} else {
|
|
|
- this.getSectionChartData('a')
|
|
|
+ this.getSectionChartData('a', newval)
|
|
|
}
|
|
|
} else {
|
|
|
this.showChart = false
|
|
|
}
|
|
|
},
|
|
|
- getSectionChartData (type) {
|
|
|
- getUnitChart({
|
|
|
+ getSectionChartData (type, newval) {
|
|
|
+ const flagAjaxParams = {
|
|
|
buyer: decodeURIComponent(this.$route.params.entName),
|
|
|
flag: type
|
|
|
- }).then((res) => {
|
|
|
+ }
|
|
|
+ Object.assign(flagAjaxParams, newval)
|
|
|
+ getUnitChart(flagAjaxParams).then((res) => {
|
|
|
if (res.error_code === 0) {
|
|
|
this.reqCount++
|
|
|
if (res.data && Object.keys(res.data).length > 0) {
|
|
@@ -345,14 +352,14 @@ export default {
|
|
|
this.initData(type, res.data)
|
|
|
if (type === 'a') {
|
|
|
this.reqCount = 0
|
|
|
- this.getSectionChartData('b')
|
|
|
+ this.getSectionChartData('b', newval)
|
|
|
} else if (type === 'b') {
|
|
|
this.reqCount = 0
|
|
|
- this.getSectionChartData('c')
|
|
|
+ this.getSectionChartData('c', newval)
|
|
|
}
|
|
|
} else {
|
|
|
if (this.reqCount < 5) {
|
|
|
- this.getSectionChartData(type)
|
|
|
+ this.getSectionChartData(type, newval)
|
|
|
} else {
|
|
|
this.showChart = false
|
|
|
}
|
|
@@ -622,6 +629,16 @@ export default {
|
|
|
info.buyerScale = res.bidamount_count ? moneyUnit(res.bidamount_count) : '--'
|
|
|
info.fail_count = res.fail_count ? res.fail_count + '条' : '--'
|
|
|
this.$emit('baseInfo', info)
|
|
|
+ if (!res.project_count && !res.winner_count && !res.otherProvincesWinnerCount && !res.bidamount_count && !res.fail_count) {
|
|
|
+ this.$emit('baseInfoBool', false)
|
|
|
+ this.allBool.push(false)
|
|
|
+ } else {
|
|
|
+ this.$emit('baseInfoBool', true)
|
|
|
+ this.allBool.push(true)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.$emit('baseInfoBool', false)
|
|
|
+ this.allBool.push(false)
|
|
|
}
|
|
|
},
|
|
|
// 格式化年度项目统计数据
|
|
@@ -643,9 +660,14 @@ export default {
|
|
|
this.years.data.columns = ['年份', '项目数量', '项目金额']
|
|
|
this.years.data.rows = rows
|
|
|
this.years.show = true
|
|
|
+ this.allBool.push(true)
|
|
|
} else {
|
|
|
+ this.allBool.push(false)
|
|
|
this.years.show = false
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.years.show = false
|
|
|
+ this.allBool.push(false)
|
|
|
}
|
|
|
},
|
|
|
// 格式化月度采购规模数据
|
|
@@ -689,9 +711,14 @@ export default {
|
|
|
this.monthScale.data.columns = columns
|
|
|
this.monthScale.data.rows = rows
|
|
|
this.monthScale.show = true
|
|
|
+ this.allBool.push(true)
|
|
|
} else {
|
|
|
this.monthScale.show = false
|
|
|
+ this.allBool.push(false)
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.monthScale.show = false
|
|
|
+ this.allBool.push(false)
|
|
|
}
|
|
|
},
|
|
|
// 格式化采购规模分布(热力图)数据
|
|
@@ -714,6 +741,12 @@ export default {
|
|
|
this.buyScaleFb.flag = true
|
|
|
this.buyScaleFb.data = data
|
|
|
this.buyScaleFb.show = true
|
|
|
+ this.allBool.push(true)
|
|
|
+ } else {
|
|
|
+ this.allBool.push(false)
|
|
|
+ this.buyScaleFb.flag = false
|
|
|
+ this.buyScaleFb.data = []
|
|
|
+ this.buyScaleFb.show = false
|
|
|
}
|
|
|
},
|
|
|
// 格式化各类招标方式占比数据(双向柱图)
|
|
@@ -753,6 +786,11 @@ export default {
|
|
|
})
|
|
|
this.bidType.data = newData
|
|
|
this.bidType.show = true
|
|
|
+ this.allBool.push(true)
|
|
|
+ } else {
|
|
|
+ this.allBool.push(false)
|
|
|
+ this.bidType.data = []
|
|
|
+ this.bidType.show = false
|
|
|
}
|
|
|
},
|
|
|
// 格式化平均节支率数据
|
|
@@ -786,9 +824,14 @@ export default {
|
|
|
this.savingsRate.data.rows = rows
|
|
|
this.savingsRate.show = true
|
|
|
this.savingsRate.flag = true
|
|
|
+ this.allBool.push(true)
|
|
|
} else {
|
|
|
this.savingsRate.show = false
|
|
|
+ this.allBool.push(false)
|
|
|
}
|
|
|
+ } else {
|
|
|
+ this.savingsRate.show = false
|
|
|
+ this.allBool.push(false)
|
|
|
}
|
|
|
},
|
|
|
// 格式化各行业项目规模占比数据
|
|
@@ -821,6 +864,12 @@ export default {
|
|
|
this.projectScale.flag = true
|
|
|
this.projectScale.data = newArr
|
|
|
this.projectScale.show = true
|
|
|
+ this.allBool.push(true)
|
|
|
+ } else {
|
|
|
+ this.allBool.push(false)
|
|
|
+ this.projectScale.flag = false
|
|
|
+ this.projectScale.data = []
|
|
|
+ this.projectScale.show = false
|
|
|
}
|
|
|
},
|
|
|
// 格式化注册资本数据
|
|
@@ -850,6 +899,14 @@ export default {
|
|
|
this.capital.data.customData = capData
|
|
|
this.capital.show = true
|
|
|
this.capital.flag = true
|
|
|
+ this.allBool.push(true)
|
|
|
+ } else {
|
|
|
+ this.allBool.push(false)
|
|
|
+ this.capital.data.columns = []
|
|
|
+ this.capital.data.rows = []
|
|
|
+ this.capital.data.customData = []
|
|
|
+ this.capital.show = false
|
|
|
+ this.capital.flag = false
|
|
|
}
|
|
|
},
|
|
|
// 格式化企业年龄分布数据
|
|
@@ -882,6 +939,13 @@ export default {
|
|
|
this.age.data.customData = customRows
|
|
|
this.age.show = true
|
|
|
this.age.flag = true
|
|
|
+ this.allBool.push(true)
|
|
|
+ } else {
|
|
|
+ this.allBool.push(false)
|
|
|
+ this.age.data.rows = []
|
|
|
+ this.age.data.customData = []
|
|
|
+ this.age.show = false
|
|
|
+ this.age.flag = false
|
|
|
}
|
|
|
},
|
|
|
// 格式化企业注册地分布数据
|
|
@@ -908,6 +972,13 @@ export default {
|
|
|
this.area.data.customData = custom
|
|
|
this.area.show = true
|
|
|
this.area.flag = true
|
|
|
+ this.allBool.push(true)
|
|
|
+ } else {
|
|
|
+ this.allBool.push(false)
|
|
|
+ this.area.data.rows = []
|
|
|
+ this.area.data.customData = []
|
|
|
+ this.area.show = false
|
|
|
+ this.area.flag = false
|
|
|
}
|
|
|
},
|
|
|
// 格式化重点合作企业数据
|
|
@@ -930,6 +1001,12 @@ export default {
|
|
|
this.client.data = newData
|
|
|
this.client.flag = true
|
|
|
this.client.show = true
|
|
|
+ this.allBool.push(true)
|
|
|
+ } else {
|
|
|
+ this.allBool.push(false)
|
|
|
+ this.client.data = []
|
|
|
+ this.client.flag = false
|
|
|
+ this.client.show = false
|
|
|
}
|
|
|
},
|
|
|
// 格式化重点合作代理机构数据
|
|
@@ -949,6 +1026,12 @@ export default {
|
|
|
this.agency.data = arr
|
|
|
this.agency.flag = true
|
|
|
this.agency.show = true
|
|
|
+ this.allBool.push(true)
|
|
|
+ } else {
|
|
|
+ this.allBool.push(false)
|
|
|
+ this.agency.data = []
|
|
|
+ this.agency.flag = false
|
|
|
+ this.agency.show = false
|
|
|
}
|
|
|
},
|
|
|
/* ******** 公共函数部分 ******* */
|