修改质量设备看板

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

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

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

@ -114,13 +114,13 @@
<div class="itembottom">
<div class="item-table item-table1">
<div class="titlebox2" style="margin-bottom: 14px;">
<div class="titlename">订单异常明细备份</div>
<div class="titlename">订单异常明细</div>
</div>
<table class="table-thead" border="0" cellpadding="0" cellspacing="0">
<thead>
<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>
@ -138,15 +138,16 @@
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in orderdetail">
<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.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.equipmentStatus }}</td>
<td style="width: 8%;">{{ n.quality }}</td>
<td style="width: 8%;">{{ n.checkManName }}</td>
<td style="width: 8%;">{{ n.checkName }}</td>
<td style="width: 8%;">{{ n.checkResult }}</td>
</tr>
</tbody>
</table>
<!-- </vue-seamless-scroll> -->
@ -348,7 +349,13 @@ export default {
_this.optionDatalist3 = []
response.forEach((item) => {
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.eventCount = eventCount

Loading…
Cancel
Save