Commit 34a3eef9 authored by dupengyu's avatar dupengyu

路由及列表参数变更,新增模块文件

parent 2929a4e8
...@@ -47,6 +47,12 @@ export const constantRoutes = [ ...@@ -47,6 +47,12 @@ export const constantRoutes = [
name: 'device', name: 'device',
component: () => import('@/views/alarm/device/index'), component: () => import('@/views/alarm/device/index'),
meta: { title: '设备连接告警' } meta: { title: '设备连接告警' }
},
{
path: 'statistics',
name: 'statistics',
component: () => import('@/views/alarm/statistics/index'),
meta: { title: '告警信息统计' }
} }
] ]
}, },
...@@ -73,6 +79,12 @@ export const constantRoutes = [ ...@@ -73,6 +79,12 @@ export const constantRoutes = [
] ]
}, },
{
path: 'parameter',
name: 'parameter',
component: () => import('@/views/setting/parameter/index'),
meta: { title: '参数查询' }
},
{ {
path: "/detail/", path: "/detail/",
name: "detail", name: "detail",
......
<template>
<div>
<el-form
class="search-form"
:model="form"
ref="form"
label-width="80px"
:inline="true"
size="mini"
>
<el-form-item label="基站名称">
<el-select v-model="form.siteId" placeholder="请选择基站名称" clearable>
<el-option
v-for="item in siteList"
:key="item.id"
:label="item.siteName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="告警对象">
<el-input
v-model="form.alarmTargetName"
clearable
placeholder="请输入网元设备"
></el-input>
</el-form-item>
<el-form-item label="告警级别">
<el-select
v-model="form.alarmLevelName"
placeholder="请选择告警级别"
clearable
>
<el-option
v-for="(val, key) in alarmLeval"
:key="key"
:label="val"
:value="val"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="告警类型">
<el-select
v-model="form.alarmLevelName"
placeholder="请选择告警类型"
clearable
>
<el-option
v-for="(val, key) in alarmLeval"
:key="key"
:label="val"
:value="val"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="告警产生时间" label-width="110px">
<el-date-picker
v-model="dateRange"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="success" @click="toSearch">查询</el-button>
<el-button type="primary" @click="reset">重置</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import { commonQuery } from "@/views/history/api";
import { alarmLeval } from "@/const";
export default {
name: "search",
data() {
return {
siteList: [],
form: formInit(),
alarmLeval,
dateRange:[]
};
},
mounted() {
this.getInit();
},
methods: {
toSearch() {
this.$emit("search", this.form);
},
reset() {
this.form = formInit();
this.$emit("search");
},
getInit() {
commonQuery().then((res) => {
this.siteList = res.siteList || [];
});
},
},
};
function formInit() {
return {
siteId: null,
alarmTargetName: "",
alarmLevelName: null,
};
}
</script>
<style scoped lang="scss">
.w200 {
width: 200px;
}
.search-form {
padding: 10px;
background-color: #eaf1fe;
margin-bottom: 20px;
border-radius: 8px;
.el-form-item--mini.el-form-item,
.el-form-item--small.el-form-item {
margin-bottom: 0;
}
}
</style>
\ No newline at end of file
...@@ -40,13 +40,19 @@ ...@@ -40,13 +40,19 @@
width="180" width="180"
align="center" align="center"
/> />
<el-table-column
prop="siteName"
label="告警类型"
width="150"
align="center"
/>
<el-table-column <el-table-column
prop="alarmLevelName" prop="alarmLevelName"
label="告警级别" label="告警级别"
width="150" width="150"
align="center" align="center"
/> />
<el-table-column prop="alarmInfo" label="告警信息" align="center"> <el-table-column prop="alarmInfo" label="告警内容" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
v-for="(item, index) in scope.row.alarmInfo" v-for="(item, index) in scope.row.alarmInfo"
...@@ -61,12 +67,18 @@ ...@@ -61,12 +67,18 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="lateUploadTime" prop="siteName"
label="告警触发值"
width="150"
align="center"
/>
<el-table-column
prop="告警发生时间"
label="最新上传时间" label="最新上传时间"
align="center" align="center"
width="200" width="200"
/> />
<el-table-column <!-- <el-table-column
prop="statusTimeChange" prop="statusTimeChange"
label="状态变化时间" label="状态变化时间"
align="center" align="center"
...@@ -83,7 +95,7 @@ ...@@ -83,7 +95,7 @@
label="确认时间" label="确认时间"
width="180" width="180"
align="center" align="center"
/> /> -->
<el-table-column label="操作" align="center" width="100"> <el-table-column label="操作" align="center" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
...@@ -174,12 +186,12 @@ ...@@ -174,12 +186,12 @@
</template> </template>
<script> <script>
import { cableTimeList, cableConfirm, cableCancel } from '../api'; import { cableTimeList, cableConfirm, cableCancel } from "../api";
import { exportLeakyCable } from '@/api/export'; import { exportLeakyCable } from "@/api/export";
import search from '@/views/monitor/leakageCable/components/search.vue'; import search from "./components/search.vue";
import download from '@/utils/download'; import download from "@/utils/download";
import { successAlert, warningAlert } from '@/utils/alert'; import { successAlert, warningAlert } from "@/utils/alert";
import { levelStyle } from '@/const/index'; import { levelStyle } from "@/const/index";
export default { export default {
components: { search }, components: { search },
...@@ -190,26 +202,30 @@ export default { ...@@ -190,26 +202,30 @@ export default {
centerDialogVisible: false, centerDialogVisible: false,
params: { params: {
current: 1, current: 1,
size: 10 size: 10,
}, },
total: 10, total: 10,
tableData: [], tableData: [],
tabs: [ tabs: [
{ {
label: '未确认', label: "未确认",
key: 0 key: 0,
}, },
{ {
label: '已确认', label: "已确认",
key: 1 key: 1,
} },
{
label: "已消除",
key: 2,
},
], ],
isQuery: false, isQuery: false,
istrue: 0, istrue: 0,
searchOption: {}, searchOption: {},
exids: [], exids: [],
levelStyle levelStyle,
} };
}, },
created() { created() {
this.getTableData(); this.getTableData();
...@@ -218,17 +234,29 @@ export default { ...@@ -218,17 +234,29 @@ export default {
methods: { methods: {
// 表格背景图颜色 // 表格背景图颜色
cellClassFn({ row, column, rowIndex, columnIndex }) { cellClassFn({ row, column, rowIndex, columnIndex }) {
if (row.alarmLevelName === '紧急' && column.property === 'alarmLevelName') { if (
return 'emergency'; row.alarmLevelName === "紧急" &&
} else if (row.alarmLevelName === '重要' && column.property === 'alarmLevelName') { column.property === "alarmLevelName"
return 'important'; ) {
} else if (row.alarmLevelName === '一般' && column.property === 'alarmLevelName') { return "emergency";
return 'common'; } else if (
} else if (row.alarmLevelName === '正常' && column.property === 'alarmLevelName') { row.alarmLevelName === "重要" &&
return 'normal'; column.property === "alarmLevelName"
) {
return "important";
} else if (
row.alarmLevelName === "一般" &&
column.property === "alarmLevelName"
) {
return "common";
} else if (
row.alarmLevelName === "正常" &&
column.property === "alarmLevelName"
) {
return "normal";
} }
if (rowIndex % 2 === 1) { if (rowIndex % 2 === 1) {
return 'stripe'; return "stripe";
} }
}, },
// 刷新 // 刷新
...@@ -254,36 +282,38 @@ export default { ...@@ -254,36 +282,38 @@ export default {
let param = { let param = {
confirmStatus: this.confirmStatus, confirmStatus: this.confirmStatus,
...this.params, ...this.params,
...this.searchOption ...this.searchOption,
} };
cableTimeList(param).then((res) => { cableTimeList(param).then((res) => {
let list = res.records || []; let list = res.records || [];
list.forEach(item => { list.forEach((item) => {
if (item.alarmInfo !== '' && item.alarmInfo != null) { if (item.alarmInfo !== "" && item.alarmInfo != null) {
item.alarmInfo = JSON.parse(item.alarmInfo); item.alarmInfo = JSON.parse(item.alarmInfo);
item.lossValue = eval(item.alarmInfo.map(k => k.lossValue).join('+')); item.lossValue = eval(
item.alarmInfo.map((k) => k.lossValue).join("+")
);
} }
}) });
this.tableData = list; this.tableData = list;
this.total = res.total; this.total = res.total;
this.exids = list.map(i => i.id); this.exids = list.map((i) => i.id);
if (this.istrue == 1) { if (this.istrue == 1) {
if (this.tableData.length != 0) { if (this.tableData.length != 0) {
successAlert('操作成功'); successAlert("操作成功");
} else { } else {
warningAlert('查询结果为空'); warningAlert("查询结果为空");
} }
this.istrue = 0; this.istrue = 0;
} }
}) });
}, },
// 编辑确认告警 // 编辑确认告警
confirm(dialogInfo) { confirm(dialogInfo) {
let id = dialogInfo.id; let id = dialogInfo.id;
cableConfirm({ id: id }).then((res) => { cableConfirm({ id: id }).then((res) => {
this.getTableData(); this.getTableData();
this.$store.dispatch('alarm/getCableTime'); this.$store.dispatch("alarm/getCableTime");
}) });
this.centerDialogVisible = false; this.centerDialogVisible = false;
}, },
// 表格确认告警 // 表格确认告警
...@@ -295,11 +325,11 @@ export default { ...@@ -295,11 +325,11 @@ export default {
cancel(dialogInfo) { cancel(dialogInfo) {
let query = { let query = {
alarmLevelName: dialogInfo.alarmLevelName, alarmLevelName: dialogInfo.alarmLevelName,
id: dialogInfo.id id: dialogInfo.id,
} };
cableCancel(query).then((res) => { cableCancel(query).then((res) => {
this.getTableData(); this.getTableData();
}) });
this.centerDialogVisible = false; this.centerDialogVisible = false;
}, },
// 表格取消告警 // 表格取消告警
...@@ -315,16 +345,16 @@ export default { ...@@ -315,16 +345,16 @@ export default {
// 导出 // 导出
exportList() { exportList() {
if (this.exids.length === 0) { if (this.exids.length === 0) {
this.$message.warning('暂无数据'); this.$message.warning("暂无数据");
return false; return false;
} else { } else {
exportLeakyCable({ ids: this.exids }).then((res) => { exportLeakyCable({ ids: this.exids }).then((res) => {
download(res, 'vnd.ms-excel', `漏缆监测告警.xls`); download(res, "vnd.ms-excel", `漏缆监测告警.xls`);
}) });
} }
} },
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
<template> <template>
<div> <div>
<el-form class="search-form" ref="form" :model="form" label-width="80px" :inline="true" size="mini"> <el-form
class="search-form"
ref="form"
:model="form"
label-width="80px"
:inline="true"
size="mini"
>
<el-form-item label="网元设备"> <el-form-item label="网元设备">
<el-input v-model="form.pointDeviceName" clearable placeholder="请输入网元设备"></el-input> <el-input
v-model="form.pointDeviceName"
clearable
placeholder="请输入网元设备"
></el-input>
</el-form-item>
<el-form-item label="监测设备厂家" label-width="120px">
<el-select v-model="value" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="上传时间"> <el-form-item label="上传时间">
<el-date-picker <el-date-picker
...@@ -11,7 +33,8 @@ ...@@ -11,7 +33,8 @@
range-separator="至" range-separator="至"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd"> value-format="yyyy-MM-dd"
>
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
...@@ -23,38 +46,46 @@ ...@@ -23,38 +46,46 @@
</template> </template>
<script> <script>
import { ConnectStatusEnum } from '@/const/index'; import { ConnectStatusEnum } from "@/const/index";
export default { export default {
name: 'Search', name: "Search",
data() { data() {
return { return {
form: formInit(), form: formInit(),
ConnectStatusEnum, ConnectStatusEnum,
dateRange: [] dateRange: [],
} value:'',
options: [
{ value: '选项1', label: '选项1' },
{ value: '选项2', label: '选项2' },
{ value: '选项3', label: '选项3' },
{ value: '选项4', label: '选项4' },
{ value: '选项5', label: '选项5' }
]
};
}, },
methods: { methods: {
toSearch() { toSearch() {
this.form.startUploadTime = this.dateRange[0]; this.form.startUploadTime = this.dateRange[0];
this.form.endUploadTime = this.dateRange[1]; this.form.endUploadTime = this.dateRange[1];
this.$emit('search', this.form); this.$emit("search", this.form);
}, },
reset() { reset() {
this.dateRange = []; this.dateRange = [];
this.form = formInit(); this.form = formInit();
this.$emit('search'); this.$emit("search");
} },
} },
} };
function formInit() { function formInit() {
return { return {
pointDeviceName: '', pointDeviceName: "",
pointConnectStatus: '', pointConnectStatus: "",
startUploadTime: '', startUploadTime: "",
endUploadTime: '' endUploadTime: "",
} };
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
...@@ -63,10 +94,11 @@ function formInit() { ...@@ -63,10 +94,11 @@ function formInit() {
} }
.search-form { .search-form {
padding: 10px; padding: 10px;
background-color: #EAF1FE; background-color: #eaf1fe;
margin-bottom: 20px; margin-bottom: 20px;
border-radius: 8px; border-radius: 8px;
.el-form-item--mini.el-form-item, .el-form-item--small.el-form-item { .el-form-item--mini.el-form-item,
.el-form-item--small.el-form-item {
margin-bottom: 0; margin-bottom: 0;
} }
} }
......
<template>
<div>告警信息统计</div>
</template>
<script>
export default {};
</script>
<style scoped lang="scss">
</style>
\ No newline at end of file
<template>
<div class="parameter">
<div class="parameter-btn">
<el-button
class="ml10"
type="primary"
size="mini"
icon="el-icon-refresh-right"
@click="getInit"
>刷新</el-button
>
<el-button
class="ml10"
type="primary"
size="mini"
icon="el-icon-search"
@click="getInit"
>查询</el-button
>
</div>
<div class="card">
</div>
</div>
</template>
<script>
export default {};
</script>
<style lang="scss" scoped>
.parameter {
.parameter-btn {
display: flex;
justify-content: flex-end;
}
.card{
padding: 16px;
border-radius: 8px;
border: 1px solid #D7D7D7;
}
}
</style>
\ No newline at end of file
...@@ -143,13 +143,8 @@ ...@@ -143,13 +143,8 @@
</div> </div>
</template> </template>
<script> <script>
import fsu from '@/views/setting/add/comp/FSU.vue'; import fsu from "@/views/setting/add/comp/FSU.vue";
import { import { fsulist, fsubatchDelete, railWaylist, selectForSite } from "../../api";
fsulist,
fsubatchDelete,
railWaylist,
selectForSite,
} from "../../api";
import { successAlert, warningAlert } from "@/utils/alert"; import { successAlert, warningAlert } from "@/utils/alert";
import download from "@/utils/download"; import download from "@/utils/download";
import { exportFsu } from "@/api/export"; import { exportFsu } from "@/api/export";
...@@ -174,7 +169,7 @@ export default { ...@@ -174,7 +169,7 @@ export default {
block: 0, block: 0,
istrue: 0, istrue: 0,
exids: [], exids: [],
curInfo: {} curInfo: {},
}; };
}, },
created() { created() {
...@@ -192,13 +187,13 @@ export default { ...@@ -192,13 +187,13 @@ export default {
}, },
methods: { methods: {
toEdit(row) { toEdit(row) {
this.visible = true this.visible = true;
this.curInfo = row this.curInfo = row;
}, },
update(data) { update(data) {
this.visible = false this.visible = false;
if (data) { if (data) {
this.getTableData() this.getTableData();
} }
}, },
changerailWay() { changerailWay() {
......
...@@ -164,6 +164,9 @@ ...@@ -164,6 +164,9 @@
<el-link type="primary" :underline="false" @click="toEdit(row)" <el-link type="primary" :underline="false" @click="toEdit(row)"
>编辑</el-link >编辑</el-link
> >
<el-link type="primary" :underline="false" @click="handleSetting(row)"
>参数设置</el-link
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -186,7 +189,7 @@ ...@@ -186,7 +189,7 @@
</div> </div>
</template> </template>
<script> <script>
import leakyCable from '@/views/setting/add/comp/leakyCable.vue'; import leakyCable from "@/views/setting/add/comp/leakyCable.vue";
import { import {
leakyCablelist, leakyCablelist,
leakyCablebatchDelete, leakyCablebatchDelete,
...@@ -222,7 +225,7 @@ export default { ...@@ -222,7 +225,7 @@ export default {
istrue: 0, istrue: 0,
exids: [], exids: [],
curInfo: {}, curInfo: {},
visible: false visible: false,
}; };
}, },
created() { created() {
...@@ -313,7 +316,7 @@ export default { ...@@ -313,7 +316,7 @@ export default {
query: { query: {
id: row.id, id: row.id,
type: 5, type: 5,
name: row.leakyCableDescribe name: row.leakyCableDescribe,
}, },
}); });
}, },
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<el-button type="primary" @click="refresh">刷新</el-button> <el-button type="primary" @click="refresh">刷新</el-button>
<el-button type="primary" @click="block = !block">查询</el-button> <el-button type="primary" @click="block = !block">查询</el-button>
<el-button type="primary" @click="exportData">导出</el-button> <el-button type="primary" @click="exportData">导出</el-button>
</div> </div>
</div> </div>
<el-form <el-form
...@@ -163,6 +164,9 @@ ...@@ -163,6 +164,9 @@
> >
<el-link type="primary" :underline="false" @click="toEdit(row)" <el-link type="primary" :underline="false" @click="toEdit(row)"
>编辑</el-link >编辑</el-link
>
<el-link type="primary" :underline="false" @click="handleSetting(row)"
>参数设置</el-link
> >
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<el-button type="primary" @click="refresh">刷新</el-button> <el-button type="primary" @click="refresh">刷新</el-button>
<el-button type="primary" @click="block = !block">查询</el-button> <el-button type="primary" @click="block = !block">查询</el-button>
<el-button type="primary" @click="exportData">导出</el-button> <el-button type="primary" @click="exportData">导出</el-button>
<el-button type="primary" @click="handleAutomatic">自动添加设备</el-button>
</div> </div>
</div> </div>
<el-form <el-form
...@@ -127,6 +128,9 @@ ...@@ -127,6 +128,9 @@
> >
<el-link type="primary" :underline="false" @click="toEdit(row)" <el-link type="primary" :underline="false" @click="toEdit(row)"
>编辑</el-link >编辑</el-link
>
<el-link type="primary" :underline="false" @click="handleSetting(row)"
>参数设置</el-link
> >
</template> </template>
</el-table-column> </el-table-column>
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
<el-button type="primary" @click="refresh">刷新</el-button> <el-button type="primary" @click="refresh">刷新</el-button>
<el-button type="primary" @click="block = !block">查询</el-button> <el-button type="primary" @click="block = !block">查询</el-button>
<el-button type="primary" @click="exportData">导出</el-button> <el-button type="primary" @click="exportData">导出</el-button>
</div> </div>
</div> </div>
<el-form <el-form
...@@ -121,7 +122,7 @@ ...@@ -121,7 +122,7 @@
</div> </div>
</template> </template>
<script> <script>
import station from '@/views/setting/add/comp/station.vue' import station from "@/views/setting/add/comp/station.vue";
import { sitelist, sitebatchDelete, railWaylist } from "../../api"; import { sitelist, sitebatchDelete, railWaylist } from "../../api";
import { successAlert, warningAlert } from "@/utils/alert"; import { successAlert, warningAlert } from "@/utils/alert";
import download from "@/utils/download"; import download from "@/utils/download";
...@@ -145,7 +146,7 @@ export default { ...@@ -145,7 +146,7 @@ export default {
block: 0, block: 0,
istrue: 0, istrue: 0,
exids: [], exids: [],
curInfo: {} curInfo: {},
}; };
}, },
created() { created() {
...@@ -163,13 +164,13 @@ export default { ...@@ -163,13 +164,13 @@ export default {
}, },
methods: { methods: {
toEdit(row) { toEdit(row) {
this.visible = true this.visible = true;
this.curInfo = row this.curInfo = row;
}, },
update(data) { update(data) {
this.visible = false this.visible = false;
if (data) { if (data) {
this.getTableData() this.getTableData();
} }
}, },
tableRowClassName({ row, rowIndex }) { tableRowClassName({ row, rowIndex }) {
......
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