This commit is contained in:
DESKTOP-FUDKNA8\znjsz 2024-01-29 17:03:21 +08:00
parent 85e82a1913
commit 2276c1f9dd
6 changed files with 16 additions and 25 deletions

View File

@ -1,11 +1,13 @@
export const options = { export const options = {
color: ['#ffd601', '#72340b'], color: ['#ffd601', '#72340b', '#a4c9d1'],
grid: { grid: {
top: 10, top: 10,
bottom: 0, bottom: 0,
left: 0, left: 0,
right: 28, right: 28,
containLabel: true, },
legend: {
show: false,
}, },
xAxis: { xAxis: {
max: 100, max: 100,
@ -23,8 +25,6 @@ export const options = {
type: "category", type: "category",
data: ["A组", "B组", "C组"], data: ["A组", "B组", "C组"],
inverse: true, inverse: true,
animationDuration: 300,
animationDurationUpdate: 300,
max: 2, // only the largest 3 bars will be displayed max: 2, // only the largest 3 bars will be displayed
axisLabel: { axisLabel: {
fontSize: 16, fontSize: 16,
@ -38,27 +38,18 @@ export const options = {
}, },
series: [ series: [
{ {
realtimeSort: true,
type: "bar", type: "bar",
// data: [10, 20, 30],
data: [], data: [],
label: { label: {
show: true, show: true,
position: "right", position: "right",
valueAnimation: true,
formatter: "{c}%", formatter: "{c}%",
color: "#fff", color: "#fff",
fontSize: 16, fontSize: 16,
}, },
}, },
], ],
legend: {
show: false,
},
animationDuration: 0,
animationDurationUpdate: 3000,
animationEasing: "linear",
animationEasingUpdate: "linear",
}; };
export default function setup(echartInstance, dataArr) { export default function setup(echartInstance, dataArr) {

View File

@ -3,7 +3,7 @@ import { ref, watch, onMounted, nextTick } from "vue";
import * as echarts from "echarts"; import * as echarts from "echarts";
import Container from "../Base/Container.vue"; import Container from "../Base/Container.vue";
import { useWsStore } from "../../store"; import { useWsStore } from "../../store";
import chartSetup from "./LatestWeekYield"; import chartSetup from "./LatestWeekYieldOptions";
const store = useWsStore(); const store = useWsStore();
const chartChart = ref(null); const chartChart = ref(null);
@ -77,7 +77,7 @@ onMounted(() => {
</script> </script>
<template> <template>
<Container class="chart" title="小时数据" icon="cube"> <Container class="chart" title="近7日产量" icon="cube">
<div ref="chartChart" class="chart-chart" style="{opacity: (hourData && hourData.length > 0) ? 1 : 0}"></div> <div ref="chartChart" class="chart-chart" style="{opacity: (hourData && hourData.length > 0) ? 1 : 0}"></div>
<p v-show="!hourData || hourData.length === 0" class="empty-data-hint"> <p v-show="!hourData || hourData.length === 0" class="empty-data-hint">
暂无数据 暂无数据

View File

@ -54,7 +54,7 @@ onMounted(() => {
</script> </script>
<template> <template>
<Container class="chart" title="本月班组情况" icon="cube"> <Container class="chart" title="本月生产线情况" icon="cube">
<div ref="chartChart" class="chart-chart" style="{opacity: (monthData) ? 1 : 0}"></div> <div ref="chartChart" class="chart-chart" style="{opacity: (monthData) ? 1 : 0}"></div>
<p v-show="!monthData" class="empty-data-hint">暂无数据</p> <p v-show="!monthData" class="empty-data-hint">暂无数据</p>
</Container> </Container>

View File

@ -54,7 +54,7 @@ onMounted(() => {
</script> </script>
<template> <template>
<Container class="chart" title="本月班组情况" icon="cube"> <Container class="chart" title="本日生产线情况" icon="cube">
<div ref="chartChart" class="chart-chart" style="{opacity: (monthData) ? 1 : 0}"></div> <div ref="chartChart" class="chart-chart" style="{opacity: (monthData) ? 1 : 0}"></div>
<p v-show="!monthData" class="empty-data-hint">暂无数据</p> <p v-show="!monthData" class="empty-data-hint">暂无数据</p>
</Container> </Container>

View File

@ -12,17 +12,17 @@ import LineMonth from '../components/datapage/LineMonth.vue';
<template> <template>
<div class="data-page"> <div class="data-page">
<!-- 小时数据 --> <!-- 小时数据 -->
<HourChart /> <!-- <HourChart /> -->
<!-- 近7日产量 --> <!-- 近7日产量 -->
<LatestWeekYield /> <!-- <LatestWeekYield /> -->
<!-- 本日生产线情况 --> <!-- 本日生产线情况 -->
<LineToday /> <!-- <LineToday /> -->
<!-- 本月生产线情况 --> <!-- 本月生产线情况 -->
<LineMonth /> <!-- <LineMonth /> -->
<!-- 本日班组情况 --> <!-- 本日班组情况 -->
<TeamChartDay /> <!-- <TeamChartDay /> -->
<!-- 本月班组情况 --> <!-- 本月班组情况 -->
<TeamChartMonth /> <!-- <TeamChartMonth /> -->
</div> </div>
</template> </template>

View File

@ -21,7 +21,7 @@ const props = defineProps({
</div> </div>
<div class="data-list"> <div class="data-list">
<HourChart /> <HourChart />
<TeamChartDay /> <!-- <TeamChartDay /> -->
<TeamChartMonth /> <TeamChartMonth />
</div> </div>
</div> </div>