puyao 2 days ago
parent
commit
99dfa560e3

+ 11 - 0
api/health.js

@@ -0,0 +1,11 @@
+import Request from '../common/request.js';
+let request = new Request().http
+
+//获取咨询人员列表
+export function getuserlist(data) {
+ 	 return request('/app/common/getDicts',data,'GET');
+} 
+//提交咨询内容
+export function submitconsult(data) {
+ 	 return request('/app/common/getDicts',data,'GET');
+}

+ 8 - 2
assets/css/commonTheme.css

@@ -142,8 +142,8 @@
 .color-red{
 	color: #F22513;
 }
-.color-yellow{
-	color: #FE9000;
+.color-white{
+	color: #fff;
 }
 .color-pink{
 	color: #FF4545;
@@ -175,3 +175,9 @@
 .bg-purple{
 	background-color:#7A73E0;
 }
+.bg-white{
+	background-color:#fff;
+}
+.bg-light{
+	background-color:#F5F7FA;
+}

+ 37 - 0
pages.json

@@ -1114,6 +1114,43 @@
 				     
 				 }
 			]
+		},
+		{
+			"root": "pages_health",
+			"pages": [
+				{
+					"path": "healthConsulting",
+					"style": {
+						"navigationBarTitleText": "健康咨询",
+						"enablePullDownRefresh": false,
+						"navigationStyle": "custom",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "ConsultationDetails",
+					"style": {
+						"navigationBarTitleText": "病例描述",
+						"enablePullDownRefresh": false,
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "healthfiles",
+					"style": {
+						"navigationBarTitleText": "健康档案",
+						"enablePullDownRefresh": false,
+						"navigationStyle": "custom",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				}
+			]
 		}
 	],
 	"globalStyle": {

+ 4 - 2
pages/home/index.vue

@@ -69,14 +69,16 @@
 		 
 		<!-- 在线问诊、处方查询 -->
 		<view class="online-inquiry">
-			<view class="item" @click="navTo('/pages/doctor/doctorQr')">
+			<!-- <view class="item" @click="navTo('/pages/doctor/doctorQr')"> -->
+			<view class="item" @click="navTo('/pages_health/healthConsulting')">
 				<image class="bg-img" src="../../static/images/online_treat.png" mode="aspectFill"></image>
 				<view class="inner">
 					<text class="title">健康<text class="color-pink">咨询</text></text>
 					<text class="sub-title">三师在线服务</text>
 				</view>
 			</view>
-			<view class="item" @click="goAuthUrl('/pages_user/user/prescribeOrder')">
+			<!-- <view class="item" @click="goAuthUrl('/pages_user/user/prescribeOrder')"> -->
+			<view class="item" @click="navTo('/pages_health/healthfiles')">
 				<image class="bg-img" src="../../static/images/chu_query.png" mode="aspectFill"></image>
 				<view class="inner">
 					<text class="title">健康<text class="color-yellow">专管</text></text>

+ 257 - 0
pages_health/ConsultationDetails.vue

@@ -0,0 +1,257 @@
+<template>
+	<view>
+		<u-alert type="warning" :description='description'></u-alert>
+		<view class="p20 column">
+			<view class="bg-white p30 radius16">
+				<view class="justify-between align-center">
+					<view class="bold">咨询人<text class="color-price">*</text></view>
+					<view class="justify-start align-center">
+						<image src="/static/images/health/add_modify.png" class="w24 h24"></image>
+						<view class="fs24 ml8">添加/修改</view>
+					</view>
+				</view>
+				<scroll-view :scroll-x="true" class="peoplebox">
+					<view class="scroll-content ">
+						<view v-for="(item,index) in peoplelist" :key="index" @click="actpeople(item,index)"
+						:class="actitem==index?'act-box':'noact-box'" class="item-list ">
+							<image :src="item.sex=='男'?maleurl:famaleurl" class="w72 h72 radius36 "></image>
+							<view class="ml12">
+								<view class="fs26 bold">{{item.name}}</view>
+								<view class="justify-start align-center color-text2 fs24">
+									<text>{{item.sex}}</text>
+									<text class="ml4">{{item.age}}岁</text>
+								</view>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+				<view class="justify-start align-center center ptb20" v-if="peoplelist.length==0">
+					<u-icon name="plus-circle"></u-icon>
+					<text class="fs28 color-text1">用药人列表为空,请添加</text>
+				</view>
+			</view>
+			<view class="bg-white p30 radius16 mt30">
+				<view class="bold">您最想咨询的问题是什么<text class="color-price">*</text></view>
+				<view class="textinput">
+					<textarea  auto-height maxlength='500' placeholder="请输入内容" :value='consulting' @input='lookvalue'/>
+				</view>
+				<view class="justify-between align-center">
+					<image src="/static/images/health/voice_icon.png" class="w48 h48"></image>
+					<text class="fs24 color-text1">{{consultingNum}}/500</text>
+				</view>
+			</view>
+			<view class="bg-white p30 radius16 mt30">
+				<view class="bold">此次病情是否去线下就诊过<text class="color-price">*</text></view>
+				<view class="justify-start align-center mt20">
+					<view v-for="(item,index) in seedoctor" :key="index" :class="actsee==index?'bg-color color-white':'bg-light'"
+					@click="selectsee(item,index)" class="ptb20 plr30 mr20 radius12" >{{item.name}}</view>
+				</view>
+			</view>
+			<view class="bg-white p30 radius16 mt30">
+				<view class="bold">上传检测报告或患处照片<text class="color-price">*</text></view>
+				<view class="justify-start align-center mt20" @click="showImg()">
+					<view v-for="(item,index) in imagelist" :key="index" @click="actpeople"
+					class="justify-start align-center ml20">
+						<image :src="item" class="w120 h120 radius8 " mode="aspectFill" @click="showImg(item)"></image>
+					</view>
+					<view class="column align-center bg-light w120 h120 radius8 center" v-if="imagelist.length<=4">
+						<u-icon name="plus" ></u-icon>
+						<view class="fs24">上传报告</view>
+					</view>
+				</view>
+				<view class="justify-between fs24 color-text1 mt20">
+					<view>最多上传4张图片</view>
+					<view><text>0</text>/4</view>
+				</view>
+			</view>
+			<view class="h200"></view>
+		</view>
+		<view class="footer center">
+			<view class="bg-color radius44 color-white h88 lh88 center" style="width: 90%;"
+			@click="submit">生成方案</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {getuserlist,submitconsult} from '@/api/health.js'
+	export default {
+		data() {
+			return {
+				description:'为了您的健康,请认真填写以下内容,以便药师为您更好的分析,提供患有针对性的解决方案!',
+				peoplelist:[
+					{
+						name:'任继峰',
+						sex:'男',
+						age:'55',
+						id:0
+					},
+					{
+						name:'任继峰',
+						sex:'男',
+						age:'55',
+						id:1
+					},
+					{
+						name:'朱丽君',
+						sex:'女',
+						age:'55',
+						id:2
+					},
+					{
+						name:'朱丽君',
+						sex:'女',
+						age:'55',
+						id:3
+					}
+				],
+				famaleurl:"/static/images/health/female_profile.png",
+				maleurl:"/static/images/health/male_profile.png",
+				actitem:null,
+				userid:null,
+				consulting:null,
+				consultingNum:0,
+				seedoctor:[
+					{
+						name:'就诊过',
+						value:0
+					},
+					{
+						name:'未就诊',
+						value:1
+					}
+				],
+				actsee:null,
+				imagelist:[]
+			}
+		},
+		methods: {
+			submit(){
+				if(this.userid==null){
+					uni.showToast({
+						icon:'none',
+						title:'请选择咨询人!',
+					});
+					return
+				}
+				if(this.consulting==null){
+					uni.showToast({
+						icon:'none',
+						title:'请输入咨询内容!',
+					});
+					return
+				}
+				if(this.actsee==null){
+					uni.showToast({
+						icon:'none',
+						title:'请选择是否线下就诊过!',
+					});
+					return
+				}
+				if(this.actsee==0){
+					if(this.imagelist.length==0){
+						uni.showToast({
+							icon:'none',
+							title:'如果在线下就诊过,请上传检测报告!',
+						});
+						return
+					}
+				}
+				const data={
+					id:this.userid,
+					doctor:this.actsee,
+					imgurl:this.imagelist
+				}
+				submitconsult().then(res=>{
+					if(res.code==200){
+						uni.showToast({
+							icon:'none',
+							title:'提交成功',
+						});
+					}else{
+						uni.showToast({
+							icon:'none',
+							title:res.msg,
+						});
+					}
+				})
+			},
+			actpeople(item,index){
+				this.actitem=index
+				this.userid=item.id
+			},
+			lookvalue(e){
+				this.consulting=e.detail.value
+				this.consultingNum=e.detail.cursor
+				if(this.consultingNum==500){
+					uni.showToast({
+						icon:'none',
+						title:'最大输入500字符!',
+					});
+				}
+			},
+			selectsee(item,index){
+				this.actsee=item.value
+			},
+			showImg(img) {
+				if(img!=null){
+					var imgs=[];
+					imgs.push(img)
+					//预览图片
+					uni.previewImage({
+						urls: imgs,
+						current: imgs[0]
+					});
+				}
+				else{
+					//预览图片
+					uni.previewImage({
+						urls: this.imagelist,
+						current: this.imagelist[0]
+					});
+				}
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+.peoplebox{
+	  white-space: nowrap;
+	  margin-top: 30rpx;
+	  ::-webkit-scrollbar {
+	    display: none;
+	  }
+	 .scroll-content{
+		  display: flex;
+		flex-wrap: nowrap;
+	 }
+	.item-list{
+		padding: 20rpx 28rpx;
+		width: fit-content;
+		display: flex;
+		justify-content: start;
+		border-radius: 12rpx;
+		margin-right: 20rpx;
+	}
+	.noact-box{
+		background-color: #F5F7FA;
+	}
+	.act-box{
+		background-color: #F0FAFF;
+		border: 2rpx solid #008FD3;
+	}
+}
+.textinput{
+	margin-top: 30rpx;
+	height:200rpx;
+	overflow-y: scroll;
+}
+.footer{
+	padding: 40rpx 0; 
+	width: 100%;
+	position: fixed;
+	bottom: 0;
+	background-color: #fff;
+}
+</style>

+ 105 - 0
pages_health/healthConsulting.vue

@@ -0,0 +1,105 @@
+<template>
+	<view class="hb column hidden container ">
+		<image class="bg" src="/static/images/health_counseling_bg.png" mode="widthFix"></image>
+		<view :style="{height: statusBarHeight,background: bgColor }"></view>
+		<u-navbar
+			title="健康咨询" titleStyle="font-weight: bold;"
+			@rightClick="rightClick"
+			:autoBack="true"
+			:bg-color="bgColor"
+		>
+		</u-navbar>
+		<scroll-view class="content" :scroll-y="true">
+			<view v-for="(index,item) in 10" :key="index" class="healthlist justify-start">
+				<image src="/static/images/71014b69fdcc4b56ae2a84bdc28f11c3.png" mode="aspectFill" class="w280 h210 radius12"></image>
+				<view class="column justify-between ml20">
+					<view>
+						<view class="color-text bold fs36">翟佳滨教授专家团队</view>
+						<view class="fs24 mt8 color-orange">专家团队会诊咨询</view>
+					</view>
+					<view class="healthbox" @click="toDetails">会诊咨询</view>
+				</view>
+			</view>
+			<view class="h120"></view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				statusBarHeight:'',
+				top:0
+			}
+		},
+		computed: {
+			// 计算属性的 getter
+			bgColor: function() {
+				var top=this.top/30;
+				return 'rgba(11,179,242, ' + top + ')';
+			},
+		},
+		onLoad() {
+		    // 获取系统信息
+		    const sys = uni.getSystemInfoSync()
+		    this.statusBarHeight = sys.statusBarHeight+'px'
+		},
+		onUnload() { //普通页面在 onUnload 生命周期中执行
+		    uni.$emit('stop')
+		},
+		onHide() { //tabBar页面在onHide生命周期中执行
+		    uni.$emit('stop')
+		},
+		onPageScroll(e) {
+		  	//console.log(e)
+		  	this.top=e.scrollTop;
+		},
+		methods: {
+			toDetails(){
+				uni.navigateTo({
+					url:'/pages_health/ConsultationDetails'
+				})
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+.container{
+	position: relative;
+	.bg{
+		width: 100%;
+		height: 380rpx;
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: -1;
+	}
+}
+.content{
+	padding-top: calc(var(--status-bar-height) + 140rpx);
+	  height: 100vh;
+	  box-sizing: border-box;
+	  width: 100%;
+	  .healthlist{
+		  width: 85%;
+		  padding: 32rpx;
+		  margin: 0 auto;
+		  background: #FFFFFF;
+		  box-shadow: 0rpx 0rpx 20rpx 8rpx rgba(0,143,211,0.1);
+		  border-radius: 16rpx;
+		  margin-bottom: 20rpx !important;
+	  }
+}
+.healthbox{
+	width: 200rpx;
+	height: 72rpx;
+	background: linear-gradient( 180deg, #27B7FB 0%, #008FD3 100%);
+	box-shadow: 0rpx 8rpx 8rpx 0rpx rgba(0,143,211,0.2);
+	border-radius: 36rpx 36rpx 36rpx 36rpx;
+	text-align: center;
+	line-height: 72rpx;
+	color: #FFFFFF;
+}
+</style>

+ 307 - 0
pages_health/healthfiles.vue

@@ -0,0 +1,307 @@
+<template>
+	<view class="hb column hidden container">
+		<image class="bg" src="/static/images/health/jkda_top_bg.png" mode="widthFix"></image>
+		<view :style="{height: statusBarHeight,background: bgColor }"></view>
+		<u-navbar
+			title="健康档案" titleStyle="font-weight: bold;"
+			@rightClick="rightClick"
+			:autoBack="true"
+			:bg-color="bgColor"
+		>
+		</u-navbar>
+		<scroll-view class="content" :scroll-y="true">
+			<view class="justify-between align-center bg-white radius12 p28">
+				<view class="justify-start align-center">
+					<image :src="maleurl" class="w140 h140"></image>
+					<view class="ml30">
+						<view class="bold fs32 mb12">张小安</view>
+						<view class="justify-start align-center fs24">
+							<text class="orangebox">女</text>
+							<text class="orangebox ml12">56岁</text>
+						</view>
+					</view>
+				</view>
+				<u-icon name="arrow-right"></u-icon>
+			</view>
+			<view class="fs36 bold mt20">健康数据</view>
+			<view class="health-monitoring">
+				<view class="health-monitoring-item" v-for="(item,index) in indexInfo" :key="index"
+					@tap="handleMonitoring(item)">
+					<view class="health-monitoring-title">
+						<view>
+							<view class="health-monitoring-maintitle bold">{{item.type.type}}</view>
+							<view>{{item.type.title}}</view>
+						</view>
+						<image :src="item.type.icon" mode="aspectFill"></image>
+					</view>
+					<view class="health-bmi mt50" v-if="index==0">
+						<view class="justify-between align-center mb12">
+							<view class="justify-start align-center ">
+								<text class="color-text2 fs24 mr20">身高</text>
+								<view >{{item.height||'--'}}</view>
+							</view>
+							<image src="/static/images/health/services_edit_icon.png" class="w32 h32"></image>
+						</view>
+						<view class="justify-between align-center">
+							<view class="justify-start align-center ">
+								<text class="color-text2 fs24 mr20">体重</text>
+								<view >{{item.weight||'--'}}</view>
+							</view>
+							<image src="/static/images/health/services_edit_icon.png" class="w32 h32"></image>
+						</view>
+					</view>
+					<view v-else>
+						<view class="health-monitoring-res resnum">{{item.data || '--'}}</view>
+						<view class="health-monitoring-time">{{item.date && item.date.substring(5,16)}}</view>
+					</view>
+				</view>
+			</view>
+			<view class="fs36 bold mtb20">健康史</view>
+			<view class="cardbox">
+				<view class="health-item" v-for="(item,index) in healthRecordsList" :key="index" @click="handleEditHealth(item,1)">
+					<image class="health-bgicon" :src="item.bgicon"></image>
+					<view class="health-item-info">
+						<view class="cardbox-maintitle" style="margin-bottom: 0;">{{item.title}}</view>
+						<view class="text-overflow" style="margin-top: 20rpx;">{{item.desc || "尚未记录"}}</view>
+					</view>
+				</view>
+			</view>
+			<view class="h80"></view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				statusBarHeight:'',
+				top:0,
+				famaleurl:"/static/images/health/female_profile.png",
+				maleurl:"/static/images/health/my_heads.png",
+				indexInfo: [
+					{
+						data: "",
+						date: "",
+						height:'',
+						weight:'',
+						type: {
+							type: "BMI 24.8",
+							title: "肥胖",
+							icon:"/static/images/health/BMI_icon.png"
+						}
+					},{
+						data: "",
+						date: "",
+						type: {
+							type: "腰围",
+							title: "腰围",
+							icon:"/static/images/health/waist_circumference_icon.png"
+						}
+					},{
+						data: "",
+						date: "",
+						type: {
+							type: "臀围",
+							title: "臀围",
+							icon:"/static/images/health/hip_circumference_icon.png"
+						}
+					},
+					{
+						data: "",
+						date: "",
+						type: {
+							type: "血糖",
+							title: "血糖健康监测",
+							icon: "/static/images/health/blood_sugar_icon.png"
+						}
+					},
+					{
+						data: "",
+						date: "",
+						type: {
+							type: "血压",
+							title: "血压健康监测",
+							icon:"/static/images/health/blood_pressure_icon.png"
+						}
+					},
+					{
+						data: "",
+						date: "",
+						type: {
+							type: "尿酸",
+							title: "尿酸健康监测",
+							icon:"/static/images/health/uric_acid_icon.png"
+						}
+					},
+				],
+				healthRecordsList: [
+					{
+						title: '疾病史',
+						type: "healthHistory",
+						desc: '',
+						bgicon: "/static/images/health/jbs_icon.png",
+					}, {
+						title: '症状史',
+						type: "symptomHistory",
+						desc: '',
+						bgicon: "/static/images/health/zzs_icon.png",
+					}
+				],
+			}
+		},
+		computed: {
+			// 计算属性的 getter
+			bgColor: function() {
+				var top=this.top/30;
+				return 'rgba(11,179,242, ' + top + ')';
+			},
+		},
+		onLoad() {
+		    // 获取系统信息
+		    const sys = uni.getSystemInfoSync()
+		    this.statusBarHeight = sys.statusBarHeight+'px'
+		},
+		onUnload() { //普通页面在 onUnload 生命周期中执行
+		    uni.$emit('stop')
+		},
+		onHide() { //tabBar页面在onHide生命周期中执行
+		    uni.$emit('stop')
+		},
+		onPageScroll(e) {
+		  	//console.log(e)
+		  	this.top=e.scrollTop;
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.container{
+	position: relative;
+	.bg{
+		width: 100%;
+		height: 380rpx;
+		position: absolute;
+		top: 0;
+		left: 0;
+		z-index: -1;
+	}
+}
+.content{
+	padding-top: calc(var(--status-bar-height) + 140rpx) !important;
+	  height: 100vh;
+	  box-sizing: border-box;
+	  width: 100%;
+	  padding: 20rpx;
+}
+.orangebox{
+	border-radius: 24rpx;
+	border: 1rpx solid #FFA599;
+	color: #FF4B33;
+	font-size: 24rpx;
+	padding: 4rpx 20rpx;
+}
+.health-monitoring {
+	// @include u-flex(row, center, flex-start);
+	display: flex;
+	justify-content: space-between;
+	flex-wrap: wrap;
+	// gap: 16rpx;
+	margin-top: 30rpx;
+	margin-bottom: -16rpx;
+	margin-right: -16rpx;
+	&-item {
+		width: 343rpx;
+		min-height: 264rpx;
+		margin: 0 16rpx 16rpx 0;
+		overflow: hidden;
+		background: #FFFFFF;
+		border-radius: 16rpx 16rpx 16rpx 16rpx;
+		padding: 24rpx 34rpx 24rpx 24rpx;
+		box-sizing: border-box;
+	}
+
+	&-maintitle {
+		margin-bottom: 4rpx;
+		font-size: 30rpx;
+		color: #333333;
+	}
+
+	&-title {
+		// @include u-flex(row, center, space-between);
+		display: flex;
+		justify-content: space-between;
+		font-weight: 400;
+		font-size: 24rpx;
+		color: #999999;
+
+		image {
+			width: 72rpx;
+			height: 72rpx;
+			flex-shrink: 0;
+		}
+	}
+
+	.resnum {
+		font-family: DIN, DIN;
+		font-weight: 500;
+		font-size: 64rpx;
+	}
+
+	&-res {
+		height: 78rpx;
+		margin: 20rpx 0 6rpx;
+		font-family: PingFang SC, PingFang SC;
+		font-weight: 600;
+		font-size: 48rpx;
+		color: #333333;
+	}
+
+	&-time {
+		font-weight: 400;
+		font-size: 22rpx;
+		color: #999999;
+	}
+}
+.cardbox {
+	display: flex;
+	flex-direction: row;
+	align-items: center;
+	justify-content: space-between;
+	flex-wrap: wrap;
+	gap: 16rpx 14rpx;
+	&-maintitle {
+		margin-bottom: 4rpx;
+		font-weight: 600;
+		font-size: 30rpx;
+		color: #333333;
+	}
+}
+.health-item {
+	width: 343rpx;
+	height: 224rpx;
+	padding: 24rpx;
+	box-sizing: border-box;
+	background: #FFFFFF;
+	border-radius: 16rpx 16rpx 16rpx 16rpx;
+	overflow: hidden;
+	position: relative;
+	font-family: PingFang SC, PingFang SC;
+	font-weight: 400;
+	font-size: 24rpx;
+	color: #999999;
+}
+.health-item-info {
+	position: relative;
+}
+.health-bgicon {
+	position: absolute;
+	right: 0;
+	bottom: 0;
+	width: 168rpx;
+	height: 168rpx;
+}
+</style>

BIN
static/images/health/BMI_icon.png


BIN
static/images/health/add_modify.png


BIN
static/images/health/blood_pressure_icon.png


BIN
static/images/health/blood_sugar_icon.png


BIN
static/images/health/female_profile.png


BIN
static/images/health/hip_circumference_icon.png


BIN
static/images/health/jbs_icon.png


BIN
static/images/health/jkda_top_bg.png


BIN
static/images/health/male_profile.png


BIN
static/images/health/my_heads.png


BIN
static/images/health/services_edit_icon.png


BIN
static/images/health/uric_acid_icon.png


BIN
static/images/health/voice_icon.png


BIN
static/images/health/waist_circumference_icon.png


BIN
static/images/health/zzs_icon.png


BIN
static/images/health_counseling_bg.png