| | |
| | | :stroke-width="25" |
| | | stroke-linecap="butt" |
| | | class="type1" |
| | | :class="{ warn: item.data >= 85 }" |
| | | ></el-progress> |
| | | |
| | | <el-progress |
| | |
| | | :stroke-width="25" |
| | | stroke-linecap="butt" |
| | | class="type2" |
| | | :class="{ warn: item.data >= 85 }" |
| | | ></el-progress> |
| | | |
| | | <el-progress |
| | |
| | | :width="100" |
| | | :stroke-width="25" |
| | | stroke-linecap="butt" |
| | | class="type3 warn" |
| | | class="type3" |
| | | :class="{ warn: item.data >= 85 }" |
| | | ></el-progress> |
| | | |
| | | <el-progress |
| | |
| | | :stroke-width="25" |
| | | stroke-linecap="butt" |
| | | class="type4" |
| | | :class="{ warn: item.data >= 85 }" |
| | | ></el-progress> |
| | | <div class="label">{{ item.name }}</div> |
| | | </div> |
| | |
| | | <!-- 解绑弹窗 --> |
| | | <UnbindBox |
| | | v-if="showUnbindBox" |
| | | :id="ndid" |
| | | :id="id" |
| | | @close="showUnbindBox = false" |
| | | ></UnbindBox> |
| | | |
| | |
| | | <SettingBox |
| | | v-if="showSettingBox" |
| | | @close="showSettingBox = false" |
| | | :device="{ id: id, ip: ip, port: port }" |
| | | :id="id" |
| | | ></SettingBox> |
| | | |
| | | <!-- 更新弹窗 --> |
| | | <UpdateBox |
| | | v-if="showUpdateBox" |
| | | @close="closeUpdateBox" |
| | | :device="{ ip: this.ip, port: this.port }" |
| | | :id="id" |
| | | ></UpdateBox> |
| | | |
| | | <Footer :isBlack="true"></Footer> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | userId: null, |
| | | id: null, |
| | | ip: null, |
| | | port: null, |
| | | ndid: null, |
| | | time: "", |
| | | detailData: {}, |
| | | //四个环形进度条颜色 |
| | |
| | | methods: { |
| | | //获取设备详情 |
| | | async findDetail() { |
| | | this.userId = JSON.parse(sessionStorage.getItem("userInfo")).id; |
| | | this.id = this.$route.query.id; |
| | | this.ndid = this.$route.query.ndid; |
| | | this.ip = this.$route.query.ip; |
| | | this.port = this.$route.query.port; |
| | | const res = await findDevDetail({ devId: this.id }); |
| | | this.detailData = res.data; |
| | | }, |
| | | //获取版本信息 |
| | | async getVersion() { |
| | | const res = await checkVersion({ ip: this.ip, port: this.port }); |
| | | const res = await checkVersion({ nodeId: this.id }); |
| | | this.versionInfo = res.data; |
| | | }, |
| | | //获取设备性能 |
| | | async getDevicePerformance() { |
| | | const res = await showSystemStates({ ip: this.ip, port: this.port }); |
| | | const res = await showSystemStates({ |
| | | userId: this.userId, |
| | | nodeId: this.id, |
| | | }); |
| | | this.devicePerformance.push({ |
| | | data: res.data.mem.usedPercent.toString().split(".")[0], |
| | | name: "内存", |
| | |
| | | }, |
| | | //获取算法所占资源 |
| | | async showProcesses() { |
| | | const res = await showProcesses({ ip: this.ip, port: this.port }); |
| | | const res = await showProcesses({ userId: this.userId, nodeId: this.id }); |
| | | console.log(res.data); |
| | | this.deviceProcesses = res.data; |
| | | }, |
| | | //获取设备时间戳 |
| | | async getTime() { |
| | | const res = await clockInfo({ ip: this.ip, port: this.port }); |
| | | const res = await clockInfo({ userId: this.userId, nodeId: this.id }); |
| | | if (res && res.success) { |
| | | // const timezone = res.data.time_zone; |
| | | let timestamp = res.data.local_time; |
| | |
| | | type: "warning", |
| | | }) |
| | | .then(async () => { |
| | | const res = await restart({ ip: this.ip, port: this.port }); |
| | | const res = await restart({ userId: this.userId, nodeId: this.id }); |
| | | if (res.success) { |
| | | this.$notify({ |
| | | title: "成功", |
| | |
| | | margin-right: 22px; |
| | | |
| | | .label { |
| | | margin-top: 10px; |
| | | margin-top: 5px; |
| | | text-align: center; |
| | | } |
| | | |
| | |
| | | stroke: rgb(241, 215, 245); |
| | | } |
| | | .warn ::v-deep .el-progress-circle__track { |
| | | stroke: rgb(250, 215, 210); |
| | | stroke: rgb(250, 215, 210) !important; |
| | | } |
| | | } |
| | | |