|
@@ -95,7 +95,25 @@
|
|
|
// menu: true,
|
|
|
// });
|
|
|
function rowSave(form,done,loading) {
|
|
|
- console.info(form);
|
|
|
+ const parts = form.stationIp.split('.');
|
|
|
+ if (parts.length !== 4) {
|
|
|
+ ElMessage({
|
|
|
+ message: "工位ip格式不正确",
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ loading();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ for (const part of parts) {
|
|
|
+ if (isNaN(part) || part < 0 || part > 255) {
|
|
|
+ ElMessage({
|
|
|
+ message: "工位ip格式不正确",
|
|
|
+ type: "error",
|
|
|
+ });
|
|
|
+ loading();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
createRow(form,done,loading);
|
|
|
|
|
|
}
|