longyvfengyun
2022-04-08 8382527bf9e224cadf9a5d9307678fd26e6c8b6f
内容提交
2个文件已修改
38 ■■■■ 已修改文件
src/pages/dataTest/realTime.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/pageSetting/components/menuSetting.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/realTime.vue
@@ -62,7 +62,7 @@
      <!--                    <i class="iconfont el-icon-icon-test" @click="nibian.show=true"></i>-->
      <!--                </el-tooltip>-->
      <!--            </div>-->
      <flex-layout :no-bg="true">
      <flex-layout :no-bg="true" :loading="loading">
        <div class="content-header" slot="header" :model="inputs">
          <div class="table-layout">
            <div class="table-row">
@@ -1013,6 +1013,7 @@
    let lastCapacityTest = const_61850.lastCapacityTest;
    let pageConfig = this.$store.getters["user/realTabsConfig"];
    return {
      loading: false,
      workPlanDialog: false,
      dcdcWorkDialog: false,
      balanceControlDialog: false,
@@ -1146,6 +1147,7 @@
      historyStateList: historyStateList,
      lastCapacityTest: lastCapacityTest,
      timer: new Timeout("realTime"),
      timer2: new Timeout("realTime"),
      diagram: {
        update: true,
        type: -1,
@@ -1791,10 +1793,22 @@
      }
    },
    startTimer() {
      this.timer.start(() => {
        this.$axios
          .all([
      // 计时器2
      this.timer2.start(()=>{
        this.$axios.all([
            this.realTimeSearch(),
        ]).then(()=>{
          this.dataChangeFlag = Math.random(); // 数据更新
          this.timer2.open();
        }).catch(()=>{
          this.dataChangeFlag = Math.random(); // 数据更新
          this.timer2.open();
        });
      }, 3000);
      // 计时器1
      this.timer.start(() => {
        this.$axios.all([
            this.realTimeGroupss(),
            this.realStateTimeData(),
            this.realTimeStateList(),
@@ -1804,11 +1818,9 @@
            this.inversionData(),
          ])
          .then(() => {
            this.dataChangeFlag = Math.random(); // 数据更新
            this.timer.open();
          })
          .catch(() => {
            this.dataChangeFlag = Math.random(); // 数据更新
            this.timer.open();
          });
      }, 3000);
@@ -1816,6 +1828,7 @@
    getBattGroupInfo(BattGroupId) {
      this.homeListShow = false;
      this.timer.name = "movingRingSysteRrealTime";
      this.timer2.name = "movingRingSysteRrealTime";
      this.$apis.dataMager.battGroupMager
        .getBattGroupInfo(BattGroupId)
        .then((res) => {
@@ -1842,8 +1855,9 @@
      if (regEquipType(data.FBSDeviceId, ["equip61850"])) {
        this.getLastCapacityTest(data);
      }
      this.loading = true;
      this.changeTabsName();
      this.$nextTick(()=>{
        this.changeTabsName();
        // 开启循环请求
        this.startTimer();
      });
@@ -2613,6 +2627,12 @@
        monConnRes.series[0].data = monConnResData;
        // 更新电压图表
        this.setChart();
        this.loading = false;
      }).catch(error=>{
        // 更新电压图表
        this.setChart();
        this.loading = false;
        this.loading = false;
      });
    },
    // 向父级发送同步页面的指令
@@ -3496,6 +3516,7 @@
  destroyed() {
    window.removeEventListener("resize", this.resize);
    this.timer.stop();
    this.timer2.stop();
  },
};
</script>
src/pages/pageSetting/components/menuSetting.vue
@@ -74,9 +74,10 @@
        },
        updateMenu() {
            let loading = this.$layer.loading();
            let menus = getPageMenu();
            let menus = getPageMenu(true);
            menus[0].childrens = [];
            this.changeMenus(menus, this.menus);
            console.log(menus);
            this.$apis.pageSetting.updatePageMenu(menus).then(res=>{
                let rs = JSON.parse(res.data.result);
                if(rs.code == 1) {