|
|
|
@ -3,7 +3,7 @@ |
|
|
|
|
|
|
|
<!-- 服务器列表 可循环 --> |
|
|
|
<div class="ds_list" v-for="(item,index) in sysdata" :key="index"> |
|
|
|
<span class="dstit">{{index+1}} {{ sclist[index] }} 服务器概况</span> |
|
|
|
<span class="dstit">{{index+1}} {{ item.plat }} 服务器概况</span> |
|
|
|
|
|
|
|
<div class="dsinfo"> |
|
|
|
<a href="" class="dsbtn green">文件同步</a> |
|
|
|
@ -88,34 +88,25 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.mutSys() |
|
|
|
this.getSysinfo() |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
// 获取服务器系统信息 |
|
|
|
getSysinfo(host) { |
|
|
|
SysApi.Sysinfo(host).then(res => { |
|
|
|
// 将base64转为二进制 |
|
|
|
let afbin= base64ToUint8Array(res.data) |
|
|
|
// 将二进制解析 |
|
|
|
let data = scinfo.decodeHdinfo(afbin) |
|
|
|
// 绑定到对象中 |
|
|
|
//this.sysdata = data |
|
|
|
this.sysdata.push(data) |
|
|
|
|
|
|
|
getSysinfo() { |
|
|
|
SysApi.Sysinfo().then(res => { |
|
|
|
const syslist = res.data.slist |
|
|
|
// 遍历slist 然后解密 |
|
|
|
syslist.forEach(item => { |
|
|
|
let afbin= base64ToUint8Array(item) |
|
|
|
// 将二进制解析 |
|
|
|
let data = scinfo.decodeHdinfo(afbin) |
|
|
|
// 绑定到对象中 |
|
|
|
this.sysdata.push(data) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// |
|
|
|
mutSys(){ |
|
|
|
let chost=['http://127.0.0.1:9099','http://192.168.66.92:9099','http://192.168.66.16:9098'] |
|
|
|
//服务器列表 |
|
|
|
this.sclist = chost |
|
|
|
// |
|
|
|
for(let i=0;i<chost.length;i++){ |
|
|
|
this.getSysinfo(chost[i]) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|