|
@@ -247,7 +247,7 @@ var vm = new Vue({
|
|
|
},
|
|
|
// 报告详情筛选条件只有一个省份
|
|
|
// 此时不显示地区分布chart
|
|
|
- oneAreaFilter () {
|
|
|
+ notOneAreaFilter () {
|
|
|
var area = this.reportFilters.area
|
|
|
var showArea = area && (Object.keys(area).length > 1 || Object.keys(area).length === 0)
|
|
|
return showArea
|
|
@@ -866,12 +866,7 @@ var vm = new Vue({
|
|
|
})
|
|
|
this.filters.selectKeysArr = keyArr
|
|
|
}
|
|
|
- if (data.rangeTime) {
|
|
|
- this.reportFilters.selectTime = data.rangeTime
|
|
|
- var arr = data.rangeTime.split('-')
|
|
|
- this.filters.rangeTime.start = arr[0] * 1000
|
|
|
- this.filters.rangeTime.end = arr[1] * 1000
|
|
|
- }
|
|
|
+
|
|
|
// if (data.s_rangeTimeExtra) {
|
|
|
// this.reportFilters.selectTimeExtra = data.s_rangeTimeExtra
|
|
|
// this.filters.rangeTime.exact = this.reportFilters.selectTimeExtra
|
|
@@ -879,6 +874,18 @@ var vm = new Vue({
|
|
|
// this.filters.rangeTime.exact = 'exact'
|
|
|
// }
|
|
|
this.filters.rangeTime.exact = 'exact'
|
|
|
+ if (data.rangeTime) {
|
|
|
+ this.reportFilters.selectTime = data.rangeTime
|
|
|
+ var arr = data.rangeTime.split('-')
|
|
|
+ this.filters.rangeTime.start = arr[0] * 1000
|
|
|
+ this.filters.rangeTime.end = arr[1] * 1000
|
|
|
+ if (this.filters.rangeTime.exact === 'exact') {
|
|
|
+ var date = new Date(this.filters.rangeTime.end)
|
|
|
+ var timeString = date.pattern('yyyy/MM/dd')
|
|
|
+ this.filters.rangeTime.end = new Date(timeString).getTime()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
this.$refs.dateSelector.setState(this.filters.rangeTime)
|
|
|
if (data.area && data.area !== '{}') {
|
|
|
this.reportFilters.area = JSON.parse(data.area)
|
|
@@ -941,14 +948,14 @@ var vm = new Vue({
|
|
|
list[0].ringRatio = profile.project_count_ratio ? (profile.project_count_ratio * 100).toFixed(2) : 0
|
|
|
// 项目总金额
|
|
|
const projectTotalMoney = this.moneyUnit(profile.projctamout ? profile.projctamout : 0)
|
|
|
- list[1].count = projectTotalMoney.count
|
|
|
- list[1].unit = projectTotalMoney.unit
|
|
|
+ list[1].count = projectTotalMoney.count || 0
|
|
|
+ list[1].unit = projectTotalMoney.unit || '万元'
|
|
|
|
|
|
list[1].ringRatio = profile.projctamount_ratio ? (profile.projctamount_ratio * 100).toFixed(2) : 0
|
|
|
// 项目平均金额
|
|
|
const projectAvgMoney = this.moneyUnit(profile.projectavgmoney ? profile.projectavgmoney : 0)
|
|
|
- list[2].count = projectAvgMoney.count
|
|
|
- list[2].unit = projectAvgMoney.unit
|
|
|
+ list[2].count = projectAvgMoney.count || 0
|
|
|
+ list[2].unit = projectAvgMoney.unit || '万元'
|
|
|
list[2].ringRatio = profile.projectavgmoney_ratio ? (profile.projectavgmoney_ratio * 100).toFixed(2) : 0
|
|
|
// 中标单位数
|
|
|
list[3].count = profile.winnercount ? profile.winnercount : 0
|
|
@@ -956,7 +963,7 @@ var vm = new Vue({
|
|
|
// 采购单位数
|
|
|
list[4].count = profile.buyercount ? profile.buyercount : 0
|
|
|
list[4].ringRatio = profile.winnercount_ratio ? (profile.winnercount_ratio * 100).toFixed(2) : 0
|
|
|
-
|
|
|
+
|
|
|
var totalCount = list.reduce((total, item) => item.count + total, 0)
|
|
|
|
|
|
if (totalCount) {
|
|
@@ -1030,14 +1037,11 @@ var vm = new Vue({
|
|
|
|
|
|
// 项目规模
|
|
|
const mDAmount = {
|
|
|
- columns: ['日期', '项目金额', '项目金额环比'],
|
|
|
+ columns: ['日期', '项目金额(万元)', '项目金额环比'],
|
|
|
rows: []
|
|
|
}
|
|
|
let mDAmuntTotal = 0
|
|
|
if (Array.isArray(data.project_amount)) {
|
|
|
- // 求金额平均值,计算单位
|
|
|
- const avg = data.project_amount.reduce((prev, current) => current.value + prev, 0) / data.project_amount.length
|
|
|
- mDAmount.columns[1] += `(${this.moneyUnit(avg).unit})` // 得到单位
|
|
|
const field = {
|
|
|
[mDAmount.columns[0]]: 'minth',
|
|
|
[mDAmount.columns[1]]: 'value',
|
|
@@ -1049,9 +1053,7 @@ var vm = new Vue({
|
|
|
const value = item[field[column]]
|
|
|
if (value) {
|
|
|
if (field[column] === 'value') {
|
|
|
- // 把所有值的单位都转换为坐标上显示的单位
|
|
|
- const mUint = this.moneyUnit(value).unit
|
|
|
- row[column] = this.moneyUnit(value, 'transfer', mUint).count
|
|
|
+ row[column] = utils.formatMoney(value / 10000, undefined, true) - 0
|
|
|
} else if (field[column] === 'ratio') {
|
|
|
row[column] = utils.formatMoney(value * 100, undefined, true)
|
|
|
} else {
|