优化ip显示

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

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

Loading…
Cancel
Save