修复计划时间存储到数据库中格式错误的问题

This commit is contained in:
jinchao 2025-05-09 16:49:06 +08:00
parent 9fed446a6f
commit 70fabfcb94
3 changed files with 17 additions and 3 deletions

Binary file not shown.

View File

@ -20,9 +20,12 @@ class TodoModal {
border-radius: 8px;
width: 400px;
max-width: 90%;
max-height: 90vh;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
position: relative;
margin: auto;
display: flex;
flex-direction: column;
}
.modal-header {
padding: 15px;
@ -30,6 +33,7 @@ class TodoModal {
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
}
.modal-header h3 {
margin: 0;
@ -46,6 +50,8 @@ class TodoModal {
}
.modal-body {
padding: 15px;
overflow-y: auto;
flex: 1;
}
.modal-footer {
padding: 15px;
@ -53,9 +59,12 @@ class TodoModal {
display: flex;
justify-content: flex-end;
gap: 10px;
flex-shrink: 0;
}
.form-group {
margin-bottom: 15px;
width: 100%;
box-sizing: border-box;
}
.form-group label {
display: block;
@ -63,7 +72,9 @@ class TodoModal {
color: #495057;
}
.form-group input[type="text"],
.form-group select {
.form-group select,
.form-group textarea,
.form-group input[type="datetime-local"] {
width: 100%;
padding: 8px 10px;
border: 1px solid #ddd;
@ -71,9 +82,12 @@ class TodoModal {
font-size: 14px;
margin-bottom: 5px;
background-color: white;
box-sizing: border-box;
}
.form-group input[type="text"]:focus,
.form-group select:focus {
.form-group select:focus,
.form-group textarea:focus,
.form-group input[type="datetime-local"]:focus {
border-color: #7986E7;
outline: none;
box-shadow: 0 0 0 2px rgba(121, 134, 231, 0.2);

View File

@ -1334,7 +1334,7 @@ function updateTodoStatus(id, completed, exeuser, title, text, sche_time) {
// 如果sche_time是datetime-local格式YYYY-MM-DDTHH:mm转换为数据库格式
if (scheTime.includes('T')) {
const [datePart, timePart] = scheTime.split('T');
scheTime = `${datePart} ${timePart}:00`;
scheTime = `${datePart} ${timePart}`;
}
}