嘉禾二期设备管理
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

226 lines
5.2 KiB

2 years ago
<template>
<div class="box">
<tit :title="'月单位产值碳排放强度'">
<div class="tit-r">单位kg/万元</div>
</tit>
<div id="mainIntensity"></div>
</div>
</template>
<script>
import tit from "./tit.vue";
export default {
data() {
return {
};
},
components: {
tit
},
created() {
this.$nextTick(() => {
this.echartsInit()
})
},
mounted() {
},
methods: {
echartsInit() {
const chartDom = document.getElementById('mainIntensity');
const myChart = this.$echarts.init(chartDom);
const option = {
// title: {
// show: true,
// text: "温度(单位:℃)",
// textStyle: {
// fontWeight: 400,
// fontSize: 14,
// color: "#009fff",
// },
// top: 10,
// },
grid: {
top: "10%",
left: "0",
right: "10",
bottom: "0",
containLabel: true,
},
// tooltip: {
// trigger: "axis",
// formatter: (e) => {
// return (
// e[0].axisValueLabel +
// "<br />" +
// '<div style="border: 1px solid #12244A;margin:5px 0"></div>' +
// '<span style="color:#fff">' +
// "温度变化趋势" +
// ":" +
// "</span>" +
// e[0].value +
// " ℃" +
// "<br />"
// );
// },
// extraCssText:
// "font-size: 16px;border-radius: 2px;height:60px;border: 1px solid #0477DF;background: rgba(0, 0, 0, 0.8);text-align:left;color:#00E5FC",
// },
xAxis: [
{
type: "category",
boundaryGap: false,
data: [
// "0",
"1月",
"2月",
"3月",
"4月",
"5月",
"6月",
// "7月",
// "8月",
// "9月",
// "10月",
// "11月",
// "12月",
],
axisLabel: {
//y轴文字的配置
textStyle: {
color: "#9fa9b5",
margin: 14,
},
},
axisTick: {
show: true,
inside: true,
lineStyle: {
color: "#9fabc1",
},
},
axisLine: {
lineStyle: {
color: "#9fabc1",
},
},
},
],
yAxis: [
{
type: "value",
show: true, //是否显示y轴
axisLabel: {
//y轴文字的配置
textStyle: {
color: "#9fa9b5",
},
},
axisTick: {
show: true,
inside: true,
lineStyle: {
color: "#9fabc1",
},
},
// 刻度线
axisLine: {
show: true,
lineStyle: {
color: "#9fabc1",
},
},
// 线
splitLine: {
show: true,
lineStyle: {
color: "#616d87",
},
},
},
],
series: [
{
type: "line",
smooth: true,
lineStyle: {
width: 2,
color: "#63A1FF",
},
label: {
show: true,
color: "#fff",
backgroundColor: "#63A1FF",
padding: [2, 4, 2, 4]
},
areaStyle: {
color: {
type: "linear",
x: 0,
y: 1,
x2: 0,
y2: 0,
colorStops: [
{
offset: 0,
color: "#031a45",
},
{
offset: 1,
color: "#63A1FF",
},
],
global: false, // 缺省为 false
},
},
data: [{
value: 18, label: {
offset: [12, 0]
}
}, 20, 15, 3022, 2225, 10, 15, 16, 18, 30, 20, 25, 30],
// markPoint: {
// symbolSize: 40,
// itemStyle: {
// color: '#14a876'
// },
// data: [
// { type: "max", name: "Max" },
// { type: "min", name: "Min" },
// ],
// },
},
],
};
myChart.setOption(option);
}
}
};
</script>
<style lang="scss" scoped>
.box {
width: 4.6rem;
height: 2.55rem;
border-radius: 4px;
box-sizing: border-box;
background: url("../../../../public/img/energySourcesProvince/intensity.png");
background-size: 100% 100%;
padding: 0.54rem 0.22rem 0 0.22rem;
position: absolute;
bottom: 0.24rem;
right: 0.24rem;
2 years ago
z-index: 9;
2 years ago
.tit-r {
font-size: 0.14rem;
color: rgba($color: #fff, $alpha: 0.4);
margin-top: 0.04rem;
}
#mainIntensity {
height: 1.8rem;
}
}
</style>