jiminglei 2 years ago
parent b3720b33b5
commit 0d58b2b4a0
  1. 46
      psdc-ui/src/views/emonitor/db/index.vue
  2. 4
      psdc-ui/src/views/emonitor/drgl/index.vue
  3. 4
      psdc-ui/src/views/emonitor/frdl/index.vue
  4. 4
      psdc-ui/src/views/emonitor/kqyrb/index.vue
  5. 1
      psdc-ui/src/views/emonitor/wdcgq/index.vue
  6. 4
      psdc-ui/src/views/emonitor/xrgl/index.vue

@ -35,7 +35,7 @@
<div class="mid1-1"> <div class="mid1-1">
当前功率 当前功率
</div> </div>
<div id="myEcharts" style="width: 100%; height: 88.6%"></div> <div id="myEcharts1" style="width: 100%; height: 88.6%"></div>
</div> </div>
<div class="mid2"> <div class="mid2">
<div class="mid2-1"> <div class="mid2-1">
@ -56,17 +56,16 @@
</template> </template>
<script name="Index"> <script name="Index">
import { onMounted } from "vue"; import { onMounted ,onUnmounted } from "vue";
import * as echarts from 'echarts'; import * as echarts from 'echarts';
export default { export default {
name: "db", name: "db",
setup() { setup() {
onMounted(() => {//element,onMountedHook onMounted(() => {//element,onMountedHook
let myChart = echarts.init(document.getElementById("myEcharts")); echarts.init(document.getElementById("myEcharts1")).dispose()
let myChart2 = echarts.init(document.getElementById("myEcharts2")); let myChart1 = echarts.init(document.getElementById("myEcharts1"));
let myChart3 = echarts.init(document.getElementById("myEcharts3")); let option1 = {
//
myChart.setOption({
series: [ series: [
{ {
type: 'gauge', type: 'gauge',
@ -118,11 +117,16 @@ export default {
] ]
} }
] ]
}); }
myChart1.setOption(option1);
window.onresize = function () {// window.onresize = function () {//
myChart.resize(); myChart1.resize();
}; };
myChart3.setOption({
echarts.init(document.getElementById("myEcharts2")).dispose()
let myChart2 = echarts.init(document.getElementById("myEcharts2"));
//
myChart2.setOption({
title: {}, title: {},
tooltip: {}, tooltip: {},
textStyle:{ textStyle:{
@ -139,7 +143,7 @@ export default {
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
name: "kWh", name: "kW",
splitLine:{ splitLine:{
show:true, show:true,
lineStyle:{ lineStyle:{
@ -157,8 +161,8 @@ export default {
}, },
series: [ series: [
{ {
name: "今日用电量", name: "当前功率",
type: "bar", type: "line",
data: [5, 20, 36, 10, 10, 20], data: [5, 20, 36, 10, 10, 20],
itemStyle:{ itemStyle:{
color:'#2F8EE0' color:'#2F8EE0'
@ -167,9 +171,12 @@ export default {
], ],
}); });
window.onresize = function () {// window.onresize = function () {//
myChart3.resize(); myChart2.resize();
}; };
myChart2.setOption({
echarts.init(document.getElementById("myEcharts3")).dispose()
let myChart3 = echarts.init(document.getElementById("myEcharts3"));
myChart3.setOption({
title: {}, title: {},
tooltip: {}, tooltip: {},
textStyle:{ textStyle:{
@ -186,7 +193,7 @@ export default {
}, },
yAxis: { yAxis: {
type: 'value', type: 'value',
name: "kW", name: "kWh",
splitLine:{ splitLine:{
show:true, show:true,
lineStyle:{ lineStyle:{
@ -204,8 +211,8 @@ export default {
}, },
series: [ series: [
{ {
name: "当前功率", name: "今日用电量",
type: "line", type: "bar",
data: [5, 20, 36, 10, 10, 20], data: [5, 20, 36, 10, 10, 20],
itemStyle:{ itemStyle:{
color:'#2F8EE0' color:'#2F8EE0'
@ -214,8 +221,9 @@ export default {
], ],
}); });
window.onresize = function () {// window.onresize = function () {//
myChart2.resize(); myChart3.resize();
}; };
}); });
}, },
components: {}, components: {},

@ -73,6 +73,10 @@ export default {
name: "drgl", name: "drgl",
setup() { setup() {
onMounted(() => {//element,onMountedHook onMounted(() => {//element,onMountedHook
echarts.init(document.getElementById("myEcharts")).dispose()
echarts.init(document.getElementById("myEcharts2")).dispose()
echarts.init(document.getElementById("myEcharts3")).dispose()
echarts.init(document.getElementById("myEcharts4")).dispose()
let myChart = echarts.init(document.getElementById("myEcharts")); let myChart = echarts.init(document.getElementById("myEcharts"));
let myChart2 = echarts.init(document.getElementById("myEcharts2")); let myChart2 = echarts.init(document.getElementById("myEcharts2"));
let myChart3 = echarts.init(document.getElementById("myEcharts3")); let myChart3 = echarts.init(document.getElementById("myEcharts3"));

@ -69,6 +69,10 @@ export default {
name: "frdl", name: "frdl",
setup() { setup() {
onMounted(() => {//element,onMountedHook onMounted(() => {//element,onMountedHook
echarts.init(document.getElementById("myEcharts")).dispose()
echarts.init(document.getElementById("myEcharts2")).dispose()
echarts.init(document.getElementById("myEcharts3")).dispose()
echarts.init(document.getElementById("myEcharts4")).dispose()
let myChart = echarts.init(document.getElementById("myEcharts")); let myChart = echarts.init(document.getElementById("myEcharts"));
let myChart2 = echarts.init(document.getElementById("myEcharts2")); let myChart2 = echarts.init(document.getElementById("myEcharts2"));
let myChart3 = echarts.init(document.getElementById("myEcharts3")); let myChart3 = echarts.init(document.getElementById("myEcharts3"));

@ -73,6 +73,10 @@ export default {
name: "kqyrb", name: "kqyrb",
setup() { setup() {
onMounted(() => {//element,onMountedHook onMounted(() => {//element,onMountedHook
echarts.init(document.getElementById("myEcharts")).dispose()
echarts.init(document.getElementById("myEcharts2")).dispose()
echarts.init(document.getElementById("myEcharts3")).dispose()
echarts.init(document.getElementById("myEcharts4")).dispose()
let myChart = echarts.init(document.getElementById("myEcharts")); let myChart = echarts.init(document.getElementById("myEcharts"));
let myChart2 = echarts.init(document.getElementById("myEcharts2")); let myChart2 = echarts.init(document.getElementById("myEcharts2"));
let myChart3 = echarts.init(document.getElementById("myEcharts3")); let myChart3 = echarts.init(document.getElementById("myEcharts3"));

@ -77,6 +77,7 @@ export default {
name: "wdcgq", name: "wdcgq",
setup() { setup() {
onMounted(() => {//element,onMountedHook onMounted(() => {//element,onMountedHook
echarts.init(document.getElementById("myEcharts")).dispose()
let myChart = echarts.init(document.getElementById("myEcharts")); let myChart = echarts.init(document.getElementById("myEcharts"));
// //
myChart.setOption({ myChart.setOption({

@ -73,6 +73,10 @@ export default {
name: "xrgl", name: "xrgl",
setup() { setup() {
onMounted(() => {//element,onMountedHook onMounted(() => {//element,onMountedHook
echarts.init(document.getElementById("myEcharts")).dispose()
echarts.init(document.getElementById("myEcharts2")).dispose()
echarts.init(document.getElementById("myEcharts3")).dispose()
echarts.init(document.getElementById("myEcharts4")).dispose()
let myChart = echarts.init(document.getElementById("myEcharts")); let myChart = echarts.init(document.getElementById("myEcharts"));
let myChart2 = echarts.init(document.getElementById("myEcharts2")); let myChart2 = echarts.init(document.getElementById("myEcharts2"));
let myChart3 = echarts.init(document.getElementById("myEcharts3")); let myChart3 = echarts.init(document.getElementById("myEcharts3"));

Loading…
Cancel
Save