<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>康复管理</title>
		<link rel="shortcut icon" href="../../favicon.ico">
		<link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
		<link href="../../../plugins/toastr/toastr.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="../css/date.css" />
		<link rel="stylesheet" href="../css/rehabilitation_management.css" />
		<style>
			.plr11{
				padding-left: 11px;
				padding-right: 11px;
			}
			.div-line{
				width: 4px; height: 20px;background: #12b7f5;
				margin-right: 9px;
				margin-top: 5px;
			}
			.lh30{
				height: 30px;
				line-height: 30px;
			}
			.mr21{
				margin-right: 21px;
			}
			.c-ff9630{
				color: #ff9630;
			}
			.pb23{
				padding-bottom: 23px;
			}
			.plr13{
				padding-left: 13px;
				padding-right: 13px;
			}
			.dialos-textarea{
				padding: 25px 10px 25px 15px;
				min-height: 140px;
				width: 100%;
				background: #F5F5FA;
				border: 0;
				margin-top: 5px;
				text-indent: 28px;
				resize: none;
				line-height: 28px;
			}
			.bgc-2dbe55 {background-color: #2dbe55;}
		</style>
	</head>

	<body>
		<div class="c-container ui-grid ui-grid-vertical" id="app" v-cloak>
			<div class="page-title flex-box ui-col-0">
				<div class="flex-box-item mw400" flex-grow="2">
					<span class="page-title-name">康复计划</span>
					<a class="icon icon-back icon-16 mr10" href="javascript:history.back();"></a><i class="icon icon-shuaxin icon-16" @click="refreshPage"></i>
				</div>
				<div class="flex-box-item text-center" flex-grow="5">
					<div class="div-kuaisu-task" @click="changeSearch(1)" v-show="tabStatus!=3">快速找任务</div>
					<div class="pull-right switch-list" v-show="tabStatus!=3">
						<span class="rili" :class="{active:(tabStatus==1)}" @click="tabStatus=1"><i class="icon icon-rili icon-20"></i></span>
						<span class="shijianzhou" :class="{active:(tabStatus==2)}" @click="tabStatus=2"><i class="icon icon-liebiao icon-20"></i></span>
					</div>
				</div>
			</div>
			<div class="rehabilition c-position-r bgc-f5f5f5 ui-col-1">
				<div class="search-left w400 c-position-a">
					<span class="c-position-a set-close" @click="changeSearch(-1)"></span>
					<div class="search-condition">
						<p>快速找任务</p>
						<ul class="task-list">
							<li :class="{'active':(searchTask==task.code)}" v-for="task in taskArr" @click="changeTask(task)">{{task.name}}</li>
						</ul>
						<p>任务状态</p>
						<ul class="task-list">
							<li :class="{'active':(status==sts.code)}" v-for="sts in statusArr" @click="changeStatus(sts.code)">{{sts.name}}</li>
						</ul>
					</div>
					<div class="text-center">
						<button class="btn btn-search" @click="goToLoadData">确认</button>
					</div>
				</div>
				<div class="ui-grid c-h100">
					<div class="div-left ui-col-0 plr11" style="position: fixed;height: 100%;overflow: auto;">
						<div class="ui-grid c-border-b lh30">
							<div class="ui-col-0 div-line"></div>
							<div class="ui-col-1 c-f16 c-333">居民信息</div>
						</div>
						<div class="ui-grid c-border-b pb15 pt15">
							<div class="ui-col-0 mr10">
								<img :src="setImgSrc(planInfo.patientPhoto)" width="40" class="c-images-cycle">
							</div>
							<div class="ui-col-1">
								<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>
						<div class="ui-grid mt15 pb15">
							<div class="ui-col-1 c-f16 c-333">冠心病康复计划</div>
							<div class="ui-col-1 c-f14 c-999">总进度：</div>
							<div class="ui-col-0 div-patient-comfirm c-f14 c-fff bgc-12b7f5" v-show="planInfo.status==2 && !planInfo.patientImg" @tap="weiXinConfirmClick">邀请居民确认</div>
						</div>
						<div class="ui-grid">
							<div class="ui-col-1">
								<div class="progress-bar">
									<span class="progress bgc-ff9526" :style="{width: (planInfo.finishedCount/planInfo.allCount*100)+'%'}"></span>
									<span class="p-text">{{planInfo.finishedCount}}/{{planInfo.allCount}}</span>
								</div>
							</div>
						</div>
						<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>
						<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>
							<div class="ui-col-0" style="width: 150px;">
								<div class="c-f16 c-333">{{doc.doctorName}}</div>
								<div class="c-f14 c-999">{{doc.type}}</div>
							</div>
							<div class="ui-col-1" style="width: 200px;">
								<div class="c-f14 c-333">完成项目：<span class="c-f14 c-ff9630">{{doc.finishedItem}}</span></div>
								<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-col-0 div-line"></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" v-if="diagnosisInformation">
									<div class="ui-grid">
										<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">{{diagnosisInformation.advice}}</div>
								</div>
								<div class="ui-col-1 c-t-center" v-if="!diagnosisInformation">无医嘱小结</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 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>
						<div class="calendar-content ui-grid ui-grid-vertical" v-show="tabStatus==1">
							<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 c-border-t" 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">
                                            周一
                                        </div>
                                        <div class="flex-box-item">
                                            周二
                                        </div>
                                        <div class="flex-box-item">
                                            周三
                                        </div>
                                        <div class="flex-box-item">
                                            周四
                                        </div>
                                        <div class="flex-box-item">
                                            周五
                                        </div>
                                        <div class="flex-box-item">
                                            周六
                                        </div>
                                        <div class="flex-box-item">
                                            周日
                                        </div>
                                    </div>
                                </div>
                                <div class="calendar-days">
                                    <div v-for="items in calendarData" class="flex-box">
                                        <!--
                                    -->
                                        <div class="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>
						<div class="time-axis mt50" v-show="tabStatus==2">
							<table class="table">
								<tr>
									<th style="padding-right: 50px;text-align: right;">时间</th>
									<th>项目</th>
									<th>执行人员</th>
									<th>执行地点</th>
									<th class="text-center">相关记录</th>
									<th class="text-center">状态</th>
								</tr>
								<tr v-for="item in timeAxisData" :is-future="item.future">
									<td class="time text-right time-box">
										<p class="mb5">{{item.date}}</p>
										<p class="mb0">{{item.time}}</p>
										<span class="cur-status">{{item.html}}</span>
									</td>
									<td class="project-name mw400">
										<p class="mb5">{{item.title}}</p>
										<p class="ellipsis mb0">{{item.content}}</p>
									</td>
									<td class="executor">{{item.doctor_name}}</td>
									<td class="place-of-execution">{{item.hospital_name}}</td>
									<td class="view-task" @click="viewDetail(item.id,item.status,1)">查看</td>
									<td class="task-status" :class="item.future==-1?'c-ff3b30':(item.status==0?'c-666':'')">{{item.status==0?'未完成':(item.status==1?'已完成':'已预约')}}</td>
								</tr>
								<tr v-if="!timeAxisData.length">
									<td colspan="6" class="f16 ptb10 text-center">
										<img src="../../../images/wushuju_img.png" />
										<p class="c-666">暂无数据</p>
									</td>
								</tr>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>
		</div>
		<script type="text/javascript" src="../../../js/vue.js"></script>
		<script type="text/javascript" src="../../../js/jquery-2.2.4.js"></script>
		<script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../plugins/toastr/toastr.min.js"></script>
		<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>
	</body>

</html>