From 3675e202a47910821a86370ae64b60d3cfe93e79 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期四, 02 一月 2025 14:17:53 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/WI/Web.V1.0

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

diff --git a/src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue b/src/components/chat/chatComponents/summaryCom/components/deviceLastValue/DeviceLastValueCom.vue
index 32ee31a..d106c49 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
@@ -80,17 +81,18 @@
 				@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>
 
 <script setup lang="ts">
-import _ from 'lodash';
-import { computed, onActivated, onMounted, ref } from 'vue';
+import { computed, onMounted, ref } from 'vue';
 import MonitorContent from './MonitorContent.vue';
 import { debounce, getTextWidth } from '/@/utils/util';
 
+import { chunk, fill } from 'lodash-es';
 import { chatComProps } from '../../../common';
+import RecordSetDialog from '../recordSet/RecordSetDialog.vue';
 import {
 	BORDER_COLOR,
 	CELL_HEIGHT,
@@ -103,11 +105,19 @@
 	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);
@@ -128,7 +138,7 @@
 		}
 	}
 	let maxWidth = getTextWidth(maxTitle, {
-		size: '0.875rem',
+		// size: '0.875rem',
 	});
 
 	maxWidth += measureWidthOffset;
@@ -154,7 +164,7 @@
 	}
 
 	let maxWidth = getTextWidth(maxTitle, {
-		size: '0.875rem',
+		// size: '0.875rem',
 	});
 	maxWidth += measureWidthOffset;
 
@@ -233,11 +243,11 @@
 const firstRow = computed(() => props.data?.rows?.[0]);
 const restRows = computed(() => props.data?.rows?.slice(1));
 const pageChunkList = computed(() => {
-	const chunkResult = _.chunk(props.data.values ?? [], pageSize.value);
+	const chunkResult = chunk(props.data.values ?? [], pageSize.value);
 	const last = chunkResult.at(-1);
 	if (last) {
 		const restNum = pageSize.value - last.length;
-		const emptyData = _.fill(Array(restNum), {
+		const emptyData = fill(Array(restNum), {
 			ONAME: '',
 			OTIME: '',
 			OTITLE: '',
@@ -259,7 +269,7 @@
 
 const currentRowChunkList = computed(() => {
 	if (!currentPageChunk.value || currentPageChunk.value.length === 0) return [];
-	const chunkResult = _.chunk(currentPageChunk.value, maxColsNum.value - 1);
+	const chunkResult = chunk(currentPageChunk.value, maxColsNum.value - 1);
 	return chunkResult;
 });
 
@@ -269,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