<template>
|
<flex-layout>
|
<div slot="header">
|
<number-total-tabs
|
ref="levels"
|
:total="alarmTotal"
|
:level1="levelRes.one"
|
:level2="levelRes.two"
|
:level3="levelRes.three"
|
:level4="levelRes.four"
|
@change="totalTabChange"
|
:is-show-tools="true"
|
@changeCheck="changeCheck"
|
></number-total-tabs>
|
<div class="table-layout filter-box-table">
|
<div class="table-row">
|
<div class="table-cell text-right">维护区:</div>
|
<div class="table-cell">
|
<el-select
|
filterable
|
v-model="selectValue1"
|
placeholder="请选择维护区"
|
size="small"
|
class="weihu"
|
@change="changeSelect1"
|
>
|
<el-option
|
v-for="item in vindicate"
|
:key="item.label"
|
:label="item.label"
|
:value="item.value"
|
>
|
</el-option>
|
</el-select>
|
</div>
|
<div class="table-cell text-right">机房站点:</div>
|
<div class="table-cell">
|
<el-select
|
filterable
|
v-model="selectValue2"
|
@change="storageBatterys"
|
placeholder="请选择机房站点"
|
size="small"
|
class="rooms"
|
>
|
<el-option
|
v-for="(item, idx) in newRoms"
|
:key="'newRoms_' + idx"
|
:label="item.label"
|
:value="item.value"
|
></el-option>
|
</el-select>
|
</div>
|
<div class="table-cell text-right">蓄电池组:</div>
|
<div class="table-cell">
|
<el-select
|
filterable
|
v-model="selectValue3"
|
placeholder="请选择蓄电池组"
|
size="small"
|
class="dainchi"
|
@change="sendMessage"
|
>
|
<el-option :label="selectPlace3" :value="0"></el-option>
|
<el-option
|
v-for="(item, idx) in options"
|
:key="'BattGroup_' + idx"
|
:label="item.BattGroupName"
|
:value="item.battGroupId"
|
></el-option>
|
</el-select>
|
</div>
|
</div>
|
</div>
|
<!-- 告警状态警示灯 -->
|
<table class="condiOpt" border="1">
|
<tr class="trTitle">
|
<td>
|
<center>告警状态警示灯</center>
|
</td>
|
<td>
|
<center>告警条件过滤</center>
|
</td>
|
<td>
|
<center>告警阀值过滤</center>
|
</td>
|
<td>
|
<center>告警等级过滤</center>
|
</td>
|
</tr>
|
<tr class="trBody">
|
<td class="tdOne">
|
<ul class="light">
|
<li>
|
<el-tooltip
|
class="item"
|
effect="dark"
|
content="一级警告"
|
placement="bottom-end"
|
>
|
<img :src="eleOffImg" class="lampImg" />
|
</el-tooltip>
|
</li>
|
<li>
|
<el-tooltip
|
class="item"
|
effect="dark"
|
content="二级警告"
|
placement="bottom-end"
|
>
|
<img :src="eleOnImg" class="lampImg" />
|
</el-tooltip>
|
</li>
|
<li>
|
<el-tooltip
|
class="item"
|
effect="dark"
|
content="三级警告"
|
placement="bottom-end"
|
>
|
<img :src="eleOffImg" class="lampImg" />
|
</el-tooltip>
|
</li>
|
<li>
|
<el-tooltip
|
class="item"
|
effect="dark"
|
content="四级警告"
|
placement="bottom-end"
|
>
|
<img :src="eleOffImg" class="lampImg" />
|
</el-tooltip>
|
</li>
|
</ul>
|
</td>
|
<td class="tdTwo">
|
<ul class="inputOne">
|
<li>
|
<el-checkbox v-model="checkbox.usr_id.bol"
|
>在线电压</el-checkbox
|
>
|
</li>
|
<li>
|
<el-checkbox v-model="checkbox.fault_type_id.bol"
|
>组端电压</el-checkbox
|
>
|
</li>
|
<li>
|
<el-checkbox v-model="checkbox.uname.bol">漏液电压</el-checkbox>
|
</li>
|
<li>
|
<el-checkbox v-model="checkbox.fault_level.bol"
|
>充电电流</el-checkbox
|
>
|
</li>
|
<li>
|
<el-checkbox v-model="checkbox.record_uid.bol"
|
>放电电流</el-checkbox
|
>
|
</li>
|
<li>
|
<el-checkbox v-model="checkbox.maint_type_id.bol"
|
>单体电压</el-checkbox
|
>
|
</li>
|
<li>
|
<el-checkbox v-model="checkbox.maint_close.bol"
|
>单体内阻</el-checkbox
|
>
|
</li>
|
<li>
|
<el-checkbox v-model="checkbox.maint_done.bol"
|
>单体温度</el-checkbox
|
>
|
</li>
|
</ul>
|
</td>
|
<td class="tdTree">
|
<ul class="inputOne">
|
<li>
|
<el-checkbox v-model="checkbox.alm_id.bol"
|
>上限告警</el-checkbox
|
>
|
</li>
|
<li>
|
<el-checkbox v-model="checkbox.alm_signal_id.bol"
|
>下限告警</el-checkbox
|
>
|
</li>
|
</ul>
|
</td>
|
<td class="tdFrou">
|
<ul class="inputOne">
|
<li>
|
<el-checkbox v-model="checkbox.Level_one_warn.bol"
|
>一级告警</el-checkbox
|
>
|
</li>
|
<li>
|
<el-checkbox v-model="checkbox.Level_two_warn.bol"
|
>二级告警</el-checkbox
|
>
|
</li>
|
<li>
|
<el-checkbox v-model="checkbox.master_audit.bol"
|
>三级告警</el-checkbox
|
>
|
</li>
|
<li>
|
<el-checkbox v-model="checkbox.appoint_uid.bol"
|
>四级告警</el-checkbox
|
>
|
</li>
|
</ul>
|
</td>
|
</tr>
|
</table>
|
</div>
|
<el-tabs
|
v-model="acTabs"
|
type="border-card"
|
class="flex-layout noborder"
|
@tab-click="tabClick"
|
>
|
<el-tab-pane label="未确认告警" name="unconfirmed">
|
<span slot="label">
|
未确认告警
|
<el-badge class="mark" :value="total1" />
|
</span>
|
<flex-layout>
|
<!-- 表单 -->
|
<div class="flex-page-content">
|
<el-table
|
id="batteryrTimequeryTable"
|
stripe
|
row-key="num"
|
size="small"
|
:data="table1.datas"
|
height="100%"
|
class="tableCent"
|
ref="unconfirmTable"
|
tooltip-effect="light"
|
@selection-change="handleSelect"
|
>
|
<el-table-column
|
type="selection"
|
width="50"
|
align="center"
|
>
|
<template slot-scope="{ row }">
|
<el-checkbox :disabled="!isRowSelectable(row)" :value=isSelected(row) @change="handleSelectChange(row, $event)"></el-checkbox>
|
</template>
|
</el-table-column>
|
<el-table-column label="编号" type="index" width="50">
|
</el-table-column>
|
<el-table-column
|
v-for="header in table1.headers"
|
:key="header.prop"
|
:prop="header.prop"
|
:label="header.label"
|
:width="header.width"
|
:min-width="header.minWidth"
|
show-overflow-tooltip
|
align="center"
|
></el-table-column>
|
<el-table-column label="确认告警" align="center" :width="80">
|
<template slot-scope="scope">
|
<el-checkbox
|
v-model="scope.row.almIsConfirmed"
|
disabled
|
></el-checkbox>
|
<!-- <input type="checkbox" disabled :checked="scope.row.alarm1 && scope.row.alarm1.length > 0 ? true : false"> -->
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="cztime"
|
fixed="right"
|
width="180px"
|
align="center"
|
label="操作"
|
>
|
<template slot-scope="scope">
|
<el-button
|
type="primary"
|
size="mini"
|
@click="goRealTime(scope.row)"
|
>实时</el-button
|
>
|
<el-popover
|
placement="top-start"
|
style="margin-left: 8px"
|
trigger="hover"
|
>
|
<div class="table-tools-more">
|
<el-button
|
:disabled="!isCanConfirm"
|
type="primary"
|
size="mini"
|
@click="okAlarm(scope.row)"
|
>确认告警</el-button
|
>
|
<el-button
|
:disabled="!isCanQuit"
|
type="success"
|
size="mini"
|
@click="deleteUser(scope.row)"
|
>取消告警</el-button
|
>
|
<el-button
|
:disabled="!isCanDel"
|
type="danger"
|
size="mini"
|
@click="delteTim(scope.row, 0)"
|
>删除</el-button
|
>
|
<el-button
|
v-if="isHZSJ"
|
type="danger"
|
size="mini"
|
@click="dispatch(scope.row, 0)"
|
>派单</el-button
|
>
|
<el-button
|
v-if="isInGroup"
|
type="warning"
|
size="mini"
|
@click="showUploadDialog(scope.row)"
|
>故障上传</el-button
|
>
|
</div>
|
<el-button slot="reference" type="success" size="mini"
|
>更多</el-button
|
>
|
</el-popover>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
<!-- 底部分页 -->
|
<div class="flex-page-footer" slot="footer">
|
<div class="el-pagination-btns">
|
<el-button
|
type="primary"
|
round
|
size="mini"
|
icon="el-icon-search"
|
@click="sendMessage"
|
>查询</el-button
|
>
|
<el-button
|
type="primary"
|
round
|
size="mini"
|
icon="el-icon-wallet"
|
@click="exportData(1)"
|
>导出</el-button
|
>
|
</div>
|
<el-pagination
|
class="pagess"
|
@size-change="handleSizeChange1"
|
@current-change="handleCurrentChange1"
|
:current-page="queryInfo1.pagenum"
|
:page-sizes="[10, 20, 30, 50, 100]"
|
:page-size="queryInfo1.pagesize"
|
layout="total, sizes, prev, pager, next, jumper"
|
:total="total1"
|
></el-pagination>
|
<el-button
|
type="danger"
|
size="mini"
|
@click="batchOkAlarm()"
|
>批量确认告警</el-button
|
>
|
<!-- <el-button type="primary" round size="mini" icon="el-icon-wallet">全部选中</el-button> -->
|
</div>
|
</flex-layout>
|
</el-tab-pane>
|
<el-tab-pane label="已确认告警" name="confirmed">
|
<span slot="label">
|
已确认告警
|
<el-badge class="mark" :value="total2" />
|
</span>
|
<flex-layout>
|
<!-- 表单 -->
|
<div class="flex-page-content">
|
<el-table
|
id="batteryrTimequeryTable"
|
stripe
|
size="small"
|
:data="table2.datas"
|
tooltip-effect="light"
|
height="100%"
|
class="tableCent"
|
>
|
<el-table-column label="编号" type="index" width="50">
|
</el-table-column>
|
<el-table-column
|
v-for="header in table2.headers"
|
:key="header.prop"
|
:prop="header.prop"
|
:label="header.label"
|
:width="header.width"
|
:min-width="header.minWidth"
|
show-overflow-tooltip
|
align="center"
|
></el-table-column>
|
<el-table-column label="确认告警" align="center" :width="80">
|
<template slot-scope="scope">
|
<el-checkbox
|
v-model="scope.row.almIsConfirmed"
|
disabled
|
></el-checkbox>
|
<!-- <input type="checkbox" disabled :checked="scope.row.alarm1 && scope.row.alarm1.length > 0 ? true : false"> -->
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="cztime"
|
fixed="right"
|
width="180px"
|
align="center"
|
label="操作"
|
>
|
<template slot-scope="scope">
|
<el-button
|
type="primary"
|
size="mini"
|
@click="goRealTime(scope.row)"
|
>实时</el-button
|
>
|
<el-popover
|
placement="top-start"
|
style="margin-left: 8px"
|
trigger="hover"
|
>
|
<div class="table-tools-more">
|
<el-button
|
:disabled="!isCanQuit"
|
type="success"
|
size="mini"
|
@click="deleteUser(scope.row)"
|
>取消告警</el-button
|
>
|
<el-button
|
:disabled="!isCanDel"
|
type="danger"
|
size="mini"
|
@click="delteTim(scope.row, 1)"
|
>删除</el-button
|
>
|
<el-button
|
v-if="isHZSJ"
|
type="danger"
|
size="mini"
|
@click="dispatch(scope.row, 0)"
|
>派单</el-button
|
>
|
<el-button
|
v-if="isInGroup"
|
type="warning"
|
size="mini"
|
@click="showUploadDialog(scope.row)"
|
>故障上传</el-button
|
>
|
</div>
|
<el-button slot="reference" type="success" size="mini"
|
>更多</el-button
|
>
|
</el-popover>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
<!-- 底部分页 -->
|
<div class="flex-page-footer" slot="footer">
|
<div class="el-pagination-btns">
|
<el-button
|
type="primary"
|
round
|
size="mini"
|
icon="el-icon-search"
|
@click="sendMessage"
|
>查询</el-button
|
>
|
<el-button
|
type="primary"
|
round
|
size="mini"
|
icon="el-icon-wallet"
|
@click="exportData(2)"
|
>导出</el-button
|
>
|
</div>
|
<el-pagination
|
class="pagess"
|
@size-change="handleSizeChange2"
|
@current-change="handleCurrentChange2"
|
:current-page="queryInfo2.pagenum"
|
:page-sizes="[10, 20, 30, 50, 100]"
|
:page-size="queryInfo2.pagesize"
|
layout="total, sizes, prev, pager, next, jumper"
|
:total="total2"
|
></el-pagination>
|
<!-- <el-button type="primary" round size="mini" icon="el-icon-wallet">全部选中</el-button> -->
|
</div>
|
</flex-layout>
|
</el-tab-pane>
|
<el-tab-pane label="待处理告警" name="needDispose">
|
<span slot="label">
|
待处理告警
|
<el-badge class="mark" :value="total3" />
|
</span>
|
<flex-layout>
|
<!-- 表单 -->
|
<div class="flex-page-content">
|
<el-table
|
id="batteryrTimequeryTable"
|
stripe
|
size="small"
|
:data="table3.datas"
|
tooltip-effect="light"
|
height="100%"
|
class="tableCent"
|
>
|
<el-table-column label="编号" type="index" width="50">
|
</el-table-column>
|
<el-table-column
|
v-for="header in table3.headers"
|
:key="header.prop"
|
:prop="header.prop"
|
:label="header.label"
|
:width="header.width"
|
:min-width="header.minWidth"
|
show-overflow-tooltip
|
align="center"
|
></el-table-column>
|
<el-table-column label="确认告警" align="center" :width="80">
|
<template slot-scope="scope">
|
<el-checkbox
|
v-model="scope.row.almIsConfirmed"
|
disabled
|
></el-checkbox>
|
<!-- <input type="checkbox" disabled :checked="scope.row.alarm1 && scope.row.alarm1.length > 0 ? true : false"> -->
|
</template>
|
</el-table-column>
|
<el-table-column
|
prop="cztime"
|
fixed="right"
|
width="240px"
|
align="center"
|
label="操作"
|
>
|
<template slot-scope="scope">
|
<el-button
|
type="primary"
|
size="mini"
|
@click="goRealTime(scope.row)"
|
>实时</el-button
|
>
|
<el-button
|
v-if="isInGroup && !scope.row.main"
|
type="warning"
|
size="mini"
|
@click="showUploadDialog(scope.row)"
|
>故障上传</el-button
|
>
|
<el-button
|
type="danger"
|
:class="{
|
disabled: !scope.row.main || scope.row.main.status != 2,
|
}"
|
size="mini"
|
@click="verify(scope.row)"
|
>处理</el-button
|
>
|
</template>
|
</el-table-column>
|
</el-table>
|
</div>
|
<!-- 底部分页 -->
|
<div class="flex-page-footer" slot="footer">
|
<div class="el-pagination-btns">
|
<el-button
|
type="primary"
|
round
|
size="mini"
|
icon="el-icon-search"
|
@click="sendMessage"
|
>查询</el-button
|
>
|
<el-button
|
type="primary"
|
round
|
size="mini"
|
icon="el-icon-wallet"
|
@click="exportVerifyData()"
|
>导出</el-button
|
>
|
</div>
|
<el-pagination
|
class="pagess"
|
@size-change="handleSizeChange3"
|
@current-change="handleCurrentChange3"
|
:current-page="queryInfo3.pagenum"
|
:page-sizes="[10, 20, 30, 50, 100]"
|
:page-size="queryInfo3.pagesize"
|
layout="total, sizes, prev, pager, next, jumper"
|
:total="total3"
|
></el-pagination>
|
<!-- <el-button type="primary" round size="mini" icon="el-icon-wallet">全部选中</el-button> -->
|
</div>
|
</flex-layout>
|
</el-tab-pane>
|
</el-tabs>
|
<!-- 告警派单 -->
|
<el-dialog
|
title="告警派单"
|
width="400px"
|
:visible.sync="alarmVisible"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center dialog-bg"
|
:modal-append-to-body="false"
|
>
|
<dispatch-form @close="alarmVisible = false"></dispatch-form>
|
</el-dialog>
|
<alarm-details :visible.sync="detailsVisible"></alarm-details>
|
<!-- 故障上报 -->
|
<el-dialog
|
title="故障上报"
|
width="auto"
|
:visible.sync="uploadVisible"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center"
|
:modal-append-to-body="false"
|
>
|
<upload-error
|
:visible.sync="uploadVisible"
|
v-if="uploadVisible"
|
:stationId="uploadInfo.stationId"
|
:type="2"
|
:alarm-type="1"
|
:alarm-num="currAlarmNum"
|
:description="uploadInfo.alarmName"
|
@success="handleCurrentChange3(1)"
|
></upload-error>
|
</el-dialog>
|
<!-- 告警处理 -->
|
<el-dialog
|
title="告警处理"
|
width="640px"
|
:visible.sync="verifyVisible"
|
:close-on-click-modal="false"
|
top="0"
|
class="dialog-center dialog-verify"
|
:modal-append-to-body="false"
|
>
|
<verify-form
|
v-if="verifyVisible"
|
:info="currAlarmData"
|
@close="verifyClose"
|
></verify-form>
|
</el-dialog>
|
</flex-layout>
|
</template>
|
|
<script>
|
import {
|
getVerifyAlarm,
|
newsAlarm /*告警信息 */,
|
deletionRecord /* 删除 */,
|
reporTemergency /* 确认告警 */,
|
CancelTheAlarm /* 取消告警 */,
|
reporTemergencyBatch,
|
} from "./js/batteryrTimequery.js";
|
import {
|
searchProvince,
|
roomsStation /* 机房站点 */,
|
batterySearch /* 蓄电池组 */,
|
} from "@/assets/js/api";
|
import { listToBeConfirmed } from "./js/verify";
|
import { isHasPermit } from "@/assets/js/tools";
|
import DispatchForm from "./components/dispatchForm";
|
// 引入导出表格
|
import { export_json_to_excel, formatJson } from "@/assets/js/tools/exportFile";
|
import createWs from "@/assets/js/websocket";
|
import NumberTotalTabs from "@/views/alarmMager/components/number-total-tabs.vue";
|
import AlarmDetails from "@/views/alarmMager/components/alarm-details.vue";
|
import UploadError from "@/views/evaluationManage/dialog/uploadError.vue";
|
import VerifyForm from "./components/verify-form";
|
const WSMixin = createWs("battAlarmData");
|
const TABS = {
|
unconfirmed: 1,
|
confirmed: 2,
|
needDispose: 3,
|
};
|
export default {
|
name: "batteryrTimequery",
|
mixins: [WSMixin],
|
data() {
|
let permits = this.$store.state.user.permits;
|
let isCanConfirm = isHasPermit("batt_alm_confirm_permit", permits);
|
let isCanQuit = isHasPermit("batt_alm_clear_permit", permits);
|
let isCanDel = isHasPermit("batt_alm_delete_permit", permits);
|
let isHZSJ = this.$CFG.clientName.name == "hzsj";
|
let isInGroup = Number(sessionStorage.getItem("isInGroup")) ? true : false;
|
return {
|
alarmConfig: [],
|
currAlarmNum: 0,
|
currAlarmData: {},
|
verifyVisible: false,
|
isInGroup,
|
uploadVisible: false,
|
uploadInfo: {
|
stationId: 0,
|
type: 1,
|
alarmName: "",
|
},
|
alarmVisible: false,
|
isHZSJ,
|
skinActive: "science-blue",
|
eleOffImg: require("../../assets/images/eleOff.png"),
|
eleOnImg: require("../../assets/images/eleOn.png"),
|
isCanConfirm: isCanConfirm,
|
isCanQuit: isCanQuit,
|
isCanDel: isCanDel,
|
// 当前tab
|
acTabs: "unconfirmed",
|
queryInfo1: {
|
query: "" /* 查询 */,
|
pagenum: 1 /* 当前页码 绑定queryInfo.pagenum */,
|
pagesize: 20 /* 每页显示的数据 绑定queryInfo.pagesize */,
|
},
|
queryInfo2: {
|
query: "" /* 查询 */,
|
pagenum: 1 /* 当前页码 绑定queryInfo.pagenum */,
|
pagesize: 20 /* 每页显示的数据 绑定queryInfo.pagesize */,
|
},
|
queryInfo3: {
|
query: "" /* 查询 */,
|
pagenum: 1 /* 当前页码 绑定queryInfo.pagenum */,
|
pagesize: 20 /* 每页显示的数据 绑定queryInfo.pagesize */,
|
},
|
total1: 0 /* 总共有多少条 */,
|
total2: 0 /* 总共有多少条 */,
|
total3: 0 /* 总共有多少条 */,
|
/* 维护区 */
|
vindicate: [],
|
/* 机房站点 */
|
newRoms: [],
|
/* 蓄电池租 */
|
options: [],
|
checkbox: {
|
/* 在线电压 */
|
usr_id: {
|
bol: true,
|
value1: 119001,
|
value2: 0,
|
},
|
/* 组端电压 */
|
fault_type_id: {
|
bol: true,
|
value1: 119002,
|
value2: 0,
|
},
|
/* 漏液电压 */
|
uname: {
|
bol: true,
|
value1: 119012,
|
value2: 0,
|
},
|
fault_level: {
|
bol: true,
|
value1: 119003,
|
value2: 0,
|
} /* 充电电流 */,
|
record_uid: {
|
bol: true,
|
value1: 119004,
|
value2: 0,
|
} /* 放电电流 */,
|
Level_one_warn: {
|
bol: true,
|
value1: 1,
|
value2: 0,
|
} /*一级警告 */,
|
Level_two_warn: {
|
bol: true,
|
value1: 2,
|
value2: 0,
|
} /* 二级警告 */,
|
alm_id: {
|
bol: true,
|
value1: 1,
|
value2: 100,
|
} /* 上限告警 */,
|
maint_type_id: {
|
bol: true,
|
value1: 119005,
|
value2: 0,
|
} /* 单体电压 */,
|
maint_close: {
|
bol: true,
|
value1: 119007,
|
value2: 0,
|
} /* 单体内阻 */,
|
maint_done: {
|
bol: true,
|
value1: 119006,
|
value2: 0,
|
} /* 单体温度 */,
|
master_audit: {
|
bol: true,
|
value1: 3,
|
value2: 0,
|
} /* 三级告警 */,
|
appoint_uid: {
|
bol: true,
|
value1: 4,
|
value2: 0,
|
} /* 四级告警 */,
|
alm_signal_id: {
|
bol: true,
|
value1: 0,
|
value2: 100,
|
} /* 下限告警 */,
|
},
|
selectValue1: "",
|
selectPlace1: "",
|
selectValue2: "",
|
selectPlace2: "",
|
selectValue3: 0,
|
selectPlace3: "",
|
/* 表单 */
|
table1: {
|
headers: [
|
{
|
prop: "stationNamex",
|
label: "机房名称",
|
minWidth: 320,
|
},
|
{
|
prop: "battGroupName",
|
label: "电池组名称",
|
width: 120,
|
},
|
{
|
prop: "alarmName",
|
label: "告警名称",
|
width: 162,
|
},
|
{
|
prop: "monNum",
|
label: "单体编号",
|
width: 80,
|
},
|
{
|
prop: "almValue",
|
label: "告警值",
|
width: 80,
|
},
|
{
|
prop: "almLevel",
|
label: "告警等级",
|
width: 120,
|
},
|
{
|
prop: "almSeverity",
|
label: "告警重要等级",
|
width: 120,
|
},
|
{
|
prop: "almStartTime",
|
label: "告警开始时间",
|
width: 180,
|
},
|
{
|
prop: "almConfirmedTime",
|
label: "确认告警时间",
|
width: 180,
|
},
|
],
|
datas: [],
|
},
|
table2: {
|
headers: [
|
{
|
prop: "stationNamex",
|
label: "机房名称",
|
minWidth: 320,
|
},
|
{
|
prop: "battGroupName",
|
label: "电池组名称",
|
width: 120,
|
},
|
{
|
prop: "alarmName",
|
label: "告警名称",
|
width: 162,
|
},
|
{
|
prop: "monNum",
|
label: "单体编号",
|
width: 80,
|
},
|
{
|
prop: "almValue",
|
label: "告警值",
|
width: 80,
|
},
|
{
|
prop: "almLevel",
|
label: "告警等级",
|
width: 120,
|
},
|
{
|
prop: "almSeverity",
|
label: "告警重要等级",
|
width: 120,
|
},
|
{
|
prop: "almStartTime",
|
label: "告警开始时间",
|
width: 180,
|
},
|
{
|
prop: "almConfirmedTime",
|
label: "确认告警时间",
|
width: 180,
|
},
|
],
|
datas: [],
|
},
|
table3: {
|
headers: [
|
{
|
prop: "stationNamex",
|
label: "机房名称",
|
minWidth: 320,
|
},
|
{
|
prop: "battGroupName",
|
label: "电池组名称",
|
width: 120,
|
},
|
{
|
prop: "alarmName",
|
label: "告警名称",
|
width: 162,
|
},
|
{
|
prop: "monNum",
|
label: "单体编号",
|
width: 80,
|
},
|
{
|
prop: "almValue",
|
label: "告警值",
|
width: 80,
|
},
|
{
|
prop: "almLevel",
|
label: "告警等级",
|
width: 120,
|
},
|
{
|
prop: "almSeverity",
|
label: "告警重要等级",
|
width: 120,
|
},
|
{
|
prop: "almStartTime",
|
label: "告警开始时间",
|
width: 180,
|
},
|
{
|
prop: "almConfirmedTime",
|
label: "确认告警时间",
|
width: 180,
|
},
|
],
|
datas: [],
|
},
|
// 第一次查询
|
isFirstQuery: false,
|
levelRes: {
|
one: 0,
|
two: 0,
|
three: 0,
|
four: 0,
|
},
|
detailsVisible: false,
|
selectedRows: [],
|
selectNums: [],
|
backupSelectedNums: [],
|
};
|
},
|
components: {
|
UploadError,
|
AlarmDetails,
|
NumberTotalTabs,
|
DispatchForm,
|
VerifyForm,
|
},
|
mounted() {
|
this.listToBeConfirmed();
|
// 根据告警类型勾选筛选条件
|
let alarmType = this.$route.query.alarmType;
|
if (alarmType) {
|
Object.keys(this.checkbox).forEach((key) => {
|
let item = this.checkbox[key];
|
if (item.value1 == alarmType) {
|
item.bol = true;
|
} else {
|
if (Number(item.value1) > 1000) {
|
item.bol = false;
|
}
|
}
|
});
|
}
|
|
// 告警等级
|
let alarmLevel = this.$route.query.alarmLevel;
|
if (alarmLevel) {
|
this.$refs.levels.changeHandle(alarmLevel);
|
}
|
|
this.vindicateData(); /* 维护区 */
|
this.computerSite(); /*机房站点 */
|
this.storageBatterys(); /* 蓄电池组 */
|
// this.sendMessage(); /* 告警信息 */
|
// this.startTimer(); /* 定时请求 */
|
},
|
methods: {
|
listToBeConfirmed() {
|
listToBeConfirmed(1)
|
.then((res) => {
|
let { code, data } = res.data;
|
let list = [];
|
if (code && data) {
|
list = data;
|
}
|
this.alarmConfig = list;
|
})
|
.catch((err) => {
|
console.log(err);
|
});
|
},
|
showUploadDialog(data) {
|
// console.log(data);
|
if (!this.alarmConfig.some((v) => v == data.almType)) {
|
this.$message.error("当前告警不需要手动处理, 不能上报");
|
return false;
|
}
|
this.uploadInfo.stationId = data.stationId;
|
this.uploadInfo.alarmName = data.alarmName;
|
this.currAlarmNum = data.almSoleKey || data.num;
|
this.uploadVisible = true;
|
},
|
refreshFN() {
|
// 告警等级
|
let alarmLevel = this.$route.query.alarmLevel;
|
if (alarmLevel) {
|
// console.log(alarmLevel, "====act?");
|
this.$refs.levels.changeHandle(alarmLevel);
|
}
|
this.acTabs = "unconfirmed";
|
if (
|
this.$route.query.pageFlag &&
|
this.$route.query.pageFlag != this.pageFlag
|
) {
|
this.selectValue1 = this.$route.query.province;
|
this.selectValue2 =
|
this.$route.query.province +
|
"-" +
|
this.$route.query.city +
|
"-" +
|
this.$route.query.county +
|
"-" +
|
this.$route.query.home;
|
this.storageBatterys();
|
this.sendMessage();
|
}
|
},
|
tabClick(tab) {
|
this.acTabs = tab.name;
|
this["handleCurrentChange" + TABS[this.acTabs]](1);
|
},
|
// 导出表格
|
exportFile(list, idx) {
|
let tHeader = [];
|
let filterVal = [];
|
this.table1.headers.map((item, index) => {
|
tHeader.push(item.label);
|
filterVal.push(item.prop);
|
});
|
tHeader.push("确认告警");
|
filterVal.push("almIsConfirmed1");
|
let excelData = formatJson(filterVal, list);
|
let fileName = [
|
"电池告警实时数据-未确认",
|
"电池告警实时数据-已确认",
|
"电池告警-待处理",
|
][idx - 1];
|
export_json_to_excel(tHeader, excelData, fileName);
|
},
|
isRowSelectable(row) {
|
return row.alarmLevel != 1;
|
},
|
updateSelectionState() {
|
// console.log('updateSelectionState ?', '=============');
|
this.$nextTick(() => {
|
// console.log('updateSelectionState', JSON.stringify(this.backupSelectedNums), '=============');
|
|
this.backupSelectedNums.forEach(num => {
|
const row = this.table1.datas.find(item => item.num === num);
|
if (row) this.$refs.unconfirmTable.toggleRowSelection(row, true);
|
});
|
});
|
|
},
|
isSelected(row) {
|
return this.backupSelectedNums.includes(row.num);
|
},
|
handleSelectChange(row, checked) {
|
// console.log('handleSelectChange?', '=============');
|
|
if (row.alarmLevel == 1) return; // 禁用行直接返回
|
const index = this.selectNums.indexOf(row.num);
|
if (checked && index === -1) {
|
this.selectNums.push(row.num);
|
} else if (!checked && index > -1) {
|
this.selectNums.splice(index, 1);
|
}
|
|
},
|
handleSelect(data) {
|
// console.log('handleSelect ?', data, '=============');
|
let nums = [];
|
let selectedRows = [];
|
// console.log('handleSelect ', data, '=============');
|
for (let i = 0, len = data.length; i < len; i++) {
|
if (data[i].alarmLevel != 1) {
|
nums.push(data[i].num);
|
selectedRows.push(data[i]);
|
} else {
|
this.$refs.unconfirmTable.toggleRowSelection(data[i], false);
|
}
|
}
|
// console.log('nums', nums, 'selectedRows', selectedRows, '=============');
|
|
this.selectNums = nums;
|
// this.backupSelectedNums = nums;
|
// this.selectedRows = data.filter(row => row.alarmLevel != 1);
|
this.selectedRows = selectedRows;
|
|
|
},
|
// 批量确认
|
batchOkAlarm() {
|
const selectedData = this.selectedRows;
|
if (selectedData.length === 0) {
|
this.$message.error("请至少选择一条数据");
|
return false;
|
}
|
if (selectedData.some(row => row.alarmLevel == 1)) {
|
this.$message.error("一级告警不能批量确认");
|
return false;
|
}
|
|
|
let nums = selectedData.map(row => row.num);
|
// console.log('nums', nums, '=============');
|
|
let loading = this.$layer.loading();
|
reporTemergencyBatch(nums).then((res) => {
|
let { code, data } = res.data;
|
this.$layer.close(loading);
|
if (code && data) {
|
this.$message.success("操作成功");
|
this.sendMessage();
|
} else {
|
this.$message.error("操作失败");
|
}
|
})
|
.catch((err) => {
|
this.$layer.close(loading);
|
console.log(err);
|
});
|
|
},
|
/* 维护区 */
|
async vindicateData() {
|
const resType = await searchProvince();
|
let res = resType.data;
|
// console.log(res, 'res====');
|
if (res.code) {
|
let typeList = res.data.map((item) => {
|
return {
|
label: item,
|
value: item,
|
};
|
});
|
let len = res.data.length;
|
typeList.unshift({
|
label: `全部(共${len}种)`,
|
value: "",
|
});
|
this.vindicate = typeList;
|
this.selectPlace1 = `全部(共${len}种)`;
|
}
|
},
|
/* 机房站点 */
|
async computerSite() {
|
const roomsSeation = await roomsStation({
|
stationName1: this.selectValue1,
|
});
|
let res = roomsSeation.data;
|
if (res.code) {
|
// console.log(res.data, "===data", this.selectValue1);
|
let newRoms = res.data.map((item) => {
|
return {
|
label: item,
|
value: item,
|
};
|
});
|
let len = res.data.length;
|
newRoms.unshift({
|
label: `全部(共${len}种)`,
|
value: "",
|
});
|
this.newRoms = newRoms;
|
this.selectPlace2 = `全部(共${len}种)`;
|
}
|
},
|
/* 蓄电池组 */
|
async storageBatterys() {
|
// 初始化值
|
this.selectValue3 = 0;
|
// 构造查询条件
|
const batteryss = await batterySearch({
|
stationName1: this.selectValue1,
|
stationName: this.selectValue2,
|
});
|
let res = batteryss.data;
|
if (res.code) {
|
let options = res.data.map((item) => {
|
item.BattGroupName = `${item.battGroupName}-${item.monCount}节`;
|
return item;
|
});
|
this.options = options;
|
this.selectPlace3 = `全部(共${options.length}种)`;
|
}
|
// 查询告警信息
|
this.sendMessage();
|
},
|
/* 告警信息 */
|
paramsAlram(data) {
|
let levelRes = data.levelRes.data2;
|
this.levelRes.one = levelRes[0];
|
this.levelRes.two = levelRes[1];
|
this.levelRes.three = levelRes[2];
|
this.levelRes.four = levelRes[3];
|
|
this.paramsAlram1(data.unconfirmedAlarms);
|
this.paramsAlram2(data.confirmedAlarms);
|
this.paramsAlram3(data.verifyListRes);
|
},
|
formatParams(isExportFile) {
|
// 判断是否导出全部 === 不能删除,防止isExPortFile={}
|
isExportFile = isExportFile === true;
|
let params = {};
|
Object.keys(this.checkbox).forEach((item, index) => {
|
if (this.checkbox[item].bol) {
|
params[item] = this.checkbox[item].value1;
|
} else {
|
params[item] = this.checkbox[item].value2;
|
}
|
});
|
let param = {
|
almIdOne: params.usr_id,
|
almIdTwo: params.fault_type_id,
|
almIdThree: params.uname,
|
almIdFour: params.fault_level,
|
almIdFive: params.record_uid,
|
almIdSix: params.maint_type_id,
|
almIdSeven: params.maint_close,
|
almIdEight: params.maint_done,
|
almIsConfirmed: 0,
|
almLevelFour: params.appoint_uid,
|
almLevelOne: params.Level_one_warn,
|
almLevelThree: params.master_audit,
|
almLevelTwo: params.Level_two_warn,
|
almSignalIdOne: params.alm_id,
|
almSignalIdTwo: params.alm_signal_id,
|
battGroupId: this.selectValue3 ? this.selectValue3 : 0,
|
page: {
|
pageCurr: this["queryInfo" + TABS[this.acTabs]].pagenum,
|
pageSize: this["queryInfo" + TABS[this.acTabs]].pagesize,
|
},
|
stationname: this.selectValue2,
|
stationname1: this.selectValue1,
|
uId: sessionStorage.getItem("userId"),
|
// 有个接口在传这个参数
|
uid: sessionStorage.getItem("userId"),
|
};
|
|
if (isExportFile) {
|
param.page.pageCurr = 1;
|
param.page.pageSize = this["total" + TABS[this.acTabs]];
|
}
|
return param;
|
},
|
/* 告警信息未确认 */
|
paramsAlram1(res, isExportFile) {
|
isExportFile = isExportFile === true;
|
let loading;
|
if (this.isFirstQuery) {
|
loading = this.$layer.loading(1);
|
}
|
|
this.isFirstQuery = false;
|
loading && this.$layer.close(loading); // 关闭等待框
|
if (res.code) {
|
let data = res.data;
|
this.total1 = data.total;
|
let list = [];
|
data.list.forEach((v) => {
|
let { stationName1, stationName2, stationName3, stationName5 } = v;
|
let stationName = {
|
stationName1,
|
stationName2,
|
stationName3,
|
stationName5,
|
};
|
let stationNamex = stationName5 + "-" + stationName3;
|
let battGroupName = v.battGroupName;
|
let battGroupId = v.battGroupId;
|
let stationId = v.stationId;
|
v.adatas.forEach((item) => {
|
list.push({
|
almType: item.almId,
|
stationName,
|
stationNamex,
|
battGroupName,
|
battGroupId,
|
stationId,
|
num: item.num,
|
alarmName: item.almSignalIdName,
|
monNum: item.monNum == 0 ? "-" : item.monNum,
|
almValue: item.almValue,
|
almLevel: item.almLevelName,
|
alarmLevel: item.almLevel,
|
almStartTime: item.almStartTime,
|
almConfirmedTime: "",
|
almIsConfirmed: false,
|
almIsConfirmed1: "否",
|
almSeverity: item.almSeverity == 0 ? "重要" : "紧急",
|
});
|
});
|
});
|
if (isExportFile) {
|
this.exportFile(list, 1);
|
} else {
|
// console.log('update tabledata', JSON.stringify(this.selectNums), '=============');
|
|
this.backupSelectedNums = [...this.selectNums];
|
this.table1.datas = list;
|
this.updateSelectionState();
|
}
|
} else {
|
this.total1 = 0;
|
this.table1.datas = [];
|
}
|
// console.log("newsAlaa", newsAlaa);
|
},
|
/* 告警信息已确认 */
|
paramsAlram2(res, isExportFile) {
|
isExportFile = isExportFile === true;
|
let loading;
|
if (this.isFirstQuery) {
|
loading = this.$layer.loading(1);
|
}
|
|
this.isFirstQuery = false;
|
loading && this.$layer.close(loading); // 关闭等待框
|
if (res.code) {
|
let data = res.data;
|
this.total2 = data.total;
|
let list = [];
|
data.list.forEach((v) => {
|
let { stationName1, stationName2, stationName3, stationName5 } = v;
|
let stationName = {
|
stationName1,
|
stationName2,
|
stationName3,
|
stationName5,
|
};
|
let stationNamex = stationName5 + "-" + stationName3;
|
let battGroupName = v.battGroupName;
|
let battGroupId = v.battGroupId;
|
let stationId = v.stationId;
|
v.adatas.forEach((item) => {
|
list.push({
|
stationName,
|
stationNamex,
|
battGroupName,
|
battGroupId,
|
stationId,
|
num: item.num,
|
// TODO
|
alarmName: item.almSignalIdName,
|
monNum: item.monNum == 0 ? "-" : item.monNum,
|
almValue: item.almValue,
|
almLevel: item.almLevelName,
|
almStartTime: item.almStartTime,
|
almConfirmedTime: item.almConfirmedTime,
|
almIsConfirmed: true,
|
almIsConfirmed1: "是",
|
almSeverity: item.almSeverity == 0 ? "重要" : "紧急",
|
});
|
});
|
});
|
if (isExportFile) {
|
this.exportFile(list, 2);
|
} else {
|
this.table2.datas = list;
|
}
|
} else {
|
this.total2 = 0;
|
this.table2.datas = [];
|
}
|
},
|
paramsAlram3(res, isExportFile) {
|
isExportFile = isExportFile === true;
|
let loading;
|
if (this.isFirstQuery) {
|
loading = this.$layer.loading(1);
|
}
|
|
this.isFirstQuery = false;
|
loading && this.$layer.close(loading); // 关闭等待框
|
if (res.code) {
|
let data = res.data;
|
this.total3 = data.total;
|
let list = [];
|
data.list.forEach((v) => {
|
let { stationName1, stationName2, stationName3, stationName5 } = v;
|
let stationName = {
|
stationName1,
|
stationName2,
|
stationName3,
|
stationName5,
|
};
|
let stationNamex = stationName5 + "-" + stationName3;
|
let battGroupName = v.battgroupname;
|
let battGroupId = v.battGroupId;
|
let stationId = v.stationId;
|
list.push({
|
...v,
|
stationName,
|
stationNamex,
|
battGroupName,
|
battGroupId,
|
stationId,
|
num: v.num,
|
almType: v.almId,
|
// TODO
|
// alarmName: v.almSignalIdName,
|
monNum: v.monNum == 0 ? "-" : v.monNum,
|
almValue: v.almValue,
|
almLevel: ["", "一级告警", "二级告警", "三级告警", "四级告警"][
|
v.almLevel
|
],
|
almStartTime: v.almStartTime,
|
almConfirmedTime: v.almConfirmedTime,
|
almIsConfirmed: true,
|
almIsConfirmed1: "是",
|
almSeverity: v.almSeverity == 0 ? "重要" : "紧急",
|
});
|
});
|
if (isExportFile) {
|
this.exportFile(list, 3);
|
} else {
|
this.table3.datas = list;
|
}
|
} else {
|
this.total3 = 0;
|
this.table3.datas = [];
|
}
|
},
|
// 导出数据 type 1-未确认,2-未确认 TODO
|
exportData(type) {
|
let param = this.formatParams(true);
|
newsAlarm(param)
|
.then((res) => {
|
this["paramsAlram" + type](res.data, true);
|
})
|
.catch((error) => {
|
console.log(error);
|
});
|
},
|
exportVerifyData() {
|
let param = this.formatParams(true);
|
getVerifyAlarm(param)
|
.then((res) => {
|
this.paramsAlram3(res.data, true);
|
})
|
.catch((error) => {
|
console.log(error);
|
});
|
},
|
verify(obj) {
|
if (!obj.main) {
|
this.$message.error("还未提交流程,无法处理");
|
return false;
|
}
|
if (obj.main.status == 1) {
|
let processLevel =
|
{ P2: "管理层审批中", P3: "领导层审批中" }[obj.main.processLevel] ||
|
"流程状态错误";
|
this.$message.error("当前" + processLevel + ", 无法处理");
|
return false;
|
}
|
if (obj.main.status == 3) {
|
this.$message.error("当前流程被驳回, 无法处理");
|
return false;
|
}
|
this.currAlarmData = {
|
...obj,
|
// 1电池 2设备 3电源
|
alarmType: 1,
|
};
|
this.verifyVisible = true;
|
},
|
verifyClose() {
|
this.verifyVisible = false;
|
this.sendMessage();
|
},
|
/* 删除 */
|
async delteTim(val, idx) {
|
const confirmResult = await this.$confirm(
|
"此操作将永久删除该记录, 是否继续?",
|
"提示",
|
{
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning",
|
}
|
).catch((err) => err);
|
if (confirmResult !== "confirm") {
|
return;
|
}
|
const del = await deletionRecord({ num: val.num });
|
let res = del.data;
|
if (res.code) {
|
this.$message.success("删除成功");
|
if (idx) {
|
if (this.queryInfo2.pagenum != 1 && this.table2.datas.length == 1) {
|
this.queryInfo2.pagenum--;
|
}
|
} else {
|
if (this.queryInfo1.pagenum != 1 && this.table1.datas.length == 1) {
|
this.queryInfo1.pagenum--;
|
}
|
}
|
/* 重新获取用户列表数据*/
|
this.sendMessage();
|
} else {
|
this.$message.error("删除失败");
|
}
|
},
|
createSearch(data) {
|
return (
|
"?province=" +
|
data.stationName1 +
|
"&city=" +
|
data.stationName2 +
|
"&county=" +
|
data.stationName5 +
|
"&home=" +
|
data.stationName3
|
);
|
},
|
goRealTime(data) {
|
let search = this.createSearch(data.stationName);
|
this.$router.push(
|
"/dataTest/movingRingSystem" +
|
search +
|
"&batt=" +
|
data.battGroupId +
|
"&listReload=1"
|
);
|
},
|
// goHistory(data) {
|
// let search = getSearch(data.stationName);
|
// this.$router.push("/dataTest/history" + search);
|
// },
|
/*确认告警 */
|
async okAlarm(vlas) {
|
const confirmResult = await this.$confirm(
|
"确定这条告警记录, 是否继续?",
|
"提示",
|
{
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning",
|
}
|
).catch((err) => err);
|
if (confirmResult !== "confirm") {
|
return;
|
}
|
// console.log(vlas, 'vlas======');
|
const wk = await reporTemergency({ num: vlas.num });
|
// console.log('wk=====',wk);
|
let res = wk.data;
|
if (res.code) {
|
this.sendMessage();
|
this.$message.success("确认成功");
|
} else {
|
this.$message.error("确认失败");
|
}
|
},
|
/* 取消告警 */
|
async deleteUser(vla) {
|
const confirmResult = await this.$confirm(
|
"确定取消这条告警记录吗, 是否继续?",
|
"提示",
|
{
|
confirmButtonText: "确定",
|
cancelButtonText: "取消",
|
type: "warning",
|
}
|
).catch((err) => err);
|
if (confirmResult !== "confirm") {
|
return;
|
}
|
const wkk = await CancelTheAlarm({
|
num: vla.num,
|
});
|
let res = wkk.data;
|
if (res.code) {
|
this.sendMessage();
|
this.$message.success("操作成功");
|
} else {
|
this.$message.error("操作失败");
|
}
|
},
|
//selectValue1改变事件
|
changeSelect1() {
|
this.selectValue2 = "";
|
this.selectValue3 = 0;
|
this.computerSite(); /*机房站点 */
|
this.storageBatterys(); /* 蓄电池组 */
|
},
|
handleSizeChange1(newSize) {
|
this.queryInfo1.pagesize = newSize;
|
/*console.log(`每页 ${val} 条`); */
|
this.sendMessage();
|
},
|
handleCurrentChange1(newPage) {
|
this.queryInfo1.pagenum = newPage;
|
/*console.log(`当前页: ${val}`); */
|
this.sendMessage();
|
},
|
handleSizeChange2(newSize) {
|
this.queryInfo2.pagesize = newSize;
|
/*console.log(`每页 ${val} 条`); */
|
this.sendMessage();
|
},
|
handleCurrentChange2(newPage) {
|
this.queryInfo2.pagenum = newPage;
|
/*console.log(`当前页: ${val}`); */
|
this.sendMessage();
|
},
|
handleSizeChange3(newSize) {
|
this.queryInfo3.pagesize = newSize;
|
/*console.log(`每页 ${val} 条`); */
|
this.sendMessage();
|
},
|
handleCurrentChange3(newPage) {
|
this.queryInfo3.pagenum = newPage;
|
/*console.log(`当前页: ${val}`); */
|
this.sendMessage();
|
},
|
dispatch(row) {
|
console.log(row);
|
this.alarmVisible = true;
|
},
|
onWSOpen() {
|
this.sendMessage();
|
},
|
sendMessage() {
|
if (!this.isWSOpen) {
|
return false;
|
}
|
let params = this.formatParams();
|
console.log("====", params, JSON.stringify(params));
|
this.SOCKET.send(JSON.stringify(params));
|
},
|
onWSMessage(res) {
|
res = JSON.parse(res.data);
|
let data = res.data;
|
// console.log(data, "=====data");
|
this.paramsAlram(data);
|
},
|
changeSkin() {
|
this.$nextTick(() => {
|
if (this.skinActive == "science-black") {
|
this.eleOffImg = require("../../assets/images/eleOff-black.png");
|
this.eleOnImg = require("../../assets/images/eleOn-black.png");
|
} else if (this.skinActive == "science-green") {
|
this.eleOffImg = require("../../assets/images/eleOff-black.png");
|
this.eleOnImg = require("../../assets/images/eleOn-black.png");
|
} else if (this.skinActive == "science-blue") {
|
this.eleOffImg = require("../../assets/images/eleOff.png");
|
this.eleOnImg = require("../../assets/images/eleOn.png");
|
}
|
});
|
},
|
totalTabChange(key) {
|
this.checkbox.Level_one_warn.bol = false;
|
this.checkbox.Level_two_warn.bol = false;
|
this.checkbox.master_audit.bol = false;
|
this.checkbox.appoint_uid.bol = false;
|
switch (key) {
|
case 1:
|
this.checkbox.Level_one_warn.bol = true;
|
break;
|
case 2:
|
this.checkbox.Level_two_warn.bol = true;
|
break;
|
case 3:
|
this.checkbox.master_audit.bol = true;
|
break;
|
case 4:
|
this.checkbox.appoint_uid.bol = true;
|
break;
|
default:
|
this.checkbox.Level_one_warn.bol = true;
|
this.checkbox.Level_two_warn.bol = true;
|
this.checkbox.master_audit.bol = true;
|
this.checkbox.appoint_uid.bol = true;
|
break;
|
}
|
|
this.sendMessage();
|
},
|
changeCheck(state) {
|
Object.keys(this.checkbox).forEach((key) => {
|
this.checkbox[key].bol = state;
|
});
|
this.sendMessage();
|
},
|
},
|
created() {
|
if (this.$route.query.fromType == "fromIndex") {
|
this.selectValue1 = this.$route.query.province;
|
this.selectValue2 =
|
this.$route.query.province +
|
"-" +
|
this.$route.query.city +
|
"-" +
|
this.$route.query.county +
|
"-" +
|
this.$route.query.home;
|
this.storageBatterys();
|
}
|
this.skinActive = localStorage.getItem("activeSkin");
|
this.changeSkin();
|
},
|
watch: {
|
"$store.state.theme.activeSkin"(val) {
|
this.skinActive = localStorage.getItem("activeSkin");
|
this.changeSkin();
|
},
|
$route() {
|
if (
|
this.$route.query.pageFlag &&
|
this.$route.query.pageFlag != this.pageFlag
|
) {
|
this.pageFlag = this.$route.query.pageFlag;
|
this.refreshFN();
|
}
|
},
|
},
|
computed: {
|
alarmTotal() {
|
let levelRes = this.levelRes;
|
return levelRes.one + levelRes.two + levelRes.three + levelRes.four;
|
},
|
},
|
};
|
</script>
|
|
<style lang="less" scoped>
|
.table-head {
|
color: #ffff;
|
border: 1px solid #ffffff;
|
|
thead tr {
|
height: 35px;
|
}
|
|
tbody tr {
|
height: 70%;
|
}
|
}
|
|
.weihu {
|
width: 100%;
|
}
|
|
.dainchi {
|
width: 100%;
|
}
|
|
.rooms {
|
width: 100%;
|
}
|
|
/* 表单 */
|
/* .tableCent {
|
padding-top: 3px;
|
} */
|
|
/* 条件选择 */
|
.condiOpt {
|
width: 100%;
|
border: 1px solid #4ba1fa;
|
|
.trTitle {
|
height: 35px;
|
font-size: 14px;
|
font-weight: bold;
|
color: #00ffff;
|
}
|
|
/* 告警状态警示灯 */
|
.tdOne {
|
width: 15%;
|
|
.light {
|
display: flex;
|
justify-content: center;
|
align-items: center;
|
}
|
|
.light li {
|
display: inline-block;
|
margin: 20px;
|
}
|
}
|
|
/* 告警条件过滤 */
|
.tdTwo {
|
width: 30%;
|
|
.inputOne {
|
display: flex;
|
flex-wrap: wrap;
|
}
|
|
.inputOne li {
|
display: block;
|
width: 25%;
|
padding: 3px 0;
|
text-align: center;
|
}
|
}
|
|
/* 告警阀值过滤 */
|
.tdTree {
|
width: 10%;
|
|
.inputOne {
|
display: flex;
|
flex-wrap: wrap;
|
}
|
|
.inputOne li {
|
display: block;
|
width: 100%;
|
padding: 3px 0;
|
text-align: center;
|
}
|
}
|
|
/* 告警等级过滤 */
|
.tdFrou {
|
width: 15%;
|
|
.inputOne {
|
display: flex;
|
flex-wrap: wrap;
|
}
|
|
.inputOne li {
|
display: block;
|
width: 50%;
|
padding: 3px 0;
|
text-align: center;
|
}
|
}
|
}
|
|
.lampImg {
|
width: 34px;
|
}
|
|
.dialog-bg /deep/ .el-dialog__body {
|
background: #fff;
|
padding: 20px 20px 8px;
|
}
|
|
.table-tools-more {
|
background-color: #ffffff;
|
padding: 8px;
|
}
|
.el-button.disabled.disabled {
|
border-color: #ccc;
|
background-color: #ccc;
|
&:hover {
|
border-color: #ccc;
|
background-color: #ccc;
|
}
|
}
|
/* 隐藏表头选择框 */
|
:deep(.el-table__header-wrapper .el-table-column--selection .cell .el-checkbox) {
|
// display: none;
|
}
|
</style>
|