projects/mesxc-zhp #370

Merged
juzi merged 7 commits from projects/mesxc-zhp into projects/mesxc-test 2024-04-26 08:49:54 +08:00
6 changed files with 59 additions and 37 deletions

View File

@ -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-26 08:32:02
* @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,
@ -387,7 +387,7 @@ export default {
progressRate: 0.933333, progressRate: 0.933333,
specifications: '1100*5554*22', specifications: '1100*5554*22',
plan: 111111111111, plan: 111111111111,
actualQuantity:10000001111, actualQuantity:1000000111111,
}, },
{ {
id: '2', id: '2',
@ -459,11 +459,11 @@ export default {
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 :'', 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,10 +565,10 @@ 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, num) + "..." //10...
return str return str
} else { } else {
return str return str
@ -744,11 +743,11 @@ export default {
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) : '',
}; };
} }
}); });

View File

@ -170,8 +170,8 @@ export default {
mounted() { mounted() {
// this.formConfig[1].defaultSelect[] // this.formConfig[1].defaultSelect[]
this.listQuery.startTime = Date.now() this.listQuery.startTime = Date.now()
this.time = moment(new Date(Date.now())).format('YYYY-MM-DD') this.time = moment(new Date((Date.now())).setHours(8, 0, 0, 0)).format('YYYY-MM-DD HH:mm:ss') + moment(new Date(Date.now() + 24*60*60*1000).setHours(8, 0, 0, 0)).format('YYYY-MM-DD HH:mm:ss')
this.listQuery.endTime = Date.now() + 24 * 60 * 60 * 1000 this.listQuery.endTime = Date.now()
// 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.getSpanArr(this.tableData) // this.getSpanArr(this.tableData)
@ -308,7 +308,7 @@ export default {
'sj11': null, 'sj11': null,
'sj14': null, 'sj14': null,
putType: '原料投入' putType: '原料投入(kg)'
}, },
{ {
classType: 1, classType: 1,
@ -374,7 +374,7 @@ export default {
'sj11': null, 'sj11': null,
'sj14': null, 'sj14': null,
putType: '原料投入', putType: '原料投入(kg)',
}, },
{ {
classType: 2, classType: 2,
@ -440,7 +440,7 @@ export default {
'sj11': null, 'sj11': null,
'sj14': null, 'sj14': null,
putType: '原料投入', putType: '原料投入(kg)',
}, },
{ {
classType: 3, classType: 3,
@ -535,9 +535,9 @@ export default {
// Date.now() - 24 * 60 * 60 - 1000 // Date.now() - 24 * 60 * 60 - 1000
switch (val.btnName) { switch (val.btnName) {
case 'search': case 'search':
this.listQuery.startTime = val.checkTime ? val.checkTime : undefined; this.listQuery.startTime = val.checkTime ? new Date(new Date(val.checkTime).setHours(8, 0, 0, 0)).getTime() : undefined;
this.time = moment(new Date(this.listQuery.startTime)).format('YYYY-MM-DD') this.time = moment(new Date((val.checkTime)).setHours(8, 0, 0, 0)).format('YYYY-MM-DD HH:mm:ss') + moment(new Date(val.checkTime + 24 * 60 * 60 * 1000).setHours(7, 59, 59)).format('YYYY-MM-DD HH:mm:ss')
this.listQuery.endTime = val.checkTime ? val.checkTime + 24 * 60 * 60 * 1000 : undefined; this.listQuery.endTime = val.checkTime ? new Date(new Date(val.checkTime + 24 * 60 * 60 * 1000).setHours(7, 59, 59)).getTime() : undefined;
this.getDataList(); this.getDataList();
break; break;
case 'export': case 'export':
@ -551,6 +551,10 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.baseTable{
border-color: #D1D4DB;
background-color: #F2F4F9;
}
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell { ::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
background-color: #EAF1FC; background-color: #EAF1FC;
} }

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 10:01:33 * @Date: 2024-04-18 10:01:33
* @LastEditTime: 2024-04-25 13:40:51 * @LastEditTime: 2024-04-25 17:13:14
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -493,6 +493,10 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.baseTable {
border-color: #D1D4DB;
background-color: #F2F4F9;
}
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell { ::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
background-color: #EAF1FC; background-color: #EAF1FC;
} }

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 14:08:46 * @Date: 2024-04-18 14:08:46
* @LastEditTime: 2024-04-25 13:30:11 * @LastEditTime: 2024-04-25 17:13:28
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -413,6 +413,10 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.baseTable {
border-color: #D1D4DB;
background-color: #F2F4F9;
}
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell { ::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
background-color: #EAF1FC; background-color: #EAF1FC;
} }

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 10:01:33 * @Date: 2024-04-18 10:01:33
* @LastEditTime: 2024-04-25 13:40:36 * @LastEditTime: 2024-04-25 17:13:43
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -395,6 +395,11 @@ export default {
}; };
</script> </script>
<style> <style>
.baseTable {
border-color: #D1D4DB;
background-color: #F2F4F9;
}
.baseTable .el-table__body tr.current-row>td.el-table__cell { .baseTable .el-table__body tr.current-row>td.el-table__cell {
background-color: #EAF1FC; background-color: #EAF1FC;
} }

View File

@ -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 13:41:27 * @LastEditTime: 2024-04-26 08:42:00
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -67,7 +67,7 @@ const tableProps = [
}, },
{ {
prop: 'area', prop: 'area',
label: '面积' label: '面积(㎡)'
}, },
{ {
prop: 'rate', prop: 'rate',
@ -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;
@ -387,6 +389,10 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.baseTable {
border-color: #D1D4DB;
background-color: #F2F4F9;
}
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell { ::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
background-color: #EAF1FC; background-color: #EAF1FC;
} }