ZZJ
2022-04-12 994e5e08cba4e6b9ce321b7cf5cb1ec8d19dfa22
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();