告警功能

master
13703816893 2 years ago
parent 9859ec2be7
commit 34c686ef0d

@ -81,7 +81,7 @@ export function getPictureList(data) {
}); });
} }
//实时查询 //历史图片
//获取电压-线路-杆塔等信息 //获取电压-线路-杆塔等信息
export function getSearchInfo(data) { export function getSearchInfo(data) {
return request({ return request({
@ -285,7 +285,6 @@ export function getTerminalJoggle(data) {
}); });
} }
//添加设备信息 //添加设备信息
export function addTerminalJoggle(data) { export function addTerminalJoggle(data) {
return request({ return request({
url: "/api/addTerminal", url: "/api/addTerminal",
@ -293,8 +292,15 @@ export function addTerminalJoggle(data) {
data, data,
}); });
} }
//添加设备---获取-线路-杆塔
export function getLineAndGtInfo(data) {
return request({
url: "/api/getLineAndGtList",
method: "post",
data,
});
}
//修改设备信息 //修改设备信息
export function updateTerminalJoggle(data) { export function updateTerminalJoggle(data) {
return request({ return request({
url: "/api/updateTerminal", url: "/api/updateTerminal",
@ -303,7 +309,6 @@ export function updateTerminalJoggle(data) {
}); });
} }
//删除设备信息 //删除设备信息
export function deleteTerminalJoggle(data) { export function deleteTerminalJoggle(data) {
return request({ return request({
url: "/api/deleteTerminal", url: "/api/deleteTerminal",

@ -16,7 +16,7 @@
<div class="searchBox"> <div class="searchBox">
<el-form :inline="true" :model="formdata" class="demo-form-inline"> <el-form :inline="true" :model="formdata" class="demo-form-inline">
<el-form-item label="电压等级"> <el-form-item label="电压等级">
<el-select v-model="formdata.dyid" > <el-select v-model="formdata.dyId" @change="getSearchxl">
<el-option <el-option
v-for="item in dyOptions" v-for="item in dyOptions"
:key="item.id" :key="item.id"
@ -26,7 +26,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="线路名称"> <el-form-item label="线路名称">
<el-select v-model="formdata.lineid" > <el-select v-model="formdata.lineId" @change="getSearchgt">
<el-option <el-option
v-for="item in xlOptions" v-for="item in xlOptions"
:key="item.id" :key="item.id"
@ -36,7 +36,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="杆塔名称"> <el-form-item label="杆塔名称">
<el-select v-model="formdata.towerid" > <el-select v-model="formdata.towerId" >
<el-option <el-option
v-for="item in gtOptions" v-for="item in gtOptions"
:key="item.id" :key="item.id"
@ -54,6 +54,16 @@
value-format="timestamp" value-format="timestamp"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="告警原因">
<el-select v-model="formdata.warnCause" >
<el-option
v-for="item in gjOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit"></el-button> <el-button type="primary" @click="onSubmit"></el-button>
</el-form-item> </el-form-item>
@ -85,7 +95,12 @@
:formatter="dateFormat" :formatter="dateFormat"
> >
</el-table-column> </el-table-column>
<el-table-column prop="alarmLevel" label="电压等级" min-width="75"> <el-table-column
prop="dyLevel"
label="电压等级"
min-width="75"
:show-overflow-tooltip="true"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="lineName" prop="lineName"
@ -95,7 +110,7 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="meid" prop="towerName"
label="杆塔名称" label="杆塔名称"
min-width="115" min-width="115"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
@ -123,23 +138,24 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="isRead" prop="status"
label="是否已读" label="是否已读"
min-width="95" min-width="95"
fixed="right" fixed="right"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.isRead == 0"></span> <span v-if="scope.row.status == 0"></span>
<span v-if="scope.row.isRead == 1"></span> <span v-if="scope.row.status == 1"></span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pageNation"> <div class="pageNation">
<el-pagination <el-pagination
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
@size-change="handleSizeChange"
:current-page="page" :current-page="page"
:page-size="pageSize" :page-size="pageSize"
layout=" prev, pager, next, jumper,total" layout="sizes, prev, pager, next, jumper,total"
:total="total" :total="total"
> >
</el-pagination> </el-pagination>
@ -163,7 +179,7 @@
</template> </template>
<script> <script>
//import { list } from '@/utils/api/index'; import { getSearchInfo, getRealtimePhoto } from "@/utils/api/index";
import moment from "moment"; import moment from "moment";
export default { export default {
data() { data() {
@ -171,14 +187,12 @@ export default {
dyOptions: [{ id: 0, name: '全部'}], // dyOptions: [{ id: 0, name: '全部'}], //
xlOptions: [{ id: 0, name: '全部'}], //线 xlOptions: [{ id: 0, name: '全部'}], //线
gtOptions: [{ id: 0, name: '全部'}], // gtOptions: [{ id: 0, name: '全部'}], //
zzOptions: [{ id: 0, name: '全部'}], // gjOptions: [{ id: 0, name: '全部'}], //
tdOptions: [{ id: 0, name: '全部'}], //
formdata: { formdata: {
dyid: "", dyId: "",
lineid: "", lineId: "",
towerid: "", towerId: "",
channelid: "", warnCause:'',
termid: "",
timeVal: "", timeVal: "",
}, },
photoPic: "", photoPic: "",
@ -189,12 +203,54 @@ export default {
total: 0, // total: 0, //
}; };
}, },
methods: { mounted() {
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.page = val;
this.getTableList(); this.getTableList();
this.getSearchdy();
this.getSearchgj();
},
methods: {
//
getSearchdy() {
getSearchInfo({ type: 1 })
.then((res) => {
this.dyOptions = this.dyOptions.concat(res.data.list);
this.formdata.dyId = this.dyOptions[0].id;
this.getSearchxl();
})
.catch((err) => {});
}, },
//线
getSearchxl() {
getSearchInfo({ type: 2, id: this.formdata.dyId })
.then((res) => {
this.xlOptions = [{ id: 0, name: "全部" }];
this.xlOptions = this.xlOptions.concat(res.data.list);
this.formdata.lineId = this.xlOptions[0].id;
this.getSearchgt();
})
.catch((err) => {});
},
//
getSearchgt() {
getSearchInfo({ type: 3, id: this.formdata.lineId })
.then((res) => {
this.gtOptions = [{ id: 0, name: "全部" }];
this.gtOptions = this.gtOptions.concat(res.data.list);
this.formdata.towerId = this.gtOptions[0].id;
})
.catch((err) => {});
},
//
getSearchgj() {
getSearchInfo({ type: 1, id: this.formdata.lineId })
.then((res) => {
this.gjOptions = [{ id: 0, name: "全部" }];
this.gjOptions = this.gjOptions.concat(res.data.list);
this.formdata.warnCause = this.gjOptions[0].id;
})
.catch((err) => {});
},
//
getTableList() { getTableList() {
this.tableData = [ this.tableData = [
{ {
@ -206,7 +262,7 @@ export default {
teamName: null, teamName: null,
lineId: "8cee6df6-46c7-4f6d-abfa-b2cfecdcf31f", lineId: "8cee6df6-46c7-4f6d-abfa-b2cfecdcf31f",
lineName: "i1测试线路-SH", lineName: "i1测试线路-SH",
logicTowerId: "38fb2783-4d41-490d-8b80-806ecb4822e0", logictowerId: "38fb2783-4d41-490d-8b80-806ecb4822e0",
towerName: "XYIGQ10C221000080", towerName: "XYIGQ10C221000080",
monitorPointId: "8f0ebae8-e314-1d43-c700-2a50139f5489", monitorPointId: "8f0ebae8-e314-1d43-c700-2a50139f5489",
orientation: "10", orientation: "10",
@ -260,7 +316,7 @@ export default {
alarmInfoName: null, alarmInfoName: null,
ifDispatchLocationId: null, ifDispatchLocationId: null,
userId: null, userId: null,
earlyAlarmTime: null, earlyalarmTime: null,
lng: null, lng: null,
lat: null, lat: null,
timeExcel: null, timeExcel: null,
@ -284,14 +340,34 @@ export default {
]; ];
this.total = 36; this.total = 36;
this.photoPic = "http://180.166.218.222:8104/media" + this.tableData[0].photoPath; this.photoPic = "http://180.166.218.222:8104/media" + this.tableData[0].photoPath;
this.$set(this.formdata, "pageindex", this.page);
this.$set(this.formdata, "pagesize", this.pageSize);
// getRealtimePhoto(this.formdata)
// .then((res) => {
// this.picList = res.data.list;
// this.total = res.data.total;
// })
// .catch((err) => {
// console.log(err);
// });
}, },
// //
onSubmit() { onSubmit() {
this.getTableList()
}, },
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
//
handleCurrentChange(val) {
this.page = val;
this.getTableList();
},
//
handleSizeChange(val) {
this.pageSize = val;
this.getTableList();
},
handleRowClick(row) { handleRowClick(row) {
//this.$refs.multipleTable.toggleRowSelection(row); //this.$refs.multipleTable.toggleRowSelection(row);
console.log(row); console.log(row);
@ -304,10 +380,7 @@ export default {
} }
return moment(date).format("YYYY-MM-DD HH:mm:ss"); return moment(date).format("YYYY-MM-DD HH:mm:ss");
}, },
}, }
created() {
this.getTableList();
},
}; };
</script> </script>
<style lang="less"> <style lang="less">
@ -318,7 +391,8 @@ export default {
background: #ffffff; background: #ffffff;
.searchMain { .searchMain {
border: 1px solid #dddddd; border: 1px solid #dddddd;
height: calc(100% - 32px); height: calc(100% - 62px);
max-height: calc(100% - 62px);
padding: 16px; padding: 16px;
border-radius: 4px; border-radius: 4px;
} }

@ -121,7 +121,7 @@ import {
addTerminalJoggle, addTerminalJoggle,
updateTerminalJoggle, updateTerminalJoggle,
getAllChannelListJoggle, getAllChannelListJoggle,
getSearchInfo, getLineAndGtInfo,
} from "@/utils/api/index"; } from "@/utils/api/index";
export default { export default {
props: { props: {
@ -279,7 +279,7 @@ export default {
//线 //线
getLine() { getLine() {
getSearchInfo({ type: 2 }).then((res) => { getLineAndGtInfo({ type: 1 }).then((res) => {
this.lineOptions = res.data.list; this.lineOptions = res.data.list;
if (res.data.list.length == 0) { if (res.data.list.length == 0) {
this.lineOptions = []; this.lineOptions = [];
@ -298,7 +298,7 @@ export default {
}, },
// //
getTower() { getTower() {
getSearchInfo({ type: 3, id: this.formInfo.lineid }) getLineAndGtInfo({ type: 2, id: this.formInfo.lineid })
.then((res) => { .then((res) => {
if (res.data.list.length == 0) { if (res.data.list.length == 0) {
this.toweridOptions = []; this.toweridOptions = [];

Loading…
Cancel
Save