|
@@ -217,7 +217,10 @@ export default {
|
|
|
this.item?.executorTime ||
|
|
this.item?.executorTime ||
|
|
|
"";
|
|
"";
|
|
|
if (start && end) {
|
|
if (start && end) {
|
|
|
- const range = [this.normalizeDateTime(start), this.normalizeDateTime(end)];
|
|
|
|
|
|
|
+ const range = [
|
|
|
|
|
+ this.normalizeDateTime(start),
|
|
|
|
|
+ this.normalizeDateTime(end),
|
|
|
|
|
+ ];
|
|
|
// 避免反复触发 watch 造成抖动
|
|
// 避免反复触发 watch 造成抖动
|
|
|
if (
|
|
if (
|
|
|
!Array.isArray(this.datetimerange) ||
|
|
!Array.isArray(this.datetimerange) ||
|
|
@@ -418,6 +421,18 @@ export default {
|
|
|
code: "work_hour",
|
|
code: "work_hour",
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
this.isReportTime = res.value == "1" ? true : false;
|
|
this.isReportTime = res.value == "1" ? true : false;
|
|
|
|
|
+
|
|
|
|
|
+ if (this.isReportTime) {
|
|
|
|
|
+ // 第二个时间不能为空,否则组件会显示 NAN-NAN-NAN,先用开始时间占位
|
|
|
|
|
+ const start = this.item.feedLastTime || "";
|
|
|
|
|
+ if (start) {
|
|
|
|
|
+ this.datetimerange = [start, start];
|
|
|
|
|
+ // 赋值后计算两个时间段的时间差并写入工时
|
|
|
|
|
+ this.applyDateTimeRange(this.datetimerange);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.datetimerange = [];
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
handleScan(id) {
|
|
handleScan(id) {
|