|
@@ -7,6 +7,7 @@
|
|
预警中心
|
|
预警中心
|
|
</div>
|
|
</div>
|
|
<div class="page-header-btn">
|
|
<div class="page-header-btn">
|
|
|
|
+ <el-button @click="markAllEventRead">一键忽略</el-button>
|
|
<el-tooltip class="item" effect="dark" content="..." placement="left-start">
|
|
<el-tooltip class="item" effect="dark" content="..." placement="left-start">
|
|
<el-button icon="el-icon-plus" circle size="mini" ></el-button>
|
|
<el-button icon="el-icon-plus" circle size="mini" ></el-button>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
@@ -21,30 +22,46 @@
|
|
</el-tabs>
|
|
</el-tabs>
|
|
<div class="tab-header">
|
|
<div class="tab-header">
|
|
<el-input class=" input-with-select" placeholder="输入算法名片段" v-model="key" >
|
|
<el-input class=" input-with-select" placeholder="输入算法名片段" v-model="key" >
|
|
- <el-select v-model="triggerTypeVal"
|
|
|
|
- style="width: 120px;"
|
|
|
|
|
|
+ <el-select v-model="triggerTypeVal"
|
|
|
|
+ style="width: 120px;"
|
|
|
|
+ slot="prepend"
|
|
|
|
+ @change="getNowTriggerType" placeholder="触发类型">
|
|
|
|
+ <el-option
|
|
|
|
+ :key="'trigger-0'"
|
|
|
|
+ label="全部类型"
|
|
|
|
+ :value="0">
|
|
|
|
+ </el-option>
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in triggerTypeArr"
|
|
|
|
+ :key="'trigger-'+item.val"
|
|
|
|
+ :label="item.text"
|
|
|
|
+ :value="item.val"
|
|
|
|
+ :disabled="item.disabled">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+
|
|
|
|
+ </el-input>
|
|
|
|
+ <el-select v-model="alarmState" style="width: 120px;"
|
|
slot="prepend"
|
|
slot="prepend"
|
|
- @change="getNowTriggerType" placeholder="触发类型">
|
|
|
|
|
|
+ @change="getNowTriggerType" placeholder="已读状态">
|
|
<el-option
|
|
<el-option
|
|
- :key="'trigger-0'"
|
|
|
|
- label="全部类型"
|
|
|
|
- :value="0">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ :key="'read-0'"
|
|
|
|
+ label="全部"
|
|
|
|
+ :value="0"/>
|
|
<el-option
|
|
<el-option
|
|
- v-for="item in triggerTypeArr"
|
|
|
|
- :key="'trigger-'+item.val"
|
|
|
|
|
|
+ v-for="item in alarmStateArr"
|
|
|
|
+ :key="'read-'+item.val"
|
|
:label="item.text"
|
|
:label="item.text"
|
|
:value="item.val"
|
|
:value="item.val"
|
|
- :disabled="item.disabled">
|
|
|
|
- </el-option>
|
|
|
|
|
|
+ :disabled="item.disabled"/>
|
|
</el-select>
|
|
</el-select>
|
|
|
|
+
|
|
<el-button slot="append"
|
|
<el-button slot="append"
|
|
style="width: 80px;"
|
|
style="width: 80px;"
|
|
icon="el-icon-search"
|
|
icon="el-icon-search"
|
|
type="primary"
|
|
type="primary"
|
|
:loading="isLoading"
|
|
:loading="isLoading"
|
|
@click="searchClickHandle">搜索</el-button>
|
|
@click="searchClickHandle">搜索</el-button>
|
|
- </el-input>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="tab-content">
|
|
<div class="tab-content">
|
|
<el-table
|
|
<el-table
|
|
@@ -55,6 +72,11 @@
|
|
@sort-change="tableSortChange"
|
|
@sort-change="tableSortChange"
|
|
>
|
|
>
|
|
<el-table-column prop="alarmId" label="id" :sortable="'alarmId'"></el-table-column>
|
|
<el-table-column prop="alarmId" label="id" :sortable="'alarmId'"></el-table-column>
|
|
|
|
+ <el-table-column label="是否识别" >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{parseAlarmType(scope.row.alarmType)}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column prop="deviceId" label="设备号"></el-table-column>
|
|
<el-table-column prop="deviceId" label="设备号"></el-table-column>
|
|
<el-table-column prop="infoNum" label="子项数量" :sortable="'infoNum'"></el-table-column>
|
|
<el-table-column prop="infoNum" label="子项数量" :sortable="'infoNum'"></el-table-column>
|
|
<el-table-column prop="firmware_version" label="固件版本号"></el-table-column>
|
|
<el-table-column prop="firmware_version" label="固件版本号"></el-table-column>
|
|
@@ -103,7 +125,15 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import {triggerTypes,getTriggerTypeArr,getAITypeArr,toAlarmState} from "@/map/ai.js"
|
|
|
|
|
|
+import {
|
|
|
|
+ triggerTypes,
|
|
|
|
+ getTriggerTypeArr,
|
|
|
|
+ getAITypeArr,
|
|
|
|
+ toAlarmState,
|
|
|
|
+ alarmStates,
|
|
|
|
+ getAlarmStateArr,
|
|
|
|
+ toAlarmKey
|
|
|
|
+} from "@/map/ai.js"
|
|
import handle from "@/until/handle";
|
|
import handle from "@/until/handle";
|
|
import timeUntil from "@/until/time";
|
|
import timeUntil from "@/until/time";
|
|
import SignalInfo from "@/components/common/signalInfo";
|
|
import SignalInfo from "@/components/common/signalInfo";
|
|
@@ -120,8 +150,12 @@ export default {
|
|
triggerTypeArr: getTriggerTypeArr(),
|
|
triggerTypeArr: getTriggerTypeArr(),
|
|
aiTypeVal: "1",
|
|
aiTypeVal: "1",
|
|
aiTypeArr: getAITypeArr(),
|
|
aiTypeArr: getAITypeArr(),
|
|
|
|
+ alarmStates: alarmStates,
|
|
|
|
+ alarmStateArr: getAlarmStateArr(),
|
|
key: '',
|
|
key: '',
|
|
searchKey: '',
|
|
searchKey: '',
|
|
|
|
+ alarmState: 0,
|
|
|
|
+ searchAlarmState: '',
|
|
searchOrder: "descending",
|
|
searchOrder: "descending",
|
|
searchSort: 'alarmId',
|
|
searchSort: 'alarmId',
|
|
lastPage: 1,
|
|
lastPage: 1,
|
|
@@ -134,6 +168,7 @@ export default {
|
|
},
|
|
},
|
|
beforeDestroy() {
|
|
beforeDestroy() {
|
|
this.stopQuest();
|
|
this.stopQuest();
|
|
|
|
+ this.alarmState = this.$route.query.alarmState
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.searchClickHandle();
|
|
this.searchClickHandle();
|
|
@@ -169,7 +204,8 @@ export default {
|
|
if(bellSearchSource){
|
|
if(bellSearchSource){
|
|
this.$message.warning("请等待请求完成");
|
|
this.$message.warning("请等待请求完成");
|
|
}
|
|
}
|
|
- searchParam.aiType = this.aiTypeVal;
|
|
|
|
|
|
+ searchParam.arithmetic = parseInt(this.aiTypeVal);
|
|
|
|
+ searchParam.alarmState = toAlarmKey(searchParam.alarmState);
|
|
bellSearchSource = this.$axios.CancelToken.source();
|
|
bellSearchSource = this.$axios.CancelToken.source();
|
|
this.isLoading = true;
|
|
this.isLoading = true;
|
|
let [err,res] = await handle(
|
|
let [err,res] = await handle(
|
|
@@ -199,11 +235,7 @@ export default {
|
|
console.log(tab, event);
|
|
console.log(tab, event);
|
|
console.log(this.aiTypeVal);
|
|
console.log(this.aiTypeVal);
|
|
console.log(tab.name);
|
|
console.log(tab.name);
|
|
- if(this.aiTypeVal !== tab.name){
|
|
|
|
- // todo 更新搜索界面
|
|
|
|
- }else{
|
|
|
|
- // todo
|
|
|
|
- }
|
|
|
|
|
|
+ this.searchClickHandle();
|
|
},
|
|
},
|
|
currentChange: function (val) {
|
|
currentChange: function (val) {
|
|
this.currentPage = val;
|
|
this.currentPage = val;
|
|
@@ -219,6 +251,7 @@ export default {
|
|
p: this.currentPage,
|
|
p: this.currentPage,
|
|
l: this.count,
|
|
l: this.count,
|
|
key: this.searchKey,
|
|
key: this.searchKey,
|
|
|
|
+ alarmState: this.searchAlarmState,
|
|
order: this.searchOrder,
|
|
order: this.searchOrder,
|
|
sort: this.searchSort,
|
|
sort: this.searchSort,
|
|
}
|
|
}
|
|
@@ -229,12 +262,17 @@ export default {
|
|
p: 1,
|
|
p: 1,
|
|
l: this.count,
|
|
l: this.count,
|
|
key: this.key,
|
|
key: this.key,
|
|
|
|
+ alarmState: this.alarmState
|
|
}
|
|
}
|
|
this.searchKey = this.key;
|
|
this.searchKey = this.key;
|
|
|
|
+ this.searchAlarmState = this.alarmState;
|
|
this.searchData(searchParam);
|
|
this.searchData(searchParam);
|
|
},
|
|
},
|
|
- editAlarmHandle(){
|
|
|
|
-
|
|
|
|
|
|
+ async editAlarmHandle(row){
|
|
|
|
+ let [err,res] = await handle(this.$axios.get(`/ai/alarm/ignore/${row.alarmId}`))
|
|
|
|
+ if(err){return this.$message.error(err.msg)}
|
|
|
|
+ if(res.data.code!==0){return this.$message.warning(res.data.msg)}
|
|
|
|
+ this.$message.success("操作成功!!!");
|
|
},
|
|
},
|
|
moreAlarmHandle(row){
|
|
moreAlarmHandle(row){
|
|
this.$router.push(`/alarm/${row.alarmId}`)
|
|
this.$router.push(`/alarm/${row.alarmId}`)
|
|
@@ -251,11 +289,35 @@ export default {
|
|
sort: prop,
|
|
sort: prop,
|
|
p: 1,
|
|
p: 1,
|
|
l: this.count,
|
|
l: this.count,
|
|
- key: this.key,
|
|
|
|
|
|
+ key: this.searchKey,
|
|
|
|
+ alarmState: this.searchAlarmState
|
|
}
|
|
}
|
|
this.searchSort = prop;
|
|
this.searchSort = prop;
|
|
this.searchOrder = order;
|
|
this.searchOrder = order;
|
|
this.searchData(searchParam);
|
|
this.searchData(searchParam);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 全部忽略
|
|
|
|
+ markAllEventRead(){
|
|
|
|
+ this.$confirm('此操作将忽略全部告警内容,请再次确认?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(async () => {
|
|
|
|
+ let [err,res] = await handle(this.$axios.get(`/ai/markAll?arithmetic=${this.aiTypeVal}`))
|
|
|
|
+ if(err){return this.$message.error(err.msg)}
|
|
|
|
+ if(res.data.code!==0){return this.$message.warning(res.data.msg)}
|
|
|
|
+ this.$message.success("操作成功!!!");
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ parseAlarmType(text){
|
|
|
|
+ let r = ""
|
|
|
|
+ if(text=="1"){
|
|
|
|
+ r = "设备名单人员";
|
|
|
|
+ }else{
|
|
|
|
+ r = "陌生人"
|
|
|
|
+ }
|
|
|
|
+ return r
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -281,6 +343,7 @@ export default {
|
|
}
|
|
}
|
|
.tab-box .tab-header{
|
|
.tab-box .tab-header{
|
|
height: 40px;
|
|
height: 40px;
|
|
|
|
+ width: 99%;
|
|
display: flex;
|
|
display: flex;
|
|
}
|
|
}
|
|
.tab-box .tab-header > *{
|
|
.tab-box .tab-header > *{
|