作者 杨育虎
1 个管道 的构建 通过 耗费 1 秒

测试

... ... @@ -14,9 +14,11 @@ use app\user\model\TransferModel;
use app\user\model\UserModel;
use cmf\controller\WeChatBaseController;
use EasyWeChat\Foundation\Application;
use EasyWeChat\Message\Image;
use Qiniu\Auth;
use Qiniu\Storage\UploadManager;
use think\Db;
use think\Log;
class ExpertController extends WeChatBaseController
{
... ... @@ -338,4 +340,16 @@ class ExpertController extends WeChatBaseController
}
}
protected function sendTransferImage($imagePath,$openId){
$config=config('wechat_config');
$app=new Application($config);
$temporary = $app->material_temporary;
$result = $temporary->uploadImage($imagePath);
$mediaId=$result['media_id'];
$text = new Image(['media_id' => $mediaId]);
$result = $app->staff->message($text)->to($openId)->send();
Log::info($result);
}
}
\ No newline at end of file
... ...
... ... @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<title>诊待答</title>
<title>诊待答</title>
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
<link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
... ... @@ -21,13 +21,13 @@
<body STYLE="background: #F5F6FA">
<div class="container">
<div class="tab_content_box top">
<div class="tab_info">诊基本信息</div>
<div class="tab_info">诊基本信息</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">临床表现</div>
<eq name="info.clinical.type" value="1">
<div class="tab_title">病人主述</div>
<eq name="info.patient.type" value="1">
<div class="voice_box" >
<foreach name="info.clinical.dir" item="item">
<foreach name="info.patient.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
... ... @@ -37,34 +37,16 @@
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.clinical.content}</textarea>
<textarea readonly>{$info.patient.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">已做检查</div>
<eq name="info.inspected.type" value="1">
<div class="voice_box" >
<foreach name="info.inspected.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.inspected.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">已用药物</div>
<eq name="info.used_drugs.type" value="1">
<div class="tab_title">初步诊断</div>
<eq name="info.diagnose.type" value="1">
<div class="voice_box" >
<foreach name="info.used_drugs.dir" item="item">
<foreach name="info.diagnose.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
... ... @@ -74,7 +56,7 @@
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.used_drugs.content}</textarea>
<textarea readonly>{$info.diagnose.content}</textarea>
</div>
</eq>
</div>
... ... @@ -109,17 +91,10 @@
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
</div>
</div>
<div class="content_item">
<div class="tab_title">问诊时间</div>
<div>2018.08.30 18:00:00</div>
</div>
<div class="content_item">
<div class="tab_title">咨询时间</div>
<div>{$info.addtime|date='Y.m.d H:i:s',###}</div>
</div>
</div>
... ... @@ -153,14 +128,14 @@
<div class="tab_content_box info_item question_yes">
<div class="tab_info inquiry_content title">
<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_content">
<textarea class="area" type="text" placeholder="请输入" maxlength="1000"></textarea>
<textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea>
<p class="text_num num_box"><span class="text-count">0</span>/1000</p>
</div>
<div class="voice_module agree_box" video-id="1">
<div id="voice_module1" class="voice_module agree_box" video-id="1">
<div class="voice_list" voiceitemid="1">
<div class="voice_box voice_third">
<div class="voice_item">
... ... @@ -185,6 +160,59 @@
</div>
</div>
<notempty name="info.reply">
<!--专家提问显示内容-->
<div class="tab_content_box">
<div class="tab_info">
<text>专家提问</text>
</div>
<div class="user_info_box">
<eq name="info.reply.type" value="1">
<div class="voice_box" >
<foreach name="info.reply.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.reply.content}</textarea>
</div>
</eq>
</div>
</div>
<!--回复专家的内容-->
<div class="tab_content_box">
<div class="tab_info">
<text>回答</text>
</div>
<div class="user_info_box">
<notempty name="info.problem_again">
<eq name="info.problem_again.type" value="1">
<div class="voice_box" >
<foreach name="info.problem_again.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.problem_again.content}</textarea>
</div>
</eq>
<else/>
尚未回答
</notempty>
</div>
</div>
</notempty>
<!--转诊意见内容部分-->
<div class="tab_content_box info_item question_no">
<div class="tab_info inquiry_content title">
... ... @@ -221,28 +249,6 @@
</div>
</div>
<notempty name="info.reply">
<!--专家提问显示内容-->
<div class="tab_content_box">
<div class="tab_info">
<text>专家提问</text>
</div>
<div class="user_info_box">
{$info.reply}
</div>
</div>
<!--回复专家的内容-->
<div class="tab_content_box">
<div class="tab_info">
<text>回答</text>
</div>
<div class="user_info_box">
{$info.problem_again|default='尚未回答'}
</div>
</div>
</notempty>
<!--同意转诊须填表单-->
<div class="tab_content_box question_no">
<div class="tab_content">
... ... @@ -251,19 +257,19 @@
<div class="info_box">
<div class="info_item">
<div class="title">接诊医院</div>
<div class="info_input"><input type="text" placeholder="请填写接诊医院"></div>
<div class="info_input"><input type="text" id="receive_hospital" placeholder="请填写接诊医院"></div>
</div>
<div class="info_item">
<div class="title">转诊专家</div>
<div class="info_input"><input type="text" placeholder="请填写接诊医院"></div>
<div class="info_input"><input type="text" id="receive_expert" placeholder="请填写转诊专家"></div>
</div>
<div class="info_item">
<div class="title">接诊地点</div>
<div class="info_input"><input type="text" placeholder="请填写接诊医院"></div>
<div class="info_input"><input type="text" id="receive_address" placeholder="请填写接诊地点"></div>
</div>
<div class="info_item" id="showDatePicker">
<div class="title">就诊时间</div>
<div class="info_input"><input class="time_value" type="text" placeholder="请填写接诊医院">
<div class="info_input"><input class="time_value" id="receive_time" type="text" placeholder="请选择就诊时间">
<text class="iconfont icon-xiala"></text>
</div>
</div>
... ... @@ -271,26 +277,33 @@
</div>
</div>
</div>
<!--确认回复按钮-->
<div class="agree_btn submit question_yes1">确认回复</div>
<!---->
<div class="bottom_box question_no">
<div class="agree_btn">同意</div>
<div class="bottom_btn">驳回</div>
</div>
<eq name="info.status" value="0">
<!--确认回复按钮-->
<div class="agree_btn submit question_yes1" id="submit_reply">确认回复</div>
<!---->
<div class="bottom_box question_no">
<div class="agree_btn" id="agree_transfer">同意</div>
<div class="bottom_btn">驳回</div>
</div>
</eq>
</div>
<div class="mask_box" hidden>
<div class="mask_box refuse_box" hidden>
<div class="referral_popup_box">
<div>确认驳回</div>
<div class="referral_info">确定驳回转诊吗?</div>
<div class="referral_btn_box">
<div class="btn cancel_btn">取消</div>
<div class="btn confirm_btn">确认</div>
<div class="btn confirm_btn" id="refuse_transfer">确认</div>
</div>
</div>
</div>
<!--表单判断弹窗-->
<div class="form_popup_box" hidden>
<text></text>
</div>
<!--录音弹窗-->
<div class="mask_box first" hidden>
<div class="popup_box">
... ... @@ -364,6 +377,14 @@
<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<!--<script src="__TMPL__/public/assets/js/referral.js"></script>-->
<script>
$('.bottom_btn').click(function () {
$('.refuse_box').show();
});
$('.cancel_btn').click(function () {
$('.refuse_box').hide();
});
wx.config({$sdk});
//文本框显示字数
$(".area").on("input propertychange", function () {
... ... @@ -511,7 +532,7 @@
})
//显示弹窗
var videoid=''
var videoid='';
//生命全局唯一 音频
var voiceBox;
$(document).on("click", ".mike", function () {
... ... @@ -521,34 +542,15 @@
$('.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(){
$(this).parents(".voice_box").remove();
})
});
//开始录音
var localId;
... ... @@ -561,7 +563,7 @@
$('.next_step').hide()
/*微信开始录音*/
wx.startRecord();
})
});
//暂停
$('.pause').click(function () {
... ... @@ -569,6 +571,23 @@
$('.start').show()
$('.stopping').hide()
});
//播放语音
$('.voice_puse').hide()
//var mySound = new Audio('http://suzhou.w.bronet.cn/upload/admin/20181217/a22c54f3354951b1d612569a126480a5.mp3');
$('.voice_play').click(function () {
var url=$(this).data('url');
var mySound = new Audio(url);
mySound.play();
$(this).hide()
$(this).siblings('.voice_puse').show()
$('.voice_puse').click(function () {
mySound.pause();
$(this).hide()
$(this).siblings('.voice_play').show()
})
})
//停止录音
... ... @@ -582,14 +601,14 @@
}
});
})
});
//下一步
$('.next_step').click(function () {
$('.first').hide()
$('.second').show()
$('.first').hide();
$('.second').show();
})
});
//点击试听
$('.audition').click(function () {
... ... @@ -744,8 +763,157 @@
$('.question_no').show();
$(this).attr('data-id',1);
}
})
});
//回复
$('#submit_reply').click(function () {
/*获取病人主诉*/
var display=$('.voice_btn1').css('display');
//console.log(display1);
if (display=='none'){
var reply='';
/*判断发送类型*/
var reply_type='1';
$('#voice_module1 .voice_third').each(function () {
/*拼接信息*/
var voiceId1=$(this).attr('data-serverid');
if (voiceId1!=undefined){
if (reply==''){
reply=voiceId1;
}else{
reply+=','+voiceId1;
}
}
})
}else{
var reply=$('.textarea1').val();
var reply_type='2';
if (!reply){
$('.form_popup_box').show();
$('.form_popup_box').text('回复内容不能为空');
$('.form_popup_box').delay(1000).hide(0);
return;
}
}
alert(JSON.stringify({
reply:reply,
reply_type:reply_type
}))
/*提交后台*/
$.ajax({
url:"{:url('replyTransfer',array('id'=>$info['id']))}",
type:'POST',
data:{
reply:reply,
reply_type:reply_type
},
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
},
error:function (res) {
alert(res);
}
})
});
//同意
$('#agree_transfer').click(function () {
/*获取病人主诉*/
var display2=$('.voice_btn2').css('display');
//console.log(display1);
if (display2=='none'){
var reply_again='';
/*判断发送类型*/
var ireply_again_type='1';
$('#voice_module2 .voice_third').each(function () {
/*拼接信息*/
var voiceId1=$(this).attr('data-serverid');
if (voiceId1!=undefined){
if (reply_again==''){
reply_again=voiceId1;
}else{
reply_again+=','+voiceId1;
}
}
})
}else{
var reply_again=$('.textarea2').val();
var reply_again_type='2';
if (!reply_again){
$('.form_popup_box').show();
$('.form_popup_box').text('转诊意见');
$('.form_popup_box').delay(1000).hide(0);
return;
}
}
var receive_hospital = $('#receive_hospital').val();
var receive_expert = $('#receive_expert').val();
var receive_address = $('#receive_address').val();
var receive_time = $('#receive_time').val();
if (receive_hospital == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写接诊医院');
$('.form_popup_box').delay(1000).hide(0);
return false;
} else if (receive_expert == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写接诊专家');
$('.form_popup_box').delay(1000).hide(0);
return false;
} else if (receive_address == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写接诊地点');
$('.form_popup_box').delay(1000).hide(0);
return false;
} else if (receive_time == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写就诊时间');
$('.form_popup_box').delay(1000).hide(0);
return false;
}
/*提交后台*/
$.ajax({
url:"{:url('agreeTransfer',array('id'=>$info['id']))}",
type:'POST',
data:{
receive_hospital:receive_hospital,
receive_expert:receive_expert,
receive_address:receive_address,
receive_time:receive_time,
reply_again:reply_again,
reply_again_type:reply_again_type
},
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
},
error:function (res) {
alert(res);
}
})
});
//驳回
$('#refuse_transfer').click(function () {
$.ajax({
url:"{:url('refuseTransfer',array('id'=>$info['id']))}",
type:'POST',
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
},
error:function (res) {
alert(res);
}
})
});
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<title>问诊待答</title>
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
<link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_tlxymah92x.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/weui.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/myweui.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/referralModule.css">
<style>
.voice_box{
width: 100%;
}
.question_yes,.question_yes1{display: none;}
</style>
</head>
<body STYLE="background: #F5F6FA">
<div class="container">
<div class="tab_content_box top">
<div class="tab_info">问诊基本信息</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">病人主述</div>
<eq name="info.patient.type" value="1">
<div class="voice_box" >
<foreach name="info.patient.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.patient.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">初步诊断</div>
<eq name="info.diagnose.type" value="1">
<div class="voice_box" >
<foreach name="info.diagnose.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.diagnose.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">当前困惑</div>
<eq name="info.problem.type" value="1">
<div class="voice_box" >
<foreach name="info.problem.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.problem.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">报告单</div>
<div class="referral_img_box">
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
<div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div>
</div>
</div>
<div class="content_item">
<div class="tab_title">问诊时间</div>
<div>{$info.addtime|date='Y.m.d H:i:s',###}</div>
</div>
</div>
</div>
<div class="tab_content_box">
<div class="tab_info">转诊基本信息</div>
<div class="user_info_box title_info" style="justify-content: normal">
<div class="head_box"><img src="{$info.avatar}" alt=""></div>
<div>
<div>姓名:{$info.user_nickname}</div>
<div>电话:{$info.mobile}</div>
<div>医院:{$info.hospital}</div>
<div>科室:{$info.office}</div>
</div>
</div>
</div>
<empty name="info.reply">
<div class="tab_content_box">
<div class="tab_info title_info" id="is_have_question" data-id="1">
<text class="tab_title">若您对转诊信息不明确,请点击发起提问</text>
<text class="iconfont icon-icon02 add_problem"></text>
</div>
</div>
</empty>
<!--提问内容部分-->
<div class="tab_content_box info_item question_yes">
<div class="tab_info inquiry_content title">
<text>提问</text>
<text class="iconfont icon-huatong voice_btn voice_btn1"></text>
<text class="iconfont icon-tianxie"></text>
</div>
<div class="textarea_content">
<textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea>
<p class="text_num num_box"><span class="text-count">0</span>/1000</p>
</div>
<div id="voice_module1" class="voice_module agree_box" 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">点击图标可播放 时长:<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_first" voiceid="1">
<div class="voice_item">
<text class="iconfont icon-huatong mike voice_icon"></text>
<text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao icon_cancle"></text>
</div>
</div>
</div>
</div>
</div>
<notempty name="info.reply">
<!--专家提问显示内容-->
<div class="tab_content_box">
<div class="tab_info">
<text>专家提问</text>
</div>
<div class="user_info_box">
<eq name="info.reply.type" value="1">
<div class="voice_box" >
<foreach name="info.reply.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.reply.content}</textarea>
</div>
</eq>
</div>
</div>
<!--回复专家的内容-->
<div class="tab_content_box">
<div class="tab_info">
<text>回答</text>
</div>
<div class="user_info_box">
<notempty name="info.problem_again">
<eq name="info.problem_again.type" value="1">
<div class="voice_box" >
<foreach name="info.problem_again.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.problem_again.content}</textarea>
</div>
</eq>
<else/>
尚未回答
</notempty>
</div>
</div>
</notempty>
<!--转诊意见内容部分-->
<div class="tab_content_box info_item question_no">
<div class="tab_info inquiry_content title">
<text>转诊意见</text>
<text class="iconfont icon-huatong voice_btn voice_btn2"></text>
<text class="iconfont icon-tianxie"></text>
</div>
<div class="textarea_content">
<textarea class="area textarea2" type="text" placeholder="请输入" maxlength="1000"></textarea>
<p class="text_num num_box"><span class="text-count">0</span>/1000</p>
</div>
<div id="voice_module2" class="voice_module agree_box" 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">点击图标可播放 时长:<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_first" voiceid="2">
<div class="voice_item">
<text class="iconfont icon-huatong mike voice_icon"></text>
<text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao icon_cancle"></text>
</div>
</div>
</div>
</div>
</div>
<!--同意转诊须填表单-->
<div class="tab_content_box question_no">
<div class="tab_content">
<div class="content_item">
<div class="tab_title">接诊信息(同意转诊时需要填写此表单)</div>
<div class="info_box">
<div class="info_item">
<div class="title">接诊医院</div>
<div class="info_input"><input type="text" id="receive_hospital" placeholder="请填写接诊医院"></div>
</div>
<div class="info_item">
<div class="title">转诊专家</div>
<div class="info_input"><input type="text" id="receive_expert" placeholder="请填写转诊专家"></div>
</div>
<div class="info_item">
<div class="title">接诊地点</div>
<div class="info_input"><input type="text" id="receive_address" placeholder="请填写接诊地点"></div>
</div>
<div class="info_item" id="showDatePicker">
<div class="title">就诊时间</div>
<div class="info_input"><input class="time_value" id="receive_time" type="text" placeholder="请选择就诊时间">
<text class="iconfont icon-xiala"></text>
</div>
</div>
</div>
</div>
</div>
</div>
<eq name="info.status" value="0">
<!--确认回复按钮-->
<div class="agree_btn submit question_yes1" id="submit_reply">确认回复</div>
<!---->
<div class="bottom_box question_no">
<div class="agree_btn" id="agree_transfer">同意</div>
<div class="bottom_btn">驳回</div>
</div>
</eq>
</div>
<div class="mask_box refuse_box" hidden>
<div class="referral_popup_box">
<div>确认驳回</div>
<div class="referral_info">确定驳回转诊吗?</div>
<div class="referral_btn_box">
<div class="btn cancel_btn">取消</div>
<div class="btn confirm_btn" id="refuse_transfer">确认</div>
</div>
</div>
</div>
<!--表单判断弹窗-->
<div class="form_popup_box" hidden>
<text></text>
</div>
<!--录音弹窗-->
<div class="mask_box first" hidden>
<div class="popup_box">
<div class="popup_title">录制语音</div>
<div class="popup_time">
<div class="time-item">
<!--<span id="day_show">0天</span>-->
<strong id="hour_show">
<text id="h"></text>
00:</strong>
<strong id="minute_show">
<text></text>
01:</strong>
<strong id="second_show">
<text></text>
00</strong>
</div>
<div class="popup_info">还可以录制 <span id="second_test">5</span></div>
</div>
<div class="popup_btn_box">
<div class="popup_item start ">
<img class="popup_icon" src="__TMPL__/public/assets/images/eicon09@2x.png" alt="">
<div>开始</div>
</div>
<div class="popup_item pause" hidden>
<img class="popup_icon" src="__TMPL__/public/assets/images/eicon13@2x.png" alt="">
<div>暂停</div>
</div>
<div class="popup_item stop" hidden>
<img class="popup_icon" src="__TMPL__/public/assets/images/eicon14@2x.png" alt="">
<div>已停止</div>
</div>
<div class="popup_center play start">
<img src="__TMPL__/public/assets/images/eicon11@2x.png" alt="">
</div>
<div class="popup_center stopping" hidden>
<img src="__TMPL__/public/assets/images/eicon12@2x.png" alt="">
</div>
<div class="popup_item next_step">
<img class="popup_icon" src="__TMPL__/public/assets/images/eicon10@2x.png" alt="">
<div>下一步</div>
</div>
</div>
</div>
</div>
<!---->
<div class="mask_box second" hidden>
<div class="popup_box">
<div class="popup_title">录制语音</div>
<div class="popup_time">
<div class="popup_btn audition">点击试听</div>
<!--<div class="popup_info">时长:4分58秒</div>-->
</div>
<div class="popup_btn_box">
<div class="large_icon rerecord">
<img class="popup_icon " src="__TMPL__/public/assets/images/eicon15@2x.png" alt="">
<div>重新录制</div>
</div>
<div class="large_icon submit_voice">
<img class="popup_icon upload" src="__TMPL__/public/assets/images/eicon16@2x.png" alt="">
<div>我要发送</div>
</div>
</div>
</div>
</div>
<script src="__TMPL__/public/assets/js/jquery-2.1.0.js"></script>
<script src="__TMPL__/public/assets/js/weui.js"></script>
<script src="__TMPL__/public/assets/js/myweui.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<!--<script src="__TMPL__/public/assets/js/referral.js"></script>-->
<script>
$('.bottom_btn').click(function () {
$('.refuse_box').show();
});
$('.cancel_btn').click(function () {
$('.refuse_box').hide();
});
wx.config({$sdk});
//文本框显示字数
$(".area").on("input propertychange", function () {
var $this = $(this),
_val = $this.val(),
count = "";
if (_val.length > 1000) {
$this.val(_val.substring(0, 1000));
}
count = 1000 - $this.val().length;
$(this).siblings(".text_num").children('.text-count').text(count);
});
//点击
$('.info_item').on('click','.title',function () {
$(this).parent().toggleClass('voice')
})
//点击正在播放按钮
$('.icon-luying_ongoing').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) {
$(videolist[i]).show();
$(videolist[i]).children('.voice_second').hide()
$(videolist[i]).children('.voice_third').show();
}
}
})
//倒计时
var times = "60";//倒计时总秒数量
var time="";
var timeLength=0;
function countDown(times) {
var timer = null;
timer = setInterval(function () {
var day = 0,
hour = 0,
minute = 0,
second = 0;//时间默认值
if (times > 0) {
day = Math.floor(times / (60 * 60 * 24));
hour = Math.floor(times / (60 * 60)) - (day * 24);
minute = Math.floor(times / 60) - (day * 24 * 60) - (hour * 60);
second = Math.floor(times) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
}
if (day <= 9) day = '0' + day;
if (hour <= 9) hour = '0' + hour;
if (minute <= 9) minute = '0' + minute;
if (second <= 9) second = '0' + second;
$('#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 + "秒");
times--;
}, 1000);
// if (times <= 0) {
// clearInterval(timer);
// }
$('.pause').click(function () {
// timer(intDiff);
clearInterval(timer);
localStorage.setItem("times",times)
})
$('.stop').click(function () {
clearInterval(timer);
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){
times = parseInt(60)
}else{
times=time;
}
console.log(time)
// myTimer(intDiff);
countDown(times);
localStorage.setItem("times",times)
})
//添加一条新语音
var num = 1;
$('.voice_module').on('click', '.add_voice', function () {
times=60
// clearInterval(timer);
var day = 0,
hour = 0,
minute = 0,
second = 0;//时间默认值
if (day <= 9) day = '0' + day;
if (hour <= 9) hour = '0' + hour;
if (minute <= 9) minute = '0' + minute;
if (second <= 9) second = '0' + second;
$('#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' +
'<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">点击图标可播放 时长:<span class="timeLength">0</span>秒</text>\n' +
' </div>\n' +
' <div class="voice_btn_box">\n' +
' <text class="iconfont icon-quxiao cancle_voice"></text>\n' +
// ' <text class="iconfont icon-tianjia add_voice"></text>\n' +
' </div>\n' +
' </div>\n' +
' <div class="voice_box voice_first">\n' +
' <div class="voice_item">\n' +
' <text class="iconfont icon-huatong mike voice_icon"></text>\n' +
' <text class="voice_font huatong">点击图标开始语音语音最长60秒</text>\n' +
' </div>\n' +
' <div class="voice_btn_box">\n' +
' <text class="iconfont icon-quxiao icon_cancle cancle_voice"></text>\n' +
' </div>\n' +
' </div>\n' +
'</div>'
// parent.append($('.voice_list').html());
parent.append(html)
})
//显示弹窗
var videoid='';
//生命全局唯一 音频
var voiceBox;
$(document).on("click", ".mike", function () {
$('.first').show()
$('.play').show()
$('.start').show()
$('.stopping').hide()
$('.stop').hide()
$('.next_step').hide();
voiceBox = $(this).parents('.voice_list');
});
//删除语音
$(".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();
});
//暂停
$('.pause').click(function () {
$('.pause').hide()
$('.start').show()
$('.stopping').hide()
});
//播放语音
$('.voice_puse').hide()
//var mySound = new Audio('http://suzhou.w.bronet.cn/upload/admin/20181217/a22c54f3354951b1d612569a126480a5.mp3');
$('.voice_play').click(function () {
var url=$(this).data('url');
var mySound = new Audio(url);
mySound.play();
$(this).hide()
$(this).siblings('.voice_puse').show()
$('.voice_puse').click(function () {
mySound.pause();
$(this).hide()
$(this).siblings('.voice_play').show()
})
})
//停止录音
$('.stopping').click(function () {
$('.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 () {
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
});
}
)
//就诊时间
$('#showDatePicker').on('click', function () {
weui.datePicker({
start: 2019,
end: new Date().getFullYear(),
onChange: function (result) {
console.log(result);
},
onConfirm: function (result) {
console.log(result[0].label+' - '+result[1].label+' - '+result[2].label)
$('.time_value').val(result[0].value+' - '+result[1].value+' - '+result[2].value)
}
});
});
//语音模块
$('.voice_third').hide()
$('.icon_cancle').hide()
var title_id = ''
//我要发送
$('.submit_voice').click(function () {
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()
})
//上传图片
$(function () {
var tmpl = '<li class="weui-uploader__file" style="background-image:url(#url#)"></li>',
$gallery = $("#gallery"), $galleryImg = $("#galleryImg"),
$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;
}
$uploaderFiles.append($(tmpl.replace('#url#', src)));
}
});
$uploaderFiles.on("click", "li", function () {
$galleryImg.attr("style", this.getAttribute("style"));
$gallery.fadeIn(100);
});
$gallery.on("click", function () {
$gallery.fadeOut(100);
});
});
$('#is_have_question').click(function () {
var data=$(this).attr('data-id');
if(data==1){
$('.question_yes').show();
$('.question_yes1').css('display','flex');
$('.question_no').hide();
$(this).attr('data-id',2);
}else{
$('.question_yes').hide();
$('.question_yes1').hide();
$('.question_no').show();
$(this).attr('data-id',1);
}
});
//回复
$('#submit_reply').click(function () {
/*获取病人主诉*/
var display=$('.voice_btn1').css('display');
//console.log(display1);
if (display=='none'){
var reply='';
/*判断发送类型*/
var reply_type='1';
$('#voice_module1 .voice_third').each(function () {
/*拼接信息*/
var voiceId1=$(this).attr('data-serverid');
if (voiceId1!=undefined){
if (reply==''){
reply=voiceId1;
}else{
reply+=','+voiceId1;
}
}
})
}else{
var reply=$('.textarea1').val();
var reply_type='2';
if (!reply){
$('.form_popup_box').show();
$('.form_popup_box').text('回复内容不能为空');
$('.form_popup_box').delay(1000).hide(0);
return;
}
}
alert(JSON.stringify({
reply:reply,
reply_type:reply_type
}))
/*提交后台*/
$.ajax({
url:"{:url('replyTransfer',array('id'=>$info['id']))}",
type:'POST',
data:{
reply:reply,
reply_type:reply_type
},
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
},
error:function (res) {
alert(res);
}
})
});
//同意
$('#agree_transfer').click(function () {
/*获取病人主诉*/
var display2=$('.voice_btn2').css('display');
//console.log(display1);
if (display2=='none'){
var reply_again='';
/*判断发送类型*/
var ireply_again_type='1';
$('#voice_module2 .voice_third').each(function () {
/*拼接信息*/
var voiceId1=$(this).attr('data-serverid');
if (voiceId1!=undefined){
if (reply_again==''){
reply_again=voiceId1;
}else{
reply_again+=','+voiceId1;
}
}
})
}else{
var reply_again=$('.textarea2').val();
var reply_again_type='2';
if (!reply_again){
$('.form_popup_box').show();
$('.form_popup_box').text('转诊意见');
$('.form_popup_box').delay(1000).hide(0);
return;
}
}
var receive_hospital = $('#receive_hospital').val();
var receive_expert = $('#receive_expert').val();
var receive_address = $('#receive_address').val();
var receive_time = $('#receive_time').val();
if (receive_hospital == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写接诊医院');
$('.form_popup_box').delay(1000).hide(0);
return false;
} else if (receive_expert == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写接诊专家');
$('.form_popup_box').delay(1000).hide(0);
return false;
} else if (receive_address == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写接诊地点');
$('.form_popup_box').delay(1000).hide(0);
return false;
} else if (receive_time == '') {
$('.form_popup_box').show();
$('.form_popup_box').text('请填写就诊时间');
$('.form_popup_box').delay(1000).hide(0);
return false;
}
/*提交后台*/
$.ajax({
url:"{:url('agreeTransfer',array('id'=>$info['id']))}",
type:'POST',
data:{
receive_hospital:receive_hospital,
receive_expert:receive_expert,
receive_address:receive_address,
receive_time:receive_time,
reply_again:reply_again,
reply_again_type:reply_again_type
},
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
},
error:function (res) {
alert(res);
}
})
});
//驳回
$('#refuse_transfer').click(function () {
$.ajax({
url:"{:url('refuseTransfer',array('id'=>$info['id']))}",
type:'POST',
success:function (res) {
console.log(res);
alert(JSON.stringify(res));
$('.box').show().delay(2000).hide(2)
},
error:function (res) {
alert(res);
}
})
});
</script>
</body>
</html>
\ No newline at end of file
... ...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<title>转诊待答</title>
<script src="__TMPL__/public/assets/js/fontsize.js"></script>
<link rel="stylesheet" href="__TMPL__/public/assets/css/init.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css">
<link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_tlxymah92x.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/weui.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/myweui.css">
<link rel="stylesheet" href="__TMPL__/public/assets/css/referralModule.css">
<style>
.voice_box{
width: 100%;
}
.question_yes,.question_yes1{display: none;}
</style>
</head>
<body STYLE="background: #F5F6FA">
<div class="container">
<div class="tab_content_box top">
<div class="tab_info">转诊基本信息</div>
<div class="tab_content">
<div class="content_item">
<div class="tab_title">临床表现</div>
<eq name="info.clinical.type" value="1">
<div class="voice_box" >
<foreach name="info.clinical.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.clinical.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">已做检查</div>
<eq name="info.inspected.type" value="1">
<div class="voice_box" >
<foreach name="info.inspected.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.inspected.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">已用药物</div>
<eq name="info.used_drugs.type" value="1">
<div class="voice_box" >
<foreach name="info.used_drugs.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.used_drugs.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">当前困惑</div>
<eq name="info.problem.type" value="1">
<div class="voice_box" >
<foreach name="info.problem.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.problem.content}</textarea>
</div>
</eq>
</div>
<div class="content_item">
<div class="tab_title">咨询时间</div>
<div>{$info.addtime|date='Y.m.d H:i:s',###}</div>
</div>
</div>
</div>
<div class="tab_content_box">
<div class="tab_info">转诊基本信息</div>
<div class="user_info_box title_info" style="justify-content: normal">
<div class="head_box"><img src="{$info.avatar}" alt=""></div>
<div>
<div>姓名:{$info.user_nickname}</div>
<div>电话:{$info.mobile}</div>
<div>医院:{$info.hospital}</div>
<div>科室:{$info.office}</div>
</div>
</div>
</div>
<!--提问内容部分-->
<div class="tab_content_box info_item question_yes">
<div class="tab_info inquiry_content title">
<text>提问</text>
<text class="iconfont icon-huatong voice_btn voice_btn1"></text>
<text class="iconfont icon-tianxie"></text>
</div>
<div class="textarea_content">
<textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea>
<p class="text_num num_box"><span class="text-count">0</span>/1000</p>
</div>
<div id="voice_module1" class="voice_module agree_box" 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">点击图标可播放 时长:<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_first" voiceid="1">
<div class="voice_item">
<text class="iconfont icon-huatong mike voice_icon"></text>
<text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao icon_cancle"></text>
</div>
</div>
</div>
</div>
</div>
<notempty name="info.reply">
<!--专家提问显示内容-->
<div class="tab_content_box">
<div class="tab_info">
<text>专家提问</text>
</div>
<div class="user_info_box">
<eq name="info.reply.type" value="1">
<div class="voice_box" >
<foreach name="info.reply.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.reply.content}</textarea>
</div>
</eq>
</div>
</div>
<!--回复专家的内容-->
<div class="tab_content_box">
<div class="tab_info">
<text>回答</text>
</div>
<div class="user_info_box">
<notempty name="info.problem_again">
<eq name="info.problem_again.type" value="1">
<div class="voice_box" >
<foreach name="info.problem_again.dir" item="item">
<div class="voice_item">
<text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text>
<text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text>
<text class="voice_font">点击图标开始播放</text>
</div>
</foreach>
</div>
<else/>
<div class="tab_textarea">
<textarea readonly>{$info.problem_again.content}</textarea>
</div>
</eq>
<else/>
尚未回答
</notempty>
</div>
</div>
</notempty>
<!--转诊意见内容部分-->
<div class="tab_content_box info_item question_no">
<div class="tab_info inquiry_content title">
<text>转诊意见</text>
<text class="iconfont icon-huatong voice_btn voice_btn2"></text>
<text class="iconfont icon-tianxie"></text>
</div>
<div class="textarea_content">
<textarea class="area textarea2" type="text" placeholder="请输入" maxlength="1000"></textarea>
<p class="text_num num_box"><span class="text-count">0</span>/1000</p>
</div>
<div id="voice_module2" class="voice_module agree_box" 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">点击图标可播放 时长:<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_first" voiceid="2">
<div class="voice_item">
<text class="iconfont icon-huatong mike voice_icon"></text>
<text class="voice_font huatong">点击图标开始语音语音最长60秒</text>
</div>
<div class="voice_btn_box">
<text class="iconfont icon-quxiao icon_cancle"></text>
</div>
</div>
</div>
</div>
</div>
<!--同意转诊须填表单-->
<div class="tab_content_box question_no">
<div class="tab_content">
<div class="content_item">
<div class="tab_title">接诊信息(同意转诊时需要填写此表单)</div>
<div class="info_box">
<div class="info_item">
<div class="title">接诊医院</div>
<div class="info_input"><input type="text" id="receive_hospital" value="{$info.receive_hospital}"></div>
</div>
<div class="info_item">
<div class="title">转诊专家</div>
<div class="info_input"><input type="text" id="receive_expert" value="{$info.receive_expert}"></div>
</div>
<div class="info_item">
<div class="title">接诊地点</div>
<div class="info_input"><input type="text" id="receive_address" value="{$info.receive_address}"></div>
</div>
<div class="info_item" id="showDatePicker">
<div class="title">就诊时间</div>
<div class="info_input"><input class="time_value" id="receive_time" type="text" value="{$info.receive_time}">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="mask_box refuse_box" hidden>
<div class="referral_popup_box">
<div>确认驳回</div>
<div class="referral_info">确定驳回转诊吗?</div>
<div class="referral_btn_box">
<div class="btn cancel_btn">取消</div>
<div class="btn confirm_btn" id="refuse_transfer">确认</div>
</div>
</div>
</div>
<script src="__TMPL__/public/assets/js/jquery-2.1.0.js"></script>
<script src="__TMPL__/public/assets/js/weui.js"></script>
<script src="__TMPL__/public/assets/js/myweui.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<!--<script src="__TMPL__/public/assets/js/referral.js"></script>-->
<script>
$('.bottom_btn').click(function () {
$('.refuse_box').show();
});
$('.cancel_btn').click(function () {
$('.refuse_box').hide();
});
//文本框显示字数
$(".area").on("input propertychange", function () {
var $this = $(this),
_val = $this.val(),
count = "";
if (_val.length > 1000) {
$this.val(_val.substring(0, 1000));
}
count = 1000 - $this.val().length;
$(this).siblings(".text_num").children('.text-count').text(count);
});
//点击
$('.info_item').on('click','.title',function () {
$(this).parent().toggleClass('voice')
})
//点击正在播放按钮
$('.icon-luying_ongoing').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) {
$(videolist[i]).show();
$(videolist[i]).children('.voice_second').hide()
$(videolist[i]).children('.voice_third').show();
}
}
})
//播放语音
$('.voice_puse').hide()
//var mySound = new Audio('http://suzhou.w.bronet.cn/upload/admin/20181217/a22c54f3354951b1d612569a126480a5.mp3');
$('.voice_play').click(function () {
var url=$(this).data('url');
var mySound = new Audio(url);
mySound.play();
$(this).hide()
$(this).siblings('.voice_puse').show()
$('.voice_puse').click(function () {
mySound.pause();
$(this).hide()
$(this).siblings('.voice_play').show()
})
})
</script>
</body>
</html>
\ No newline at end of file
... ...