修改bug

This commit is contained in:
‘937886381’
2024-04-25 10:05:41 +08:00
parent 90e9b179eb
commit 87ef42e277
7 changed files with 321 additions and 482 deletions

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-29 16:50:26
* @LastEditTime: 2024-04-22 09:42:45
* @LastEditTime: 2024-04-25 09:03:50
* @LastEditors: zhp
* @Description:
-->
@@ -628,7 +628,7 @@ export default {
`<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.productArea) + '㎡' || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.wasteArea) + '㎡' || ''}</span>`,
`<div style = "${(item.product * 100).toFixed(0) >= 91 ? 'display:block;color:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(0) + '%' || ''}</div>
<div style = "${(item.product * 100).toFixed(0) <= 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(0) + '%' || ''}</div>`
<div style = "${(item.product * 100).toFixed(0) <= 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
])
this.cutConfig.data = cutArr
// this.$nextTick(() => {

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-29 13:45:56
* @LastEditTime: 2024-04-17 15:48:21
* @LastEditTime: 2024-04-24 15:48:32
* @LastEditors: zhp
* @Description:
-->
@@ -113,7 +113,7 @@ export default {
color:this.colors,
title:{
text: num,
subtext: '总数/',
subtext: '总数/',
top: '32%',
left: '49%',
textAlign: 'center',

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-04-24 14:48:00
* @LastEditTime: 2024-04-25 09:02:38
* @Description:
-->
<template>
@@ -42,21 +42,26 @@
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;">
<!-- <el-col :span="12"> -->
<!-- <div style="height: 34px;"> -->
<span style="display: inline-block;width: 330px;">
<span style="display: inline-block;width: 400px;height: 10px;">
<span class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</span>
<el-divider class="split" v-if="op.specifications" direction="vertical"></el-divider>
<el-divider class="split" v-if="op.name" direction="vertical"></el-divider>
<!-- <span v-if="op.size" class="split"></span> -->
<span v-if="op.specifications" class="orderSize" style="font-size: 14px;opacity: calc(.6);">{{
op.specifications }}</span>
<el-divider class="split" v-if="op.planQuantity" direction="vertical"></el-divider>
op.specifications }}</span>
<el-divider class="split" v-if="op.specifications" direction="vertical"></el-divider>
<span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{
op.planQuantity }}</span>
op.planQuantity }}</span>
<span v-if="op.planQuantity" class="orderFinishTwo"
style="font-size: 14px;opacity: calc(.6);"></span>
</span>
<span v-if="op.actualQuantity" class="orderFinish" style="font-size: 14px;margin-left: 130px;">{{
op.actualQuantity
}}</span>
<!-- <span style="overflow: hidden;"> -->
<span v-if="op.actualQuantity" class="orderFinish" style="font-size: 14px;margin-left: 40px;">{{
op.actualQuantity
}}</span>
<span v-if="op.actualQuantity" class="orderFinishTwo" style="font-size: 14px"></span>
<el-divider class="split" style="background-color: rgba(0, 255, 247, 1)" v-if="op.actualQuantity"
direction="vertical"></el-divider>
<!-- </span> -->
<!-- </div> -->
<el-progress style="width: 620px;" text-color="rgba(0, 255, 247, 1)" :stroke-width="10"
define-back-color="rgba(32, 57, 96, 1)" :percentage="op.progressRate" class="custom-progress-bar" />
@@ -80,7 +85,7 @@
</base-container>
</el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
<base-container :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'eqStatus'"
<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>
@@ -110,78 +115,79 @@ const qualityYearList = [
{
name: '翻转机',
code: 'EQ20240110112358000235',
status: '正常',
status: '运行',
error: true,
},
{
name: '烘干炉',
code: 'EQ20240110112537000241',
status: '计划停机',
status: '停机',
error: true,
},
{
name: '清洗机',
code: ' EQ20240110112310000232',
status: '正常',
status: '故障',
error: true,
},
{
name: '钢化清洗机',
code: 'EQ20240110111700000208',
status: '正常',
status: '故障',
error: true,
},
{
name: '固化机',
code: 'EQ20240110111700000201',
status: '正常',
status: '停机',
error: false,
},
{
name: '磨边清洗机',
code: ' EQ20240110111700000208',
status: '正常',
status: '停机',
error: true,
},
{
name: '预热机',
code: 'EQ20240110111700000205',
status: '故障',
status: '运行',
error: false,
},
{
name: '下片机',
code: 'EQ20240115151435000279',
code: 'EQ20240115151435000279',
status: '故障',
error: true,
},
{
name: '冷却机',
code: 'EQ20240110111700000203',
status: '正常',
status: '运行',
error: false,
},
{
name: 'A储片机106',
code: 'EQ20240110111700000202',
status: '正常',
status: '停机',
error: true,
},
{
name: '二次清洗机',
code: 'EQ20240110111700000209',
status: '正常',
status: '停机',
error: true,
},
{
name: '二次磨边机',
code: ' EQ20240110110927000181',
status: '正常',
status: '停机',
error: false,
},
{
name: '测试设备',
code: 'EQ20240110111700000201',
status: '正常',
status: '运行',
error: true,
},
];
@@ -292,11 +298,11 @@ export default {
// equipmentList:[],
EnergyMonitoringList: [],
eqConfig: {
header: ['序号', '设备名称', '设备编码', '设备状态', '是否故障'],
header: ['序号', '设备名称', '产线名', '设备状态'],
headerBGC: 'rgba(32, 55, 96, 0.8)',
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
columnWidth: [70, 100, 200, 90, 90],
columnWidth: [70, 130, 240, 120],
align: ['center'],
data: [],
// index:true,
@@ -373,15 +379,15 @@ export default {
this.websocketClose();
this.SJGWebsocketClose();
},
mounted() {
mounted() {
let detData = [
{
id: '1',
name: '测试工单',
name: '镀釉光伏玻璃GW',
progressRate: 0.933333,
specifications: '1100*5554*22',
plan: 11111,
actualQuantity:111,
plan: 111111111111,
actualQuantity:10000001111,
},
{
id: '2',
@@ -455,9 +461,9 @@ export default {
id: ele.id,
name: ele.name,
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
specifications: ele.specifications ? '规格' + ele.specifications :null,
planQuantity: ele.plan ? '计划' + ele.plan + '片' : null,
actualQuantity: ele.actualQuantity + '',
specifications: ele.specifications ? '规格' + ele.specifications :'',
planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan)) : '',
actualQuantity: ele.actualQuantity ?this.getStr(String(ele.actualQuantity)) : '',
};
}
});
@@ -473,16 +479,15 @@ export default {
this.EnergyMonitoringNameList,
this.EnergyMonitoringList
);
let eqArr = this.qualityYearList.map((item, index) => [
let eqArr = this.qualityYearList.map((item, index) => [
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`,
// formatDate(item.planStartTime) || '',
`
<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '正常' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:13px 10px 0 0 '}"></div> ${item.status || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0 '}"></div> ${item.error == true ? '是' : '否' || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.lineName || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0'}"></div> ${item.status || ''}</span>`,
]);
this.eqConfig.data = eqArr;
let data = [
@@ -561,6 +566,15 @@ export default {
// removeEventListener('resize', resizeFun)
// },
methods: {
getStr(str) {
//你要处理的字符串
if (str.length > 6) { //如果字符长度超过10后面的字符就变成...可自行调整长度和代替字符
str = str.substr(0, 6) + "..." //截取从第一个字符开始往后取10个字符剩余的用...代替
return str
} else {
return str
}
},
getData() {
let processArr = qualityMonthList.map((item, index) => [
// console.log(item)
@@ -746,10 +760,10 @@ export default {
`<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${
item.code || ''
item.lineName || ''
}</span>`,
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '正常' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:10px 10px 0 0 '}"></div> ${item.status || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:10px 10px 0 0 '}"></div> ${item.error == true ?'是' :'否' || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0'}"></div> ${item.status || ''}</span>`,
// `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:10px 10px 0 0 '}"></div> ${item.error == true ?'是' :'否' || ''}</span>`,
]);
this.eqConfig.data = eqArr;
// this.$nextTick(() => {
@@ -971,7 +985,7 @@ export default {
.now-secondary-title {
display: inline-block;
width: 70px;
width: 110px;
margin: 0;
font-size: 14px;
line-height: 2em;
@@ -990,16 +1004,27 @@ export default {
width: 60px;
margin: 0;
font-size: 14px;
text-align: right;
color: rgba(0, 255, 247, 1);
}
.orderFinishTwo{
display: inline-block;
width: 15px;
margin: 0;
font-size: 14px;
line-height: 2em;
// text-overflow: ellipsis;
// white-space: nowrap;
// overflow: hidden;
text-align: right;
color: rgba(0, 255, 247, 1);
}
.orderPlan {
display: inline-block;
width: 100px;
// width: 80px;
margin: 0;
font-size: 14px;
line-height: 2em;
// line-height: 2em;
color: #fff;
text-align: left;
}