From 03cd1f2572695f2125772af4bf9a450ca4b492c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=9C=E7=AC=99=E6=AD=8C?= <2277317060@qq.com> Date: Fri, 16 Aug 2024 10:29:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index.vue | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/views/report/qualityDefectsStatisticalAnalysisReport/index.vue b/src/views/report/qualityDefectsStatisticalAnalysisReport/index.vue index 32f3c91..72c1fbf 100644 --- a/src/views/report/qualityDefectsStatisticalAnalysisReport/index.vue +++ b/src/views/report/qualityDefectsStatisticalAnalysisReport/index.vue @@ -150,9 +150,9 @@ import { qualityDefectsStatisticalAnalysisList, qualityDefectsDetailList } from '@/api/report/reportAPI' -import { findProductLineList } from '@//api/base/productLine' -import { parseTime } from '@//utils/ruoyi' -import { getCustomData } from '@//api/base/customData' +import {findProductLineList} from '@//api/base/productLine' +import {parseTime} from '@//utils/ruoyi' +import {getCustomData} from '@//api/base/customData' import Chart from "@/components/board/Chart"; import * as echarts from "echarts"; @@ -208,14 +208,14 @@ export default { // 表单校验 rules: {}, columns: [ - { key: 0, label: `主键标识`, visible: false }, - { key: 1, label: `工厂`, visible: true }, - { key: 2, label: `产线编号`, visible: false }, - { key: 3, label: `产线名称`, visible: true }, - { key: 4, label: `质检工位编号`, visible: false }, - { key: 5, label: `质检工位名称`, visible: true }, - { key: 6, label: `检测数不合格数`, visible: true }, - { key: 7, label: `合格率(%)`, visible: true } + {key: 0, label: `主键标识`, visible: false}, + {key: 1, label: `工厂`, visible: true}, + {key: 2, label: `产线编号`, visible: false}, + {key: 3, label: `产线名称`, visible: true}, + {key: 4, label: `质检工位编号`, visible: false}, + {key: 5, label: `质检工位名称`, visible: true}, + {key: 6, label: `检测数不合格数`, visible: true}, + {key: 7, label: `合格率(%)`, visible: true} ], // 产线选项 productLineList: [], @@ -226,10 +226,10 @@ export default { } }, created() { - findProductLineList({ productLineType: 1 }).then(response => { + findProductLineList({productLineType: 1}).then(response => { this.productLineList = response.data }) - findProductLineList({ productLineType: 2, stationType: 2 }).then(response => { + findProductLineList({productLineType: 2, stationType: 2}).then(response => { this.findStationList = response.data }) //获取自定义数据 @@ -331,9 +331,13 @@ export default { xAxis: [ { type: 'category', - data:response.data.map(val=>val.QUALITY_DEFECT_NAME), + data: response.data.map(val => val.QUALITY_DEFECT_NAME), axisTick: { - alignWithLabel: true + alignWithLabel: true, + }, + axisLabel:{ + interval: 0 + } } ], @@ -352,10 +356,11 @@ export default { normal: { show: true, position: "top", - formatter:(e)=>{ - if(e.data === 0){ + formatter: (e) => { + if (e.data === 0) { return '' - }else{} + } else { + } return e.data }, textStyle: { @@ -380,7 +385,7 @@ export default { ]), }, }, - data: response.data.map(val=>val.SEQ), + data: response.data.map(val => val.DEFECT_NUMBER), } ] }) @@ -412,7 +417,7 @@ export default { }