| | |
| | | <template> |
| | | <div class="module-wrapper"> |
| | | <div class="module-wrapper" |
| | | v-loading="loading" |
| | | element-loading-text="拼命加载中" |
| | | element-loading-spinner="el-icon-loading" |
| | | element-loading-background="rgba(0, 0, 0, 0.2)"> |
| | | <div class="module-content-left"> |
| | | <layout-box> |
| | | <div class="layout-content"> |
| | | <div class="mon-vol-bar"> |
| | | <flex-box title="单体电压" size="mini"> |
| | | <el-select v-model="group" slot="tools" size="mini"> |
| | | <el-select v-model="group" slot="tools" size="mini" @change="changeGroup"> |
| | | <el-option :value="0" label="组1"></el-option> |
| | | <el-option :value="1" label="组2"></el-option> |
| | | <el-option :value="2" label="组3"></el-option> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | group: 0, |
| | | timer: new Timeout(), |
| | | analogData: [], |
| | |
| | | } |
| | | }); |
| | | }, |
| | | changeGroup() { |
| | | this.loading = true; |
| | | }, |
| | | startTimer() { |
| | | this.timer.start(()=>{ |
| | | this.$axios.all([ |
| | |
| | | }; |
| | | // 查询后台 |
| | | this.$apis.dcdc.getDcDcAnalogParams(searchParams).then(res=>{ |
| | | // 关闭等待框 |
| | | this.loading = false; |
| | | // 处理后台数据 |
| | | let rs = JSON.parse(res.data.result); |
| | | let data = []; |
| | | if(rs.code == 1) { |
| | |
| | | // 格式化并并设置数据 |
| | | this.formatData(data); |
| | | }).catch(error=>{ |
| | | // 关闭等待框 |
| | | this.loading = false; |
| | | // 格式化并并设置数据 |
| | | this.formatData([]); |
| | | }); |
| | |
| | | this.searchData(); |
| | | }, |
| | | devId() { |
| | | this.priceRatio = this.batt.priceFactor?this.batt.priceFactor:0; |
| | | this.searchData(); |
| | | } |
| | | }, |
| | |
| | | }, |
| | | getPeakPrice() { // 统计削峰填谷价格 |
| | | let priceRatio = this.priceRatio; |
| | | console.log(priceRatio); |
| | | let reg = /^[0-9]+.?[0-9]*$/; |
| | | if(!reg.test(priceRatio)) { |
| | | this.$layer.msg("电价系数必须为数字"); |
| | |
| | | BattGroupId: batt.BattGroupId, |
| | | num: num, |
| | | record_time: recordTime, |
| | | record_time1: recordTime1 |
| | | record_time1: recordTime1, |
| | | priceFactor: priceRatio, |
| | | }; |
| | | // 查询后台 |
| | | this.$apis.dcdc.getPeakPrice(searchParams).then(res=>{ |
| | |
| | | |
| | | }, |
| | | mounted() { |
| | | // 设置电价系数 |
| | | this.priceRatio = this.batt.priceFactor?this.batt.priceFactor:0; |
| | | // 信息修改 |
| | | this.searchData(); |
| | | this.getPeakPrice(); |
| | | this.searchElePrices(); |
| | |
| | | .then((res) => { |
| | | let rs = JSON.parse(res.data.result); |
| | | if (rs.code == 1) { |
| | | // 剩余容量进行累加 |
| | | let restCap = 0; |
| | | rs.data.map(item=>{ |
| | | restCap += item.restCap; |
| | | }); |
| | | |
| | | let data = rs.data[0]; |
| | | data.restCap = restCap; |
| | | this.lithiumParams.analog = data; |
| | | } else { |
| | | this.lithiumParams.analog = lithiumInfo.analog().params; |