-
-
-
-
-
+
+
@@ -108,14 +105,13 @@
import { listAlarm } from "@/api/demostrate/monitor";
import sendMsg from "@/views/demostrate/alarm/sendMsg";
import dealAlarm from "@/views/demostrate/alarm/dealAlarm";
- import { getAllFactory } from "@/api/home";
+ import DeptTree from "@/components/DeptTree/index.vue";
export default {
name: "alarm",
- components: { sendMsg,dealAlarm },
+ components: { sendMsg,dealAlarm,DeptTree },
dicts: [],
data() {
return {
- factorys:[],
loading: false,
deviceInfo: {},
isOpenMsg: false,
@@ -145,6 +141,7 @@
startTime: null,
endTime: null,
factoryId:null,
+ deptId: null,
},
userName: '',
@@ -152,19 +149,28 @@
},
created() {
this.userName = store.getters.user.userName
- this.queryParams.factoryId = store.getters.user.factoryId
},
mounted() {
- this.getFactory()
+ this.init();
},
methods: {
- /**获取企业下拉框 */
- getFactory() {
- getAllFactory({}).then(response => {
- this.factorys = response.data;
- this.getList()
- })
- },
+ async init() {
+ this.emitChange();
+ this.getList()
+ },
+ /**获取企业下拉框 */
+ handleDeptChange(value) {
+ this.queryParams.deptId = value.deptId;
+ this.emitChange();
+ },
+ emitChange() {
+ this.$nextTick(() => {
+ this.$emit("queryChange", {
+ deptId: this.queryParams.deptId,
+
+ });
+ });
+ },
getList() {
if (this.dateList && this.dateList.length > 0) {
this.queryParams.startTime = this.dateList[0]
@@ -174,237 +180,12 @@
this.queryParams.endTime = null
}
this.loading = true;
- // listAlarm(this.queryParams).then(response => {
- // this.dataList = response.rows;
- // this.total = response.total;
- // this.loading = false;
- // });
- this.total = 343;
- this.loading = false;
- this.dataList=[ {
- "sn": "ZABB6210850989ZA",
- "isDeal": null,
- "name": null,
- "reportTime": "2024-05-26 23:49:12",
- "power": "59",
- "factoryName": '**有限公司',
- "wd": "0",
- "yl": "101.3",
- "latitude": "3604.89440",
- "longitude": "12022.12783",
- "lng": null,
- "lat": null,
- "cgq": 1,
- "ds": 0.0,
- "dw": "PPM",
- "lc": 500,
- "zl": "VOC",
- "zt": "二级报警",
- "dbz": 20, "gbz": 50,
-
- },{
- "sn": "ZABB6210850989ZA",
- "isDeal": null,
- "name": null,
- "reportTime": "2024-05-25 23:49:12",
- "power": "59",
- "factoryName": '**有限公司',
- "wd": "0",
- "yl": "101.3",
- "latitude": "3604.89440",
- "longitude": "12022.12783",
- "lng": null,
- "lat": null,
- "cgq": 1,
- "ds": 0.0,
- "dw": "PPM",
- "lc": 500,
- "zl": "VOC",
- "zt": "二级报警",
- "dbz": 20, "gbz": 50,
- isDeal:'1',
- reason:'阀门泄漏',
- dealUser:'张三',
- dealWay:'拧紧螺栓',
- dealTime:'2024-05-26 09:49:12',
-
- },
- {
- "sn": "ZABB6210850989ZA",
- "isDeal": null,
- "name": null,
- "reportTime": "2024-05-24 23:49:12",
- "power": "59",
- "factoryName": '**有限公司',
- "wd": "0",
- "yl": "101.3",
- "latitude": "3604.89440",
- "longitude": "12022.12783",
- "lng": null,
- "lat": null,
- "cgq": 1,
- "ds": 0.0,
- "dw": "PPM",
- "lc": 500,
- "zl": "VOC",
- "zt": "二级报警",
- "dbz": 20, "gbz": 50,
-
- },{
- "sn": "ZABB621085098QW",
- "isDeal": null,
- "name": null,
- "reportTime": "2024-05-25 23:49:12",
- "power": "59",
- "factoryName": '**有限公司',
- "wd": "0",
- "yl": "101.3",
- "latitude": "3604.89440",
- "longitude": "12022.12783",
- "lng": null,
- "lat": null,
- "cgq": 1,
- "ds": 121.23,
- "dw": "PPM",
- "lc": 500,
- "zl": "VOC",
- "zt": "一级报警",
- "dbz": 50, "gbz": 120,
- isDeal:'1',
- reason:'阀门泄漏',
- dealUser:'李四',
- dealWay:'拧紧螺栓',
- dealTime:'2024-05-26 09:49:12',
-
- },{
- "sn": "ZABB621085098QWS",
- "isDeal": null,
- "name": null,
- "reportTime": "2024-05-24 23:49:12",
- "power": "59",
- "factoryName": '**有限公司',
- "wd": "0",
- "yl": "101.3",
- "latitude": "3604.89440",
- "longitude": "12022.12783",
- "lng": null,
- "lat": null,
- "cgq": 1,
- "ds": 0.0,
- "dw": "PPM",
- "lc": 500,
- "zl": "VOC",
- "zt": "二级报警",
- "dbz": 20, "gbz": 50,
-
- },{
- "sn": "ZABB6210850989ZA",
- "isDeal": null,
- "name": null,
- "reportTime": "2024-05-23 23:49:12",
- "power": "59",
- "factoryName": '**有限公司',
- "wd": "0",
- "yl": "101.3",
- "latitude": "3604.89440",
- "longitude": "12022.12783",
- "lng": null,
- "lat": null,
- "cgq": 1,
- "ds": 0.0,
- "dw": "PPM",
- "lc": 500,
- "zl": "VOC",
- "zt": "二级报警",
- "dbz": 20, "gbz": 50,
-
- },{
- "sn": "ZABB6210850989ZA",
- "isDeal": null,
- "name": null,
- "reportTime": "2024-05-22 23:49:12",
- "power": "59",
- "factoryName": '**有限公司',
- "wd": "0",
- "yl": "101.3",
- "latitude": "3604.89440",
- "longitude": "12022.12783",
- "lng": null,
- "lat": null,
- "cgq": 1,
- "ds": 0.0,
- "dw": "PPM",
- "lc": 500,
- "zl": "VOC",
- "zt": "二级报警",
- "dbz": 20, "gbz": 50,
-
- },{
- "sn": "ZABB6210850989ZA",
- "isDeal": null,
- "name": null,
- "reportTime": "2024-05-21 23:49:12",
- "power": "59",
- "factoryName": '**有限公司',
- "wd": "0",
- "yl": "101.3",
- "latitude": "3604.89440",
- "longitude": "12022.12783",
- "lng": null,
- "lat": null,
- "cgq": 1,
- "ds": 9.0,
- "dw": "PPM",
- "lc": 500,
- "zl": "VOC",
- "zt": "二级报警",
- "dbz": 20, "gbz": 50,
-
- },{
- "sn": "ZABB6210850989ZA",
- "isDeal": null,
- "name": null,
- "reportTime": "2024-05-20 23:49:12",
- "power": "59",
- "factoryName": '**有限公司',
- "wd": "0",
- "yl": "101.3",
- "latitude": "3604.89440",
- "longitude": "12022.12783",
- "lng": null,
- "lat": null,
- "cgq": 1,
- "ds": 0.0,
- "dw": "PPM",
- "lc": 500,
- "zl": "VOC",
- "zt": "二级报警",
- "dbz": 20, "gbz": 50,
-
- },{
- "sn": "ZABB6210850989ZA",
- "isDeal": null,
- "name": null,
- "reportTime": "2024-05-20 23:49:12",
- "power": "59",
- "factoryName": '**有限公司',
- "wd": "0",
- "yl": "101.3",
- "latitude": "3604.89440",
- "longitude": "12022.12783",
- "lng": null,
- "lat": null,
- "cgq": 1,
- "ds": 40.0,
- "dw": "PPM",
- "lc": 500,
- "zl": "VOC",
- "zt": "二级报警",
- "dbz": 12, "gbz": 58,
-
- },
- ]
-
+ listAlarm(this.queryParams).then(response => {
+ this.dataList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+
},
//发送通知
handleUpdate(row) {
diff --git a/ruoyi-ui/src/views/demostrate/heatmap/index.vue b/ruoyi-ui/src/views/demostrate/heatmap/index.vue
index fd943db..be4426e 100644
--- a/ruoyi-ui/src/views/demostrate/heatmap/index.vue
+++ b/ruoyi-ui/src/views/demostrate/heatmap/index.vue
@@ -28,13 +28,12 @@