From 2ec3250c83921ba91836ef8af129a74fef9d3c6a Mon Sep 17 00:00:00 2001
From: lzhe <181968431@qq.com>
Date: 星期日, 01 十二月 2024 23:30:47 +0800
Subject: [PATCH] 1
---
src/views/mdc/first-workpiece.vue | 31 +++++++++++++++----------------
1 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/src/views/mdc/first-workpiece.vue b/src/views/mdc/first-workpiece.vue
index d65bbce..fb76a12 100644
--- a/src/views/mdc/first-workpiece.vue
+++ b/src/views/mdc/first-workpiece.vue
@@ -2,7 +2,7 @@
* @Author: lzhe lzhe@example.com
* @Date: 2024-04-26 09:36:18
* @LastEditors: lzhe lzhe@example.com
- * @LastEditTime: 2024-11-25 14:24:43
+ * @LastEditTime: 2024-11-27 15:44:14
* @FilePath: /smart-web/src/views/mdc/status-record.vue
* @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
@@ -62,19 +62,14 @@
{{ convertSeconds(scope.row.firstWorkingSecs || 0) }}
</template>
</el-table-column>
- <el-table-column prop="firstWorkingSecs" label="棣栦欢鍒囧墛鏃堕棿" width="100">
+ <el-table-column prop="firstMeasureSecs" label="棣栦欢璁¢噺鏃堕棿" width="100">
<template #default="scope">
- {{ convertSeconds(scope.row.firstWorkingSecs || 0) }}
+ {{ convertSeconds(scope.row.firstMeasureSecs || 0) }}
</template>
</el-table-column>
<el-table-column prop="lastRemoveSecs" label="鏈欢鎷嗗嵏鏃堕棿" width="100">
<template #default="scope">
{{ convertSeconds(scope.row.lastRemoveSecs || 0) }}
- </template>
- </el-table-column>
- <el-table-column prop="firstMeasureSecs" label="棣栦欢璁¢噺鏃堕棿" width="100">
- <template #default="scope">
- {{ convertSeconds(scope.row.firstMeasureSecs || 0) }}
</template>
</el-table-column>
<el-table-column prop="processingSecs" label="鍔犲伐鏃堕棿" width="80">
@@ -129,7 +124,7 @@
tabPosition: "璁惧缁撴瀯鏍�",
tableData: [],
treeChecked: [],
- workstationIdList: [],
+ ids: [],
total: 0,
current: 1,
size: 20
@@ -142,7 +137,12 @@
// }
},
mounted() {
- //this.getTableData();
+ var date = new Date();
+ var threeDaysInMilliseconds = 3 * 24 * 60 * 60 * 1000;
+ var threeDaysAgo = new Date(date.getTime() - threeDaysInMilliseconds);
+ this.searchInfo.startDate = threeDaysAgo.toLocaleDateString().replace(/\//g,"-");
+ this.searchInfo.endDate = date.toLocaleDateString().replace(/\//g,"-");
+ this.getTableData();
},
methods: {
handleCurrentChange(val) {
@@ -192,7 +192,6 @@
return result.join(' ');
},
changeStartDate(val) {
- console.log(val,111)
},
searchBtn() {
if(!this.searchInfo.startDate || !this.searchInfo.endDate) {
@@ -202,7 +201,7 @@
this.getTableData();
},
getTableData() {
- this.$HTTP.post(`/workinghour/page?current=${this.current}&size=${this.size}`, this.searchInfo).then(res => {
+ this.$HTTP.post(`/api/workinghour/page?current=${this.current}&size=${this.size}`, this.searchInfo).then(res => {
if (res.code === 200) {
res.data.records.forEach((item,index)=> {
item.index = index + 1;
@@ -213,16 +212,16 @@
})
},
goFirstWorkDetail() {
- if(this.workstationIdList.length == 0) {
+ if(this.ids.length == 0) {
this.$message.error("璇峰厛閫夋嫨鏁版嵁");
return;
}
- this.$router.push({path: `/mdc/first-workpiece-detail`,query: {idList: this.workstationIdList.join(',')}})
+ this.$router.push({path: `/mdc/first-workpiece-detail`,query: {ids: this.ids.join(',')}})
},
handleSelectionChange(val) {
- this.workstationIdList = [];
+ this.ids = [];
val.forEach(item=> {
- this.workstationIdList.push(item.workstationId);
+ this.ids.push(item.id);
})
},
query() {
--
Gitblit v1.9.3