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; + }); } }, };