|
@@ -67,11 +67,10 @@ export default {
|
|
|
watch: {
|
|
|
chartCustomData: {
|
|
|
handler (newval) {
|
|
|
- let data
|
|
|
const chartKeyArr = Object.keys(newval)
|
|
|
chartKeyArr.forEach(item => {
|
|
|
if (item === 'customer_scale') {
|
|
|
- data = newval.customer_scale.map(item => {
|
|
|
+ const data = newval.customer_scale.map(item => {
|
|
|
return {
|
|
|
...item,
|
|
|
name: item.buyclass,
|
|
@@ -79,11 +78,13 @@ export default {
|
|
|
amount: formatPrice(item.amount / 10000)
|
|
|
}
|
|
|
})
|
|
|
- if (typeof vComponentChart === 'function') {
|
|
|
- vComponentChart('#chartTreeMap', data, {}, 've-treemap')
|
|
|
- }
|
|
|
+ setTimeout(() => {
|
|
|
+ if (typeof vComponentChart === 'function') {
|
|
|
+ vComponentChart('#chartTreeMap', data, {}, 've-treemap')
|
|
|
+ }
|
|
|
+ }, 1000)
|
|
|
} else if (item === 'winner_time_distribution') {
|
|
|
- data = {
|
|
|
+ const data = {
|
|
|
columns: ['采购规模分布', '采购总金额占比', '采购单位总数占比'],
|
|
|
rows: []
|
|
|
}
|
|
@@ -110,12 +111,14 @@ export default {
|
|
|
}
|
|
|
if (total) {
|
|
|
data.rows.reverse()
|
|
|
- if (typeof vComponentChart === 'function') {
|
|
|
- vComponentChart('#chartLineChartBuyer', data, {}, 've-line')
|
|
|
- }
|
|
|
+ setTimeout(() => {
|
|
|
+ if (typeof vComponentChart === 'function') {
|
|
|
+ vComponentChart('#chartLineChartBuyer', data, {}, 've-line')
|
|
|
+ }
|
|
|
+ }, 1000)
|
|
|
}
|
|
|
} else if (item === 'buyer_time_distribution') {
|
|
|
- data = {
|
|
|
+ const data = {
|
|
|
columns: ['中标规模分布', '中标总金额占比', '中标单位总数占比'],
|
|
|
rows: []
|
|
|
}
|
|
@@ -142,9 +145,11 @@ export default {
|
|
|
}
|
|
|
if (total) {
|
|
|
data.rows.reverse()
|
|
|
- if (typeof vComponentChart === 'function') {
|
|
|
- vComponentChart('#chartLineChart', data, {}, 've-line')
|
|
|
- }
|
|
|
+ setTimeout(() => {
|
|
|
+ if (typeof vComponentChart === 'function') {
|
|
|
+ vComponentChart('#chartLineChart', data, {}, 've-line')
|
|
|
+ }
|
|
|
+ }, 1000)
|
|
|
}
|
|
|
}
|
|
|
})
|