From 5d1ca1e0dbfc23045ed8627a32ec7c8ab604c88f Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期日, 29 九月 2024 11:40:01 +0800
Subject: [PATCH] rows 为空处理

---
 src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue |   18 ++++++++++--------
 1 files changed, 10 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..30208dd 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>
 
@@ -109,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);
@@ -176,14 +184,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 +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;

--
Gitblit v1.9.3