| | |
| | | }); |
| | | |
| | | const values = inputData.map((item) => item.value); |
| | | // console.log(values) |
| | | if (values.length > 0) { |
| | | |
| | | |
| | | if (!(values[1] == "1" || values[1] == "2")) { |
| | | values.shift(); |
| | | this.$message.error("Out of range"); |
| | | return false; |
| | | } |
| | | // if (!(values[2] < "380" ) ) { |
| | | // values.shift(); |
| | | // this.$message.error("Out of range"); |
| | | // return false; |
| | | // } |
| | | |
| | | |
| | | |
| | | if (!(values[4] >= "1" && values[4] <= "210") && values[4] !== "1000") { |
| | | values.shift(); |
| | | this.$message.error("Out of range"); |
| | | return false; |
| | | } |
| | | if (!(values[5] >= "1" && values[5] <= "210") && values[5] !== "1000") { |
| | | values.shift(); |
| | | this.$message.error("Out of range"); |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | |
| | | data.push(values); |
| | | } |
| | | |
| | |
| | | }); |
| | | |
| | | const values = inputData.map((item) => item.value); |
| | | |
| | | data.push(values); |
| | | const pattern = /^[\w ]{1,14}$/; // 匹配长度为14的数字、字母、空格的组合 |
| | | if (!pattern.test(values[0])) { |
| | | values.shift(); |
| | | this.$message.error("Please enter a 14-character string."); |
| | | return false; |
| | | } |
| | | data.push(values); |
| | | } |
| | | data.push([], [], []); |
| | | |
| | |
| | | |
| | | const values2 = inputData.map((item) => item.value); |
| | | |
| | | if (values2.length > 0) { |
| | | |
| | | |
| | | |
| | | if (!(values2[1] >= "1" && values2[1] <= "210") && values2[1] !== "1000") { |
| | | values2.shift(); |
| | | this.$message.error("Out of range"); |
| | | return false; |
| | | } |
| | | if (!(values2[2] >= "1" && values2[2] <= "210") && values2[2] !== "1000") { |
| | | values2.shift(); |
| | | this.$message.error("Out of range"); |
| | | return false; |
| | | } |
| | | if (!(values2[3] == "1" || values2[3] == "2")) { |
| | | values2.shift(); |
| | | this.$message.error("Out of range"); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | data2.push(values2); |
| | | } |
| | | data2.unshift([]); |
| | |
| | | }); |
| | | |
| | | const values2 = inputData.map((item) => item.value); |
| | | |
| | | const pattern = /^[\w ]{1,14}$/; // 匹配长度为14的数字、字母、空格的组合 |
| | | if (!pattern.test(values2[0])) { |
| | | values2.shift(); |
| | | this.$message.error("Please enter a 14-character string."); |
| | | return false; |
| | | } |
| | | data2.push(values2); |
| | | data2.push([], [], []); |
| | | } |