✨ feat: 报警分析-厂界在线 功能3 点击报警次数,弹窗报警管理页面-end
This commit is contained in:
parent
fe0738e619
commit
4c1b0a6d29
|
@ -164,6 +164,16 @@ export default {
|
||||||
name: "alarm",
|
name: "alarm",
|
||||||
components: { sendMsg, dealAlarm, DeptTree, BmlHeatmap },
|
components: { sendMsg, dealAlarm, DeptTree, BmlHeatmap },
|
||||||
dicts: [],
|
dicts: [],
|
||||||
|
props: {
|
||||||
|
queryParamsName: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
queryParamsDate: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
detailParams: {},
|
detailParams: {},
|
||||||
|
@ -210,6 +220,21 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
// this.userName = store.getters.user.userName;
|
// 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() {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
|
@ -243,6 +268,13 @@ export default {
|
||||||
this.queryParams.endTime = null;
|
this.queryParams.endTime = null;
|
||||||
}
|
}
|
||||||
this.loading = true;
|
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) => {
|
listAlarm(this.queryParams).then((response) => {
|
||||||
this.dataList = response.rows;
|
this.dataList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
|
@ -275,9 +307,14 @@ export default {
|
||||||
this.queryParams.dealUser = null;
|
this.queryParams.dealUser = null;
|
||||||
this.queryParams.startTime = null;
|
this.queryParams.startTime = null;
|
||||||
this.queryParams.endTime = null;
|
this.queryParams.endTime = null;
|
||||||
|
this.queryParamsName = null;
|
||||||
|
this.queryParamsDate = [];
|
||||||
|
this.getList();
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
this.queryParamsName = null;
|
||||||
|
this.queryParamsDate = [];
|
||||||
|
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<el-table-column label="放置区域" align="center" prop="address" />
|
<el-table-column label="放置区域" align="center" prop="address" />
|
||||||
<el-table-column label="报警次数" align="center" prop="count">
|
<el-table-column label="报警次数" align="center" prop="count">
|
||||||
<template slot-scope="scope">
|
<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>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog title="报警管理" :visible.sync="dialogAlarmVisible">
|
<el-dialog title="报警管理" :visible.sync="dialogAlarmVisible">
|
||||||
<alarm-monitor />
|
<alarm-monitor :queryParamsName="queryParamsName" :queryParamsDate="queryParamsDate"/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!--发送通知-->
|
<!--发送通知-->
|
||||||
|
@ -137,6 +137,8 @@ export default {
|
||||||
deviceSn: null,
|
deviceSn: null,
|
||||||
},
|
},
|
||||||
dialogAlarmVisible: false,
|
dialogAlarmVisible: false,
|
||||||
|
queryParamsName: null,
|
||||||
|
queryParamsDate: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -162,8 +164,14 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkRole,
|
checkRole,
|
||||||
clickAlarmTag() {
|
clickAlarmTag(row) {
|
||||||
this.dialogAlarmVisible = true;
|
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() {
|
dateChange() {
|
||||||
this.queryDebounce();
|
this.queryDebounce();
|
||||||
|
|
Loading…
Reference in New Issue