修改bug

This commit is contained in:
‘937886381’
2024-04-03 16:01:11 +08:00
parent 1fd547893f
commit 43e54e8ee7
19 changed files with 455 additions and 347 deletions

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-04-02 09:46:46
* @LastEditTime: 2024-04-03 15:59:25
* @Description:
-->
<template>
@@ -39,11 +39,11 @@
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
<base-container :height="318" :size="'small'" :title="'工单监控'" :title-icon="'eqMonitoring'">
<div class="order" style="width: 100%; overflow: hidden scroll; height: 350px">
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: 1em">
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em">
<!-- <el-col :span="12"> -->
<p class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</p>
<el-progress style="width: 610px;" text-color="rgba(255, 255, 255, .6)" :stroke-width="10"
<el-progress style="width: 620px;" text-color="rgba(255, 255, 255, .6)" :stroke-width="10"
define-back-color="rgba(32, 57, 96, 1)" :percentage="op.progressRate" class="custom-progress-bar" />
</el-row>
</div>
@@ -67,6 +67,13 @@
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'eqStatus'"
:title="'产线产量及良品率'" :title-icon="'productLine'">
<div class="myLegend">
<div class=" barCircleLegend"></div>
<div class=" barCircle"></div>
<h4 class="barText">产线良品率</h4>
<div class="barLegend"></div>
<h4 class="barCircleText">产线产量</h4>
</div>
<double-y-chart ref="productLineChart" :id="'doubleYChart'" :height="390" :show-legend="true" />
</base-container>
</el-col>
@@ -373,7 +380,27 @@ export default {
id: '4',
name: '测试工单4',
progressRate: 0.32323,
},
},
{
id: '4',
name: '测试工单4',
progressRate: 0.32323,
},
{
id: '4',
name: '测试工单4',
progressRate: 0.32323,
},
{
id: '4',
name: '测试工单4',
progressRate: 0.32323,
},
{
id: '4',
name: '测试工单4',
progressRate: 0.32323,
},
// {
// id: '5',
// name: '测试工单',
@@ -389,7 +416,7 @@ export default {
return {
id: ele.id,
name: ele.name,
progressRate: parseFloat((ele.progressRate * 100).toFixed(3)),
progressRate: parseFloat((ele.progressRate * 100).toFixed(2)),
};
}
});
@@ -417,28 +444,61 @@ export default {
`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`,
]);
this.eqConfig.data = eqArr;
let arr = ['D64', 'D62', 'D61', 'D63', 'D65']
// let arr = [5, 6, 2, 4, 7, 9, 15];
// 因为7个数所以长度减去一次为最大循环次数
for (let i = 0; i < arr.length - 1; i++) {
let data = [
{
lineName: 'D62',
outputNum: '11111',
passRate: '0.9873'
},
{
lineName: 'D63',
outputNum: '23212',
passRate: '0.9873'
},
{
lineName: 'D61',
outputNum: '423323',
passRate: '0.9873'
},
{
lineName: 'D64',
outputNum: '43434',
passRate: '0.9873'
},
]
let nameList = [];
let passRateList = [];
let outputNumList = [];
// let arr = ['D64', 'D62', 'D61', 'D63', 'D65']
for (let i = 0; i < data.length - 1; i++) {
// 二次循环,注意:再减去外层的循环次数,向后依次两两相互比较转换;
for (let j = 0; j < arr.length - i - 1; j++) {
for (let j = 0; j < data.length - i - 1; j++) {
// 当前一个值大于后一个值
if (arr[j].substr(arr[j].length - 1, 1) > arr[j + 1].substr(arr[j + 1].length - 1, 1)) {
if (data[j].lineName.substr(data[j].lineName.length - 1, 1) > data[j + 1].lineName.substr(data[j + 1].lineName.length - 1, 1)) {
// 定义变量,以赋值的形式前后交换,直到换到最小的在前面,左右再无比较,则循环结束形成排序结果
let temp = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = temp;
let temp = data[j];
data[j] = data[j + 1];
data[j + 1] = temp;
}
}
}
console.log(arr);
this.$refs['eqScrollBoard'].updateRows(eqArr);
this.$refs.productLineChart.initChart(
arr,
[98, 97, 98.7, 98.5, 98.3],
[3134, 2323, 3232, 3233, 2321]
);
data.forEach((ele) => {
// if (item.id == ele.productionLineId) {
// if (item.name.substr(0, 1) == "D") {
// console.log(ele)
nameList.push(ele.lineName);
outputNumList.push(ele.outputNum);
passRateList.push(ele.passRate);
// }
// }
});
this.$nextTick(() => {
this.$refs.productLineChart.initChart(
nameList,
passRateList,
outputNumList
);
})
// this.getList()
this.initWebSocket();
this.SJGInitWebSocket();
@@ -630,7 +690,7 @@ export default {
return {
id: ele.id,
name: ele.name,
progressRate: parseFloat((ele.progressRate * 100).toFixed(3)),
progressRate: parseFloat((ele.progressRate * 100).toFixed(2)),
};
}
});
@@ -661,29 +721,29 @@ export default {
let nameList = [];
let passRateList = [];
let outputNumList = [];
this.SJGWsData.detData.forEach((ele) => {
// if (item.id == ele.productionLineId) {
// if (item.name.substr(0, 1) == "D") {
// console.log(ele)
nameList.push(ele.lineName);
outputNumList.push(ele.outputNum);
passRateList.push(ele.passRate);
// }
// }
});
// let arr = ['D64', 'D62', 'D61', 'D63', 'D65']
for (let i = 0; i < nameList.length - 1; i++) {
for (let i = 0; i < this.SJGWsData.detData.length - 1; i++) {
// 二次循环,注意:再减去外层的循环次数,向后依次两两相互比较转换;
for (let j = 0; j < nameList.length - i - 1; j++) {
for (let j = 0; j < this.SJGWsData.detData.length - i - 1; j++) {
// 当前一个值大于后一个值
if (nameList[j].substr(nameList[j].length - 1, 1) > nameList[j + 1].substr(nameList[j + 1].length - 1, 1)) {
if (this.SJGWsData.detData[j].lineName.substr(this.SJGWsData.detData[j].lineName.length - 1, 1) > this.SJGWsData.detData[j + 1].lineName.substr(this.SJGWsData.detData[j + 1].lineName.length - 1, 1)) {
// 定义变量,以赋值的形式前后交换,直到换到最小的在前面,左右再无比较,则循环结束形成排序结果
let temp = nameList[j];
nameList[j] = nameList[j + 1];
nameList[j + 1] = temp;
let temp = this.SJGWsData.detData[j];
this.SJGWsData.detData[j] = this.SJGWsData.detData[j + 1];
this.SJGWsData.detData[j + 1] = temp;
}
}
}
this.SJGWsData.detData.forEach((ele) => {
// if (item.id == ele.productionLineId) {
// if (item.name.substr(0, 1) == "D") {
// console.log(ele)
nameList.push(ele.lineName);
outputNumList.push(ele.outputNum);
passRateList.push(ele.passRate);
// }
// }
});
this.$nextTick(() => {
this.$refs.productLineChart.initChart(
nameList,
@@ -742,6 +802,51 @@ export default {
</script>
<style lang="scss" scoped>
.myLegend {
position: absolute;
top: -28px;
right: 20px;
font-size: 12px;
color: rgba(255, 255, 255, .6);
.barLegend {
// float: left;
background: linear-gradient(#9DD5FF, #1295FF);
width: 10px;
height: 10px;
display: inline-block;
margin-right: 5px;
border-radius: 30%;
}
.barText {
// float: right;
display: inline-block;
margin-right: 10px;
}
.barCircleLegend {
width: 15px;
height: 1px;
background-color: rgba(255, 209, 96, 1);
position: absolute;
left: -4.1715px;
top: 21.7px;
}
.barCircle {
width: 6px;
height: 6px;
border-radius: 50%;
background-color: rgba(255, 209, 96, 1);
display: inline-block;
margin-right: 10px;
margin-bottom: 1.7px;
}
.barCircleText {
display: inline-block;
}
}
.visual-container {
width: 1920px;
height: 1080px;
@@ -815,8 +920,9 @@ export default {
background-image: linear-gradient(to right, #4573fe, #47f8dc);
}
::v-deep .el-progress__text {
width: 50px;
margin-top: -70px;
margin-left: 490px;
margin-left: 510px;
// background-color: unset;
// background-image: linear-gradient(to right, #4573fe, #47f8dc);
}