feat: 报警分析-厂界在线 功能3 点击报警次数,弹窗报警管理页面-end

This commit is contained in:
LokerL 2024-12-15 18:10:19 +08:00
parent fe0738e619
commit 4c1b0a6d29
2 changed files with 48 additions and 3 deletions

View File

@ -164,6 +164,16 @@ export default {
name: "alarm",
components: { sendMsg, dealAlarm, DeptTree, BmlHeatmap },
dicts: [],
props: {
queryParamsName: {
type: String,
default: "",
},
queryParamsDate: {
type: Array,
default: () => [],
},
},
data() {
return {
detailParams: {},
@ -210,6 +220,21 @@ export default {
created() {
// this.userName = store.getters.user.userName;
},
watch: {
queryParamsName: {
handler: function (val) {
this.queryParams.name = val;
this.getList();
},
immediate: true,
},
queryParamsDate: {
handler: function (val) {
this.dateList = val;
},
immediate: true,
},
},
mounted() {
this.init();
},
@ -243,6 +268,13 @@ export default {
this.queryParams.endTime = null;
}
this.loading = true;
if (this.queryParamsName) {
this.queryParams.name = this.queryParamsName;
}
if (this.queryParamsDate && this.queryParamsDate.length > 0) {
this.queryParams.startTime = this.queryParamsDate[0];
this.queryParams.endTime = this.queryParamsDate[1];
}
listAlarm(this.queryParams).then((response) => {
this.dataList = response.rows;
this.total = response.total;
@ -275,9 +307,14 @@ export default {
this.queryParams.dealUser = null;
this.queryParams.startTime = null;
this.queryParams.endTime = null;
this.queryParamsName = null;
this.queryParamsDate = [];
this.getList();
},
handleQuery() {
this.queryParams.pageNum = 1;
this.queryParamsName = null;
this.queryParamsDate = [];
this.getList();
},

View File

@ -41,7 +41,7 @@
<el-table-column label="放置区域" align="center" prop="address" />
<el-table-column label="报警次数" align="center" prop="count">
<template slot-scope="scope">
<el-tag type="danger" class="count-tag" @click="clickAlarmTag">{{ scope.row.count }}</el-tag>
<el-tag type="danger" class="count-tag" @click="clickAlarmTag(scope.row)">{{ scope.row.count }}</el-tag>
</template>
</el-table-column>
<el-table-column
@ -65,7 +65,7 @@
</div>
<el-dialog title="报警管理" :visible.sync="dialogAlarmVisible">
<alarm-monitor />
<alarm-monitor :queryParamsName="queryParamsName" :queryParamsDate="queryParamsDate"/>
</el-dialog>
<!--发送通知-->
@ -137,6 +137,8 @@ export default {
deviceSn: null,
},
dialogAlarmVisible: false,
queryParamsName: null,
queryParamsDate: null,
};
},
mounted() {
@ -162,8 +164,14 @@ export default {
},
methods: {
checkRole,
clickAlarmTag() {
clickAlarmTag(row) {
this.dialogAlarmVisible = true;
this.queryParamsName = row.name;
// 00:00:00
this.queryParamsDate = [
moment(this.dateList[0]).format("YYYY-MM-DD 00:00:00"),
moment(this.dateList[1]).format("YYYY-MM-DD 23:59:59"),
];
},
dateChange() {
this.queryDebounce();