| | |
| | | </div> |
| | | <div class="table-cell text-right">机房名称:</div> |
| | | <div class="table-cell"> |
| | | <el-select v-model="selectValue2" :placeholder="selectPlace2" class="rooms" @change="sesston"> |
| | | <el-select v-model="selectValue2" class="rooms" @change="alramData"> |
| | | <el-option |
| | | v-for="item in opt" |
| | | :key="item.value" |
| | |
| | | } |
| | | }, |
| | | /* 机房站点 */ |
| | | async sesston() { |
| | | async sesston(status) { |
| | | const newss = await deviserchSeions({ UNote: this.selectValue1 }); |
| | | let opt = JSON.parse(newss.data.result).data.map(item => { |
| | | return { label: item, value: item }; |
| | |
| | | }); |
| | | this.opt = opt; |
| | | this.selectPlace2 = `全部(共${opt.length}种)`; |
| | | this.alramData(); |
| | | if(status == 1){ |
| | | this.alramData(); |
| | | } |
| | | }, |
| | | /*查询设备历史告警记录 */ |
| | | async alramData() { |
| | | alramData:function() { |
| | | let loading = this.$layer.loading(1); |
| | | const alramaa = await deviceRecord({ |
| | | deviceRecord({ |
| | | |
| | | binf: { |
| | | StationName: this.selectValue2, |
| | |
| | | pageCurr: this.queryInfo.pageCurr, |
| | | pageSize: this.queryInfo.pagesize |
| | | } |
| | | }).then((res)=>{ |
| | | this.$layer.close(loading); |
| | | let alramaa = res; |
| | | if(alramaa.data.result && JSON.parse(alramaa.data.result).code == 1){ |
| | | const newAlrams = JSON.parse(alramaa.data.result).data; |
| | | this.total = newAlrams[newAlrams.length - 1].usr_id; |
| | | const oldSalrams = newAlrams.map((item, index) => { |
| | | item.index = index + 1; |
| | | return { |
| | | room1: item.index, |
| | | battery1: item.dev_id, |
| | | tes1: item.dev_name, |
| | | tester1: item.dev_ip, |
| | | sessdion1: item.stationName, |
| | | monomer1: item.alm_confirmed_time, |
| | | start1: item.alm_start_time, |
| | | end1: item.alm_end_time, |
| | | num: item.num, |
| | | alm_is_confirmed:item.alm_is_confirmed, |
| | | alm_level:item.alm_level, |
| | | alm_type:item.alm_type, |
| | | alm_value:item.alm_value |
| | | }; |
| | | }); |
| | | this.table.datas = oldSalrams; |
| | | }else{ |
| | | this.table.datas = []; |
| | | this.total = 0; |
| | | } |
| | | }).catch((err)=>{ |
| | | this.$layer.close(loading); |
| | | this.table.datas = []; |
| | | this.total = 0; |
| | | }); |
| | | this.$layer.close(loading); |
| | | this.table.datas = []; |
| | | this.total = 0; |
| | | |
| | | |
| | | if(alramaa.data.result && JSON.parse(alramaa.data.result).code == 1){ |
| | | const newAlrams = JSON.parse(alramaa.data.result).data; |
| | | this.total = newAlrams[newAlrams.length - 1].usr_id; |
| | | const oldSalrams = newAlrams.map((item, index) => { |
| | | item.index = index + 1; |
| | | return { |
| | | room1: item.index, |
| | | battery1: item.dev_id, |
| | | tes1: item.dev_name, |
| | | tester1: item.dev_ip, |
| | | sessdion1: item.stationName, |
| | | monomer1: item.alm_confirmed_time, |
| | | start1: item.alm_start_time, |
| | | end1: item.alm_end_time, |
| | | num: item.num, |
| | | alm_is_confirmed:item.alm_is_confirmed, |
| | | alm_level:item.alm_level, |
| | | alm_type:item.alm_type, |
| | | alm_value:item.alm_value |
| | | }; |
| | | }); |
| | | this.table.datas = oldSalrams; |
| | | } |
| | | |
| | | |
| | | }, |
| | | /* 删除 */ |
| | |
| | | this.$message.success("删除成功"); |
| | | this.alramData(); |
| | | }, |
| | | //selectValue1改变事件 |
| | | //维护区改变事件 |
| | | changeSelect1() { |
| | | this.selectValue2 = ''; |
| | | this.deviceList(); |
| | | this.sesston(); |
| | | this.sesston(1); |
| | | }, |
| | | /* 显示条数改变时 */ |
| | | handleSizeChange(val) { |