longyvfengyun
2022-03-19 af4d641a4223106fc823ecbfdb3ef56c658fc78c
内容提交
14个文件已修改
330 ■■■■ 已修改文件
public/theme/science-black.css 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/theme/science-blue.css 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/theme/science-green.css 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/apis/dischargeTest/bts.js 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/params/BTS/DischargeParams.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/params/DischargeDialogContent.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/params/LdNineParams.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/CircuitDiagram.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/components/NiBianInfoTab.vue 35 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/diagrams/grid/buscouple/index.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/diagrams/grid/buscoupleCharge/index.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/diagrams/grid/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/dialogs/autoCheck/index.vue 147 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/realTime.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/theme/science-black.css
@@ -1036,4 +1036,9 @@
}
.el-popper.light-popover[x-placement^=left] .popper__arrow::after {
  border-left-color: #0b388a;
}
.auto-check {
  background: url(./img/science-black/dw_bg.jpg) no-repeat;
  background-size: 100% 100%;
}
public/theme/science-blue.css
@@ -983,3 +983,8 @@
.el-popper.light-popover[x-placement^=left] .popper__arrow::after {
  border-left-color: #0b388a;
}
.auto-check {
  background: url(./img/science-blue/dw_bg.jpg) no-repeat;
  background-size: 100% 100%;
}
public/theme/science-green.css
@@ -1202,4 +1202,9 @@
}
.el-popper.light-popover[x-placement^=left] .popper__arrow::after {
  border-left-color: #0b388a;
}
.auto-check {
  background: url(./img/science-green/dw_bg.jpg) no-repeat;
  background-size: 100% 100%;
}
src/assets/js/apis/dischargeTest/bts.js
@@ -49,5 +49,23 @@
            url: 'Fbs9100_setparamAction_action_serchbyDev_id',
            data: 'json='+JSON.stringify(data),
        });
    },
    /**
     * 平台自检
     * @param dev_id 设备ID
     * @param group_id 电池组ID
     * @param step 自检步骤
     * @returns {AxiosPromise}
     */
    checkStatus(dev_id, group_id, step) {
        return axios({
            method: 'post',
            url: 'CheckAction!checkStatus',
            data: 'json='+JSON.stringify({
                FBSDeviceId: dev_id,
                BattGroupId: group_id,
                sortId: step,
            }),
        });
    }
}
src/components/params/BTS/DischargeParams.vue
@@ -115,6 +115,7 @@
        <div class="form-footer">
            <!-- <three-btn>清除告警</three-btn> -->
            <three-btn :disabled="!startTestFlag" @click="startTestCheck">启动测试</three-btn>
<!--            <three-btn @click="startTestCheck">启动测试</three-btn>-->
            <three-btn @click="getParams(true)">读取</three-btn>
            <three-btn :disabled="!setTestFlag" @click="submitFrom">设定</three-btn>
        </div>
@@ -136,6 +137,19 @@
            :modal-append-to-body="false" :destroy-on-close="true">
            <check-face v-if="startFaceShow" @checkSuccess="startFaceSuccess"></check-face>
        </el-dialog>
        <!-- 平台自检 -->
        <el-dialog
            title="平台自检"
            width="auto"
            :visible.sync="autoCheck"
            :close-on-click-modal="false"
            top="0"
            class="dialog-center"
            :modal="false"
            :close-on-press-escape="false"
            :modal-append-to-body="true">
          <auto-check v-if="autoCheck" @success="startTest" :visible.sync="autoCheck" :batt="batt"></auto-check>
        </el-dialog>
    </el-form>
</template>
@@ -149,10 +163,12 @@
} from "@/assets/js/const"
import config from "@/assets/js/config";
import checkFace from "@/components/checkFace";
import autoCheck from "@/pages/dataTest/dialogs/autoCheck";
export default {
    name: "BtsDischargeParams",
    components: {
        checkFace
        checkFace,
        autoCheck
    },
    props: {
        batt: {
@@ -192,6 +208,7 @@
        rules.DisCurr.msg = "取值范围"+rules.DisCurr.min+"~"+rules.DisCurr.max;
        return {
            autoCheck: false,
            setFaceShow: false,
            startFaceShow: false,
            cmd: cmd,               // 操作命令
@@ -413,7 +430,12 @@
                        this.$layer.close(index);
                        this.$layer.msg("密码检测通过,启动测试");
                        // 启动测试
                        this.startTest();
                        if(regEquipType(this.batt.FBSDeviceId, ["BTS9120"])) {
                          this.autoCheck = true;
                        }else {
                          this.startTest();
                        }
                    }else {
                        this.$layer.msg("启动口令错误!");
                    }
@@ -438,6 +460,8 @@
                if (rs.code == 1) {
                    // 提示信息
                    this.$layer.msg('启动测试成功');
                    // 关闭弹出框
                    this.$emit('close');
                } else {
                    // 提示信息
                    this.$layer.msg('启动测试失败!');
src/components/params/DischargeDialogContent.vue
@@ -8,10 +8,11 @@
    <bts-discharge-params
      v-else-if="regBTS"
      :batt="batt"
      @close="close"
    ></bts-discharge-params>
    <res-test v-else-if="reg9605" :batt="batt"></res-test>
    <res-test9611 v-else-if="reg9611" :batt="batt"></res-test9611>
    <ld-nine-params v-else-if="regLD9" :batt="batt"></ld-nine-params>
    <ld-nine-params v-else-if="regLD9" :batt="batt" @close="close"></ld-nine-params>
    <div v-else class="kfz">
      <img src="../../assets/images/kfz.png" />
    </div>
src/components/params/LdNineParams.vue
@@ -435,6 +435,8 @@
          if (rs.code == 1) {
            // 提示信息
            this.$layer.msg("启动测试成功");
            // 启动成功关闭弹出框
            this.$emit('close');
          } else {
            // 提示信息
            this.$layer.msg("启动测试失败!");
src/pages/dataTest/CircuitDiagram.vue
@@ -31,6 +31,7 @@
    :type="type"
    :update="update"
    :dev-type="devType"
    :buscouple-switch="buscoupleSwitch"
  ></grid-circuit-diagram>
  <collect-circuit-diagram
    v-else-if="diagramType === 'collect'"
@@ -166,6 +167,10 @@
      type: String,
      default: "--------------"
    },
    buscoupleSwitch: {
      type: Number,
      default: 0
    }
  },
  computed: {
    diagramType() {
src/pages/dataTest/components/NiBianInfoTab.vue
@@ -579,25 +579,24 @@
                    console.log(error);
                });
            },
            inversionData() {
                inversionData(this.devId).then(res=>{
                    let rs = JSON.parse(res.data.result);
                    let tmp = {
                        commustate: -1,     // 通讯状态
                        fanglei_state: -1,  // 防雷状态
                        rlayworkmode: -1,   // 空开状态
                    };
                    if(rs.code == 1) {
                        tmp = rs.data[0];
                    }
                    console.log(rs);
                    this.tblData[0].signalState = tmp.commustate;
                    this.tblData[0].protectState = getLabelByValue(tmp.fanglei_state, const_9120.fangLeiState, '???');
                    this.tblData[0].switchState = getLabelByValue(tmp.rlayworkmode, const_9120.airSwitchState, '???');
                }).catch(error=>{
      inversionData() {
        inversionData(this.devId).then(res=>{
          let rs = JSON.parse(res.data.result);
          let tmp = {
              commustate: -1,     // 通讯状态
              fanglei_state: -1,  // 防雷状态
              rlayworkmode: -1,   // 空开状态
          };
          if(rs.code == 1) {
              tmp = rs.data[0];
          }
          this.tblData[0].signalState = tmp.commustate;
          this.tblData[0].protectState = getLabelByValue(tmp.fanglei_state, const_9120.fangLeiState, '???');
          this.tblData[0].switchState = getLabelByValue(tmp.rlayworkmode, const_9120.airSwitchState, '???');
        }).catch(error=>{
                });
            },
        });
      },
            setInfo() {
                if (this.name == 'niBianInfoTab') {
                    this.startSearch();
src/pages/dataTest/diagrams/grid/buscouple/index.vue
@@ -37,6 +37,10 @@
            type: Boolean,
            default: true,
        },
        buscoupleSwitch: {
          type: Number,
          default: 0
        }
    },
    data() {
        return {
@@ -65,6 +69,10 @@
            }else {
                diagram.stop();
            }
        },
        buscoupleSwitch(val) {
          diagram.setOption('km5', 'state', val?true:false);
          diagram.setOption('km4', 'state', val?true:false);
        }
    },
    methods: {
@@ -74,7 +82,8 @@
            diagram.setOption('groupVol', 'text', this.groupVol+'V');
            diagram.setOption('battCurr', 'text', this.battCurr+'A');
            diagram.setOption('devTemp', 'text', '设备温度:'+this.devTemp+'℃');
            diagram.setOption('km5', 'state', this.buscoupleSwitch?true:false);
            diagram.setOption('km4', 'state', this.buscoupleSwitch?true:false);
            // 设置更新状态
            if(!this.update) {
                diagram.stop();
src/pages/dataTest/diagrams/grid/buscoupleCharge/index.vue
@@ -37,6 +37,10 @@
            type: Boolean,
            default: true,
        },
        buscoupleSwitch: {
          type: Number,
          default: 0
        }
    },
    data() {
        return {
@@ -65,6 +69,10 @@
            }else {
                diagram.stop();
            }
        },
        buscoupleSwitch(val) {
          diagram.setOption('km5', 'state', val?true:false);
          diagram.setOption('km4', 'state', val?true:false);
        }
    },
    methods: {
@@ -74,6 +82,8 @@
            diagram.setOption('groupVol', 'text', this.groupVol+'V');
            diagram.setOption('battCurr', 'text', this.battCurr+'A');
            diagram.setOption('devTemp', 'text', '设备温度:'+this.devTemp+'℃');
            diagram.setOption('km5', 'state', this.buscoupleSwitch?true:false);
            diagram.setOption('km4', 'state', this.buscoupleSwitch?true:false);
            // 设置更新状态
            if(!this.update) {
src/pages/dataTest/diagrams/grid/index.vue
@@ -6,7 +6,8 @@
        :batt-curr="battCurr"
        :dev-temp="devTemp"
        :type="type"
        :update="update"></buscouple>
        :update="update"
        :buscouple-switch="buscoupleSwitch"></buscouple>
    <no-buscouple-charge
        v-else-if="devType === 2"
        :online-vol="onlineVol"
@@ -22,7 +23,8 @@
        :batt-curr="battCurr"
        :dev-temp="devTemp"
        :type="type"
        :update="update"></buscouple-charge>
        :update="update"
        :buscouple-switch="buscoupleSwitch"></buscouple-charge>
    <no-buscouple
        v-else
        :online-vol="onlineVol"
@@ -80,6 +82,10 @@
            type: Number,
            default: 0
        },
        buscoupleSwitch: {
          type: Number,
          default: 0
        },
    },
    data() {
        return {}
src/pages/dataTest/dialogs/autoCheck/index.vue
@@ -5,8 +5,8 @@
      :state="item.state"
      :text="item.text"></check-item>
    <div class="auto-check-footer">
      <el-button v-if="isCanRetest" type="primary" size="mini" @click="reAutoCheck">重新自检</el-button>
      <el-button type="success" size="mini" :disabled="!isCanTest">启动测试</el-button>
      <el-button v-if="isCanRetest" type="primary" size="mini" @click="confirmReCheck">重新自检</el-button>
      <el-button type="success" size="mini" :disabled="!isCanTest" @click="confirmStartTest">启动测试</el-button>
    </div>
  </div>
</template>
@@ -15,27 +15,50 @@
import CheckItem from "@/pages/dataTest/dialogs/autoCheck/checkItem";
export default {
  name: "autoCheck",
  components: {CheckItem},
  components: {
    CheckItem
  },
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    batt: {
      type: Object,
      default() {
        return {}
      }
    },
  },
  data() {
    let dev_id = this.batt.FBSDeviceId;
    let group_id = this.batt.BattGroupId;
    return {
      dev_id: dev_id,
      group_id: group_id,
      list: [
        {
          step: 1,
          state: 0,
          text: "蓄电池远程核容装置无告警"
        },
        {
          step: 2,
          state: 0,
          text: "蓄电池组无告警"
        },
        {
          step: 3,
          state: 0,
          text: "蓄电池组均处于浮充状态"
        },
        {
          step: 4,
          state: 0,
          text: "母联电动开关模块无告警"
        },
        {
          step: 5,
          state: 0,
          text: "充电机直流输入无异常、无过欠压告警"
        },
@@ -48,45 +71,91 @@
        this.list[i].state = 0;
      }
    },
    checkStep1() {
      this.list[0].state = 1;
      setTimeout(()=>{
        this.list[0].state = 2;
        this.checkStep2();
      }, 1000);
    },
    checkStep2() {
      this.list[1].state = 1;
      setTimeout(()=>{
        this.list[1].state = 2;
        this.checkStep3();
      }, 1000);
    },
    checkStep3() {
      this.list[2].state = 1;
      setTimeout(()=>{
        this.list[2].state = 2;
        this.checkStep4();
      }, 1000);
    },
    checkStep4() {
      this.list[3].state = 1;
      setTimeout(()=>{
        this.list[3].state = 2;
        this.checkStep5();
      }, 1000);
    },
    checkStep5() {
      this.list[4].state = 1;
      setTimeout(()=>{
        this.list[4].state = 2;
      }, 1000);
    loopCheck(dev_id, group_id, list, index) {
      let item = list[index];
      if(item) {
        index++;
        item.state = 1;
        // 请求后台查询
        this.$apis.dischargeTest.bts.checkStatus(this.dev_id, this.group_id, item.step).then(res=>{
          let rs = JSON.parse(res.data.result);
          if(rs.code == 1) {
            // 设置自检的结果
            item.state = 2;
          }else {
            // 设置自检的结果
            item.state = 3;
          }
          this.loopCheck(dev_id, group_id, list, index);
        }).catch(error => {
          // 设置自检的结果
          item.state = 3;
          this.loopCheck(dev_id, group_id, list, index);
        });
      }else {
        console.log("完成自检");
      }
    },
    reAutoCheck() {
      this.init();
      this.$nextTick(()=>{
        this.checkStep1();
        this.loopCheck(this.dev_id, this.group_id, this.list, 0);
      });
    },
    // 确认框
    confirmReCheck() {
      this.$layer.prompt({title: '输入重新自检口令,并确认', formType: 2, area: ['300px', '180px']}, (pass, index) => {
        let loading = this.$layer.loading();
        // 请求后台校验密码
        this.$apis.login.checkUserPwd(pass).then(res=>{
          let rs = JSON.parse(res.data.result);
          this.$layer.close(loading);
          if(rs.code == 1) {
            // 关闭弹出框
            this.$layer.close(index);
            this.$layer.msg("密码检测通过,启动自检");
            // 重新启动自检测试
            this.reAutoCheck();
          }else {
            this.$layer.msg("启动自检口令错误!");
          }
        }).catch(error=>{
          console.log(error);
          this.$layer.msg("网络请求异常");
        });
      });
    },
    // 确认框
    confirmStartTest() {
      this.$layer.prompt({title: '输入启动测试口令,并确认', formType: 2, area: ['300px', '180px']}, (pass, index) => {
        // 请求后台校验密码
        this.$apis.login.checkUserPwd(pass).then(res=>{
          let rs = JSON.parse(res.data.result);
          if(rs.code == 1) {
            // 关闭弹出框
            this.$layer.close(index);
            // 启动测试
            this.startTest();
          }else {
            this.$layer.msg("启动口令错误!");
          }
        }).catch(error=>{
          console.log(error);
          this.$layer.msg("网络请求异常");
        });
      });
    },
    startTest() {
      let loading = this.$layer.loading();
      setTimeout(()=>{
        this.$emit("success", true);
        this.close();
        this.$layer.close(loading);
      }, 2000);
    },
    close() {
      this.$emit("update:visible", false);
    }
  },
  computed: {
@@ -116,14 +185,14 @@
    }
  },
  mounted() {
    this.checkStep1();
    this.loopCheck(this.dev_id, this.group_id, this.list, 0);
  }
}
</script>
<style scoped>
.auto-check {
  min-width: 400px;
  min-width: 450px;
  padding: 16px;
  background-color: #FFFFFF;
}
src/pages/dataTest/realTime.vue
@@ -377,6 +377,7 @@
                :dev-type="diagram.devType"
                :charge-mon="chargeMon"
                :discharge-mon="dischargeMon"
                :buscouple-switch="buscoupleSwitch"
              ></circuit-diagram>
            </el-tab-pane>
            <el-tab-pane
@@ -844,17 +845,6 @@
        :batt="batt"
      ></work-plan>
    </el-dialog>
    <!-- 平台自检 -->
    <el-dialog
      title="平台自检"
      width="auto"
      :visible.sync="autoCheck"
      :close-on-click-modal="false"
      top="0"
      class="dialog-center"
      :modal-append-to-body="false">
      <auto-check></auto-check>
    </el-dialog>
    <right-menu
      :visible.sync="rightMenu.show"
      :x="rightMenu.x"
@@ -908,7 +898,7 @@
  realTimePowerOff,
  realTimeLd9Data,
  realTimeStateList,
  inversionInfo,
  inversionInfo, inversionData,
} from "../../assets/js/realTime";
import {
  getLastCapacityTest
@@ -922,7 +912,7 @@
  GetMonomerCap,
  GetHourRate,
  isHasPermit,
  getConduct,
  getConduct, getLabelByValue,
} from "../../assets/js/tools";
import { const_61850, const_9100, const_ld_nine } from "../../assets/js/const";
@@ -941,6 +931,7 @@
import ElePriceTpl from "@/pages/dataTest/components/elePriceTpl";
import BmsInfo from "@/pages/dataTest/components/bmsInfo";
import AutoCheck from "@/pages/dataTest/dialogs/autoCheck";
import const_9120 from "@/assets/js/const/const_9120";
/* import moment from "moment"; */
let vol, resChart, temp, conduct, currChart, leakVol, monConnRes;
@@ -1007,7 +998,6 @@
    let lastCapacityTest = const_61850.lastCapacityTest;
    let pageConfig = this.$store.getters["user/realTabsConfig"];
    return {
      autoCheck:false,
      workPlanDialog: false,
      dcdcWorkDialog: false,
      balanceControlDialog: false,
@@ -1497,6 +1487,7 @@
      lithiumParams: {
        analog: lithiumInfo.analog().params,
      },
      buscoupleSwitch: 0,   // 空开状态 0-断开 1-闭合
    };
  },
  methods: {
@@ -1781,6 +1772,7 @@
            this.loadDevAla(),
            //this.inversionInfo()
            this.getLithiumAnalog(), // 锂电池模拟量
            this.inversionData(),
          ])
          .then(() => {
            this.timer.open();
@@ -3129,7 +3121,31 @@
    },
    stopOutLineCuring() {
      this.stopTime = new Date().getTime();
    }
    },
    inversionData() {
      // 是逆变的设备
      if(regEquipType(this.batt.FBSDeviceId, 'BTS9120')) {
        inversionData(this.batt.FBSDeviceId).then(res=>{
          let rs = JSON.parse(res.data.result);
          let data = {
            commustate: -1,     // 通讯状态
            fanglei_state: -1,  // 防雷状态
            rlayworkmode: -1,   // 空开状态
          };
          if(rs.code == 1) {
            data = rs.data[0];
          }
          if(data.rlayworkmode == 1 || data.rlayworkmode == 3) {
            this.buscoupleSwitch = 1;
          }else {
            this.buscoupleSwitch = 0;
          }
        }).catch(error=>{
          this.buscoupleSwitch = 0;
        });
      }
    },
  },
  computed: {
    battFullName() {