From 9831a1c47f949eb46f40fa468a3b476bb2bc8c72 Mon Sep 17 00:00:00 2001
From: gerson <1405270578@qq.com>
Date: 星期二, 18 二月 2025 21:30:39 +0800
Subject: [PATCH] 修改第一个文章

---
 src/views/ProductDetail.vue |   93 ++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 80 insertions(+), 13 deletions(-)

diff --git a/src/views/ProductDetail.vue b/src/views/ProductDetail.vue
index cb05a1f..f750d9d 100644
--- a/src/views/ProductDetail.vue
+++ b/src/views/ProductDetail.vue
@@ -28,7 +28,6 @@
 							<img :src="EecLevelEnum[productDataRef.EnergyEfficiencyClass]?.icon" class="h-8" />
 							<!-- <span class="text-white relative right-[42px] top-[-1px]">1</span> -->
 							<!-- <span class="text-white absolute left-[16px] bottom-[10px] text-small">{{ EecLevelEnum[productDataRef.EnergyEfficiencyClass]?.name }}</span> -->
-
 						</div>
 					</div>
 				</div>
@@ -63,6 +62,10 @@
 				<div class="flex gap-4">
 					<el-button type="primary" size="large" @click="handleBuyNow">绔嬪嵆璐拱</el-button>
 					<el-button size="large" @click="handleAddToCart">鍔犲叆璐墿杞�</el-button>
+					<el-button type="info" plain size="large" class="flex items-center" @click="handleViewCurve">
+						<el-icon class="mr-1" style="font-size: 18px"><TrendCharts /></el-icon>
+						鎬ц兘鏇茬嚎
+					</el-button>
 				</div>
 			</div>
 		</div>
@@ -90,13 +93,24 @@
 						</div>
 					</div>
 				</el-tab-pane>
-				<el-tab-pane label="瑙勬牸鍙傛暟" name="params">
+				<el-tab-pane label="鎬ц兘鏇茬嚎" name="PerformanceCurve">
+					<div style="width: 1200px; height: 750px">
+						<LXBChart ref="lxbChartCtrl"></LXBChart>
+					</div>
+				</el-tab-pane>
+				<el-tab-pane label="鍙橀�熸洸绾�" name="params">
+					<div style="width: 1200px; height: 750px"></div>
+				</el-tab-pane>
+				<el-tab-pane label="鍒囧壊鏇茬嚎" name="CutCurve"> </el-tab-pane>
+				<el-tab-pane label="瑙勬牸鍙傛暟" name="SpecificParam">
 					<div class="p-6">
-						<el-descriptions :column="1" border>
-							<el-descriptions-item v-for="(value, key) in product.specifications" :key="key" :label="key">
-								{{ value }}
-							</el-descriptions-item>
-						</el-descriptions>
+						<prop ref="propCtrl"></prop>
+					</div>
+				</el-tab-pane>
+				<el-tab-pane label="閫夊瀷鎶ュ憡" name="SelectReport"> </el-tab-pane>
+				<el-tab-pane label="娴嬭瘯鎶ュ憡" name="certificate">
+					<div class="p-6 flex justify-center">
+						<img :src="product.certificatePath" alt="鑺傝兘璇佷功" class="max-w-full" />
 					</div>
 				</el-tab-pane>
 				<el-tab-pane label="鍖呰鍞悗" name="service">
@@ -156,14 +170,20 @@
 <script setup lang="ts">
 import EecLevel1 from '@/assets/icons/energy1.png';
 import EecLevel2 from '@/assets/icons/energy2.png';
-import { Check } from '@element-plus/icons-vue';
+import { SERVE_URL } from '@/constants';
+import { Check, TrendCharts } from '@element-plus/icons-vue';
 import { ElMessage } from 'element-plus';
 import { onMounted, ref } from 'vue';
 import { useRoute, useRouter } from 'vue-router';
-
+import axios from 'axios';
+import pumpDetailInfo from './mock/DetailsInfo';
+import LXBChart from '@/components/Chart/LXBChart.vue';
+import prop from './components/prop.vue';
 const route = useRoute();
 const router = useRouter();
 
+const lxbChartCtrl = ref();
+const propCtrl = ref();
 const activeTab = ref('intro');
 const showBuyDialog = ref(false);
 
@@ -188,6 +208,7 @@
 	protection: '',
 	eecLevelIcon: EecLevel1,
 	package: '鐢垫満 脳 1, 璇存槑涔� 脳 1, 鍚堟牸璇� 脳 1',
+	certificatePath: '',
 	specifications: {
 		浜у搧鍨嬪彿: '',
 		棰濆畾鍔熺巼: '',
@@ -208,6 +229,10 @@
 	ElMessage.success('宸叉坊鍔犲埌璐墿杞�');
 };
 
+const handleViewCurve = () => {
+	window.open('http://www.xpump.net/V4/#/CN/Target/DOOCH/Pump/Index/C69S4/8978', '_blank');
+};
+
 const confirmOrder = () => {
 	if (!orderForm.value.name || !orderForm.value.phone || !orderForm.value.address) {
 		ElMessage.warning('璇峰~鍐欏畬鏁寸殑鏀惰揣淇℃伅');
@@ -222,7 +247,7 @@
 		address: orderForm.value,
 	};
 	localStorage.setItem('currentOrder', JSON.stringify(orderInfo));
-	
+
 	ElMessage.success('璁㈠崟鎻愪氦鎴愬姛');
 	showBuyDialog.value = false;
 	// 璺宠浆鍒版敮浠橀〉闈�
@@ -247,16 +272,16 @@
 			name: productData.ModelType,
 			applicationCode: productData.RecordNumber,
 			price: productData.Price,
-			image: productData.PhysicalPicturePath,
+			image: `${SERVE_URL}${productData.PhysicalPicturePath}`,
+			certificatePath: `${SERVE_URL}${productData.CertificatePath}`,
 			brand: productData.CompanyName,
 			model: productData.Model,
 			power: '璇﹁鍘傚',
 			voltage: '璇﹁鍘傚',
 			speed: '璇﹁鍘傚',
 			protection: '璇﹁鍘傚',
-			detailImages: [productData.PhysicalPicturePath],
+			detailImages: [`${SERVE_URL}${productData.PhysicalPicturePath}`],
 			specifications: {
-				...product.value.specifications,
 				浜у搧鍨嬪彿: productData.Model,
 				鐢熶骇浼佷笟: productData.CompanyName,
 				澶囨缂栧彿: productData.RecordNumber,
@@ -265,7 +290,49 @@
 			},
 		};
 	}
+	initDetailData();
 });
+const initDetailData = () => {
+	let m_userUnitSetting = {
+		NPSH: 0,
+		isAdjustCoordUnitByUserSetting: false,
+	};
+	let pumpInfoData = pumpDetailInfo;
+	let pumpBaseInfo = {
+		CorpID: 69,
+		SeriesID: 'C69S4',
+		PumpID: 8978,
+		SubID: 0,
+		ChartType: 3,
+		PumpStyle: 0,
+		PumpName4File: 'DRL1-18S',
+		CorpName: '涓煩鏉滅',
+		PumpName: 'DRL1-18S',
+		SeriesName: 'DRL',
+		CatalogName: '绔嬪紡澶氱骇娉�',
+		EecStauts: 0,
+		EecGrade: 0,
+		DefaultMotorPower: 0,
+		MaxD2: 75,
+		WrkD2: 75,
+		MinD2: 75,
+		Ratedn: 2900,
+		WrkSpeed: 2900,
+		FirePumpType: 0,
+		DriveType: 0,
+		RatedParas: {
+			H: '100.5',
+			Q: '1',
+			E: '41',
+			P: '0.67',
+			NPSHr: null,
+		},
+	};
+	lxbChartCtrl.value.initPumpInfoData(0, pumpInfoData, () => {}, m_userUnitSetting);
+
+	//鍒濆鍖栧睘鎬ф帶浠�
+	propCtrl.value.initialData(0, pumpBaseInfo, pumpInfoData.PartFullInfo, pumpInfoData.SettingInfo);
+};
 </script>
 
 <style scoped>

--
Gitblit v1.9.3