ZZJ
2022-04-12 994e5e08cba4e6b9ce321b7cf5cb1ec8d19dfa22
src/views/equipmentManagement/equipmentDetail/index.vue
@@ -62,6 +62,7 @@
                    :stroke-width="25"
                    stroke-linecap="butt"
                    class="type1"
                    :class="{ warn: item.data >= 85 }"
                  ></el-progress>
                  <el-progress
@@ -73,6 +74,7 @@
                    :stroke-width="25"
                    stroke-linecap="butt"
                    class="type2"
                    :class="{ warn: item.data >= 85 }"
                  ></el-progress>
                  <el-progress
@@ -83,7 +85,8 @@
                    :width="100"
                    :stroke-width="25"
                    stroke-linecap="butt"
                    class="type3 warn"
                    class="type3"
                    :class="{ warn: item.data >= 85 }"
                  ></el-progress>
                  <el-progress
@@ -95,6 +98,7 @@
                    :stroke-width="25"
                    stroke-linecap="butt"
                    class="type4"
                    :class="{ warn: item.data >= 85 }"
                  ></el-progress>
                  <div class="label">{{ item.name }}</div>
                </div>
@@ -250,7 +254,7 @@
    <!-- 解绑弹窗 -->
    <UnbindBox
      v-if="showUnbindBox"
      :id="ndid"
      :id="id"
      @close="showUnbindBox = false"
    ></UnbindBox>
@@ -258,14 +262,14 @@
    <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>
@@ -305,10 +309,8 @@
  },
  data() {
    return {
      userId: null,
      id: null,
      ip: null,
      port: null,
      ndid: null,
      time: "",
      detailData: {},
      //四个环形进度条颜色
@@ -339,21 +341,22 @@
  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: "内存",
@@ -391,13 +394,13 @@
    },
    //获取算法所占资源
    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;
@@ -432,7 +435,7 @@
        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: "成功",
@@ -562,7 +565,7 @@
            margin-right: 22px;
            .label {
              margin-top: 10px;
              margin-top: 5px;
              text-align: center;
            }
@@ -598,7 +601,7 @@
        stroke: rgb(241, 215, 245);
      }
      .warn ::v-deep .el-progress-circle__track {
        stroke: rgb(250, 215, 210);
        stroke: rgb(250, 215, 210) !important;
      }
    }