|
@@ -49,9 +49,46 @@ let app = new Vue({
|
|
|
{ name: '水控集团' },
|
|
|
{ name: '太重集团' },
|
|
|
],
|
|
|
+ amountList: [
|
|
|
+ {
|
|
|
+ name: '山西焦煤',
|
|
|
+ value: '283.42'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '晋能控股',
|
|
|
+ value: '622.15'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '华阳新材',
|
|
|
+ value: '251.91'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '潞安化工',
|
|
|
+ value: '163.19'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '华新燃气',
|
|
|
+ value: '46.44'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '华远陆港',
|
|
|
+ value: '32.07'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '汾酒集团',
|
|
|
+ value: '49.99'
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ amountTotal: 0,
|
|
|
+ classOption: {
|
|
|
+ step: 0.5
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
+ this.amountList.map(item=> {
|
|
|
+ this.amountTotal += Number(item.value)
|
|
|
+ })
|
|
|
this.time = formatDate()
|
|
|
this.timer = setInterval(() => {
|
|
|
this.time = formatDate()
|
|
@@ -70,6 +107,25 @@ let app = new Vue({
|
|
|
this.initChinaChart()
|
|
|
},
|
|
|
methods: {
|
|
|
+ numFormat (value) {
|
|
|
+ if (!value) return '0'
|
|
|
+ var intPart = Number(value).toFixed(0) // 获取整数部分
|
|
|
+ var intPartFormat = intPart.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,') // 将整数部分逢三一断
|
|
|
+ var floatPart = '.00' // 预定义小数部分
|
|
|
+ var value2Array = value.toString().split('.')
|
|
|
+ // =2表示数据有小数位
|
|
|
+ if (value2Array.length === 2) {
|
|
|
+ floatPart = value2Array[1].toString() // 拿到小数部分
|
|
|
+ if (floatPart.length === 1) {
|
|
|
+ // 补0
|
|
|
+ return intPartFormat + '.' + floatPart + '0'
|
|
|
+ } else {
|
|
|
+ return intPartFormat + '.' + floatPart
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return intPartFormat
|
|
|
+ }
|
|
|
+ },
|
|
|
convertData (data) {
|
|
|
var res = []
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
@@ -331,8 +387,7 @@ let app = new Vue({
|
|
|
})
|
|
|
// <p>当前阶段:<span>可论证阶段</span></p>
|
|
|
// <p>时间节点:<span>2021.10-2022.10</span></p>
|
|
|
-
|
|
|
- myChart.setOption({
|
|
|
+ let option = {
|
|
|
tooltip: {
|
|
|
padding: 15,
|
|
|
enterable: true,
|
|
@@ -429,7 +484,7 @@ let app = new Vue({
|
|
|
type: 'map',
|
|
|
map: this.mapName,
|
|
|
geoIndex: 0,
|
|
|
- aspectScale: 0.75, //长宽比
|
|
|
+ aspectScale: 1.5, //长宽比
|
|
|
showLegendSymbol: true, // 存在legend时显示
|
|
|
label: {
|
|
|
normal: {
|
|
@@ -519,7 +574,8 @@ let app = new Vue({
|
|
|
data: moveLine.normal,
|
|
|
},
|
|
|
],
|
|
|
- })
|
|
|
+ }
|
|
|
+ myChart.setOption(option)
|
|
|
},
|
|
|
initChartL1 () {
|
|
|
let myChart = echarts.init(this.$refs['echartL1'])
|
|
@@ -558,6 +614,10 @@ let app = new Vue({
|
|
|
],
|
|
|
}
|
|
|
myChart.setOption(option)
|
|
|
+ tools.loopShowTooltip(myChart, option, {
|
|
|
+ nterval: 2000,
|
|
|
+ loopSeries: true,
|
|
|
+ })
|
|
|
},
|
|
|
initChartL2 () {
|
|
|
let myChart = echarts.init(this.$refs['echartL2'])
|
|
@@ -730,6 +790,10 @@ let app = new Vue({
|
|
|
],
|
|
|
}
|
|
|
myChart.setOption(option)
|
|
|
+ tools.loopShowTooltip(myChart, option, {
|
|
|
+ nterval: 2000,
|
|
|
+ loopSeries: true,
|
|
|
+ })
|
|
|
},
|
|
|
initChartR1 () {
|
|
|
let myChart = echarts.init(this.$refs['echartR1'])
|
|
@@ -857,6 +921,10 @@ let app = new Vue({
|
|
|
],
|
|
|
}
|
|
|
myChart.setOption(option)
|
|
|
+ tools.loopShowTooltip(myChart, option, {
|
|
|
+ nterval: 2000,
|
|
|
+ loopSeries: true,
|
|
|
+ })
|
|
|
},
|
|
|
},
|
|
|
})
|