|
|
@@ -78,6 +78,7 @@
|
|
|
|
|
|
import { getHomeInfoHomeData } from '@/api/index/index.js';
|
|
|
import $bus from '@/utils/mitt.js';
|
|
|
+ import fetchApp from '@/axios/fetchApp.js';
|
|
|
|
|
|
const emit = defineEmits(['dow_map']);
|
|
|
const store = useMechanismStore();
|
|
|
@@ -117,11 +118,26 @@
|
|
|
$bus.on('roomDetails', data => {
|
|
|
console.log('监听全局emit预警事件data', data);
|
|
|
if (data) {
|
|
|
- get_homemestfun();
|
|
|
+ getTodayData(data)
|
|
|
+ // get_homemestfun();
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
|
|
|
+ const getTodayData = async(data)=>{
|
|
|
+ if(data.data.organizationId != store.tenantId) return
|
|
|
+ try {
|
|
|
+ fetchApp.get('/v2/api/screen/getTodayData?tenantId=' + data.data.organizationId).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ todayactivelist.value = res.data;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } catch (error) {
|
|
|
+ console.log('error', error);
|
|
|
+ message.error('暂无监控资源!');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
const backpagefun = () => {
|
|
|
emit('dow_map', 1);
|
|
|
$router.push({
|