修改质量设备看板

master
LAPTOP-R6EHHS26\86155 9 months ago
parent 68b81e4957
commit fbec1e41dc

@ -62,3 +62,11 @@ export function getDeviceRefreshTime(data) {
params: data params: data
}); });
} }
//字典表修改
export function getdictlist(data) {
return request({
url: '/system/dict/data/list',
method: 'get',
params: data
});
}

@ -60,8 +60,8 @@
v-for="(n, index) in equipmentlist"> v-for="(n, index) in equipmentlist">
<td style="width: 8%;">{{ index + 1 }}</td> <td style="width: 8%;">{{ index + 1 }}</td>
<td style="width: 18%;">{{ n.equipmentName }}</td> <td style="width: 18%;">{{ n.equipmentName }}</td>
<td style="width: 20%;">{{ n.department }}</td> <td style="width: 20%;">{{ n.department || '无' }}</td>
<td style="width: 10%;">{{ n.equipmentStatus }}</td> <td style="width: 10%;">{{ n.dictLabel }}</td>
<td style="width: 12%;">{{ n.failureRate != null ? n.failureRate + '%' : '--' }}</td> <td style="width: 12%;">{{ n.failureRate != null ? n.failureRate + '%' : '--' }}</td>
<td style="width: 12%;">{{ n.utilizationRatio != null ? n.utilizationRatio + '%' : '--' }}</td> <td style="width: 12%;">{{ n.utilizationRatio != null ? n.utilizationRatio + '%' : '--' }}</td>
</tr> </tr>
@ -84,7 +84,7 @@
<td style="width: 12%;">故障原因</td> <td style="width: 12%;">故障原因</td>
<td style="width: 12%;">维修组</td> <td style="width: 12%;">维修组</td>
<td style="width: 10%;">是否立即维修</td> <td style="width: 10%;">是否立即维修</td>
<td style="width: 18%;">维修时间</td> <td style="width: 18%;">计划维修时间</td>
</tr> </tr>
</thead> </thead>
@ -98,7 +98,7 @@
<td style="width: 8%;">{{ index + 1 }}</td> <td style="width: 8%;">{{ index + 1 }}</td>
<td style="width: 12%;">{{ n.equipmentName }}</td> <td style="width: 12%;">{{ n.equipmentName }}</td>
<td style="width: 12%;">{{ n.equipmentCode }}</td> <td style="width: 12%;">{{ n.equipmentCode }}</td>
<td style="width: 12%;">{{ n.equipmentLocation }}</td> <td style="width: 12%;">{{ n.equipmentLocation || '无' }}</td>
<td style="width: 12%;">{{ n.workFaultDesc }}</td> <td style="width: 12%;">{{ n.workFaultDesc }}</td>
<td style="width: 12%;">{{ n.teamName }}</td> <td style="width: 12%;">{{ n.teamName }}</td>
<td style="width: 10%;">{{ n.workHandle }}</td> <td style="width: 10%;">{{ n.workHandle }}</td>
@ -183,7 +183,8 @@
<thead> <thead>
<tr style="height: 44px;"> <tr style="height: 44px;">
<td style="width: 8%;">排名</td> <td style="width: 8%;">排名</td>
<td style="width: 12%;">设备名称</td> <td style="width: 15%;">设备名称</td>
<td style="width: 8%;">设备编码</td>
<td style="width: 12%;">MTBF</td> <td style="width: 12%;">MTBF</td>
</tr> </tr>
@ -196,7 +197,8 @@
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index" <tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in equipmentstabilizelist"> v-for="(n, index) in equipmentstabilizelist">
<td style="width: 8%;">{{ index + 1 }}</td> <td style="width: 8%;">{{ index + 1 }}</td>
<td style="width: 12%;">{{ n.equipmentCode }}</td> <td style="width: 15%;">{{ n.equipmentName }}</td>
<td style="width: 8%;">{{ n.equipmentCode }}</td>
<td style="width: 12%;">{{ n.mtbf != null ? n.mtbf + 'h' : '--' }}</td> <td style="width: 12%;">{{ n.mtbf != null ? n.mtbf + 'h' : '--' }}</td>
</tr> </tr>
</tbody> </tbody>
@ -213,6 +215,7 @@
<tr style="height: 44px;"> <tr style="height: 44px;">
<td style="width: 8%;">排名</td> <td style="width: 8%;">排名</td>
<td style="width: 12%;">设备名称</td> <td style="width: 12%;">设备名称</td>
<td style="width: 12%;">设备编码</td>
<td style="width: 12%;">设备OEE</td> <td style="width: 12%;">设备OEE</td>
</tr> </tr>
@ -226,6 +229,7 @@
v-for="(n, index) in equipmentrepairlist"> v-for="(n, index) in equipmentrepairlist">
<td style="width: 8%;">{{ index + 1 }}</td> <td style="width: 8%;">{{ index + 1 }}</td>
<td style="width: 12%;">{{ n.equipmentName }}</td> <td style="width: 12%;">{{ n.equipmentName }}</td>
<td style="width: 12%;">{{ n.equipmentCode }}</td>
<td style="width: 12%;">{{ n.rapairQuantity != null ? n.rapairQuantity + '%' : '--' }}</td> <td style="width: 12%;">{{ n.rapairQuantity != null ? n.rapairQuantity + '%' : '--' }}</td>
</tr> </tr>
</tbody> </tbody>
@ -252,6 +256,7 @@ import {
equipmentIntactRate, equipmentIntactRate,
equipmentStability, equipmentStability,
getDeviceRefreshTime, getDeviceRefreshTime,
getdictlist,
} from "@/api/kanban/equipment"; } from "@/api/kanban/equipment";
import * as echarts from "echarts"; import * as echarts from "echarts";
import moment from "moment"; import moment from "moment";
@ -290,29 +295,14 @@ export default {
colorlist: ["#005aff", "#f8b551"], colorlist: ["#005aff", "#f8b551"],
datetime: null, datetime: null,
time1: null, time1: null,
getlist: [ getlist: [],
{
},
{
},
{
},
{
},
{
},
],
repairlist: [], repairlist: [],
equipmentlist: [], equipmentlist: [],
equipmentrepairlist: [], equipmentrepairlist: [],
equipmentstabilizelist: [], equipmentstabilizelist: [],
equipmentinfo: [], equipmentinfo: [],
RefreshTime:null, RefreshTime:null,
dictlist:[],
}; };
}, },
created() { created() {
@ -326,6 +316,7 @@ export default {
//console.log('zhuanhuahou',this.dateRangeone) //console.log('zhuanhuahou',this.dateRangeone)
this.selectFactorylist(); this.selectFactorylist();
this.getdictlist()
this.gettime(); this.gettime();
}, },
methods: { methods: {
@ -338,6 +329,17 @@ export default {
this.gettimedata = moment().format("YYYY-MM-DD HH:mm:ss "); this.gettimedata = moment().format("YYYY-MM-DD HH:mm:ss ");
}, 1000); }, 1000);
}, },
getdictlist(){
getdictlist({
pageNum: 1,
pageSize: 10,
dictType: 'equipment_status',
}).then((response) => {
if (response) {
this.dictlist = response.rows
}
});
},
selectFactorylist() { selectFactorylist() {
const _this = this; const _this = this;
getBoardFactory({ getBoardFactory({
@ -383,6 +385,11 @@ export default {
if (response.data) { if (response.data) {
_this.equipmentlist = response.data _this.equipmentlist = response.data
_this.equipmentlist.forEach((item) => { _this.equipmentlist.forEach((item) => {
_this.dictlist.forEach((m) => {
if(item.equipmentStatus == m.dictValue){
item.dictLabel = m.dictLabel
}
});
if (item.failureRate) { if (item.failureRate) {
item.failureRate = item.failureRate.toFix(2) item.failureRate = item.failureRate.toFix(2)
} }

@ -123,7 +123,7 @@
<div class="icon"> <div class="icon">
</div> </div>
<div class="itemname1"> <div class="itemname1" style="max-width: 210px;">
{{ n.projectName }} {{ n.projectName }}
</div> </div>
@ -448,80 +448,83 @@ export default {
let dataoption = []; let dataoption = [];
let totalArr = []; let totalArr = [];
_this.optionDatalist3 = []; _this.optionDatalist3 = [];
response = [{ name: "1月", code: "100", value: '100', }] console.log(response)
if (response.length > 0) { for (let index = 0; index < response.month.length; index++) {
response.forEach((item) => { let a = {};
let a = {}; response.month[index] = moment(response.month[index]).format('MM')
a.name = item.equName; a.name = response.month[index] + '月'
a.value = item.monthData; a.value = response.monthData[index]
a.code = item.equCode; a.code = response.monthData[index]
_this.optionDatalist3.push(a); dataoption.push(a);
dataoption.push(a); numberlist.push(response.monthData[index]);
numberlist.push(item.monthData); }
}); // dataoption.sort((a, b) => {
dataoption.sort((a, b) => { // return a.value - b.value;
return a.value - b.value; // });
}); dataoption = dataoption.reverse()
let max = Math.max(...numberlist); let max = Math.max(...numberlist);
max = max + 100; max = max + 100;
dataoption.forEach((item) => { dataoption.forEach((item) => {
totalArr.push(max); totalArr.push(max);
}); });
option3 = { console.log(dataoption, numberlist)
yAxis: [ // response = [{ name: "1", code: "100", value: '100', }]
{ // if (response.length > 0) {
data: dataoption, option3 = {
}, yAxis: [
], {
series: [ data: dataoption,
{ },
data: dataoption, ],
itemStyle: { series: [
normal: { {
color: function (params) { data: dataoption,
var index_num = params.value; itemStyle: {
normal: {
for (var i = 0; i < dataoption.length; i++) { color: function (params) {
//1 var index_num = params.value;
if (index_num > 1131) {
//var colorList = ['#ff7f50', '#87cefa', '#da70d6', '#32cd32', '#6495ed', '#ff69b4', '#ba55d3', '#cd5c5c', '#ffa500', '#40e0d0']; for (var i = 0; i < dataoption.length; i++) {
//return colorList[params.dataIndex]; //1
return new echarts.graphic.LinearGradient( if (index_num > 1131) {
0, //var colorList = ['#ff7f50', '#87cefa', '#da70d6', '#32cd32', '#6495ed', '#ff69b4', '#ba55d3', '#cd5c5c', '#ffa500', '#40e0d0'];
0, //return colorList[params.dataIndex];
1, return new echarts.graphic.LinearGradient(
0, 0,
[ 0,
{ offset: 0, color: "#FFB742" }, 1,
{ offset: 1, color: "#FFB742" }, 0,
] [
); { offset: 0, color: "#FFB742" },
} else { { offset: 1, color: "#FFB742" },
//var colorList = ['blue']; ]
//return colorList[params.dataIndex]; );
return new echarts.graphic.LinearGradient( } else {
0, //var colorList = ['blue'];
0, //return colorList[params.dataIndex];
1, return new echarts.graphic.LinearGradient(
0, 0,
[ 0,
{ offset: 0, color: "#005954" }, 1,
{ offset: 1, color: "#66E1DF" }, 0,
] [
); { offset: 0, color: "#005954" },
} { offset: 1, color: "#66E1DF" },
]
);
} }
}, }
}, },
}, },
}, },
{ },
data: totalArr, {
}, data: totalArr,
], },
}; ],
myChart3.setOption(option3); };
} myChart3.setOption(option3);
// }
} }
}); });
var myChart5 = echarts.init(document.querySelector("#echart5")); var myChart5 = echarts.init(document.querySelector("#echart5"));
@ -581,7 +584,7 @@ export default {
yAxis: [ yAxis: [
{ {
type: 'value', type: 'value',
name: '万元', name: '',
nameTextStyle: { nameTextStyle: {
color: '#D0DEEE' color: '#D0DEEE'
}, },
@ -618,33 +621,38 @@ export default {
}).then((response) => { }).then((response) => {
if (response) { if (response) {
let seriesmyChart5 = [] let seriesmyChart5 = []
let legenddata = []
let dataoption = response.series; let dataoption = response.series;
let xAxisdata = response.dayStr let xAxisdata = response.dayStr
let yAxismax = [] let yAxismax = []
let yAxismaxall = 0 let yAxismaxall = 0
dataoption.forEach((n) => { dataoption.forEach((n) => {
if (e.data) { if (n.data) {
console.log(Math.max(e.data), e.data) console.log(Math.max(...n.data), n.data)
yAxismax.push(Math.max(...e.datax)) yAxismax.push(Math.max(...n.data))
} }
var item = { var item = {
name: e.planktonname, name: n.machineName,
data: e.data, data: n.data,
emphasis: { emphasis: {
focus: 'series' focus: 'series'
}, },
type: "bar", type: "bar",
stack: e.planktonname, stack: n.machineName,
} }
legenddata.push(n.machineName)
seriesmyChart5.push(item); seriesmyChart5.push(item);
}); });
yAxismaxall = Math.max(...yAxismax) + 5 yAxismaxall = Math.max(...yAxismax) + 5
myChart5 = { option5 = {
xAxis: [ xAxis: [
{ {
data: xAxisdata, data: xAxisdata,
}, },
], ],
legend:{
data:legenddata
},
yAxis: [ yAxis: [
{ {
max: yAxismaxall max: yAxismaxall
@ -652,6 +660,7 @@ export default {
], ],
series: seriesmyChart5 series: seriesmyChart5
}; };
console.log(seriesmyChart5,'111111111111111')
myChart5.setOption(option5); myChart5.setOption(option5);
} }
}); });
@ -666,8 +675,13 @@ export default {
containLabel: true containLabel: true
}, },
tooltip: { tooltip: {
show: true, trigger: 'axis',
trigger: 'item' axisPointer: {
type: 'cross',
crossStyle: {
color: '#999'
}
}
}, },
legend: { legend: {
show: true, show: true,
@ -779,9 +793,28 @@ export default {
yAxisIndex: 1, yAxisIndex: 1,
itemStyle: { itemStyle: {
normal: { normal: {
color: '#00d4c7', color: '#5260CE',
lineStyle: { lineStyle: {
color: "#00d4c7", color: "#5260CE",
width: 1
},
}
},
data: []
},
{
name: '不合格比例',
type: 'line',
stack: '总量',
symbol: 'circle',
symbolSize: 8,
yAxisIndex: 1,
itemStyle: {
normal: {
color: '#88E4E3',
lineStyle: {
color: "#88E4E3",
width: 1 width: 1
}, },
@ -809,6 +842,27 @@ export default {
) )
} }
}, },
},
{
name: '不合格数量',
data: [],
type: 'bar',
showBackground: true,
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
},
itemStyle: {
normal: {
barBorderRadius: 5,
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1,
[
{ offset: 0, color: "#66E1DF" },
{ offset: 1, color: "#005954" },
]
)
}
},
} }
] ]
@ -819,10 +873,27 @@ export default {
factoryCode: 'ds_' + _this.selectxt, factoryCode: 'ds_' + _this.selectxt,
}).then((response) => { }).then((response) => {
if (response) { if (response) {
let seriesdata1 = response[0].data let seriesdata1 = response[0].dataBarArrays
let seriesdata2 = response[0].dataStr let seriesdata2 = response[0].dataLineArrays
let xAxisdata = response[0].dayStr let xAxisdata = response[0].dayStr
let yAxismax = Math.max(...seriesdata1) + 5 let seriesdata3 = response[1].dataBarArrays
let seriesdata4 = response[1].dataLineArrays
let max1 = Math.max(...seriesdata1) + 5
let max2 = Math.max(...seriesdata3) + 5
let max3 = Math.max(...seriesdata2) + 5
let max4 = Math.max(...seriesdata4) + 5
let yAxismax1 = 0
let yAxismax2 = 0
if (max1 > max2) {
yAxismax1 = max1
} else {
yAxismax1 = max2
}
if (max3 > max4) {
yAxismax2 = max3
} else {
yAxismax2 = max4
}
option6 = { option6 = {
xAxis: [ xAxis: [
{ {
@ -831,15 +902,24 @@ export default {
], ],
yAxis: [ yAxis: [
{ {
max: yAxismax max: yAxismax1
},
{
max: yAxismax2
} }
], ],
series: [ series: [
{ {
data: seriesdata2, data: seriesdata2,
}, },
{
data: seriesdata4,
},
{ {
data: seriesdata1, data: seriesdata1,
},
{
data: seriesdata3,
} }
] ]
}; };
@ -853,14 +933,14 @@ export default {
let intactRate = 0 let intactRate = 0
let numberAngle = 360 let numberAngle = 360
let intactRate1 = 0 let intactRate1 = 0
let numberAngle2 = 360 let numberAngle1 = 360
if (_this.equipmentinfo.todayOkRate) { if (_this.equipmentinfo.todayOkRate) {
intactRate = _this.equipmentinfo.todayOkRate intactRate = parseFloat(_this.equipmentinfo.todayOkRate)
numberAngle = (100 - parseInt(_this.equipmentinfo.intactRate)) * 3.6 numberAngle = (100 - parseInt(_this.equipmentinfo.todayOkRate)) * 3.6
} }
if (_this.equipmentinfo.monthOkRate) { if (_this.equipmentinfo.monthOkRate) {
intactRate1 = _this.equipmentinfo.monthOkRate intactRate1 = parseFloat(_this.equipmentinfo.monthOkRate)
numberAngle2 = (100 - parseInt(_this.equipmentinfo.monthOkRate)) * 3.6 numberAngle1 = (100 - parseInt(_this.equipmentinfo.monthOkRate)) * 3.6
} }
var myChart1 = echarts.init(document.querySelector("#echart1")); var myChart1 = echarts.init(document.querySelector("#echart1"));
var option1 = { var option1 = {
@ -1159,7 +1239,7 @@ export default {
// 090180 // 090180
startAngle: 360, startAngle: 360,
// //
endAngle: numberAngle, endAngle: numberAngle1,
center: ["50%", "50%"], center: ["50%", "50%"],
//线 //线
name: "内层盘", name: "内层盘",
@ -1285,7 +1365,7 @@ export default {
}, },
data: [ data: [
{ {
value: intactRate, value: intactRate1,
}, },
], ],
@ -1740,6 +1820,7 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-container { .app-container {
padding: 0px 24px; padding: 0px 24px;

@ -114,13 +114,13 @@
<div class="itembottom"> <div class="itembottom">
<div class="item-table item-table1"> <div class="item-table item-table1">
<div class="titlebox2" style="margin-bottom: 14px;"> <div class="titlebox2" style="margin-bottom: 14px;">
<div class="titlename">订单异常明细备份</div> <div class="titlename">订单异常明细</div>
</div> </div>
<table class="table-thead" border="0" cellpadding="0" cellspacing="0"> <table class="table-thead" border="0" cellpadding="0" cellspacing="0">
<thead> <thead>
<tr style="height: 44px;"> <tr style="height: 44px;">
<td style="width: 8%;">序号</td> <td style="width: 8%;">序号</td>
<td style="width: 8%;">异常单号</td> <!-- <td style="width: 8%;">异常单号</td> -->
<td style="width: 8%;">物料名称</td> <td style="width: 8%;">物料名称</td>
<td style="width: 8%;">订单号</td> <td style="width: 8%;">订单号</td>
<td style="width: 8%;">来料时间</td> <td style="width: 8%;">来料时间</td>
@ -138,15 +138,16 @@
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index" <tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in orderdetail"> v-for="(n, index) in orderdetail">
<td style="width: 8%;">{{ index + 1 }}</td> <td style="width: 8%;">{{ index + 1 }}</td>
<td style="width: 8%;">{{ n.orderNo }}</td> <!-- <td style="width: 8%;">{{ n.orderNo }}</td> -->
<td style="width: 8%;">{{ n.materialName }}</td> <td style="width: 8%;">{{ n.materialName }}</td>
<td style="width: 8%;">{{ n.orderNo }}</td> <td style="width: 8%;">{{ n.orderNo }}</td>
<td style="width: 8%;">{{ n.failureRate }}</td> <td style="width: 8%;">{{ n.checkTime }}</td>
<td style="width: 8%;">{{ n.incomeTime }}</td> <td style="width: 8%;">{{ n.incomeTime }}</td>
<td style="width: 8%;">{{ n.equipmentStatus }}</td> <td style="width: 8%;">{{ n.quality }}</td>
<td style="width: 8%;">{{ n.checkManName }}</td> <td style="width: 8%;">{{ n.checkManName }}</td>
<td style="width: 8%;">{{ n.checkName }}</td> <td style="width: 8%;">{{ n.checkResult }}</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<!-- </vue-seamless-scroll> --> <!-- </vue-seamless-scroll> -->
@ -348,7 +349,13 @@ export default {
_this.optionDatalist3 = [] _this.optionDatalist3 = []
response.forEach((item) => { response.forEach((item) => {
areaName.push(item.supplierName) areaName.push(item.supplierName)
eventCount.push(parseInt(item.quality)) if( item.quality == null){
item.quality= 0
eventCount.push(parseInt(item.quality))
}else{
eventCount.push(parseInt(item.quality))
}
}); });
a.areaName = areaName a.areaName = areaName
a.eventCount = eventCount a.eventCount = eventCount

Loading…
Cancel
Save