Bläddra i källkod

会话页的患者资料详情展示

渣渣宝 4 år sedan
förälder
incheckning
5a025c8a04

+ 136 - 2
pages/conversation/conversationWindow.vue

xqd xqd xqd xqd xqd
@@ -50,6 +50,31 @@
 			<button class="cu-btn bg-green shadow" @click="sendMessage">发送</button>
 		</view>
 		<view class="record-loading" v-if="audio.recording"></view>
+
+
+		<view class="top_details" @click="detailsShow = true">
+			<u-icon name="arrow-down" size="40"></u-icon>
+		</view>
+		<u-popup v-model="detailsShow" mode="top">
+			<view class="details">
+				<view>患者姓名:<text>{{orderDetailsList.name}}</text></view>
+				<view>患者年龄:<text>{{orderDetailsList.numbirthday}}</text></view>
+				<view>患者性别:<text>{{orderDetailsList.name}}</text></view>
+				<view>症状描述:{{orderDetailsList.symptoms}}</view>
+				<view>图片:</view>
+				<scroll-view :scroll-x="true">
+					<view style="display: flex;">
+						<view v-for="item,index in orderDetailsList.medical_imgs" :key='index' style="margin: 0 10rpx 10rpx 0 ;">
+							<image mode="aspectFit" :src="item" @click="TanPreviewImage(item)" style="height: 200rpx;width: 200rpx;"></image>
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+
+			<view class="bot_details" @click="detailsShow = false">
+				<u-icon name="arrow-up" size="40"></u-icon>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -98,13 +123,16 @@
 				this.imService.markPrivateMessageAsRead(this.friend.uuid);
 			}
 			this.loadMoreHistoryMessage();
-
+			// 获取订单详情
+			this.getOrderDetails();
 		},
 		mounted() {
 
 		},
 		data() {
 			return {
+				//控制患者详情
+				detailsShow: false,
 				sures: true,
 				keyword: "",
 				InputBottom: 0,
@@ -120,7 +148,8 @@
 					//语音录音中
 					recording: false,
 				},
-				doctorInfo: {}
+				doctorInfo: {},
+				orderDetailsList: {}
 			}
 		},
 		onPullDownRefresh: function(e) {
@@ -135,7 +164,68 @@
 			}
 		},
 		methods: {
+			//图片预览
+			TanPreviewImage(imageUrl) {
+				console.log(imageUrl) // http://192.168.100.251:8970/6_1597822634094.png
+				var images = [];
+				images.push(imageUrl);
+				console.log(images) // ["http://192.168.100.251:8970/6_1597822634094.png"]
+				uni.previewImage({ // 预览图片  图片路径必须是一个数组 => ["http://192.168.100.251:8970/6_1597822634094.png"]
+					current: 0,
+					urls: images,
+					longPressActions: { //长按保存图片到相册
+						itemList: ['保存图片'],
+						success: (data) => {
+							console.log(data);
+							uni.saveImageToPhotosAlbum({ //保存图片到相册
+								filePath: payUrl,
+								success: function() {
+									uni.showToast({
+										icon: 'success',
+										title: '保存成功'
+									})
+								},
+								fail: (err) => {
+									uni.showToast({
+										icon: 'none',
+										title: '保存失败,请重新尝试'
+									})
+								}
+							});
+						},
+						fail: (err) => {
+							console.log(err.errMsg);
+						}
+					}
+				});
+			},
+			//
+			getOrderDetails: async function() {
+				let res = await this.$request.post("patient/orderPatientDetail", {
+					'patient_id': 218
+				});
+				if (res.status == 0) {
+					console.log("订单详情", res)
+					this.orderDetailsList = res.data
+					this.orderDetailsList.medical_imgs = this.orderDetailsList.medical_imgs.split(",")
 
+					// this.orderDetailsList.medical_imgs = this.orderDetailsList.medical_imgs.replace(/"/g,"")
+					// this.orderDetailsList.medical_imgs = this.orderDetailsList.medical_imgs.replace("]"/g,"")
+					// this.orderDetailsList.medical_imgs = this.orderDetailsList.medical_imgs.replace("["/g,"")
+					// this.orderDetailsList.medical_imgs.forEach(function(element) {
+					// 	element = element.replace(/\"/g, ""); 
+					// 	element = element.replace("[","")
+					// 	element = element.replace("]","")
+					// });
+					for (let a = 0; a < this.orderDetailsList.medical_imgs.length; a++) {
+						this.orderDetailsList.medical_imgs[a] = this.orderDetailsList.medical_imgs[a].replace(/\"/g, "");
+						this.orderDetailsList.medical_imgs[a] = this.orderDetailsList.medical_imgs[a].replace("[", "");
+						this.orderDetailsList.medical_imgs[a] = this.orderDetailsList.medical_imgs[a].replace("]", "");
+					}
+					console.log("图片", this.orderDetailsList.medical_imgs)
+				}
+			},
+			// ["https://wechat.fresherbaby.com/uploads/20210119/4IPuheVvP1s7hX5LvHoHcexiswK0DY4XGCNlplba.jpeg","https://wechat.fresherbaby.com/uploads/20210119/NECAiCuWs3mHwH7cb5YiqVhGiwTakxzawfYsK1Ii.jpeg","https://wechat.fresherbaby.com/uploads/20210119/FJkLJVfEBn3sjsltkhvCVh0vdnGfokcWoBVZi8sr.jpeg","https://wechat.fresherbaby.com/uploads/20210119/Ef0E7fgB0fiBf5HQaX6vlSqP2HGP3LnZ0D5i8pfd.jpeg"]
 			// getMessage: async function(flag) {
 			// 	let res = await this.$request.post("doctor/getImList", {
 			// 		'flag': flag
@@ -302,4 +392,48 @@
 		background-size: 100%;
 		border-radius: 40rpx;
 	}
+
+	// 顶部患者详情小图标
+	.top_details {
+		height: 50rpx;
+		width: 100rpx;
+		margin: 0 -50rpx;
+		position: fixed;
+		left: 50%;
+		top: -20rpx;
+		border: 1rpx solid #E4E4E4;
+		border-radius: 20rpx;
+		box-shadow: 0px 0px 0.5px #bfbfbf;
+		display: flex;
+		justify-content: center;
+		align-items: flex-end;
+	}
+
+	.bot_details {
+		height: 50rpx;
+		width: 100rpx;
+		margin: 0 -50rpx;
+		position: relative;
+		left: 50%;
+		border-radius: 20rpx;
+		display: flex;
+		justify-content: center;
+		align-items: flex-end;
+		z-index: 99;
+	}
+
+	.details {
+		margin: 20rpx 28rpx;
+		font-size: 30rpx;
+
+		view {
+			margin-bottom: 20rpx;
+
+			text {
+				margin-left: 20rpx;
+				font-weight: bold;
+			}
+		}
+
+	}
 </style>

+ 19 - 3
pages/login/doctorRenzheng.vue

xqd xqd xqd xqd xqd xqd
@@ -48,7 +48,7 @@
 					<view class="grid col-4 grid-square flex-sub">
 						<view class="bg-img" v-for="(item,index) in form.certificate" :key="index" :data-url="form.certificate[index]">
 							<image :src="imghost+form.certificate[index]" mode='aspectFill'></image>
-							<view class="cu-tag bg-red" v-if="iscertificate" @click="certificateDelImg" :data-index="index">
+							<view class="cu-tag bg-red" v-if="iscertificate"  @click="certificateDelImg" :data-index="index">
 								<text class="cuIcon-close"></text>
 							</view>
 						</view>
@@ -165,7 +165,7 @@
 
 <script>
 	export default {
-		components: {},
+		components: {}, 
 		onLoad() {
 			this.imghost = this.$imgHost
 			this.provinceconfirm()
@@ -176,6 +176,7 @@
 		mounted() {},
 		data() {
 			return {
+				delStatus:false,
 				action: 'https://t11.swdz.com/api/v2/Common/uploadFile',
 				//保存选择的列数
 				form: {
@@ -212,7 +213,7 @@
 				//提交之后不能修改姓名 身份证 性别 证书
 				allupload: false, //是否已经提交过并且审核通过
 				iscertificate: false,
-				imghost:""
+				imghost: ""
 
 			}
 		},
@@ -694,6 +695,7 @@
 					confirmText: '删除',
 					success: res => {
 						if (res.confirm) {
+							this.delImg(this.form.certificate[e.currentTarget.dataset.index])
 							this.form.certificate.splice(e.currentTarget.dataset.index, 1);
 							this.form.certificate = this.form.certificate
 						}
@@ -728,6 +730,20 @@
 					}
 				})
 			},
+			/**
+			 * 删除图片
+			 * 
+			 * */
+			delImg: async function(url) {
+				this.delStatus= true
+				console.log('删除图片','https://wechat.fresherbaby.com/'+url)
+				let res = await this.$request.post('common/delFile', {"url":'https://wechat.fresherbaby.com/'+url});
+				if(res.status==0){
+					uni.showToast({
+						title:'删除成功'
+					})
+				}
+			}
 		}
 	};
 </script>

+ 5 - 0
pages/opinion/opinion.vue

xqd
@@ -106,6 +106,11 @@
 					let data = res.data;
 					console.log('我是data',data); 
 					that.list=data;
+				}else{
+					uni.showToast({
+						icon:'none',
+						title:'请求失败 请稍后重试'
+					})
 				}
 			},
 			

+ 7 - 0
pages/zixun/xiangqing.vue

xqd
@@ -365,6 +365,13 @@
 						// 图文咨询:
 						this.ms = list.symptoms;
 						this.potolList = list.medical_imgs;
+						this.potolList = this.potolList.split(",")
+						for (let a = 0; a < this.potolList.length; a++) {
+							this.potolList[a] = this.potolList[a].replace(/\"/g, "");
+							this.potolList[a] = this.potolList[a].replace("[", "");
+							this.potolList[a] = this.potolList[a].replace("]", "");
+						}
+						console.log("处理后图片数组",this.potolList)
 					} else {
 						this.callTime = list.one_call;
 						this.callList = list.call_list;