Commit 61e5843c by hanpeng

-mark- app端患者病历详情,showImage API测试

parent 18743ce0
...@@ -2,7 +2,39 @@ define(['zepto','medtap'],function($,medtap){ ...@@ -2,7 +2,39 @@ define(['zepto','medtap'],function($,medtap){
var main = { var main = {
userId:medtap.getRequest('userId'), userId:medtap.getRequest('userId'),
init:function(){ init:function(){
$('#content').html(main.userId); $('#content').append(main.userId);
main.bindEve()
},
bindEve:function(){
$('#content img').unbind().bind('click',function(){
var imgObeject = {};//webApi对象参数
var imgSelect = $(this).index();//选中图片
var imgIndex = 0;
var urls = [],
picUrl = "";
[].forEach.call($('#content img'), function(item,index) {
if($(item).index() == imgSelect){
imgIndex = index;
}
urls.push($(item).attr('src'));
});
imgObeject.imgList = urls;
imgObeject.imgIndex = imgIndex;
console.log(imgObeject);
//调用webApi展示大图
try {
if (!WebAPI) {
}
try {
WebAPI.showImages(imgObeject);
} catch (e) {
}
} catch (e) {
}
})
} }
} }
main.init(); main.init();
......
...@@ -29,7 +29,11 @@ ...@@ -29,7 +29,11 @@
</head> </head>
<body> <body>
<div id="content" style="font-size:0.32rem"> <div id="content" style="font-size:0.32rem">
<img src="https://cdn.iplusmed.com/picture/doctor/default/head/portrait_woman.png" style="width:3rem;height:3rem;" data-index="1">
<br>
<img src="https://cdn.iplusmed.com/picture/doctor/default/head/portrait_man.png" style="width:3rem;height:3rem;" data-index="2">
<br>
<img src="https://cdn.iplusmed.com/picture/doctor/default/head/portrait_man.png" style="width:3rem;height:3rem;" data-index="2">
</div> </div>
</body> </body>
<script type="text/javascript"> <script type="text/javascript">
......
body{
background:#F6F6FC;
font-size:0.32rem;
}
.header_tab{
width:100%;
height:0.8rem;
line-height:0.8rem;
background:#fff;
text-align:center;
}
.header_tab .tab_item{
display:inline-block;
height:0.8rem;
line-height:0.8rem;
}
.header_tab .basic{
margin-right:2.22rem
}
.header_tab .tabOn{
color:#2CBCA0;
border-bottom:0.01rem solid #2CBCA0;
}
.input_list {
width: 100%;
padding-left: 0.32rem;
margin-top: 0.4rem;
font-size: 0.32rem;
color: #000000;
background:#fff;
}
.txt_red {
color: #F45E19;
margin-right: 0.15rem;
}
.input_list .input_item {
font-size: 0.32rem;
color: #000;
height: 0.94rem;
line-height: 0.94rem;
padding-right: 0.32rem;
border-bottom: 0.01rem solid #e0e0e0;
}
.input_list .input_item .left_tip {
float: left;
position: relative;
}
.left_tip .txt_red {
position: absolute;
top: 0.1rem;
}
.input_list .input_item .input_tip {
margin-left: 0.2rem;
}
.right_box {
float: right;
color: #333;
}
.health_typeBox .healthBox {}
.input_list .input_item .arrow_icon {
width: 0.16rem;
}
.input_list .input_item input {
text-align: right;
height: 0.8rem;
border: none;
font-size: 0.32rem;
margin-bottom:0;
padding:0;
width:3rem;
}
.treatwayInfo {
font-size: 0.32rem;
margin-top: 0.4rem;
padding-left: 0.32rem;
display:none;
}
.treatwayInfo .input_item {
padding-right: 0.32rem;
border-bottom: 0.01rem solid #F1F1F1;
position: relative;
height:auto;
line-height:normal;
}
.treatwayInfo .input_item .arrow_icon {
width: 0.16rem;
float: right;
}
.treatwayInfo .input_item .input_item_title {
padding-top: 0.46rem;
}
.treatwayInfo .input_item .input_item_info {
padding-top: 0.32rem;
padding-bottom: 0.2rem;
}
.treatwayInfo .input_item .input_item_info .input_content {
color: #999999;
width: 6rem;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.treatwayInfo .add_btn {
width: 1.18rem;
height: 0.56rem;
border: 0.01rem solid #2cbca0;
border-radius: 0.28rem;
background: #ffffff;
line-height: 0.56rem;
text-align: center;
color: #2CBCA0;
position: absolute;
top: 0.35rem;
right: 0.32rem
}
.treatwayInfo .input_item_info .image_upload {
float: left;
margin-right: 0.48rem
}
.treatwayInfo .input_item_info .image_upload img {
width: 1.36rem;
height: 1.36rem;
}
.treatwayInfo .image_files_item {
float: left;
position: relative;
margin-right: 0.48rem;
margin-bottom: 0.2rem;
}
.treatwayInfo .image_files_item .image_files_img {
width: 1.36rem;
height: 1.36rem;
border-radius: 0.16rem;
}
.treatwayInfo .image_files_item .image_del {
width: 0.4rem;
height: 0.4rem;
position: absolute;
right: -0.1rem;
top: -0.1rem;
}
.treatwayInfo .image_files_item .image_del img {}
define(['zepto', 'medtap'], function($, medtap) {
var detail = {
emrId: medtap.getRequest('emrId'),
init: function() {
detail.bindEve();
detail.getEmrDetail();
},
bindEve: function() {
$('.tab_item').unbind().bind('click', function() {
$(this).addClass('tabOn');
$(this).siblings('.tab_item').removeClass('tabOn');
if ($('.basic').hasClass('tabOn')) {
$('.basicInfo').show();
$('.treatwayInfo').hide();
} else if ($('.treatway').hasClass('tabOn')) {
$('.basicInfo').hide();
$('.treatwayInfo').show();
}
})
},
getEmrDetail: function() {
medtap.jzz(1);
$.ajax({
url: 'https://testdevgw.medtap.cn/user/patientEMR/getPatientEMRInfo',
type: 'post',
async: false,
contentType: 'application/json',
headers: medtap.getHeaders(),
data: JSON.stringify({
emrId: detail.emrId
}),
success: function(res) {
medtap.jzz(0);
if (res.success == true) {
var info = res.content.emr;
//基本信息
var sex = '';
var diseaseDiagnosis = '';
$('#username').val(info.patientName);
if (info.sex == 'M') {
sex = '男';
} else {
sex = '女';
}
$('#sex').val(sex).attr('sendkey', info.sex);
$('#birth').val(info.birthday);
if (info.diseaseDiagnosis == 'lung') {
diseaseDiagnosis = '肺癌';
$('#disease').val(diseaseDiagnosis).attr('sendkey', 'lung');
} else {
diseaseDiagnosis = '其他';
$('#disease').val(diseaseDiagnosis).attr('sendkey', ' ');
}
$('#pathology').val(info.pathologyTypeItem.value).attr('sendkey', info.pathologyTypeItem.child);
$('#height').val(info.hasOwnProperty('height') ? info.height : '');
$('#stages').val(info.hasOwnProperty('tumorStageItem') ? info.tumorStageItem.value : '');
$('#stages_TNM').val(info.hasOwnProperty('tnmStage') ? info.tnmStage : '');
$('#transfer').val(info.hasOwnProperty('transferNidusItem') ? info.transferNidusItem.value : '');
if (info.hasOwnProperty('smokingFlg') && info.smokingFlg == true) {
$('#somke').val(info.smokingYear + '年' + info.smokingDailyNum + '支/天');
} else if (info.hasOwnProperty('smokingFlg') && info.smokingFlg == false) {
$('#somke').val('无');
}
$('#ECOG').val(info.hasOwnProperty('ecogGradeItem') ? info.ecogGradeItem.value : '');
$('#idCard').val(info.hasOwnProperty('patientHospitalIdNum') ? info.patientHospitalIdNum : '');
$('#location').val(info.hasOwnProperty('areaItem') ? info.areaItem.fullName : '');
//治疗信息
//$('.hasPoint').text(info.hasOwnProperty('targetedMutationsItem') ? info.targetedMutationsItem.value : "");
if (info.hasOwnProperty('targetedMutationsItem') && info.targetedMutationsItem.length != 0) {
var strTargetedMutations = [];
for (var i = 0; i < info.targetedMutationsItem.length; i++) {
strTargetedMutations.push(info.targetedMutationsItem[i].value);
}
strTargetedMutations.join(',')
$('.hasPoint').text(strTargetedMutations).css('color', '#333');
} else {
$('.hasPoint').text('无');
}
if (info.hasOwnProperty('acceptingCureItem') && info.acceptingCureItem.length != 0) {
var strAccepting = [];
for (var i = 0; i < info.acceptingCureItem.length; i++) {
strAccepting.push(info.acceptingCureItem[i].value);
}
strAccepting.join(',');
$('.treating').text(strAccepting).css('color', '#333');
} else {
$('.treating').text('无');
}
if (info.hasOwnProperty('acceptedCureItem') && info.acceptedCureItem.length != 0) {
var strAccepted = [];
for (var i = 0; i < info.acceptedCureItem.length; i++) {
strAccepted.push(info.acceptedCureItem[i].value);
}
strAccepted.join(',');
$('.treated').text(strAccepted);
} else {
$('.treated').text('无');
}
//图片
/* var picUrl = */
if (info.hasOwnProperty('curePicList') && info.curePicList.length != 0) {
var picUrl = '';
for (var i = 0; i < info.curePicList.length; i++) {
picUrl += '<img src="' + info.curePicList[i] + '" >';
'<div class="image_files_item">' +
'<img src="' + info.curePicList[i] + '" class="image_files_img" imgkey="' + info.curePicList[i] + '">' +
'<img src="images/post_delete_btn@2x.png" class="image_del" >' +
'</div>';
}
$('#ImgUp').html(picUrl);
}
}
}
})
}
}
detail.init();
})
<!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">
<link rel="stylesheet" type="text/css" href="https://review-formal.iplusmed.com/Common/css/reset.css" />
<link rel="stylesheet" type="text/css" href="css/emrDetail.css"/>
<script src="https://review-formal.iplusmed.com/Common/javaScript/calRem.js" type="text/javascript" charset="utf-8"></script>
<title></title>
<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",
"medtap": "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: "$"
}
}
});
</script>
</head>
<body>
<div id="content">
<div class="header_tab">
<span class="tab_item basic tabOn">基本信息</span>
<span class="tab_item treatway">治疗信息</span>
</div>
<div class="input_list basicInfo">
<div class="input_item clearfix">
<div class="left_tip">
<span class="txt_red">*</span>
<span class="input_tip">患者姓名</span>
</div>
<div class="right_box">
<input type="text" name="" id="username" value="" placeholder="请输入真实姓名" />
</div>
</div>
<div class="input_item clearfix">
<div class="left_tip">
<span class="txt_red">*</span>
<span class="input_tip">性别</span>
</div>
<div class="right_box" id="sex_typeBox">
<input type="text" name="" id="sex" value="" placeholder="请选择" readonly="true" />
<!-- <img src="../images/_arrows _right@2x.png" class="arrow_icon"> -->
</div>
</div>
<div class="input_item clearfix">
<div class="left_tip">
<span class="txt_red">*</span>
<span class="input_tip">出生日期</span>
</div>
<div class="right_box" id="birth_typeBox">
<input type="text" name="" id="birth" value="" placeholder="请选择" readonly="true" />
<!-- <img src="../images/_arrows _right@2x.png" class="arrow_icon"> -->
</div>
</div>
<div class="input_item clearfix">
<div class="left_tip">
<span class="input_tip">身高(cm)</span>
</div>
<div class="right_box">
<input type="text" name="" id="height" value="" placeholder="" readonly="true"/>
</div>
</div>
<div class="input_item clearfix">
<div class="left_tip">
<span class="txt_red">*</span>
<span class="input_tip">疾病诊断</span>
</div>
<div class="right_box" id="disease_typeBox">
<input type="text" name="" id="disease" value="" placeholder="" readonly="true" />
<!-- <img src="../images/_arrows _right@2x.png" class="arrow_icon"> -->
</div>
</div>
<div class="input_item clearfix">
<div class="left_tip">
<span class="txt_red">*</span>
<span class="input_tip">病理类型</span>
</div>
<div class="right_box" id="pathology_typeBox">
<input type="text" name="" id="pathology" value="" placeholder="" readonly="true" />
<!-- <img src="../images/_arrows _right@2x.png" class="arrow_icon"> -->
</div>
</div>
<div class="input_item clearfix">
<div class="left_tip">
<span class="input_tip">肿瘤分期</span>
</div>
<div class="right_box" id="stages_typeBox">
<input type="text" name="" id="stages" value="" placeholder="" readonly="true" />
<!-- <img src="../images/_arrows _right@2x.png" class="arrow_icon"> -->
</div>
</div>
<div class="input_item clearfix">
<div class="left_tip">
<span class="input_tip">TNM分期</span>
</div>
<div class="right_box" id="stages_TNM_typeBox">
<input type="text" name="" id="stages_TNM" value="" placeholder="" readonly="true" />
<!-- <img src="../images/_arrows _right@2x.png" class="arrow_icon"> -->
</div>
</div>
<div class="input_item clearfix">
<div class="left_tip">
<span class="input_tip">有无转移病灶</span>
</div>
<div class="right_box" id="transfer_typeBox">
<input type="text" name="" id="transfer" value="" placeholder="" readonly="true" />
<!-- <img src="../images/_arrows _right@2x.png" class="arrow_icon"> -->
</div>
</div>
<div class="input_item clearfix">
<div class="left_tip">
<span class="input_tip">有无吸烟史</span>
</div>
<div class="right_box somke_typeBox">
<input type="text" name="" id="somke" value="" placeholder="" readonly="true" />
<!-- <img src="../images/_arrows _right@2x.png" class="arrow_icon"> -->
</div>
</div>
<div class="input_item clearfix">
<div class="left_tip">
<span class="input_tip">ECOG评分</span>
</div>
<div class="right_box" id="ECOG_typeBox">
<input type="text" name="" id="ECOG" value="" placeholder="" readonly="true" />
<!-- <img src="../images/_arrows _right@2x.png" class="arrow_icon"> -->
</div>
</div>
<div class="input_item clearfix">
<div class="left_tip" style="width:2.1rem;line-height:0.46rem;margin-left:0.2rem;">
病案号/住院号医保卡号
</div>
<div class="right_box">
<input type="text" name="" id="idCard" value="" placeholder="" readonly="true"/>
</div>
</div>
<div class="input_item clearfix" style="border:none">
<div class="left_tip">
<span class="input_tip">医保所在地</span>
</div>
<div class="right_box" id="location_typeBox">
<input type="text" name="" id="location" value="" placeholder="" readonly="true" />
<!-- <img src="../images/_arrows _right@2x.png" class="arrow_icon"> -->
</div>
</div>
</div>
<div class="input_list treatwayInfo">
<div class="input_item clearfix">
<div class="input_item_title">有无靶向突变</div>
<div class="input_item_info" id="hasPoint">
<span class="input_content hasPoint">请选择</span>
<!-- <img src="../images/_arrows _right@2x.png" class="arrow_icon"> -->
</div>
</div>
<div class="input_item clearfix">
<div class="input_item_title">当前正在接受的治疗</div>
<div class="input_item_info treatWay_btn">
<span class="input_content treating">请选择</span>
<!-- <img src="../images/_arrows _right@2x.png" class="arrow_icon"> -->
</div>
</div>
<div class="input_item clearfix" style="padding-bottom:0.3rem;">
<div class="input_item_title">既往接受过的治疗</div>
<!-- <div class="add_btn">+添加</div> -->
<span class="treated" style="margin-top:0.2rem"></span>
</div>
<div class="input_item clearfix">
<div class="input_item_title">既往出院小结/门诊病历</div>
<div class="input_item_info">
<!-- <div class="image_upload" id="upload">
<img src="../images/post_ picture_btn@2x.png">
</div> -->
<div class="image_files clearfix" id="ImgUp">
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
var appUserData = {};
function initGlobalData(data) {
appUserData.agentNum = data['agent-num'];
appUserData.appType = data.apptype;
appUserData.token = data.token;
appUserData.userOs = data['user-os'];
if (appUserData.token == "" || appUserData.token == undefined) {
window.location.href = "FF499211739FD801DOCTOR://kRouteWebLogin";
} else {
localStorage.appUserData = JSON.stringify(appUserData);
localStorage.medtapGlobalData = JSON.stringify(appUserData);
}
}
require(['javaScript/rukou.js'])
</script>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment