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

pull/1669/head
648540858 2024-10-29 16:06:42 +08:00
parent 5304620861
commit c2760c0067
1 changed files with 13 additions and 1 deletions

View File

@ -168,7 +168,7 @@ export default {
} else { } else {
var exit = await this.deviceGBIdExit(value); var exit = await this.deviceGBIdExit(value);
if (exit) { if (exit) {
callback(new Error("设备国标编号已存在")); callback(new Error("设备国标编号格式错误或已存在"));
} else { } else {
callback(); 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 () { close: function () {
this.closeEdit() this.closeEdit()
}, },