From f5535b1ee955526b5fc2f5a73ac7401af7da79a9 Mon Sep 17 00:00:00 2001 From: wws <18630710203@163.com> Date: Tue, 19 Dec 2023 11:26:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5-=E5=90=84=E7=BB=84=E7=BA=BF?= =?UTF-8?q?=E6=AF=8F=E6=9C=88=E8=AE=BE=E5=A4=87=E6=95=85=E9=9A=9C=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/mes/reportWork.js | 14 +++- src/views/dashboard/DeviceChartLine.vue | 101 ++++++++++++++++++++++++ src/views/index.vue | 20 ++++- 3 files changed, 130 insertions(+), 5 deletions(-) create mode 100644 src/views/dashboard/DeviceChartLine.vue diff --git a/src/api/mes/reportWork.js b/src/api/mes/reportWork.js index a002262..fb5c5fe 100644 --- a/src/api/mes/reportWork.js +++ b/src/api/mes/reportWork.js @@ -81,6 +81,14 @@ export function getLineChartData() { method: 'get' }); } + +// 获取组线每月设备故障数 +export function getGroupLineEquInfo() { + return request({ + url: '/device/deviceInterface/getGroupLineEquInfo', + method: 'get' + }); +} //查询设备小时表头 export function getHourProductionTitle(query) { return request({ @@ -115,7 +123,7 @@ export function getMesListUser(query) { method: 'get', params: query }); -} +} //查询工单列表 export function getMesListWorkOrder(query) { @@ -124,7 +132,7 @@ export function getMesListWorkOrder(query) { method: 'get', params: query }); -} +} //查询线体列表 export function getMesListEquip(query) { @@ -133,7 +141,7 @@ export function getMesListEquip(query) { method: 'get', params: query }); -} +} //报工按钮 export function reportSap(workorderCode) { const data = { diff --git a/src/views/dashboard/DeviceChartLine.vue b/src/views/dashboard/DeviceChartLine.vue new file mode 100644 index 0000000..7673e57 --- /dev/null +++ b/src/views/dashboard/DeviceChartLine.vue @@ -0,0 +1,101 @@ + + + + + + + diff --git a/src/views/index.vue b/src/views/index.vue index bb0aa0b..dc30c72 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -22,6 +22,12 @@ + + {{deviceTitle}} + + + + @@ -30,10 +36,12 @@ import LineChart from './dashboard/LineChart'; import PieChart from './dashboard/PieChart'; import PieChart2 from './dashboard/PieChart2'; -import {getLineChartData} from '@/api/mes/reportWork' +import {getGroupLineEquInfo, getLineChartData} from '@/api/mes/reportWork' +import DeviceChartLine from "./dashboard/DeviceChartLine"; export default { name: "Index", components: { + DeviceChartLine, LineChart//,PieChart,PieChart2 }, data() { @@ -41,11 +49,14 @@ export default { // 版本号 version: "1.0.0", lineChartData: null, - title:"本月工厂产量" + deviceChartLineData:null, + title:"本月工厂产量", + deviceTitle: "各组线月设备故障数" }; }, created() { this.getLineChartData(); + this.getGroupLineEquInfo(); }, methods: { goTarget(href) { @@ -55,6 +66,11 @@ export default { getLineChartData().then(data => { this.lineChartData = data; }); + }, + getGroupLineEquInfo(){ + getGroupLineEquInfo().then(response => { + this.deviceChartLineData = response.data; + }); } }, };