Commit 3e2f1a6d authored by dupengyu's avatar dupengyu

列表字段

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