Bladeren bron

feat: 设备详情告警统计传参调整;

liujia 3 weken geleden
bovenliggende
commit
0fefa1ee12

+ 3 - 1
src/views/device/detail/components/deviceStatsDrawer/index.vue

@@ -121,6 +121,7 @@ defineOptions({
 type Props = {
   open: boolean
   devId: string
+  clientId: string
   title?: string
   width?: number
   type?: 'fall' | 'alarm' | 'online'
@@ -133,6 +134,7 @@ const emit = defineEmits<{
 const props = withDefaults(defineProps<Props>(), {
   open: false,
   devId: '',
+  clientId: '',
   title: '设备历史统计',
   width: 900,
   type: 'fall',
@@ -286,7 +288,7 @@ const fetchAlarmList = async () => {
     const res = await statsApi.statsAlarmQuery({
       pageNo: current.value,
       pageSize: pageSize.value,
-      clientId: props.devId,
+      clientId: props.clientId,
       createTimeStart: searchState.createTimeStart,
       createTimeEnd: searchState.createTimeEnd,
       eventType: searchState.eventType as ID,

+ 1 - 0
src/views/device/detail/index.vue

@@ -241,6 +241,7 @@
       <deviceStatsDrawer
         v-model:open="statsDrawerOpen"
         :dev-id="`${detailState.devId as string}`"
+        :client-id="`${detailState.clientId as string}`"
         :title="`${detailState.devName || ''} 统计信息`"
         :type="statsDrawerType"
       ></deviceStatsDrawer>