瀏覽代碼

Merge branch 'master' of http://192.168.1.220:10080/raolu/PC-application

lulihong 6 年之前
父節點
當前提交
859ec53378
共有 42 個文件被更改,包括 1499 次插入166 次删除
  1. 4 0
      api/jbsc-api.js
  2. 24 2
      api/rehabilitation-api.js
  3. 89 0
      app/article/html/article-info.html
  4. 6 7
      app/article/html/article.html
  5. 2 2
      app/guidance/html/index.html
  6. 21 5
      app/recover/css/new_recover.css
  7. 1 0
      app/recover/css/select-patient.css
  8. 14 12
      app/recover/html/new_recover.html
  9. 2 2
      app/recover/html/personal-manage.html
  10. 4 4
      app/recover/html/select-patient.html
  11. 二進制
      app/recover/images/zhixiang_icon.png
  12. 2 1
      app/rehabilitation/css/guide_the_message.css
  13. 40 6
      app/rehabilitation/css/health_control.css
  14. 304 0
      app/rehabilitation/css/management.css
  15. 14 5
      app/rehabilitation/css/moreplan.css
  16. 16 11
      app/rehabilitation/html/guide_the_message.html
  17. 17 16
      app/rehabilitation/html/health_control.html
  18. 44 0
      app/rehabilitation/html/management.html
  19. 3 3
      app/rehabilitation/html/moreplan.html
  20. 2 2
      app/rehabilitation/html/rehabilitation_management.html
  21. 1 0
      app/rehabilitation/html/service_item_content.html
  22. 70 4
      app/rehabilitation/js/guide_the_message.js
  23. 34 19
      app/rehabilitation/js/health_control.js
  24. 59 0
      app/rehabilitation/js/management.js
  25. 15 3
      app/rehabilitation/js/moreplan.js
  26. 16 6
      app/rehabilitation/js/rehabilitation_management.js
  27. 42 27
      app/rehabilitation/js/service_item_content.js
  28. 5 2
      app/temporary/html/userInfo.html
  29. 18 18
      component/guidance/person-edit-panel.js
  30. 7 9
      component/guidance/person-panel.js
  31. 18 0
      component/guidance/system-send-panel.js
  32. 18 0
      component/guidance/team-edit-panel.js
  33. 38 0
      component/rehabilitation/index-page.js
  34. 72 0
      component/rehabilitation/item-detail.js
  35. 50 0
      component/rehabilitation/new-template-form.js
  36. 28 0
      component/rehabilitation/new-template.js
  37. 184 0
      component/rehabilitation/template-items-select.js
  38. 161 0
      component/rehabilitation/template-items.js
  39. 54 0
      component/rehabilitation/template-list.js
  40. 二進制
      images/qingchu_icon.png
  41. 二進制
      images/shouqi_jiantou_icon.png
  42. 二進制
      images/wushuju_img.png

+ 4 - 0
api/jbsc-api.js

@ -59,6 +59,10 @@
		getCategoryList:function(data){
        	return httpRequest.articleGet('third/jkEdu/Article/getCategoryList', {data:data})
	   	},
//	   	获取文章
	   	getArticle:function(data){
	   		return httpRequest.articleGet('third/jkEdu/Article/getArticalById', {data:data})
	   	},
	   	queryArticlePcList:function(data){
	        return httpRequest.articleGet('doctor/jkEdu/article/PC/queryArticlePcList',  {data:data})
	    },

+ 24 - 2
api/rehabilitation-api.js

@ -32,9 +32,31 @@
		},
//		新增operateRecodr
		saveRehabilitationOperateRecord:function(data){
			return httpRequest.post('doctor/specialist/rehabilitation/saveRehabilitationOperateRecodr',{data:data})
			return httpRequest.post('doctor/specialist/rehabilitation/saveRehabilitationOperateRecord',{data:data})
		},
		// 康复服务套餐管理-获取康复服务套餐模板列表
		findTemplateList:function(data){
			return httpRequest.get("doctor/specialist/rehabilitationPlan/findTemplateList",{data:data})
		},
		// 康复服务套餐管理-获取机构服务项目列表
		findServiceItemsByHospital:function(data){
			return httpRequest.get("doctor/specialist/hospitalServiceItem/findServiceItemsByHospital",{data:data})
		},
		createTemplate:function(data){
			return httpRequest.post('doctor/specialist/rehabilitationPlan/createTemplate',{data:data})
		},
		createTemplateDetail:function(data){
			return httpRequest.post('doctor/specialist/rehabilitationPlan/createTemplateDetail',{data:data})
		},
		findTemplateDetail:function(data){
			return httpRequest.get("doctor/specialist/rehabilitationPlan/findTemplateDetail",{data:data})
		},
		deleteTemplate:function(data){
			return httpRequest.post('doctor/specialist/rehabilitationPlan/deleteTemplate',{data:data})
		},
		selectByIds:function(data){
			return httpRequest.get("doctor/specialist/hospitalServiceItem/selectByIds",{data:data})
		},
		
		
		
		

+ 89 - 0
app/article/html/article-info.html

@ -0,0 +1,89 @@
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<!--<link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css" />-->
		<link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/cross.ui.css" />
		<link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
		<style type="text/css">
			.article-content{
                padding-bottom: 60px;
                background-color: #fff;
                padding-left: 10px;
                padding-right: 10px;
            }
            .article-content img{
                width: 100%;
            }
            [v-cloak]{display: none;}
		</style>
	</head>
	<body style="height: auto;padding: 0 20px;">
		<div id="app" v-cloak>
           	<h1 id="articleTitle" class="c-f16 c-bold c-t-center mtb20 mb12">{{it.articleTitle}}</h1>
            <div class="c-f12 c-909090 mb10">
                <span>{{it.updateTime | formatDate}}</span>
                <span class="fr">{{it.browseNumber}}人浏览</span>
            </div>
            <div id="articleContent" class="article-content c-f14 c-333" style="width: 100%; word-wrap:break-word">
                {{content}}
            </div>
		</div>
        <script src="../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
	    <script src="../../../js/jquery-2.2.4.js"></script>
	     <script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
	    <script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
	    <script src="../../../api/http-request.js" type="text/javascript" charset="utf-8"></script>
	    <script type="text/javascript" src="../../../api/jbsc-api.js" ></script>
	    <script type="application/javascript" src="../../../api/rehabilitation-api.js"></script>
		<script src="../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
		<!--<script src="../../../plugins/layer/layer.min.js"></script>-->
        <script type="text/javascript">
	    	var httpData=GetRequest();
	    	new Vue({
				el: "#app",
			    data:{
		            articleId: httpData['articleId'],
		            content:'',
		            it:{}
			    },
				 mounted: function(){
				 	this.initPage();
			    },
			    methods: {
			    	initPage:function() {
				    	var vm=this;
				        params = { articleId: vm.articleId, userType: 1 };
					    jbscAPI.getArticle(params).then(function(res) {
					        if(res.status == 200) {
					            var content = res.data.articleContent;
					            //修改图片路径,处理图片服务防盗链的问题
					            var domain = httpRequest.server+"/image/getRemoteByURL?imageURL=";
					            var strRegex = /((https|http):\/\/)/g;
					            content = content.replace(strRegex , domain + "$1");
					            var reg=/group1\//g;
					            vm.content = content.replace(reg,httpRequest.imgServer+ 'group1/');
					            vm.it=res.data
					            console.log(vm.content)
//					            $("#xiangqing-content").html(html);
//					            //禁止超链接执行默认行为
//					            $("#xiangqing-content a").attr("onclick","return false");
					        }
					    });
					}
			    },
			    filters:{
			    	formatDate:function(str){
				        if(str){
				            return str.substr(0,19)
				        }else{
				            return "";
				        }
				    }
			    }
    		})
        </script>
	</body>
</html>

+ 6 - 7
app/article/html/article.html

@ -296,9 +296,9 @@
			            jbscAPI.doctorSendArticleToPatients(obj).then(function(res){
			            	top.layer.close(loadding);
			            	if(res.status==10000){
			            		console.log(vm.isReha)
			            		if(vm.isReha){
			            			console.log(obj.articleId)
			            			vm.saveRehabilitationOperateRecodr(obj.articleId);
			            			vm.saveRehabilitationOperateRecord(obj.articleId);
			            		}else{			            			
			            			vm.updataHeathStatus();
			            		}
@ -307,7 +307,7 @@
			            	}
			            })   
			        },
			        saveRehabilitationOperateRecodr:function(id){
			        saveRehabilitationOperateRecord:function(id){
			        	var vm=this;
			        	var userInfo = JSON.parse(window.localStorage.getItem(httpRequest.agentName)); 
			        	var params={
@ -316,15 +316,14 @@
							patientCode:httpData['code'],
							doctorCode:userInfo.uid,
							relationRecordType:3,
							relation_record_code:id,
							relationRecordCode:id,
							relationRecordImg:null,
							status:0
			        	}
			        	rehaAPI.saveRehabilitationOperateRecodr({dataJson:JSON.stringify(params)}).then(function(res){
			        	rehaAPI.saveRehabilitationOperateRecord({dataJson:JSON.stringify(params)}).then(function(res){
			        		var icon=5;
			        		if(res.status==200){//更新父窗体的状态
			        			icon=1
			        			parent.serviceItem.getServiceItem();
			        			icon=1;
			        		}
			        		top.layer.msg(res.msg, {icon: icon});
			        	})

+ 2 - 2
app/guidance/html/index.html

@ -12,7 +12,7 @@
        <link rel="shortcut icon" href="../../../favicon.ico">
        <link rel="stylesheet" type="text/css" href="../../../css/cross.css"/>
        <link rel="stylesheet" type="text/css" href="../../../plugins/toastr/toastr.min.css"/>
        <link rel="stylesheet" type="text/css" href="../../../plugins/artDialog/6.0.5/api/css/ui-dialog.css"/>
        <link rel="stylesheet" type="text/css" href="../../../plugins/artDialog/6.0.5/css/ui-dialog.min.css"/>
        <link rel="stylesheet" type="text/css" href="../css/index.css"/>
        <script src="../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../../js/jquery-2.2.4.js" type="text/javascript" charset="utf-8"></script>
@ -25,7 +25,7 @@
			<router-view></router-view>
		</div>
		<script src="../../../plugins/toastr/toastr.min.js"></script>
		<script src="../../../plugins/artDialog/6.0.5/api/js/dialog-plus.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../plugins/artDialog/6.0.5/js/dialog-plus.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../api/http-request.js"></script>
		<script src="../../../js/underscore.js"></script>
		<script src="../../../api/guidance-api.js"></script>

+ 21 - 5
app/recover/css/new_recover.css

@ -1,3 +1,6 @@
body {
	font-family: "microsoft yahei";
}
#app {
	min-width: 1024px;
	height: 100%;
@ -20,20 +23,21 @@ p {margin-bottom: 0; margin-top: 0;}
.h30 {height: 30px; line-height: 30px}
.lh40 {line-height: 40px}
.cur-pit {cursor: pointer;}
.content {
	height: calc(100% - 41px);
}
.set-photo, .set-photo img {
	height: 45px;
	width: 45px;
	border-radius: 50%;
	margin: 0 auto;
}
.set-photo.imgw80, .set-photo.imgw80 img {
	width: 80px;
	height: 80px;
}
.w300 {width: 300px;}
.c-h100 {height: 100%;}
.c-h100-41 {height: calc(100% - 41px);}
.c-h100-99 {height: calc(100% - 99px);}
.c-h100-80 {height: calc(100% - 79px);}
.c-h100-79 {height: calc(100% - 79px);}
.w-100-66 {width: calc(100% - 66px);}
.w-100-78 {width: calc(100% - 78px);}
.w-100-300 {width: calc(100% - 301px);}
@ -86,7 +90,8 @@ ul {
.border-c12b7f5 {
	border-color: #12b7f5;
}
.bgc-green {background-color: #00bb00;}
.bgc-green {background-color: #4dcd70;}
.bgc-d7dce6 {background-color: #d7dce6;}
.b-r-3 {border-radius: 3px;}
.txt-ells {
	overflow: hidden;
@ -134,3 +139,14 @@ ul {
.doc_list li:hover {
	background-color: #e1e1e1;
}
.set-blue-span {
	top: 10px;
	left: 0px;
	width: 3px;
	height: 20px;
	background-color:#12b7f5;;
}
.set-right-arraw {
	background: url(../images/zhixiang_icon.png) no-repeat no-repeat right center;
	background-size: 14px 14px;
}

+ 1 - 0
app/recover/css/select-patient.css

@ -55,6 +55,7 @@
.cur-pit {cursor: pointer;}
.b-r-3 {border-radius: 3px;}
.disease-list li.active {
	color: #12b7f5;
	border: 1px solid #12b7f5;
	background: url(../images/jiaobiao_xuanzhe_img.png) no-repeat no-repeat bottom right;
}

+ 14 - 12
app/recover/html/new_recover.html

@ -11,14 +11,11 @@
	<body class="m0">
	<div id="app" v-cloak>
		<div class="c-position-a" style="top: -999px; left: -999px;" v-show="isTest"></div>
		<div class="re-title no-select">
			<div class="name">新增康复安排</div>
		</div>
		<div class="content clearfix">
		<div class="c-h100 clearfix">
	        <div class="fl c-h100 w300 person_info c-border-r" style="overflow: hidden;">
	        	<div v-if="!patiInfo" class="c-h100" style="overflow: auto;">
		        	<div  class="c-border-b c-t-center pt20">
		        		<div class="set-photo">
		        		<div class="set-photo imgw80">
		        			<img src="../../../images/p-female.png" alt="居民头像" />
		        		</div>
		        		<p class="ptb10">患者名</p>
@ -35,7 +32,7 @@
	        	</div>
	        	<div v-else class="c-h100 plr10" style="overflow: auto;">
	        		<div  class="c-t-center pt20 c-position-r">
		        		<div class="set-photo">
		        		<div class="set-photo imgw80">
		        			<img :src="setPatImg(patiInfo.photo)" alt="居民头像" />
		        		</div>
		        		<h3 class="ptb10 m0 c-f16">{{patiInfo.name}}</h3>
@ -68,7 +65,7 @@
	        </div>
	        <div class="fl c-h100 w-100-300">
	        	<div class="c-h100 plr5" v-if="!isPlan">
		        	<h4 class="m0 pl10 lh40 c-border-b">配置康复计划</h4>
		        	<h4 class="m0 pl15 lh40 c-border-b c-position-r"><span class="c-position-a set-blue-span"></span>配置康复计划</h4>
		        	<div style="overflow: hidden; height: calc(100% - 41px);">
		        		<div style="overflow: auto; height: 100%;">
				        	<div class="un-select c-t-center pt45" v-if="!patiInfo">
@ -84,8 +81,10 @@
		        </div>
		        <div class="clearfix c-h100" v-else>
		        	<div class="fl w-100-300 c-h100">
		        		<div class="plr5 c-h100-80">
		        			<h4 class="m0 pl10 lh40 c-border-b set-label">配置康复计划
		        		<div class="plr5 c-h100-79">
		        			<h4 class="m0 pl15 lh40 c-border-b set-label c-position-r">
		        				<em class="c-position-a set-blue-span"></em>
		        				配置康复计划
		        				<span v-for="(label, index) in spanLabel" :key="index" class="fr ml20 pl20 c-f14 c-999 cur-pit" :class="{'active': index == labelIndex}" @click="setLabelIndex(index, label)">{{label.labelName}}</span>
		        			</h4>
		        			<div class="c-h100-41" style="overflow: hidden;">
@ -121,7 +120,7 @@
		        						</div>
		        					</li>
		        					<li class="pt100 c-t-center" v-if="!templateDetail.length">
		        						请在右侧“服务项”列表中选择
		        						<span class="set-right-arraw pr20">请在右侧“服务项”列表中选择</span>
		        					</li>
		        				</ul>
		        			</div>
@ -130,14 +129,16 @@
	        				<p class="m0 p0 pl20 ptb10 c-border-b set-label">支付方式:<span class="ml10 pl20 active">按服务支付</span><em class="c-red ml20">(按选择支付方式完成收费)</em></p>
	        				<div class="pl20 lh40">总费用:
	        					<span class="c-red c-f16">¥{{allFee}}</span>
	        					<span class="fr lh30 cur-pit w80 c-t-center c-fff" :class="allFee ? 'bgc-12b7f5' : 'bgc-999'" @click="createRehabilitationPlan()">生成计划</span>
	        					<span class="fr lh30 cur-pit w80 c-t-center c-fff" :class="allFee ? 'bgc-12b7f5' : 'bgc-d7dce6'" @click="createRehabilitationPlan()">生成计划</span>
	        					<span class="fr lh30 cur-pit w80 c-t-center bgc-green c-fff" @click="canclePlan()">取消</span>
	        				</div>
	        			</div>
		        	</div>
		        	<div class="fr w300 c-h100 c-border-l">
		        		<div class="plr5 c-h100">
		        			<h4 class="m0 pl10 lh40 c-border-b">添加其他项目</h4>
		        			<h4 class="m0 pl15 lh40 c-border-b c-position-r">
		        				<em class="c-position-a set-blue-span"></em>添加其他项目
		        			</h4>
		        			<div class="clearfix mtb10 c-border">
								<input class="fl search-input plr10" type="text" v-model="searchKey" placeholder="输入项目名称" />
								<span class="fr search-btn" @click="searchProject()"></span>
@ -502,6 +503,7 @@
                	},
                	canclePlan: function(obj) {
                		this.isPlan = false
                		this.allFee = 0
                	},
                	newPlan: function(disease, templateId) {
                		this.diseaseObj = disease

+ 2 - 2
app/recover/html/personal-manage.html

@ -28,7 +28,7 @@
		    					</p>
		    					<p class="m0 p0 mb10">
		    						<span class="c-999">健康情况:</span>{{recoverPatInfo.patientInfo.healthyCondition}}
		    						<span class="c-999 ml10">联系电话:</span><span class="c-12b7f5 cur-pit" v-if="isMobile" @click="changeStatu()">点击查看</span><span v-else>recoverPatInfo.patientInfo.mobile</span>
		    						<span class="c-999 ml10">联系电话:</span><span class="c-12b7f5 cur-pit" v-if="isMobile" @click="changeStatu()">点击查看</span><span v-else>{{recoverPatInfo.patientInfo.mobile}}</span>
		    					</p>
		    				</div>
		    				<div class="fr set-photo">
@ -219,7 +219,7 @@
                		this.isMobile = false
                	},
                	jumpPlan: function(plan) {
                		location.href = "../../rehabilitation/html/rehabilitation_management.html?planId=" + plan.id
                		location.href = "../../rehabilitation/html/rehabilitation_management.html?planId=" + plan.planId
                	},
					lookProject: function(obj) {
						layer.open({

+ 4 - 4
app/recover/html/select-patient.html

@ -30,7 +30,7 @@
			<ul class="label-list p0 m0" style="overflow: auto; height: 100%;" v-if="isLabel">
				<li v-for="(label, index) in labelList" :key="index">
					<h4 class="c-border-b m0 lh40 pl10 pr50 clearfix" @click="selectIndexFn(index, label)" :class="{'active':selectIndex == index}">{{label.labelName}}<span class="fr">{{label.count}}</span></h4>
					<ul class="pat-list p0 m0" v-if="selectIndex == index">
					<ul class="pat-list p0 m0 c-border-b" v-if="selectIndex == index">
						<li class="clearfix lh40 plr20 ptb10" v-for="(pati, ind) in patiList" @click="getPatientInfo(pati)">
							<div class="fl set-img">
								<img :src="setPatImg(pati.photo)" alt="居民头像" />
@ -47,8 +47,8 @@
						<img :src="setPatImg(patiInfo.photo)" alt="居民头像" />
					</div>
					<div class="fl ml10 set-txt c-999 clearfix">
						<p class="m0 lh22 clearfix"><span class="c-333 c-f16">{{patiInfo.patientName}}</span>&emsp;{{patiInfo.sex}}&emsp;{{patiInfo.age}}岁<strong class="fr mr20 c-333">出院医嘱:<span>0</span></strong></p>
						<p class="m0">身份证号: <span class="c-333">{{patiInfo.idcard}}</span></p>
						<div class="m0 lh22 clearfix"><span class="c-333 c-f16">{{patiInfo.patientName}}</span>&emsp;{{patiInfo.sex}}&emsp;{{patiInfo.age}}岁<p class="fr m0 p0 c-f14 mr20 c-333">出院医嘱:<span>0</span></p></div>
						<p class="m0">身份证号: <span class="c-333 c-f14">{{patiInfo.idcard}}</span></p>
					</div>
				</div>
				<div class="result plr20" style="overflow: hidden; height: calc(100% - 60px);">
@ -158,7 +158,7 @@
			    			loadding = layer.load(0, {shade: false}),
			    			params = {
			    				doctor: doctorCode,
								patientInfo: this.keyword, // 居民身份证或者姓名
								patientInfo: this.keyword == "" ? null : this.keyword, // 居民身份证或者姓名
								disease: label ? label.label : "",
								page: vm.page,
								size: 50

二進制
app/recover/images/zhixiang_icon.png


+ 2 - 1
app/rehabilitation/css/guide_the_message.css

@ -61,4 +61,5 @@
.yslb>span:after{content: '、';}
.yslb>span:last-child:after{display: none;}
.btns-group{padding-left: 20px;}
.btns-group .btn{margin-right: 20px;}
.btns-group .btn{margin-right: 20px;}
.c-999{color: #999;}

+ 40 - 6
app/rehabilitation/css/health_control.css

@ -55,6 +55,10 @@ li {
    text-align: center;
    font-size: 14px;
}
.c-ser-btn a:hover{
    background-color: #13a0d3;
}
.c-ser-btn a {
    height: 28px;
@ -120,6 +124,9 @@ li {
    margin: 10px;
    margin-left: 0px;
}
.neirongrigh  .dataCell:nth-child(1){
    margin-left: 19px;
}
.neironglef button {
    display: inline-block;
@ -197,16 +204,24 @@ li {
.datad button:nth-child(1) {
    background-color: #02cfb9;
}
.datad button:nth-child(1):hover{
    background-color: #03c0ad;
}
.datad button:nth-child(2) {
    background-color: #12b7f5;
}
.datad button:nth-child(2):hover {
    background-color: #14afe7;
}
.datad button:nth-child(3) {
    background-color: #ff3b30;
    margin-right: 20px;
}
.datad button:nth-child(3):hover {
    background-color: #ec382e;
}
.data {
    
@ -235,7 +250,7 @@ li {
}
.dataa .xinxi {
    width: 200px;
    width: 210px;
    color: #999999;
    font-size: 14px;
    margin: 5px;
@ -278,6 +293,15 @@ li {
.input-group-checkbox .input-group-pack .tick:after {
    background-color: #12b7f5;
}
.input-group input{
    height: 27px;
}
.input-group-btn button{
    height: 27px;
}
.checkbox{
    margin-left: 44px;
}
/* 翻页 */
@ -348,7 +372,7 @@ select.form-control {
}
.table {
.tablem {
    position: relative;
    left: 0;
    top: 0;
@ -412,13 +436,17 @@ select.form-control {
    border: none !important;
    background-color: #d7dce6 !important;
}
.table{
.tablem{
     width: calc(100% - 20px);
    margin: 10px 10px !important;
    padding: 10px;
}
.c-ser-btn{
    
.tablem .td{
    border: 0 !important;
}
.caret{
    margin-bottom: 4px;
}
.c-ser-btn a{
@ -439,4 +467,10 @@ select.form-control {
}
label{
    font-weight: 400;
}
a:hover{
    color: white;
}
[v-cloak]{
    display: none;
}

+ 304 - 0
app/rehabilitation/css/management.css

@ -0,0 +1,304 @@
html,body,#app {
	margin: 0;
	padding: 0;
	height: 100%;
	color: #333;
}
ul {
	margin: 0;
	padding: 0;
	list-style-type: none;
}
a {
	text-decoration:none;
}
.clearfix:after {
    visibility: hidden;
    display: block;
    font-size: 0;
    content: ".";
    clear: both;
    height: 0;
}
.clearfix {
    zoom: 1;
}
.fl {
	float: left;
}
.fr {
	float: right;
}
#app>.ui-grid, #app>.ui-grid .ui-grid {
	height: 100%;
}
.ul-wrap {
	background-color:#f5f5fa;
	height: -moz-calc(100% - 100px);
	height: -webkit-calc(100% - 100px);
	height: calc(100% - 100px);
	overflow-y: auto;
}
.left-panel {
	width: 450px;
	border-right: 1px solid #d7dce6;
}
.title-name {
	height: 40px;
	line-height: 40px;
	border-bottom: 1px solid #d7dce6;
	box-sizing: border-box;
}
.title-name:before {
	content: '';
	display: inline-block;
	vertical-align: middle;
	background: #12b7f5;
	width: 4px;
	height: 20px;
	margin-right: 10px;
}
.inp-search {
	border: solid 1px #d7dce6;
	margin: 10px 0 auto;
	width: 100%;
	height: 30px;
	padding-left: 10px;
	box-sizing: border-box;
}
.search-warp {
	position: relative;
}
.search-warp::after {
	content: ' ';
	width: 20px;
	height: 20px;
	position: absolute;
	right: 8px;
	top: 14px;
	display: block;
	background: url(../../../images/sousuo_icon.png) center center / 15px 15px no-repeat;
}
.temp-item {
	height: 28px;
	line-height: 28px;
	background-color: #ffffff;
	border-radius: 5px;
	border: solid 1px #82dcfa;
	margin: 20px 0;
	cursor: pointer;
}
.temp-item.active {
	color: #fff;
	background-color: #12b7f5;
}
.temp-item.add {
	height: 28px;
	background-color: #ffffff;
	border-radius: 5px;
	border: solid 1px #82dcfa;
}
.wushuju {
	width: 260px;
	margin-top: 100px;
}
.new-temp-btn {
	width: 120px;
	height: 34px;
	background-color: #ffffff;
	border-radius: 17px;
	border: solid 1px #12b7f5;
	font-size: 14px;
	color: #12b7f5;
	padding: 5px 10px;
	cursor: pointer;
}
.temp-name-inpt {
	height: 28px;
	line-height: 28px;
	box-sizing: border-box;
	padding-left: 10px;
}
.save-temp-name-btn {
	height: 28px;
	line-height: 28px;
	background-color: #12b7f5;
	border-radius: 2px;
	color: #ffffff;
	width: 80px;
	display: inline-block;
}
.foot-btns {
	position: absolute;
	bottom: 20px;
	left: 50%;
    margin-left: -94px;
}
.delete-btn {
	width: 90px;
	height: 34px;
	background-color: #f96565;
	border-radius: 2px;
	padding: 5px 10px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.save-btn {
	width: 90px;
	height: 34px;
	background-color: #12b7f5;
	border-radius: 2px;
	padding: 5px 10px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.list-item {
	position: relative;
	cursor: pointer;
}
.list-item.arrow-r:before {
	height: 11px;
	width: 11px;
	content: '';
	display: inline-block;
	vertical-align: middle;
	background: url(../../../images/shouqi_jiantou_icon.png) no-repeat 100%;
	margin-right: 5px;
}
.list-item.arrow-d:before {
	height: 11px;
	width: 11px;
	content: '';
	display: inline-block;
	vertical-align: middle;
	background: url(../../../images/zhankai_jiantou_icon.png) no-repeat 100%;
	margin-right: 5px;
}
.list-item-name {
	width: 320px;
	height: 28px;
	line-height: 28px;
	background-color: #f5f5fa;
	border-radius: 5px;
	border: solid 1px #82dcfa;
	color: #666666;
	display: inline-block;
	vertical-align: middle;
}
.add-item-btn {
	width: 60px;
	height: 28px;
	background-color: #12b7f5;
	border-radius: 5px;
	color: #fff;
	display: inline-block;
	vertical-align: middle;
	text-align: center;
	line-height: 28px;
}
.add-item-btn.disabled {
	background-color: #d7dce6;
	pointer-events: none;
}
.item-card {
	position: relative;
	background-color: #ffffff;
	border-radius: 10px;
	border: solid 1px #d7dce6;
}
.item-card:before {
	content: '';
    width: 3px;
    height: 60px;
    background-color: #12b7f5;
    border-radius: 3px;
    position: absolute;
    left: 0;
    top: 50%;
    margin-top: -30px;
}
.item-delete-btn {
	position: absolute;
    right: 5px;
    top: 50%;
    margin-top: -10px;
    cursor: pointer;
}
.template-items {
	height: -moz-calc(100% - 100px);
	height: -webkit-calc(100% - 100px);
	height: calc(100% - 100px);
    overflow-y: auto;
}
.item-detail {
	border: solid 1px #d7dce6;
	box-sizing: border-box;
}
.item-detail-name {
	height: 40px;
	line-height: 40px;
	background-color: #f5f5fa;
}
.back-btn {
	display: inline-block;
	width: 120px;
	height: 34px;
	line-height: 34px;
	background-color: #12b7f5;
	border-radius: 2px;
	color: #fff;
	cursor: pointer;
	position: absolute;
	left: 50%;
	bottom: 10px;
	margin-left: -60px;
}
.item-detail-wrap {
	height: -moz-calc(100% - 20px);
	height: -webkit-calc(100% - 20px);
	height: calc(100% - 20px);
}
.item-detail-innerwrap {
	height: -moz-calc(100% - 50px);
	height: -webkit-calc(100% - 50px);
	height: calc(100% - 50px);
	overflow-y: auto;
}

+ 14 - 5
app/rehabilitation/css/moreplan.css

@ -2,13 +2,19 @@
    outline: none;
    list-style: none;
    box-sizing: border-box;
   
}
[v-cloak]{
    display: none;
}
ul,
li,
p {
    margin: 0;
}
body{
    font-family: 微软雅黑;
}
.flex-box {
    display: -webkit-box;
@ -143,7 +149,7 @@ p {
    color: #ffffff;
    border-top-left-radius: 15px;
    border-bottom-left-radius: 15px;
    margin-right: 40px;
}
@ -164,7 +170,7 @@ p {
    border: 1px solid #d7dce6;
    margin: 10px;
    border-radius: 10px;
    height: 142px;
    height: 124px;
    margin-bottom: 0;
    min-width: 1235px;
}
@ -208,10 +214,11 @@ p {
.doc {
    background-color: #f5f5fa;
    width: 280px;
    width: 290px;
    height: 100px;
    margin: 20px;
    text-align: center;
    margin-left: 15px;
}
.doc:nth-child(1){
            margin-left: 164px;
@ -236,7 +243,9 @@ p {
}
.fdb p {
    /* height: 17px; */
    width: 100%;
    line-height: 19px;
}
.fdb p:nth-child(1) {
@ -345,5 +354,5 @@ p {
    display: inline-block;
}
.datab{
    width: 775px;
    width: 800px;
}

+ 16 - 11
app/rehabilitation/html/guide_the_message.html

@ -15,7 +15,7 @@
		      <h4 class="panel-title">
		        <a role="button" class="flex-box">
		          <div class="flex-box-item service-top">
		          	<p class="service-name"><span class="service-index">1</span><span>{{service.title}}</span></p>
		          	<p class="service-name"><!--<span class="service-index">1</span><span>-->{{service.title}}</span></p>
		         	<div class="label-group">
		         		<span class="pull-right mt5"><i v-if="service.statusName=='已完成'" class="icon icon-gouxuan icon-18 mr5"></i>{{service.statusName}}</span>
		         		<span class="label-blue">{{service.shortExecuteTime}}</span>
@ -60,15 +60,15 @@
		      				<div class="f14 c-333">{{item.content}}</div>
	      				</div>
	      			</div>
	      			<div class="flex-box btns-group" v-if="(service.isMyTask==1 || service.isCreate || service.isCK) && service.planStatus!=0">
	      			<div class="flex-box btns-group" v-if="(service.isMyTask==1 || service.isCreate || service.isCK) && service.planStatus!=0 && service.status!=1">
	      				<button class="btn btn-yuyue" v-if="service.reserve==1" @click="qwapp">转诊预约</button>
	      				<button class="btn btn-yuyue" v-if="service.itemType==0 && service.operate!=1" @click="goToFinish(service.planDetaiId)">上传附件</button>
	      				<button class="btn btn-yuyue" v-if="service.itemType==2 && service.operate!=1 && !service.isZK" @click="jkjy(service.patient,service.planDetaiId)">健康教育</button>
	      				<button class="btn btn-yuyue" v-if="service.itemType==3 && service.operate!=1 && !service.isZK" @click="jkzd(service.planDetaiId,service.patient)">健康指导</button>
	      				<button class="btn btn-yuyue" v-if="service.itemType==4 && service.operate!=1 && !service.isZK" @click="qwapp">随访</button>
	      				<button class="btn btn-yuyue" v-if="service.type==0 && service.operate!=1" @click="goToFinish(service.planDetaiId)">上传附件</button>
	      				<button class="btn btn-yuyue" v-if="service.type==2 && service.operate!=1 && !service.isZK" @click="jkjy(service.patient,service.planDetaiId)">健康教育</button>
	      				<button class="btn btn-yuyue" v-if="service.type==3 && service.operate!=1 && !service.isZK" @click="jkzd(service.planDetaiId,service.patient)">健康指导</button>
	      				<button class="btn btn-yuyue" v-if="service.type==4 && service.operate!=1 && !service.isZK" @click="qwapp">随访</button>
	      				<button class="btn btn-zhidao" @click="zdly(service)" v-if="service.isCreate && (service.isMyTask!=1)">指导留言</button>
	      				<button class="btn btn-zhidao" @click="zdly(service)" v-if="service.isCK">查看留言</button>
	      				<button class="btn btn-fuwuma" v-if="service.itemType==1 && service.operate!=1" @click="fwm(service.planDetaiId,service.patient)">服务码</button>
	      				<button class="btn btn-fuwuma" v-if="service.type==1 && service.operate!=1" @click="fwm(service.planDetaiId,service.patient)">服务码</button>
	      			</div>
	      		</div>
	      		<div class="complete-info pt10">
@ -83,13 +83,13 @@
	      			<textarea v-if="service.status!=1" class="form-control" style="resize: none;" rows="4" placeholder="可备注您的服务记录" v-model="service.node"></textarea>
	      			<div v-if="service.status==1">{{service.node}}</div>
	      		</div>
	      		<div class="note-info pt10" style="display: none;">
	      		<div class="note-info pt10" v-if="(service.type==2 || service.type==4) && service.relationRecordCode">
	      			<p class="f14 c-333">关联记录</p>
	      			<p class="guanlian-list text-center">
	      				<span class="pull-right"><i class="icon icon-arrow-right"></i></span>随访记录sfs
	      			<p class="guanlian-list text-center c-333" @click="viewDetial(service.type,service.relationRecordCode)">
	      				<span class="pull-right"><i class="icon icon-arrow-right"></i></span>{{service.type==2?'健康文章':'随访记录'}} {{service.completeTimeShort}}
	      			</p>
	      		</div>
	      		<div class="note-info ptb10">
	      		<div class="note-info ptb10" v-if="service.type==0">
	      			<p class="f14 c-333">相关记录</p>
	      			<ul class="upload-box"  v-if="service.status!=1">
	      				<li class="flex-box" v-for="(img,index) in upImgs">
@ -114,6 +114,11 @@
	      				<p>暂无相关记录</p>
	      			</div>
	      		</div>
	      		<div id="outerdiv" style="position:fixed;top:0;left:0;background:rgba(0,0,0,0.7);z-index:2;width:100%;height:100%;display:none;">
				    <div id="innerdiv" style="position:absolute;">
				        <img id="bigimg" style="border:5px solid #fff;" src="" />
				    </div>
				</div>
	      		<div class="text-center ptb50" v-if="service.status!=1">
	      			<button class="btn btn-zhidao" @click="qrwc">确认完成</button>
	      		</div>

+ 17 - 16
app/rehabilitation/html/health_control.html

@ -19,9 +19,9 @@
</head>
<body>
    <div id="app" v-cloak>
        <div class="re-title no-select">
        <!-- <div class="re-title no-select">
            <div class="name">康复管理</div>
        </div>
        </div> -->
        <!-- 内容 -->
        <div class="neirong1 flex-box">
            <div class="neirongrigh flex-box">
@ -63,16 +63,16 @@
                <div class="c-ser-btn" id="queryBtn" @click="search()">
                    <a href="javascript:;">搜索</a>
                </div>
                <label class="checkbox all-checkbox">
                    <input type="checkbox" name="tags" class="c-hide" value="1" id="c" @click="daiban()">
                    <i class="icon-chkbox"></i>
                    今日待办
                </label>
            </div>
            <label class="checkbox all-checkbox">
                <input type="checkbox" name="tags" class="c-hide" value="1" id="c" @click="daiban()">
                <i class="icon-chkbox"></i>
                今日代办
            </label>
            
            <div class="neironglef">
                <button @click="newRecover()">新康复安排</button>
                <button>模版管理</button>
                <button @click="modelControl()">模版管理</button>
            </div>
        </div>
        <div class="neirong2">
@ -82,19 +82,20 @@
                <li>操作</li>
            </ul>
            <!-- table -->
            <table class="data table">
            <table class="data table tablem">
                <tr v-if="!wujilu" v-for="(data, index) in tablelist" class="datas">
                    <td>
                    <td class="td">
                        <div class="all flex-box">
                            <div class="dataa flex-box">
                                <div :class="{ quote: isActive}"></div>
                                <img :src="setImgSrc(data.photo)" width="40" height="40" class="c-images-cycle" />
                                <p class="xinxi">
                                    <span>{{data.patientName}}
                                    </span>({{data.sex}}&nbsp;{{data.age}}岁)
                                    <br><span :id="'hospitalName_'+data.id">{{data.hospitalName}}</span></p>
                                    </span>&nbsp;&nbsp;(&nbsp;{{data.sex}}&nbsp;{{data.age}}岁&nbsp;)
                                    <br><span :id="'hospitalName_'+data.id" style="font-size: 14px;color: #999999;">{{data.hospitalName}}</span></p>
                                <p class="biaoqian">
                                    <span></span>{{data.healthyCondition}}</p>
                                </p>
                            </div>
                            <div class="datab flex-box">
                                <p>{{data.planTypeName}}</p>
@ -104,13 +105,13 @@
                                </div>
                                <span class="cgre">{{data.allFinishCount}}/</span>
                                <span class="cgre">{{data.allCount}}</span>
                                <p class="cred">今日代办:
                                <p style="margin-left:20px;"class="cred">今日待办:
                                    <span>{{data.todayBacklogCount}}</span>
                                </p>
                                <p class="cgre margin-10">已完成:
                                    <span>{{data.finishedCount}}</span>
                                </p>
                                <p class="cgre">未完成:
                                <p style="margin-left: 10px;"class="cgre">未完成:
                                    <span>{{data.unfinishedCount}}</span>
                                </p>
                            </div>
@ -121,7 +122,7 @@
                                <button>
                                    <a href="javascript: void(0)" @click="checkPlan(data)">查看计划</a>
                                </button>
                                <button class="stopBtn" @click="stop(data)" :data-id="data.id" :id="'stopBtn_'+data.id">终止计划</button>
                                <button class="stopBtn" @click="stop(data)" :data-id="data.id" :id="'stopBtn_'+data.id">中止计划</button>
                            </div>
                        </div>
                    </td>

+ 44 - 0
app/rehabilitation/html/management.html

@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="renderer" content="webkit">
        <meta http-equiv="Cache-Control" content="no-siteapp">
        <meta http-equiv="X-UA-Compatible" content="IE=Edge">
        <title>模板管理</title>
        <meta name="keywords" content="">
        <meta name="description" content="">
        <link rel="shortcut icon" href="../../../favicon.ico">
        <link rel="stylesheet" type="text/css" href="../../../css/cross.css"/>
        <link rel="stylesheet" type="text/css" href="../../../plugins/toastr/toastr.min.css"/>
        <link rel="stylesheet" type="text/css" href="../../../plugins/artDialog/6.0.5/css/ui-dialog.min.css"/>
        <link rel="stylesheet" type="text/css" href="../css/management.css"/>
        <script src="../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../../js/jquery-2.2.4.js" type="text/javascript" charset="utf-8"></script>
		
	</head>
	<body>
		<div id="app" >
			<router-view></router-view>
		</div>
		<script src="../../../plugins/toastr/toastr.min.js"></script>
		<script src="../../../plugins/artDialog/6.0.5/js/dialog-plus.min.js" type="text/javascript" charset="utf-8"></script>
		<script>
			var EventBus = new Vue();
			Vue.prototype.loading = dialog({contentType:'load', skin:'bk-popup'})
		</script>
		<script src="../../../api/http-request.js"></script>
		<script src="../../../js/underscore.js"></script>
		<script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
		<script src="../../../js/vue-router.js"></script>
		<script src="../../../component/rehabilitation/template-items.js"></script>
		<script src="../../../component/rehabilitation/template-items-select.js"></script>
		<script src="../../../component/rehabilitation/template-list.js"></script>
		<script src="../../../component/rehabilitation/new-template-form.js"></script>
		<script src="../../../component/rehabilitation/new-template.js"></script>
		<script src="../../../component/rehabilitation/item-detail.js"></script>
		<script src="../../../component/rehabilitation/index-page.js"></script>
		<script src="../js/management.js" type="text/javascript" charset="utf-8"></script>
	</body>
</html>

+ 3 - 3
app/rehabilitation/html/moreplan.html

@ -17,7 +17,7 @@
</head>
<body>
    <div id="app">
    <div id="app" v-cloak>
        <div class="re-title no-select">
            <div class="name">康复管理</div>
        </div>
@ -41,7 +41,7 @@
                                </p>
                                <div class="xinxi">
                                    <div class="xinxitop flex-box">
                                            <p>{{dat.patientName}}&#x3000;({{dat.sex}}{{dat.age}}岁)
                                            <p><span style="color:#333333;">{{dat.patientName}}</span>&#x3000;({{dat.sex}}{{dat.age}}岁)
                                                </p>
                                                <p class="biaoqian">
                                                    <span></span>康复期
@ -145,7 +145,7 @@
                    <div class="detaild">
                        <a href="javascript: void(0)" @click="checkPatient()">查看患者</a>
                        <a href="javascript: void(0)" @click="checkPlan(data)">查看计划</a>
                        <a href="javascript: void(0)"  @click="stop(data)" :id="'stopBtn_'+data.planId">终止计划</a>
                        <a href="javascript: void(0)"  @click="stop(data)" :id="'stopBtn_'+data.planId">中止计划</a>
                    </div>

+ 2 - 2
app/rehabilitation/html/rehabilitation_management.html

@ -32,7 +32,7 @@
					<div class="search-condition">
						<p>快速找任务</p>
						<ul class="task-list">
							<li :class="{'active':(searchTask==task.code)}" v-for="task in taskArr" @click="changeTask(task.code)">{{task.name}}</li>
							<li :class="{'active':(searchTask==task.code)}" v-for="task in taskArr" @click="changeTask(task)">{{task.name}}</li>
						</ul>
						<p>任务状态</p>
						<ul class="task-list">
@ -94,7 +94,7 @@
											<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;">{{curTask==1?'我的任务':(curTask==2?'健康教育':(curTask==3?'复诊':(curTask==4?'随访':'&emsp;')))}}</p>
										<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>

+ 1 - 0
app/rehabilitation/html/service_item_content.html

@ -84,6 +84,7 @@
		<script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
		<script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript" src="../../../js/underscore.js"></script>
		<script type="text/javascript" src="../../../plugins/layer/layer.min.js" ></script>
		<script type="text/javascript" src="../js/service_item_content.js"></script>
	</body>
</html>

+ 70 - 4
app/rehabilitation/js/guide_the_message.js

@ -26,7 +26,7 @@
				top.layer.open({
					type: 2,
					//				  offset: ['100px'], //右下角弹出
					area: ['800px', '648px'],
					area: ['80%', '648px'],
					shade: 0.5,
					title: '健康教育',
					fixed: true, //不固定
@ -43,7 +43,7 @@
				top.layer.open({
					type: 2,
					//				  offset: ['100px'], //右下角弹出
					area: ['800px', '648px'],
					area: ['80%', '648px'],
					shade: 0.5,
					title: '健康教育',
					fixed: true, //不固定
@ -89,6 +89,10 @@
							icon: 5
						});
					}
					if(vm.service.status==1){
						var index = top.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
						top.layer.title('服务记录详情', index)  //再改变当前层的标题						
					}
				})
			},
			zdly: function(data) {
@ -106,7 +110,7 @@
				top.layer.open({
					type: 2,
					//				  offset: ['100px'], //右下角弹出
					area: ['800px', '650px'],
					area: ['80%', '600px'],
					shade: 0.5,
					title: '指导留言',
					fixed: true, //不固定
@ -177,6 +181,29 @@
					})
				}
			},
			viewDetial:function(type,code){
				if(type==4){					
					top.layer.msg('客户端暂不支持查询随访记录');
				}else{
					top.layer.open({
						type: 2,
						//				  offset: ['100px'], //右下角弹出
						area: ['80%', '600px'],
						shade: 0.5,
						title: '指导留言',
						fixed: true, //不固定
						maxmin: true,
						closeBtn: 1,
						shift: 5,
						shadeClose: false, //点击遮罩关闭层
						content: '../../article/html/article-info.html?articleId=' + code,
						end: function() { // 未点击确定按钮,点击关闭按钮  
							vm.getServiceItemList();    
						}
					});
					
				}
			},
			updateNoteAndImageRehabilitationOperate: function() {
				var vm = this;
				var _image = [];
@ -196,7 +223,6 @@
					console.log(res)
					if(res.status == 200) {
						vm.getServiceItem();
						parent.serviceItem.getServiceItemList();
					}
				})
			},
@ -230,4 +256,44 @@
			}
		}
	})
	$("body").on('click','img',function(){  
        var _this = $(this);//将当前的img元素作为_this传入函数  
        imgShow("#outerdiv", "#innerdiv", "#bigimg", _this);  
    }); 
    function imgShow(outerdiv, innerdiv, bigimg, _this){  
        var src = _this.attr("src");//获取当前点击的pimg元素中的src属性  
        $(bigimg).attr("src", src);//设置#bigimg元素的src属性  
            /*获取当前点击图片的真实大小,并显示弹出层及大图*/  
        $("<img/>").attr("src", src).load(function(){  
            var windowW = $(window).width();//获取当前窗口宽度  
            var windowH = $(window).height();//获取当前窗口高度  
            var realWidth = this.width;//获取图片真实宽度  
            var realHeight = this.height;//获取图片真实高度  
            var imgWidth, imgHeight;  
            var scale = 0.8;//缩放尺寸,当图片真实宽度和高度大于窗口宽度和高度时进行缩放  
              
            if(realHeight>windowH*scale) {//判断图片高度  
                imgHeight = windowH*scale;//如大于窗口高度,图片高度进行缩放  
                imgWidth = imgHeight/realHeight*realWidth;//等比例缩放宽度  
                if(imgWidth>windowW*scale) {//如宽度扔大于窗口宽度  
                    imgWidth = windowW*scale;//再对宽度进行缩放  
                }  
            } else if(realWidth>windowW*scale) {//如图片高度合适,判断图片宽度  
                imgWidth = windowW*scale;//如大于窗口宽度,图片宽度进行缩放  
                            imgHeight = imgWidth/realWidth*realHeight;//等比例缩放高度  
            } else {//如果图片真实高度和宽度都符合要求,高宽不变  
                imgWidth = realWidth;  
                imgHeight = realHeight;  
            }  
                    $(bigimg).css("width",imgWidth);//以最终的宽度对图片缩放  
              
            var w = (windowW-imgWidth)/2;//计算图片与窗口左边距  
            var h = (windowH-imgHeight)/2;//计算图片与窗口上边距  
            $(innerdiv).css({"top":h, "left":w});//设置#innerdiv的top和left属性  
            $(outerdiv).fadeIn("fast");//淡入显示#outerdiv及.pimg  
        });  
        $(outerdiv).click(function(){//再次点击淡出消失弹出层  
            $(this).fadeOut("fast");  
        });  
    }
}();

+ 34 - 19
app/rehabilitation/js/health_control.js

@ -30,11 +30,17 @@ layui.use('element', function () {
                    "background-color": "gray"
                })
                $("#stopBtn_" + planid).html("激活计划")
                $("#stopBtn_" + planid).css({
                    "background-color": "#2dbe55"
                })
            } else {
                $("#progress_" + planid).css({
                    "background-color": "#ff9526"
                })
                $("#stopBtn_" + planid).html("终止计划")
                $("#stopBtn_" + planid).html("中止计划")
                $("#stopBtn_" + planid).css({
                    "background-color": "#ff3b30"
                })
            }
            console.log(isStop)
@ -82,6 +88,7 @@ layui.use('element', function () {
            isStop: 1, //
            isActive: true,
            doctorType: "",
            docCode:"",
            docInfo: [],
            isLeader: 0,
            planCreateUser: ""
@ -99,11 +106,8 @@ layui.use('element', function () {
                        var isStop = val[i].status
                        var ishospitalName = val[i].hospitalName
                        vm.planCreateUser = val[i].planCreateUser
                            if (vm.planCreateUser[i]!== vm.docInfo.code) {
                                $("#stopBtn_" + val[i].id).attr('disabled', "true")
                                $("#stopBtn_" + val[i].id).addClass("falsebutton")
                            }
                      
                      
                        if (ishospitalName == null) {
                            $("#hospitalName_" + val[i].id).html("暂无社区信息")
                        }
@ -119,12 +123,17 @@ layui.use('element', function () {
                                "background-color": "gray"
                            })
                            $("#stopBtn_" + val[i].id).html("激活计划")
                            $("#stopBtn_" + val[i].id).css({
                                "background-color": "#2dbe55"
                            })
                        } else {
                            $("#progress_" + val[i].id).css({
                                "background-color": "#ff9526"
                            })
                            $("#stopBtn_" + val[i].id).html("终止计划")
                            $("#stopBtn_" + val[i].id).html("中止计划")
                            $("#stopBtn_" + val[i].id).css({
                                "background-color": "#ff3b30"
                            })
                        }
                    }
@ -204,7 +213,17 @@ layui.use('element', function () {
                            $(".neironglef>button").css("color", "white")
                        }
                       
                        healthAPI.doctorBaseinfo().then(function (res) {
                            vm.isLeader = res.data.isLeader
                            for(var i=0;i<vm.tablelist.length;i++){
                                if (vm.isLeader == 0) {
                                    $("#stopBtn_" + vm.tablelist[i].id).attr('disabled', "true")
                                    $("#stopBtn_" + vm.tablelist[i].id).addClass("falsebutton")
                                }
            
                            }
                           
                        })
                    } else {
@ -213,15 +232,9 @@ layui.use('element', function () {
                    }
                })
                healthAPI.doctorBaseinfo().then(function (res) {
                    console.log(res.data)
                    vm.isLeader = res.data.isLeader
                    console.log(vm.isLeader)
                    if (vm.isLeader == 0) {
                    }
            
                })
              
            },
@ -313,10 +326,12 @@ layui.use('element', function () {
                location.href = "../../recover/html/new_recover.html"
            },
            checkPlan: function (data) {
                var vm=this
                var vm = this
                location.href = "../../rehabilitation/html/rehabilitation_management.html?planId=" + data.id
            },
            modelControl:function(){
                location.href = "../../rehabilitation/html/management.html" 
            }

+ 59 - 0
app/rehabilitation/js/management.js

@ -0,0 +1,59 @@
var routes = [
	{ path: '/', component: IndexPage,
	  children: [
	  	{
          path: '/',
          components: {
	        leftView: TemplateList,
	        rightView: NewTemplate
	      }
       },
       {
          path: '/new-template-form',
          components: {
	        leftView: TemplateList,
	        rightView: NewTemplateForm
	      }
       },
       {
          path: '/template-items',
          components: {
	        leftView: TemplateItemsSelect,
	        rightView: TemplateItems
	      }
       },
       {
          path: '/template-items-select',
          components: {
	        leftView: TemplateItemsSelect,
	        rightView: TemplateItems
	      }
       },
       {
          path: '/template-item-detail',
          components: {
	        leftView: TemplateItemsSelect,
	        rightView: ItemDetail
	      }
       },
      ]
	}
],
router = new VueRouter({
  routes: routes
}),
storage = {
	docInfo: localStorage.getItem('docInfo')?JSON.parse(localStorage.getItem('docInfo')):null,
	patient: null, // url中patient,用来来判断是否是"发送"模式
	planId: null
}
new Vue({
    data: {
    },
    router: router,
    methods: {
    },
    components: {
    }
}).$mount('#app')

+ 15 - 3
app/rehabilitation/js/moreplan.js

@ -29,7 +29,7 @@ layui.use('element', function () {
                $("#progress_" + planid).css({
                    "background-color": "#ff9526"
                })
                $("#stopBtn_" + planid).html("终止计划")
                $("#stopBtn_" + planid).html("中止计划")
            }
@ -127,7 +127,7 @@ layui.use('element', function () {
                            $("#progress_" + val[i].planId).css({
                                "background-color": "#ff9526"
                            })
                            $("#stopBtn_" + val[i].planId).html("终止计划")
                            $("#stopBtn_" + val[i].planId).html("中止计划")
                        }
                        var progressNum = Math.ceil((allFinishCount / allCount) * 100)
@ -227,7 +227,19 @@ layui.use('element', function () {
            },
            checkPatient: function () {
                var vm = this
                location.href = "../../temporary/html/userInfo.html?patient=" + vm.paticentcode
                layer.open({
                    type: 2,
                    area: ['750px', '650px'],
                    shade: 0.5,
                    title: '服务项目内容',
                    fixed: true, //不固定
                    maxmin: true,
                    closeBtn:1,
                    shift: 5,
                    shadeClose: false, //点击遮罩关闭层
                    content: '../../temporary/html/userInfo.html?patient='+vm.paticentcode
                  });
                // location.href = "" + 
            },
            checkPlan: function (data) {

+ 16 - 6
app/rehabilitation/js/rehabilitation_management.js

@ -14,13 +14,15 @@
			__Data:[],//当前的年月(日历)
			__xData:[],//当前的年月(时间轴)
			status:null,//任务状态(0未完成,1已完成,2已预约)
			searchTask:null,//快速查找任务:(1、我的任务,2、健康教育,3、健康指导,4、随访)
			searchTask:null,//快速查找任务:(1、我的任务,2、健康教育,3、健康指导,4、随访,5、复诊)
			searchTaskName:null,//快速查找任务:(1、我的任务,2、健康教育,3、健康指导,4、随访,5、复诊)
			planId: httpData['planId'],
			taskArr:[
				{code:1,name:'我的任务'},
				{code:2,name:'健康教育'},
				{code:3,name:'复诊'},
				{code:3,name:'健康指导'},
				{code:4,name:'随访'},
				{code:5,name:'复诊'},
			],
			statusArr:[
				{code:0,name:'未完成'},
@ -28,6 +30,7 @@
				{code:2,name:'已预约'},
			],
			curTask:'',//快速查找是否点击了搜索按钮
			curTaskName:'',//快速查找是否点击了搜索按钮
			tabStatus:null,
		},
		mounted:function(){
@ -46,6 +49,7 @@
				this.goToLoadData(true);
			},
			viewDetail:function(planids,status){
				var vm=this;
				if(!planids){
					layer.msg('无服务项',{icon:5})
					return ;
@ -53,7 +57,7 @@
				if(status==1){
					top.layer.open({
					  type: 2,
					  area: ['600px', '650px'],
					  area: ['800px', '650px'],
					  shade: 0.5,
					  title: '完成项目确认',
					  fixed: true, //不固定
@ -68,7 +72,7 @@
//							planids='402803f6657f195301657f4c4ce70000';
				layer.open({
				  type: 2,
				  area: ['600px', '650px'],
				  area: ['800px', '650px'],
				  shade: 0.5,
				  title: '服务项目内容',
				  fixed: true, //不固定
@ -76,14 +80,19 @@
				  closeBtn:1,
				  shift: 5,
				  shadeClose: false, //点击遮罩关闭层
				  content: '../../rehabilitation/html/service_item_content.html?planids='+planids
				  content: '../../rehabilitation/html/service_item_content.html?planids='+planids,
				  end:function(){
				  	vm.goToLoadData(true);	
				  }
					
				});
			},
			changeStatus:function(val){
				this.status=this.status==val?null:val;
			},
			changeTask:function(val){
				this.searchTask=this.searchTask==val?null:val;
				this.searchTask=this.searchTask==val.code?null:val.code;
				this.searchTaskName=this.searchTaskName==val.name?null:val.name;
			},
			monDetail:function(){
			  this.currentDay = this.ynow + '年'+ (this.mnow + 1) +'月';
@ -196,6 +205,7 @@
				}
				rehaAPI.calendarPlanDetail(params).then(function(res){
					vm.curTask=vm.searchTask;
					vm.curTaskName=vm.searchTaskName;
					vm.calendarData=[];
					if(res.status==200){
						var data=res.data

+ 42 - 27
app/rehabilitation/js/service_item_content.js

@ -1,7 +1,7 @@
!function(){
				var httpData=GetRequest();
				var userInfo = JSON.parse(window.localStorage.getItem(httpRequest.agentName));  
				window.serviceItem=new Vue({
		var httpData=GetRequest();
		var userInfo = JSON.parse(window.localStorage.getItem(httpRequest.agentName));  
		new Vue({
					el:"#app",
		data:{
			planids:httpData['planids'],
@ -22,15 +22,15 @@
				this.collapseIndex=idx;
			},
			qwapp:function(){
				top.layer.msg('请前往app处理',{icon:5});    
				layer.msg('请前往app处理',{icon:5});    
			},
			//获取服务列表
			getServiceItemList:function(){
				var vm=this;
				var loginDoctor = JSON.parse(window.localStorage.getItem('wlyyAgent') || '{}');
				var loadding = top.layer.load(0, {shade: false}); //0代表加载的风格,支持0-2
				var loadding = layer.load(0, {shade: false}); //0代表加载的风格,支持0-2
				rehaAPI.serviceItemList({planDetailIds:vm.planids}).then(function(res){
					top.layer.close(loadding);
					layer.close(loadding);
					if(res.status==200){
						var isZK=loginDoctor.doctorType==1?true:false;
						vm.serviceData=_.map(res.data||{},function(o){
@ -50,17 +50,16 @@
							return o
						})
					}else{
						top.layer.msg(res.msg,{icon:5});
						layer.msg(res.msg,{icon:5});
					}
				})
			},
			//健康教育
			jkjy:function(patient,planId){
				var vm=this
				top.layer.open({
				layer.open({
					type: 2,
					//				  offset: ['100px'], //右下角弹出
					area: ['800px', '648px'],
					area: ['80%', '600px'],
					shade: 0.5,
					title: '健康教育',
					fixed: true, //不固定
@ -68,16 +67,19 @@
					closeBtn: 1,
					shift: 5,
					shadeClose: false, //点击遮罩关闭层
					content: '../../article/html/article.html?code='+patient+'&planId='+planId+'&isReha=true'
					content: '../../article/html/article.html?code='+patient+'&planId='+planId+'&isReha=true',
					end: function() { // 未点击确定按钮,点击关闭按钮  
						vm.getServiceItemList();    
					}
				});
			},
//						健康指导
			jkzd:function(patient,planId){
				var vm=this
				top.layer.open({
				layer.open({
					type: 2,
					//				  offset: ['100px'], //右下角弹出
					area: ['800px', '648px'],
					area: ['80%', '600px'],
					shade: 0.5,
					title: '健康教育',
					fixed: true, //不固定
@ -85,18 +87,22 @@
					closeBtn: 1,
					shift: 5,
					shadeClose: false, //点击遮罩关闭层
					content:'../../guidance/html/index.html#/person-edit-panel?patient='+patient+'&planId='+planId
					content:'../../guidance/html/index.html#/person-edit-panel?patient='+patient+'&planId='+planId,
					end: function() { // 未点击确定按钮,点击关闭按钮  
						vm.getServiceItemList();    
					}
				});
			},
//						暂未开放
			zwkf:function(){
				top.layer.msg('此功能暂未开放',{icon:1});
				layer.msg('此功能暂未开放',{icon:1});
			},
			goToFinish:function(planid){
				top.layer.open({
				var vm=this;
				layer.open({
				  type: 2,
//				  offset: ['100px'], //右下角弹出
				  area: ['600px', '650px'],
				  area: ['80%', '600px'],
				  shade: 0.5,
				  title: '完成项目确认',
				  fixed: true, //不固定
@ -104,7 +110,10 @@
				  closeBtn:1,
				  shift: 5,
				  shadeClose: false, //点击遮罩关闭层
				  content: '../../rehabilitation/html/guide_the_message.html?planid='+planid
				  content: '../../rehabilitation/html/guide_the_message.html?planid='+planid,
				  end: function() { // 未点击确定按钮,点击关闭按钮  
						vm.getServiceItemList();    
					}
				});
			},
			fwm:function(planid,patient){
@ -114,18 +123,24 @@
				var vm = this
				var loginDoctor = JSON.parse(window.localStorage.getItem('wlyyAgent'));
				var otherCode,otherName;
				var planDetailId=data.planDetaiId;
				if(loginDoctor.doctorType==1){
					otherCode=data.familyDoctorCode;
					otherName=data.familyDoctorName;
				var planDetailId=undefined;
				
				if(data.specialistDoctorCode==data.executeDoctorCode){
					layer.msg('无法与自己聊天',{icon:5}); 
					return ;
				}
				if((data.isMyTask==1) && (loginDoctor.uid==data.specialistDoctorCode)){
					otherCode=data.executeDoctorCode;
					otherName=data.executeDoctorCode;
					planDetailId=data.planDetaiId
				}else{
					otherCode=data.specialistDoctorCode;
					otherName=data.specialistDoctorName;
				}
				top.layer.open({
				layer.open({
				  type: 2,
//				  offset: ['100px'], //右下角弹出
				  area: ['800px', '650px'],
				  area: ['80%', '600px'],
				  shade: 0.5,
				  title: '指导留言',
				  fixed: true, //不固定
@ -167,7 +182,7 @@
			        }    
			    })
			    .fail(function() {
			        top.layer.msg('服务码创建失败',{icon:5});    
			        layer.msg('服务码创建失败',{icon:5});    
			    });
			},
			checkAfterQrCode:function(planid,patient){
@ -184,7 +199,7 @@
							vm.goToFinish(planid);
						}
					}
					top.layer.msg(res.msg,{icon:icon});  
					layer.msg(res.msg,{icon:icon});  
				})
			},
			getQRCode:function(planid){
@ -202,7 +217,7 @@
							vm.qrModal=true;
						},100)
					}else{
						top.layer.msg('服务码获取失败',{icon:5});  
						layer.msg('服务码获取失败',{icon:5});  
					}
				})
				

+ 5 - 2
app/temporary/html/userInfo.html

@ -21,7 +21,7 @@
			<div class="c-container flex-box">
				<div class="w-250">
					<div class="user-images">
						<img class="img-circle" src="../../../images/p-female.png" />
						<img class="img-circle" :src="getImgurl(userInfo.photo)" />
					</div>
					<p class="user-name text-center">{{userInfo.name}}</p>
					<p class="c-999 f14 text-center">{{userInfo.sex==1?'男':'女'}} {{!userInfo.age?'<1':userInfo.age}}岁 {{userInfo.expensesStatus==1?"已缴费":(userInfo.expensesStatus==2?"已退费":(userInfo.expensesStatus==0?"未缴费":""))}}</p>
@ -139,7 +139,7 @@
							<div class="flex-box">
								<span class="w-110 c-999">所属居委会</span>
								<div class="flex-box-item">
									{{userInfo.address}}
									{{userInfo.jtHospitalName}}
								</div>
							</div>
						</div>
@ -217,6 +217,9 @@
						}
					},
					methods: {
						getImgurl: function(url){
				   			return httpRequest.getImgUrl(url)
				   		},
						getPatient:function(){
							var vm=this;
							var data={

+ 18 - 18
component/guidance/person-edit-panel.js

@ -177,24 +177,24 @@ var PersonEditPanel = {
		            }).then(function(res) {
        				toastr && toastr.success("发送成功")
        				
//      				var obj = {
//      					rehabilitationDetailId: storage.planId,
//				            patientCode: storage.patient,
//				            // patientName: patientName,
//				            doctorCode: storage.docInfo.code,
//				            doctorName: storage.docInfo.name,
//				            relationRecordType: 2, //健康指导
//				            relationRecordCode: res.data.id
//      				}
//      				guidanceAPI.saveRehabilitationOperateRecord({
//      					dataJson: JSON.stringify(obj)
//      				}).then(function(res) {
//      					if(res.status == 200) {
//      						
//      					} else {
//      						toastr && toastr.success(res.msg)
//      					}
//      				})
        				var obj = {
        					rehabilitationDetailId: storage.planId,
				            patientCode: storage.patient,
				            // patientName: patientName,
				            doctorCode: storage.docInfo.code,
				            doctorName: storage.docInfo.name,
				            relationRecordType: 2, //健康指导
				            relationRecordCode: res.data.id
        				}
        				guidanceAPI.saveRehabilitationOperateRecord({
        					dataJson: JSON.stringify(obj)
        				}).then(function(res) {
        					if(res.status == 200) {
        						
        					} else {
        						toastr && toastr.success(res.msg)
        					}
        				})
        				
		        	}).catch(function(e) {
		        		console.error(e)

+ 7 - 9
component/guidance/person-panel.js

@ -1,7 +1,7 @@
Vue.component('person-panel', {
    template: '<div class="ml20 mr20"">\
					<div class="search-warp">\
						<input class="inp-search" placeholder="查找模板" v-model="filter" @input="throttledTempList()"/>\
						<input class="inp-search" placeholder="查找模板" v-model="filter" @input="debounceTempList"/>\
					</div>\
					<div ref="innerPanel" style="overflow-y: auto;">\
						<div class="list-arrow-r temp-item" v-for="(o, i) in items">\
@ -50,14 +50,12 @@ Vue.component('person-panel', {
		vm.guidanceTempList()
    },
    methods: {
    	throttledTempList: function() {
    		return _.throttle(function() {
    			var vm = this
	    		vm.pageNo = 1
	    		vm.items = []
	    		this.guidanceTempList()
    		}, 300).call(this)
    	},
    	debounceTempList: _.debounce(function() {
			var vm = this
    		vm.pageNo = 1
    		vm.items = []
    		this.guidanceTempList()
		}, 500, false),
        guidanceTempList: function() {
        	var vm = this
        	guidanceAPI.guidanceTempList( {

+ 18 - 0
component/guidance/system-send-panel.js

@ -175,6 +175,24 @@ var SystemSendPanel = {
		                images: vm.imgs.join(',')
		            }).then(function(res) {
        				toastr && toastr.success("发送成功")
        				var obj = {
        					rehabilitationDetailId: storage.planId,
				            patientCode: storage.patient,
				            // patientName: patientName,
				            doctorCode: storage.docInfo.code,
				            doctorName: storage.docInfo.name,
				            relationRecordType: 2, //健康指导
				            relationRecordCode: res.data.id
        				}
        				guidanceAPI.saveRehabilitationOperateRecord({
        					dataJson: JSON.stringify(obj)
        				}).then(function(res) {
        					if(res.status == 200) {
        						
        					} else {
        						toastr && toastr.success(res.msg)
        					}
        				})
		        	}).catch(function(e) {
		        		console.error(e)
		        	})

+ 18 - 0
component/guidance/team-edit-panel.js

@ -263,6 +263,24 @@ var TeamEditPanel = {
						teamId: JSON.stringify(team)
		        	}).then(function(res) {
        				toastr && toastr.success("发送成功")
        				var obj = {
        					rehabilitationDetailId: storage.planId,
				            patientCode: storage.patient,
				            // patientName: patientName,
				            doctorCode: storage.docInfo.code,
				            doctorName: storage.docInfo.name,
				            relationRecordType: 2, //健康指导
				            relationRecordCode: res.data.id
        				}
        				guidanceAPI.saveRehabilitationOperateRecord({
        					dataJson: JSON.stringify(obj)
        				}).then(function(res) {
        					if(res.status == 200) {
        						
        					} else {
        						toastr && toastr.success(res.msg)
        					}
        				})
		        	}).catch(function(e) {
		        		console.error(e)
		        	})

+ 38 - 0
component/rehabilitation/index-page.js

@ -0,0 +1,38 @@
var IndexPage = {
    template: '<div class="ui-grid">\
	    		<div ref="leftPanel" class="ui-col-0 plr10 left-panel">\
	    			<keep-alive>\
	    				<router-view name="leftView"></router-view>\
	    			</keep-alive>\
				</div>\
	 		    <div ref="rightPanel" class="ui-col-1 plr10 c-position-r">\
	 		    	<keep-alive>\
			    	<router-view name="rightView"></router-view>\
			    	</keep-alive>\
			    </div>\
		    </div>',
    props: [],
    data: function() {
		return {
		}
    },
    created: function() {
    	var vm = this
    },
    mounted: function() {
    	var vm = this
    	var leftPanel = vm.$refs.leftPanel
    	var rightPanel = vm.$refs.rightPanel
    	$(leftPanel).height($(window).height())
    	$(rightPanel).height($(window).height())
    	window.addEventListener('resize', _.debounce(function() {
    		$(leftPanel).height($(window).height())
    		$(rightPanel).height($(window).height())
    	}, 300))
    },
    methods: {
    }
}

+ 72 - 0
component/rehabilitation/item-detail.js

@ -0,0 +1,72 @@
var ItemDetail = {
    template: '<div class="plr10 ptb10 c-position-r item-detail-wrap">\
		    		<div class="item-detail-innerwrap">\
			    		<div class="item-detail">\
							<div class="c-f14 c-999 plr10 item-detail-name">项目名称</div>\
							<div class="c-f14 c-666 ptb10 plr10">{{item.specialistServiceItemDO.title}}</div>\
						</div>\
						<div class="item-detail mt20">\
							<div class="c-f14 c-999 plr10 item-detail-name">项目内容</div>\
							<div class="c-f14 c-666 ptb10 plr10">{{item.specialistServiceItemDO.content}}</div>\
						</div>\
						<div class="item-detail mt20">\
							<div class="c-f14 c-999 plr10 item-detail-name">项目类型</div>\
							<div class="c-f14 c-666 ptb10 plr10">{{itemTypes[item.specialistServiceItemDO.itemType]}}</div>\
						</div>\
						<div class="item-detail mt20">\
							<div class="c-f14 c-999 plr10 item-detail-name">服务机构</div>\
							<div class="c-f14 c-666 ptb10 plr10">{{item.hospitalName}}</div>\
						</div>\
						<div class="item-detail mt20">\
							<div class="c-f14 c-999 plr10 item-detail-name">服务地点</div>\
							<div class="c-f14 c-666 ptb10 plr10">{{item.hospitalDo.address}}</div>\
						</div>\
		    		</div>\
					<a class="back-btn c-t-center mr15" @click="goBack">\
		    			返回\
		    		</a>\
		    	</div>',
    props: [],
    data: function() {
        return {
        	item: {
        		specialistServiceItemDO: {},
        		hospitalName: ""
        	},
        	itemTypes: ["","康复服务","健康服务"],
        	itemId: ""
        }
    },
     beforeRouteEnter (to, from, next) {
	    next(function(vm) {
	    	var query = vm.$route.query
	    	vm.itemId = query.itemId
	    	
	    	rehaAPI.selectByIds({
	    		ids: JSON.stringify([vm.itemId])
	    	}).then(function(res) {
	    		if(res.status == 200) {
	    			var data = res.data[0]
	    			if(data) {
	    				vm.item = data
	    			}
	    		} else {
	    			
	    		}
	    	})
	    	
	    })
	},
	created: function() {
		var vm = this
	},
    mounted: function() {
    	var vm = this
    },
    methods: {
    	goBack: function() {
        	this.$router.back()
        }
    }
}

+ 50 - 0
component/rehabilitation/new-template-form.js

@ -0,0 +1,50 @@
var NewTemplateForm = {
    template: '<div>\
    				<div class="title-name c-f16">\
	    				<span class="c-vam">模板未命名</span>\
	    			</div>\
	    			<div class="c-t-center" style="margin-top: 240px;">\
	    				<span class="c-vam c-f14 mr5">模板名称: </span>\
	    				<input v-model="name" placeholder="请输入新模板名称" class="c-vam temp-name-inpt"/>\
	    				<a @click="save" href="javascript: void(0);" class="ml10 save-temp-name-btn c-f14 c-vam">保存</a>\
	    			</div>\
    			</div>',
    props: [],
    data: function() {
        return {
        	name:''
        }
    },
    mounted: function() {
    	var vm = this
    },
    methods: {
    	save: function() {
    		var vm = this
    		
    		if(vm.name) {
    			rehaAPI.createTemplate({
	    			doctor: storage.docInfo.code,
	    			title: vm.name
	    		}).then(function(res) {
	    			if(res.status == 200) {
	    				vm.$router.push({
			    			path:'/template-items',
			    			query: {
			    				name: vm.name,
			    				isNew: true,
			    				templateId: res.data
			    			}
			    		})
	    			} else {
	    				toastr && toastr.error(res.msg)
	    			}
	    			
	    		}).catch(function(e) {
	    			console.error(e)
	    		})
    		}
    	}
    }
}

+ 28 - 0
component/rehabilitation/new-template.js

@ -0,0 +1,28 @@
var NewTemplate = {
    template: '<div>\
    				<div class="title-name c-f16">\
	    				<span class="c-vam">模板未命名</span>\
	    			</div>\
	    			<div class="c-t-center">\
	    				<img src="../../../images/wushuju_img.png" class="wushuju"/>\
	    			</div>\
	    			<div class="c-t-center mt30">\
	    				<a @click="newTemplate" class="new-temp-btn">创建新模板</a>\
	    			</div>\
    			</div>',
    props: [],
    data: function() {
        return {
        }
    },
    mounted: function() {
    	var vm = this
    },
    methods: {
    	newTemplate: function() {
    		var vm = this
    		vm.$router.push('/new-template-form')
    	}
    }
}

+ 184 - 0
component/rehabilitation/template-items-select.js

@ -0,0 +1,184 @@
var TemplateItemsSelect = {
    template: '<div style="height: 100%;">\
    				<div class="title-name c-f16">\
	    				<span class="c-vam mr15">项目表</span><img @click="goBack" src="../../../images/fanhui02_icon.png" class="c-vam"/>\
	    			</div>\
	    			<div class="search-warp">\
						<input class="inp-search" v-model="searchName" placeholder="搜索项目名称" @input="debounceSearch"/>\
					</div>\
	    			<div class="mt10 pt10 pl10 ul-wrap">\
		    			<ul>\
							<li v-for="(s,i) in items" class="list-item c-f16" :class="{\'arrow-r\': !s.dropdown, \'arrow-d\': s.dropdown}" >\
								<span @click.stop="s.dropdown=!s.dropdown">{{itemType[s.itemType]}}</span>\
								<ul class="level-sec" v-show="s.dropdown">\
									<li v-for="(g, j) in s.item" class="list-item c-f14 ml15 mt15" :class="{\'arrow-r\': !g.dropdown, \'arrow-d\': g.dropdown}">\
										<span @click.stop="g.dropdown=!g.dropdown">{{g.itemName}}</span>\
										<ul class="level-third" v-show="g.dropdown" >\
											<li v-for="(o, k) in g.hospitalServiceItems" class="mt15" v-show="o.show">\
												<div class="list-item-name pl10 c-nowrap mr5">{{o.specialistServiceItemDO.title}}</div>\
												<a href="javascript:void(0);" @click="addItem(o)" class="add-item-btn" :class="{\'disabled\': !o.enable}">\
													添加\
												</a>\
											</li>\
										</ul>\
									</li>\
								</ul>\
							</li>\
						</ul>\
	    			</div>\
    			</div>',
    props: [],
    data: function() {
        return {
        	isNew: null,
        	searchName: "",
        	itemType: ["", "康复服务", "健康服务"],
        	items: [
//      		{
//      			name: "健康服务",
//      			dropdown: false,
//      			items: [
//      				{
//      					name: "门诊",
//      					dropdown: false,
//      					items: [
//      						{
//      							name: "专科医师每周两次查房,指导药物调整和诊疗",
//      							enable: true
//      						},
//      						{
//      							name: "专科医师每周两次查房,指导药物调整和诊疗",
//      							enable: false
//      						}
//      					]
//      				}
//      			]
//      		}
        	]
        }
    },
    beforeRouteEnter (to, from, next) {
	    next(function(vm) {
	    	var query = vm.$route.query
	    	if(vm.isNew == true || vm.isNew === "true") {
	    		vm.isNew = true
	    	} else {
	    		vm.isNew = false
	    	}
	    	vm.templateId = query.templateId
//	    	if((to.path == "/template-items" || to.path=="/template-item-detail") 
//	    	&& (from.path != "/template-item-detail" || from.path == "/")) {
//	    		
//	    	}
			if((to.path == "/template-item-detail" || from.path == "/template-item-detail" ) && from.path != "/") {
				return 
			}
			if(!vm.isNew) {
				vm.loading.show()
				vm.findTemplateDetail().then(function(res) {
					if(res.status == 200) {
						var selected = res.data
						var selectedIds = _.pluck(selected, "id")
						vm.findServiceItemsByHospital().then(function() {
							_.each(vm.items, function(o) {
				    			_.each(o.item,function(g) {
				    				_.each(g.hospitalServiceItems, function(v) {
				    					if(_.contains(selectedIds, v.id)) {
				    						v.enable = false
				    						EventBus.$emit("add-template-item", v)
				    					} else {
				    						v.enable = true
				    					}
				    				})
				    			})
				    		})
							vm.loading.close()
						}).catch(function(e) {
							vm.loading.close()
							console.error(e)
						})
					} else {
						vm.loading.close()
						toastr && toastr.error(res.msg)
					}
				})
			} else {
				vm.findServiceItemsByHospital()
			}
	    	
	    })
	 },
	created: function() {
		
	},
    mounted: function() {
    	var vm = this
		
    },
    methods: {
    	goBack: function() {
    		this.$router.replace('/');
    	},
    	addItem: function(o) {
    		o.enable = false
    		EventBus.$emit("add-template-item", o)
    	},
    	debounceSearch: _.debounce(function() {
			var vm = this
			if(vm.searchName.trim()) {
				_.each(vm.items, function(o) {
					o.dropdown = true
	    			_.each(o.item,function(g) {
	    				g.dropdown = true
	    				_.each(g.hospitalServiceItems, function(v) {
	    					if(v.specialistServiceItemDO.title.indexOf(vm.searchName)>-1) {
	    						v.show = true
	    					} else {
	    						v.show = false
	    					}
	    				})
	    			})
	    		})
			} else {
				_.each(vm.items, function(o) {
	    			_.each(o.item,function(g) {
	    				_.each(g.hospitalServiceItems, function(v) {
	    					v.show = true
	    				})
	    			})
	    		})
			}
    		
		}, 500, false),
		findServiceItemsByHospital: function(){
			var vm = this
		 	return rehaAPI.findServiceItemsByHospital({
		 		doctor: storage.docInfo.code
		 	}).then(function(res) {
	    		var items = res.data[0]
	    		vm.items = _.map(items, function(o) {
	    			o.dropdown = false
	    			o.item = _.map(o.item,function(g) {
	    				g.dropdown = false
	    				_.each(g.hospitalServiceItems, function(v) {
	    					v.enable = true
	    					v.show = true
	    				})
	    				return g
	    			})
	    			
	    			return o
	    		})
	    	})
		},
		findTemplateDetail: function() {
    		var vm = this
    		return rehaAPI.findTemplateDetail({
    			templateId: vm.templateId
    		}).then(function(res) {
    			return res
    		})
    	},
    }
}

+ 161 - 0
component/rehabilitation/template-items.js

@ -0,0 +1,161 @@
var TemplateItems = {
    template: '<div style="height: 100%;">\
    				<div class="title-name c-f16">\
	    				<span class="c-vam">{{name}}</span>\
	    			</div>\
	    			<div v-show="!items.length" class="c-t-center" style="margin-top: 200px;">\
	    				<img src="../../../images/fanhui_icon.png" class="c-vam"/>请在左侧“服务项”列表中选择\
	    			</div>\
	    			<div class="template-items" v-show="items.length">\
	    				<div class="item-card ptb10 plr15 mt10" v-for="(o, i) in items" @click="toDetail(o)">\
		    				<div class="c-nowrap">{{o.specialistServiceItemDO.title}}</div>\
			    			<div class="c-row c-f14 mt5">\
						        <div class="c-50">\
						        	<span class="c-909090">医&emsp;&emsp;院:</span>\
						        	<span>{{o.hospitalName}}</span>\
						        </div>\
						        <div class="c-50">\
						        	<span class="c-909090">执行人员:</span>\
						        	<span class="c-909090">待选择</span>\
						        </div>\
						    </div>\
						    <div class="c-row c-f14 mt5">\
						        <div class="c-50">\
						        	<span class="c-909090">计划时间:</span>\
						        	<span class="c-909090">待选择</span>\
						        </div>\
						        <div class="c-50">\
						        	<span class="c-909090">费&emsp;&emsp;用:</span>\
						        	<span>{{o.expense}}元</span>\
						        </div>\
						    </div>\
						    <img src="../../../images/qingchu_icon.png" class="item-delete-btn" @click.stop="deleteItem(o, i)"/>\
	    				</div>\
	    			</div>\
	    			<div class="foot-btns">\
			    		<a class="delete-btn c-t-center mr50" @click="deleteTemplate">\
			    			删除模板\
			    		</a>\
			    		<a class="save-btn c-t-center" @click="saveTemplate">\
			    			保存模板\
			    		</a>\
		    		</div>\
    			</div>',
    props: [],
    data: function() {
        return {
        	name: '',
        	items: [],
        	isNew: null,
        	templateId: "",
        	item: null
        }
    },
    beforeRouteEnter: function (to, from, next) {
	    next(function(vm) {
	    	var query = vm.$route.query
	    	vm.name = query.name || '模板未命名',
	    	vm.templateId = query.templateId
	    	if(from.path != "/template-item-detail" || from.path == "/") {
	    		vm.items = []
	    	}
	    	
	    	if(vm.isNew == true || vm.isNew === "true") {
	    		vm.isNew = true
	    	} else {
	    		vm.isNew = false
	    	}
	    })
	},
	created: function() {
		var vm = this
		EventBus.$on("add-template-item", function(o) {
			vm.items.push(o)
		})
	},
    mounted: function() {
    	var vm = this
		
    },
    methods: {
    	deleteItem: function(o, i) {
    		var vm = this
    		o.enable = true
    		vm.items.splice(i, 1)
    	},
    	saveTemplate: function() {
    		var vm = this
    		vm.loading.showModal()
    		rehaAPI.createTemplateDetail({
    			doctor: storage.docInfo.code,
    			json: JSON.stringify({
    				templateId: vm.templateId,
    				hospitalServiceItemId: _.pluck(vm.items, 'id').join(',')
    			}),
    			type: vm.isNew?"create":"edit"
    		}).then(function(res) {
    			if(res.status == 200) {
    				vm.loading.close()
    				toastr && toastr.success("保存成功")
    				EventBus.$emit("refresh-index")
        			vm.$router.back()
    			} else {
    				vm.loading.close()
    				toastr && toastr.error(res.msg)
    			}
    		}).catch(function(e) {
    			vm.loading.close()
    			console.error(e)
    		})
    	},
    	deleteTemplate: function() {
    		var vm = this
    		
    		var d = dialog({
				content: '确定删除该模板?',
				okValue: '确认',
				ok: function () {
					vm.loading.showModal()
					rehaAPI.deleteTemplate({
						templateId: vm.templateId
		            }).then(function(res) {
		            	vm.loading.close()
        				toastr && toastr.success("删除成功")
        				EventBus.$emit("refresh-index")
        				vm.$router.back()
		        	}).catch(function(e) {
		        		vm.loading.close()
		        		console.error(e)
		        	})
				},
				cancelValue: '取消',
				cancel: function () {}
			});
			d.showModal();
    	},
    	toDetail: function(o) {
    		var vm = this
    		vm.item = o
    		vm.$router.push({
    			path:"/template-item-detail",
    			query: {
    				templateId: vm.templateId,
    				itemId: o.id
    			}
    		})
    		
    	}
    },
//  watch: {
//	    '$route': function (to, from) {
//	    	var vm = this
////	    	if(to.path == "/template-item-detail" && (from.path != "/template-item-detail" || from.path == "/")) {
////	    		EventBus.$emit("show-item-detail", vm.item)
////	    	}
//			if(to.path == "/template-item-detail") {
//	    		EventBus.$emit("show-item-detail", vm.item)
//	    	}
//	    }
//	 }
}

+ 54 - 0
component/rehabilitation/template-list.js

@ -0,0 +1,54 @@
var TemplateList = {
    template: '<div>\
	    			<div class="title-name c-f16">\
	    				<span class="c-vam">模板库</span>\
	    			</div>\
					<ul>\
						<li v-for="(o,i) in items" class="temp-item c-nowrap c-t-center" @click="showTemplateDetail(o)">{{o.title}}</li>\
						<li class="temp-item c-nowrap c-t-center add" @click="newTemplate">添加新模板</li>\
					</ul>\
	   	 		</div>',
    props: [],
    data: function() {
        return {
        	items: []
        }
    },
    created: function() {
    	var vm = this
    	
    	vm.findTemplateList()
    	EventBus.$on("refresh-index",function() {
    		vm.findTemplateList()
    	})
    },
    mounted: function() {
    	var vm = this
		
    },
    methods: {
    	findTemplateList: function() {
    		var vm = this
    		rehaAPI.findTemplateList({
	    		doctor: storage.docInfo.code
	    	}).then(function(res) {
	    		vm.items = res.data
	    	})
    	},
    	showTemplateDetail: function(o) {
    		var vm = this
    		vm.$router.push({
    			path:'/template-items',
    			query: {
    				name: o.title,
    				isNew: false,
    				templateId: o.id
    			}
    		})
    	},
    	newTemplate: function() {
    		var vm = this
    		vm.$router.push('/new-template-form')
    	}
    }
}

二進制
images/qingchu_icon.png


二進制
images/shouqi_jiantou_icon.png


二進制
images/wushuju_img.png