From c5c6fa800cedd37cea0e3cc3e68df78b47ee2813 Mon Sep 17 00:00:00 2001 From: k94314517 <8417338+k94314517@user.noreply.gitee.com> Date: 星期一, 28 八月 2023 10:37:59 +0800 Subject: [PATCH] 111 --- screen_standard/src/views/process.vue | 33 +++++++++++++++++++++++++++++---- 1 files changed, 29 insertions(+), 4 deletions(-) diff --git a/screen_standard/src/views/process.vue b/screen_standard/src/views/process.vue index c44e935..d81206d 100644 --- a/screen_standard/src/views/process.vue +++ b/screen_standard/src/views/process.vue @@ -113,7 +113,7 @@ </template> <script setup> -import { reactive, ref, toRefs, onMounted, onUnmounted } from 'vue' +import { reactive, ref, toRefs, onMounted, onUnmounted, nextTick } from 'vue' import { getProcedurePlanData, getTop, getProcedurePlansList, getRecordLogPage, getUnqualified7DayData, getUnqualifiedCateData } from '@/utils/api.js' import { useCounterStore } from '@/stores/counter.js' import { useRoute } from 'vue-router' @@ -148,8 +148,11 @@ onMounted(() => { window.addEventListener('resize', () => { - setDayChart() - setTypeChart() + console.log('resize'); + nextTick(() => { + setDayChart() + setTypeChart() + }) }) initData() scrollTimer.value = setInterval(() => { @@ -303,7 +306,6 @@ dateList.push(item.createTime) numList.push(item.unqualifiedNum || 0) }) - console.log(data.allBad); let option; option = { title: { @@ -313,6 +315,10 @@ fontSize: 12 } }, + grid: { + top: 40, + bottom: 40 + }, xAxis: { type: 'category', boundaryGap: false, @@ -320,6 +326,15 @@ lineStyle: { width: 0.5, color: ['#fff'] + } + }, + axisLine: { + show: true, + onZero: true, + lineStyle: { + width: 1, + color: '#fff', + opacity: .5 } }, axisLabel: { @@ -336,6 +351,15 @@ lineStyle: { width: 0.5, color: ['#fff'] + } + }, + axisLine: { + show: true, + onZero: true, + lineStyle: { + width: 1, + color: '#fff', + opacity: .5 } }, axisLabel: { @@ -388,6 +412,7 @@ */ function setTypeChart() { let dayChartDom = document.getElementById('type-distribution'); + console.log(dayChartDom); let myChart = echarts.init(dayChartDom); let legendData = [] let seriesData = [] -- Gitblit v1.9.3