Compare commits
No commits in common. "b23d7427bd87ffe830581d372bacd7c1f2a198d6" and "a74b3aa30aeb6af33f4d8b0484a38159f4852c41" have entirely different histories.
b23d7427bd
...
a74b3aa30a
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-24 15:15:24
|
* @Date: 2024-01-24 15:15:24
|
||||||
* @LastEditTime: 2024-03-11 15:51:20
|
* @LastEditTime: 2024-03-11 08:59:40
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -102,9 +102,9 @@ export default {
|
|||||||
this.proLineList.forEach(it => {
|
this.proLineList.forEach(it => {
|
||||||
if (item.lineId === it.id) {
|
if (item.lineId === it.id) {
|
||||||
item.lineName = it.name
|
item.lineName = it.name
|
||||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
|
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : null
|
||||||
item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
|
item.actualProductTrend = item.actualProductTrend ? this.multipliedByHundred(item.actualProductTrend) + '%' : null
|
||||||
item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
|
item.originalGlassPassTrend = item.originalGlassPassTrend ? this.multipliedByHundred(item.originalGlassPassTrend) * 100 + '%' : null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (item.det === false) {
|
if (item.det === false) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-12-13 14:10:04
|
* @Date: 2023-12-13 14:10:04
|
||||||
* @LastEditTime: 2024-03-11 16:10:25
|
* @LastEditTime: 2024-03-11 14:21:40
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
|
@ -81,9 +81,9 @@ export default {
|
|||||||
this.proLineList.forEach(it => {
|
this.proLineList.forEach(it => {
|
||||||
if (item.lineId === it.id) {
|
if (item.lineId === it.id) {
|
||||||
item.lineName = it.name
|
item.lineName = it.name
|
||||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
|
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : null
|
||||||
item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
|
item.actualProductTrend = item.actualProductTrend ? this.multipliedByHundred(item.actualProductTrend) + '%' : null
|
||||||
item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
|
item.originalGlassPassTrend = item.originalGlassPassTrend ? this.multipliedByHundred(item.originalGlassPassTrend) * 100 + '%' : null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (item.det === false) {
|
if (item.det === false) {
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
||||||
<el-form-item label="周" prop="reportTime">
|
<el-form-item label="周" prop="reportTime">
|
||||||
<el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
|
<el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
|
||||||
:picker-options="{firstDayOfWeek: 4}"
|
:picker-options="{firstDayOfWeek: 1}"
|
||||||
:format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp" style="width: 350px"
|
:format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp" style="width: 350px"
|
||||||
placeholder="选择周">
|
placeholder="选择周">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
@ -104,65 +104,7 @@ export default {
|
|||||||
},
|
},
|
||||||
getCurrentWeekStartTimeAndEndTime() {
|
getCurrentWeekStartTimeAndEndTime() {
|
||||||
this.reportTime = new Date()
|
this.reportTime = new Date()
|
||||||
var weekday = new Array(7);
|
this.changeTime(this.reportTime)
|
||||||
weekday[0] = "Sunday";
|
|
||||||
weekday[1] = "Monday";
|
|
||||||
weekday[2] = "Tuesday";
|
|
||||||
weekday[3] = "Wednesday";
|
|
||||||
weekday[4] = "Thursday";
|
|
||||||
weekday[5] = "Friday";
|
|
||||||
weekday[6] = "Saturday";
|
|
||||||
// console.log(weekday[this.reportTime.getDay()]);
|
|
||||||
if (weekday[this.reportTime.getDay()] === 'Monday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 4 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 3 * 24 * 60 * 60 * 1000)
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Tuesday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 5 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 2 * 24 * 60 * 60 * 1000)
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Wednesday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 6 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 1 * 24 * 60 * 60 * 1000)
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Thursday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 7 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime())
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Friday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 8 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() - 1 * 24 * 60 * 60 * 1000)
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Saturday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 9 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() - 2 * 24 * 60 * 60 * 1000)
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Sunday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 10 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 3 * 24 * 60 * 60 * 1000)
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
@ -172,9 +114,9 @@ export default {
|
|||||||
this.proLineList.forEach(it => {
|
this.proLineList.forEach(it => {
|
||||||
if (item.lineId === it.id) {
|
if (item.lineId === it.id) {
|
||||||
item.lineName = it.name
|
item.lineName = it.name
|
||||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
|
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : null
|
||||||
item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
|
item.actualProductTrend = item.actualProductTrend ? this.multipliedByHundred(item.actualProductTrend) + '%' : null
|
||||||
item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
|
item.originalGlassPassTrend = item.originalGlassPassTrend ? this.multipliedByHundred(item.originalGlassPassTrend) * 100 + '%' : null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (item.det === false) {
|
if (item.det === false) {
|
||||||
@ -194,10 +136,10 @@ export default {
|
|||||||
if(val) {
|
if(val) {
|
||||||
let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
||||||
this.startTimeStamp = this.timeFun(timeStamp - 24 * 60 * 60 * 1000); //开始时间
|
this.startTimeStamp = this.timeFun(timeStamp - 24 * 60 * 60 * 1000); //开始时间
|
||||||
this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 6); //结束时间
|
this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
||||||
console.log(this.startTimeStamp, this.endTimeStamp)
|
console.log(this.startTimeStamp, this.endTimeStamp)
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
this.listQuery.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
this.listQuery.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:01').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
} else {
|
} else {
|
||||||
this.listQuery.reportTime = []
|
this.listQuery.reportTime = []
|
||||||
}
|
}
|
||||||
|
@ -82,9 +82,9 @@ export default {
|
|||||||
this.tableData = response.data.filter(item => {
|
this.tableData = response.data.filter(item => {
|
||||||
this.proLineList.forEach(it => {
|
this.proLineList.forEach(it => {
|
||||||
if (item.lineId === it.id) {
|
if (item.lineId === it.id) {
|
||||||
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? item.originalGlassStatisticsTrend + '%' : null
|
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : null
|
||||||
item.actualProductTrend = item.actualProductTrend ? item.actualProductTrend + '%' : null
|
item.actualProductTrend = item.actualProductTrend ? this.multipliedByHundred(item.actualProductTrend) + '%' : null
|
||||||
item.originalGlassPassTrend = item.originalGlassPassTrend ? item.originalGlassPassTrend * 100 + '%' : null
|
item.originalGlassPassTrend = item.originalGlassPassTrend ? this.multipliedByHundred(item.originalGlassPassTrend) * 100 + '%' : null
|
||||||
item.lineName = it.name
|
item.lineName = it.name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-11 16:13:38
|
* @LastEditTime: 2024-03-11 15:29:49
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<el-table-column prop="inputTrend" label="增减" align="center">
|
<el-table-column prop="inputTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined}} </span>
|
<span v-else>{{ scope.row.inputTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -70,7 +70,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -91,7 +91,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend ? scope.row.missCheckTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -114,7 +114,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-11 16:16:31
|
* @LastEditTime: 2024-03-11 15:46:20
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -49,7 +49,7 @@
|
|||||||
<el-table-column prop="inputTrend" label="增减" align="center">
|
<el-table-column prop="inputTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.inputTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -72,7 +72,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -93,7 +93,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend ? scope.row.missCheckTrend +'%' : undefined }} </span>
|
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -116,8 +116,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' :undefined }}
|
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-11 17:05:50
|
* @LastEditTime: 2024-03-11 15:36:25
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -9,9 +9,11 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
|
<el-date-picker v-model="weekValue1" type="week" format="yyyy 第 WW 周" style='width:170px;'
|
||||||
:picker-options="{firstDayOfWeek: 5}" :format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
:picker-options="pickerOptionsWeek" @change="startWeek" :clearable="false" size="small" placeholder="选择周">
|
||||||
style="width: 350px" placeholder="选择周">
|
</el-date-picker>-
|
||||||
|
<el-date-picker v-model="weekValue2" type="week" format="yyyy 第 WW 周" :picker-options="pickerOptionsWeek"
|
||||||
|
style='width:170px;' @change="endWeek" :clearable="false" size="small" placeholder="选择周">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||||
@ -50,7 +52,7 @@
|
|||||||
<el-table-column prop="inputTrend" label="增减" align="center">
|
<el-table-column prop="inputTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.inputTrend + '%' }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -73,7 +75,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.goodProductTrend + '%' }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -94,7 +96,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend ? scope.row.missCheckTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.missCheckTrend + '%' }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -117,8 +119,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' : undefined }}
|
<span v-else>{{ scope.row.goodProductPassTrend + '%' }} </span>
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -157,7 +158,6 @@ import {
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
// import DialogForm from './dialogForm.vue';
|
// import DialogForm from './dialogForm.vue';
|
||||||
import { getCorePLList } from '@/api/base/coreProductionLine'
|
import { getCorePLList } from '@/api/base/coreProductionLine'
|
||||||
import { parseTime } from '../../core/mixins/code-filter';
|
|
||||||
|
|
||||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
@ -262,9 +262,7 @@ export default {
|
|||||||
urlOptions: {
|
urlOptions: {
|
||||||
exportURL: exportProductExcel
|
exportURL: exportProductExcel
|
||||||
},
|
},
|
||||||
timeTips: '',
|
timeTips:'',
|
||||||
startTimeStamp: '',
|
|
||||||
endTimeStamp: '',
|
|
||||||
// dataForm: {
|
// dataForm: {
|
||||||
// reportTime:undefined
|
// reportTime:undefined
|
||||||
// },
|
// },
|
||||||
@ -329,8 +327,7 @@ export default {
|
|||||||
// plain: true,
|
// plain: true,
|
||||||
// color: 'success',
|
// color: 'success',
|
||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
reportTime:'',
|
|
||||||
pickerOptionsWeek: {
|
pickerOptionsWeek: {
|
||||||
disabledDate(time) {
|
disabledDate(time) {
|
||||||
let day = Date.now()
|
let day = Date.now()
|
||||||
@ -379,66 +376,19 @@ export default {
|
|||||||
this.proLineList = res.data;
|
this.proLineList = res.data;
|
||||||
},
|
},
|
||||||
getCurrentWeekStartTimeAndEndTime() {
|
getCurrentWeekStartTimeAndEndTime() {
|
||||||
this.reportTime = new Date()
|
const current = new Date();
|
||||||
var weekday = new Array(7);
|
// current是本周的第几天
|
||||||
weekday[0] = "Sunday";
|
let nowDayOfWeek = current.getDay();
|
||||||
weekday[1] = "Monday";
|
if (nowDayOfWeek === 0) nowDayOfWeek = 7;
|
||||||
weekday[2] = "Tuesday";
|
const dayNum = 1 * 24 * 60 * 60 * 1000;
|
||||||
weekday[3] = "Wednesday";
|
// 获取本周星期一的时间,星期一作为一周的第一天
|
||||||
weekday[4] = "Thursday";
|
const firstDate = new Date(current.valueOf() - (nowDayOfWeek - 1) * dayNum);
|
||||||
weekday[5] = "Friday";
|
// 获取本周星期天的时间,星期天作为一周的最后一天
|
||||||
weekday[6] = "Saturday";
|
const lastDate = new Date(new Date(firstDate).valueOf() + 6 * dayNum);
|
||||||
// console.log(weekday[this.reportTime.getDay()]);
|
// return {
|
||||||
if (weekday[this.reportTime.getDay()] === 'Monday') {
|
this.weekValue1 = new Date(firstDate)
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 4 * 24 * 60 * 60 * 1000)
|
this.weekValue2 = new Date(lastDate)
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 3 * 24 * 60 * 60 * 1000)
|
// };
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Tuesday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 5 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 2 * 24 * 60 * 60 * 1000)
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Wednesday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 6 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 1 * 24 * 60 * 60 * 1000)
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Thursday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 7 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime())
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Friday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 8 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() - 1 * 24 * 60 * 60 * 1000)
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Saturday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 9 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() - 2 * 24 * 60 * 60 * 1000)
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
} else if (weekday[this.reportTime.getDay()] === 'Sunday') {
|
|
||||||
this.startTimeStamp = this.timeFun(new Date().getTime() - 10 * 24 * 60 * 60 * 1000)
|
|
||||||
this.endTimeStamp = this.timeFun(new Date().getTime() + 3 * 24 * 60 * 60 * 1000)
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
// this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 5); //结束时间
|
|
||||||
// this.changeTime(reportTime)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
@ -515,28 +465,6 @@ export default {
|
|||||||
this.$modal.msgError('更新失败');
|
this.$modal.msgError('更新失败');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeTime(val) {
|
|
||||||
console.log(val);
|
|
||||||
if (val) {
|
|
||||||
let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
|
||||||
this.startTimeStamp = this.timeFun(timeStamp - 24 * 60 * 60 * 1000); //开始时间
|
|
||||||
this.endTimeStamp = this.timeFun(timeStamp + (24 * 60 * 60 * 1000) * 6); //结束时间
|
|
||||||
console.log(this.startTimeStamp, this.endTimeStamp)
|
|
||||||
this.dataForm.reportTime[0] = parseTime(new Date(this.startTimeStamp + ' 07:00:01').getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.dataForm.reportTime[1] = parseTime(new Date(this.endTimeStamp + ' 07:00:00').getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
} else {
|
|
||||||
this.dataForm.reportTime = []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
//时间戳转为yy-mm-dd hh:mm:ss
|
|
||||||
timeFun(unixtimestamp) {
|
|
||||||
var unixtimestamp = new Date(unixtimestamp);
|
|
||||||
var year = 1900 + unixtimestamp.getYear();
|
|
||||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
|
||||||
var date = "0" + unixtimestamp.getDate();
|
|
||||||
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
|
|
||||||
},
|
|
||||||
async getDataList() {
|
async getDataList() {
|
||||||
if (this.weekValue1 && this.weekValue2) {
|
if (this.weekValue1 && this.weekValue2) {
|
||||||
this.dataForm.reportTime[0] = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' 07:00:01'
|
this.dataForm.reportTime[0] = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' 07:00:01'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-12-12 13:45:25
|
* @Date: 2023-12-12 13:45:25
|
||||||
* @LastEditTime: 2024-03-11 16:18:07
|
* @LastEditTime: 2024-03-11 15:42:42
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -52,7 +52,7 @@
|
|||||||
<el-table-column prop="inputTrend" label="增减" align="center">
|
<el-table-column prop="inputTrend" label="增减" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
<el-input v-if="!disabled" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||||
<span v-else>{{ scope.row.inputTrend ? scope.row.inputTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.inputTrend + '%' }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -75,7 +75,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductTrend ? scope.row.goodProductTrend + '%' : undefined }} </span>
|
<span v-else>{{ scope.row.goodProductTrend + '%' }} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -96,8 +96,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.missCheckTrend ? scope.row.missCheckTrend + '%' : undefined }}
|
<span v-else>{{ scope.row.missCheckTrend + '%' }} </span>
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -120,8 +119,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
<el-input v-if="!disabled" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||||
</el-input>
|
</el-input>
|
||||||
<span v-else>{{ scope.row.goodProductPassTrend ? scope.row.goodProductPassTrend + '%' : undefined }}
|
<span v-else>{{ scope.row.goodProductPassTrend + '%' }} </span>
|
||||||
</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
Loading…
Reference in New Issue
Block a user