时间bug修复

This commit is contained in:
hongchao 2024-12-20 16:25:32 +08:00
parent 04910ecaa9
commit a1df56f610
1 changed files with 3 additions and 1 deletions

View File

@ -1156,7 +1156,6 @@ const viewCertificate = (url:string) => {
};
const changeDate = (row:any,index:number) => {
const currentDate = new Date(row.checkDate);
console.log('1222',warningDays.value)
currentDate.setDate(currentDate.getDate() + warningDays.value);
console.log('1111',currentDate)
equipTableList.value[index].nextCheckDate = currentDate.toISOString().split('T')[0];
@ -1988,12 +1987,14 @@ const changeDate = (row:any,index:number) => {
<el-table-column
label="检修时间"
prop="checkDate"
align="center"
:show-overflow-tooltip="true"
>
<template #default="{row,$index}">
<el-date-picker
v-model="row.checkDate"
value-format="YYYY-MM-DD"
type="date"
placeholder="请选择"
@change="changeDate(row,$index)"
@ -2011,6 +2012,7 @@ const changeDate = (row:any,index:number) => {
<template #default="{row,$index}">
<el-date-picker
v-model="row.nextCheckDate"
value-format="YYYY-MM-DD"
type="date"
placeholder="请选择"
style="width: 100%"