whychdw
2021-08-21 fbbc9c139670d01e50e01e9bf0d4b3ed29507cc3
提交内容
1个文件已添加
2个文件已修改
38 ■■■■■ 已修改文件
src/assets/js/tools/getDevType.js 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/CircuitDiagram.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/pages/dataTest/realTime.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/tools/getDevType.js
New file
@@ -0,0 +1,25 @@
function getDevType(chargeType, isBusCouple) {
    let type = 0;
    // 限流充电无母联
    if(chargeType == 1 && isBusCouple ==0) {
        type = 0;
    }
    // 限流充电无母联
    if(chargeType == 1 && isBusCouple ==1) {
        type = 1;
    }
    // 逆变充电无母联
    if(chargeType == 2 && isBusCouple ==0) {
        type = 2;
    }
    // 逆变充电无母联
    if(chargeType == 2 && isBusCouple ==1) {
        type = 3;
    }
    return type;
}
export default getDevType;
src/pages/dataTest/CircuitDiagram.vue
@@ -27,7 +27,8 @@
        :batt-curr="battCurr"
        :dev-temp="devTemp"
        :type="type"
        :update="update"></grid-circuit-diagram>
        :update="update"
        :dev-type="devType"></grid-circuit-diagram>
    <collect-circuit-diagram
        v-else-if="diagramType==='collect'"
        :online-vol="onlineVol"
@@ -119,12 +120,15 @@
                return [280, 40]
            }
        },
        devType: {
            type: Number,
            default: 0,
        },
    },
    computed: {
        diagramType() {
            let rs = "normal";
            let devId = this.batt.FBSDeviceId;
            console.log(this.batt);
            // 根据设备的类型获取设备的信息
            if (regEquipType(devId, 'BTS9110')) {    // 假负载
                let pattern = /^D:6/;
src/pages/dataTest/realTime.vue
@@ -157,7 +157,7 @@
                            <circuit-diagram :batt="batt" :online-vol="inputs.online_vol" :group-vol="inputs.group_vol"
                                :batt-curr="inputs.group_curr" :dev-temp="diagram.temp" :type="diagram.type"
                                :update="diagram.update" :version="dev_version" :contact-res="diagram.contactRes"
                                :drop-vol="diagram.dropVol"></circuit-diagram>
                                :drop-vol="diagram.dropVol" :dev-type="diagram.devType"></circuit-diagram>
                        </el-tab-pane>
                        <el-tab-pane label="电压" name="vol">
                            <bar-chart ref="vol" id="vol" unit="V" :show-tools="true" @right-click="chartRightCLick">
@@ -370,6 +370,7 @@
    import JggdInfoTab from './components/jggdInfoTab.vue';
    import HdwLight from '../dataMager/components/HdwLight.vue';
    import EzVideo from "@/components/ezVideo";
    import getDevType from "@/assets/js/tools/getDevType";
    /* import moment from "moment"; */
    let vol, resChart, temp, conduct, currChart, leakVol;
    let tblData = [];
@@ -526,6 +527,7 @@
                    temp: 0, // 设备温度
                    contactRes: 0, // 接触器阻抗
                    dropVol: 0, // 导通压降
                    devType: 0, // 设备类型
                },
                dischargeDialog: {
                    show: false,
@@ -1127,6 +1129,7 @@
                this.batt = data;
                this.diagram.desc = "";
                this.realTimeAlarmss();
                this.diagram.devType = getDevType(data.chargeType, data.buscoupleState);
                // 开启循环请求
                this.startTimer();
            },