From a791a033d892fb08f5acdcba915b98a863866e99 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期五, 08 十一月 2024 13:47:29 +0800 Subject: [PATCH] 分享对话为空的情况 --- src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue b/src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue index b256ce3..cde1af7 100644 --- a/src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue +++ b/src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue @@ -81,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> @@ -105,10 +105,19 @@ } from './constants'; import type { Monitor, MonitorValue } from './types'; import RecordSetDialog from '../recordSet/RecordSetDialog.vue'; +import { isSharePage } from '/@/stores/chatRoom'; 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); @@ -176,14 +185,8 @@ }; let maxColsNum = ref<number>(null); const resizeEvent = ({ width, height }) => { - if (width === 0 || height === 0) { return; - } - - // 鍒锋柊鏃讹紝閲嶆柊鎵撳紑锛� height鍙兘澶皬 - if(height<100){ - height = 0.7 * document.body.clientHeight } // 鎸夋渶澶у搴︾畻鏈�澶у垪鏁� maxColsNum.value = Math.floor( @@ -276,7 +279,8 @@ const chartDlgMapRow = ref(null); /** @description 鎸囨爣鍚嶇О */ const indexName = ref(null); -const valueClick = (item,type) => { +const valueClick = (item, type) => { + if (isSharePage.value) return; chartDlgMapRow.value = item; chartDlgIsShow.value = true; indexName.value = type; -- Gitblit v1.9.3