<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>选择项目</title>
		<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" />
		<link href="../../../plugins/toastr/toastr.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="../css/select-patient.css" />
	</head>
	<body class="m0">
	<div id="app" class="p10 c-333" v-cloak>
		<div class="c-border mb20">
			<h4 class="p0 m0 plr10 ptb5 lh22 c-999 c-border-b bgc-f2fcfe">项目名称</h4>
			<p class="p0 m0 plr10 ptb5 lh22">{{proDetail.specialistServiceItemDO.title}}</p>
		</div>
		<div class="c-border mb20">
			<h4 class="p0 m0 plr10 ptb5 lh22 c-999 c-border-b bgc-f2fcfe">项目内涵</h4>
			<p class="p0 m0 plr10 ptb5 lh22">{{proDetail.specialistServiceItemDO.content}}</p>
		</div>
		<div class="c-border mb20">
			<h4 class="p0 m0 plr10 ptb5 lh22 c-999 c-border-b bgc-f2fcfe">项目类型</h4>
			<p class="p0 m0 plr10 ptb5 lh22">{{proDetail.specialistServiceItemDO.itemType == 1 ? '诊疗服务' : '健康服务'}}</p>
		</div>
		<div class="c-border mb20">
			<h4 class="p0 m0 plr10 ptb5 lh22 c-999 c-border-b bgc-f2fcfe">服务机构</h4>
			<p class="p0 m0 plr10 ptb5 lh22">{{proDetail.hospitalName}}</p>
		</div>
		<div class="c-border">
			<h4 class="p0 m0 plr10 ptb5 lh22 c-999 c-border-b bgc-f2fcfe">服务地点</h4>
			<p class="p0 m0 plr10 ptb5 lh22">{{proDetail.hospitalDo.address}}</p>
		</div>
		<div class="c-t-center mb20 mt30" v-if="isLook">
			<span class="btn bgc-12b7f5 lh22 c-fff ptb5 plr10 b-r-3 cur-pit" @click="addProject()">添加至计划</span>
		</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="../../../plugins/layer/layer.min.js"></script>
        <script src="../../../plugins/toastr/toastr.min.js"></script>
        <script src="../../../js/bootstrap.min.js"></script>
        <script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
		<script src="../../../api/http-request.js" type="text/javascript"></script>
		<script src="../../../api/recover_api.js" type="text/javascript"></script>
		<script type="text/javascript">
			var doctorType = (JSON.parse(window.localStorage.getItem('wlyyAgent'))||{}).doctorType
			var httpData=GetRequest()
			console.log(httpData)
			function showSuccessMessage(msg) {
				layer.msg(msg, {
					icon: 1
				})
			}
			
			function showErrorMessage(msg) {
				layer.msg(msg, {
					icon: 5
				})
			}
			
			function showWarningMessage(msg) {
				layer.msg(msg, {
					icon: 2
				})
			}
			
			function showInfoMessage(msg) {
				layer.msg(msg, {
					icon: 6
				})
			}
			
			selectVue = new Vue({
                el: "#app",
                data: {
                	isLook: httpData.isLook || false,
                	proDetail: null
                },
                mounted: function() {
                	this.selectByIds()
                },
                methods: {
                	selectByIds: function() {
                		var vm = this,
                			arr = [httpData.projectId],
			    			loadding = layer.load(0, {shade: false}),
			    			params = {
			    				ids: JSON.stringify(arr)
			    			}
						recoverAPI.selectByIds(params).then(function(res) {
							layer.close(loadding)
							if(res.status == 200) {
								vm.proDetail = res.data[0]
							} else {
								showErrorMessage(res.msg);
							}
						})
	                },
	                addProject: function() {
	                	top.recoverVue.addProject(httpData.index, httpData.index2, httpData.index3)
	                	top.layer.close(top.selectPatientIndex)
	                }
                }
            })
		</script>
	</body>
</html>
