From a6cdbcfe28fcc40ebb4919f57d60fb20122e8e57 Mon Sep 17 00:00:00 2001
From: wwl <xchao828@163.com>
Date: 星期二, 12 八月 2025 09:10:35 +0800
Subject: [PATCH] 1

---
 pagesA/ReportDetails/ReportDetails.vue |  659 +++++++++++++++++++++++++----------------------------------
 1 files changed, 282 insertions(+), 377 deletions(-)

diff --git a/pagesA/ReportDetails/ReportDetails.vue b/pagesA/ReportDetails/ReportDetails.vue
index 7a5664f..43a35ae 100644
--- a/pagesA/ReportDetails/ReportDetails.vue
+++ b/pagesA/ReportDetails/ReportDetails.vue
@@ -1,410 +1,315 @@
 <template>
-	<view class="container">
-		<scroll-view class="report-list" scroll-y>
-			<view v-for="(item, index) in reportList" :key="index" class="report-item">
-				<view class="report-content">
-					<view class="report-left">
-						<view class="user-info">
-							<uni-icons type="wallet" size="20" color="#3498db" />
-							<view class="report-date">{{ item.date }}</view>
-						</view>
-						
-						<view class="report-right">
-							<uni-icons  :type="item.selected ? 'checkbox-filled' : 'circle'"
-								size="20" :color="item.selected ? '#47a0fc' : '#999999'"
-								@click="toggleSelect(index)"></uni-icons>
-							<!-- <u-checkbox-group>
-									<u-checkbox v-model="checked" shape="circle"></u-checkbox>
-								</u-checkbox-group> -->
-						</view>
-					</view>
-					<view class="report-middle">
-						<view class="report-info">
-							<text class="report-name">{{ item.name }}</text>
-							<text class="report-age">{{ item.age }}宀�</text>
-							<text class="report-gender">{{ item.gender }}</text>
-						</view>
-						<view class="report-hospital">{{ item.hospital }}</view>
-					</view>
-				</view>
-			</view>
-		</scroll-view>
+  <view class="box">
+    <!-- 椤堕儴鍥哄畾鏍� -->
+    <view class="Fixed">
+      <view class="Fixed_left">
+        <view class="Fixed_left_txt">浣撴鎶ュ憡</view>
+      </view>
+    </view>
 
-		<!-- 鎻愮ず淇℃伅 -->
-		<view class="tip-text">
-			鎻愮ず锛氭渶澶氬彲瀵规瘮5浠戒綋妫�鎶ュ憡
-		</view>
+    <!-- 鍩烘湰鍋ュ悍鏁版嵁 -->
+    <div class="data">
+      <div class="data_left">
+        <img v-if="customer.cusSex==0" class="data_img" src="https://ltpeis.xaltjdkj.cn:5502/static/4.png" alt="">
+        <img v-else class="data_img" src="https://ltpeis.xaltjdkj.cn:5502/static/5.png" alt="">
+        <div class="data_left_sty1">
+          <span class="data_left_txt1">{{customer.cusName}}</span>
+          <div class="data_left_sty">
+            <span class="data_left_txt2">{{customer.cusBrithday}}</span>
+          </div>
+          <span class="data_left_txt2">{{customer.cusSex == "1" ? "濂�" :"鐢�" }}</span>
+        </div>
+      </div>
+      <div class="data_right" v-if="jicuList.length >= 1">
+        <span class="data_right_txt1">鍩烘湰鍋ュ悍鏁版嵁</span>
+        <div class="data_right_sty">
+          <span class="data_right_txt2">韬珮(cm)</span>
+          <span class="data_right_txt3">{{jicuList[0].shenggao || ""}}</span>
+        </div>
+        <div class="data_right_sty">
+          <span class="data_right_txt2">浣撻噸(kg)</span>
+          <span class="data_right_txt3">{{jicuList[0].tizhong || ""}}</span>
+        </div>
+        <div class="data_right_sty">
+          <span class="data_right_txt4">浣撻噸鎸囨暟</span>
+          <span class="data_right_txt5">{{jicuList[0].tizhongzhishu || ""}}</span>
+        </div>
+        <div class="data_right_sty">
+          <span class="data_right_txt2">鏀剁缉鍘�(mmHg)</span>
+          <span class="data_right_txt3">{{jicuList[0].shousuoya || ""}}</span>
+        </div>
+        <div class="data_right_sty">
+          <span class="data_right_txt2">鑸掑紶鍘�(mmHg)</span>
+          <span class="data_right_txt3">{{jicuList[0].shuzhangya || ""}}</span>
+        </div>
+      </div>
+    </div>
 
-		<!-- 搴曢儴鎸夐挳 -->
-		<view class="bottom-button">
-			<button class="compare-button" @click="handleCompare">
-				鎶ュ憡瀵规瘮
-			</button>
-		</view>
-	</view>
+    <!-- 鎬绘寤鸿 -->
+    <div class="bottom">
+      <uni-collapse class="bottom_sty">
+        <uni-collapse-item title="鎬绘寤鸿" thumb="https://ltpeis.xaltjdkj.cn:5502/static/baogao.png">
+          <view class="content" style="margin-left:15px;">
+            <text class="text">{{checkAdvice}}</text>
+          </view>
+        </uni-collapse-item>
+      </uni-collapse>
+
+      <div class="bottom_sty">
+        <view class="content">
+          <text class="text">妫�楠岀粨鏋�</text>
+        </view>
+      </div>
+      <uni-collapse class="bottom_sty">
+        <uni-collapse-item :title="item.parent" thumb="https://ltpeis.xaltjdkj.cn:5502/static/baogao.png"
+          v-for="(item, index) in alist1" :key="index">
+          <view class="content" v-for="(son, aindex) in item.sons" :key="aindex"
+            style="margin-left:15px; display: flex;">
+            <text style="margin-left: 5px; width: 40%;">{{son.proName}}</text>
+            <view style="margin-left: 5px; width: 40%;">
+              <text>{{son.proResult}}</text>
+            </view>
+            <view style="margin-left: 5px; width: 40%;">
+              <text>{{son.proAdvice}}</text>
+            </view>
+          </view>
+        </uni-collapse-item>
+      </uni-collapse>
+
+      <div class="bottom_sty" v-if="alistss.length">
+        <view class="content">
+          <text class="text">妫�鏌�</text>
+        </view>
+      </div>
+      <uni-collapse class="bottom_sty">
+        <uni-collapse-item :title="item.parent" thumb="https://ltpeis.xaltjdkj.cn:5502/static/baogao.png"
+          v-for="(item, index) in alistss" :key="index">
+          <view class="content" v-for="(son, aindex) in item.sons" :key="aindex"
+            style="margin-left:15px; display: flex; flex-direction: column;">
+            <text style="margin-left: 5px;">妫�鏌ユ墍瑙侊細{{son.yxbx}}</text>
+            <text style="margin-left: 5px;">妫�鏌ユ彁绀猴細{{son.yxzd}}</text>
+            <text style="margin-left: 5px;">涓绘鍖诲笀锛歿{son.shysxm}}</text>
+          </view>
+        </uni-collapse-item>
+      </uni-collapse>
+
+      <div class="bottom_sty">
+        <view class="content">
+          <span class="text1">鎶ュ憡闃呰璇存槑</span>
+          <div>
+            <span class="text2">1.浠ヤ笂鎶ュ憡缁撴灉锛屼粎閽堝鏈妫�鏌ャ�佹楠屾牱鏈礋璐c�傛湰鎶ュ憡涓嶈兘鐢ㄤ簬浜屾浼氳瘖銆佺敤鑽�佹垨鍏朵粬浠讳綍鍖诲鍒ゆ柇鐩殑鐨勪娇鐢ㄣ�傚鎮ㄦ湁涓嶉�傜棁鐘讹紝鎴栭渶瑕佸尰鐤楁湇鍔★紝璇峰強鏃跺埌鍖婚櫌灏卞尰骞堕伒鍖诲槺銆�</span>
+            <span class="text3">鏌ョ湅鏇村</span>
+            <img class="img" src="https://ltpeis.xaltjdkj.cn:5502/static/youjiantou1.png" alt="">
+          </div>
+          <div>
+            <span class="text2">濡傞渶浜嗚В鏇村鍏充簬妫�娴嬫柟娉曞拰妫�娴嬬粨鏋滃弬鑰冨�煎緱淇℃伅锛�</span>
+            <span class="text3">璇风偣杩欓噷</span>
+            <img class="img" src="https://ltpeis.xaltjdkj.cn:5502/static/youjiantou1.png" alt="">
+          </div>
+        </view>
+      </div>
+    </div>
+  </view>
 </template>
 
 <script>
-	import {
-		getReportByTjNumber,
-		getShenGaoTiZhong,
-		getdownloadReport,
-		getHyReportByTjNumber,
-		getJcReportByTjNumber
-	} from "@/api/system/report";
+import { getShenGaoTiZhong1, getreportData } from "@/api/system/report";
 
-	export default {
-		components: {},
-		data() {
-			return {
-				checked: "",
-				reportList: [{
-						date: '2025-02-15',
-						name: '鏉�*钑�',
-						age: 35,
-						gender: '濂�',
-						hospital: '娉惧窛鍘夸汉姘戝尰闄㈠仴搴蜂綋妫�涓績',
-						selected: true
-					},
-					{
-						date: '2024-08-21',
-						name: '鏉�*钑�',
-						age: 35,
-						gender: '濂�',
-						hospital: '娉惧窛鍘夸汉姘戝尰闄㈠仴搴蜂綋妫�涓績',
-						selected: false
-					},
-					{
-						date: '2023-05-15',
-						name: '鏉�*钑�',
-						age: 35,
-						gender: '濂�',
-						hospital: '娉惧窛鍘夸汉姘戝尰闄㈠仴搴蜂綋妫�涓績',
-						selected: false
-					},
-					{
-						date: '2022-08-21',
-						name: '鏉�*钑�',
-						age: 35,
-						gender: '濂�',
-						hospital: '娉惧窛鍘夸汉姘戝尰闄㈠仴搴蜂綋妫�涓績',
-						selected: false
-					},
-
-					{
-						date: '2023-05-15',
-						name: '鏉�*钑�',
-						age: 35,
-						gender: '濂�',
-						hospital: '娉惧窛鍘夸汉姘戝尰闄㈠仴搴蜂綋妫�涓績',
-						selected: false
-					},
-					{
-						date: '2022-08-21',
-						name: '鏉�*钑�',
-						age: 35,
-						gender: '濂�',
-						hospital: '娉惧窛鍘夸汉姘戝尰闄㈠仴搴蜂綋妫�涓績',
-						selected: false
-					}
-				]
-			}
-		},
-		//鐢熷懡鍛ㄦ湡鏂规硶 鈥斺�� 椤甸潰鍔犺浇鏃�
-		onLoad(options) {
-			// this.tjNumber = options.tjNumber
-			// this.getOrderDetailList();
-			// this.getjichu();
-		},
-		methods: {
-			// download() {
-			// 	this.$modal.showToast('涓嬭浇涓�...')
-			// 	let tjNumber = this.tjNumber;
-			// 	downloadReport(tjNumber).then((response) => {});
-			// 	this.$modal.showToast('涓嬭浇鎴愬姛')
-			// },
-			toggleSelect(index) {
-				// const selectedCount = index
-				const selectedCount = this.reportList.filter(item => item.selected).length;
-				// console.log(selectedCount)
-				if (!this.reportList[index].selected && selectedCount >= 5) {
-					uni.showToast({
-						title: '鏈�澶氬彧鑳介�夋嫨5浠芥姤鍛�',
-						icon: 'none'
-					});
-					return;
-				}
-				if (this.reportList[index].selected == true) {
-					this.reportList[index].selected = false
-				} else {
-					return this.reportList[index].selected = true
-				}
-				// this.reportList.value[index].selected = !this.reportList.value[index].selected;
-			},
-			handleCompare() {
-				const selectedReports = this.reportList.filter(item => item.selected);
-				if (selectedReports.length < 2) {
-					uni.showToast({
-						title: '璇疯嚦灏戦�夋嫨2浠芥姤鍛婅繘琛屽姣�',
-						icon: 'none'
-					});
-					return;
-				}
-			},
-			getOrderDetailList() {
-				uni.showLoading({
-					title: '璇风◢绛夛紒'
-				})
-				let tjNumber = this.tjNumber;
-				getReportByTjNumber(tjNumber).then((response) => {
-					uni.hideLoading()
-					this.alist = response.data.list;
-					this.zjadvice = response.data.inspectionAdvice;
-					if (response.data.inspectionAdvice == null) {
-						this.zjadvice = "鏃�"
-					}
-					this.yclist = response.data.tjAbnormal;
-					this.customer = response.data.customter;
-				});
-				getHyReportByTjNumber(tjNumber).then(res => {
-					this.alist1 = res.data;
-				})
-				getJcReportByTjNumber(tjNumber).then(res => {
-					this.alistss = res.data;
-				})
-			},
-			getjichu() {
-
-				let tjNumber = this.tjNumber;
-				getShenGaoTiZhong(tjNumber).then(res => {
-					this.jicuList = res.data;
-				})
-			},
-			add() {
-				if (this.content.length > 35) {
-					this.content = ''
-				} else {
-					this.content = ''
-				}
-				// TODO 灏忕▼搴忎腑涓嶆敮鎸佽嚜鍔ㄦ洿鏂� 锛岄渶瑕佹墜鍔╮esize 鏇存柊缁勪欢楂樺害
-				// #ifdef MP
-				this.$nextTick(() => {
-					this.$refs.collapse.resize()
-				})
-				// #endif
-			},
-			onClick(e) {
-				uni.showToast({
-					title: '鍒楄〃琚偣鍑�'
-				})
-			},
-			getDownload() {
-				const tjNumber = this.tjNumber;
-				// const tjNumber = "10001240222083729"
-				// const flag = false;
-				// getPdf(tjNumber, flag).then((res) => {
-				// const fs = wx.getFileSystemManager(); //鑾峰彇鍏ㄥ眬鍞竴鐨勬枃浠剁鐞嗗櫒
-				// fs.writeFile({
-				// 	filePath: wx.env.USER_DATA_PATH +
-				// 		"/鎶ュ憡.pdf", // wx.env.USER_DATA_PATH 鎸囧畾涓存椂鏂囦欢瀛樺叆鐨勮矾寰勶紝鍚庨潰瀛楃涓茶嚜瀹氫箟
-				// 	data: res,
-				// 	encoding: "binary", //浜岃繘鍒舵祦鏂囦欢蹇呴』鏄� binary
-				// 	success(res) {
-				// 		wx.openDocument({ // 鎵撳紑鏂囨。
-				// 			filePath: wx.env.USER_DATA_PATH + "/鎶ュ憡.pdf", //鎷夸笂闈㈠瓨鍏ョ殑鏂囦欢璺緞
-				// 			showMenu: true, // 鏄剧ず鍙充笂瑙掕彍鍗�
-				// 			 fileType: "pdf",
-				// 			success: function(res) {
-				// 				setTimeout(() => {
-				// 					wx.hideLoading()
-				// 				}, 500)
-				// 			}
-				// 		})
-				// 	}
-				// })
-				// })
-				getdownloadReport(tjNumber).then(res => {
-					if (res.data.flag == "1") {
-						let url = res.data.url
-						uni.navigateTo({
-							url: `/pagesA/report/report?url=${url}`
-						})
-					} else if (res.data.flag == "0") {
-						wx.downloadFile({
-							url: res.data.url, //pdf鍦板潃 渚嬪锛歨ttp://**.*****.***/ceshi/demo.pdf
-							filePath: wx.env.USER_DATA_PATH + "/" + "鎶ュ憡" +
-								".pdf", //wx.env.USER_DATA_PATH 鏂囦欢绯荤粺涓殑鐢ㄦ埛鐩綍璺緞 filepath鍙湁鍙棤
-							success(res) {
-								if (res.statusCode === 200) {
-									const tempFilePath = res.filePath //杩斿洖鐨勬枃浠朵复鏃跺湴鍧�锛岀敤浜庡悗闈㈡墦寮�鏈湴棰勮鎵�鐢�
-									wx.openDocument({
-										filePath: tempFilePath,
-										showMenu: true,
-										fileType: "pdf",
-										success: function(res) {}
-									})
-								} else {
-									showAutoError("鍗忚鎵撳紑澶辫触锛岃閲嶆柊鎵撳紑");
-								}
-							},
-							fail(res) {
-								showAutoError("鍗忚涓嬭浇澶辫触")
-							}
-						})
-					}
-				})
-			},
-			change(e) {
-				console.log(e);
-			}
-		}
-	}
+export default {
+  data() {
+    return {
+      jicuList: [],
+      customer: '',
+      alist1: [],
+      alistss: [],
+      checkAdvice: "",
+      tjNumber: ""
+    };
+  },
+  onLoad(options) {
+    console.log('ReportDetails onLoad options:', options);
+    this.tjNumber = options.tjNum || '';
+    if (this.tjNumber) {
+      this.getOrderDetailList();
+      this.getjichu();
+    } else {
+      uni.showToast({
+        title: '缂哄皯浣撴鐮佸弬鏁�',
+        icon: 'none'
+      });
+    }
+  },
+  methods: {
+    getOrderDetailList() {
+      uni.showLoading({ title: '璇风◢绛夛紒' });
+      getreportData({ tjNum: this.tjNumber }).then(res => {
+        uni.hideLoading();
+        this.alist1 = res.data;
+        const uniqueAdvices = [...new Set(res.data.map(item => item.checkAdvice).filter(Boolean))];
+        this.checkAdvice = uniqueAdvices.join("");
+      }).catch(err => {
+        uni.hideLoading();
+        console.error('鑾峰彇鎶ュ憡鏁版嵁澶辫触:', err);
+        uni.showToast({
+          title: '鑾峰彇鎶ュ憡鏁版嵁澶辫触',
+          icon: 'none'
+        });
+      });
+    },
+    getjichu() {
+      getShenGaoTiZhong1(this.tjNumber).then(res => {
+        if (res.data) {
+          this.jicuList = res.data;
+          // 鍋囪 customer 鏁版嵁浠� res.data 涓幏鍙栵紝鎴栬�呴渶瑕佸崟鐙� API 璋冪敤
+          this.customer = res.data[0]?.customer || { cusName: '', cusBrithday: '', cusSex: '' };
+        }
+      }).catch(err => {
+        console.error('鑾峰彇鍩虹鏁版嵁澶辫触:', err);
+        uni.showToast({
+          title: '鑾峰彇鍩虹鏁版嵁澶辫触',
+          icon: 'none'
+        });
+      });
+    }
+  }
+}
 </script>
 
 <style lang="scss">
-	page {
-		height: 100%;
+.box {
+  width: 100%;
+  background: linear-gradient(180deg, #fd8b4d 50%, #fdb753);
+}
 
-		background-color: #f5f5f5;
-	}
+.Fixed {
+  width: 100%;
+  height: 80rpx;
+  background-color: #fd8b4d;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  position: fixed;
+  top: 0;
+  left: 0;
+  z-index: 1000;
+}
 
-	.container {
-		display: flex;
-		flex-direction: column;
-		height: 100%;
-		background-color: #f5f5f5;
-	}
+.Fixed_left_txt {
+  color: #fff;
+  font-size: 18px;
+  font-weight: 500;
+}
 
-	.nav-header {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding: 0 30rpx;
-		height: 88rpx;
-		background-color: #ffffff;
-		border-bottom: 1px solid #eeeeee;
-	}
+.data {
+  display: flex;
+  justify-content: space-around;
+  padding-top: 102rpx;
+  margin-bottom: 40rpx;
+}
 
-	.nav-left {
-		display: flex;
-		align-items: center;
-	}
+.data_left {
+  width: 316rpx;
+  height: 700rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
 
-	.back-icon {
-		margin-right: 20rpx;
-	}
+.data_img {
+  width: 316rpx;
+  height: 600rpx;
+}
 
-	.nav-title {
-		font-size: 16px;
-		color: #333333;
-		font-weight: 500;
-	}
+.data_left_sty1 {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
 
-	.nav-right {
-		display: flex;
-		align-items: center;
-	}
+.data_left_txt1 {
+  font-size: 20px;
+  color: #fff;
+}
 
-	.divider {
-		width: 1px;
-		height: 20rpx;
-		background-color: #e5e5e5;
-		margin: 0 20rpx;
-	}
+.data_left_sty {
+  width: 180rpx;
+  height: 50rpx;
+  background-color: #f99235;
+  border-radius: 20px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+}
 
-	.report-list {
-		flex: 1;
-		overflow: auto;
-		padding: 30rpx;
-	}
+.data_left_txt2 {
+  font-size: 14px;
+  color: #fff;
+}
 
-	.report-item {
-		background-color: #ffffff;
-		border-radius: 12rpx;
-		margin-bottom: 20rpx;
-	}
+.data_right {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-around;
+  width: 316rpx;
+  height: 700rpx;
+  background-color: #fff;
+  border-radius: 20px;
+}
 
-	.report-content {
-		// display: flex;
-		align-items: center;
-		padding: 30rpx;
-	}
+.data_right_txt1 {
+  font-size: 18px;
+}
 
-	.report-left {
-	display: flex;
-	justify-content: space-between;
-	align-items: center;
-		// margin-right: 20rpx;
-	}
-	
-	.user-info {
-		width: 90%;
-		display: flex;
-		align-items: center;
-	}
+.data_right_sty {
+  width: 316rpx;
+  display: flex;
+  justify-content: space-around;
+}
 
-// 	.report-right {
-// flex: 1;
-// float: right;
-// 	}
+.data_right_txt2 {
+  font-size: 14px;
+}
 
-	.report-middle {
-		flex: 1;
-		background-color: #F9FBFC;
-	}
+.data_right_txt3 {
+  font-weight: 600;
+}
 
-	.report-date {
-		font-size: 16px;
-		color: #333333;
-		margin-bottom: 16rpx;
-		font-weight: 500;
-		padding-left: 20rpx;
-	}
+.data_right_txt4 {
+  color: #f23f45;
+  font-size: 14px;
+}
 
-	.report-info {
-		margin-bottom: 12rpx;
-	}
+.data_right_txt5 {
+  color: #f23f45;
+  font-weight: 600;
+}
 
-	.report-name {
-		font-size: 14px;
-		color: #666666;
-		margin-right: 20rpx;
-	}
+.bottom {
+  background-color: #ffffff;
+}
 
-	.report-age {
-		font-size: 14px;
-		color: #666666;
-		margin-right: 20rpx;
-	}
+.content {
+  padding: 8px;
+}
 
-	.report-gender {
-		font-size: 14px;
-		color: #666666;
-	}
+.text1 {
+  font-size: 14px;
+  font-weight: 600;
+}
 
-	.report-hospital {
-		font-size: 14px;
-		color: #999999;
-	}
+.text2 {
+  font-size: 12px;
+  color: #8a8a8a;
+}
 
-	.tip-text {
-		padding: 20rpx 30rpx;
-		font-size: 14px;
-		color: #ff9900;
-	}
+.text3 {
+  font-size: 12px;
+  color: #1d6ebf;
+}
 
-	.bottom-button {
-		padding: 30rpx;
-		background-color: #ffffff;
-	}
-
-	.compare-button {
-		width: 100%;
-		height: 88rpx;
-		line-height: 88rpx;
-		background-color: #419FFD;
-		color: #ffffff;
-		font-size: 16px;
-		// border-radius: 44rpx;
-	}
+.img {
+  width: 10px;
+  height: 10px;
+}
 </style>
\ No newline at end of file

--
Gitblit v1.8.0