...
|
...
|
@@ -67,20 +67,20 @@ |
|
|
<div class="info_item">
|
|
|
<div class="title" data-id="1">
|
|
|
<text>临床表现</text>
|
|
|
<text class="iconfont icon-huatong voice_btn"></text>
|
|
|
<text class="iconfont icon-huatong voice_btn voice_btn1"></text>
|
|
|
<text class="iconfont icon-tianxie"></text>
|
|
|
</div>
|
|
|
<div class="textarea_box">
|
|
|
<textarea class="area" type="text" placeholder="请输入临床表现" maxlength="1000"
|
|
|
<textarea class="area textarea1" type="text" placeholder="请输入临床表现" maxlength="1000"
|
|
|
id="behavior"></textarea>
|
|
|
<p class="text_num"><span class="text-count">0</span>/1000</p>
|
|
|
</div>
|
|
|
<div class="voice_module" video-id="1">
|
|
|
<div id="voice_module1" class="voice_module" video-id="1">
|
|
|
<div class="voice_list" voiceitemid="1">
|
|
|
<div class="voice_box voice_third">
|
|
|
<div class="voice_item">
|
|
|
<text class="iconfont icon-luyin voice_icon"></text>
|
|
|
<text class="voice_font luyin">点击图标可播放 时长:10秒</text>
|
|
|
<text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span>秒</text>
|
|
|
</div>
|
|
|
<div class="voice_btn_box">
|
|
|
<text class="iconfont icon-quxiao cancle_voice"></text>
|
...
|
...
|
@@ -103,32 +103,27 @@ |
|
|
<div class="info_item">
|
|
|
<div class="title" data-id="2">
|
|
|
<text>已做检查</text>
|
|
|
<text class="iconfont icon-huatong voice_btn"></text>
|
|
|
<text class="iconfont icon-huatong voice_btn voice_btn2"></text>
|
|
|
<text class="iconfont icon-tianxie"></text>
|
|
|
</div>
|
|
|
<div class="textarea_box">
|
|
|
<textarea class="area" type="text" placeholder="请输入你已做的检查 " maxlength="1000"
|
|
|
<textarea class="area textarea2" type="text" placeholder="请输入你已做的检查" maxlength="1000"
|
|
|
id="examination"></textarea>
|
|
|
<p class="text_num"><span class="text-count">0</span>/1000</p>
|
|
|
</div>
|
|
|
<div class="voice_module" video-id="2">
|
|
|
<div id="voice_module2" class="voice_module" video-id="2">
|
|
|
<div class="voice_list" voiceitemid="2">
|
|
|
<div class="voice_box voice_third">
|
|
|
<div class="voice_item">
|
|
|
<text class="iconfont icon-luyin voice_icon"></text>
|
|
|
<text class="voice_font luyin">点击图标可播放 时长:10秒</text>
|
|
|
<text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span>秒</text>
|
|
|
</div>
|
|
|
<div class="voice_btn_box">
|
|
|
<text class="iconfont icon-quxiao cancle_voice"></text>
|
|
|
<text class="iconfont icon-tianjia add_voice"></text>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--<div class="voice_box voice_second">-->
|
|
|
<!--<div class="voice_item">-->
|
|
|
<!--<text class="iconfont icon-luying_ongoing voice_icon"></text>-->
|
|
|
<!--<text class="voice_font luying_ongoing">正在播放 10秒/60秒</text>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
|
|
|
<div class="voice_box voice_first">
|
|
|
<div class="voice_item">
|
|
|
<text class="iconfont icon-huatong mike voice_icon"></text>
|
...
|
...
|
@@ -144,32 +139,27 @@ |
|
|
<div class="info_item">
|
|
|
<div class="title" data-id="3">
|
|
|
<text>目前诊断</text>
|
|
|
<text class="iconfont icon-huatong voice_btn"></text>
|
|
|
<text class="iconfont icon-huatong voice_btn voice_btn3"></text>
|
|
|
<text class="iconfont icon-tianxie"></text>
|
|
|
</div>
|
|
|
<div class="textarea_box">
|
|
|
<textarea class="area" type="text" placeholder="请输入目前诊断" maxlength="1000"
|
|
|
<textarea class="area textarea3" type="text" placeholder="请输入目前诊断" maxlength="1000"
|
|
|
id="diagnosis"></textarea>
|
|
|
<p class="text_num"><span class="text-count">0</span>/1000</p>
|
|
|
</div>
|
|
|
<div class="voice_module" video-id="3">
|
|
|
<div class="voice_list" voiceitemid="2">
|
|
|
<div id="voice_module3" class="voice_module" video-id="3">
|
|
|
<div class="voice_list" voiceitemid="3">
|
|
|
<div class="voice_box voice_third">
|
|
|
<div class="voice_item">
|
|
|
<text class="iconfont icon-luyin voice_icon"></text>
|
|
|
<text class="voice_font luyin">点击图标可播放 时长:10秒</text>
|
|
|
<text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span>秒</text>
|
|
|
</div>
|
|
|
<div class="voice_btn_box">
|
|
|
<text class="iconfont icon-quxiao cancle_voice"></text>
|
|
|
<text class="iconfont icon-tianjia add_voice"></text>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--<div class="voice_box voice_second">-->
|
|
|
<!--<div class="voice_item">-->
|
|
|
<!--<text class="iconfont icon-luying_ongoing voice_icon"></text>-->
|
|
|
<!--<text class="voice_font luying_ongoing">正在播放 10秒/60秒</text>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
|
|
|
<div class="voice_box voice_first">
|
|
|
<div class="voice_item">
|
|
|
<text class="iconfont icon-huatong mike voice_icon"></text>
|
...
|
...
|
@@ -185,31 +175,26 @@ |
|
|
<div class="info_item">
|
|
|
<div class="title" data-id="4">
|
|
|
<text>已用药物</text>
|
|
|
<text class="iconfont icon-huatong voice_btn"></text>
|
|
|
<text class="iconfont icon-huatong voice_btn voice_btn4"></text>
|
|
|
<text class="iconfont icon-tianxie"></text>
|
|
|
</div>
|
|
|
<div class="textarea_box">
|
|
|
<textarea class="area" type="text" placeholder="请输入已用药物" maxlength="1000" id="drugs"></textarea>
|
|
|
<textarea class="area textarea4" type="text" placeholder="请输入已用药物" maxlength="1000" id="drugs"></textarea>
|
|
|
<p class="text_num"><span class="text-count">0</span>/1000</p>
|
|
|
</div>
|
|
|
<div class="voice_module" video-id="4">
|
|
|
<div class="voice_list" voiceitemid="2">
|
|
|
<div id="voice_module4" class="voice_module" video-id="4">
|
|
|
<div class="voice_list" voiceitemid="4">
|
|
|
<div class="voice_box voice_third">
|
|
|
<div class="voice_item">
|
|
|
<text class="iconfont icon-luyin voice_icon"></text>
|
|
|
<text class="voice_font luyin">点击图标可播放 时长:10秒</text>
|
|
|
<text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span>秒</text>
|
|
|
</div>
|
|
|
<div class="voice_btn_box">
|
|
|
<text class="iconfont icon-quxiao cancle_voice"></text>
|
|
|
<text class="iconfont icon-tianjia add_voice"></text>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--<div class="voice_box voice_second">-->
|
|
|
<!--<div class="voice_item">-->
|
|
|
<!--<text class="iconfont icon-luying_ongoing voice_icon"></text>-->
|
|
|
<!--<text class="voice_font luying_ongoing">正在播放 10秒/60秒</text>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
|
|
|
<div class="voice_box voice_first">
|
|
|
<div class="voice_item">
|
|
|
<text class="iconfont icon-huatong mike voice_icon"></text>
|
...
|
...
|
@@ -225,32 +210,27 @@ |
|
|
<div class="info_item">
|
|
|
<div class="title" data-id="5">
|
|
|
<text>当前困惑</text>
|
|
|
<text class="iconfont icon-huatong voice_btn"></text>
|
|
|
<text class="iconfont icon-huatong voice_btn voice_btn5"></text>
|
|
|
<text class="iconfont icon-tianxie"></text>
|
|
|
</div>
|
|
|
<div class="textarea_box">
|
|
|
<textarea class="area" type="text" placeholder="请输入你的困惑" maxlength="1000"
|
|
|
<textarea class="area textarea5" type="text" placeholder="请输入你的困惑" maxlength="1000"
|
|
|
id="confused"></textarea>
|
|
|
<p class="text_num"><span class="text-count">0</span>/1000</p>
|
|
|
</div>
|
|
|
<div class="voice_module" video-id="5">
|
|
|
<div class="voice_list" voiceitemid="2">
|
|
|
<div id="voice_module5" class="voice_module" video-id="5">
|
|
|
<div class="voice_list" voiceitemid="5">
|
|
|
<div class="voice_box voice_third">
|
|
|
<div class="voice_item">
|
|
|
<text class="iconfont icon-luyin voice_icon"></text>
|
|
|
<text class="voice_font luyin">点击图标可播放 时长:10秒</text>
|
|
|
<text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span>秒</text>
|
|
|
</div>
|
|
|
<div class="voice_btn_box">
|
|
|
<text class="iconfont icon-quxiao cancle_voice"></text>
|
|
|
<text class="iconfont icon-tianjia add_voice"></text>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!--<div class="voice_box voice_second">-->
|
|
|
<!--<div class="voice_item">-->
|
|
|
<!--<text class="iconfont icon-luying_ongoing voice_icon"></text>-->
|
|
|
<!--<text class="voice_font luying_ongoing">正在播放 10秒/60秒</text>-->
|
|
|
<!--</div>-->
|
|
|
<!--</div>-->
|
|
|
|
|
|
<div class="voice_box voice_first">
|
|
|
<div class="voice_item">
|
|
|
<text class="iconfont icon-huatong mike voice_icon"></text>
|
...
|
...
|
@@ -267,14 +247,14 @@ |
|
|
</div>
|
|
|
<div>
|
|
|
<div class="weui-uploader__hd">
|
|
|
<p class="title">报告单(最多上传30张)</p>
|
|
|
<p class="title">报告单(最多上传9张)</p>
|
|
|
</div>
|
|
|
<div class="weui-uploader__bd">
|
|
|
<ul class="weui-uploader__files" id="uploaderFiles">
|
|
|
</ul>
|
|
|
<div class="weui-uploader__input-box">
|
|
|
<input id="uploaderInput" class="weui-uploader__input" type="file" accept="image/*"
|
|
|
multiple/>
|
|
|
<div class="weui-uploader__input-box addpic">
|
|
|
<!--<input id="uploaderInput" class="weui-uploader__input" type="file" accept="image/*"-->
|
|
|
<!--multiple/>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -288,8 +268,8 @@ |
|
|
<!--弹窗-->
|
|
|
<div class="box" hidden>
|
|
|
<div class="public_popup_box">
|
|
|
<text>您已签到成功!</text>
|
|
|
<text>恭喜您获得10个积分</text>
|
|
|
<text>提交成功!</text>
|
|
|
<text>等待专家回复</text>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
...
|
...
|
@@ -367,6 +347,7 @@ |
|
|
<!--<script src="__TMPL__/public/assets/js/referral.js"></script>-->
|
|
|
|
|
|
<script>
|
|
|
var serverIds = '';
|
|
|
//文本框显示字数
|
|
|
$(".area").on("input propertychange", function () {
|
|
|
|
...
|
...
|
@@ -466,11 +447,10 @@ |
|
|
|
|
|
|
|
|
//点击
|
|
|
$('.info_item').on('click', '.title', function () {
|
|
|
$('.info_item').on('click','.title',function () {
|
|
|
$(this).parent().toggleClass('voice')
|
|
|
})
|
|
|
|
|
|
|
|
|
//点击正在播放按钮
|
|
|
$('.icon-luying_ongoing').click(function () {
|
|
|
var videolist = $(".voice_module");
|
...
|
...
|
@@ -484,10 +464,10 @@ |
|
|
}
|
|
|
})
|
|
|
|
|
|
|
|
|
var times = "";//倒计时总秒数量
|
|
|
var time = "";
|
|
|
|
|
|
//倒计时
|
|
|
var times = "60";//倒计时总秒数量
|
|
|
var time="";
|
|
|
var timeLength=0;
|
|
|
function countDown(times) {
|
|
|
var timer = null;
|
|
|
timer = setInterval(function () {
|
...
|
...
|
@@ -509,9 +489,10 @@ |
|
|
$('#hour_show').html('<text id="h"></text>' + hour + ':');
|
|
|
$('#minute_show').html('<text></text>' + minute + ':');
|
|
|
$('#second_show').html('<text></text>' + second + '');
|
|
|
$('#second_test').html('<text></text>' + second + '');
|
|
|
|
|
|
//
|
|
|
console.log(day + "天:" + hour + "小时:" + minute + "分钟:" + second + "秒");
|
|
|
// console.log(day + "天:" + hour + "小时:" + minute + "分钟:" + second + "秒");
|
|
|
times--;
|
|
|
|
|
|
}, 1000);
|
...
|
...
|
@@ -522,56 +503,36 @@ |
|
|
$('.pause').click(function () {
|
|
|
// timer(intDiff);
|
|
|
clearInterval(timer);
|
|
|
localStorage.setItem("times", times)
|
|
|
localStorage.setItem("times",times)
|
|
|
})
|
|
|
$('.stop').click(function () {
|
|
|
clearInterval(timer);
|
|
|
times = 0;
|
|
|
times=0;
|
|
|
})
|
|
|
$('.stopping').click(function () {
|
|
|
clearInterval(timer);
|
|
|
timeLength=60-times;
|
|
|
console.log('录音时长:'+timeLength);
|
|
|
localStorage.clear()
|
|
|
})
|
|
|
}
|
|
|
|
|
|
$('.start').click(function () {
|
|
|
time = localStorage.getItem("times")
|
|
|
if (time == null) {
|
|
|
time=localStorage.getItem("times")
|
|
|
if(time==null){
|
|
|
times = parseInt(60)
|
|
|
} else {
|
|
|
times = time;
|
|
|
}else{
|
|
|
times=time;
|
|
|
}
|
|
|
console.log(time)
|
|
|
// myTimer(intDiff);
|
|
|
countDown(times);
|
|
|
localStorage.setItem("times", times)
|
|
|
localStorage.setItem("times",times)
|
|
|
})
|
|
|
|
|
|
|
|
|
//添加一条新语音
|
|
|
var num = 0;
|
|
|
var num = 1;
|
|
|
$('.voice_module').on('click', '.add_voice', function () {
|
|
|
// $('.voice_module').append($('.voice_list').html());
|
|
|
// $('.voice_list .voice_first').show()
|
|
|
// $('.add_icon').show()
|
|
|
|
|
|
|
|
|
// var parent = $(this).parents('.voice_module')
|
|
|
// parent.append($('.temp_list').clone());
|
|
|
|
|
|
|
|
|
// var videolist = $(".voice_module");
|
|
|
// for (var i = 0; i < videolist.length; i++) {
|
|
|
//
|
|
|
// var videoid = $(videolist[i]).attr("video-id");
|
|
|
// if (videoid == title_id) {
|
|
|
// $(videolist[i]).show();
|
|
|
// $(videolist[i]).append($('.voice_list').html());
|
|
|
// $(videolist[i]).children('.voice_list .voice_first').show();
|
|
|
// $('.icon_cancle').show()
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
times = 60
|
|
|
times=60
|
|
|
// clearInterval(timer);
|
|
|
var day = 0,
|
|
|
hour = 0,
|
...
|
...
|
@@ -585,15 +546,15 @@ |
|
|
$('#hour_show').html('<text id="h"></text>' + hour + ':');
|
|
|
$('#minute_show').html('<text></text>' + minute + ':');
|
|
|
$('#second_show').html('<text></text>' + second + '');
|
|
|
|
|
|
$('#second_test').html(60);
|
|
|
|
|
|
num = num + 1
|
|
|
var parent = $(this).parents('.voice_module')
|
|
|
var html = '<div class="voice_list" voiceitemid="' + num + '">\n' +
|
|
|
var html = '<div class="voice_list" voiceitemid="'+num+'">\n' +
|
|
|
'<div class="voice_box voice_third" style="display: none;">\n' +
|
|
|
' <div class="voice_item">\n' +
|
|
|
' <text class="iconfont icon-luyin voice_icon"></text>\n' +
|
|
|
' <text class="voice_font luyin">点击图标可播放 时长:10秒</text>\n' +
|
|
|
' <text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span>秒</text>\n' +
|
|
|
' </div>\n' +
|
|
|
' <div class="voice_btn_box">\n' +
|
|
|
' <text class="iconfont icon-quxiao cancle_voice"></text>\n' +
|
...
|
...
|
@@ -618,7 +579,7 @@ |
|
|
})
|
|
|
|
|
|
//显示弹窗
|
|
|
var videoid = ''
|
|
|
var videoid=''
|
|
|
//生命全局唯一 音频
|
|
|
var voiceBox;
|
|
|
$(document).on("click", ".mike", function () {
|
...
|
...
|
@@ -628,23 +589,48 @@ |
|
|
$('.stopping').hide()
|
|
|
$('.stop').hide()
|
|
|
$('.next_step').hide();
|
|
|
// videoid=$(this).parents(".voice_module").attr("video-id")
|
|
|
|
|
|
// $(this).parents(".voice_first").hide();
|
|
|
// $(this).parents(".voice_first").siblings(".voice_third").show()
|
|
|
//
|
|
|
// // vioceid=$(this).parents(".voice_first").attr("voiceid");
|
|
|
//
|
|
|
|
|
|
voiceBox = $(this).parents('.voice_list');
|
|
|
|
|
|
// console.log(voiceBox)
|
|
|
// $('.submit_voice').attr('videoid')
|
|
|
//
|
|
|
// var videolist = $(".voice_module");
|
|
|
// console.log(videolist)
|
|
|
// for (var i = 0; i < videolist.length; i++) {
|
|
|
// if (videoid == title_id) {
|
|
|
// $(videolist[i]).children(".voice_list").children(".voice_list").hide();
|
|
|
// $(videolist[i]).children(".voice_list").children(".voice_third").show();
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
});
|
|
|
|
|
|
//删除语音
|
|
|
$(".voice_module").on("click", ".cancle_voice", function () {
|
|
|
$(".voice_module").on("click",".cancle_voice",function(){
|
|
|
$(this).parents(".voice_box").remove();
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
//开始录音
|
|
|
var localId;
|
|
|
$('.start').click(function () {
|
|
|
$('.start').hide()
|
|
|
$('.stop').hide()
|
|
|
$('.play').hide()
|
|
|
$('.pause').show()
|
|
|
$('.stopping').show()
|
|
|
$('.next_step').hide()
|
|
|
/*微信开始录音*/
|
|
|
wx.startRecord();
|
|
|
})
|
|
|
|
|
|
//暂停
|
...
|
...
|
@@ -660,58 +646,108 @@ |
|
|
$('.next_step').show()
|
|
|
$('.stop').show()
|
|
|
$('.pause').hide()
|
|
|
wx.stopRecord({
|
|
|
success: function (res) {
|
|
|
localId = res.localId;
|
|
|
}
|
|
|
|
|
|
});
|
|
|
})
|
|
|
|
|
|
//下一步
|
|
|
$('.next_step').click(function () {
|
|
|
$('.first').hide()
|
|
|
$('.second').show()
|
|
|
|
|
|
})
|
|
|
|
|
|
//点击试听
|
|
|
$('.audition').click(function () {
|
|
|
// var videolist = $(".voice_module");
|
|
|
// for (var i = 0; i < videolist.length; i++) {
|
|
|
// var videoid = $(videolist[i]).attr("video-id");
|
|
|
// if (videoid == title_id) {
|
|
|
// $('.second').hide()
|
|
|
// $(videolist[i]).show();
|
|
|
// $(videolist[i]).children('.voice_list').hide()
|
|
|
// $(videolist[i]).children('.voice_third').show();
|
|
|
// }
|
|
|
// }
|
|
|
wx.onVoicePlayEnd({
|
|
|
success: function (res) {
|
|
|
var localId = res.localId; // 返回音频的本地ID
|
|
|
}
|
|
|
});
|
|
|
wx.playVoice({
|
|
|
localId:localId //需要播放的音频的本地ID,由stopRecord接口获得
|
|
|
});
|
|
|
|
|
|
var videolist = $(".voice_module");
|
|
|
for (var i = 0; i < videolist.length; i++) {
|
|
|
var videoid = $(videolist[i]).attr("video-id");
|
|
|
if (videoid == title_id) {
|
|
|
$('.second').hide()
|
|
|
$(videolist[i]).show();
|
|
|
$(videolist[i]).children('.voice_list').hide()
|
|
|
$(videolist[i]).children('.voice_third').show();
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
|
|
|
// 列表中点击试听
|
|
|
$('.voice_third').click(
|
|
|
function () {
|
|
|
var tryId=$(this).attr('try-id');
|
|
|
wx.playVoice({
|
|
|
localId:tryId
|
|
|
});
|
|
|
}
|
|
|
)
|
|
|
|
|
|
//我要发送
|
|
|
$('.submit_voice').click(function () {
|
|
|
|
|
|
// var videolist = $(".voice_module");
|
|
|
// console.log(videolist,videolist.length)
|
|
|
// for (var i = 0; i<videolist.length; i++) {
|
|
|
// videoid = $(videolist[i]).attr("video-id");
|
|
|
// if (videoid == title_id) {
|
|
|
// $('.second').hide()
|
|
|
// $(videolist[i]).children(".voice_list").children('.voice_first').hide()
|
|
|
// $(videolist[i]).children(".voice_list").children('.voice_third').show();
|
|
|
// }
|
|
|
// }
|
|
|
|
|
|
|
|
|
voiceBox.find('.voice_first').hide().siblings('.voice_third').show()
|
|
|
wx.uploadVoice({localId: localId, // 需要上传的音频的本地ID,由stopRecord接口获得
|
|
|
isShowProgressTips: 1, // 默认为1,显示进度提示
|
|
|
success: function (res) {
|
|
|
voiceBox.find('.voice_first').hide().siblings('.voice_third').attr('data-serverid',res.serverId);
|
|
|
}
|
|
|
});
|
|
|
voiceBox.find('.voice_first').hide().siblings('.voice_third').attr('data-try',localId);
|
|
|
voiceBox.find('.voice_first').hide().siblings('.voice_third').attr('data-time',timeLength);
|
|
|
voiceBox.find('.timeLength').html(timeLength);
|
|
|
$('.second').hide()
|
|
|
})
|
|
|
|
|
|
//确认音频
|
|
|
$('.upload').click(function () {
|
|
|
var videolist = $(".voice_module");
|
|
|
for (var i = 0; i < videolist.length; i++) {
|
|
|
var videoid = $(videolist[i]).attr("video-id");
|
|
|
if (videoid == title_id) {
|
|
|
$('.second').hide()
|
|
|
$(videolist[i]).show();
|
|
|
$(videolist[i]).children('.voice_list').hide()
|
|
|
$(videolist[i]).children('.voice_third').show();
|
|
|
/*上面放上 音频id和本地地址*/
|
|
|
$(videolist[i]).children('.voice_third').attr('try-id',localId);
|
|
|
$(videolist[i]).children('.voice_third').data('data-try',localId);
|
|
|
$(videolist[i]).children('.voice_third').attr('id','audio'+videoid);
|
|
|
wx.uploadVoice({
|
|
|
localId: localId, // 需要上传的音频的本地ID,由stopRecord接口获得
|
|
|
isShowProgressTips: 1, // 默认为1,显示进度提示
|
|
|
success: function (res) {
|
|
|
var serverId = res.serverId; // 返回音频的服务器端ID
|
|
|
$(videolist[i]).children('.voice_third').attr('server-id',serverId);
|
|
|
$(videolist[i]).children('.voice_third').data('data-server',serverId);
|
|
|
localId='';
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
//重新录制
|
|
|
$('.rerecord').click(function () {
|
|
|
$('#second_test').html(60);
|
|
|
$('.first').show()
|
|
|
$('.second').hide()
|
|
|
$('.stop').hide()
|
|
|
$('.stopping').hide()
|
|
|
$('.start').show()
|
|
|
$('.start').show()
|
|
|
})
|
|
|
|
|
|
//上传图片
|
|
|
$(function () {
|
|
|
var tmpl = '<li class="weui-uploader__file" style="background-image:url(#url#)"></li>',
|
...
|
...
|
@@ -719,17 +755,13 @@ |
|
|
$uploaderInput = $("#uploaderInput"),
|
|
|
$uploaderFiles = $("#uploaderFiles")
|
|
|
;
|
|
|
|
|
|
$uploaderInput.on("change", function (e) {
|
|
|
// console.log(e)
|
|
|
var src, url = window.URL || window.webkitURL || window.mozURL, files = e.target.files;
|
|
|
for (var i = 0, len = files.length; i < len; ++i) {
|
|
|
var file = files[i];
|
|
|
console.log(url.createObjectURL(file))
|
|
|
|
|
|
if (url) {
|
|
|
src = url.createObjectURL(file);
|
|
|
// var
|
|
|
} else {
|
|
|
src = e.target.result;
|
|
|
}
|
...
|
...
|
@@ -745,10 +777,255 @@ |
|
|
});
|
|
|
});
|
|
|
|
|
|
//上传图片
|
|
|
$('.addpic').on('click', function (res) {
|
|
|
var length = $('.length').length;
|
|
|
if (length >= 9) {
|
|
|
weui.toast('不能上传了')
|
|
|
$('#addpic').hide();
|
|
|
return false;
|
|
|
}
|
|
|
wx.chooseImage({
|
|
|
count: 9 - length, // 默认9
|
|
|
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
|
|
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
|
|
success: function (res) {
|
|
|
console.log(res.localIds);
|
|
|
for (var i = 0; i < res.localIds.length; i++) {
|
|
|
// $('.addpic').before('<img style="width:100px;height:100px;" class="length" src="'+res.localIds[i]+'"/>')
|
|
|
$('.addpic').before('<li class="weui-uploader__file length" src="' + res.localIds[i] + '" style="background-image:url(' + res.localIds[i] + ')"></li>')
|
|
|
}
|
|
|
uploadImages(res.localIds)// 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
|
|
|
}
|
|
|
});
|
|
|
})
|
|
|
|
|
|
|
|
|
function uploadImages(localIds) {
|
|
|
var localId = localIds.pop();
|
|
|
wx.uploadImage({
|
|
|
localId: localId,
|
|
|
isShowProgressTips: 1,
|
|
|
success: function (res) {
|
|
|
var serverId = res.serverId; // 返回图片的服务器端ID
|
|
|
console.log(serverId);
|
|
|
serverIds += serverId + ',';
|
|
|
if (localIds.length > 0) {
|
|
|
uploadImages(localIds);
|
|
|
}
|
|
|
},
|
|
|
fail: function (res) {
|
|
|
$modal.toast(JSON.stringify(res));
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
|
|
|
//提交按钮
|
|
|
// $('.submit').click(function () {
|
|
|
// $('.box').show().delay(2000).hide(2)
|
|
|
// })
|
|
|
$('.submit').click(function () {
|
|
|
var user_name = $('#user_name').val();
|
|
|
var user_sex = $('#user_sex').val();
|
|
|
var user_age = $('#user_age').val();
|
|
|
var user_address = $('#user_address').val();
|
|
|
if (user_name == '') {
|
|
|
$('.form_popup_box').show();
|
|
|
$('.form_popup_box').text('姓名不能为空');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
return false;
|
|
|
} else if (user_sex == '') {
|
|
|
$('.form_popup_box').show();
|
|
|
$('.form_popup_box').text('性别不能为空');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
return false;
|
|
|
} else if (user_age == '') {
|
|
|
$('.form_popup_box').show();
|
|
|
$('.form_popup_box').text('年龄不能为空');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
return false;
|
|
|
} else if (user_address == '') {
|
|
|
$('.form_popup_box').show();
|
|
|
$('.form_popup_box').text('地址不能为空');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
/*获取疾病分类*/
|
|
|
var ill_id=$('.inquiry_value').data('data-id');
|
|
|
if(!ill_id){
|
|
|
weui.toast('疾病分类不能为空!');
|
|
|
return;
|
|
|
}
|
|
|
/*获取问诊专家*/
|
|
|
var expert_id=$('.expert_value').data('data-id');
|
|
|
if(!expert_id){
|
|
|
weui.toast('问诊专家不能为空!');
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
/*获取病人主诉*/
|
|
|
var display1=$('.voice_btn1').css('display');
|
|
|
//console.log(display1);
|
|
|
if (display1=='none'){
|
|
|
var clinical='';
|
|
|
/*判断发送类型*/
|
|
|
var clinical_type='1';
|
|
|
$('#voice_module1 .voice_third').each(function () {
|
|
|
/*拼接信息*/
|
|
|
var voiceId1=$(this).attr('data-serverid');
|
|
|
if (voiceId1!=undefined){
|
|
|
if (clinical==''){
|
|
|
clinical=voiceId1;
|
|
|
}else{
|
|
|
clinical+=','+voiceId1;
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
var clinical=$('.textarea1').val();
|
|
|
var clinical_type='2';
|
|
|
if (!clinical){
|
|
|
weui.toast('临床表现不能为空!');
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/*获取病人主诉*/
|
|
|
var display2=$('.voice_btn2').css('display');
|
|
|
//console.log(display1);
|
|
|
if (display2=='none'){
|
|
|
var inspected='';
|
|
|
/*判断发送类型*/
|
|
|
var inspected_type='1';
|
|
|
$('#voice_module2 .voice_third').each(function () {
|
|
|
/*拼接信息*/
|
|
|
var voiceId1=$(this).attr('data-serverid');
|
|
|
if (voiceId1!=undefined){
|
|
|
if (inspected==''){
|
|
|
inspected=voiceId1;
|
|
|
}else{
|
|
|
inspected+=','+voiceId1;
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
var inspected=$('.textarea1').val();
|
|
|
var inspected_type='2';
|
|
|
if (!inspected){
|
|
|
weui.toast('已做检查不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/*获取目前诊断*/
|
|
|
var display3=$('.voice_btn3').css('display');
|
|
|
if (display3=='none'){
|
|
|
var diagnose_type='1';
|
|
|
var diagnose='';
|
|
|
$('#voice_module3 .voice_third').each(function () {
|
|
|
var voiceId1=$(this).attr('data-serverid');
|
|
|
console.log(voiceId1);
|
|
|
if (voiceId1!=undefined){
|
|
|
if (diagnose==''){
|
|
|
diagnose=voiceId1;
|
|
|
}else{
|
|
|
diagnose+=','+voiceId1;
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
var diagnose=$('.textarea3').val();
|
|
|
var diagnose_type='2';
|
|
|
if (!diagnose){
|
|
|
weui.toast('目前诊断不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/*获取已用药物*/
|
|
|
var display4=$('.voice_btn4').css('display');
|
|
|
if (display4=='none'){
|
|
|
var used_drugs_type='1';
|
|
|
var used_drugs='';
|
|
|
$('#voice_module4 .voice_third').each(function () {
|
|
|
var voiceId1=$(this).attr('data-serverid');
|
|
|
console.log(voiceId1);
|
|
|
if (voiceId1!=undefined){
|
|
|
if (used_drugs==''){
|
|
|
used_drugs=voiceId1;
|
|
|
}else{
|
|
|
used_drugs+=','+voiceId1;
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
var used_drugs=$('.textarea3').val();
|
|
|
var used_drugs_type='2';
|
|
|
if (!used_drugs){
|
|
|
weui.toast('已用药物不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/*获取你的困惑*/
|
|
|
var display5=$('.voice_btn2').css('display');
|
|
|
//console.log(display2);
|
|
|
if (display5=='none'){
|
|
|
var problem_type='1';
|
|
|
var problem='';
|
|
|
$('#voice_module5 .voice_third').each(function () {
|
|
|
var voiceId1=$(this).attr('data-serverid');
|
|
|
console.log(voiceId1);
|
|
|
if (voiceId1!=undefined){
|
|
|
if (problem==''){
|
|
|
problem=voiceId1;
|
|
|
}else{
|
|
|
problem+=','+voiceId1;
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
}else{
|
|
|
var problem=$('.textarea5').val();
|
|
|
var problem_type='5';
|
|
|
if (!problem){
|
|
|
weui.toast('当前困惑不能为空!')
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
/*提交后台*/
|
|
|
$.ajax({
|
|
|
url:"{:url('transferPost')}",
|
|
|
type:'POST',
|
|
|
data:{
|
|
|
name:user_name,
|
|
|
sex:user_sex,
|
|
|
age:user_age,
|
|
|
address:user_address,
|
|
|
ill_id:ill_id,
|
|
|
expert_id:expert_id,
|
|
|
clinical:clinical,
|
|
|
clinical_type:clinical_type,
|
|
|
inspected:inspected,
|
|
|
inspected_type:inspected_type,
|
|
|
diagnose:diagnose,
|
|
|
diagnose_type:diagnose_type,
|
|
|
used_drugs:used_drugs,
|
|
|
used_drugs_type:used_drugs_type,
|
|
|
problem:problem,
|
|
|
problem_type:problem_type,
|
|
|
photos:serverIds
|
|
|
},
|
|
|
success:function (res) {
|
|
|
console.log(res);
|
|
|
alert(res);
|
|
|
$('.box').show().delay(2000).hide(2)
|
|
|
},
|
|
|
error:function (res) {
|
|
|
alert(res);
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
|
|
|
//我要转诊表单判断
|
|
|
$('.referral_btn').click(function () {
|
...
|
...
|
@@ -813,84 +1090,6 @@ |
|
|
}
|
|
|
})
|
|
|
|
|
|
//我要进修表单判断
|
|
|
$('.train_btn').click(function () {
|
|
|
var unit = $('#unit').val()
|
|
|
var user_name = $('#user_name').val()
|
|
|
var profession = $('#profession').val()
|
|
|
var duration = $('#duration').val()
|
|
|
var level = $('#level').val()
|
|
|
var card_num = $('#card_num').val()
|
|
|
var id_card = $('#id_card').val()
|
|
|
var nation = $('#nation').val()
|
|
|
var school = $('#school').val()
|
|
|
var principal = $('#principal').val()
|
|
|
var phone_num = $('#phone_num').val()
|
|
|
var unit_address = $('#unit_address').val()
|
|
|
var job_title = $('#job_title').val()
|
|
|
var need_info = $('#need_info').val()
|
|
|
|
|
|
if (unit == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('单位不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (user_name == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('姓名不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (profession == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('进修专业不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (duration == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('进修时长不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (level == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('文化程度不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (card_num == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('医师资格证号不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (id_card == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('身份证号不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (nation == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('民族不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (school == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('毕业学校不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (principal == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('科室负责人不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (phone_num == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('科室电话不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (unit_address == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('单位地址不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (job_title == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('当前职称不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else if (need_info == '') {
|
|
|
$('.form_popup_box').show()
|
|
|
$('.form_popup_box').text('进修要求不能为空')
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
} else {
|
|
|
$('.box').show().delay(2000).hide(2)
|
|
|
}
|
|
|
})
|
|
|
|
|
|
</script>
|
|
|
</body>
|
|
|
</html> |
|
|
\ No newline at end of file |
...
|
...
|
|