| | |
| | | data:'json='+JSON.stringify(params), |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 获取通信电源主站和设备告警时间差列表 |
| | | * @returns {AxiosPromise} |
| | | */ |
| | | getPowerAlarmAdjList() { |
| | | return axios({ |
| | | method:'post', |
| | | url:'PowerAlarmAdjAction_power_getList', |
| | | data:null, |
| | | }); |
| | | }, |
| | | delPowerAlarmAdjList(num) { |
| | | return axios({ |
| | | method:'post', |
| | | url:'PowerAlarmAdjAction_power_delete', |
| | | data:'json='+JSON.stringify({ |
| | | num |
| | | }), |
| | | }); |
| | | } |
| | | } |
New file |
| | |
| | | function getItemByKey(key, list) { |
| | | let result = 0; |
| | | for(let i=0; i<list.length; i++) { |
| | | let item = list[i]; |
| | | if(item.key == key) { |
| | | result = item; |
| | | break; |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | export default getItemByKey; |
| | |
| | | src: "#/powerBoxHistoryAlarm", |
| | | closable: true |
| | | }, |
| | | { |
| | | label: "通信电源超时告警", |
| | | name: "powerAlarmTimeout", |
| | | src: "#/powerAlarmTimeout", |
| | | closable: true |
| | | }, |
| | | // { |
| | | // label: "电池告警参数设置", |
| | | // name: "batterypaSetting", |
New file |
| | |
| | | <template> |
| | | <div class="e-chart-root"> |
| | | <div class="e-chart-container"> |
| | | <div class="e-chart" ref="chart"></div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import echarts from 'echarts'; |
| | | |
| | | export default { |
| | | name: "EChartWrapper", |
| | | chart: "", |
| | | data() { |
| | | return {} |
| | | }, |
| | | methods: { |
| | | setOption(option) { |
| | | let chart = this.$options.chart; |
| | | // 清除之前的画布 |
| | | chart.clear(); |
| | | // 生成新的画布 |
| | | chart.setOption(option); |
| | | }, |
| | | resize() { |
| | | let chart = this.$options.chart; |
| | | chart.resize(); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$options.chart = echarts.init(this.$refs.chart, 'transparent'); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .e-chart-root, |
| | | .e-chart-container, |
| | | .e-chart { |
| | | height: 100%; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .e-chart-root.full-screen .e-chart-container { |
| | | position: fixed; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | background-size: 100% 100%; |
| | | z-index: 9999; |
| | | } |
| | | |
| | | .e-chart-tools { |
| | | position: absolute; |
| | | top: 16px; |
| | | right: 16px; |
| | | z-index: 9; |
| | | } |
| | | |
| | | .e-chart-tools .iconfont { |
| | | margin-left: 8px; |
| | | font-size: 24px; |
| | | cursor: pointer; |
| | | color: #00fefe; |
| | | } |
| | | |
| | | .e-chart-tools .iconfont:hover { |
| | | color: #04b1b1; |
| | | } |
| | | |
| | | .e-chart-tools .iconfont:active { |
| | | color: #FF0000; |
| | | } |
| | | </style> |
New file |
| | |
| | | function getYMax(data) { |
| | | let max = data.max; |
| | | if (max == -Infinity) { |
| | | return 1; |
| | | } |
| | | return Math.ceil(max * 1.01); |
| | | } |
| | | |
| | | export default getYMax; |
New file |
| | |
| | | function getYMin(data) { |
| | | let min = data.min; |
| | | if (min == Infinity) { |
| | | return 0; |
| | | } |
| | | if (min > 0) { |
| | | return Math.floor(min * 0.9); |
| | | } else { |
| | | return Math.floor(min * 1.01); |
| | | } |
| | | } |
| | | |
| | | export default getYMin; |
New file |
| | |
| | | <template> |
| | | <flex-layout> |
| | | <div class="flex-page-content"> |
| | | <el-table stripe size="mini" header-row-class-name="header-primary" height="100%" :data="table.datas"> |
| | | <el-table-column :prop="item.prop" :label="item.label" :min-width="item.minWidth" :resizable="false" |
| | | align="center" v-for="(item,index) in table.headers" :key="index"> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="操作" width="90" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="danger" size="mini" @click="confirmDel(scope.row)">删除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </flex-layout> |
| | | </template> |
| | | |
| | | <script> |
| | | import {Timeout} from "@/assets/js/tools"; |
| | | |
| | | export default { |
| | | name: "powerAlarmTimeout", |
| | | data() { |
| | | return { |
| | | loading: "", |
| | | timer: new Timeout(), |
| | | table: { |
| | | headers: [ |
| | | { |
| | | prop: "powerDeviceId", |
| | | label: "机房编号", |
| | | minWidth: 120 |
| | | }, |
| | | { |
| | | prop: "alarmTypeId", |
| | | label: "告警ID", |
| | | minWidth: 160 |
| | | }, |
| | | { |
| | | prop: "detectDateTime", |
| | | label: "设备告警时间", |
| | | minWidth: 160 |
| | | }, |
| | | { |
| | | prop: "recordDatetime", |
| | | label: "监控主站告警时间", |
| | | minWidth: 160 |
| | | }, |
| | | ], |
| | | datas: [] |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | startSearch() { |
| | | this.timer.start(()=>{ |
| | | this.$axios.all([ |
| | | this.searchData(), |
| | | ]).then(()=>{ |
| | | this.timer.open(); |
| | | }).catch(error=>{ |
| | | this.timer.open(); |
| | | console.log(error); |
| | | }); |
| | | }, 4000) |
| | | }, |
| | | searchData() { |
| | | // 查询 |
| | | this.$apis.dataMager.powerMager.getPowerAlarmAdjList().then(res=>{ |
| | | let rs = JSON.parse(res.data.result); |
| | | let data = []; |
| | | if(rs.code == 1) { |
| | | data = rs.data; |
| | | } |
| | | this.table.datas = data; |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | confirmDel(data) { |
| | | this.$confirm("确认删除该条告警", "系统提示", { |
| | | type: 'error', |
| | | }).then(()=>{ |
| | | this.del(data); |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }) |
| | | }, |
| | | del(data) { |
| | | this.$apis.dataMager.powerMager.delPowerAlarmAdjList(data.num).then(res=>{ |
| | | let rs = JSON.parse(res.data.result); |
| | | if(rs.code == 1) { |
| | | this.$layer.msg("删除成功"); |
| | | }else { |
| | | this.$layer.msg("删除失败"); |
| | | } |
| | | this.searchData(); |
| | | }).catch(error=>{ |
| | | this.$layer.msg("删除失败,请检查网络!"); |
| | | console.log(error); |
| | | }); |
| | | }, |
| | | }, |
| | | computed: { |
| | | |
| | | }, |
| | | mounted() { |
| | | // 启动查询 |
| | | this.startSearch(); |
| | | }, |
| | | destroyed() { |
| | | this.timer.stop(); |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | return [ |
| | | { |
| | | key: 'acIn1VolA', |
| | | label1:'A相', |
| | | label: '第1路交流A相输入电压', |
| | | value: 0, |
| | | unit: 'V' |
| | | }, |
| | | { |
| | | key: 'acIn1CurrA', |
| | | label1:'A相', |
| | | label: '第1路交流A相输入电流', |
| | | value: 0, |
| | | unit: 'A' |
| | | }, |
| | | { |
| | | key: 'acIn1VolB', |
| | | label1:'B相', |
| | | label: '第1路交流B相输入电压', |
| | | value: 0, |
| | | unit: 'V' |
| | | }, |
| | | { |
| | | key: 'acIn1CurrB', |
| | | label1:'B相', |
| | | label: '第1路交流B相输入电流', |
| | | value: 0, |
| | | unit: 'A' |
| | | }, |
| | | { |
| | | key: 'acIn1VolC', |
| | | label1:'C相', |
| | | label: '第1路交流C相输入电压', |
| | | value: 0, |
| | | unit: 'V' |
| | | }, |
| | | { |
| | | key: 'acIn1CurrC', |
| | | label1:'C相', |
| | | label: '第1路交流C相输入电流', |
| | | value: 0, |
| | | unit: 'A' |
| | | }, |
| | | { |
| | | key: 'acIn2VolA', |
| | | label1:'A相', |
| | | label: '第2路交流A相输入电压', |
| | | value: 0, |
| | | unit: 'V' |
| | | }, |
| | | { |
| | | key: 'acIn2CurrA', |
| | | label1:'A相', |
| | | label: '第2路交流A相输入电流', |
| | | value: 0, |
| | | unit: 'A' |
| | | }, |
| | | { |
| | | key: 'acIn2VolB', |
| | | label1:'B相', |
| | | label: '第2路交流B相输入电压', |
| | | value: 0, |
| | | unit: 'V' |
| | | }, |
| | | { |
| | | key: 'acIn2CurrB', |
| | | label1:'B相', |
| | | label: '第2路交流B相输入电流', |
| | | value: 0, |
| | | unit: 'A' |
| | | }, |
| | | { |
| | | key: 'acIn2VolC', |
| | | label1:'C相', |
| | | label: '第2路交流C相输入电压', |
| | | value: 0, |
| | | unit: 'V' |
| | | }, |
| | | { |
| | | key: 'acIn2CurrC', |
| | | label1:'C相', |
| | | label: '第2路交流C相输入电流', |
| | | value: 0, |
| | | unit: 'A' |
| | | }, |
| | | { |
| | | key: 'temperature', |
| | | label1: '交流配电柜温度', |
| | | label: '交流配电柜温度', |
| | | value: 0, |
| | | unit: '℃' |
| | | }, |
| | | { |
| | | key: 'acVolHLimit', |
| | | label1:'交流电压上限', |
| | | label: '交流电压告警阈值上限', |
| | | value: 0, |
| | | unit: 'V' |
| | | }, |
| | | { |
| | | key: 'acVolLLimit', |
| | | label1:'交流电压下限', |
| | | label: '交流电压告警阈值下限', |
| | | value: 0, |
| | | unit: 'V' |
| | |
| | | return [ |
| | | { |
| | | key: 'acIn1VolA', |
| | | label1: '1路A相', |
| | | label: '第1路交流A相输入电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'acIn1VolB', |
| | | label1: '1路B相', |
| | | label: '第1路交流B相输入电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'acIn1VolC', |
| | | label1: '1路C相', |
| | | label: '第1路交流C相输入电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'acIn2VolA', |
| | | label1: '2路A相', |
| | | label: '第2路交流A相输入电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'acIn2VolB', |
| | | label1: '2路B相', |
| | | label: '第2路交流B相输入电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'acIn2VolC', |
| | | label1: '2路C相', |
| | | label: '第2路交流C相输入电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'acOutVolA', |
| | | label1: 'A相', |
| | | label: '交流A相输出电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'acOutVolB', |
| | | label1: 'B相', |
| | | label: '交流B相输出电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'acOutVolC', |
| | | label1: 'C相', |
| | | label: '交流C相输出电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'acOutCurrA', |
| | | label1: 'A相', |
| | | label: '交流A相输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'acOutCurrB', |
| | | label1: 'B相', |
| | | label: '交流B相输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'acOutCurrC', |
| | | label1: 'C相', |
| | | label: '交流C相输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'dcOutVol', |
| | | label1: '直流输出电压', |
| | | label: '直流输出电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'loaderCurr', |
| | | label1: '负载电流', |
| | | label: '负载电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: '', |
| | | label: '蓄电池组充电电流', |
| | | key: 'battgroup1Curr', |
| | | label1: '组1充电电流', |
| | | label: '蓄电池组1充电电流', |
| | | value: -1, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'battgroup2Curr', |
| | | label1: '组2充电电流', |
| | | label: '蓄电池组2充电电流', |
| | | value: -1, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'chargLimitCurr', |
| | | label1: '充电限流值', |
| | | label: '电池充电限流值', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'junChargeVol', |
| | | label1: '均充电压', |
| | | label: '均充电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'floatChargeVol', |
| | | label1: '浮充电压', |
| | | label: '浮充电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'battgroup1Vol', |
| | | label1: '1端电压', |
| | | label: '电池组1端电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'battgroup2Vol', |
| | | label1: '2端电压', |
| | | label: '电池组2端电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'acdcmTemp', |
| | | label1: '高频开关电源柜温度', |
| | | label: '高频开关电源柜温度', |
| | | value: 0, |
| | | unit: '℃', |
| | | }, |
| | | { |
| | | key: 'm1OutCurr', |
| | | label1: '#1', |
| | | label: '模块1输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm2OutCurr', |
| | | label1: '#2', |
| | | label: '模块2输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm3OutCurr', |
| | | label1: '#3', |
| | | label: '模块3输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm4OutCurr', |
| | | label1: '#4', |
| | | label: '模块4输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm5OutCurr', |
| | | label1: '#5', |
| | | label: '模块5输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm6OutCurr', |
| | | label1: '#6', |
| | | label: '模块6输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm7OutCurr', |
| | | label1: '#7', |
| | | label: '模块7输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm8OutCurr', |
| | | label1: '#8', |
| | | label: '模块8输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm9OutCurr', |
| | | label1: '#9', |
| | | label: '模块9输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm10OutCurr', |
| | | label1: '#10', |
| | | label: '模块10输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm11OutCurr', |
| | | label1: '#11', |
| | | label: '模块11输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm12OutCurr', |
| | | label1: '#12', |
| | | label: '模块12输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm13OutCurr', |
| | | label1: '#13', |
| | | label: '模块13输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm14OutCurr', |
| | | label1: '#14', |
| | | label: '模块14输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm15OutCurr', |
| | | label1: '#15', |
| | | label: '模块15输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'm16OutCurr', |
| | | label1: '#16', |
| | | label: '模块16输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'acVolHLimit', |
| | | label1: '交流电压上限', |
| | | label: '交流电压告警阈值上限', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'acVolLLimit', |
| | | label1: '交流电压下限', |
| | | label: '交流电压告警阈值下限', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'dcOutVolHLimit', |
| | | label1: '直流电压上限', |
| | | label: '直流输出电压告警阈值上限', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'dcOutVolLLimit', |
| | | label1: '直流电压下限', |
| | | label: '直流输出电压告警阈值下限', |
| | | value: 0, |
| | | unit: 'V', |
| | |
| | | return [ |
| | | { |
| | | key: 'dcIn1Vol', |
| | | label1: '第1路电压', |
| | | label: '第1路直流输入电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'dcIn2Vol', |
| | | label1: '第2路电压', |
| | | label: '第2路直流输入电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'dcIn1Vol', |
| | | key: 'dcOut1Vol', |
| | | label1: '1段电压', |
| | | label: '1段直流母线输出电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'dcIn2Vol', |
| | | key: 'dcOut2Vol', |
| | | label1: '2段电压', |
| | | label: '2段直流母线输出电压', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'dcOut1Curr', |
| | | label1: '1段电流', |
| | | label: '1段直流母线输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'dcOut2Curr', |
| | | label1: '2段电流', |
| | | label: '2段直流母线输出电流', |
| | | value: 0, |
| | | unit: 'A', |
| | | }, |
| | | { |
| | | key: 'temperature', |
| | | label1: '直流配电柜温度', |
| | | label: '直流配电柜温度', |
| | | value: 0, |
| | | unit: '℃', |
| | | }, |
| | | { |
| | | key: 'acVolHLimit', |
| | | label1: '上限', |
| | | label: '直流电压告警阈值上限', |
| | | value: 0, |
| | | unit: 'V', |
| | | }, |
| | | { |
| | | key: 'acVolLLimit', |
| | | label1: '下限', |
| | | label: '直流电压告警阈值下限', |
| | | value: 0, |
| | | unit: 'V', |
| | |
| | | <flex-layout direction="row" class="page-real-time" :no-bg="true"> |
| | | <content-box style="margin-left: 4px; margin-right: 4px;" :title="battFullName"> |
| | | <div class="flex-page-content"> |
| | | <el-tabs type="border-card" class="flex-layout noborder top-border" v-model="acTabs"> |
| | | <el-tab-pane label="交流配电柜" name="acData"> |
| | | <power-box-component title="交流配电柜遥测量" :data="acData" :length="1"></power-box-component> |
| | | <power-box-component title="交流配电柜遥信量" :data="acSignalData" :length="4"> |
| | | <el-tabs type="border-card" class="flex-layout noborder top-border" v-model="acTabs" @tab-click="tabsChange"> |
| | | <el-tab-pane label="交流配电柜遥测量" name="acData"> |
| | | <div class="full-height"> |
| | | <div class="h50-percent top-box"> |
| | | <el-row :gutter="layout.gutter" class="full-height"> |
| | | <el-col :span="layout.span" class="full-height"> |
| | | <flex-box title="1路交流输入电压"> |
| | | <e-chart-wrapper ref="acOneInputVol"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | <el-col :span="layout.span" class="full-height"> |
| | | <flex-box title="2交流输入电压"> |
| | | <e-chart-wrapper ref="acTwoInputVol"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | <el-col :span="layout.span" class="full-height"> |
| | | <flex-box title="交流电压告警阀值"> |
| | | <e-chart-wrapper ref="acVolAlarmLimit"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="h50-percent bottom-box"> |
| | | <el-row :gutter="layout.gutter" class="full-height"> |
| | | <el-col :span="layout.span" class="full-height"> |
| | | <flex-box title="1交流输入电流"> |
| | | <e-chart-wrapper ref="acOneInputCurr"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | <el-col :span="layout.span" class="full-height"> |
| | | <flex-box title="2交流输入电流"> |
| | | <e-chart-wrapper ref="acTwoInputCurr"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | <el-col :span="layout.span" class="full-height"> |
| | | <flex-box title="交流配电柜温度"> |
| | | <e-chart-wrapper ref="acTemp"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="交流配电柜遥信量" name="acSignalData"> |
| | | <power-box-component title="交流配电柜遥信量" :data="acSignalData" :length="6"> |
| | | <div slot="tools"> |
| | | <i class="box-tools el-icon-s-tools" @click="acDialog=true"></i> |
| | | </div> |
| | | </power-box-component> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="高频开关电源柜" name="acDcData"> |
| | | <power-box-component title="高频开关电源柜遥测量" :data="acDcData" :length="2"></power-box-component> |
| | | <power-box-component title="高频开关电源柜遥信量" :data="acDcSignalData" :length="4"> |
| | | <el-tab-pane label="高频开关电源柜遥测量" name="acDcData"> |
| | | <div class="full-height"> |
| | | <div class="h50-percent top-box"> |
| | | <el-row :gutter="layout.gutter" class="full-height"> |
| | | <el-col :span="layout.span2" class="full-height"> |
| | | <flex-box title="交流输入电压"> |
| | | <e-chart-wrapper ref="acDcInputVol"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | <el-col :span="layout.span2" class="full-height"> |
| | | <flex-box title="输出电压"> |
| | | <e-chart-wrapper ref="acDcOutputVol"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | <el-col :span="layout.span2" class="full-height"> |
| | | <flex-box title="输出电流"> |
| | | <e-chart-wrapper ref="acDcOutputCurr"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | <el-col :span="layout.span2" class="full-height"> |
| | | <flex-box title="电池电流"> |
| | | <e-chart-wrapper ref="acDcCurr"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="h50-percent bottom-box"> |
| | | <el-row :gutter="layout.gutter" class="full-height"> |
| | | <el-col :span="layout.span2" class="full-height"> |
| | | <flex-box title="电压"> |
| | | <e-chart-wrapper ref="acDcVol"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | <el-col :span="8" class="full-height"> |
| | | <flex-box title="模块输出电流"> |
| | | <e-chart-wrapper ref="acDcModuleOutputCurr"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | <el-col :span="layout.span2" class="full-height"> |
| | | <flex-box title="电压告警阈值上下限"> |
| | | <e-chart-wrapper ref="acDcVolAlarmLimit"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | <el-col :span="4" class="full-height"> |
| | | <flex-box title="高频开关柜温度"> |
| | | <e-chart-wrapper ref="acDcTemp"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="高频开关电源柜遥信量" name="acDcSignalData"> |
| | | <power-box-component title="高频开关电源柜遥信量" :data="acDcSignalData" :length="6"> |
| | | <div slot="tools"> |
| | | <i class="box-tools el-icon-s-tools" @click="acDcDialog=true"></i> |
| | | </div> |
| | | </power-box-component> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="直流配电柜" name="dcData"> |
| | | <power-box-component title="直流配电柜遥测量" :data="dcData"></power-box-component> |
| | | <power-box-component title="直流配电柜遥信量" :data="dcSignalData" :length="5"> |
| | | <el-tab-pane label="直流配电柜遥测量" name="dcData"> |
| | | <div class="full-height"> |
| | | <div class="h50-percent top-box"> |
| | | <el-row :gutter="layout.gutter" class="full-height"> |
| | | <el-col :span="layout.span" class="full-height"> |
| | | <flex-box title="直流输入电压"> |
| | | <e-chart-wrapper ref="dcInputVol"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | <el-col :span="layout.span" class="full-height"> |
| | | <flex-box title="直流输出电压"> |
| | | <e-chart-wrapper ref="dcOutputVol"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | <el-col :span="layout.span" class="full-height"> |
| | | <flex-box title="直流输出电流"> |
| | | <e-chart-wrapper ref="dcOutputCurr"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="h50-percent bottom-box"> |
| | | <el-row :gutter="layout.gutter" class="full-height"> |
| | | <el-col :span="layout.span" class="full-height"> |
| | | <flex-box title="直流电压告警阀值"> |
| | | <e-chart-wrapper ref="dcVolLimit"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | <el-col :span="4" class="full-height"> |
| | | <flex-box title="直流配电柜温度"> |
| | | <e-chart-wrapper ref="dcTemp"></e-chart-wrapper> |
| | | </flex-box> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="直流配电柜遥信量" name="dcSignalData"> |
| | | <power-box-component title="直流配电柜遥信量" :data="dcSignalData" :length="6"> |
| | | <div slot="tools"> |
| | | <i class="box-tools el-icon-s-tools" @click="dcDialog=true"></i> |
| | | </div> |
| | |
| | | import AcDcConfig from "@/pages/dataTest/movingRingSystem/dialog/acDcConfig"; |
| | | import AcConfig from "@/pages/dataTest/movingRingSystem/dialog/acConfig"; |
| | | import DcConfig from "@/pages/dataTest/movingRingSystem/dialog/dcConfig"; |
| | | import FlexBox from "@/components/FlexBox"; |
| | | import EChartWrapper from "@/components/chart/EChartWrapper"; |
| | | import getYMin from "@/components/chart/js/getYMin"; |
| | | import getYMax from "@/components/chart/js/getYMax"; |
| | | import getItemByKey from "@/assets/js/tools/getItemByKey"; |
| | | export default { |
| | | name: "powerBox", |
| | | components: { |
| | | FlexBox, |
| | | DcConfig, |
| | | AcConfig, |
| | | AcDcConfig, |
| | | PowerBoxComponent, |
| | | ContentBox |
| | | ContentBox, |
| | | EChartWrapper |
| | | }, |
| | | chartOpts(option) { |
| | | let opt = option?option:{}; |
| | | let unit = opt.unit?option.unit:""; |
| | | let type = opt.type?option.type:'bar'; |
| | | return { |
| | | animation: false, |
| | | tooltip: { |
| | | trigger: 'axis', |
| | | axisPointer: { // 坐标轴指示器,坐标轴触发有效 |
| | | type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' |
| | | }, |
| | | }, |
| | | grid: { |
| | | top: '32px', |
| | | left: '1%', |
| | | right: '1%', |
| | | bottom: '18px', |
| | | containLabel: true |
| | | }, |
| | | xAxis: [ |
| | | { |
| | | type: 'category', |
| | | axisLabel: { |
| | | interval: 0, |
| | | }, |
| | | } |
| | | ], |
| | | yAxis: [ |
| | | { |
| | | type: 'value', |
| | | name: unit?'Y('+unit+')':'Y', |
| | | splitLine: { |
| | | show: true, |
| | | }, |
| | | min: getYMin, |
| | | max: getYMax, |
| | | }, |
| | | ], |
| | | series: [ |
| | | { |
| | | type: type, |
| | | label: { |
| | | show: true, |
| | | position: 'top', |
| | | color: '#fff', |
| | | formatter: function (params) { |
| | | return params.value[1] + unit; |
| | | } |
| | | }, |
| | | data: [] |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | data() { |
| | | let acData = getAcData(); |
| | |
| | | let acDcSignalData = getAcDcSignalData(); |
| | | let dcSignalData = getDcSignalData(); |
| | | return { |
| | | layout: { |
| | | gutter: 16, |
| | | span: 8, |
| | | span2: 6, |
| | | }, |
| | | timer: new Timeout(), |
| | | acTabs: "acDcData", |
| | | acTabs: "acData", |
| | | batt: {}, |
| | | powerData: { |
| | | info: { |
| | |
| | | let id = this.powerData.info.powerDeviceId; |
| | | this.$apis.dataMager.powerMager.getPowerBoxData(id).then(res=>{ |
| | | let rs = JSON.parse(res.data.result); |
| | | console.log(rs); |
| | | this.setAcInfo(rs.ac); |
| | | this.setAcDcInfo(rs.acdc); |
| | | this.setDcInfo(rs.dc); |
| | | if(rs.code == 1) { |
| | | let data = rs.data; |
| | | this.setAcInfo(data.ac); |
| | | this.setAcDcInfo(data.acdc); |
| | | this.setDcInfo(data.dc); |
| | | }else { |
| | | this.setAcInfo({}); |
| | | this.setAcDcInfo({}); |
| | | this.setDcInfo({}); |
| | | } |
| | | |
| | | }).catch(error=>{ |
| | | console.log(error); |
| | | }); |
| | |
| | | let acTabs = this.acTabs; |
| | | if(acTabs == "acData") { |
| | | this.acData.map(item=>{ |
| | | item.value = getValByKey(item.key, data, -1); |
| | | item.value = getValByKey(item.key, data, "???"); |
| | | }); |
| | | this.setAcChart(this.acData); |
| | | } |
| | | |
| | | if(acTabs == "acSignalData") { |
| | | this.acSignalData.map(item=>{ |
| | | item.value = getValByKey(item.key, data, -1); |
| | | }); |
| | |
| | | let acTabs = this.acTabs; |
| | | if(acTabs == "acDcData") { |
| | | this.acDcData.map(item=>{ |
| | | item.value = getValByKey(item.key, data, -1); |
| | | item.value = getValByKey(item.key, data, "???"); |
| | | }); |
| | | |
| | | this.setAcDcChart(this.acDcData); |
| | | } |
| | | if(acTabs == "acDcSignalData") { |
| | | this.acDcSignalData.map(item=>{ |
| | | item.value = item.inUse==0?-1:getValByKey(item.key, data, -1); |
| | | }); |
| | |
| | | let acTabs = this.acTabs; |
| | | if(acTabs == "dcData") { |
| | | this.dcData.map(item=>{ |
| | | item.value = getValByKey(item.key, data, -1); |
| | | item.value = getValByKey(item.key, data, "???"); |
| | | }); |
| | | |
| | | this.setDcChart(this.dcData); |
| | | } |
| | | if(acTabs == "dcSignalData") { |
| | | this.dcSignalData.map(item=>{ |
| | | item.value = getValByKey(item.key, data, -1); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | tabsChange() { |
| | | this.resize(); |
| | | }, |
| | | setOption() { |
| | | // 交流配电柜图表 |
| | | this.$refs.acOneInputVol.setOption(this.$options.chartOpts()); |
| | | this.$refs.acOneInputCurr.setOption(this.$options.chartOpts()); |
| | | this.$refs.acTwoInputVol.setOption(this.$options.chartOpts()); |
| | | this.$refs.acTwoInputCurr.setOption(this.$options.chartOpts()); |
| | | this.$refs.acVolAlarmLimit.setOption(this.$options.chartOpts()); |
| | | this.$refs.acTemp.setOption(this.$options.chartOpts()); |
| | | |
| | | // 高频交流电源柜图表 |
| | | this.$refs.acDcInputVol.setOption(this.$options.chartOpts()); |
| | | this.$refs.acDcOutputVol.setOption(this.$options.chartOpts()); |
| | | this.$refs.acDcOutputCurr.setOption(this.$options.chartOpts()); |
| | | this.$refs.acDcCurr.setOption(this.$options.chartOpts()); |
| | | this.$refs.acDcVol.setOption(this.$options.chartOpts()); |
| | | this.$refs.acDcModuleOutputCurr.setOption(this.$options.chartOpts()); |
| | | this.$refs.acDcVolAlarmLimit.setOption(this.$options.chartOpts()); |
| | | this.$refs.acDcTemp.setOption(this.$options.chartOpts()); |
| | | |
| | | // 直流配电柜 |
| | | this.$refs.dcInputVol.setOption(this.$options.chartOpts()); |
| | | this.$refs.dcOutputVol.setOption(this.$options.chartOpts()); |
| | | this.$refs.dcOutputCurr.setOption(this.$options.chartOpts()); |
| | | this.$refs.dcVolLimit.setOption(this.$options.chartOpts()); |
| | | this.$refs.dcTemp.setOption(this.$options.chartOpts()); |
| | | |
| | | // 重置大小 |
| | | this.resize(); |
| | | }, |
| | | setAcChart(data) { |
| | | this.setChartOption(data, { |
| | | keys: ['acIn1VolA', 'acIn1VolB', 'acIn1VolC'], |
| | | refs: this.$refs.acOneInputVol, |
| | | unit: "V", |
| | | }); |
| | | this.setChartOption(data, { |
| | | keys: ['acIn1CurrA', 'acIn1CurrB', 'acIn1CurrC'], |
| | | refs: this.$refs.acOneInputCurr, |
| | | unit: "A", |
| | | }); |
| | | this.setChartOption(data, { |
| | | keys: ['acIn2VolA', 'acIn2VolB', 'acIn2VolC'], |
| | | refs: this.$refs.acTwoInputVol, |
| | | unit: "V" |
| | | }); |
| | | this.setChartOption(data, { |
| | | keys: ['acIn2CurrA', 'acIn2CurrB', 'acIn2CurrC'], |
| | | refs: this.$refs.acTwoInputCurr, |
| | | unit: "A" |
| | | }); |
| | | |
| | | this.setChartOption(data, { |
| | | keys: ['acVolHLimit', 'acVolLLimit'], |
| | | refs: this.$refs.acVolAlarmLimit, |
| | | unit: "V" |
| | | }); |
| | | |
| | | this.setChartOption(data, { |
| | | keys: ['temperature'], |
| | | refs: this.$refs.acTemp, |
| | | unit: "℃" |
| | | }); |
| | | }, |
| | | setAcDcChart(data) { |
| | | this.setChartOption(data, { |
| | | keys: ['acIn1VolA', 'acIn1VolB', 'acIn1VolC','acIn2VolA', 'acIn2VolB', 'acIn2VolC'], |
| | | refs: this.$refs.acDcInputVol, |
| | | unit: "V", |
| | | }); |
| | | this.setChartOption(data, { |
| | | keys: ['acOutVolA', 'acOutVolB', 'acOutVolC'], |
| | | refs: this.$refs.acDcOutputVol, |
| | | unit: "V", |
| | | }); |
| | | this.setChartOption(data, { |
| | | keys: ['acOutCurrA', 'acOutCurrB', 'acOutCurrC'], |
| | | refs: this.$refs.acDcOutputCurr, |
| | | unit: "A", |
| | | }); |
| | | this.setChartOption(data, { |
| | | keys: ['loaderCurr', 'chargLimitCurr', 'battgroup1Curr', 'battgroup2Curr'], |
| | | refs: this.$refs.acDcCurr, |
| | | unit: "A", |
| | | }); |
| | | this.setChartOption(data, { |
| | | keys: ['dcOutVol', 'junChargeVol', 'floatChargeVol', 'battgroup1Vol', 'battgroup2Vol'], |
| | | refs: this.$refs.acDcVol, |
| | | unit: "V", |
| | | }); |
| | | |
| | | let modulesKeys = []; |
| | | for(let i=1; i<=16; i++) { |
| | | modulesKeys.push('m'+i+'OutCurr'); |
| | | } |
| | | this.setChartOption(data, { |
| | | keys: modulesKeys, |
| | | refs: this.$refs.acDcModuleOutputCurr, |
| | | unit: "A", |
| | | }); |
| | | this.setChartOption(data, { |
| | | keys: ['acVolHLimit', 'acVolLLimit', 'dcOutVolHLimit', 'dcOutVolLLimit'], |
| | | refs: this.$refs.acDcVolAlarmLimit, |
| | | unit: "V", |
| | | }); |
| | | this.setChartOption(data, { |
| | | keys: ['acdcmTemp'], |
| | | refs: this.$refs.acDcTemp, |
| | | unit: "℃", |
| | | }); |
| | | }, |
| | | setDcChart(data) { |
| | | this.setChartOption(data, { |
| | | keys: ['dcIn1Vol', 'dcIn2Vol'], |
| | | refs: this.$refs.dcInputVol, |
| | | unit: "V", |
| | | }); |
| | | this.setChartOption(data, { |
| | | keys: ['dcOut1Vol', 'dcOut2Vol'], |
| | | refs: this.$refs.dcOutputVol, |
| | | unit: "V", |
| | | }); |
| | | this.setChartOption(data, { |
| | | keys: ['dcOut1Curr', 'dcOut2Curr'], |
| | | refs: this.$refs.dcOutputCurr, |
| | | unit: "A", |
| | | }); |
| | | this.setChartOption(data, { |
| | | keys: ['acVolHLimit', 'acVolLLimit'], |
| | | refs: this.$refs.dcVolLimit, |
| | | unit: "V", |
| | | }); |
| | | this.setChartOption(data, { |
| | | keys: ['temperature'], |
| | | refs: this.$refs.dcTemp, |
| | | unit: "℃", |
| | | }); |
| | | }, |
| | | setChartOption(data, option) { |
| | | let opt = this.$options.chartOpts({ |
| | | unit: option.unit |
| | | }); |
| | | opt.series[0].data = option.keys.map(item=>{ |
| | | let res = getItemByKey(item, data); |
| | | return res==0?["未知", 0]:[res.label1, res.value]; |
| | | }); |
| | | option.refs.setOption(opt); |
| | | }, |
| | | resize() { |
| | | this.$nextTick(()=>{ |
| | | let acTabs = this.acTabs; |
| | | // 交流配电柜图表 |
| | | if(acTabs == "acData") { |
| | | this.$refs.acOneInputVol.resize(); |
| | | this.$refs.acOneInputCurr.resize(); |
| | | this.$refs.acTwoInputVol.resize(); |
| | | this.$refs.acTwoInputCurr.resize(); |
| | | this.$refs.acVolAlarmLimit.resize(); |
| | | this.$refs.acTemp.resize(); |
| | | } |
| | | |
| | | // 高频交流电源柜 |
| | | if(acTabs == 'acDcData') { |
| | | this.$refs.acDcInputVol.resize(); |
| | | this.$refs.acDcOutputVol.resize(); |
| | | this.$refs.acDcOutputCurr.resize(); |
| | | this.$refs.acDcCurr.resize(); |
| | | this.$refs.acDcVol.resize(); |
| | | this.$refs.acDcModuleOutputCurr.resize(); |
| | | this.$refs.acDcVolAlarmLimit.resize(); |
| | | this.$refs.acDcTemp.resize(); |
| | | } |
| | | |
| | | // 直流配电柜 |
| | | if(acTabs == 'dcData') { |
| | | this.$refs.dcInputVol.resize(); |
| | | this.$refs.dcOutputVol.resize(); |
| | | this.$refs.dcOutputCurr.resize(); |
| | | this.$refs.dcVolLimit.resize(); |
| | | this.$refs.dcTemp.resize(); |
| | | } |
| | | }); |
| | | }, |
| | | }, |
| | | computed: { |
| | | battFullName() { |
| | |
| | | if (powerDeviceId) { |
| | | this.getPowerInfo(powerDeviceId); |
| | | } |
| | | |
| | | // 设置配置项 |
| | | this.setOption(); |
| | | // 添加窗口自动缩放 |
| | | window.addEventListener('resize', this.resize); |
| | | }, |
| | | destroyed() { |
| | | this.timer.stop(); |
| | | // 添加窗口自动缩放 |
| | | window.removeEventListener('resize', this.resize); |
| | | } |
| | | } |
| | | </script> |
| | |
| | | margin-right: 8px; |
| | | cursor: pointer; |
| | | } |
| | | .top-box, |
| | | .bottom-box { |
| | | box-sizing: border-box; |
| | | } |
| | | .top-box { |
| | | padding-bottom: 8px; |
| | | } |
| | | .bottom-box { |
| | | padding-top: 8px; |
| | | padding-bottom: 8px; |
| | | } |
| | | </style> |
| | |
| | | export default [{ |
| | | path: '/', |
| | | redirect: '/login' |
| | | }, |
| | | path: '/', |
| | | redirect: '/login' |
| | | }, |
| | | |
| | | { |
| | | path: '/login', |
| | |
| | | meta: {}, |
| | | component: (resolve) => require(['../pages/dataTest/movingRingSystem/index.vue'], resolve), |
| | | children: [{ |
| | | path: 'real-time/:BattGroupId', |
| | | name: 'movingRingSysteRrealTime', |
| | | meta: {}, |
| | | component: (resolve) => require(['../pages/dataTest/realTime.vue'], resolve) |
| | | }, |
| | | path: 'real-time/:BattGroupId', |
| | | name: 'movingRingSysteRrealTime', |
| | | meta: {}, |
| | | component: (resolve) => require(['../pages/dataTest/realTime.vue'], resolve) |
| | | }, |
| | | { |
| | | path: 'real-time/:BattGroupId/:powerDeviceId', |
| | | name: 'movingRingSysteRrealTime', |
| | |
| | | /* 配电柜实时告警 */ |
| | | meta: {}, |
| | | component: (resolve) => require(['../pages/alarmMager/powerBoxAlarm.vue'], resolve) |
| | | }, |
| | | { |
| | | }, |
| | | { |
| | | name: 'powerBoxHistoryAlarm', |
| | | path: '/powerBoxHistoryAlarm', |
| | | /* 配电柜历史告警 */ |
| | | meta: {}, |
| | | component: (resolve) => require(['../pages/alarmMager/powerBoxHistoryAlarm.vue'], resolve) |
| | | }, |
| | | }, |
| | | { |
| | | name: 'powerAlarmTimeout', |
| | | path: '/powerAlarmTimeout', |
| | | /* 通信电源超时告警 */ |
| | | meta: {}, |
| | | component: (resolve) => require(['../pages/alarmMager/powerAlarmTimeout.vue'], resolve) |
| | | }, |
| | | { |
| | | path: '/deviceHistoryquery', |
| | | /* 设备告警历史查询 */ |