Commit 3498673b authored by neogcg's avatar neogcg

alarm dialog

parent 8b488bd2
......@@ -94,7 +94,6 @@ export default {
this.loading = false
let list = res || []
this.data = list
console.log( this.data );
})
},
renderContent(h, { node, data, store }) {
......
......@@ -47,7 +47,7 @@
.el-table{
height: 613px;
overflow-y: scroll;
overflow-y: auto;
}
.el-dialog__header{
text-align: center;
......@@ -85,4 +85,10 @@
color: #fff;
background:rgba(122, 164, 251, 0.55);
}
.el-dialog{
border-radius: 8px;
}
.particulars{
color:#666666
}
\ No newline at end of file
......@@ -6,6 +6,8 @@ const path = {
cableCancel: 'sysMonitorAlarm/cancel',
deviceList: 'sysConnectAlarm/selectPage',
deviceConfirm: 'sysConnectAlarm/confirm',
deviceCancel: 'sysConnectAlarm/cancel',
}
export function cableTimeList() {
......@@ -22,3 +24,9 @@ export function cableConfirm() {
export function deviceList() {
return request.post(path.deviceList, ...arguments)
}
export function deviceConfirm() {
return request.post(path.deviceConfirm, ...arguments)
}
export function deviceCancel() {
return request.post(path.deviceCancel, ...arguments)
}
......@@ -40,13 +40,18 @@
width="180"
align="center"
/>
<el-table-column prop="alarmLevelName" label="告警级别" width="150" align="center">
<el-table-column
prop="alarmLevelName"
label="告警级别"
width="150"
align="center"
>
</el-table-column>
<el-table-column
prop="alarmInfo"
label="告警信息"
align="center"
width="300"
width="200"
>
</el-table-column>
<el-table-column
......@@ -65,11 +70,92 @@
<el-table-column prop="confirmTime" label="确认时间" align="center" />
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.confirmStatus === 1" >取消</el-button>
<el-button type="text" v-else>确认</el-button>
<el-button
type="text"
v-if="scope.row.confirmStatus === 1"
@click="cancel2(scope.row)"
>取消</el-button
>
<el-button type="text" v-else @click="confirm2(scope.row)"
>确认</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
title="告警详情"
:visible.sync="centerDialogVisible"
width="30%"
center
>
<table style="margin: auto" class="device-detail-tb">
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">基站名称:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.siteName"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">告警对象:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.alarmTarget"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">告警级别:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.alarmLevelName"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">告警信息:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.alarmInfo"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">最新上传时间:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.lateUploadTime"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">状态变化时间:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.statusTimeChange"></label>
</td>
</tr>
</table>
<span slot="footer" class="dialog-footer">
<el-button
type="primary"
v-if="
dialogInfo.confirmStatus === 1 &&
dialogInfo.alarmLevelName === '正常'
"
@click="cancel(dialogInfo)"
>取消告警</el-button
>
<el-button
v-else-if="dialogInfo.confirmStatus !== 1"
type="primary"
@click="confirm(dialogInfo)"
>确认告警</el-button
>
</span>
</el-dialog>
<Pagination
:limit="params.size"
:page="params.current"
......@@ -81,93 +167,119 @@
</template>
<script>
import { cableTimeList,cableConfirm ,cableCancel} from '../api'
import { exportLeakyCable } from '@/api/export'
import search from '@/views/monitor/leakageCable/components/search.vue'
import download from '@/utils/download'
import { cableTimeList, cableConfirm, cableCancel } from "../api";
import { exportLeakyCable } from "@/api/export";
import search from "@/views/monitor/leakageCable/components/search.vue";
import download from "@/utils/download";
export default {
data() {
return {
confirmStatus: 2,
dialogInfo: [],
centerDialogVisible: false,
params: {
current: 1,
size: 10
size: 10,
},
total: 10,
tableData: [],
tabs: [ // 1:已确认,0:未确认
tabs: [
// 1:已确认,0:未确认
{
label: '全部',
key: 2
label: "全部",
key: 2,
},
{
label: '已确认',
key: 1
label: "已确认",
key: 1,
},
{
label: '未确认',
key: 0
}
label: "未确认",
key: 0,
},
],
isQuery: false,
searchOption: {}
searchOption: {},
};
},
components: { search },
methods: {
// 表格背景图颜色
cellClassFn({ row, column, rowIndex, columnIndex }) {
if (row.alarmLevelName == '紧急' && column.label == '告警级别') {
return 'emergency'
} else if (row.alarmLevelName == '重要' && column.label == '告警级别') {
return 'important'
if (row.alarmLevelName == "紧急" && column.label == "告警级别") {
return "emergency";
} else if (row.alarmLevelName == "重要" && column.label == "告警级别") {
return "important";
}
if (rowIndex % 2 == 1) {
return 'stripe'
return "stripe";
}
},
handlePageChange(pageData) {
this.params.size = pageData.size
this.params.current = pageData.page
this.getTableData()
this.params.size = pageData.size;
this.params.current = pageData.page;
this.getTableData();
},
getTableData(option) {
this.searchOption = option
let type = this.confirmStatus == 2 ? '' : this.confirmStatus
this.searchOption = option;
let type = this.confirmStatus == 2 ? "" : this.confirmStatus;
let param = {
confirmStatus: type,
...this.params,
...option
}
cableTimeList(param).then(res => {
console.log(param);
let list = res.records || []
this.tableData = list
this.total = res.total
console.log( res.records);
})
...option,
};
cableTimeList(param).then((res) => {
let list = res.records || [];
this.tableData = list;
this.total = res.total;
});
},
confirm(dialogInfo) {
let id = dialogInfo.id;
cableConfirm({ id: id }).then((res) => {
this.getTableData();
});
this.centerDialogVisible = false;
},
confirm2(row) {
this.centerDialogVisible = true;
this.dialogInfo = row;
},
cancel(dialogInfo) {
let query = {
alarmLevelName: dialogInfo.alarmLevelName,
id: dialogInfo.id,
};
cableCancel(query).then((res) => {
this.getTableData();
});
this.centerDialogVisible = false;
},
cancel2(row) {
this.centerDialogVisible = true;
this.dialogInfo = row;
},
changeType(item) {
this.confirmStatus = item.key
this.getTableData()
this.confirmStatus = item.key;
this.getTableData();
},
exportList() {
let type = this.confirmStatus == 2 ? '' : this.confirmStatus
let type = this.confirmStatus == 2 ? "" : this.confirmStatus;
let param = {
confirmStatus: type,
...this.params,
...this.searchOption
}
exportLeakyCable(param).then(res => {
download(res, 'vnd.ms-excel', `漏缆监测告警.xls`)
})
...this.searchOption,
};
exportLeakyCable(param).then((res) => {
download(res, "vnd.ms-excel", `漏缆监测告警.xls`);
});
},
},
mounted() {
this.getTableData()
this.getTableData();
},
}
};
</script>
<style lang="scss" scoped>
......
......@@ -14,7 +14,7 @@
<div style="color: #666666"></div>
<div class="operate-btn">
<el-button type="primary" @click="getTableData">刷新</el-button>
<el-button type="primary" @click="isQuery=!isQuery">查询</el-button>
<el-button type="primary" @click="isQuery = !isQuery">查询</el-button>
<el-button type="primary" @click="exportList">导出</el-button>
</div>
</div>
......@@ -27,19 +27,96 @@
:cell-class-name="cellClassFn"
:header-cell-style="{ background: '#EAF1FE', color: '#666666' }"
>
<el-table-column prop="startPointDeviceName" label="网元设备" align="center" />
<el-table-column prop="connectStatusName" label="连接状态" align="center" />
<el-table-column prop="endPointDeviceName" label="网元设备" align="center" />
<el-table-column
prop="startPointDeviceName"
label="网元设备"
align="center"
/>
<el-table-column
prop="connectStatusName"
label="连接状态"
align="center"
/>
<el-table-column
prop="endPointDeviceName"
label="网元设备"
align="center"
/>
<el-table-column prop="uploadTime" label="上传时间" align="center" />
<el-table-column prop="confirmPerson" label="确认人" align="center" />
<el-table-column prop="confirmTime" label="确认时间" align="center" />
<el-table-column fixed="right" label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button type="text" v-if="scope.row.confirmStatus === 1">取消</el-button>
<el-button type="text" v-else >确认</el-button>
<el-button
type="text"
v-if="scope.row.confirmStatus === 1"
@click="cancel2(scope.row)"
>取消</el-button
>
<el-button type="text" v-else @click="confirm2(scope.row)"
>确认</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog
title="告警详情"
:visible.sync="centerDialogVisible"
width="30%"
center
>
<table style="margin: auto" class="device-detail-tb">
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">网元设备:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.startPointDeviceName"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">连接状态:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.connectStatusName"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">网元设备:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.endPointDeviceName"></label>
</td>
</tr>
<tr style="line-height: 50px">
<td style="width: 150px">
<label class="particulars">上传时间:</label>
</td>
<td style="width: 180px; text-align: left">
<label v-text="dialogInfo.uploadTime"></label>
</td>
</tr>
</table>
<span slot="footer" class="dialog-footer">
<el-button
type="primary"
v-if="
dialogInfo.confirmStatus === 1 &&
dialogInfo.connectStatusName === '连接正常'
"
@click="cancel(dialogInfo)"
>取消告警</el-button
>
<el-button
v-else-if="dialogInfo.confirmStatus !== 1"
type="primary"
@click="confirm(dialogInfo)"
>确认告警</el-button
>
</span>
</el-dialog>
<Pagination
:limit="params.size"
:page="params.current"
......@@ -51,89 +128,124 @@
</template>
<script>
import { deviceList } from '../api'
import { exportConnet } from '@/api/export'
import search from '@/views/monitor/equipment/components/search.vue'
import download from '@/utils/download'
import { deviceList, deviceConfirm, deviceCancel } from "../api";
import { exportConnet } from "@/api/export";
import search from "@/views/monitor/equipment/components/search.vue";
import download from "@/utils/download";
export default {
data() {
return {
dialogInfo: [],
centerDialogVisible: false,
confirmStatus: 2,
params: {
current: 1,
size: 10
size: 10,
},
total: 10,
tableData: [],
tabs: [
{
label: '全部',
key: 2
label: "全部",
key: 2,
},
{
label: '已确认',
key: 1
label: "已确认",
key: 1,
},
{
label: '未确认',
key: 0
}
label: "未确认",
key: 0,
},
],
isQuery: false,
searchOption: {}
}
searchOption: {},
};
},
components: { search },
methods: {
// 表格背景图颜色
cellClassFn({ row, column, rowIndex, columnIndex }) {
if ((row.connectStatusName == '连接正常' && column.property == 'connectStatusName')) {
return 'green'
if (
row.connectStatusName == "连接正常" &&
column.property == "connectStatusName"
) {
return "green";
}
if ((row.connectStatusName == '连接异常' && column.property == 'connectStatusName')) {
return 'red'
if (
row.connectStatusName == "连接异常" &&
column.property == "connectStatusName"
) {
return "red";
}
if (rowIndex % 2 == 1) {
return 'stripe'
return "stripe";
}
},
handlePageChange(pageData) {
this.params.size = pageData.size
this.params.current = pageData.page
this.getTableData()
this.params.size = pageData.size;
this.params.current = pageData.page;
this.getTableData();
},
getTableData(option) {
let type = this.confirmStatus == 2 ? '' : this.confirmStatus
let type = this.confirmStatus == 2 ? "" : this.confirmStatus;
let param = {
confirmStatus: type,
...this.params,
...option
}
deviceList(param).then(res => {
let list = res.records || []
this.tableData = list
this.total = res.total
})
...option,
};
deviceList(param).then((res) => {
let list = res.records || [];
this.tableData = list;
this.total = res.total;
});
},
confirm2(row) {
this.centerDialogVisible = true;
this.dialogInfo = row;
},
confirm(dialogInfo) {
let id = dialogInfo.id;
deviceConfirm({ id: id }).then((res) => {
this.getTableData();
});
this.centerDialogVisible = false
},
cancel2(row) {
this.centerDialogVisible = true;
this.dialogInfo = row;
},
cancel(dialogInfo) {
let query = {
connectStatusName: dialogInfo.connectStatusName,
id: dialogInfo.id,
};
deviceCancel(query).then((res) => {
console.log(res);
this.getTableData();
});
this.centerDialogVisible = false
},
changeType(item) {
this.confirmStatus = item.key
this.getTableData()
this.confirmStatus = item.key;
this.getTableData();
},
exportList() {
let type = this.confirmStatus == 2 ? '' : this.confirmStatus
let type = this.confirmStatus == 2 ? "" : this.confirmStatus;
let param = {
confirmStatus: type,
...this.params,
...this.searchOption
}
exportConnet(param).then(res => {
download(res, 'vnd.ms-excel', `设备连接告警.xls`)
})
...this.searchOption,
};
exportConnet(param).then((res) => {
download(res, "vnd.ms-excel", `设备连接告警.xls`);
});
},
},
mounted() {
this.getTableData()
this.getTableData();
},
};
</script>
......
......@@ -5,6 +5,15 @@ export const DetailMixins = {
return {
form: {},
formFunc: null,
isOpenSelect:[{
key:0,
label:"未开通"
},
{
key:1,
label:"已开通"
}
]
}
},
watch: {
......
......@@ -143,7 +143,25 @@
<div class="item_name">站点其他信息</div>
</el-col>
<el-col :span="10">
<div class="item_data">{{ form.baseInfo.siteOtherMessage }}</div>
<div class="item_data">
{{ form.baseInfo.siteOtherMessage }}
</div>
</el-col>
</el-row>
<el-row class="text" :gutter="24">
<el-col :span="10">
<div class="item_name">开通状态</div>
</el-col>
<el-col :span="10">
<el-select class="item_data"
>{{ form.baseInfo.isOpen }}
<el-option
v-for="item in isOpenSelect"
:key="item.key"
:label="item.label"
:value="item.key"
></el-option>
</el-select>
</el-col>
</el-row>
</div>
......@@ -179,17 +197,15 @@
</template>
<script>
import { DetailMixins } from './mixins'
import { DetailMixins } from "./mixins";
export default {
name: 'Dashboard',
name: "Dashboard",
mixins: [DetailMixins],
data() {
return {
}
return {};
},
methods: {
}
}
methods: {},
};
</script>
<style lang="scss" scoped>
......@@ -265,5 +281,4 @@ export default {
border-bottom: none !important;
}
}
</style>
......@@ -8,7 +8,7 @@
<div slot="header" class="clearfix posa">
<span>管理范围</span>
</div>
<div >
<div>
<el-row class="text" :gutter="24">
<el-col :span="10">
<div class="item_name">监测设备</div>
......@@ -33,7 +33,7 @@
<div slot="header" class="clearfix posa">
<span>基础信息</span>
</div>
<div >
<div>
<el-row class="text" :gutter="24">
<el-col :span="10">
<div class="item_name">FSU身份编号</div>
......@@ -47,7 +47,7 @@
<div class="item_name">FSU端口数</div>
</el-col>
<el-col :span="10">
<div class="item_data">{{ form.baseInfo.fsuPort}}</div>
<div class="item_data">{{ form.baseInfo.fsuPort }}</div>
</el-col>
</el-row>
<el-row class="text" :gutter="24">
......@@ -119,7 +119,9 @@
<div class="item_name">设备子类型</div>
</el-col>
<el-col :span="10">
<div class="item_data">{{ form.baseInfo.equipSubTypeName }}</div>
<div class="item_data">
{{ form.baseInfo.equipSubTypeName }}
</div>
</el-col>
</el-row>
<el-row class="text" :gutter="24">
......@@ -135,7 +137,9 @@
<div class="item_name">设备生产序列号</div>
</el-col>
<el-col :span="10">
<div class="item_data">{{ form.baseInfo.equipSerialNumber }}</div>
<div class="item_data">
{{ form.baseInfo.equipSerialNumber }}
</div>
</el-col>
</el-row>
<el-row class="text" :gutter="24">
......@@ -162,6 +166,22 @@
<div class="item_data">{{ form.baseInfo.kmSign }}</div>
</el-col>
</el-row>
<el-row class="text" :gutter="24">
<el-col :span="10">
<div class="item_name">开通状态</div>
</el-col>
<el-col :span="10">
<el-select class="item_data"
>{{ form.baseInfo.isOpen }}
<el-option
v-for="item in isOpenSelect"
:key="item.key"
:label="item.label"
:value="item.key"
></el-option>
</el-select>
</el-col>
</el-row>
</div>
</el-card>
</el-col>
......@@ -170,7 +190,7 @@
<div slot="header" class="clearfix posa">
<span>管理范围</span>
</div>
<div >
<div>
<el-row class="text" :gutter="24">
<el-col :span="10">
<div class="item_name">监测设备</div>
......@@ -195,16 +215,15 @@
</template>
<script>
import { DetailMixins } from './mixins'
import { DetailMixins } from "./mixins";
export default {
name: 'Dashboard',
name: "Dashboard",
data() {
return {
}
return {};
},
mixins: [DetailMixins],
}
};
</script>
<style lang="scss" scoped>
......@@ -269,5 +288,4 @@ export default {
border-bottom: none !important;
}
}
</style>
......@@ -130,6 +130,22 @@
<div class="item_data">{{ form.baseInfo.kmSign }}</div>
</el-col>
</el-row>
<el-row class="text" :gutter="24">
<el-col :span="10">
<div class="item_name">开通状态</div>
</el-col>
<el-col :span="10">
<el-select class="item_data"
>{{ form.baseInfo.isOpen }}
<el-option
v-for="item in isOpenSelect"
:key="item.key"
:label="item.label"
:value="item.key"
></el-option>
</el-select>
</el-col>
</el-row>
</div>
</el-card>
</el-col>
......
......@@ -5,7 +5,7 @@ const path = {
MonitorStatusDelete: 'sysHistoryMonitorStatus/batchDeleteHistoryMonitorStatus',
MonitorMaintainList: 'sysHistoryMonitorMaintain/selectPage',
MonitorMaintainDelete: 'sysHistoryMonitorMaintain/selectPage',
MonitorMaintainDelete: 'sysHistoryMonitorMaintain/batchDeleteHistoryMonitorMaintain',
ConnectStatusList: 'sysHistoryConnectStatus/selectPage',
ConnectStatusDelete: 'sysHistoryConnectStatus/batchDeleteHistoryConnectStatus',
......
......@@ -6,7 +6,7 @@
<div class="operate-btn">
<delids
:multipleSelection2="multipleSelection"
@click="deleteCable"
@del="deleteCable"
>删除</delids
>
<el-button type="primary" @click="getTableData">刷新</el-button>
......@@ -80,6 +80,7 @@ export default {
handleSelectionChange(val) {
let deleteIds = val.map(item => item.id)
this.multipleSelection = deleteIds
},
handlePageChange(pageData) {
this.params.size = pageData.size;
......@@ -89,8 +90,7 @@ export default {
getTableData(option) {
this.searchOption = option
let params = {
current: this.params.pageNum,
size: this.params.pageSize,
...this.params,
...option
}
MonitorMaintainList(params).then(res => {
......@@ -99,7 +99,7 @@ export default {
this.total = res.total
})
},
deleteCable() {
deleteCable() {
MonitorMaintainDelete({ids: this.multipleSelection}).then(res => {
this.$message.success('删除成功!')
this.getTableData()
......
......@@ -72,7 +72,7 @@
/>
</el-select>
<div class="btn">
<el-button style="width: 120px" type="primary" :loading="loading2" @click="sendData">发送数据</el-button>
<el-button style="width: 120px" type="primary" :loading="loading3" @click="sendData">发送数据</el-button>
</div>
</div>
</el-form-item>
......
......@@ -94,7 +94,8 @@ export default {
CableStatusList(params).then(res => {
let list = res.records || []
this.tableData = list
this.total = res.total
this.total = res.records.length
})
},
toExport() {
......
......@@ -172,7 +172,7 @@
</template>
</el-table-column>
</el-table>
<pagination
<Pagination
:limit="leakyCableForm.size"
:page="leakyCableForm.current"
:total="total"
......
......@@ -130,7 +130,7 @@
</template>
</el-table-column>
</el-table>
<pagination
<Pagination
:limit="monitorForm.size"
:page="monitorForm.current"
:total="total"
......
......@@ -103,7 +103,7 @@
</el-table-column>
</el-table>
<pagination
<Pagination
:limit="railData.size"
:page="railData.current"
:total="total"
......
......@@ -80,22 +80,13 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column prop="siteName" label="站名" align="center" />
<el-table-column prop="siteCode" label="站点编号" align="center" />
<el-table-column
prop="siteAddress"
label="站点地址"
show-overflow-tooltip
align="center"
/>
<el-table-column
prop="railWayName"
label="所在铁路线"
align="center"
/>
<el-table-column prop="railWayName" label="所在铁路线" align="center" />
<el-table-column
prop="action"
label="详细信息"
......@@ -110,7 +101,7 @@
</el-table-column>
</el-table>
<pagination
<Pagination
:limit="siteForm.size"
:page="siteForm.current"
:total="total"
......@@ -132,7 +123,7 @@ export default {
siteForm: formInit(),
railWaySelect: [],
visible: false,
tableData: [],
params: {
current: 1,
......@@ -156,10 +147,10 @@ export default {
},
del() {
let ids = this.ids;
sitebatchDelete({ids}).then((res) => {
sitebatchDelete({ ids }).then((res) => {
if (res.code == 200) {
successAlert("删除成功");
this.getTableData();
} else {
warningAlert("删除失败");
......@@ -178,14 +169,13 @@ export default {
this.siteForm = formInit();
},
exportData() {
sitelist({size:this.total}).then((res) => {
sitelist({ size: this.total }).then((res) => {
let list = res.records || [];
this.exids = list.map((i) => i.id);
});
exportSite({ ids: this.exids }).then((res) => {
download(res, "vnd.ms-excel", `站点表.xls`);
});
});
exportSite({ ids: this.exids }).then((res) => {
download(res, "vnd.ms-excel", `站点表.xls`);
});
},
handleSelectionChange(val) {
this.multipleSelection = val;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment