-
+
{{ scope.row.goodProductPassNow }}
-
+
{{ scope.row.goodProductPassHis }}
-
+
{{ scope.row.goodProductPassTrend }}
@@ -126,7 +126,9 @@
@@ -363,9 +365,25 @@ export default {
// } else {
// this.searchBarFormConfig[0].defaultSelect = [];
// }
+ this.getCurrentWeekStartTimeAndEndTime()
this.getDataList()
},
methods: {
+ getCurrentWeekStartTimeAndEndTime() {
+ const current = new Date();
+ // current是本周的第几天
+ let nowDayOfWeek = current.getDay();
+ if (nowDayOfWeek === 0) nowDayOfWeek = 7;
+ const dayNum = 1 * 24 * 60 * 60 * 1000;
+ // 获取本周星期一的时间,星期一作为一周的第一天
+ const firstDate = new Date(current.valueOf() - (nowDayOfWeek - 1) * dayNum);
+ // 获取本周星期天的时间,星期天作为一周的最后一天
+ const lastDate = new Date(new Date(firstDate).valueOf() + 6 * dayNum);
+ // return {
+ this.weekValue1 = new Date(firstDate)
+ this.weekValue2 = new Date(lastDate)
+ // };
+ },
handleExport() {
// 处理查询参数
let params = { ...this.dataForm };
@@ -380,6 +398,7 @@ export default {
}).catch(() => { });
},
startWeek() {
+ // console.log(this.weekValue1);
if (this.weekValue1 && this.weekValue2) {
let a = new Date(this.weekValue1).getTime()
let b = new Date(this.weekValue2).getTime()
diff --git a/src/views/report/productionYearReport/index.vue b/src/views/report/productionYearReport/index.vue
index 3bb94621..441848cc 100644
--- a/src/views/report/productionYearReport/index.vue
+++ b/src/views/report/productionYearReport/index.vue
@@ -1,7 +1,7 @@
@@ -9,11 +9,9 @@
-
- -
-
+
查询
@@ -34,26 +32,26 @@
-
+
{{ scope.row.lineId }}
-
+
{{ scope.row.inputNow }}
-
+
{{ scope.row.inputHis }}
-
+
{{ scope.row.inputTrend }}
@@ -61,21 +59,21 @@
-
+
{{ scope.row.goodProductNow }}
-
+
{{ scope.row.goodProductHis }}
-
+
{{ scope.row.goodProductTrend }}
@@ -84,19 +82,19 @@
-
+
{{ scope.row.missCheckNow }}
-
+
{{ scope.row.missCheckHis }}
-
+
{{ scope.row.missCheckTrend }}
@@ -105,21 +103,21 @@
-
+
{{ scope.row.goodProductPassNow }}
-
+
{{ scope.row.goodProductPassHis }}
-
+
{{ scope.row.goodProductPassTrend }}
@@ -128,7 +126,9 @@
@@ -158,7 +158,7 @@ import {
// import Editor from '@/components/Editor';
import moment from 'moment';
// import DialogForm from './dialogForm.vue';
-
+import { parseTime } from '../../core/mixins/code-filter';
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
const tableProps = [
{
@@ -265,6 +265,9 @@ export default {
yearValue2: null,
// dynamicProps: [],
tableProps,
+ reportTime: [],
+ startTimeStamp: '',
+ endTimeStamp: '',
dataForm: {
// workOrderIdList:undefined,
// productionId: undefined,
@@ -344,7 +347,9 @@ export default {
],
};
},
- created() {
+ created() {
+ this.getCurrentYearFirst()
+
// this.getProductLineList();
},
mounted() {
@@ -366,6 +371,16 @@ export default {
this.getDataList()
},
methods: {
+ getCurrentYearFirst() {
+ let date = new Date();
+ date.setDate(1);
+ date.setMonth(0);
+ this.reportTime = date;
+ this.startTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 0, 1).getTime()); //开始时间
+ this.endTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 11, 31, 23, 59, 59).getTime()); //结束时间
+ this.dataForm.reportTime[0] = parseTime(new Date(new Date().getFullYear(), 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
+ this.dataForm.reportTime[1] = parseTime(new Date(new Date().getFullYear(), 11, 31, 23, 59, 59).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 100
+ },
handleExport() {
// 处理查询参数
let params = { ...this.dataForm };
@@ -379,34 +394,34 @@ export default {
this.exportLoading = false;
}).catch(() => { });
},
- startYear() {
- if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
- this.$modal.msgError('开始时间不能晚于结束时间,请重新选择')
- this.yearValue1 = null
- return false
- }
- if (this.yearValue1 && this.yearValue2) {
- if (this.yearValue2 - this.yearValue1 > 10 * 365 * 24 * 3600000) {
- this.$modal.msgError('最大时间范围为10年,请重新选择')
- this.yearValue1 = null
- return false
- }
- }
- },
- endYear() {
- if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
- this.$modal.msgError('结束时间不能早于开始时间,请重新选择')
- this.yearValue2 = null
- return false
- }
- if (this.yearValue1 && this.yearValue2) {
- if (this.yearValue2 - this.yearValue1 > 10 * 365 * 24 * 3600000) {
- this.$modal.msgError('最大时间范围为10年,请重新选择')
- this.yearValue2 = null
- return false
- }
- }
- },
+ // startYear() {
+ // if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
+ // this.$modal.msgError('开始时间不能晚于结束时间,请重新选择')
+ // this.yearValue1 = null
+ // return false
+ // }
+ // if (this.yearValue1 && this.yearValue2) {
+ // if (this.yearValue2 - this.yearValue1 > 10 * 365 * 24 * 3600000) {
+ // this.$modal.msgError('最大时间范围为10年,请重新选择')
+ // this.yearValue1 = null
+ // return false
+ // }
+ // }
+ // },
+ // endYear() {
+ // if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
+ // this.$modal.msgError('结束时间不能早于开始时间,请重新选择')
+ // this.yearValue2 = null
+ // return false
+ // }
+ // if (this.yearValue1 && this.yearValue2) {
+ // if (this.yearValue2 - this.yearValue1 > 10 * 365 * 24 * 3600000) {
+ // this.$modal.msgError('最大时间范围为10年,请重新选择')
+ // this.yearValue2 = null
+ // return false
+ // }
+ // }
+ // },
editDataList() {
this.disabled = false
this.isSave = true
@@ -442,15 +457,37 @@ export default {
let value = newData
return value
},
+ changeTime(val) {
+ console.log(val);
+ if (val) {
+ // let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
+ this.startTimeStamp = this.timeFun(new Date(val.getFullYear(), 0, 1).getTime()); //开始时间
+ this.endTimeStamp = this.timeFun(new Date(val.getFullYear(), 11, 31, 23, 59, 59).getTime()); //结束时间
+ this.dataForm.reportTime[0] = parseTime(new Date(val.getFullYear(), 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
+ this.dataForm.reportTime[1] = parseTime(new Date(val.getFullYear(), 11, 31, 23, 59, 59).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() {
+ console.log(this.yearValue1);
if (this.yearValue1 && this.yearValue2) {
if (this.yearValue2 < this.yearValue1) {
this.$modal.msgError('结束时间不能早于开始时间')
return false
} else {
- this.dataForm.reportTime[0] = this.transformYear(this.yearValue1)
- this.dataForm.reportTime[1] = this.transformYear(this.yearValue2)
- this.timeTips = this.transformYear(this.yearValue1) + " - " + this.transformYear(this.yearValue1)
+ // this.dataForm.reportTime[0] = this.transformYear(this.yearValue1)
+ // this.dataForm.reportTime[1] = this.transformYear(this.yearValue2)
+ // this.timeTips = this.transformYear(this.yearValue1) + " - " + this.transformYear(this.yearValue1)
}
}
this.loading = true;
From e6e280c930fcc6bfb0c30b937ed392ec14d7b538 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’>
Date: Wed, 6 Mar 2024 11:01:31 +0800
Subject: [PATCH 4/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../OperationalOverview/processingBoard.vue | 36 +++++++++----------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/views/OperationalOverview/processingBoard.vue b/src/views/OperationalOverview/processingBoard.vue
index 02d0c829..56bb1bc5 100644
--- a/src/views/OperationalOverview/processingBoard.vue
+++ b/src/views/OperationalOverview/processingBoard.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
- * @LastEditTime: 2024-02-23 16:11:48
+ * @LastEditTime: 2024-03-06 10:57:52
* @Description:
-->
@@ -637,7 +637,7 @@ export default {
this.SJGInitWebSocket()
this.getTimes()
// this.$refs.EnergyMonitoringChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [3134, 2323, 3232, 3233, 2321])
- // this.$refs.productLineChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
+ this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920
window.onresize = () => {
@@ -699,22 +699,22 @@ export default {
])
this.processConfig.data = processArr
this.$refs['processScrollBoard'].updateRows(processArr)
- if (res.data.length !==0) {
- let processArr = res.data.map((item, index) => [
- // console.log(item)
- `${index + 1 || ''}
- `,
- // formatDate(item.planStartTime) || '',
- `
- ${item.productionLineName || ''}
- `,
- `${item.sectionName || ''}`,
- `${item.count || ''}`,
- `${item.inspectionTypeName || ''}`,
- ])
- this.processConfig.data = processArr
- this.$refs['processScrollBoard'].updateRows(processArr)
- }
+ // if (res.data.length !==0) {
+ // let processArr = res.data.map((item, index) => [
+ // // console.log(item)
+ // `${index + 1 || ''}
+ // `,
+ // // formatDate(item.planStartTime) || '',
+ // `
+ // ${item.productionLineName || ''}
+ // `,
+ // `${item.sectionName || ''}`,
+ // `${item.count || ''}`,
+ // `${item.inspectionTypeName || ''}`,
+ // ])
+ // this.processConfig.data = processArr
+ // this.$refs['processScrollBoard'].updateRows(processArr)
+ // }
})
},
getTimes() {
From 39493549b972a05c4aa8898a34a1d1b8b021d0bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E2=80=98937886381=E2=80=99?= <‘937886381@qq.com’>
Date: Thu, 7 Mar 2024 16:28:23 +0800
Subject: [PATCH 5/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../OperationalOverview/processingBoard.vue | 4 +-
src/views/report/glass/day.vue | 34 +++++++++---
src/views/report/glass/inputTable.vue | 20 ++++---
src/views/report/glass/month.vue | 47 ++++++++--------
src/views/report/glass/weekly.vue | 53 +++++++++----------
src/views/report/glass/year.vue | 50 ++++++++---------
.../report/productionDayReport/index.vue | 35 ++++++++----
.../report/productionMonthReport/index.vue | 27 ++++++++--
.../productionShipmentsReport/index.vue | 21 ++++++--
.../report/productionWeekReport/index.vue | 28 +++++++---
.../report/productionYearReport/index.vue | 30 ++++++++---
11 files changed, 221 insertions(+), 128 deletions(-)
diff --git a/src/views/OperationalOverview/processingBoard.vue b/src/views/OperationalOverview/processingBoard.vue
index 56bb1bc5..d332b7e3 100644
--- a/src/views/OperationalOverview/processingBoard.vue
+++ b/src/views/OperationalOverview/processingBoard.vue
@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
- * @LastEditTime: 2024-03-06 10:57:52
+ * @LastEditTime: 2024-03-06 12:01:10
* @Description:
-->
@@ -632,12 +632,12 @@ export default {
])
this.eqConfig.data = eqArr
this.$refs['eqScrollBoard'].updateRows(eqArr)
+ this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
this.getList()
this.initWebSocket()
this.SJGInitWebSocket()
this.getTimes()
// this.$refs.EnergyMonitoringChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [3134, 2323, 3232, 3233, 2321])
- this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920
window.onresize = () => {
diff --git a/src/views/report/glass/day.vue b/src/views/report/glass/day.vue
index 844b5c83..aea1b8fc 100644
--- a/src/views/report/glass/day.vue
+++ b/src/views/report/glass/day.vue
@@ -1,7 +1,7 @@
@@ -21,7 +21,7 @@
-
@@ -92,6 +92,7 @@ const cols = [
{
prop: 'originalGlassStatisticsTrend',
label: '增减',
+ // filter:(v)=>{v + '%'}
}
]
},
@@ -111,6 +112,7 @@ const cols = [
{
prop: 'actualProductTrend',
label: '增减',
+ // filter: (v) => { v + '%' }
}
]
},
@@ -145,6 +147,10 @@ const cols = [
type: Array,
default: () => [],
},
+ date: {
+ type: String,
+ default:''
+ },
sum: {
type: Object,
default: () => {},
@@ -165,9 +171,9 @@ const cols = [
immediate: true,
handler(newv, oldv) {
if (newv[0] !== '') {
- this.cols[0].label = '许昌安彩周原片生产汇总' + '(' + newv[0] + '-' + newv[1] + ')'
+ this.cols[0].label = this.date + '(' + newv[0] + '-' + newv[1] + ')'
} else {
- this.cols[0].label = '许昌安彩周原片生产汇总'
+ this.cols[0].label = this.date
}
}
},
@@ -203,11 +209,11 @@ const cols = [
updateGlass(this.data).then(response => {
updateGlassRemark(this.sum).then(res => {
this.$modal.msgSuccess("修改成功");
- this.edit = false;
+ this.edit = false;
this.$emit("refreshDataList");
});
});
}
}
};
-
\ No newline at end of file
+
diff --git a/src/views/report/glass/month.vue b/src/views/report/glass/month.vue
index a1514fc1..0526bdf5 100644
--- a/src/views/report/glass/month.vue
+++ b/src/views/report/glass/month.vue
@@ -1,33 +1,27 @@
-
-
-
-
-
-
-
-
- 查询
- 导出
-
-
-
-
-
-
+