This commit is contained in:
2024-05-21 08:34:03 +08:00
parent f84355b673
commit 3228987c40
2 changed files with 16 additions and 44 deletions

View File

@@ -1,20 +1,11 @@
<template>
<div>
<NotMsg v-show="notMsg" />
<div
id="factoryStoreChart"
style="width: 100%; height: 100%"
v-show="!notMsg"
></div>
</div>
<div id="factoryStoreChart" style="width: 100%; height: 100%"></div>
</template>
<script>
import { debounce } from "@/utils/debounce";
import * as echarts from "echarts";
import NotMsg from "./../../components/NotMsg";
export default {
name: "Store",
components: { NotMsg },
props: {
stock: {
type: Object,
@@ -30,15 +21,13 @@ export default {
return {
isFullscreen: false,
actualOptions: null,
notMsg: false,
chart: "",
options: {
grid: {
left: "3%",
left: "8%",
right: "1%",
bottom: "0",
bottom: "8%",
top: "15%",
containLabel: true,
},
tooltip: {},
xAxis: {
@@ -157,12 +146,9 @@ export default {
let xAxis = Object.keys(this.stock) || [];
let data = [];
if (xAxis.length > 0) {
this.notMsg = false;
data = xAxis.map((item) => {
return this.stock[item].total;
});
} else {
this.notMsg = true;
}
if (this.chart) {
this.chart.dispose();