Commit 3e2f1a6d authored by dupengyu's avatar dupengyu

列表字段

parent de8eb827
......@@ -3,6 +3,10 @@ export const alarmLeval = {
2: '重要',
3: '一般'
}
export const alarmType = {
0: '漏缆',
1: '天馈线',
}
export const ConnectStatusEnum = {
0: '连接正常',
......
......@@ -43,12 +43,12 @@
</el-form-item>
<el-form-item label="告警类型">
<el-select
v-model="form.alarmLevelName"
v-model="form.alarmType"
placeholder="请选择告警类型"
clearable
>
<el-option
v-for="(val, key) in alarmLeval"
v-for="(val, key) in alarmType"
:key="key"
:label="val"
:value="val"
......@@ -77,7 +77,7 @@
<script>
import { commonQuery } from "@/views/history/api";
import { alarmLeval } from "@/const";
import { alarmLeval,alarmType } from "@/const";
export default {
name: "search",
......@@ -86,6 +86,7 @@ export default {
siteList: [],
form: formInit(),
alarmLeval,
alarmType,
dateRange:[]
};
},
......
......@@ -35,13 +35,13 @@
align="center"
/>
<el-table-column
prop="alarmTarget"
prop="alarmName"
label="告警对象"
width="180"
align="center"
/>
<el-table-column
prop="siteName"
prop="alarmType"
label="告警类型"
width="150"
align="center"
......@@ -73,8 +73,8 @@
align="center"
/>
<el-table-column
prop="告警发生时间"
label="最新上传时间"
prop="lateUploadTime"
label="告警发生时间"
align="center"
width="200"
/>
......@@ -83,19 +83,28 @@
label="状态变化时间"
align="center"
width="200"
/>
/> -->
<el-table-column
v-if="confirmStatus == 1"
prop="confirmPerson"
label="确认人"
width="100"
align="center"
/>
<el-table-column
v-if="confirmStatus == 1"
prop="confirmTime"
label="确认时间"
width="180"
align="center"
/> -->
/>
<el-table-column
v-if="confirmStatus == 2"
prop="statusTimeChange"
label="告警消除时间"
align="center"
width="200"
/>
<el-table-column label="操作" align="center" width="100">
<template slot-scope="scope">
<el-button
......@@ -113,6 +122,12 @@
@click="confirmAlarm(scope.row)"
>确认</el-button
>
<el-button
v-if="scope.row.confirmStatus == 1"
type="text"
@click="confirmAlarm(scope.row)"
>已消除</el-button
>
</template>
</el-table-column>
</el-table>
......@@ -286,11 +301,12 @@ export default {
};
cableTimeList(param).then((res) => {
let list = res.records || [];
list.forEach((item) => {
if (item.alarmInfo !== "" && item.alarmInfo != null) {
item.alarmInfo = JSON.parse(item.alarmInfo);
item.lossValue = eval(
item.alarmInfo.map((k) => k.lossValue).join("+")
item.alarmInfo.map((k) => k.lossValue || 0).join("+")
);
}
});
......
......@@ -249,7 +249,7 @@ export default {
this.params.size = res.total;
this.getAllWay();
}
});
});l
},
},
created() {
......
......@@ -9,7 +9,9 @@
<el-button type="primary" @click="refresh">刷新</el-button>
<el-button type="primary" @click="block = !block">查询</el-button>
<el-button type="primary" @click="exportData">导出</el-button>
<el-button type="primary" @click="handleAutomatic">自动添加设备</el-button>
<el-button type="primary" @click="handleAutomatic"
>自动添加设备</el-button
>
</div>
</div>
<el-form
......@@ -129,7 +131,7 @@
<el-link type="primary" :underline="false" @click="toEdit(row)"
>编辑</el-link
>
<el-link type="primary" :underline="false" @click="handleSetting(row)"
<el-link type="primary" :underline="false" @click="handleSetting(row)"
>参数设置</el-link
>
</template>
......@@ -151,6 +153,13 @@
>
<monitor :curInfo="curInfo" :isEdit="1" @update="update" />
</el-dialog>
<el-dialog
title="自动添加设备"
:visible.sync="open"
width="40%"
:close-on-click-modal="false"
>
</el-dialog>
</div>
</template>
<script>
......@@ -185,7 +194,8 @@ export default {
istrue: 0,
exids: [],
visible: false,
curInfo: {}
curInfo: {},
open: false,
};
},
created() {
......@@ -202,6 +212,9 @@ export default {
this.getAllWay();
},
methods: {
handleAutomatic() {
this.open = true;
},
toEdit(row) {
this.visible = true;
this.curInfo = row;
......
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