修复时间格式化问题

This commit is contained in:
liaozetao
2023-11-20 10:52:04 +08:00
parent d168653061
commit 8e654d1680
2 changed files with 16 additions and 0 deletions

View File

@@ -313,6 +313,14 @@ export default {
this.editDialog = true;
},
editDialogClick() {
let startTime = this.resource.startTime;
if (startTime) {
this.resource.startTime = new Date(startTime).format("yyyy-MM-dd hh:mm:ss");
}
let endTime = this.resource.endTime;
if (endTime) {
this.resource.endTime = new Date(endTime).format("yyyy-MM-dd hh:mm:ss");
}
saveResource({
id: this.resource.id,
name: this.resource.name,

View File

@@ -274,6 +274,14 @@ export default {
this.editDialog = true;
},
editDialogClick() {
let startTime = this.resource.startTime;
if (startTime) {
this.resource.startTime = new Date(startTime).format("yyyy-MM-dd hh:mm:ss");
}
let endTime = this.resource.endTime;
if (endTime) {
this.resource.endTime = new Date(endTime).format("yyyy-MM-dd hh:mm:ss");
}
saveResource({
id: this.resource.id,
name: this.resource.name,