|
|
@ -1,17 +1,60 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="BJinsannianzijin">
|
|
|
|
<div class="BJinsannianzijin">
|
|
|
|
<div class="BJinsannianzijinchart-left" id="BJinsannianzijinchart-left"></div>
|
|
|
|
<div class="echart_boxs">
|
|
|
|
|
|
|
|
<div class="echart_boxs_top">
|
|
|
|
|
|
|
|
<div class="echart_boxs_title">【服务业专项资金】</div>
|
|
|
|
|
|
|
|
<div class="echart_boxs_btn">
|
|
|
|
|
|
|
|
<span v-for="item,index in fuwuyeYear" :class="changeFuwuyeYear == index ? 'changeFuwuyeYear_span': ''" @click="changeFuwuyeYear = index">{{ item.year }}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="echart_boxs_middle">
|
|
|
|
|
|
|
|
<div class="BJinsannianzijinchart-left" id="BJinsannianzijinchart-left"></div>
|
|
|
|
|
|
|
|
<div class="BJinsannianzijinchart-right">
|
|
|
|
|
|
|
|
<div class="yushuan">
|
|
|
|
|
|
|
|
<span>资金预算</span>
|
|
|
|
|
|
|
|
<div class="number-box">60 <span class="number-unit-box">万元</span></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="yushuan">
|
|
|
|
|
|
|
|
<span>追加预算</span>
|
|
|
|
|
|
|
|
<div class="bottom_number number-box">40 <span class="number-unit-box">万元</span></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="echart_boxs_bottom">拨付资金 <span>80</span>万元 (执行率 <span>80</span>% )</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="echart_boxs echart_boxs_right">
|
|
|
|
|
|
|
|
<div class="echart_boxs_top">
|
|
|
|
|
|
|
|
<div class="echart_boxs_title">【总部专项资金】</div>
|
|
|
|
|
|
|
|
<div class="echart_boxs_btn">
|
|
|
|
|
|
|
|
<span v-for="item,index in fuwuyeYear" :class="changeFuwuyeYear == index ? 'changeFuwuyeYear_span': ''" @click="changeFuwuyeYear = index">{{ item.year }}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="echart_boxs_middle">
|
|
|
|
|
|
|
|
<div class="zongbuzhuanxing-box" id="zongbuzhuanxing-box"></div>
|
|
|
|
|
|
|
|
<div class="BJinsannianzijinchart-right">
|
|
|
|
|
|
|
|
<div class="yushuan">
|
|
|
|
|
|
|
|
<span>资金预算</span>
|
|
|
|
|
|
|
|
<div class="number-box">60 <span class="number-unit-box">万元</span></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="yushuan">
|
|
|
|
|
|
|
|
<span>追加预算</span>
|
|
|
|
|
|
|
|
<div class="bottom_number number-box">40 <span class="number-unit-box">万元</span></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="echart_boxs_bottom">拨付资金 <span>80</span>万元 (执行率 <span>80</span>% )</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import * as echarts from 'echarts'
|
|
|
|
import * as echarts from 'echarts'
|
|
|
|
import resize from './mixins/resize'
|
|
|
|
// import resize from './mixins/resize'
|
|
|
|
|
|
|
|
|
|
|
|
const animationDuration = 6000
|
|
|
|
const animationDuration = 6000
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
mixins: [resize],
|
|
|
|
// mixins: [resize],
|
|
|
|
props: {
|
|
|
|
props: {
|
|
|
|
className: {
|
|
|
|
className: {
|
|
|
|
type: String,
|
|
|
|
type: String,
|
|
|
@ -27,25 +70,46 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
|
|
|
|
let date = new Date();
|
|
|
|
|
|
|
|
const currentYear = date.getFullYear();
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
chart: null
|
|
|
|
chart: null,
|
|
|
|
|
|
|
|
chartTwo:null,
|
|
|
|
|
|
|
|
changeFuwuyeYear: 0,
|
|
|
|
|
|
|
|
fuwuyeYear:[
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
year: currentYear - 1,
|
|
|
|
|
|
|
|
},{
|
|
|
|
|
|
|
|
year: currentYear - 2,
|
|
|
|
|
|
|
|
},{
|
|
|
|
|
|
|
|
year: currentYear - 3,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
mounted() {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.initChart()
|
|
|
|
this.initChart()
|
|
|
|
|
|
|
|
window.addEventListener('resize', this.cancalDebounce);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
beforeDestroy() {
|
|
|
|
beforeDestroy() {
|
|
|
|
if (!this.chart) {
|
|
|
|
// if (!this.chart) {
|
|
|
|
return
|
|
|
|
// return
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
this.chart.dispose()
|
|
|
|
// this.chart.dispose()
|
|
|
|
this.chart = null
|
|
|
|
// this.chart = null
|
|
|
|
|
|
|
|
window.removeEventListener('resize', this.cancalDebounce);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
cancalDebounce(){
|
|
|
|
|
|
|
|
console.log("11111");
|
|
|
|
|
|
|
|
window.onresize = this.chart.resize();
|
|
|
|
|
|
|
|
window.onresize = this.chartTwo.resize();
|
|
|
|
|
|
|
|
},
|
|
|
|
initChart() {
|
|
|
|
initChart() {
|
|
|
|
this.chart = echarts.init(document.getElementById('BJinsannianzijinchart-left'))
|
|
|
|
this.chart = echarts.init(document.getElementById('BJinsannianzijinchart-left'))
|
|
|
|
|
|
|
|
this.chartTwo = echarts.init(document.getElementById('zongbuzhuanxing-box'))
|
|
|
|
var value1 = Math.random() * 100; // 生成第一个随机值
|
|
|
|
var value1 = Math.random() * 100; // 生成第一个随机值
|
|
|
|
var value2 = 300 - value1; // 第二个随机值,保证总和为100
|
|
|
|
var value2 = 300 - value1; // 第二个随机值,保证总和为100
|
|
|
|
|
|
|
|
|
|
|
@ -58,32 +122,31 @@ export default {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
type: 'gauge',
|
|
|
|
type: 'gauge',
|
|
|
|
splitNumber: 3,
|
|
|
|
splitNumber: 3,
|
|
|
|
radius: '93%',
|
|
|
|
radius: 70,
|
|
|
|
center: ["50%", "70%"],
|
|
|
|
center: ["45%", "95%"],
|
|
|
|
startAngle: 180,
|
|
|
|
startAngle: 180,
|
|
|
|
endAngle: 0,
|
|
|
|
endAngle: 0,
|
|
|
|
min: 0,
|
|
|
|
min: 0,
|
|
|
|
max: 100,
|
|
|
|
max: 100,
|
|
|
|
pointer: {
|
|
|
|
pointer: {
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
width: 7,
|
|
|
|
icon:"image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAVpJREFUWEftlr1KxEAURu9NsBLRDGJh7bqbpBJx3yCJ4KJgp4WFINjaCFZaCoIvIdrZKZhEn8AtFiFZ/AHBwkbMaiGuRXIlnUqWTMbVFZkp5975vsOpBuGb58Uqj/b7l/eiMSj6MH0XWcYqAlQ1P1wWzREGeJgtDyht9QYBRlQFpwdPAlcEQhigZeu7BLiWliJQXfOaU78G8GRXJhNQ6p8LaZ15zZ2iEEIGIsc8AqKZj2UI8EYJjLPT8K4IRGGAyDEXgWg/s4Rwj/nB0s8C2MY1AIx1LEGqMbd5zAtRyMCjbWwhwGZOeIN54UTXAZ4tvRQjXnEGbzAv3ObZ5TYQOfoBEC7whAJQrEBfaci7uM3b5wKI7EoNUZ3LCNPSOyJsI9Lr17nmBitdAegUEtkGpbMkxurwWXCeV5Y15zLwZwFajnlIRPM9MyABpAFpQBqQBqQBaaDnBv7Fj+gdzkcMMPGkRt0AAAAASUVORK5CYII=",
|
|
|
|
length: "60%",
|
|
|
|
width: 20,
|
|
|
|
borderColor: '#000',
|
|
|
|
length: "80%",
|
|
|
|
borderWidth: '10',
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
axisLine: {
|
|
|
|
axisLine: {
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
lineStyle: {
|
|
|
|
lineStyle: {
|
|
|
|
width: 35,
|
|
|
|
width: 10,
|
|
|
|
color: [
|
|
|
|
color: [
|
|
|
|
[0.5, '#7BB2FF'], // 第一个颜色
|
|
|
|
[0.6, '#00AEFF'], // 第一个颜色
|
|
|
|
[0.6, '#000'],
|
|
|
|
[0.63, '#F5F8FA'],
|
|
|
|
[1, '#4186FF'] // 第二个颜色
|
|
|
|
[1, '#FFA42B '] // 第二个颜色
|
|
|
|
],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
axisLabel: {
|
|
|
|
axisLabel: {
|
|
|
|
show: true,
|
|
|
|
show: false,
|
|
|
|
color: "#666",
|
|
|
|
color: "#666",
|
|
|
|
fontSize: 16,
|
|
|
|
fontSize: 16,
|
|
|
|
formatter: function (value) {
|
|
|
|
formatter: function (value) {
|
|
|
@ -109,7 +172,7 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: [
|
|
|
|
data: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
value: value1,
|
|
|
|
value: 61.5,
|
|
|
|
name: '决策层国际化导向'
|
|
|
|
name: '决策层国际化导向'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -121,6 +184,9 @@ export default {
|
|
|
|
this.chart.setOption(
|
|
|
|
this.chart.setOption(
|
|
|
|
option
|
|
|
|
option
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
this.chartTwo.setOption(
|
|
|
|
|
|
|
|
option
|
|
|
|
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|