From 57817b07cb31a3dd499d37ba3645fffb85ed2fd0 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期五, 08 十一月 2024 11:06:47 +0800
Subject: [PATCH] 分享页面

---
 src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue |   28 ++++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue b/src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue
index 8ded22a..cde1af7 100644
--- a/src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue
+++ b/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
@@ -53,6 +54,7 @@
 							:title="firstRow.title"
 							:type="firstRow.id"
 							:values="rowChunk"
+							@itemClick="valueClick"
 						/>
 					</div>
 					<!-- 鍓╀綑琛� -->
@@ -64,6 +66,7 @@
 						:title="row.title"
 						:type="row.id"
 						:values="rowChunk"
+						@itemClick="valueClick"
 					/>
 				</div>
 			</div>
@@ -78,6 +81,7 @@
 				@current-change="handleCurrentChange"
 			/>
 		</div>
+		<RecordSetDialog v-model="chartDlgIsShow" :otype="chartDlgMapRow?.OTYPE" :oname="chartDlgMapRow?.ONAME" :indexName="indexName" />
 	</div>
 </template>
 
@@ -100,10 +104,20 @@
 	THIN_BORDER_WIDTH,
 } 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);
@@ -259,6 +273,20 @@
 	return chunkResult;
 });
 
+//#region ====================== 鐐瑰嚮鐪嬫洸绾� ======================
+
+const chartDlgIsShow = ref(false);
+const chartDlgMapRow = ref(null);
+/** @description 鎸囨爣鍚嶇О */
+const indexName = ref(null);
+const valueClick = (item, type) => {
+	if (isSharePage.value) return;
+	chartDlgMapRow.value = item;
+	chartDlgIsShow.value = true;
+	indexName.value = type;
+};
+//#endregion
+
 // 璁$畻鏈�澶у垪鏁�
 // (x-1)* cellWidth + rowHeaderCellContentWidth.value+thickBorderWidth*(x-1)+thickBorderWidth*2 <= width;
 

--
Gitblit v1.9.3