<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta content="yes" name="apple-mobile-web-app-capable">
		<meta content="black" name="apple-mobile-web-app-status-bar-style">
		<meta content="telephone=no" name="format-detection">
		<meta content="email=no" name="format-detection">
		<script src="https://review-formal.iplusmed.com/Common/javaScript/calRem.js"></script>
		<link rel="stylesheet" type="text/css" href="./css/choseDoctorByName.css" />
		<meta name="wap-font-scale" content="no">
		<script src="https://review-formal.iplusmed.com/Common/javaScript/require.min.js"></script>
		<script type="text/javascript">
			require.config({
				baseUrl: "./",
				paths: {
					"zepto": "https://review-formal.iplusmed.com/Common/javaScript/zepto.min",
					"vue": "https://review-formal.iplusmed.com/Common/javaScript/vue1.0.26.min",
					"Utils": "https://review-formal.iplusmed.com/Common/javaScript/medtap-core-1.0.3Dev",
					"md5": "https://review-formal.iplusmed.com/Common/javaScript/md5.min"
				},
				shim: {
					"zepto": {
						exports: "$"
					},
					"vue": {
						exports: "Vue"
					}
				}
			});
		</script>
		<title>按姓名找医生</title>

	</head>

	<body id="app" style="opacity: 0;">
		<img src="images/loading.gif" class="load" />
		<div class="selectBg">
			<div class="byName">
				<div class="name">
					<input type="text" placeholder="请输入姓名" v-model="doctorName" id="name" />
				</div>
				<div class="btn" id="btn">
					搜索
				</div>
			</div>
		</div>
		<div class="doctorBg">
			<ul class="doctorList">
				<li v-for="list in doctorList" doctorId="{{list.doctorId}}" doctorName="{{list.doctorName}}">
					<img src="{{list.profile}}" />
					<div class="contro">
						<p :class="list.status == -1 ? 'doctorN': ''"><span>{{list.doctorName}}</span>{{list.technology}}&nbsp;&nbsp;&nbsp;{{list.teaching}}</p>
						<p>{{list.hospital.hospitalName}}</p>
						<p>{{list.department.departmentName}}</p>
						<p>擅长:{{list.goodAt}}</p>
					</div>
					<div class="chosebg" doctorId="{{list.doctorId}}" doctorName="{{list.doctorName}}" v-show="other">
						<div class="chose"></div>

					</div>
				</li>
			</ul>

			<div class="nomore" v-show="!noMore">
				没有更多医生
			</div>

		</div>
		<script type="text/javascript">
			window.selectDoctorBean = {
				doctorId: "",
				doctorName: ''
			}
			require(['javaScript/choseDoctorByName.js?v=1.0.0']);
			require(['Utils'], function(Utils) {
				window.SelectDoctorCallback = function(data) {
					if (data.doctorID && data.doctorID != "" && data.doctorID == window.selectDoctorBean.doctorId) {

						var selectDoctorBean = {
							isSelect: true,
							doctorId: data.doctorID,
							doctorName: window.selectDoctorBean.doctorName
						}
						localStorage.selectDoctorBean = JSON.stringify(selectDoctorBean);
						localStorage.byName = "true";


						if (typeof WebAPI == "undefined") {} else {
							var arrayObj = new Array();
							arrayObj.push(JSON.stringify(selectDoctorBean));
							WebAPI.callLast("selectDoctorByName", arrayObj);
						}

						setTimeout(function() {
							window.location.href = Utils.getPrefix() + "kRouteCloseWebView";
						}, 200);
					}
				}
			})
		</script>
	</body>

</html>
