From d20e18a443337a3575d687f0160700b841015b34 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Thu, 21 Dec 2023 15:58:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=B4=A8=E9=87=8F=E8=B4=A8=E6=A3=80+?= =?UTF-8?q?=E5=B7=A5=E5=8D=95=E7=AE=A1=E7=90=86=E7=95=8C=E9=9D=A2=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E6=AF=8D=E5=8D=95=E4=BF=A1=E6=81=AF+=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E5=9B=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/reportWork.js | 7 +++++++ src/views/dashboard/DeviceChartLine.vue | 5 +++-- src/views/dashboard/LineChart.vue | 6 +----- src/views/index.vue | 24 ++++++++++++++---------- src/views/plan/workorder/index.vue | 10 +++++++--- 5 files changed, 32 insertions(+), 20 deletions(-) diff --git a/src/api/mes/reportWork.js b/src/api/mes/reportWork.js index fb5c5fe..c6bee9c 100644 --- a/src/api/mes/reportWork.js +++ b/src/api/mes/reportWork.js @@ -209,3 +209,10 @@ export function getPrepareList(query) { }); } +// 获取线体每月生产过程不良率 +export function getLineQcData() { + return request({ + url: '/quality/qcInterface/getLineQcData', + method: 'get' + }); +} diff --git a/src/views/dashboard/DeviceChartLine.vue b/src/views/dashboard/DeviceChartLine.vue index 7673e57..320781c 100644 --- a/src/views/dashboard/DeviceChartLine.vue +++ b/src/views/dashboard/DeviceChartLine.vue @@ -1,7 +1,7 @@ @@ -56,11 +56,12 @@ export default { bottom: '3%', containLabel: true }, + /** toolbox: { feature: { saveAsImage: {} } - }, + },**/ xAxis: { type: 'category', boundaryGap: false, diff --git a/src/views/dashboard/LineChart.vue b/src/views/dashboard/LineChart.vue index 1b58d81..5945501 100644 --- a/src/views/dashboard/LineChart.vue +++ b/src/views/dashboard/LineChart.vue @@ -18,7 +18,7 @@ }, width: { type: String, - default: '100%' + default: '99%' }, height: { type: String, @@ -41,10 +41,6 @@ watch: { chartData: { deep: true, - //handler(val) { - //debugger - //this.setOptions(val) - //} handler(newValue,oldValue){ this.chart.dispose(); this.chartData=newValue; diff --git a/src/views/index.vue b/src/views/index.vue index 9d85684..0fcfcd1 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -12,6 +12,7 @@ + - {{deviceTitle}} + 各线体设备月故障数 - 各线体生产不良率 + 各车间生产不良率 @@ -34,7 +34,7 @@ - + @@ -44,12 +44,14 @@ import LineChart from './dashboard/LineChart'; import PieChart from './dashboard/PieChart'; import PieChart2 from './dashboard/PieChart2'; -import {getGroupLineEquInfo, getLineChartData} from '@/api/mes/reportWork' +import {getGroupLineEquInfo, getLineChartData,getLineQcData} from '@/api/mes/reportWork' import DeviceChartLine from "./dashboard/DeviceChartLine"; +import QcChartLine from "./dashboard/QcChartLine"; export default { name: "Index", components: { DeviceChartLine, + QcChartLine, LineChart//,PieChart,PieChart2 }, data() { @@ -58,13 +60,13 @@ export default { version: "1.0.0", lineChartData: null, deviceChartLineData:null, - title:"本月工厂产量", - deviceTitle: "各组线月设备故障数" + qcChartLineData:null, + title:"本月工厂产量" }; }, created() { this.getLineChartData(); - this.getGroupLineEquInfo(); + }, methods: { goTarget(href) { @@ -75,11 +77,13 @@ export default { this.lineChartData = data; }); }, + /** getGroupLineEquInfo(){ getGroupLineEquInfo().then(response => { this.deviceChartLineData = response.data; }); - } + }, + **/ }, }; diff --git a/src/views/plan/workorder/index.vue b/src/views/plan/workorder/index.vue index e1f79d7..c03407c 100644 --- a/src/views/plan/workorder/index.vue +++ b/src/views/plan/workorder/index.vue @@ -183,12 +183,16 @@ - + + - - + + + +