whychdw
2022-01-10 51deef43a75f2a4e841d4cc8fca2478b1f7ba3c9
新增重启DCDC模块
2个文件已修改
38 ■■■■■ 已修改文件
src/assets/js/apis/dcdc/index.js 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/diagrams/lithium/dialog/insideParams.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/apis/dcdc/index.js
@@ -205,5 +205,16 @@
            url: 'Peak_statisticsAction!serchByCondition',
            data: "json=" + JSON.stringify(data),
        })
    },
    restartDcDc(dev_id) {
        // 请求后台查询内容
        return axios({
            method: 'post',
            url: 'Fbs9100_setparamAction_action_restartDCDC',
            data: "json=" + JSON.stringify({
                op_cmd: 0x9A,
                dev_id: dev_id,
            }),
        })
    }
};
src/pages/dataTest/diagrams/lithium/dialog/insideParams.vue
@@ -32,7 +32,8 @@
        </el-col>
      </el-row>
      <div class="form-footer">
        <three-btn @click="getParams">刷新</three-btn>
        <el-button type="primary" size="mini" @click="confirmRestartSys">重启DCDC</el-button>
        <el-button type="primary" size="mini" @click="getParams">刷新</el-button>
      </div>
    </div>
  </flex-layout>
@@ -100,6 +101,30 @@
          this.loading = false;
        });
    },
    confirmRestartSys() {
      this.$confirm("此操作将重启DCDC模块, 是否继续?", "系统提示", {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(res=>{
        let devId = this.batt.FBSDeviceId;
        this.loading = true;
        this.$apis.dcdc.restartDcDc(devId).then((res) => {
          let rs = JSON.parse(res.data.result);
          if(rs.code == 1) {
            this.$layer.msg("重启成功");
          }else{
            this.$layer.msg("重启失败");
          }
          this.loading = false;
        }).catch((error) => {
          console.log(error);
          this.loading = false;
        });
      }).catch(error=>{
        console.log(error);
      });
    },
    close() {
      this.$emit("visible:update", false);
    },