|
|
@@ -912,9 +912,7 @@
|
|
|
this.isReportTime = res.value == '1' ? true : false;
|
|
|
|
|
|
if (this.isReportTime && this.idsList.length == 1) {
|
|
|
- this.List.forEach((item) => {
|
|
|
- item.workReportInfo.executorStartTime = item.feedLastTime;
|
|
|
- });
|
|
|
+ this.applyDefaultReportTimeWhenSingle();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
@@ -977,6 +975,16 @@
|
|
|
});
|
|
|
},
|
|
|
|
|
|
+ applyDefaultReportTimeWhenSingle() {
|
|
|
+ if (!this.isReportTime || this.idsList.length !== 1 || !this.List || this.List.length === 0) return;
|
|
|
+ const dateTime = this.getNowTime();
|
|
|
+ this.List.forEach((item, index) => {
|
|
|
+ item.workReportInfo.executorStartTime = item.feedLastTime;
|
|
|
+ this.$set(item.workReportInfo, 'executorTime', dateTime);
|
|
|
+ this.calculateWorkTimeByStartEnd(index);
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
setDefaultIdList() {
|
|
|
if (this.teamList.length != 0) {
|
|
|
this.teamId = this.teamList[0].id;
|
|
|
@@ -1462,6 +1470,9 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+ if (this.isReportTime && this.idsList.length == 1 && this.List.length > 0) {
|
|
|
+ this.applyDefaultReportTimeWhenSingle();
|
|
|
+ }
|
|
|
})
|
|
|
.finally(() => {
|
|
|
this.isLoad = true;
|