Merge remote-tracking branch 'origin/master'

yangwl
wws 9 months ago
commit 4b0facec07

@ -209,3 +209,10 @@ export function getPrepareList(query) {
}); });
} }
// 获取线体每月生产过程不良率
export function getLineQcData() {
return request({
url: '/quality/qcInterface/getLineQcData',
method: 'get'
});
}

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div ref="chart" style="width:50%;height:376px"></div> <div ref="chart" style="width:95%;height:300px"></div>
</div> </div>
</template> </template>
@ -56,11 +56,12 @@ export default {
bottom: '3%', bottom: '3%',
containLabel: true containLabel: true
}, },
/**
toolbox: { toolbox: {
feature: { feature: {
saveAsImage: {} saveAsImage: {}
} }
}, },**/
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: false, boundaryGap: false,

@ -18,7 +18,7 @@
}, },
width: { width: {
type: String, type: String,
default: '100%' default: '99%'
}, },
height: { height: {
type: String, type: String,
@ -41,10 +41,6 @@
watch: { watch: {
chartData: { chartData: {
deep: true, deep: true,
//handler(val) {
//debugger
//this.setOptions(val)
//}
handler(newValue,oldValue){ handler(newValue,oldValue){
this.chart.dispose(); this.chart.dispose();
this.chartData=newValue; this.chartData=newValue;

@ -0,0 +1,124 @@
<template>
<div>
<div ref="chart" style="width:95%;height:300px"></div>
</div>
</template>
<script>
import * as echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'
import {getLineQcData} from '@/api/mes/reportWork'
export default {
mixins: [resize],
props: {
className: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '99%'
},
height: {
type: String,
default: '260px'
},
autoResize: {
type: Boolean,
default: true
},
chartData: {
type: Object,
required: true
}
},
data() {
return {
chart: null
}
},
mounted() {
this.getLineQcInfo();
},
methods: {
getLineQcInfo(){
getLineQcData().then(returnData => {
const chart = this.$refs.chart
if (chart) {
const myChart = this.$echarts.init(chart)
const option = {
tooltip: {
trigger: 'axis'
},
legend: {
data: returnData.seriesNames
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
/**
toolbox: {
feature: {
saveAsImage: {}
}
},**/
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
formatter: function (params) {
let result="";
for (let i = 0; i < params.length; i++) {
if(params[i].data!=0){
result+=params[i].marker + params[i].seriesName + '' + params[i].data + '%<br>'
}
}
return params[0].name + '<br/>'
+ result
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: returnData.xAxisDatas
},
yAxis: {
type: 'value',
axisLabel: {
formatter: '{value} %'
}
},
series: returnData.seriesDatas
}
myChart.setOption(option)
window.addEventListener("resize", function() {
myChart.resize()
})
}
this.$on('hook:destroyed',()=>{
window.removeEventListener("resize", function() {
myChart.resize();
});
})
});
}
}
}
</script>

@ -12,6 +12,7 @@
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<!--
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<pie-chart ref="pieChart"/> <pie-chart ref="pieChart"/>
@ -19,14 +20,13 @@
<el-col :span="12"> <el-col :span="12">
<pie-chart ref="pieChart2"/> <pie-chart ref="pieChart2"/>
</el-col> </el-col>
</el-row> </el-row>-->
<el-divider />
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<span style="font-size: 20px;margin: 20%;color: cadetblue;">{{deviceTitle}}</span> <span style="font-size: 18px;padding: 1% 39%;color: cadetblue;">各线体设备月故障数</span>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<span style="font-size: 20px;margin: 20%;color: cadetblue;">各线体生产不良率</span> <span style="font-size: 18px;padding: 1% 39%;color: cadetblue;">各车间生产不良率</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
@ -34,7 +34,7 @@
<DeviceChartLine :chart-data="deviceChartLineData" ref="DeviceChartLine"/> <DeviceChartLine :chart-data="deviceChartLineData" ref="DeviceChartLine"/>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<DeviceChartLine :chart-data="deviceChartLineData" ref="DeviceChartLine"/> <QcChartLine :chart-data="qcChartLineData" ref="QcChartLine"/>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@ -44,12 +44,14 @@
import LineChart from './dashboard/LineChart'; import LineChart from './dashboard/LineChart';
import PieChart from './dashboard/PieChart'; import PieChart from './dashboard/PieChart';
import PieChart2 from './dashboard/PieChart2'; 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 DeviceChartLine from "./dashboard/DeviceChartLine";
import QcChartLine from "./dashboard/QcChartLine";
export default { export default {
name: "Index", name: "Index",
components: { components: {
DeviceChartLine, DeviceChartLine,
QcChartLine,
LineChart//,PieChart,PieChart2 LineChart//,PieChart,PieChart2
}, },
data() { data() {
@ -58,13 +60,13 @@ export default {
version: "1.0.0", version: "1.0.0",
lineChartData: null, lineChartData: null,
deviceChartLineData:null, deviceChartLineData:null,
title:"本月工厂产量", qcChartLineData:null,
deviceTitle: "各组线月设备故障数" title:"本月工厂产量"
}; };
}, },
created() { created() {
this.getLineChartData(); this.getLineChartData();
this.getGroupLineEquInfo();
}, },
methods: { methods: {
goTarget(href) { goTarget(href) {
@ -75,11 +77,13 @@ export default {
this.lineChartData = data; this.lineChartData = data;
}); });
}, },
/**
getGroupLineEquInfo(){ getGroupLineEquInfo(){
getGroupLineEquInfo().then(response => { getGroupLineEquInfo().then(response => {
this.deviceChartLineData = response.data; this.deviceChartLineData = response.data;
}); });
} },
**/
}, },
}; };
</script> </script>

@ -3,7 +3,7 @@
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item size="small" label="工单日期: "> <el-form-item size="small" label="工单日期: ">
<el-date-picker <el-date-picker
v-model="queryParams.productDate" v-model="queryParams.productDateStr"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
type="date" type="date"
placeholder="工单日期" placeholder="工单日期"

@ -87,9 +87,9 @@
<el-table-column label="车间名称" align="center" prop="carName" /> <el-table-column label="车间名称" align="center" prop="carName" />
<el-table-column label="机台编码" align="center" prop="machineCode" /> <el-table-column label="机台编码" align="center" prop="machineCode" />
<el-table-column label="机台名称" align="center" prop="machineName" /> <el-table-column label="机台名称" align="center" prop="machineName" />
<el-table-column label="产品编码" align="center" prop="productCode" width="120"/> <el-table-column label="产品编码" align="center" prop="productCode" width="180" :show-overflow-tooltip="true"/>
<el-table-column label="产品名称" align="center" prop="productName" width="150"/> <el-table-column label="产品名称" align="center" prop="productName" width="200" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="productSpc" /> <el-table-column label="规格型号" align="center" prop="productSpc" v-if="false"/>
<el-table-column label="派工数量" align="center" prop="quantity" /> <el-table-column label="派工数量" align="center" prop="quantity" />
<el-table-column label="报工数量" align="center" prop="quantityFeedback" /> <el-table-column label="报工数量" align="center" prop="quantityFeedback" />
<el-table-column label="单位" align="center" prop="unit" /> <el-table-column label="单位" align="center" prop="unit" />

@ -183,12 +183,16 @@
<el-table-column label="工单ID" align="center" prop="workorderId" v-if="false"/> <el-table-column label="工单ID" align="center" prop="workorderId" v-if="false"/>
<el-table-column width="150" label="子工单编号" align="center" prop="workorderCode"/> <el-table-column width="150" label="子工单编号" align="center" prop="workorderCode"/>
<el-table-column label="订单id" align="center" prop="orderId" v-if="false"/> <el-table-column label="订单id" align="center" prop="orderId" v-if="false"/>
<el-table-column width="150" label="子订单编码" align="center" prop="orderCode"/> <el-table-column width="150" label="子订单旧编码" align="center" prop="orderCode"/>
<el-table-column width="150" label="子订单新编码" align="center" prop="workorderCodeSap"/>
<el-table-column label="产品ID" align="center" prop="productId" v-if="false"/> <el-table-column label="产品ID" align="center" prop="productId" v-if="false"/>
<el-table-column width="180" label="产品编码" align="center" prop="productCode" <el-table-column width="180" label="产品编码" align="center" prop="productCode"
:formatter="productCodeFormate" :formatter="productCodeFormate"
/> />
<el-table-column width="300" label="产品名称" align="center" prop="productName"/> <el-table-column width="300" label="子产品名称" align="center" prop="productName"/>
<el-table-column width="150" label="母订单新编码" align="center" prop="pworkorderCodeSap"/>
<el-table-column width="300" label="母产品名称" align="center" prop="pproductName"/>
<el-table-column label="规格型号" align="center" prop="productSpc" v-if="false"/> <el-table-column label="规格型号" align="center" prop="productSpc" v-if="false"/>
<el-table-column width="50" label="单位" align="center" prop="unit"/> <el-table-column width="50" label="单位" align="center" prop="unit"/>
<!-- <!--

Loading…
Cancel
Save