wujingjing
2024-09-29 5d1ca1e0dbfc23045ed8627a32ec7c8ab604c88f
src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue
@@ -1,4 +1,5 @@
<template>
   <!-- 实时监测列表 -->
   <div ref="containerRef" class="w-full flex justify-center" v-resize="resizeHandler">
      <div class="inline-block">
         <div
@@ -80,7 +81,7 @@
            @current-change="handleCurrentChange"
         />
      </div>
      <RecordSetDialog v-model="chartDlgIsShow" :otype="chartDlgMapRow?.OTYPE" :oname="chartDlgMapRow?.ONAME" :indexName="indexName"/>
      <RecordSetDialog v-model="chartDlgIsShow" :otype="chartDlgMapRow?.OTYPE" :oname="chartDlgMapRow?.ONAME" :indexName="indexName" />
   </div>
</template>
@@ -108,6 +109,14 @@
const props = defineProps(chatComProps) as {
   data: Monitor;
};
if (!props.data?.rows || props.data?.rows?.length === 0) {
   // 为空时,随便加一列,防止出现 height 逐渐变短的问题
   props.data.rows.push({
      id: 'aaaaa',
      title: '',
   });
}
const total = props.data?.values?.length ?? 0;
const pageIndex = ref(null);
const pageSize = ref(null);
@@ -269,7 +278,7 @@
const chartDlgMapRow = ref(null);
/** @description 指标名称 */
const indexName = ref(null);
const valueClick = (item,type) => {
const valueClick = (item, type) => {
   chartDlgMapRow.value = item;
   chartDlgIsShow.value = true;
   indexName.value = type;