| | |
| | | import {userListNoPageByTenantId} from "@/api/system/user.js"; |
| | | import { getDeviceLedger } from "@/api/equipmentManagement/ledger"; |
| | | import { deviceMaintenanceTaskAdd, deviceMaintenanceTaskEdit } from "@/api/equipmentManagement/upkeep"; |
| | | import { getCurrentDate } from "@/utils/index.js"; |
| | | import { getCurrentDate, toDateTimeString } from "@/utils/index.js"; |
| | | import useUserStore from "@/store/modules/user.js"; |
| | | |
| | | const { proxy } = getCurrentInstance() |
| | |
| | | payload.frequencyDetail = frequencyDetail |
| | | } |
| | | |
| | | // 录入日期:直接使用表单里的 registrationDate 字段 |
| | | // 后端 LocalDateTime 字段序列化后只返回年月日,回传时需补全时分秒 |
| | | ['createTime', 'updateTime', 'nextExecutionTime', 'lastExecutionTime'].forEach(key => { |
| | | if (payload[key]) payload[key] = toDateTimeString(payload[key]) |
| | | }) |
| | | // 一些默认状态字段 |
| | | if (payload.status === undefined || payload.status === null || payload.status === '') { |
| | | payload.status = '0' // 默认状态,可按实际枚举调整 |