update
1.修改手表监测来通知,更新页面数据
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
<TerminalAlarm
|
||||
:refreshState="refreshState"
|
||||
:setting="setting"
|
||||
:socketData="socketData"
|
||||
:set-inter="true"
|
||||
:show-statistics="true"
|
||||
:time-interval="getTimeInterval()"
|
||||
|
||||
@@ -28,21 +28,21 @@
|
||||
<div>
|
||||
<div>
|
||||
日累计
|
||||
<span>{{ 0 }}</span>
|
||||
<span>{{ dayInfo?.dayCount || 0 }}</span>
|
||||
次
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
周累计
|
||||
<span>{{ 0 }}</span>
|
||||
<span>{{ dayInfo?.weekCount || 0 }}</span>
|
||||
次
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
月累计
|
||||
<span>{{ 0 }}</span>
|
||||
<span>{{ dayInfo?.monthCount || 0 }}</span>
|
||||
次
|
||||
</div>
|
||||
</div>
|
||||
@@ -113,7 +113,7 @@
|
||||
import PublicTitle from '/@/components/publicTitle.vue';
|
||||
import Dialog from '/@/components/dialog/Dialog.vue';
|
||||
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';
|
||||
import { getMonitorList } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
import { getMonitorList, monitorTotalApi } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
import { Map } from '/@/assets/mapUtils/map.ts';
|
||||
import { caching, useSession } from '/@/hooks/autoRefresh/caching.ts';
|
||||
import { DataType } from '/@/utils/settings.ts';
|
||||
@@ -136,6 +136,10 @@
|
||||
type: Boolean,
|
||||
default: () => false,
|
||||
},
|
||||
socketData: {
|
||||
type: Object,
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
const { themeType } = useTheme();
|
||||
const emit = defineEmits(['emit-view-detail']);
|
||||
@@ -156,10 +160,30 @@
|
||||
address: '',
|
||||
dataValue: '',
|
||||
});
|
||||
const dayInfo = ref<any>({});
|
||||
onMounted(() => {
|
||||
getScrollList();
|
||||
// 如果为庆阳应急中心,需调用统计接口
|
||||
if (props.setInter) {
|
||||
interval.value = setInterval(() => {
|
||||
getScrollList();
|
||||
}, 30000);
|
||||
getStatic();
|
||||
}
|
||||
});
|
||||
|
||||
function getStatic() {
|
||||
monitorTotalApi({ orgCodeList: userStore.getCenterInfo?.serviceScope })
|
||||
.then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
dayInfo.value = res?.result;
|
||||
}
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc open员工信息
|
||||
*/
|
||||
@@ -184,18 +208,21 @@
|
||||
|
||||
const interval = ref<any>(null);
|
||||
const nowDate = ref(dayjs());
|
||||
onMounted(() => {
|
||||
if (props.setInter) {
|
||||
interval.value = setInterval(() => {
|
||||
getScrollList();
|
||||
}, 30000);
|
||||
}
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
interval.value && clearInterval(interval.value);
|
||||
});
|
||||
|
||||
watch(
|
||||
() => props.socketData,
|
||||
(v) => {
|
||||
console.log(v);
|
||||
if (props.setInter) {
|
||||
getStatic();
|
||||
}
|
||||
getScrollList();
|
||||
}
|
||||
);
|
||||
async function getScrollList() {
|
||||
try {
|
||||
let orgCodeList = userStore.getCenterInfo?.serviceScope;
|
||||
|
||||
Reference in New Issue
Block a user