修复平台表单设备国标编号校验提示错误

This commit is contained in:
648540858
2024-10-29 16:06:42 +08:00
parent 5304620861
commit c2760c0067

View File

@@ -168,7 +168,7 @@ export default {
} else {
var exit = await this.deviceGBIdExit(value);
if (exit) {
callback(new Error("设备国标编号已存在"));
callback(new Error("设备国标编号格式错误或已存在"));
} else {
callback();
}
@@ -287,6 +287,18 @@ export default {
});
}
},
deviceGBIdExit: async function (deviceGbId) {
let result = false;
await this.$axios({
method:"get",
url:`/api/platform/exit/${deviceGbId}`
}).then((res)=> {
result = res.data;
}).catch((error)=> {
console.log(error);
});
return result;
},
close: function () {
this.closeEdit()
},