mark
2022-10-25 f20a554bdb24e9dfde9dc6a69d78595944f61d15
src/views/equipmentManagement/equipmentDetail/components/UpdateBox.vue
@@ -18,6 +18,7 @@
export default {
  props: {
    device: {},
    id: {},
  },
  data() {
    return {
@@ -31,11 +32,15 @@
    },
    async updateVersion() {
      this.loadingStatus = 1;
      await updateVersion();
      await updateVersion({
        nodeId: this.id,
      });
      this.check();
    },
    async check() {
      const res = await checkVersion();
      const res = await checkVersion({
        nodeId: this.id,
      });
      if (res.data.hasNewVersion) {
        this.timer = setTimeout(() => {
          this.check();