优化ip显示

role1.0
fanluyan 1 year ago
parent 656a3daa8d
commit ceb665d724

@ -1584,18 +1584,18 @@ export default {
} }
if (this.tabName == "上位机信息") { if (this.tabName == "上位机信息") {
let hexArray = this.upperComputer.ip // let hexArray = this.upperComputer.ip
.toString(16) // .toString(16)
.match(/.{1,2}/g) // .match(/.{1,2}/g)
.reverse(); // .reverse();
console.log(hexArray); // console.log(hexArray);
for (let j = 0; j < hexArray.length; j++) { // for (let j = 0; j < hexArray.length; j++) {
console.log(hexArray[j]); // console.log(hexArray[j]);
console.log(parseInt(hexArray[j], 16)); // console.log(parseInt(hexArray[j], 16));
hexArray[j] = parseInt(hexArray[j], 16); // hexArray[j] = parseInt(hexArray[j], 16);
} // }
console.log(hexArray); // console.log(hexArray);
this.upperComputer.ip = hexArray.join("."); this.upperComputer.ip = this.upperComputer.ipStr;
//ip //ip
console.log(this.idParameter); console.log(this.idParameter);
} }

Loading…
Cancel
Save