提交 8c0d9459 authored 作者: JaxBBLL's avatar JaxBBLL

fix

上级 d8e14f7b
......@@ -2,6 +2,12 @@ import moment from "moment";
import store from "@/store";
import inspectApi from "@/api/inspect.js";
function createInspectionCode() {
return `JFXJ${moment().format("yyyyMMDDHHmmss")}${
Math.floor(Math.random() * 900) + 100
}`;
}
// 将现有机房巡检数据转换为SQL数据所需要格式
export function dataToSql(data) {
let synFlag = 0;
......@@ -16,7 +22,7 @@ export function dataToSql(data) {
}
const send = {
inspectionType: data.inspectionType,
inspectionCode: data.inspectionCode,
inspectionCode: data.inspectionCode || createInspectionCode(), // 获取最近的数据可能存在没有code的情况
recordName: `${moment().format("yyyyMMDD")}-机房巡检`,
inspectionTime: `${new Date().getTime()}`,
isException: data.isException, // 是否异常:0 否 1 是
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论