<!doctype html>
|
<html>
|
<head>
|
<meta charset="utf-8" />
|
<title>修改个人信息</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<!-- js引用 -->
|
<script src="../../js/config.js"></script>
|
<script src="../../js/h5toapp.js"></script>
|
<script src="../../js/h5to.js"></script>
|
|
<!-- 组件js引用 -->
|
<script src="../../js/mui.min.js"></script>
|
<script src="../../js/mui.poppicker.js"></script>
|
<script src="../../js/mui.picker.min.js"></script>
|
<!-- 组件标准css引用 -->
|
<link rel="stylesheet" href="../../css/mui.min.css">
|
<link rel="stylesheet" href="../../css/mui.poppicker.css">
|
<link rel="stylesheet" href="../../css/mui.picker.min.css">
|
|
<!-- css引用 -->
|
<link href="../../css/currency.css" rel="stylesheet">
|
<link href="../../css/spinkit.css" rel="stylesheet">
|
<link href="../../css/icon/iconfont.css" rel="stylesheet">
|
<!-- 界面本身css引用 -->
|
<link href="./xggrxx.css" rel="stylesheet">
|
|
<style type="text/css">
|
.mui-dtpicker, .mui-poppicker {
|
background-color: #FFFFFF;
|
border-radius: 24px;
|
bottom: 40%;
|
width: 91.5%;
|
margin: 0 16px;
|
-webkit-transform: translateY(800px);
|
}
|
.mui-dtpicker-header {
|
height: 54px;
|
border-bottom: 1px solid #F6F6F6;
|
}
|
.mui-dtpicker .mui-picker {
|
border-radius: 24px;
|
}
|
.mui-dtpicker-header button {
|
font-size: 17px;
|
padding: 11px 10px;
|
}
|
.mui-btn-blue, .mui-btn-primary, input[type=submit] {
|
background-color: #FFFFFF;
|
border: 0;
|
color: #21D197;
|
}
|
.mui-btn {
|
border: 0;
|
}
|
.mui-dtpicker-title {
|
height: 0;
|
}
|
.mui-dtpicker-title h5 {
|
background-color: #FFFFFF;
|
border: 0;
|
margin-top: 30px;
|
|
font-size: 14px;
|
font-family: PingFangSC-Regular, PingFang SC;
|
font-weight: 400;
|
color: #838B98;
|
-webkit-text-fill-color: #838B98;
|
}
|
.mui-picker {
|
background-color: #FFFFFF;
|
}
|
.mui-pciker-rule-ft {
|
width: 104px;
|
margin-left: 10px;
|
}
|
.mui-dtpicker-body {
|
height: 150px;
|
}
|
.mui-poppicker-header {
|
height: 54px;
|
}
|
.mui-poppicker-header .mui-btn {
|
font-size: 17px;
|
padding: 11px;
|
}
|
.mui-poppicker-body .mui-picker {
|
border-radius: 24px;
|
}
|
textarea::-webkit-scrollbar {
|
display: none;
|
}
|
</style>
|
</head>
|
|
<body>
|
<div style="background-color: #F9FAFC; height: 100vh; width: 100%; margin: 0; overflow: auto;">
|
<div id="loading" class="example">
|
<div class="sk-plane loading_location"></div>
|
</div>
|
|
<div class="mui-content">
|
<div style="margin: 16px; box-sizing: border-box;">
|
<div class="mui-card">
|
<div class="z_menu_btn_row" style="height: 55px; line-height: 55px;" >
|
<span class="list_txt_bt">姓名:</span>
|
<input id="my_name" type="text" name="username" class="list_txt_bt_r" onchange="change(this)" style="width: 190px;padding: 0;border: 0px;outline: none;margin-bottom: 0;"/>
|
</div>
|
<div class="z_menu_btn_row" style="height: 55px; line-height: 55px;" >
|
<span class="list_txt_bt">性别:</span>
|
<label><input id="male" type="radio" name="sex" value="男生" onclick="change(this)"><span class="list_txt_bt_r" style="margin-left: 10px;">男</span></label>
|
<label style="margin-left: 24px;"><input id="female" type="radio" name="sex" value="女生" onclick="change(this)"><span class="list_txt_bt_r" style="margin-left: 10px;">女</span></label>
|
</div>
|
<div id="birth_dialog" class="z_menu_btn_row" style="height: 55px; line-height: 55px;" >
|
<span class="list_txt_bt">出生日期:</span>
|
<span id="birthday" onclick="change(this)" type="text" name="username" value="1993.03.12" class="list_txt_bt_r" style="width: 190px;padding: 0;border: 0px;outline: none;margin-bottom: 0;"></span>
|
</div>
|
<div id="showCityPicker" class="z_menu_btn_row" style="height: 55px; line-height: 55px;" >
|
<div class="z_menu_btn_txt">
|
<span class="list_txt_bt">所在地区:</span>
|
<span id="city_name" type="text" name="username" class="list_txt_bt_r" style="width: 190px;padding: 0;border: 0px;outline: none;margin-bottom: 0;"></span>
|
</div>
|
<div class="z_menu_btn_icon">
|
<img src="../../img/ic_arrow_right.png" >
|
</div>
|
</div>
|
<div class="z_menu_btn_row" style="height: 55px; line-height: 55px;" >
|
<span class="list_txt_bt">所在医院:</span>
|
<input id="hospital_name" onchange="change(this)" type="text" name="username" class="list_txt_bt_r" style="width: 185px;padding: 0;border: 0px;outline: none;margin-bottom: 0;"/>
|
</div>
|
<div class="z_menu_btn_row" style="height: 55px; line-height: 55px;" >
|
<span class="list_txt_bt">所在科室:</span>
|
<input id="department" onchange="change(this)" type="text" name="username" class="list_txt_bt_r" style="width: 190px;padding: 0;border: 0px;outline: none;margin-bottom: 0;"/>
|
</div>
|
<div class="z_menu_btn_row" style="height: 55px; line-height: 55px;" >
|
<div class="z_menu_btn_txt">
|
<span class="list_txt_bt">职称:</span>
|
</div>
|
<div class="z_menu_btn_txt">
|
|
<a href="#option" >
|
<div style="width: 200px;height: 48px;line-height: 48px;margin: 4px 16px 0;padding-left: 16px;border-radius: 8px;border: 1px solid #F0F0F0;">
|
<span id="doctor_professional" class="input_text" style="line-height: 24px;">请选择</span>
|
<div class="z_menu_btn_icon" style="line-height: 24px;margin-right: 12px;padding: 11px 0;">
|
<i class="iconfont iconxiangxia" style="font-size: 20px;"></i>
|
</div>
|
</div>
|
</a>
|
</div>
|
</div>
|
</div>
|
|
</div>
|
<div style="margin: 16px; box-sizing: border-box;">
|
<div class="mui-card">
|
<div class="z_menu_btn_row" style="height: 66px; line-height: 66px;" >
|
<div class="z_menu_btn_img">
|
<div class="z_menu_btn_img1">
|
<img src="../../img/组%2062.png" />
|
</div>
|
</div>
|
|
<div class="z_menu_btn_txt" >
|
<span>简介</span>
|
</div>
|
<div class="z_menu_btn_icon">
|
<img src="../../img/ic_arrow_right.png" />
|
</div>
|
</div>
|
|
<div class="z_menu_btn_row" style="height: 84px; line-height: normal;">
|
<div class="" style="margin-top: 17px;">
|
<div class="z_my_gzd" style="margin-top: 14px;">
|
<textarea id="introduce" onchange="change(this)" class="z_menu_btn_txt_list"/></textarea>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div style="margin: 16px; box-sizing: border-box;">
|
<div class="mui-card">
|
<div class="z_menu_btn_row" style="height: 66px; line-height: 66px;" >
|
<div class="z_menu_btn_img">
|
<div class="z_menu_btn_img1">
|
<img src="../../img/组%2059.png" />
|
</div>
|
</div>
|
|
<div class="z_menu_btn_txt" >
|
<span>擅长</span>
|
</div>
|
<div class="z_menu_btn_icon">
|
<img src="../../img/ic_arrow_right.png" />
|
</div>
|
</div>
|
|
<div class="z_menu_btn_row" style="height: 252px; line-height: normal;border: 0;">
|
<div class="" style="margin-top: 17px;">
|
<div class="z_my_gzd" style="margin-top: 14px;">
|
<textarea id="advantage" onchange="change(this)" class="z_menu_btn_txt_list"/></textarea>
|
</div>
|
<div class="scdjb_txt">
|
<div class="scdjb_txt1">擅长的疾病</div>
|
<div class="yjtq_btn_txt">一键提取</div>
|
</div>
|
<div class="scdjb_txt_js"></div>
|
<div id="label_list" style="margin-top: 16px;">
|
<div id="disease"></div>
|
</div>
|
<div id="add_btn" class="add_label">
|
<div onclick="click_hidden(this)">
|
<img src="../../img/add.png" class="add_label_img" />
|
<div class="add_label_txt">添加</div>
|
</div>
|
</div>
|
<div id="label_iuput" class="add_label" style="display: none;" >
|
<input type="text" id="add_input" onblur="click_add_label()" style="width: 83px;height: 28px;background: #EEEFF4;border-radius: 4px;border: 0;padding: 0;" />
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
<div style="width: 100%;">
|
<button class="save_button" onclick="click_row(menurows[0])" style="width: -webkit-fill-available;">保存</button>
|
</div>
|
</div>
|
</div>
|
|
<script src="../../js/city.data.js"></script>
|
<script type="text/javascript">
|
mui.init({
|
swipeBack: true //启用右滑关闭功能
|
});
|
|
var menurows = [
|
{id: "1", name: "我的诊室", path: "../myzs/myzs"},
|
{id: "2", name: "我的收益", path: "../mysy/mysy"},
|
{id: "3", name: "我的动态", path: "../mydt/mydt"},
|
{id: "4", name: "我的科普", path: "../mykp/mykp"},
|
{id: "5", name: "系统消息", path: "../xtxx/xtxx"},
|
{id: "6", name: "随访量表", path: "../sflb/sflb"},
|
{id: "7", name: "我的收藏", path: "../mysc/mysc"},
|
];
|
var doctorInfo = {};
|
var success = {};
|
var error = {};
|
setRouteParams({userId: "1285860235186212865",params: {"doctorId": "1285860235186212865"}});
|
|
function initPage() {
|
|
mui.ready(function() {
|
// 二级联示例
|
var cityPicker = new mui.PopPicker({
|
layer: 2
|
});
|
cityPicker.setData(cityData);
|
var showCityPickerButton = document.getElementById('showCityPicker');
|
// 监听确定点击事件
|
showCityPickerButton.addEventListener('tap', function(event) {
|
document.getElementsByClassName('mui-pciker-rule-ft')[0].style.marginLeft = '32px';
|
document.getElementsByClassName('mui-pciker-rule-ft')[1].style.marginLeft = '32px';
|
cityPicker.show(function(items) {
|
document.getElementById('city_name').innerText = items[0].text + items[1].text;
|
});
|
}, false);
|
});
|
|
document.getElementById("birth_dialog").addEventListener('tap', function() {
|
var dtpicker = new mui.DtPicker({
|
type: "date",//设置日历初始视图模式
|
beginDate: new Date(1849, 12, 01),//设置开始日期
|
endDate: new Date(2100, 01, 30),//设置结束日期
|
labels: [' ',' ',' ','时','分'],
|
customData: {
|
|
}
|
})
|
dtpicker.setSelectedValue("2010-01-01");
|
dtpicker.show(function(rs) {
|
// document.getElementById("dateSelect").classList.replace("input_text","input_text1");
|
document.getElementById("birthday").innerText = rs.y.text+"."+rs.m.text+"."+rs.d.text;
|
}) ;
|
});
|
|
mui('body').on('shown', '.mui-popover', function(e) {
|
//console.log('shown', e.detail.id);//detail为当前popover元素
|
});
|
mui('body').on('hidden', '.mui-popover', function(e) {
|
//console.log('hidden', e.detail.id);//detail为当前popover元素
|
});
|
var info = document.getElementById("info");
|
mui('body').on('tap', '.mui-popover-action li>a', function() {
|
var a = this,
|
parent;
|
//根据点击按钮,反推当前是哪个actionsheet
|
for (parent = a.parentNode; parent != document.body; parent = parent.parentNode) {
|
if (parent.classList.contains('mui-popover-action')) {
|
break;
|
}
|
}
|
//关闭actionsheet
|
// mui('#' + parent.id).popover('toggle');
|
if(a.innerText!="取消"){
|
info.innerHTML =a.innerHTML;
|
}
|
});
|
clickClose();
|
}
|
|
function loadData() {
|
ajaxGet('search/api/query/doctor/' + login_data.userId, function(result) {
|
if (result) {
|
doctorInfo = result.data.doctorParamETOList[0];
|
}
|
doLoadData();
|
hideloading("loading");
|
});
|
}
|
|
function clickClose() {
|
mui('body').on('tap', '#label_list .label_img', function(event) {
|
event.cancelBubble = true;//阻止当前事件的冒泡
|
var a = this;
|
let img_element = a.parentElement;
|
img_element.remove();
|
});
|
}
|
|
function click_row(row) {
|
var pam = {
|
_id: row._id,
|
params:{
|
userId: login_data.userId
|
}
|
};
|
ajaxPost('doctor/api/edit/doctor/general',changeData,function(result) {
|
console.info(result);
|
});
|
|
app_click("route", pam, callback);
|
}
|
|
var changeData = {};
|
function change(e){
|
changeData.id = login_data.userId;
|
if(e.id == "my_name"){
|
changeData.doctorName = document.getElementById('my_name').value;
|
}else if(e.type == "radio"){
|
changeData.sex = document.getElementById(e.id).value;
|
}else if(e.id == "hospital_name"){
|
changeData.medoHospitalName = document.getElementById(e.id).value;
|
}else if(e.id == "department"){
|
changeData.mediDiseaseClassifyName = document.getElementById(e.id).value;
|
}else if(e.id == "introduce"){
|
changeData.doctorIntroduce = document.getElementById(e.id).value;
|
}
|
else if(e.id == "advantage"){
|
changeData.doctorAdvantage = document.getElementById(e.id).value;
|
}
|
console.info(changeData);
|
}
|
|
mui('body').on('tap', '.mui-dtpicker-header .mui-btn', function(event) {
|
event.cancelBubble = true;//阻止当前事件的冒泡
|
var a = this;
|
changeData.birthday = document.getElementById('birthday').innerText;
|
});
|
mui('body').on('tap', '.mui-poppicker-header .mui-btn', function(event) {
|
event.cancelBubble = true;//阻止当前事件的冒泡
|
var a = this;
|
changeData.cityName = document.getElementById('city_name').innerText;
|
console.info(changeData);
|
});
|
|
function click_hidden(e){
|
document.getElementById('add_btn').style.display = "none";
|
document.getElementById('label_iuput').style.display = "block";
|
}
|
|
function click_add_label() {
|
if(document.getElementById('add_input').value != ""){
|
var label = document.getElementById('label_list');
|
var element = document.createElement('div');
|
element.className = "label";
|
var div_element = document.createElement('div');
|
div_element.className = "label_txt";
|
var span_element = document.createElement('span');
|
span_element.innerText = document.getElementById('add_input').value;
|
var img_element = document.createElement('img');
|
img_element.className = "label_img";
|
img_element.src = "../../img/ic_reset_search.png";
|
element.appendChild(img_element);
|
element.appendChild(div_element);
|
div_element.appendChild(span_element);
|
label.appendChild(element);
|
}
|
document.getElementById('add_btn').style.display = "block";
|
document.getElementById('add_input').value = "";
|
document.getElementById('label_iuput').style.display = "none";
|
}
|
|
//展示数据
|
function doLoadData(){
|
document.getElementById('city_name').innerText = doctorInfo.cityName;
|
document.getElementById('my_name').value = doctorInfo.doctorName;
|
document.getElementById('introduce').value = doctorInfo.doctorIntroduce;
|
document.getElementById('advantage').value = doctorInfo.doctorAdvantage;
|
document.getElementById('hospital_name').value = doctorInfo.medoHospitalName;
|
document.getElementById('department').value = doctorInfo.mediDiseaseClassifyName01;
|
document.getElementById('doctor_professional').innerText = doctorInfo.doctorProfessional;
|
var diseaseList = doctorInfo.mediDiseaseName;
|
var diseaseName = "";
|
for (var i = 0; i < diseaseList.length; i++) {
|
diseaseName1 =
|
'<div class="label">'+
|
'<img src="../../img/ic_reset_search.png" class="label_img" />'+
|
'<div class="label_txt">'+
|
'<span>'+diseaseList[i]+'</span>'+
|
'</div>'+
|
'</div>';
|
diseaseName += diseaseName1
|
}
|
disease.innerHTML = diseaseName;
|
}
|
|
//3.run
|
mui.ready(function() {
|
onInitReady(function() {
|
initPage();
|
loadData();
|
});
|
});
|
</script>
|
</body>
|
</html>
|
|