huhongkun 6 lat temu
rodzic
commit
4acfa7ca16

+ 3 - 2
api/http-request.js

@ -1,5 +1,5 @@
(function($) {
    var publish_version = true;
    var publish_version = false;
    var isInner = false; //发布线上后有内外网的配置
    var docInfo = "app_storage";
    var agentName = "wlyyAgentForDoc";
@ -31,7 +31,7 @@
//      server = "http://192.168.131.154:8080/"
        articleServer="http://172.26.0.118:9092/wlyy/"
//   server = "http://192.168.131.130:8080/";
//		server = "http://192.168.131.123:8080/"; // 明芬
//		server = "http://192.168.131.118:8080/"; // 明芬
//      server = "http://192.168.131.127:8060/"; //逸祥
//      server = "http://192.168.131.24:8080/"; //仕杰
//		server = "http://192.168.131.143:8080/"; // 志南
@ -41,6 +41,7 @@
        loginUrl = "../../login/login.html";
//      loginUrl = "/PC-prescription/login.html"; //自己本地测试时的路径
        imgServer = "http://172.19.103.54/";
        imgServer = "http://172.26.0.110:8888/";
    }
    var baseInfo = window.localStorage.getItem(docInfo);

+ 22 - 2
app/recover/css/personal-manage.css

@ -1,8 +1,10 @@
.bgc-f5f5fa {background-color: #f5f5fa;}
.bgc-dff5fc {background-color: #dff5fc;}
.w350 {width: 350px;}
.w-100-350 {width: calc(100% - 351px);}
.w360 {width: 360px;}
.w-100-360 {width: calc(100% - 361px);}
.c-orange {color: orange;}
.c-ff3b30 {color: #ff3b30;}
.c-2dbe55 {color: #2dbe55;}
.bgc-orange {background-color: #ff9526;}
.bgc-c1c1c1 {background-color: #ebebf5;}
.lh22 {height: 22px; line-height: 22px;}
@ -51,3 +53,21 @@
	background-color: #12b7f5;
	color: #ffffff;
}
.content {height: 100%}
.h380 {height: 380px;}
.over-hidden {overflow: hidden;}
.lh30 {height: 30px; line-height: 30px;}
.w130 {width: 130px;}
.type .active {
	background-color: #12b7f5;
	color: #fff;
}
.b-r-5 {
	border-radius: 5px;
}
.b-r-15 {
	border-radius: 15px;
}
.b-c-12b7f5 {
	border-color: #12b7f5;
}

+ 249 - 29
app/recover/html/personal-manage.html

@ -9,15 +9,11 @@
		<link href="../../../plugins/toastr/toastr.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="../css/new_recover.css" />
		<link rel="stylesheet" type="text/css" href="../css/personal-manage.css" />
		<style>
			.content {height: 100%}
			.h380 {height: 380px;}
		</style>
	</head>
	<body class="m0">
	<div id="app" class="c-333" v-cloak>
		<div class="content ui-grid">
	        <div class="ui-col-0 c-h100 w350 person_info c-border-r ui-grid ui-grid-vertical plr5">
	        <div class="ui-col-0 c-h100 w360 person_info c-border-r ui-grid ui-grid-vertical plr5">
	        	<h4 class="m0 pl15 lh40 c-border-b c-position-r"><em class="c-position-a set-blue-span"></em>个人基础信息</h4>
    			<div class="bgc-f5f5fa mt10 ptb10 plr10">
    				<div class="clearfix">
@ -64,22 +60,21 @@
	    				</li>
	    			</ul>
    			</div>
    			<h4 class="m0 pl15 lh40 c-border-b c-position-r"><em class="c-position-a set-blue-span"></em>医嘱小结</h4>
    			<div class="ptb10 ui-col-1" style="overflow: hidden;">
    				<ul class="m0 p0 c-border b-r-3 c-h100" style="overflow: auto;">
    					<li class="pt5 plr10">
    						<p class="c-999 lh40 clearfix">
    							<span class="fl">冠心病诊断</span>
    							<span class="fr">2018-08-01</span>
    						</p>
    						<div class="bgc-f5f5fa plr5 ptb10" style="line-height: 20px;">
    							&emsp;&emsp;这是诊断内容这是诊断内容这是诊断内容这是诊断内容这是诊断内容这是诊断内容这是诊断内容这是诊断内容这是诊断内容这是诊断内容这是诊断内容这是诊断内容
    						</div>
    					</li>
    				</ul>
    			</div>
    			<h4 class="m0 pl15 lh40 c-position-r"><em class="c-position-a set-blue-span"></em>医嘱小结</h4>
				<ul class="m0 p0 ptb10 ui-col-1 c-border b-r-3 c-h100" style="overflow: auto;">
					<li class="pt5 plr10" v-for="(info, index) in diagnosisInformation" :key="index">
						<p class="c-999 lh40 clearfix">
							<span class="fl">{{info.dischargeDiagnosis}}</span>
							<span class="fr">{{info.dischargeTime}}</span>
						</p>
						<div class="bgc-f5f5fa plr5 ptb10" style="line-height: 20px;">
							&emsp;&emsp;{{info.advice}}
						</div>
					</li>
					<li class="c-t-center ptb10" v-if="!diagnosisInformation.length">无医嘱小结</li>
				</ul>
	        </div>
	        <div class="ui-col-1 c-h100 w-100-350 ui-grid">
	        <div class="ui-col-1 c-h100 w-100-360 ui-grid">
	        	<div class="ui-col-1 c-h100 ui-grid ui-grid-vertical">
	        		<!--<div class="plr5">-->
		        		<div class="m0 pl15 lh40 c-border-b c-position-r clearfix">
@ -138,19 +133,64 @@
	    				</ul>
	    			</div>
	        	</div>
	        	<div class="ui-col-0 w350 c-h100 c-border-l ui-grid ui-grid-vertical">
	        		<div class="ui-col-0">
	        	<div class="ui-col-0 w360 c-h100 c-border-l ui-grid ui-grid-vertical">
	        		<div class="plr5 ui-col-0">
	        			<h4 class="m0 pl15 pr5 lh40 c-border-b clearfix c-position-r"><em class="c-position-a set-blue-span"></em>体征记录</h4>
	        			<div class="h380">
	        				
	        				<div class="pt10 pb10 ui-grid ui-grid-middle c-t-center type">
	        					<div class="ui-col-0 over-hidden lh30 c-border b-r-5">
		        					<span class="c-inline-block w130 bgc-fff c-666 cur-pit" :class="{'active': recordType == 1}" @click="changeType(0,1)">血糖记录</span>
		        					<span class="c-inline-block w130 bgc-fff c-666 cur-pit" :class="{'active': recordType == 2}" @click="changeType(0,2)">血压记录</span>
	        					</div>
	        				</div>
	        				<div class="pt10 bgc-f5f5fa c-t-center">
		        				<div class="ui-grid ui-grid-middle lh22 type">
		        					<div class="ui-col-0 clearfix">
			        					<div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': rangeType == 6}" @click="changeType(1,6)">7天</div>
			        					<div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': rangeType == 29}" @click="changeType(1,29)">30天</div>
			        					<div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': rangeType == 89}" @click="changeType(1,89)">90天</div>
			        					<div class="fl b-r-15 w60 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': rangeType == 182}" @click="changeType(1,182)">半年</div>
		        					</div>
		        				</div>
		        				<div class="ui-grid ui-grid-middle lh22 type c-border-t mtb10 pt10" v-if="recordType == 1">
		        					<div class="ui-col-0 clearfix">
			        					<div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 1}" @click="changeType(2,1)">早餐前</div>
			        					<div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 2}" @click="changeType(2,2)">早餐后</div>
			        					<div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 3}" @click="changeType(2,3)">午餐前</div>
			        					<div class="fl b-r-15 w60 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 4}" @click="changeType(2,4)">午餐后</div>
			        				</div>
		        				</div>
		        				<div class="ui-grid ui-grid-middle type lh22" v-if="recordType == 1">
		        					<div class="ui-col-0 clearfix">
			        					<div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 5}" @click="changeType(2,5)">晚餐前</div>
			        					<div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 6}" @click="changeType(2,6)">晚餐后</div>
			        					<div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 7}" @click="changeType(2,7)">睡前</div>
		        					</div>
		        				</div>
	        				</div>
	        				<div class="ui-grid ui-grid-middle lh30 bgc-f5f5fa c-t-center" :class="{'pt10': recordType == 2}">
	        					<div class="ui-col-2" v-if="recordType == 2">收缩压</div>
	        					<div class="ui-col-2 c-12b7f5">正常:{{toNormal}}次</div>
	        					<div class="ui-col-2 c-ff3b30">偏高:{{toHigh}}次</div>
	        					<div class="ui-col-2 c-2dbe55">偏低:{{toLow}}次</div>
	        				</div>
	        				<div class="ui-grid ui-grid-middle pb10 lh30 bgc-f5f5fa c-t-center" v-if="recordType == 2">
	        					<div class="ui-col-2">舒张压</div>
	        					<div class="ui-col-2 c-12b7f5">正常:{{toNormal2}}次</div>
	        					<div class="ui-col-2 c-ff3b30">偏高:{{toHigh2}}次</div>
	        					<div class="ui-col-2 c-2dbe55">偏低:{{toLow2}}次</div>
	        				</div>
	        				<div style="height: 200px;">
	        					<my-chart :chart-data="chartData"></my-chart>
	        				</div>
	        			</div>
	        		</div>
	        		<div class="plr5 ui-col-1 ui-grid ui-grid-vertical">
	        			<h4 class="ui-col-0 m0 pl15 pr5 lh40 c-border-b clearfix c-position-r"><em class="c-position-a set-blue-span"></em>就诊记录</h4>
	        			<div class="ui-col-0 lh30 c-border-b c-t-center clearfix">
	        				<span class="fl w96 cur-pit" :class="{'active':eventType == 1}" @click="selectType(1)">门诊</span>
	        				<span class="fl w96 cur-pit c-border-l" :class="{'active':eventType == 2}" @click="selectType(2)">住院</span>
	        				<span class="fl w96 cur-pit c-border-l" :class="{'active':eventType == 3}" @click="selectType(3)">体检</span>
	        			<div class="ui-col-0 ui-grid ui-grid-middle lh30 c-border-b c-t-center clearfix">
	        				<div class="ui-col-2 w96 cur-pit" :class="{'active':eventType == 1}" @click="selectType(1)">门诊</div>
	        				<div class="ui-col-2 w96 cur-pit c-border-l" :class="{'active':eventType == 2}" @click="selectType(2)">住院</div>
	        				<div class="ui-col-2 w96 cur-pit c-border-l" :class="{'active':eventType == 3}" @click="selectType(3)">体检</div>
	        			</div>
        				<ul class="ui-col-1 p0 m0" style="overflow: auto;">
        					<li class="clearfix" v-for="(record, index) in seeRecord" :key="index">
@ -182,6 +222,8 @@
        <script src="../../../js/jquery-2.2.4.js"></script>
        <script src="../../../plugins/layer/layer.min.js"></script>
        <script src="../../../plugins/toastr/toastr.min.js"></script>
        <script src="../../../plugins/echarts/3.8.5/echarts.js" type="text/javascript"></script>
        <script src="../../../component/rehabilitation/my-echart.js"></script>
        <script src="../../../js/bootstrap.min.js"></script>
        <script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
@ -191,7 +233,6 @@
		<script type="text/javascript">
			var doctorType = (JSON.parse(window.localStorage.getItem('wlyyAgent'))||{}).doctorType
			var httpData=GetRequest()
			
			function showSuccessMessage(msg) {
				layer.msg(msg, {
					icon: 1
@ -224,18 +265,39 @@
                	isMobile: true,
                	recoverPatInfo: {},
                	finishData: {},
                	diagnosisInformation: [],
                	seeRecord: [],
                	planDetailList: [],
                	isFinishMore: false,
                	page: 1,
                	eventPage: 1,
                	eventType: 1,
                	hasMoreRecord: null
                	hasMoreRecord: null,
                	chartData: {},
                	lastXT: '', // 最近一次血糖记录
                	lastXY: '', // 最近一次血压记录
            		recordType: 1, // 1血糖2血压
            		rangeType: 6, // 日期
            		xtStatu: 1, // 状态血糖
            		toNormal: 0, // 正常
            		toLow: 0, // 偏低
            		toHigh: 0, // 偏高
            		toNormal2: 0, // 正常
            		toLow2: 0, // 偏低
            		toHigh2: 0, // 偏高
            		xtMax: 0, // 血糖最高
            		xtMin: 0, // 血糖最低
            		xyMax: [139, 89], // 血压最高
            		xyMin: [90, 60], // 血压最低
                },
                mounted: function() {
                	this.patientRehabilitationDetail()
                	this.recentPlanDetailRecord()
                	this.archivesEvent()
                	// 获取最新的诊疗信息2条
                	this.findDiagnosisInformationByPatient()
                	// 获取体征记录
                	this.getBodyRecoredLast()
                },
                methods: {
                	changeStatu: function() {
@ -259,6 +321,23 @@
							content: "project-detail.html?planId=" + obj.id
						});
					},
					// 获取最新的诊疗消息
					findDiagnosisInformationByPatient: function() {
						var vm = this,
							loading = layer.load(0, {shade: false}),params = {
								patient: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c",
								page: 0,
								size: 2
							}
						recoverAPI.findDiagnosisInformationByPatient(params).then(function(res) {
							layer.close(loading)
							if(res.status == 200) {
								vm.diagnosisInformation = res.data.detailModelList
							} else {
								showErrorMessage(res.msg);
							}
						})
					},
					patientRehabilitationDetail: function() {
			    		var vm = this,
			    			loadding = layer.load(0, {shade: false}),
@ -350,6 +429,147 @@
			    	},
			    	setPercent: function(plan) {
			    		return Math.floor(plan.allFinishCount / plan.allCount * 100) + "%"
			    	},
			    	// 时间推算
					getDateFromCurrentDate: function() {
						var fromDate = this.recordType == 1 ? this.lastXT : this.lastXY,
							dayInterval = -this.rangeType;
						var curDate = new Date(Date.parse(fromDate.replace(/-/g, "/")));
						curDate.setDate(curDate.getDate() + dayInterval);
						var year = curDate.getFullYear();
						var month = (curDate.getMonth() + 1) < 10 ? "0" + (curDate.getMonth() + 1) : (curDate.getMonth() + 1);
						var day = curDate.getDate() < 10 ? "0" + curDate.getDate() : curDate.getDate();
						return year + "-" + month + "-" + day + " 00:00:00";
					},
					// 血糖最高值最低值
					getNormalLevel: function() {
						var arr = [
								[],
								[6.1, 3.9],
								[7.8, 4.4],
								[6.1, 3.9],
								[7.8, 4.4],
								[6.1, 3.9],
								[7.8, 4.4],
								[6.1, 3.9]
							][this.xtStatu];
						this.xtMax = arr[0]
						this.xyMax = arr[1]
					},
					// 处理数据偏高、偏低、正常
					judgeDataDif: function(val, val2) {
						// 血糖判断
						if(this.recordType == 1) {
							if(val > this.xtMax) {
								++this.toHigh;
							} else if(val < this.xtMin) {
								++this.toLow;
							} else {
								++this.toNormal;
							};
						} else {
							// 血压判断
							if(val > this.xyMax[0]) {
								++this.toHigh;
							} else if(val < this.xyMin[0]) {
								++this.toLow;
							} else {
								++this.toNormal;
							}
							// 血压判断
							if(val2 > this.xyMax[1]) {
								++this.toHigh2;
							} else if(val2 < this.xyMin[1]) {
								++this.toLow2;
							} else {
								++this.toNormal2;
							}
						}
					},
			    	// 体征记录
			    	changeType: function(judge, num) {
			    		if(judge) {
			    			if(judge == 1) {
			    				this.rangeType = num
			    			} else {
			    				this.xtStatu = num
			    			}
			    		} else {
			    			this.recordType = num
			    		}
			    		this.getHealthIndex()
			    	},
			    	// 获取上次体检
			    	getBodyRecoredLast: function() {
			    		var vm = this,
							loading = layer.load(0, {shade: false}),
							params = {
								patient: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c"
							}
						recoverAPI.getBodyRecoredLast(params).then(function(res) {
							layer.close(loading)
							if(res.status == 200){
					        	vm.lastXT = res.data.xt ? res.data.xt.recordDate : null;
					        	vm.lastXY = res.data.xy ? res.data.xy.recordDate : null;
					        	// 初始化执行
								vm.getHealthIndex();
					    	}else{
					        	showErrorMessage(res.msg)
					    	}
						})
			    	},
			    	// 获取体征数据
			    	getHealthIndex: function() {
			    		this.toNormal = 0;
			    		this.toHigh = 0;
			    		this.toLow = 0;
			    		if(this.recordType == 2) {
			    			this.toNormal = 0;
				    		this.toHigh = 0;
				    		this.toLow = 0;
			    		}
			    		var endDate = this.recordType == 1 ? this.lastXT : this.lastXY
			    		if(!endDate) {
			    			showErrorMessage("暂无体征数据");
			    			this.chartData = {
		                		opinion:[],
				                opinionData:[]
				            }
			    			return false;
			    		}
			    		if(this.recordType == 1) { this.getNormalLevel(); }
			    		var vm = this,
							loading = layer.load(0, {shade: false}),
							startDate = vm.getDateFromCurrentDate(),
							params = {
								patient: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c",
								type: vm.recordType,
								begin: startDate,
								end: endDate,
								gi_type: vm.recordType == 1 ? vm.xtStatu : ""
							}
						recoverAPI.getHealthIndex(params).then(function(res) {
							layer.close(loading)
							if(res.status == 200) {
								var arr1 = [], arr2 = [], arr3 = []
								for(var i = 0, len = res.list.length; i < len; i++) {
									vm.judgeDataDif(res.list[i].value1, res.list[i].value2)
									arr1.push(res.list[i].date)
									var obj = {value: res.list[i].value1, name: res.list[i].date},
										obj2 = {value: res.list[i].value2, name: res.list[i].date};
									arr2.push(obj)
									arr3.push(obj2)
								}
								vm.chartData = {
			                		opinion: arr1,
					                opinionData: arr2,
					                recordType: vm.recordType,
					                opinionData2: arr3,
					            }
							} else {
								showErrorMessage(res.msg);
							}
						})
			    	}
                }
            })

+ 48 - 11
app/rehabilitation/html/rehabilitation_management.html

@ -49,6 +49,7 @@
				resize: none;
				line-height: 28px;
			}
			.bgc-2dbe55 {background-color: #2dbe55;}
		</style>
	</head>
@ -98,7 +99,7 @@
								<div class="mt10"><span class="c-f16 mr5">{{planInfo.patientName}}</span><span class="c-f16 c-999">({{planInfo.sex}} {{planInfo.age}}岁)</span></div>
								<div class="tag mt10 tag-1 ml20"></div>
							</div>
							<!--<div class="ui-col-0 div-patient-home c-f14 c-333">进入居民首页</div>-->
							<div class="ui-col-0 div-patient-home c-f14 c-333">进入居民首页</div>
						</div>
						<div class="ui-grid mt15 pb15">
							<div class="ui-col-1 c-f16 c-333">冠心病康复计划</div>
@ -117,7 +118,7 @@
							<div class="ui-col-0 div-line"></div>
							<div class="ui-col-1 c-f16 c-333">服务医生</div>
						</div>
						<div class="ui-grid pt15" v-for="doc in docList">
						<div class="ui-grid pt15" v-for="(doc, index) in docList" :key="index">
							<div class="ui-col-0 ml30 mr21">
								<img :src="setImgSrc(doc.doctorPhoto)" width="40" class="c-images-cycle">
							</div>
@ -130,27 +131,28 @@
								<div class="c-f14 c-333">服务次数:<span class="c-f14 c-ff9630">{{doc.serviceCount}}</span></div>
							</div>
						</div>
						<!--<div class="ui-grid c-border-b lh30 mt15">
						<div class="ui-grid c-border-b lh30 mt15">
							<div class="ui-col-0 div-line"></div>
							<div class="ui-col-1 c-f16 c-333">出院医嘱</div>
							<div class="ui-col-1 c-f16 c-333">医嘱小结</div>
						</div>
						<div class="w-100 c-border pb23 plr13 mt10 mb50">
							<div class="ui-grid pt20">
								<div class="ui-col-1">
								<div class="ui-col-1" v-if="diagnosisInformation">
									<div class="ui-grid">
										<div class="c-f14 c-999 ui-col-1">冠心病诊断</div>
										<div class="c-f14 c-999 ui-col-0">2018/08/01</div>
										<div class="c-f14 c-999 ui-col-1">{{diagnosisInformation.dischargeDiagnosis}}</div>
										<div class="c-f14 c-999 ui-col-0">{{diagnosisInformation.dischargeTime}}</div>
									</div>
									<div class="dialos-textarea c-f14 c-333">我们的冠心病发病率和死亡率呈快速上升趋势。40岁以后每增加10岁,患者率就要递增1倍左右,发病年龄有越来越年轻的人趋势。我们的冠心病发病率和死亡率呈快速上升趋势。40岁以后每增加10岁,患者率就要递增1倍左右,发病年龄有越来越年轻的人趋势。</div>
									<div class="dialos-textarea c-f14 c-333">{{diagnosisInformation.advice}}</div>
								</div>
								<div class="ui-col-1 c-t-center" v-if="!diagnosisInformation">无医嘱小结</div>
							</div>
						</div>-->
						</div>
					</div>
					<div class="nav-content-center bgc-fff c-position-r c-h100 div-right ui-col-1" style="margin-left: 460px;height: 100%;" v-show="tabStatus==3">
						<iframe id="framePage" src="" style="width: 100%;height: 100%;border: 0;"></iframe>
					</div>
					<div class="nav-content-center bgc-fff c-position-r c-h100 div-right ui-col-1" style="margin-left: 460px;" v-show="tabStatus!=3">
						<span style="position: absolute;top: 15px;left: 101px;">
						<span v-if="!isFastSearch" style="position: absolute;top: 15px;left: 101px;">
						<i class="icon icon-prev icon-20" @click="preMonth"></i>
						<span class="currentDay">{{currentDay}}</span>
						<i class="icon icon-next icon-20" @click="nextMonth"></i></span>
@ -158,7 +160,41 @@
							<div class="calendar-descript">
								<span>图例注释: </span><i class="icon icon-blue"></i> <span>专科团队</span>&emsp;<i class="icon icon-green"></i> <span>家医团队</span>&emsp; <i class="icon icon-flag"></i> <span>我的任务</span>
							</div>
							<div class="ui-col-1" style="overflow: hidden; overflow-y: scroll;">
							<!--快速查找-->
							<div class="ui-col-1" style="overflow: hidden; overflow-y: scroll;" v-if="isFastSearch">
								<div class="calendar-days" v-for="searchData1 in searchData">
                                    <div v-for="items in searchData1" class="flex-box clearfix">
                                    	<div class="fl flex-box calendar-day c-fff c-f28 bgc-2dbe55">
                                    		<p class="p0">{{items[0].mounth}}月</p>
                                    	</div>
										<div class="fl calendar-day" v-for="item in items" @click="viewDetail(item.planDetailIds)" :is-future="item.future">
		                                    <span class="day-number">{{item.day}}</span>
		                                    <div class="task-icon">
		                                        <i v-if="item.myTaskFlag" class="icon icon-flag icon-20"></i>
		                                        <i v-if="item.finishFlag" class="icon icon-check"></i>
		                                    </div>
		                                    <div class="coloured-box">
		                                        <span v-if="item.specialist" class="coloured-ribbon coloured-ribbon-blue">专<br />科</span>
		                                        <span v-if="item.family" class="coloured-ribbon coloured-ribbon-green">家<br />医</span>
		                                    </div>
		                                    <div class="progress-box">
		                                        <div class="progress" :style="{opacity:item.specialist?'1':'0'}">
		                                            <span>{{(item.specialist && item.specialist.finish)+'/'+(item.specialist && item.specialist.all)}}</span>
		                                            <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" :style="{width: (item.specialist?(item.specialist.finish/item.specialist.all):0)*100+'%'}"></div>
		                                        </div>
		                                        <div class="progress" :style="{opacity:item.family?'1':'0'}">
		                                            <span>{{(item.family && item.family.finish)+'/'+(item.family && item.family.all)}}</span>
		                                            <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="2" aria-valuemin="0" aria-valuemax="100" :style="{width: (item.family?(item.family.finish/item.family.all):0)*100+'%'}"></div>
		                                        </div>
		                                        <p v-if="!item.noService" class="mb0 f12" :class="{'visibility-hide':!curTask}" style="line-height: 1;">{{curTaskName || '&emsp;'}}</p>
		                                    </div>
		                                    <p v-if="item.noService" class="no-server">无服务项</p>
		                                </div>
		                            </div>
		                       </div>
							</div>
							<!--无快速查找-->
							<div class="ui-col-1" style="overflow: hidden; overflow-y: scroll;" v-if="!isFastSearch">
							    <div class="calendar-week">
                                    <div class="flex-box text-center">
                                        <div class="flex-box-item">
@ -259,6 +295,7 @@
		<script type="text/javascript" src="../../../api/http-request.js"></script>
		<script type="text/javascript" src="../../../plugins/layer/layer.min.js"></script>
		<script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
		<script type="text/javascript" src="../../../api/recover_api.js"></script>
		<script type="text/javascript" src="../../../js/underscore-1.9.1.js"></script>
		<script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="../js/rehabilitation_management.js"></script>

+ 123 - 24
app/rehabilitation/js/rehabilitation_management.js

@ -13,6 +13,7 @@
			timeAxisData:[],//时间轴数据
			__Data:[],//当前的年月(日历)
			__xData:[],//当前的年月(时间轴)
			isFastSearch: false, // 是否是快速查找任务
			status:null,//任务状态(0未完成,1已完成,2已预约)
			searchTask:null,//快速查找任务:(1、我的任务,2、健康教育,3、健康指导,4、随访,5、复诊)
			searchTaskName:null,//快速查找任务:(1、我的任务,2、健康教育,3、健康指导,4、随访,5、复诊)
@ -34,7 +35,9 @@
			curTaskName:'',//快速查找是否点击了搜索按钮
			tabStatus:null,
			planInfo:{},
			docList:[]
			docList:[],
			diagnosisInformation: null,
			searchData: [], // 搜索计划安排(去年、今年、明年)
		},
		mounted:function(){
			if(!this.planId){
@ -45,6 +48,8 @@
			this.planSchedule();
			this.serviceDoctorList();//获取服务医生列表
			this.bindEvents();
			// 获取最新的诊疗信息1条
            this.findDiagnosisInformationByPatient()
		},
		methods:{
			//获取计划表
@ -70,6 +75,23 @@
			        }
				})
			},
			// 获取最新的诊疗消息
			findDiagnosisInformationByPatient: function() {
				var vm = this,
					loading = layer.load(0, {shade: false}),params = {
						patient: vm.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c",
						page: 0,
						size: 1
					}
				recoverAPI.findDiagnosisInformationByPatient(params).then(function(res) {
					layer.close(loading)
					if(res.status == 200) {
						vm.diagnosisInformation = res.data.detailModelList[0]
					} else {
						showErrorMessage(res.msg);
					}
				})
			},
			serviceDoctorList:function(){
				var vm = this;
				rehaAPI.serviceDoctorList({patientCode: this.patientCode}).then(function(res){
@ -120,6 +142,8 @@
				$("body").on("click",".div-patient-comfirm",function(){
					layer.closeAll();
					vm.weiXinConfirmClick();
				}).on("click", ".div-patient-home", function() {
					location.href = "../../recover/html/personal-manage.html?patientCode=" + vm.patientCode
				})
			},
			viewDetail:function(planids,status,type){
@ -264,15 +288,46 @@
			  this.monDetail();
			  this.calenderPlanDetail();
			},
			// 日历有计划数据处理
			planHandleData: function(data, day, mounth) {
				var item = data;
				item.day = day;
				if(mounth) {item.mounth = mounth}
				var finishFlag=false
				var sFlag=false;
				var fFlag=false;
				if(item.specialist){
					if(item.specialist.all==item.specialist.finish){
						sFlag=true;
					}
				}else{
					sFlag = true;
				}
				if(item.family){
					if(item.family.all==item.family.finish){
						fFlag = true;
					}
				}else{
					fFlag = true;
				}
				finishFlag = sFlag && fFlag;
				item.finishFlag=finishFlag;
				return item
			},
//						日历请求
			calenderPlanDetail:function(){
				var vm=this;
				var __days=vm.__Data;
				var lastDay=(__days.concat()).pop().day;
				lastDay=lastDay>9?lastDay:'0'+lastDay;
				if(vm.searchTask || vm.status || vm.status == 0) {
					vm.isFastSearch = true
				} else {
					vm.isFastSearch = false
				}
				var params={
					executeStartTime:__days[0].date+'-'+__days[0].day+' 00:00:00',//日历开始时间(格式:yyyy-MM-dd HH:mm:ss)
					executeEndTime:(__days.concat()).pop().date+'-'+lastDay+' 23:59:59',//日历结束时间(格式:yyyy-MM-dd HH:mm:ss)
					executeStartTime: vm.isFastSearch ? '' : __days[0].date+'-'+__days[0].day+' 00:00:00',//日历开始时间(格式:yyyy-MM-dd HH:mm:ss)
					executeEndTime: vm.isFastSearch ? '' : (__days.concat()).pop().date+'-'+lastDay+' 23:59:59',//日历结束时间(格式:yyyy-MM-dd HH:mm:ss)
					planId:vm.planId,//计划id
					searchTask:vm.searchTask,//快速查找任务:(1、我的任务,2、健康教育,3、健康指导,4、随访)
					status:vm.status,//任务状态(0未完成,1已完成,2已预约)
@ -284,6 +339,70 @@
					var list = [];
					if(res.status==200){
						var data=res.data
						// 快速查找
						if(vm.isFastSearch) {
							var searchData0 = [],
								searchData1 = [],
								searchData2 = [];
							for(var setM = 1; setM <= 12; setM++) {
								var _setM = setM > 9 ? setM : '0' + setM,
									_setY = new Date().getFullYear();
								var data0 = [],
									data1 = [],
									data2 = [];
								for(var i in data) {
									var getY = i.split("-")[0],
										getM = i.split("-")[1],
										getD = i.split("-")[2];
									// 去年
									if(_setY - 1 == getY && _setM == getM) {
										var item = vm.planHandleData(data[i], getD, getM)
										data0.push(item)
										data.length && data.splice(i,1);
									} else if(_setY == getY && _setM == getM) { // 今年
										var item = vm.planHandleData(data[i], getD, getM)
										data1.push(item)
										data.length && data.splice(i,1);
									} else if(_setY + 1 == getY && _setM == getM) { // 明年
										var item = vm.planHandleData(data[i], getD, getM)
										data2.push(item)
										data.length && data.splice(i,1);
									}
								}
								if(data0.length) {
									var addlen = (data0.length + 1) % 7 ? (data0.length + 1) % 7 : 7
									for(var i = 0; i < 7 - addlen; i++) {
										data0.push({
											noService:true
										})	
									}
									searchData0.push(data0)
								}
								if(data1.length) {
									var addlen = (data1.length + 1) % 7 ? (data1.length + 1) % 7 : 7
									for(var i = 0; i < 7 - addlen; i++) {
										data1.push({
											noService:true
										})	
									}
									searchData1.push(data1)
								}
								if(data2.length) {
									var addlen = (data2.length + 1) % 7 ? (data2.length + 1) % 7 : 7
									for(var i = 0; i < 7 - addlen; i++) {
										data2.push({
											noService:true
										})	
									}
									searchData2.push(data2)
								}
							}
							if(searchData0.length) {vm.searchData.push(searchData0)}
							if(searchData1.length) {vm.searchData.push(searchData1)}
							if(searchData2.length) {vm.searchData.push(searchData2)}
							return false;
						}
						// 正常日历
						var _currentTimeStamp=+new Date(new Date().setHours(0, 0, 0, 0));
						for(var i in __days){
							var _key=__days[i].date+'-'+(__days[i].day>9?__days[i].day:'0'+__days[i].day);
@ -293,27 +412,7 @@
								};
							for(var j in data){
								if(_key==j){
									item=data[j];
									item.day=__days[i].day;
									var finishFlag=false
									var sFlag=false;
									var fFlag=false;
									if(item.specialist){
										if(item.specialist.all==item.specialist.finish){
											sFlag=true;
										}
									}else{
										sFlag = true;
									}
									if(item.family){
										if(item.family.all==item.family.finish){
											fFlag = true;
										}
									}else{
										fFlag = true;
									}
									finishFlag = sFlag && fFlag;
									item.finishFlag=finishFlag;
									item = vm.planHandleData(data[j], __days[i].day)
									data.length && data.splice(j,1);
									break;
								}

+ 100 - 0
component/rehabilitation/my-echart.js

@ -0,0 +1,100 @@
Vue.component('my-chart', {
    template: '<div class="c-h100">\
	    		<div id="main" ref="main" class="c-h100"></div>\
		    </div>',
    props: ['chartData'],
    data: function() {
		return {
			charts: null
		}
    },
    created: function() {
    	
    },
    mounted: function() {
    	this.charts = echarts.init(this.$refs.main)
    	this.drawPie()
    },
    methods: {
		drawPie(){
			var vm = this,
				seriesData = [
				        {
				        	name: vm.chartData.recordType == 1 ? "血糖值" : "收缩压",
				            type:'line',
				            itemStyle: {
				            	normal: {
				            		lineStyle: {
				            			color: 'rgb(102,204,204)'
				            		}
				            	}
				            },
				            data: vm.chartData.opinionData
				        }
				    ]
			if(vm.chartData.recordType == 2) {
				seriesData.push({
					name: "舒张压",
					type:'line',
		            itemStyle: {
		            	normal: {
		            		lineStyle: {
		            			color: 'rgb(135,206,250)'
		            		}
		            	}
		            },
		            data: vm.chartData.opinionData2
				})
			}
	        var options = {
	        		grid: {
	        			y: 40,
	        			y2: 60
	        		},
	        		tooltip: {
				        trigger: 'axis',
				        position: function (pt) {
				            return [pt[0], '10%'];
				        }
				    },
				    xAxis: {
				        type: 'category',
				        boundaryGap: false,
				        data: this.chartData.opinion
				    },
				    yAxis: {
				        type: 'value',
				        scale: true,
				        name: vm.chartData.recordType == 1 ? "   单位(mmol/L)" : "   单位(mmHg)",
				        boundaryGap: [0, '100%']
				    },
				    dataZoom: [{
				        type: 'slider',
				        start: 0,
				        end: 100,
				        zoomLock: false
				    }, {
				        start: 0,
				        end: 10,
				        type: 'inside',
				        handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
				        handleSize: '100%',
				        handleStyle: {
				            color: '#fff',
				            shadowBlur: 3,
				            shadowColor: 'rgba(0, 0, 0, 0.6)',
				            shadowOffsetX: 2,
				            shadowOffsetY: 2
				        }
				    }],
				    series: seriesData
				};
	        this.charts.setOption(options)
        }
    },
    watch: {
    	chartData: function(data) {
	        this.drawPie()
    	}
    }
})