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

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; border-radius: 8px;
width: 400px; width: 400px;
max-width: 90%; max-width: 90%;
max-height: 90vh;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
position: relative; position: relative;
margin: auto; margin: auto;
display: flex;
flex-direction: column;
} }
.modal-header { .modal-header {
padding: 15px; padding: 15px;
@ -30,6 +33,7 @@ class TodoModal {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
flex-shrink: 0;
} }
.modal-header h3 { .modal-header h3 {
margin: 0; margin: 0;
@ -46,6 +50,8 @@ class TodoModal {
} }
.modal-body { .modal-body {
padding: 15px; padding: 15px;
overflow-y: auto;
flex: 1;
} }
.modal-footer { .modal-footer {
padding: 15px; padding: 15px;
@ -53,9 +59,12 @@ class TodoModal {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
gap: 10px; gap: 10px;
flex-shrink: 0;
} }
.form-group { .form-group {
margin-bottom: 15px; margin-bottom: 15px;
width: 100%;
box-sizing: border-box;
} }
.form-group label { .form-group label {
display: block; display: block;
@ -63,7 +72,9 @@ class TodoModal {
color: #495057; color: #495057;
} }
.form-group input[type="text"], .form-group input[type="text"],
.form-group select { .form-group select,
.form-group textarea,
.form-group input[type="datetime-local"] {
width: 100%; width: 100%;
padding: 8px 10px; padding: 8px 10px;
border: 1px solid #ddd; border: 1px solid #ddd;
@ -71,9 +82,12 @@ class TodoModal {
font-size: 14px; font-size: 14px;
margin-bottom: 5px; margin-bottom: 5px;
background-color: white; background-color: white;
box-sizing: border-box;
} }
.form-group input[type="text"]:focus, .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; border-color: #7986E7;
outline: none; outline: none;
box-shadow: 0 0 0 2px rgba(121, 134, 231, 0.2); 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转换为数据库格式 // 如果sche_time是datetime-local格式YYYY-MM-DDTHH:mm转换为数据库格式
if (scheTime.includes('T')) { if (scheTime.includes('T')) {
const [datePart, timePart] = scheTime.split('T'); const [datePart, timePart] = scheTime.split('T');
scheTime = `${datePart} ${timePart}:00`; scheTime = `${datePart} ${timePart}`;
} }
} }