|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <div class="screen-container">
|
|
|
+ <div :key="viewKey" class="screen-container">
|
|
|
<common-header title="质量统计" />
|
|
|
<div class="screen-content">
|
|
|
<div class="infoItem">
|
|
@@ -109,6 +109,12 @@ import {
|
|
|
getQualifiedRate,
|
|
|
} from "@/api/bigScreen";
|
|
|
import * as echarts from "echarts";
|
|
|
+const viewKey = ref(false);
|
|
|
+const checkFullscreen = async () => {
|
|
|
+ charts1.value.resize();
|
|
|
+ charts2.value.resize();
|
|
|
+ charts3.value.resize();
|
|
|
+};
|
|
|
const charts1 = shallowRef(null);
|
|
|
const charts2 = shallowRef(null);
|
|
|
const charts3 = shallowRef(null);
|
|
@@ -221,17 +227,17 @@ const option1 = {
|
|
|
type: "line",
|
|
|
symbol: "none",
|
|
|
itemStyle: {
|
|
|
- color: "#BCB62E80",
|
|
|
+ color: "#D7565680",
|
|
|
},
|
|
|
areaStyle: {
|
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
{
|
|
|
offset: 0,
|
|
|
- color: "#BCB62E80",
|
|
|
+ color: "#D7565680",
|
|
|
},
|
|
|
{
|
|
|
offset: 1,
|
|
|
- color: "#BCB62E20",
|
|
|
+ color: "#D7565680",
|
|
|
},
|
|
|
]),
|
|
|
},
|
|
@@ -271,18 +277,18 @@ const option2 = {
|
|
|
type: "line",
|
|
|
symbol: "none",
|
|
|
itemStyle: {
|
|
|
- color: "#D7565680",
|
|
|
+ color: "#BCB62E80",
|
|
|
},
|
|
|
|
|
|
areaStyle: {
|
|
|
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
|
|
{
|
|
|
offset: 0,
|
|
|
- color: "#D7565680",
|
|
|
+ color: "#BCB62E80",
|
|
|
},
|
|
|
{
|
|
|
offset: 1,
|
|
|
- color: "#D7565620",
|
|
|
+ color: "#BCB62E80",
|
|
|
},
|
|
|
]),
|
|
|
},
|
|
@@ -355,6 +361,7 @@ const setChart1Option = () => {
|
|
|
};
|
|
|
onMounted(async () => {
|
|
|
setFontSize();
|
|
|
+ window.addEventListener("resize", checkFullscreen);
|
|
|
charts1.value = echarts.init(document.getElementById("charts1"));
|
|
|
charts2.value = echarts.init(document.getElementById("charts2"));
|
|
|
charts3.value = echarts.init(document.getElementById("charts3"));
|
|
@@ -367,6 +374,7 @@ onUnmounted(() => {
|
|
|
if (interval2.value) {
|
|
|
clearInterval(interval2.value);
|
|
|
}
|
|
|
+ document.removeEventListener("resize", checkFullscreen);
|
|
|
});
|
|
|
watch(
|
|
|
[() => chartsData3.value, () => chartsData1.value, () => chartsData2.value],
|