修改bug
This commit is contained in:
parent
ef3f5d3fe7
commit
be83c8196e
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-07-19 15:18:30
|
* @Date: 2021-07-19 15:18:30
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-04-25 09:02:38
|
* @LastEditTime: 2024-04-25 18:24:31
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -298,11 +298,11 @@ export default {
|
|||||||
// equipmentList:[],
|
// equipmentList:[],
|
||||||
EnergyMonitoringList: [],
|
EnergyMonitoringList: [],
|
||||||
eqConfig: {
|
eqConfig: {
|
||||||
header: ['序号', '设备名称', '产线名', '设备状态'],
|
header: ['序号', '产线名', '设备名称', '设备状态'],
|
||||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||||
columnWidth: [70, 130, 240, 120],
|
columnWidth: [70, 150, 200, 120],
|
||||||
align: ['center'],
|
align: ['center'],
|
||||||
data: [],
|
data: [],
|
||||||
// index:true,
|
// index:true,
|
||||||
@ -462,8 +462,8 @@ export default {
|
|||||||
name: ele.name,
|
name: ele.name,
|
||||||
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
|
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
|
||||||
specifications: ele.specifications ? '规格' + ele.specifications :'',
|
specifications: ele.specifications ? '规格' + ele.specifications :'',
|
||||||
planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan)) : '',
|
planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan,6)) : '',
|
||||||
actualQuantity: ele.actualQuantity ?this.getStr(String(ele.actualQuantity)) : '',
|
actualQuantity: ele.actualQuantity ?this.getStr(String(ele.actualQuantity,6)) : '',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -483,10 +483,9 @@ export default {
|
|||||||
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||||
</span>`,
|
</span>`,
|
||||||
// formatDate(item.planStartTime) || '',
|
// formatDate(item.planStartTime) || '',
|
||||||
`
|
`<span style="color:rgba(255,255,255,0.5)">${item.lineName || ''}</span>`,`
|
||||||
<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
||||||
</span>`,
|
</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>`,
|
`<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;
|
this.eqConfig.data = eqArr;
|
||||||
@ -566,9 +565,9 @@ export default {
|
|||||||
// removeEventListener('resize', resizeFun)
|
// removeEventListener('resize', resizeFun)
|
||||||
// },
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
getStr(str) {
|
getStr(str,num) {
|
||||||
//你要处理的字符串
|
//你要处理的字符串
|
||||||
if (str.length > 6) { //如果字符长度超过10,后面的字符就变成...可自行调整长度和代替字符
|
if (str.length > num) { //如果字符长度超过10,后面的字符就变成...可自行调整长度和代替字符
|
||||||
str = str.substr(0, 6) + "..." //截取从第一个字符开始,往后取10个字符,剩余的用...代替
|
str = str.substr(0, 6) + "..." //截取从第一个字符开始,往后取10个字符,剩余的用...代替
|
||||||
return str
|
return str
|
||||||
} else {
|
} else {
|
||||||
@ -743,12 +742,12 @@ export default {
|
|||||||
this.orderList = this.SJGWsData.detData.map((ele, index) => {
|
this.orderList = this.SJGWsData.detData.map((ele, index) => {
|
||||||
if (ele.progressRate && ele.progressRate != 1) {
|
if (ele.progressRate && ele.progressRate != 1) {
|
||||||
return {
|
return {
|
||||||
id: ele.id,
|
id: ele.id,
|
||||||
name: ele.name,
|
name: this.getStr(String(ele.name,8)),
|
||||||
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
|
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
|
||||||
specifications: ele.specifications ? '规格' + ele.specifications :null,
|
specifications: ele.specifications ? '规格' + ele.specifications : '',
|
||||||
planQuantity: ele.planQuantity ? '计划' + ele.planQuantity + '片' : null,
|
planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan,6)) : '',
|
||||||
actualQuantity: ele.actualQuantity ? ele.actualQuantity + '片' : null,
|
actualQuantity: ele.actualQuantity ? this.getStr(String(ele.actualQuantity,6)) : '',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-18 15:07:53
|
* @Date: 2024-04-18 15:07:53
|
||||||
* @LastEditTime: 2024-04-25 17:13:49
|
* @LastEditTime: 2024-04-25 18:50:41
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -129,7 +129,7 @@ export default {
|
|||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
param: 'checkTime',
|
param: 'checkTime',
|
||||||
defaultSelect: [new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime(), new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime() + 24 * 60 * 60 * 1000],
|
defaultSelect: [new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000, new Date(new Date(Date.now().setHours(6, 59, 59))).getTime()],
|
||||||
width: 350
|
width: 350
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -167,8 +167,8 @@ export default {
|
|||||||
created() { },
|
created() { },
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.formConfig[1].defaultSelect[]
|
// this.formConfig[1].defaultSelect[]
|
||||||
this.listQuery.startTime = new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime()
|
this.listQuery.startTime = new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000
|
||||||
this.listQuery.endTime = new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime() + 24 * 60 * 60 * 1000
|
this.listQuery.endTime = new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime()
|
||||||
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
|
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
this.getDict()
|
this.getDict()
|
||||||
@ -357,8 +357,10 @@ export default {
|
|||||||
// this.listQuery.materialId = val.materialId ? val.materialId : undefined;
|
// this.listQuery.materialId = val.materialId ? val.materialId : undefined;
|
||||||
// this.listQuery.startTime = '1706144404000';
|
// this.listQuery.startTime = '1706144404000';
|
||||||
// this.listQuery.endTime = '1706230804000';
|
// this.listQuery.endTime = '1706230804000';
|
||||||
this.listQuery.startTime = val.checkTime ? new Date(new Date(val.checkTime[0]).setHours(7, 0, 0, 0)).getTime() : undefined;
|
// this.listQuery.startTime = new Date(new Date(Date.now()).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000
|
||||||
this.listQuery.endTime = val.checkTime ? new Date(new Date(val.checkTime[1]).setHours(6, 59, 59)).getTime() + 24 * 60 * 60 * 1000 : undefined;
|
// this.listQuery.endTime = new Date(new Date(Date.now()).setHours(6, 59, 59)).getTime()
|
||||||
|
this.listQuery.startTime = val.checkTime ? new Date(new Date(val.checkTime[0]).setHours(7, 0, 0, 0)).getTime() - 24 * 60 * 60 * 1000 : undefined;
|
||||||
|
this.listQuery.endTime = val.checkTime ? new Date(new Date(val.checkTime[1]).setHours(6, 59, 59)).getTime() : undefined;
|
||||||
this.listQuery.lineId = val.lineId ? val.lineId : undefined
|
this.listQuery.lineId = val.lineId ? val.lineId : undefined
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user