update
parent
43f7c19691
commit
90f745f6e0
|
@ -1,5 +1,7 @@
|
||||||
import request from "@/utils/http/request";
|
import request from "@/utils/http/request";
|
||||||
|
|
||||||
|
|
||||||
|
// 曲线
|
||||||
export function powerCurve_api(data: any) {
|
export function powerCurve_api(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: "/api/wwpm/biz/v1/pipe/power_curve",
|
url: "/api/wwpm/biz/v1/pipe/power_curve",
|
||||||
|
@ -8,5 +10,24 @@ export function powerCurve_api(data: any) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 台区 重过载
|
||||||
|
export function transformerOverloadCount_api(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/api/wwpm/biz/v1/transformer_overload_count",
|
||||||
|
method: "POST",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 充电桩列表 运行状态
|
||||||
|
export function running_api(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/api/wwpm/biz/v1/pipe/running",
|
||||||
|
method: "POST",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -14,18 +14,18 @@ export function handleUnit(data) {
|
||||||
|
|
||||||
|
|
||||||
// 处理echarts数据
|
// 处理echarts数据
|
||||||
export function handleEchartsData(data) {
|
export function handleEchartsData(data, value) {
|
||||||
// 间隔可以设置成动态的
|
// 间隔可以设置成动态的
|
||||||
let timeArray = [];
|
let timeArray = [];
|
||||||
for (let hour = 0; hour < 24; hour++) {
|
for (let hour = 0; hour < 24; hour++) {
|
||||||
for (let minute = 0; minute < 60; minute += 5) {
|
for (let minute = 0; minute < 60; minute += value) {
|
||||||
let timeString = (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute);
|
let timeString = (hour < 10 ? '0' + hour : hour) + ':' + (minute < 10 ? '0' + minute : minute);
|
||||||
timeArray.push(
|
timeArray.push(
|
||||||
{ datetime: timeString, measValue: '-' }
|
{ datetime: timeString, measValue: '-' }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
console.log(timeArray)
|
||||||
timeArray.forEach(item => {
|
timeArray.forEach(item => {
|
||||||
data.forEach(ite => {
|
data.forEach(ite => {
|
||||||
let iteTime = ite.datetime.split(' ')[1].split(':')[0] + ':' + ite.datetime.split(' ')[1].split(':')[1]
|
let iteTime = ite.datetime.split(' ')[1].split(':')[0] + ':' + ite.datetime.split(' ')[1].split(':')[1]
|
||||||
|
|
|
@ -311,10 +311,11 @@ import svgHtml15 from '@/assets/json/svgzhan15.js'
|
||||||
import svgHtml26 from '@/assets/json/svgzhan26.js'
|
import svgHtml26 from '@/assets/json/svgzhan26.js'
|
||||||
import svgHtml23 from '@/assets/json/svgye23.js'
|
import svgHtml23 from '@/assets/json/svgye23.js'
|
||||||
import svgHtml311 from '@/assets/json/svgye31.js'
|
import svgHtml311 from '@/assets/json/svgye31.js'
|
||||||
|
import testSvg from '@/assets/json/线路二.js'
|
||||||
|
|
||||||
// import svgJSON from "@/assets/json/result1.json";
|
// import svgJSON from "@/assets/json/result1.json";
|
||||||
import svgJSON2 from '@/assets/json/nw-result1.json'
|
import svgJSON2 from '@/assets/json/nw-result1.json'
|
||||||
import svgJSON from '@/assets/json/result2.json' //555
|
import svgJSON from '@/assets/json/result2_copy.json' //555
|
||||||
import svgJSONye23 from '@/assets/json/ye23.json' //555
|
import svgJSONye23 from '@/assets/json/ye23.json' //555
|
||||||
import svgJSONye31 from '@/assets/json/ye31.json' //555
|
import svgJSONye31 from '@/assets/json/ye31.json' //555
|
||||||
import svgJSONying31 from '@/assets/json/ying31.json' //555
|
import svgJSONying31 from '@/assets/json/ying31.json' //555
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<span class="fs35">重过载</span>
|
<span class="fs35">重过载</span>
|
||||||
<div class="val fs40">
|
<div class="val fs40">
|
||||||
<div class="blueShadow">2</div>
|
<div class="blueShadow">{{transformerOverloadCount}}</div>
|
||||||
<!-- <span class="blue">个</span> -->
|
<!-- <span class="blue">个</span> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="load_manage_echart">
|
<div class="load_manage_echart">
|
||||||
<load_echart :eName="eName1"></load_echart>
|
<load_echart v-if="carRightData.echartsData.length>0" :paramsData="carRightData.echartsData"></load_echart>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
<div class="box_d">
|
<div class="box_d">
|
||||||
<div class="yuand"></div>
|
<div class="yuand"></div>
|
||||||
<span>充电桩数量:</span>
|
<span>充电桩数量:</span>
|
||||||
<div class="number c-blue">{{ chargingList.length }}</div>
|
<div class="number c-blue">{{ carRightData.chargingList.length }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="box_d">
|
<div class="box_d">
|
||||||
<div class="yuand"></div>
|
<div class="yuand"></div>
|
||||||
|
@ -101,40 +101,40 @@
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="list_content">
|
<div class="list_content">
|
||||||
<div class="c_info" v-for="item in chargingList">
|
<div class="c_info" v-for="(item,index) in carRightData.chargingList" :key="index">
|
||||||
<img src="@/assets/images/device/chongdainzhaung.png" alt="" />
|
<img src="@/assets/images/device/chongdainzhaung.png" alt="" />
|
||||||
<div class="r_info">
|
<div class="r_info">
|
||||||
<div class="t_info">
|
<div class="t_info">
|
||||||
<span class="c-blue">{{ item.c_name }}</span>
|
<span class="c-blue">{{ item.name }}</span>
|
||||||
<div class="tval">
|
<div class="tval">
|
||||||
<div :class="[
|
<div :class="[
|
||||||
item.c_status === '充电中'
|
item.status === '1'
|
||||||
? 'b-green'
|
? 'b-green'
|
||||||
: item.c_status === '未使用'
|
: item.status === '0'
|
||||||
? 'b-gary'
|
? 'b-gary'
|
||||||
: 'b-yellow',
|
: 'b-yellow',
|
||||||
'yuand',
|
'yuand',
|
||||||
]"></div>
|
]"></div>
|
||||||
<div :class="[
|
<div :class="[
|
||||||
item.c_status === '充电中'
|
item.status === '1'
|
||||||
? 'c-green'
|
? 'c-green'
|
||||||
: item.c_status === '未使用'
|
: item.status === '0'
|
||||||
? 'c-gary'
|
? 'c-gary'
|
||||||
: 'c-yellow',
|
: 'c-yellow',
|
||||||
]">
|
]">
|
||||||
{{ item.c_status }}
|
{{ item.status === '1' ? '充电中' : '未充电'}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="b_info">
|
<div class="b_info">
|
||||||
<div class="load">
|
<div class="load">
|
||||||
负荷:
|
负荷:
|
||||||
<span>{{ item.c_load }}kW</span>
|
<span>{{ item.rated_power }}kW</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="total">
|
<!-- <div class="total">
|
||||||
总充电量:
|
总充电量:
|
||||||
<span>{{ item.c_total }}kWh</span>
|
<span>{{ item.c_total }}kWh</span>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -265,10 +265,16 @@ import load_c_echart from './load_c_echart.vue'
|
||||||
import load_info_echart from './load_info_echart.vue'
|
import load_info_echart from './load_info_echart.vue'
|
||||||
import cdz_echart from './cdz_echart.vue'
|
import cdz_echart from './cdz_echart.vue'
|
||||||
import carTree from '@/views/commonPage/carTree.vue'
|
import carTree from '@/views/commonPage/carTree.vue'
|
||||||
import { powerCurve_api } from '@/api/carPage/index'
|
import { powerCurve_api, transformerOverloadCount_api, running_api } from '@/api/carPage/index'
|
||||||
|
import { handleEchartsData } from '@/hooks/handleFun'
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 获取右侧数据
|
// 获取右侧数据
|
||||||
getPowerCurve_api()
|
getPowerCurve_api()
|
||||||
|
// 获取台区 重过载
|
||||||
|
getTransformerOverloadCount_api()
|
||||||
|
// 获取充电桩列表
|
||||||
|
getRunning_api()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 车网互动专题切换栏
|
// 车网互动专题切换栏
|
||||||
|
@ -409,23 +415,6 @@ const handleCurrentChange = (page: number) => {
|
||||||
const hideLeft = ref<boolean>(true) //默认页面显示
|
const hideLeft = ref<boolean>(true) //默认页面显示
|
||||||
const hideRight = ref<boolean>(true) //默认页面显示 右边
|
const hideRight = ref<boolean>(true) //默认页面显示 右边
|
||||||
|
|
||||||
interface ChargingList {
|
|
||||||
c_name: string
|
|
||||||
c_status: string
|
|
||||||
c_load: string
|
|
||||||
c_total: string
|
|
||||||
}
|
|
||||||
// 右侧充电桩运行状态
|
|
||||||
let chargingList = reactive<ChargingList[]>([
|
|
||||||
{ c_name: '充电桩1号', c_status: '充电中', c_load: '30', c_total: '1475' },
|
|
||||||
{ c_name: '充电桩4号', c_status: '充电中', c_load: '45', c_total: '235' },
|
|
||||||
{ c_name: '充电桩2号', c_status: '充电中', c_load: '50', c_total: '675' },
|
|
||||||
{ c_name: '充电桩7号', c_status: '未充电', c_load: '32', c_total: '244' },
|
|
||||||
{ c_name: '充电桩12号', c_status: '未充电', c_load: '48', c_total: '368' },
|
|
||||||
{ c_name: '充电桩3号', c_status: '未充电', c_load: '56', c_total: '123' },
|
|
||||||
|
|
||||||
{ c_name: '充电桩3号', c_status: '未充电', c_load: '23', c_total: '566' }
|
|
||||||
])
|
|
||||||
// 组件卸载调用
|
// 组件卸载调用
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
hideLeft.value = false
|
hideLeft.value = false
|
||||||
|
@ -453,12 +442,45 @@ const handleThree = val => {
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
interface ChargingList {
|
||||||
|
c_name: string
|
||||||
|
c_status: string
|
||||||
|
c_load: string
|
||||||
|
c_total: string
|
||||||
|
}
|
||||||
|
let carRightData = reactive({
|
||||||
|
echartsData: [],
|
||||||
|
chargingList: [] // 右侧充电桩运行状态
|
||||||
|
})
|
||||||
|
let transformerOverloadCount = ref<number>(0)
|
||||||
|
|
||||||
|
// 获取曲线
|
||||||
let getPowerCurve_api = () => {
|
let getPowerCurve_api = () => {
|
||||||
powerCurve_api({
|
powerCurve_api({
|
||||||
mrid: '1242690000004712'
|
mrid: '1242690000004712'
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
console.log(res,'resresres');
|
res?.data.forEach((item: any) => {
|
||||||
|
item.datetime = item.dateTime
|
||||||
|
})
|
||||||
|
let result = handleEchartsData(res.data, 60)
|
||||||
|
carRightData.echartsData = result
|
||||||
|
console.log(result, 'resresres')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取台区 重过载
|
||||||
|
let getTransformerOverloadCount_api = () => {
|
||||||
|
transformerOverloadCount_api({
|
||||||
|
orgID: '8af8470a47aad8e20147aad92e400335'
|
||||||
|
}).then((res: any) => {
|
||||||
|
transformerOverloadCount.value = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 获取充电桩列表
|
||||||
|
let getRunning_api = () => {
|
||||||
|
running_api({
|
||||||
|
orgID: '8af8470a47aad8e20147aad92e400335'
|
||||||
|
}).then((res: any) => {
|
||||||
|
carRightData.chargingList = res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
@ -1021,7 +1043,7 @@ const styleVar = computed(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.load_runstatus_box {
|
.load_runstatus_box {
|
||||||
height: 100%;
|
height: 60%;
|
||||||
width: 95%;
|
width: 95%;
|
||||||
|
|
||||||
.yuand {
|
.yuand {
|
||||||
|
@ -1072,7 +1094,7 @@ const styleVar = computed(() => {
|
||||||
margin-top: 2%;
|
margin-top: 2%;
|
||||||
|
|
||||||
// height: changeHeight(370);
|
// height: changeHeight(370);
|
||||||
height: 64%;
|
height: 85%;
|
||||||
|
|
||||||
padding-left: changeHeight(44);
|
padding-left: changeHeight(44);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
|
|
@ -1,180 +1,175 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="OneLine" ref="OneLine"></div>
|
<div class="OneLine" ref="OneLine"></div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {
|
import { ref, inject, onBeforeUnmount, getCurrentInstance, onMounted, watchEffect } from 'vue'
|
||||||
ref,
|
import transformFontSize from '@/hooks/transFormSize.ts'
|
||||||
inject,
|
import 'echarts/lib/component/dataZoom'
|
||||||
onBeforeUnmount,
|
|
||||||
getCurrentInstance,
|
|
||||||
onMounted,
|
|
||||||
watchEffect,
|
|
||||||
} from "vue";
|
|
||||||
import transformFontSize from "@/hooks/transFormSize.ts";
|
|
||||||
import "echarts/lib/component/dataZoom";
|
|
||||||
onMounted(() => {
|
|
||||||
drawOneLine();
|
|
||||||
});
|
|
||||||
interface Echart_props {
|
|
||||||
eName?: string;
|
|
||||||
}
|
|
||||||
// const props = withDefaults(defineProps<Echart_props>(), {
|
|
||||||
// eName: "负载率",
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
paramsData: any
|
||||||
|
}>()
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
drawOneLine()
|
||||||
|
})
|
||||||
|
interface Echart_props {
|
||||||
|
eName?: string
|
||||||
|
}
|
||||||
|
// const props = withDefaults(defineProps<Echart_props>(), {
|
||||||
|
// eName: "负载率",
|
||||||
|
// });
|
||||||
|
|
||||||
|
// 获取echart挂载的DOM节点
|
||||||
|
const OneLine: any = ref()
|
||||||
|
|
||||||
|
// 获取当前组件实例
|
||||||
|
const { proxy }: any = getCurrentInstance()
|
||||||
|
|
||||||
// 获取echart挂载的DOM节点
|
const drawOneLine = () => {
|
||||||
const OneLine: any = ref();
|
let xData:any = []
|
||||||
|
let yData:any = []
|
||||||
|
props.paramsData.forEach(item => {
|
||||||
|
xData.push(item.datetime)
|
||||||
|
yData.push(item.measValue)
|
||||||
|
})
|
||||||
|
|
||||||
// 获取当前组件实例
|
let myChart = proxy.$echarts.init(OneLine.value)
|
||||||
const { proxy }: any = getCurrentInstance();
|
|
||||||
|
|
||||||
const drawOneLine = () => {
|
myChart.clear()
|
||||||
let myChart = proxy.$echarts.init(OneLine.value);
|
|
||||||
|
|
||||||
myChart.clear();
|
|
||||||
const option = {
|
const option = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "axis",
|
trigger: 'axis',
|
||||||
// axisPointer: { type: 'cross' }
|
// axisPointer: { type: 'cross' }
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: "#FFFFFF",
|
color: '#FFFFFF'
|
||||||
},
|
},
|
||||||
// padding: transformFontSize(15),
|
// padding: transformFontSize(15),
|
||||||
backgroundColor: "rgba(10,202,64,.9)", //设置自定义背景
|
backgroundColor: 'rgba(10,202,64,.9)', //设置自定义背景
|
||||||
borderColor: "rgba(10,202,64,.9)",
|
borderColor: 'rgba(10,202,64,.9)',
|
||||||
borderRadius: 5,
|
borderRadius: 5,
|
||||||
|
|
||||||
formatter: function (param: any) {
|
formatter: function (param: any) {
|
||||||
let str = `
|
let str = `
|
||||||
<div style="width:100%:height:100%">
|
<div style="width:100%:height:100%">
|
||||||
<div style="display:flex;justify-content:space-between;"> ${
|
<div style="display:flex;justify-content:space-between;"> ${param[0].name.split(' ')[0]}</div>
|
||||||
param[0].name.split(" ")[0]
|
|
||||||
}</div>
|
|
||||||
${getDom(param)}
|
${getDom(param)}
|
||||||
</div>`;
|
</div>`
|
||||||
function getDom(param: any) {
|
function getDom(param: any) {
|
||||||
let newStr = "";
|
let newStr = ''
|
||||||
param.forEach((item: any) => {
|
param.forEach((item: any) => {
|
||||||
newStr += `<div style="display:flex;"><div>${
|
newStr += `<div style="display:flex;"><div>${item.seriesName}:</div><div>${item.value === undefined ? '0' : item.value}%</div></div>`
|
||||||
item.seriesName
|
})
|
||||||
}:</div><div>${
|
return newStr
|
||||||
item.value === undefined ? "0" : item.value
|
}
|
||||||
}%</div></div>`;
|
return str
|
||||||
});
|
|
||||||
return newStr;
|
|
||||||
}
|
}
|
||||||
return str;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
top: "3%",
|
top: '5%',
|
||||||
right: "8%",
|
right: '8%',
|
||||||
orient: "vertical",
|
orient: 'vertical',
|
||||||
data: ["当前负载率"],
|
data: ['功率'],
|
||||||
itemWidth: transformFontSize(40),
|
itemWidth: transformFontSize(40),
|
||||||
itemHeight: transformFontSize(20),
|
itemHeight: transformFontSize(20),
|
||||||
itemGap: transformFontSize(8),
|
itemGap: transformFontSize(8),
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: transformFontSize(35),
|
fontSize: transformFontSize(35),
|
||||||
color: "#FFFFFF",
|
color: '#FFFFFF'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: "25%",
|
top: '25%',
|
||||||
left: "8%",
|
left: '8%',
|
||||||
right: "12%",
|
right: '12%',
|
||||||
bottom: "13%",
|
bottom: '13%'
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: "category",
|
type: 'category',
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false,
|
show: false,
|
||||||
alignWithLabel: true,
|
alignWithLabel: true
|
||||||
},
|
},
|
||||||
boundaryGap: false,
|
boundaryGap: false,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: "#fff",
|
color: '#fff',
|
||||||
fontSize: transformFontSize(35),
|
fontSize: transformFontSize(35),
|
||||||
padding: [0, 0, 0, 30],
|
padding: [0, 0, 0, 30]
|
||||||
// formatter: function (param: any) {
|
// formatter: function (param: any) {
|
||||||
// return param.split(' ')[1].split(':')[0] + ':' + param.split(' ')[1].split(':')[1]
|
// return param.split(' ')[1].split(':')[0] + ':' + param.split(' ')[1].split(':')[1]
|
||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
data: ["03:00", "06:00", "09:00", "12:00", "15:00", "18:00", "24:00"],
|
data: xData
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false,
|
show: false
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true, //y轴轴线
|
show: true //y轴轴线
|
||||||
},
|
},
|
||||||
type: "value",
|
type: 'value',
|
||||||
name: "%",
|
name: 'kW',
|
||||||
// min: 0,
|
// min: 0,
|
||||||
// max: 100,
|
// max: 100,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
//y轴name的颜色
|
//y轴name的颜色
|
||||||
color: "#fff",
|
color: '#fff',
|
||||||
fontSize: transformFontSize(35),
|
fontSize: transformFontSize(35),
|
||||||
padding: [0, 40, 0, 0],
|
padding: [0, 40, 0, 0]
|
||||||
},
|
},
|
||||||
position: "left",
|
position: 'left',
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
//刻度标签文字的颜色大小
|
//刻度标签文字的颜色大小
|
||||||
color: "#fff",
|
color: '#fff',
|
||||||
fontSize: transformFontSize(35),
|
fontSize: transformFontSize(35),
|
||||||
formatter: "{value}",
|
formatter: '{value}'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: "当前负载率",
|
name: '功率',
|
||||||
type: "line",
|
type: 'line',
|
||||||
barWidth: 2, // 柱子宽度核心代码
|
barWidth: 2, // 柱子宽度核心代码
|
||||||
smooth: true,
|
smooth: true,
|
||||||
showSymbol: false,
|
showSymbol: false,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: "rgba(107, 255, 130, 1)",
|
color: 'rgba(107, 255, 130, 1)'
|
||||||
},
|
},
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: new proxy.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
color: new proxy.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||||
{
|
{
|
||||||
offset: 0,
|
offset: 0,
|
||||||
color: "rgba(107, 255, 130, 0.4)",
|
color: 'rgba(107, 255, 130, 0.4)'
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
offset: 1,
|
offset: 1,
|
||||||
|
|
||||||
color: "rgba(107, 255, 130, 0.01)",
|
color: 'rgba(107, 255, 130, 0.01)'
|
||||||
|
}
|
||||||
|
])
|
||||||
|
}
|
||||||
},
|
},
|
||||||
]),
|
data: yData
|
||||||
},
|
}
|
||||||
},
|
]
|
||||||
data: [20, 42, 41, 24, 40, 30, 10],
|
}
|
||||||
},
|
myChart.setOption(option)
|
||||||
],
|
|
||||||
};
|
|
||||||
myChart.setOption(option);
|
|
||||||
|
|
||||||
// 根据页面大小自动响应图表大小
|
// 根据页面大小自动响应图表大小
|
||||||
window.addEventListener("resize", function () {
|
window.addEventListener('resize', function () {
|
||||||
myChart.resize();
|
myChart.resize()
|
||||||
});
|
})
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.OneLine {
|
.OneLine {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue