bug修复
This commit is contained in:
parent
1decab330c
commit
9b4d32420f
|
|
@ -13,6 +13,7 @@ import { useStore } from 'store/user'
|
|||
const store = useStore()
|
||||
import { mainStore } from 'store/main'
|
||||
import { InfoFilled, UploadFilled } from '@element-plus/icons-vue'
|
||||
import dayjs from 'dayjs';
|
||||
const store2 = mainStore()
|
||||
const isViewForm = ref(false)
|
||||
|
||||
|
|
@ -245,6 +246,7 @@ const getDetailData = async (row: any) => {
|
|||
examinationPdf,
|
||||
devInfoProperties,
|
||||
tableList,
|
||||
maintenanceAlarmDay,
|
||||
} = res
|
||||
|
||||
Object.assign(addAndEditForm, {
|
||||
|
|
@ -268,6 +270,7 @@ const getDetailData = async (row: any) => {
|
|||
examinationPdf,
|
||||
devInfoProperties,
|
||||
tableList,
|
||||
maintenanceAlarmDay,
|
||||
})
|
||||
|
||||
if (settleinTitle.value == '装备编辑') {
|
||||
|
|
@ -288,7 +291,9 @@ const getDetailData = async (row: any) => {
|
|||
descriptionFormList.value[0].examinationPdfs = examinationPdf
|
||||
options.value = []
|
||||
addAndEditForm.deviceTypeList = getSelectId(deviceTypeTree.value, addAndEditForm.typeId)
|
||||
warningDays.value = addAndEditForm.deviceTypeList.maintenanceAlarmDay
|
||||
warningDays.value = addAndEditForm.maintenanceAlarmDay
|
||||
// warningDays.value = addAndEditForm.deviceTypeList[addAndEditForm.deviceTypeList.length-1].data.maintenanceAlarmDay
|
||||
// warningDays.value = addAndEditForm.deviceTypeList.maintenanceAlarmDay
|
||||
propertyNames.value = addAndEditForm.devInfoProperties
|
||||
equipTableList.value = [];
|
||||
if(isEditForm.value == true){
|
||||
|
|
@ -317,6 +322,7 @@ const getDetailData = async (row: any) => {
|
|||
examinationPdf: [],
|
||||
}]
|
||||
}
|
||||
addAndEditForm.id = addAndEditForm.tableList[0].id
|
||||
}else{
|
||||
if(addAndEditForm.tableList!=null){
|
||||
addAndEditForm.tableList.forEach((item:any) =>{
|
||||
|
|
@ -1021,6 +1027,7 @@ const addAndEditForm = reactive<any>({
|
|||
examinationPdfs: [],
|
||||
devInfoProperties: [],
|
||||
tableList: [],
|
||||
id:'',
|
||||
})
|
||||
// const addAndEditFormTemp = reactive<any>()
|
||||
const uploadUrl = import.meta.env.VITE_API_URL + '/file/upload'
|
||||
|
|
@ -1198,10 +1205,11 @@ const viewCertificate = (url:string) => {
|
|||
};
|
||||
const changeDate = (row:any,index:number) => {
|
||||
const currentDate = new Date(row.checkDate);
|
||||
currentDate.setDate(currentDate.getDate() + warningDays.value);
|
||||
console.log('1111',currentDate)
|
||||
equipTableList.value[index].nextCheckDate = currentDate.toISOString().split('T')[0];
|
||||
equipTableList.value = [...equipTableList.value];
|
||||
console.log('2222',warningDays.value)
|
||||
currentDate.setDate(currentDate.getDate() + warningDays.value);
|
||||
equipTableList.value[index].nextCheckDate = dayjs(currentDate).format('YYYY-MM-DD');
|
||||
// equipTableList.value = [...equipTableList.value];
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -2104,7 +2112,7 @@ const changeDate = (row:any,index:number) => {
|
|||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" width="150px" >
|
||||
<el-table-column label="操作" align="center" width="150px" v-if="settleinTitle=='新增装备'">
|
||||
<template #default="{row,$index}">
|
||||
<div
|
||||
style="
|
||||
|
|
|
|||
Loading…
Reference in New Issue