1、将xgxt文件夹加入到.gitignore。 2、修复请假单测试流程的时间回显问题 3、删除.cursorignore
This commit is contained in:
1 parent
6207f8dea3
commit
17c6c07bb2
3 files changed
+17
-4
No files matched your search
Whitespace-only changes.
+1
-1
@@ -160,4 +160,4 @@ coverage/
|
||||
*.key
|
||||
*.crt
|
||||
*.p12
|
||||
*.keystore
|
||||
*.keystore/xgxt/
|
||||
@@ -191,9 +191,22 @@ const getInfo = () => {
|
||||
nextTick(async () => {
|
||||
const res = await getLeave(routeParams.value.id);
|
||||
Object.assign(form.value, res.data);
|
||||
leaveTime.value = [];
|
||||
leaveTime.value.push(form.value.startDate);
|
||||
leaveTime.value.push(form.value.endDate);
|
||||
console.log('res.data:', res.data);
|
||||
console.log('form.value:', form.value);
|
||||
// 为了确保 Element Plus 日期区间组件能够正确渲染,需要直接替换绑定数组引用
|
||||
// 同时将后端返回的日期统一格式化为组件要求的 "YYYY-MM-DD HH:mm:ss"
|
||||
// 后端仅返回 "YYYY-MM-DD",需要为日期补齐时间,符合 value-format="YYYY-MM-DD HH:mm:ss"
|
||||
const ensureDateTime = (dateStr: string | undefined, endFlag = false) => {
|
||||
if (!dateStr) return '';
|
||||
// 如果已包含时间段,直接返回
|
||||
if (/\d{2}:\d{2}:\d{2}$/.test(dateStr)) {
|
||||
return dateStr;
|
||||
}
|
||||
return endFlag ? `${dateStr} 23:59:59` : `${dateStr} 00:00:00`;
|
||||
};
|
||||
const start = ensureDateTime(form.value.startDate, false);
|
||||
const end = ensureDateTime(form.value.endDate, true);
|
||||
leaveTime.value = [start, end];
|
||||
loading.value = false;
|
||||
buttonLoading.value = false;
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user