whychdw
2021-12-10 1e73f09689181ec31c28e897ccf9046ae53fa756
内容提交
1个文件已添加
3个文件已修改
154 ■■■■■ 已修改文件
src/assets/js/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/params/OutlineCuringParams.vue 53 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/params/stopOutlineCuring.vue 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/realTime.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/config.js
@@ -23,7 +23,7 @@
    changeIp: {
        label: '远程修改IP',
        des: '电池信息配置中点击编辑可以远程修改ip',
        value: true,
        value: false,
    },
    dischargeByFace: {
        label: '启动放电添加人脸识别',
src/components/params/OutlineCuringParams.vue
@@ -54,7 +54,7 @@
                </div>
            </div>
            <div class="form-footer">
                <three-btn :disabled="!startFlag">启动</three-btn>
                <three-btn :disabled="!startFlag" @click="confirmStart">启动</three-btn>
                <three-btn @click="read">读取</three-btn>
                <three-btn :disabled="!setFlag" @click="submitForm">设定</three-btn>
            </div>
@@ -70,12 +70,12 @@
export default {
    name: "OutlineCuringParams",
    props: {
        batt: {
            type: Object,
            default() {
                return {}
            }
      batt: {
        type: Object,
        default() {
          return {}
        }
      },
    },
    data() {
        let nowDate = new Date().format('yyyy-MM-dd hh:mm:ss');
@@ -227,11 +227,46 @@
        },
        // 确认启动
        confirmStart() {
          this.$confirm("是否启动离线养护除硫", "提示", {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(()=>{
            this.start();
          }).catch(()=>{});
        },
        // 启动
        start() {
          let start = this.cmd.start;
          let devId = this.params.dev_id;
          let params = {
            op_cmd: start,
            dev_id: devId,
            MonomerTmp_High: 0,
            OnLineVol_Low: 0,
            OffLineYH_Cycle: 0,
            OffLineYHOnceCycle: 0,
            OffLineYHstarttime: '2020-01-01 00:00:00',
          };
          // 开启等待框
          let loading = this.$layer.loading();
          // 请求后台设置参数
          this.$apis.outline.update(params).then(res=>{
            let rs = JSON.parse(res.data.result);
            if(rs.code == 1) {
              // 提示信息
              this.$layer.msg("启动离线养护成功!");
            }else {
              // 提示信息
              this.$layer.msg("启动离线养护失败!");
            }
            // 关闭等待框
            this.$layer.close(loading);
          }).catch(error=>{
            // 提示信息
            this.$layer.msg("网络请求异常,启动离线养护失败!");
            // 关闭等待框
            this.$layer.close(loading);
          });
        },
    },
    computed: {
@@ -250,7 +285,7 @@
    },
    mounted() {
        // 读取信息
        //this.read();
        this.read();
    }
}
</script>
src/components/params/stopOutlineCuring.vue
New file
@@ -0,0 +1,81 @@
<template>
  <div v-show="false"></div>
</template>
<script>
import {
  const_outline
} from '@/assets/js/const'
export default {
  name: "stopOutlineCuring",
  props: {
    devId: {
      type: [String, Number],
      default: 0
    },
    stopTime: {
      type: Number,
      default: 0
    },
  },
  data() {
    let cmd = const_outline.cmd;
    return {
      cmd: cmd,
    }
  },
  watch: {
    stopTime() {
      this.confirmStop();
    },
  },
  methods: {
    // 确认停止
    confirmStop() {
      this.$confirm("停止离线养护除硫", "提示", {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
      }).then(()=>{
        this.stop();
      }).catch(()=>{});
    },
    stop() {
      let stop = this.cmd.stop;
      let devId = this.devId;
      let params = {
        op_cmd: stop,
        dev_id: devId,
        MonomerTmp_High: 0,
        OnLineVol_Low: 0,
        OffLineYH_Cycle: 0,
        OffLineYHOnceCycle: 0,
        OffLineYHstarttime: '2020-01-01 00:00:00',
      };
      // 开启等待框
      let loading = this.$layer.loading();
      // 请求后台设置参数
      this.$apis.outline.update(params).then(res=>{
        let rs = JSON.parse(res.data.result);
        if(rs.code == 1) {
          // 提示信息
          this.$layer.msg("停止离线养护成功!");
        }else {
          // 提示信息
          this.$layer.msg("停止离线养护失败!");
        }
        // 关闭等待框
        this.$layer.close(loading);
      }).catch(error=>{
        // 提示信息
        this.$layer.msg("网络请求异常,停止离线养护失败!");
        // 关闭等待框
        this.$layer.close(loading);
      });
    }
  }
}
</script>
<style scoped>
</style>
src/pages/dataTest/realTime.vue
@@ -204,7 +204,7 @@
                    class="hdw-menu-item"
                    v-if="control.data.stopOutlineYH.show"
                  >
                    <a href="javascript:void(0);">停止离线养护</a>
                    <a href="javascript:void(0);" @click="stopOutLineCuring">停止离线养护</a>
                  </li>
                  <li class="hdw-menu-item" v-if="isRestartCircle">
                    <a
@@ -853,10 +853,12 @@
        </ul>
      </div>
    </right-menu>
    <stop-outline-curing :dev-id="batt.FBSDeviceId" :stop-time="stopTime"></stop-outline-curing>
  </flex-layout>
</template>
<script>
import stopOutlineCuring from "@/components/params/stopOutlineCuring";
import ContentBox from "../../components/ContentBox";
import HomeList from "./HomeList";
import BarChart from "../../components/chart/BarChart";
@@ -924,6 +926,7 @@
let tblData = [];
export default {
  components: {
    stopOutlineCuring,
    BmsInfo,
    ElePriceTpl,
    EzVideo,
@@ -969,6 +972,10 @@
        this.resize();
      });
    },
    "diagram.type"() {
      let batt = this.batt;
      this.getLastCapacityTest(batt);
    }
  },
  data() {
    let permits = this.$store.state.user.permits;
@@ -992,6 +999,7 @@
      dev_version: "",
      username: sessionStorage.getItem("username"),
      pageConfig: pageConfig,
      stopTime: 0,
      rightMenu: {
        show: false,
        x: 0,
@@ -3009,7 +3017,7 @@
          // 上次核容测试容量
          this.setStateList('test_cap', data.test_cap.toFixed(1) + "AH");
          // 上次核容测试时长
          this.setStateList('test_timelong', data.test_timelong);
          this.setStateList('test_timelong', formatSeconds(data.test_timelong));
          let volArr = [];
          datalist.forEach((v) => {
            volArr.push(['#' + v.mon_num, v.mon_vol]);
@@ -3029,6 +3037,10 @@
      }).catch((err) => {
        console.error(err);
      });
    },
    stopOutLineCuring() {
      this.stopTime = new Date().getTime();
      console.log(this.stopTime);
    }
  },
  computed: {
@@ -3446,7 +3458,7 @@
.lampImg {
  height: 28px;
}
>>> .box-header {
.box-header {
  font-size: 14px;
  padding: 0;
}