1 个管道
的构建
通过
耗费
2 秒
Merge remote-tracking branch 'origin/master'
正在显示
10 个修改的文件
包含
2028 行增加
和
167 行删除
@@ -14,7 +14,11 @@ use app\user\model\TransferModel; | @@ -14,7 +14,11 @@ use app\user\model\TransferModel; | ||
14 | use app\user\model\UserModel; | 14 | use app\user\model\UserModel; |
15 | use cmf\controller\WeChatBaseController; | 15 | use cmf\controller\WeChatBaseController; |
16 | use EasyWeChat\Foundation\Application; | 16 | use EasyWeChat\Foundation\Application; |
17 | +use EasyWeChat\Message\Image; | ||
18 | +use Qiniu\Auth; | ||
19 | +use Qiniu\Storage\UploadManager; | ||
17 | use think\Db; | 20 | use think\Db; |
21 | +use think\Log; | ||
18 | 22 | ||
19 | class ExpertController extends WeChatBaseController | 23 | class ExpertController extends WeChatBaseController |
20 | { | 24 | { |
@@ -153,4 +157,199 @@ class ExpertController extends WeChatBaseController | @@ -153,4 +157,199 @@ class ExpertController extends WeChatBaseController | ||
153 | 157 | ||
154 | return $this->fetch(); | 158 | return $this->fetch(); |
155 | } | 159 | } |
160 | + | ||
161 | + /** | ||
162 | + * 转诊疑问 | ||
163 | + */ | ||
164 | + public function replyTransfer(){ | ||
165 | + $data=$this->request->param(); | ||
166 | + $update['reply']=$this->getSaveContent($data,'reply'); | ||
167 | + $update['id']=$data['id']; | ||
168 | + $model=new TransferModel(); | ||
169 | + $model->adminEdit($update); | ||
170 | + | ||
171 | + //todo 生成卡片 | ||
172 | + $this->success('提交成功','',$model->getLastSql()); | ||
173 | + } | ||
174 | + | ||
175 | + /** | ||
176 | + * 同意转诊 | ||
177 | + */ | ||
178 | + public function agreeTransfer(){ | ||
179 | + $data=$this->request->param(); | ||
180 | + $update['reply_again']=$this->getSaveContent($data,'reply_again'); | ||
181 | + $update['id']=$data['id']; | ||
182 | + $update['receive_hospital']=$data['receive_hospital']; | ||
183 | + $update['receive_expert']=$data['receive_expert']; | ||
184 | + $update['receive_address']=$data['receive_address']; | ||
185 | + $update['receive_time']=strtotime($data['receive_time']); | ||
186 | + $update['status']=1; | ||
187 | + $model=new TransferModel(); | ||
188 | + $model->adminEdit($update); | ||
189 | + | ||
190 | + //todo 生成卡片 | ||
191 | + $this->success(''); | ||
192 | + } | ||
193 | + | ||
194 | + /** | ||
195 | + * 驳回转诊 | ||
196 | + */ | ||
197 | + public function refuseTransfer(){ | ||
198 | + $id=$this->request->param('id'); | ||
199 | + $model=new TransferModel(); | ||
200 | + $row=$model->where(['id'=>$id])->setField('status',2); | ||
201 | + if($row){ | ||
202 | + $this->success('驳回成功'); | ||
203 | + }else{ | ||
204 | + $this->error('驳回失败'); | ||
205 | + } | ||
206 | + } | ||
207 | + | ||
208 | + | ||
209 | + | ||
210 | + | ||
211 | + | ||
212 | + | ||
213 | + | ||
214 | + /** | ||
215 | + * 内容处理 | ||
216 | + * @param $input | ||
217 | + * @param $name | ||
218 | + * @return mixed | ||
219 | + */ | ||
220 | + protected function getSaveContent($input,$name){ | ||
221 | + | ||
222 | + $return['type']=$input[$name.'_type']; | ||
223 | + if ($return['type']==1){ | ||
224 | + $return['content']=explode(',',$input[$name]); | ||
225 | + $dir=[]; | ||
226 | + foreach ($return['content'] as $k=>$v) { | ||
227 | + $dir[$k]=$this->saveWxVoice($v); | ||
228 | + } | ||
229 | + $return['dir']=$dir; | ||
230 | + }else{ | ||
231 | + $return['content']=$input[$name]; | ||
232 | + } | ||
233 | + return $return; | ||
234 | + } | ||
235 | + | ||
236 | + /** | ||
237 | + * 获取微信语音到本地 | ||
238 | + * @param $audioID | ||
239 | + */ | ||
240 | + protected function saveWxVoice($mediaId){ | ||
241 | + $config=config('wechat_config'); | ||
242 | + $Wechat=new Application($config); | ||
243 | + $temporary = $Wechat->material_temporary; | ||
244 | + $dir=ROOT_PATH.'public/'.'upload/inquery'.'/'; | ||
245 | + $name=date('YmdHis',time()).rand(1000,9999); | ||
246 | + $file=$name.'.amr'; | ||
247 | + $data=$temporary->download($mediaId,"$dir", "$file"); | ||
248 | + $filePath=$dir.$file; | ||
249 | + | ||
250 | + $result=$this->upChange($filePath,$name); | ||
251 | + if($result['err']==0){ | ||
252 | + return $result['data']; | ||
253 | + }else{ | ||
254 | + $this->error($result['msg']); | ||
255 | + } | ||
256 | + } | ||
257 | + | ||
258 | + /** | ||
259 | + * 录音文件amr转mp3 | ||
260 | + * @param $filePath 文件绝对路径 | ||
261 | + * @param $name 文件名不含后缀 | ||
262 | + * @return mixed | ||
263 | + */ | ||
264 | + protected function upChange($filePath,$name){ | ||
265 | + | ||
266 | + //转码时使用的队列名称 | ||
267 | + $pipeline = 'jyht_list'; | ||
268 | + | ||
269 | + //要进行转码的转码操作 | ||
270 | + $fops = "avthumb/mp3/ab/320k/ar/44100/acodec/libmp3lame"; | ||
271 | + | ||
272 | + //可以对转码后的文件进行使用saveas参数自定义命名,当然也可以不指定文件会默认命名并保存在当间 | ||
273 | + $savekey = \Qiniu\base64_urlSafeEncode("jyht:$name.mp3");//目标Bucket_Name:自定义文件key | ||
274 | + $fops = $fops.'|saveas/'.$savekey; | ||
275 | + | ||
276 | + $policy = array( | ||
277 | + 'persistentOps' => $fops, | ||
278 | + 'persistentPipeline' => $pipeline | ||
279 | + ); | ||
280 | + $key = "$name.mp3"; | ||
281 | + $ret=$this->uploadToQiniu($filePath,$key,$policy); | ||
282 | + return $ret; | ||
283 | + } | ||
284 | + | ||
285 | + /** | ||
286 | + * @return mixed | ||
287 | + * @throws \EasyWeChat\Core\Exceptions\InvalidArgumentException | ||
288 | + */ | ||
289 | + public function upload_wx_pic_mul($mediaId) | ||
290 | + { | ||
291 | + $config=config('wechat_config'); | ||
292 | + $Wechat=new Application($config); | ||
293 | + $temporary = $Wechat->material_temporary; | ||
294 | + $dir=ROOT_PATH.'public/'.'upload/friend'.'/'; | ||
295 | + $name=date('YmdHis',time()).rand(1000,9999).'.jpg'; | ||
296 | + $data=$temporary->download($mediaId,"$dir", "$name"); | ||
297 | + $filePath=$dir.$name; | ||
298 | + $result=$this->uploadToQiniu($filePath,$name); | ||
299 | + if($result['err']===0){ | ||
300 | + return $result['data']; | ||
301 | + }else{ | ||
302 | + $this->error($result['msg']); | ||
303 | + } | ||
304 | + return $data; | ||
305 | + } | ||
306 | + | ||
307 | + /** | ||
308 | + * @param $filePath | ||
309 | + * @param $save_name | ||
310 | + * @param $policy | ||
311 | + * @return array | ||
312 | + */ | ||
313 | + protected function uploadToQiniu($filePath,$save_name,$policy=null){ | ||
314 | + $plugin=Db::name('plugin')->field('config')->where(['name'=>'Qiniu'])->find(); | ||
315 | + $config=json_decode($plugin['config'],true); | ||
316 | + | ||
317 | + // 上传到七牛后保存的文件名 | ||
318 | + $key =$save_name; | ||
319 | + | ||
320 | + require_once VENDOR_PATH . 'qiniu/php-sdk/autoload.php'; | ||
321 | + | ||
322 | + // 需要填写你的 Access Key 和 Secret Key | ||
323 | + $accessKey = $config['accessKey']; | ||
324 | + $secretKey = $config['secretKey']; | ||
325 | + // 构建鉴权对象 | ||
326 | + $auth = new Auth($accessKey,$secretKey); | ||
327 | + // 要上传的空间 | ||
328 | + $bucket = $config['bucket']; | ||
329 | + $token = $auth->uploadToken($bucket, null, 3600, $policy); | ||
330 | + // 初始化 UploadManager 对象并进行文件的上传 | ||
331 | + $uploadMgr = new UploadManager(); | ||
332 | + // 调用 UploadManager 的 putFile 方法进行文件的上传 | ||
333 | + list($ret, $err) = $uploadMgr->putFile($token, $key, $filePath); | ||
334 | + | ||
335 | + if ($err !== null) { | ||
336 | + return ["err"=>1,"msg"=>$err,"data"=>""]; | ||
337 | + } else { | ||
338 | + //unlink($filePath); | ||
339 | + return ["err"=>0,"msg"=>"上传完成","data"=>cmf_get_asset_url($ret['key'])]; | ||
340 | + } | ||
341 | + } | ||
342 | + | ||
343 | + protected function sendTransferImage($imagePath,$openId){ | ||
344 | + $config=config('wechat_config'); | ||
345 | + $app=new Application($config); | ||
346 | + $temporary = $app->material_temporary; | ||
347 | + $result = $temporary->uploadImage($imagePath); | ||
348 | + $mediaId=$result['media_id']; | ||
349 | + $text = new Image(['media_id' => $mediaId]); | ||
350 | + $result = $app->staff->message($text)->to($openId)->send(); | ||
351 | + Log::info($result); | ||
352 | + } | ||
353 | + | ||
354 | + | ||
156 | } | 355 | } |
@@ -488,7 +488,7 @@ class IndexController extends HomeBaseController | @@ -488,7 +488,7 @@ class IndexController extends HomeBaseController | ||
488 | $fops = "avthumb/mp3/ab/320k/ar/44100/acodec/libmp3lame"; | 488 | $fops = "avthumb/mp3/ab/320k/ar/44100/acodec/libmp3lame"; |
489 | 489 | ||
490 | //可以对转码后的文件进行使用saveas参数自定义命名,当然也可以不指定文件会默认命名并保存在当间 | 490 | //可以对转码后的文件进行使用saveas参数自定义命名,当然也可以不指定文件会默认命名并保存在当间 |
491 | - $savekey = \Qiniu\base64_urlSafeEncode("jyht_list:$name.mp3"); | 491 | + $savekey = \Qiniu\base64_urlSafeEncode("jyht:$name.mp3");//目标Bucket_Name:自定义文件key |
492 | $fops = $fops.'|saveas/'.$savekey; | 492 | $fops = $fops.'|saveas/'.$savekey; |
493 | 493 | ||
494 | $policy = array( | 494 | $policy = array( |
@@ -21,7 +21,10 @@ class TransferModel extends Model | @@ -21,7 +21,10 @@ class TransferModel extends Model | ||
21 | 'inspected' => 'array', | 21 | 'inspected' => 'array', |
22 | 'diagnose' => 'array', | 22 | 'diagnose' => 'array', |
23 | 'used_drugs' => 'array', | 23 | 'used_drugs' => 'array', |
24 | - 'problem' => 'array' | 24 | + 'problem' => 'array', |
25 | + 'reply' => 'array', | ||
26 | + 'problem_again' => 'array', | ||
27 | + 'reply_again' => 'array', | ||
25 | ]; | 28 | ]; |
26 | 29 | ||
27 | /** | 30 | /** |
public/static/images/transfer_card.png
0 → 100644
118.9 KB
@@ -332,12 +332,19 @@ | @@ -332,12 +332,19 @@ | ||
332 | color: #1A9D89; | 332 | color: #1A9D89; |
333 | margin-right: 0.15rem; | 333 | margin-right: 0.15rem; |
334 | } | 334 | } |
335 | +.referral_img_box{ | ||
336 | + display: flex; | ||
337 | + align-items: center; | ||
338 | + justify-content: space-between; | ||
339 | + flex-wrap: wrap; | ||
340 | +} | ||
335 | .referral_img{ | 341 | .referral_img{ |
336 | width: 2rem; | 342 | width: 2rem; |
337 | height: 2rem; | 343 | height: 2rem; |
338 | display: flex; | 344 | display: flex; |
339 | align-items: center; | 345 | align-items: center; |
340 | justify-content: center; | 346 | justify-content: center; |
347 | + margin-bottom: 0.3rem; | ||
341 | } | 348 | } |
342 | .referral_img img{ | 349 | .referral_img img{ |
343 | width: 100%; | 350 | width: 100%; |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <head> | 3 | <head> |
4 | <meta charset="UTF-8"> | 4 | <meta charset="UTF-8"> |
5 | <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no"> | 5 | <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no"> |
6 | - <title>转诊待答</title> | 6 | + <title>问诊待答</title> |
7 | <script src="__TMPL__/public/assets/js/fontsize.js"></script> | 7 | <script src="__TMPL__/public/assets/js/fontsize.js"></script> |
8 | <link rel="stylesheet" href="__TMPL__/public/assets/css/init.css"> | 8 | <link rel="stylesheet" href="__TMPL__/public/assets/css/init.css"> |
9 | <link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css"> | 9 | <link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css"> |
@@ -21,13 +21,13 @@ | @@ -21,13 +21,13 @@ | ||
21 | <body STYLE="background: #F5F6FA"> | 21 | <body STYLE="background: #F5F6FA"> |
22 | <div class="container"> | 22 | <div class="container"> |
23 | <div class="tab_content_box top"> | 23 | <div class="tab_content_box top"> |
24 | - <div class="tab_info">转诊基本信息</div> | 24 | + <div class="tab_info">问诊基本信息</div> |
25 | <div class="tab_content"> | 25 | <div class="tab_content"> |
26 | <div class="content_item"> | 26 | <div class="content_item"> |
27 | - <div class="tab_title">临床表现</div> | ||
28 | - <eq name="info.clinical.type" value="1"> | 27 | + <div class="tab_title">病人主述</div> |
28 | + <eq name="info.patient.type" value="1"> | ||
29 | <div class="voice_box" > | 29 | <div class="voice_box" > |
30 | - <foreach name="info.clinical.dir" item="item"> | 30 | + <foreach name="info.patient.dir" item="item"> |
31 | <div class="voice_item"> | 31 | <div class="voice_item"> |
32 | <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | 32 | <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> |
33 | <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | 33 | <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> |
@@ -37,16 +37,16 @@ | @@ -37,16 +37,16 @@ | ||
37 | </div> | 37 | </div> |
38 | <else/> | 38 | <else/> |
39 | <div class="tab_textarea"> | 39 | <div class="tab_textarea"> |
40 | - <textarea readonly>{$info.clinical.content}</textarea> | 40 | + <textarea readonly>{$info.patient.content}</textarea> |
41 | </div> | 41 | </div> |
42 | </eq> | 42 | </eq> |
43 | </div> | 43 | </div> |
44 | 44 | ||
45 | <div class="content_item"> | 45 | <div class="content_item"> |
46 | - <div class="tab_title">已做检查</div> | ||
47 | - <eq name="info.inspected.type" value="1"> | 46 | + <div class="tab_title">初步诊断</div> |
47 | + <eq name="info.diagnose.type" value="1"> | ||
48 | <div class="voice_box" > | 48 | <div class="voice_box" > |
49 | - <foreach name="info.inspected.dir" item="item"> | 49 | + <foreach name="info.diagnose.dir" item="item"> |
50 | <div class="voice_item"> | 50 | <div class="voice_item"> |
51 | <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | 51 | <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> |
52 | <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | 52 | <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> |
@@ -56,25 +56,7 @@ | @@ -56,25 +56,7 @@ | ||
56 | </div> | 56 | </div> |
57 | <else/> | 57 | <else/> |
58 | <div class="tab_textarea"> | 58 | <div class="tab_textarea"> |
59 | - <textarea readonly>{$info.inspected.content}</textarea> | ||
60 | - </div> | ||
61 | - </eq> | ||
62 | - </div> | ||
63 | - <div class="content_item"> | ||
64 | - <div class="tab_title">已用药物</div> | ||
65 | - <eq name="info.used_drugs.type" value="1"> | ||
66 | - <div class="voice_box" > | ||
67 | - <foreach name="info.used_drugs.dir" item="item"> | ||
68 | - <div class="voice_item"> | ||
69 | - <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
70 | - <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
71 | - <text class="voice_font">点击图标开始播放</text> | ||
72 | - </div> | ||
73 | - </foreach> | ||
74 | - </div> | ||
75 | - <else/> | ||
76 | - <div class="tab_textarea"> | ||
77 | - <textarea readonly>{$info.used_drugs.content}</textarea> | 59 | + <textarea readonly>{$info.diagnose.content}</textarea> |
78 | </div> | 60 | </div> |
79 | </eq> | 61 | </eq> |
80 | </div> | 62 | </div> |
@@ -96,13 +78,31 @@ | @@ -96,13 +78,31 @@ | ||
96 | </div> | 78 | </div> |
97 | </eq> | 79 | </eq> |
98 | </div> | 80 | </div> |
81 | + | ||
99 | <div class="content_item"> | 82 | <div class="content_item"> |
100 | - <div class="tab_title">咨询时间</div> | 83 | + <div class="tab_title">报告单</div> |
84 | + <div class="referral_img_box"> | ||
85 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
86 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
87 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
88 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
89 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
90 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
91 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
92 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
93 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
94 | + </div> | ||
95 | + </div> | ||
96 | + <div class="content_item"> | ||
97 | + <div class="tab_title">问诊时间</div> | ||
101 | <div>{$info.addtime|date='Y.m.d H:i:s',###}</div> | 98 | <div>{$info.addtime|date='Y.m.d H:i:s',###}</div> |
102 | </div> | 99 | </div> |
103 | - | ||
104 | </div> | 100 | </div> |
105 | </div> | 101 | </div> |
102 | + | ||
103 | + | ||
104 | + | ||
105 | + | ||
106 | <div class="tab_content_box"> | 106 | <div class="tab_content_box"> |
107 | <div class="tab_info">转诊基本信息</div> | 107 | <div class="tab_info">转诊基本信息</div> |
108 | <div class="user_info_box title_info" style="justify-content: normal"> | 108 | <div class="user_info_box title_info" style="justify-content: normal"> |
@@ -128,14 +128,14 @@ | @@ -128,14 +128,14 @@ | ||
128 | <div class="tab_content_box info_item question_yes"> | 128 | <div class="tab_content_box info_item question_yes"> |
129 | <div class="tab_info inquiry_content title"> | 129 | <div class="tab_info inquiry_content title"> |
130 | <text>提问</text> | 130 | <text>提问</text> |
131 | - <text class="iconfont icon-huatong voice_btn"></text> | 131 | + <text class="iconfont icon-huatong voice_btn voice_btn1"></text> |
132 | <text class="iconfont icon-tianxie"></text> | 132 | <text class="iconfont icon-tianxie"></text> |
133 | </div> | 133 | </div> |
134 | <div class="textarea_content"> | 134 | <div class="textarea_content"> |
135 | - <textarea class="area" type="text" placeholder="请输入" maxlength="1000"></textarea> | 135 | + <textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea> |
136 | <p class="text_num num_box"><span class="text-count">0</span>/1000</p> | 136 | <p class="text_num num_box"><span class="text-count">0</span>/1000</p> |
137 | </div> | 137 | </div> |
138 | - <div class="voice_module agree_box" video-id="1"> | 138 | + <div id="voice_module1" class="voice_module agree_box" video-id="1"> |
139 | <div class="voice_list" voiceitemid="1"> | 139 | <div class="voice_list" voiceitemid="1"> |
140 | <div class="voice_box voice_third"> | 140 | <div class="voice_box voice_third"> |
141 | <div class="voice_item"> | 141 | <div class="voice_item"> |
@@ -160,6 +160,59 @@ | @@ -160,6 +160,59 @@ | ||
160 | </div> | 160 | </div> |
161 | </div> | 161 | </div> |
162 | 162 | ||
163 | + <notempty name="info.reply"> | ||
164 | + <!--专家提问显示内容--> | ||
165 | + <div class="tab_content_box"> | ||
166 | + <div class="tab_info"> | ||
167 | + <text>专家提问</text> | ||
168 | + </div> | ||
169 | + <div class="user_info_box"> | ||
170 | + <eq name="info.reply.type" value="1"> | ||
171 | + <div class="voice_box" > | ||
172 | + <foreach name="info.reply.dir" item="item"> | ||
173 | + <div class="voice_item"> | ||
174 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
175 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
176 | + <text class="voice_font">点击图标开始播放</text> | ||
177 | + </div> | ||
178 | + </foreach> | ||
179 | + </div> | ||
180 | + <else/> | ||
181 | + <div class="tab_textarea"> | ||
182 | + <textarea readonly>{$info.reply.content}</textarea> | ||
183 | + </div> | ||
184 | + </eq> | ||
185 | + </div> | ||
186 | + </div> | ||
187 | + <!--回复专家的内容--> | ||
188 | + <div class="tab_content_box"> | ||
189 | + <div class="tab_info"> | ||
190 | + <text>回答</text> | ||
191 | + </div> | ||
192 | + <div class="user_info_box"> | ||
193 | + <notempty name="info.problem_again"> | ||
194 | + <eq name="info.problem_again.type" value="1"> | ||
195 | + <div class="voice_box" > | ||
196 | + <foreach name="info.problem_again.dir" item="item"> | ||
197 | + <div class="voice_item"> | ||
198 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
199 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
200 | + <text class="voice_font">点击图标开始播放</text> | ||
201 | + </div> | ||
202 | + </foreach> | ||
203 | + </div> | ||
204 | + <else/> | ||
205 | + <div class="tab_textarea"> | ||
206 | + <textarea readonly>{$info.problem_again.content}</textarea> | ||
207 | + </div> | ||
208 | + </eq> | ||
209 | + <else/> | ||
210 | + 尚未回答 | ||
211 | + </notempty> | ||
212 | + </div> | ||
213 | + </div> | ||
214 | + </notempty> | ||
215 | + | ||
163 | <!--转诊意见内容部分--> | 216 | <!--转诊意见内容部分--> |
164 | <div class="tab_content_box info_item question_no"> | 217 | <div class="tab_content_box info_item question_no"> |
165 | <div class="tab_info inquiry_content title"> | 218 | <div class="tab_info inquiry_content title"> |
@@ -196,28 +249,6 @@ | @@ -196,28 +249,6 @@ | ||
196 | </div> | 249 | </div> |
197 | </div> | 250 | </div> |
198 | 251 | ||
199 | - <notempty name="info.reply"> | ||
200 | - <!--专家提问显示内容--> | ||
201 | - <div class="tab_content_box"> | ||
202 | - <div class="tab_info"> | ||
203 | - <text>专家提问</text> | ||
204 | - </div> | ||
205 | - <div class="user_info_box"> | ||
206 | - {$info.reply} | ||
207 | - </div> | ||
208 | - </div> | ||
209 | - <!--回复专家的内容--> | ||
210 | - <div class="tab_content_box"> | ||
211 | - <div class="tab_info"> | ||
212 | - <text>回答</text> | ||
213 | - </div> | ||
214 | - <div class="user_info_box"> | ||
215 | - {$info.problem_again|default='尚未回答'} | ||
216 | - </div> | ||
217 | - </div> | ||
218 | - </notempty> | ||
219 | - | ||
220 | - | ||
221 | <!--同意转诊须填表单--> | 252 | <!--同意转诊须填表单--> |
222 | <div class="tab_content_box question_no"> | 253 | <div class="tab_content_box question_no"> |
223 | <div class="tab_content"> | 254 | <div class="tab_content"> |
@@ -226,19 +257,19 @@ | @@ -226,19 +257,19 @@ | ||
226 | <div class="info_box"> | 257 | <div class="info_box"> |
227 | <div class="info_item"> | 258 | <div class="info_item"> |
228 | <div class="title">接诊医院</div> | 259 | <div class="title">接诊医院</div> |
229 | - <div class="info_input"><input type="text" placeholder="请填写接诊医院"></div> | 260 | + <div class="info_input"><input type="text" id="receive_hospital" placeholder="请填写接诊医院"></div> |
230 | </div> | 261 | </div> |
231 | <div class="info_item"> | 262 | <div class="info_item"> |
232 | <div class="title">转诊专家</div> | 263 | <div class="title">转诊专家</div> |
233 | - <div class="info_input"><input type="text" placeholder="请填写接诊医院"></div> | 264 | + <div class="info_input"><input type="text" id="receive_expert" placeholder="请填写转诊专家"></div> |
234 | </div> | 265 | </div> |
235 | <div class="info_item"> | 266 | <div class="info_item"> |
236 | <div class="title">接诊地点</div> | 267 | <div class="title">接诊地点</div> |
237 | - <div class="info_input"><input type="text" placeholder="请填写接诊医院"></div> | 268 | + <div class="info_input"><input type="text" id="receive_address" placeholder="请填写接诊地点"></div> |
238 | </div> | 269 | </div> |
239 | <div class="info_item" id="showDatePicker"> | 270 | <div class="info_item" id="showDatePicker"> |
240 | <div class="title">就诊时间</div> | 271 | <div class="title">就诊时间</div> |
241 | - <div class="info_input"><input class="time_value" type="text" placeholder="请填写接诊医院"> | 272 | + <div class="info_input"><input class="time_value" id="receive_time" type="text" placeholder="请选择就诊时间"> |
242 | <text class="iconfont icon-xiala"></text> | 273 | <text class="iconfont icon-xiala"></text> |
243 | </div> | 274 | </div> |
244 | </div> | 275 | </div> |
@@ -246,26 +277,33 @@ | @@ -246,26 +277,33 @@ | ||
246 | </div> | 277 | </div> |
247 | </div> | 278 | </div> |
248 | </div> | 279 | </div> |
249 | - | ||
250 | - <!--确认回复按钮--> | ||
251 | - <div class="agree_btn submit question_yes1">确认回复</div> | ||
252 | - <!----> | ||
253 | - <div class="bottom_box question_no"> | ||
254 | - <div class="agree_btn">同意</div> | ||
255 | - <div class="bottom_btn">驳回</div> | ||
256 | - </div> | 280 | + |
281 | + <eq name="info.status" value="0"> | ||
282 | + <!--确认回复按钮--> | ||
283 | + <div class="agree_btn submit question_yes1" id="submit_reply">确认回复</div> | ||
284 | + <!----> | ||
285 | + <div class="bottom_box question_no"> | ||
286 | + <div class="agree_btn" id="agree_transfer">同意</div> | ||
287 | + <div class="bottom_btn">驳回</div> | ||
288 | + </div> | ||
289 | + </eq> | ||
257 | </div> | 290 | </div> |
258 | -<div class="mask_box" hidden> | 291 | +<div class="mask_box refuse_box" hidden> |
259 | <div class="referral_popup_box"> | 292 | <div class="referral_popup_box"> |
260 | <div>确认驳回</div> | 293 | <div>确认驳回</div> |
261 | <div class="referral_info">确定驳回转诊吗?</div> | 294 | <div class="referral_info">确定驳回转诊吗?</div> |
262 | <div class="referral_btn_box"> | 295 | <div class="referral_btn_box"> |
263 | <div class="btn cancel_btn">取消</div> | 296 | <div class="btn cancel_btn">取消</div> |
264 | - <div class="btn confirm_btn">确认</div> | 297 | + <div class="btn confirm_btn" id="refuse_transfer">确认</div> |
265 | </div> | 298 | </div> |
266 | </div> | 299 | </div> |
267 | </div> | 300 | </div> |
268 | 301 | ||
302 | +<!--表单判断弹窗--> | ||
303 | +<div class="form_popup_box" hidden> | ||
304 | + <text></text> | ||
305 | +</div> | ||
306 | + | ||
269 | <!--录音弹窗--> | 307 | <!--录音弹窗--> |
270 | <div class="mask_box first" hidden> | 308 | <div class="mask_box first" hidden> |
271 | <div class="popup_box"> | 309 | <div class="popup_box"> |
@@ -339,6 +377,14 @@ | @@ -339,6 +377,14 @@ | ||
339 | <script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> | 377 | <script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> |
340 | <!--<script src="__TMPL__/public/assets/js/referral.js"></script>--> | 378 | <!--<script src="__TMPL__/public/assets/js/referral.js"></script>--> |
341 | <script> | 379 | <script> |
380 | + $('.bottom_btn').click(function () { | ||
381 | + $('.refuse_box').show(); | ||
382 | + }); | ||
383 | + | ||
384 | + $('.cancel_btn').click(function () { | ||
385 | + $('.refuse_box').hide(); | ||
386 | + }); | ||
387 | + | ||
342 | wx.config({$sdk}); | 388 | wx.config({$sdk}); |
343 | //文本框显示字数 | 389 | //文本框显示字数 |
344 | $(".area").on("input propertychange", function () { | 390 | $(".area").on("input propertychange", function () { |
@@ -486,7 +532,7 @@ | @@ -486,7 +532,7 @@ | ||
486 | }) | 532 | }) |
487 | 533 | ||
488 | //显示弹窗 | 534 | //显示弹窗 |
489 | - var videoid='' | 535 | + var videoid=''; |
490 | //生命全局唯一 音频 | 536 | //生命全局唯一 音频 |
491 | var voiceBox; | 537 | var voiceBox; |
492 | $(document).on("click", ".mike", function () { | 538 | $(document).on("click", ".mike", function () { |
@@ -496,34 +542,15 @@ | @@ -496,34 +542,15 @@ | ||
496 | $('.stopping').hide() | 542 | $('.stopping').hide() |
497 | $('.stop').hide() | 543 | $('.stop').hide() |
498 | $('.next_step').hide(); | 544 | $('.next_step').hide(); |
499 | - // videoid=$(this).parents(".voice_module").attr("video-id") | ||
500 | - | ||
501 | - // $(this).parents(".voice_first").hide(); | ||
502 | - // $(this).parents(".voice_first").siblings(".voice_third").show() | ||
503 | - // | ||
504 | - // // vioceid=$(this).parents(".voice_first").attr("voiceid"); | ||
505 | - // | ||
506 | 545 | ||
507 | voiceBox = $(this).parents('.voice_list'); | 546 | voiceBox = $(this).parents('.voice_list'); |
508 | 547 | ||
509 | - // console.log(voiceBox) | ||
510 | - // $('.submit_voice').attr('videoid') | ||
511 | - // | ||
512 | - // var videolist = $(".voice_module"); | ||
513 | - // console.log(videolist) | ||
514 | - // for (var i = 0; i < videolist.length; i++) { | ||
515 | - // if (videoid == title_id) { | ||
516 | - // $(videolist[i]).children(".voice_list").children(".voice_list").hide(); | ||
517 | - // $(videolist[i]).children(".voice_list").children(".voice_third").show(); | ||
518 | - // } | ||
519 | - // } | ||
520 | - | ||
521 | }); | 548 | }); |
522 | 549 | ||
523 | //删除语音 | 550 | //删除语音 |
524 | $(".voice_module").on("click",".cancle_voice",function(){ | 551 | $(".voice_module").on("click",".cancle_voice",function(){ |
525 | $(this).parents(".voice_box").remove(); | 552 | $(this).parents(".voice_box").remove(); |
526 | - }) | 553 | + }); |
527 | 554 | ||
528 | //开始录音 | 555 | //开始录音 |
529 | var localId; | 556 | var localId; |
@@ -536,7 +563,7 @@ | @@ -536,7 +563,7 @@ | ||
536 | $('.next_step').hide() | 563 | $('.next_step').hide() |
537 | /*微信开始录音*/ | 564 | /*微信开始录音*/ |
538 | wx.startRecord(); | 565 | wx.startRecord(); |
539 | - }) | 566 | + }); |
540 | 567 | ||
541 | //暂停 | 568 | //暂停 |
542 | $('.pause').click(function () { | 569 | $('.pause').click(function () { |
@@ -544,6 +571,23 @@ | @@ -544,6 +571,23 @@ | ||
544 | $('.start').show() | 571 | $('.start').show() |
545 | $('.stopping').hide() | 572 | $('.stopping').hide() |
546 | 573 | ||
574 | + }); | ||
575 | + | ||
576 | + //播放语音 | ||
577 | + $('.voice_puse').hide() | ||
578 | + //var mySound = new Audio('http://suzhou.w.bronet.cn/upload/admin/20181217/a22c54f3354951b1d612569a126480a5.mp3'); | ||
579 | + $('.voice_play').click(function () { | ||
580 | + var url=$(this).data('url'); | ||
581 | + var mySound = new Audio(url); | ||
582 | + mySound.play(); | ||
583 | + $(this).hide() | ||
584 | + $(this).siblings('.voice_puse').show() | ||
585 | + | ||
586 | + $('.voice_puse').click(function () { | ||
587 | + mySound.pause(); | ||
588 | + $(this).hide() | ||
589 | + $(this).siblings('.voice_play').show() | ||
590 | + }) | ||
547 | }) | 591 | }) |
548 | 592 | ||
549 | //停止录音 | 593 | //停止录音 |
@@ -557,14 +601,14 @@ | @@ -557,14 +601,14 @@ | ||
557 | } | 601 | } |
558 | 602 | ||
559 | }); | 603 | }); |
560 | - }) | 604 | + }); |
561 | 605 | ||
562 | //下一步 | 606 | //下一步 |
563 | $('.next_step').click(function () { | 607 | $('.next_step').click(function () { |
564 | - $('.first').hide() | ||
565 | - $('.second').show() | 608 | + $('.first').hide(); |
609 | + $('.second').show(); | ||
566 | 610 | ||
567 | - }) | 611 | + }); |
568 | 612 | ||
569 | //点击试听 | 613 | //点击试听 |
570 | $('.audition').click(function () { | 614 | $('.audition').click(function () { |
@@ -719,8 +763,157 @@ | @@ -719,8 +763,157 @@ | ||
719 | $('.question_no').show(); | 763 | $('.question_no').show(); |
720 | $(this).attr('data-id',1); | 764 | $(this).attr('data-id',1); |
721 | } | 765 | } |
722 | - }) | 766 | + }); |
723 | 767 | ||
768 | + //回复 | ||
769 | + $('#submit_reply').click(function () { | ||
770 | + /*获取病人主诉*/ | ||
771 | + var display=$('.voice_btn1').css('display'); | ||
772 | + //console.log(display1); | ||
773 | + if (display=='none'){ | ||
774 | + var reply=''; | ||
775 | + /*判断发送类型*/ | ||
776 | + var reply_type='1'; | ||
777 | + $('#voice_module1 .voice_third').each(function () { | ||
778 | + /*拼接信息*/ | ||
779 | + var voiceId1=$(this).attr('data-serverid'); | ||
780 | + if (voiceId1!=undefined){ | ||
781 | + if (reply==''){ | ||
782 | + reply=voiceId1; | ||
783 | + }else{ | ||
784 | + reply+=','+voiceId1; | ||
785 | + } | ||
786 | + } | ||
787 | + }) | ||
788 | + }else{ | ||
789 | + var reply=$('.textarea1').val(); | ||
790 | + var reply_type='2'; | ||
791 | + if (!reply){ | ||
792 | + $('.form_popup_box').show(); | ||
793 | + $('.form_popup_box').text('回复内容不能为空'); | ||
794 | + $('.form_popup_box').delay(1000).hide(0); | ||
795 | + return; | ||
796 | + } | ||
797 | + } | ||
798 | + alert(JSON.stringify({ | ||
799 | + reply:reply, | ||
800 | + reply_type:reply_type | ||
801 | + })) | ||
802 | + /*提交后台*/ | ||
803 | + $.ajax({ | ||
804 | + url:"{:url('replyTransfer',array('id'=>$info['id']))}", | ||
805 | + type:'POST', | ||
806 | + data:{ | ||
807 | + reply:reply, | ||
808 | + reply_type:reply_type | ||
809 | + }, | ||
810 | + success:function (res) { | ||
811 | + console.log(res); | ||
812 | + alert(JSON.stringify(res)); | ||
813 | + $('.box').show().delay(2000).hide(2) | ||
814 | + }, | ||
815 | + error:function (res) { | ||
816 | + alert(res); | ||
817 | + } | ||
818 | + }) | ||
819 | + }); | ||
820 | + | ||
821 | + //同意 | ||
822 | + $('#agree_transfer').click(function () { | ||
823 | + | ||
824 | + /*获取病人主诉*/ | ||
825 | + var display2=$('.voice_btn2').css('display'); | ||
826 | + //console.log(display1); | ||
827 | + if (display2=='none'){ | ||
828 | + var reply_again=''; | ||
829 | + /*判断发送类型*/ | ||
830 | + var ireply_again_type='1'; | ||
831 | + $('#voice_module2 .voice_third').each(function () { | ||
832 | + /*拼接信息*/ | ||
833 | + var voiceId1=$(this).attr('data-serverid'); | ||
834 | + if (voiceId1!=undefined){ | ||
835 | + if (reply_again==''){ | ||
836 | + reply_again=voiceId1; | ||
837 | + }else{ | ||
838 | + reply_again+=','+voiceId1; | ||
839 | + } | ||
840 | + } | ||
841 | + }) | ||
842 | + }else{ | ||
843 | + var reply_again=$('.textarea2').val(); | ||
844 | + var reply_again_type='2'; | ||
845 | + if (!reply_again){ | ||
846 | + $('.form_popup_box').show(); | ||
847 | + $('.form_popup_box').text('转诊意见'); | ||
848 | + $('.form_popup_box').delay(1000).hide(0); | ||
849 | + return; | ||
850 | + } | ||
851 | + } | ||
852 | + | ||
853 | + var receive_hospital = $('#receive_hospital').val(); | ||
854 | + var receive_expert = $('#receive_expert').val(); | ||
855 | + var receive_address = $('#receive_address').val(); | ||
856 | + var receive_time = $('#receive_time').val(); | ||
857 | + if (receive_hospital == '') { | ||
858 | + $('.form_popup_box').show(); | ||
859 | + $('.form_popup_box').text('请填写接诊医院'); | ||
860 | + $('.form_popup_box').delay(1000).hide(0); | ||
861 | + return false; | ||
862 | + } else if (receive_expert == '') { | ||
863 | + $('.form_popup_box').show(); | ||
864 | + $('.form_popup_box').text('请填写接诊专家'); | ||
865 | + $('.form_popup_box').delay(1000).hide(0); | ||
866 | + return false; | ||
867 | + } else if (receive_address == '') { | ||
868 | + $('.form_popup_box').show(); | ||
869 | + $('.form_popup_box').text('请填写接诊地点'); | ||
870 | + $('.form_popup_box').delay(1000).hide(0); | ||
871 | + return false; | ||
872 | + } else if (receive_time == '') { | ||
873 | + $('.form_popup_box').show(); | ||
874 | + $('.form_popup_box').text('请填写就诊时间'); | ||
875 | + $('.form_popup_box').delay(1000).hide(0); | ||
876 | + return false; | ||
877 | + } | ||
878 | + /*提交后台*/ | ||
879 | + $.ajax({ | ||
880 | + url:"{:url('agreeTransfer',array('id'=>$info['id']))}", | ||
881 | + type:'POST', | ||
882 | + data:{ | ||
883 | + receive_hospital:receive_hospital, | ||
884 | + receive_expert:receive_expert, | ||
885 | + receive_address:receive_address, | ||
886 | + receive_time:receive_time, | ||
887 | + reply_again:reply_again, | ||
888 | + reply_again_type:reply_again_type | ||
889 | + }, | ||
890 | + success:function (res) { | ||
891 | + console.log(res); | ||
892 | + alert(JSON.stringify(res)); | ||
893 | + $('.box').show().delay(2000).hide(2) | ||
894 | + }, | ||
895 | + error:function (res) { | ||
896 | + alert(res); | ||
897 | + } | ||
898 | + }) | ||
899 | + | ||
900 | + }); | ||
901 | + | ||
902 | + //驳回 | ||
903 | + $('#refuse_transfer').click(function () { | ||
904 | + $.ajax({ | ||
905 | + url:"{:url('refuseTransfer',array('id'=>$info['id']))}", | ||
906 | + type:'POST', | ||
907 | + success:function (res) { | ||
908 | + console.log(res); | ||
909 | + alert(JSON.stringify(res)); | ||
910 | + $('.box').show().delay(2000).hide(2) | ||
911 | + }, | ||
912 | + error:function (res) { | ||
913 | + alert(res); | ||
914 | + } | ||
915 | + }) | ||
916 | + }); | ||
724 | </script> | 917 | </script> |
725 | </body> | 918 | </body> |
726 | </html> | 919 | </html> |
1 | +<!DOCTYPE html> | ||
2 | +<html lang="en"> | ||
3 | +<head> | ||
4 | + <meta charset="UTF-8"> | ||
5 | + <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no"> | ||
6 | + <title>问诊待答</title> | ||
7 | + <script src="__TMPL__/public/assets/js/fontsize.js"></script> | ||
8 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/init.css"> | ||
9 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css"> | ||
10 | + <link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_tlxymah92x.css"> | ||
11 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/weui.css"> | ||
12 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/myweui.css"> | ||
13 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/referralModule.css"> | ||
14 | + <style> | ||
15 | + .voice_box{ | ||
16 | + width: 100%; | ||
17 | + } | ||
18 | + .question_yes,.question_yes1{display: none;} | ||
19 | + </style> | ||
20 | +</head> | ||
21 | +<body STYLE="background: #F5F6FA"> | ||
22 | +<div class="container"> | ||
23 | + <div class="tab_content_box top"> | ||
24 | + <div class="tab_info">问诊基本信息</div> | ||
25 | + <div class="tab_content"> | ||
26 | + <div class="content_item"> | ||
27 | + <div class="tab_title">病人主述</div> | ||
28 | + <eq name="info.patient.type" value="1"> | ||
29 | + <div class="voice_box" > | ||
30 | + <foreach name="info.patient.dir" item="item"> | ||
31 | + <div class="voice_item"> | ||
32 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
33 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
34 | + <text class="voice_font">点击图标开始播放</text> | ||
35 | + </div> | ||
36 | + </foreach> | ||
37 | + </div> | ||
38 | + <else/> | ||
39 | + <div class="tab_textarea"> | ||
40 | + <textarea readonly>{$info.patient.content}</textarea> | ||
41 | + </div> | ||
42 | + </eq> | ||
43 | + </div> | ||
44 | + | ||
45 | + <div class="content_item"> | ||
46 | + <div class="tab_title">初步诊断</div> | ||
47 | + <eq name="info.diagnose.type" value="1"> | ||
48 | + <div class="voice_box" > | ||
49 | + <foreach name="info.diagnose.dir" item="item"> | ||
50 | + <div class="voice_item"> | ||
51 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
52 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
53 | + <text class="voice_font">点击图标开始播放</text> | ||
54 | + </div> | ||
55 | + </foreach> | ||
56 | + </div> | ||
57 | + <else/> | ||
58 | + <div class="tab_textarea"> | ||
59 | + <textarea readonly>{$info.diagnose.content}</textarea> | ||
60 | + </div> | ||
61 | + </eq> | ||
62 | + </div> | ||
63 | + <div class="content_item"> | ||
64 | + <div class="tab_title">当前困惑</div> | ||
65 | + <eq name="info.problem.type" value="1"> | ||
66 | + <div class="voice_box" > | ||
67 | + <foreach name="info.problem.dir" item="item"> | ||
68 | + <div class="voice_item"> | ||
69 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
70 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
71 | + <text class="voice_font">点击图标开始播放</text> | ||
72 | + </div> | ||
73 | + </foreach> | ||
74 | + </div> | ||
75 | + <else/> | ||
76 | + <div class="tab_textarea"> | ||
77 | + <textarea readonly>{$info.problem.content}</textarea> | ||
78 | + </div> | ||
79 | + </eq> | ||
80 | + </div> | ||
81 | + | ||
82 | + <div class="content_item"> | ||
83 | + <div class="tab_title">报告单</div> | ||
84 | + <div class="referral_img_box"> | ||
85 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
86 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
87 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
88 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
89 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
90 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
91 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
92 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
93 | + <div class="referral_img"><img src="../images/apic01@2x.png" alt=""></div> | ||
94 | + </div> | ||
95 | + </div> | ||
96 | + <div class="content_item"> | ||
97 | + <div class="tab_title">问诊时间</div> | ||
98 | + <div>{$info.addtime|date='Y.m.d H:i:s',###}</div> | ||
99 | + </div> | ||
100 | + </div> | ||
101 | + </div> | ||
102 | + | ||
103 | + | ||
104 | + | ||
105 | + | ||
106 | + <div class="tab_content_box"> | ||
107 | + <div class="tab_info">转诊基本信息</div> | ||
108 | + <div class="user_info_box title_info" style="justify-content: normal"> | ||
109 | + <div class="head_box"><img src="{$info.avatar}" alt=""></div> | ||
110 | + <div> | ||
111 | + <div>姓名:{$info.user_nickname}</div> | ||
112 | + <div>电话:{$info.mobile}</div> | ||
113 | + <div>医院:{$info.hospital}</div> | ||
114 | + <div>科室:{$info.office}</div> | ||
115 | + </div> | ||
116 | + </div> | ||
117 | + </div> | ||
118 | + <empty name="info.reply"> | ||
119 | + <div class="tab_content_box"> | ||
120 | + <div class="tab_info title_info" id="is_have_question" data-id="1"> | ||
121 | + <text class="tab_title">若您对转诊信息不明确,请点击发起提问</text> | ||
122 | + <text class="iconfont icon-icon02 add_problem"></text> | ||
123 | + </div> | ||
124 | + </div> | ||
125 | + </empty> | ||
126 | + | ||
127 | + <!--提问内容部分--> | ||
128 | + <div class="tab_content_box info_item question_yes"> | ||
129 | + <div class="tab_info inquiry_content title"> | ||
130 | + <text>提问</text> | ||
131 | + <text class="iconfont icon-huatong voice_btn voice_btn1"></text> | ||
132 | + <text class="iconfont icon-tianxie"></text> | ||
133 | + </div> | ||
134 | + <div class="textarea_content"> | ||
135 | + <textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea> | ||
136 | + <p class="text_num num_box"><span class="text-count">0</span>/1000</p> | ||
137 | + </div> | ||
138 | + <div id="voice_module1" class="voice_module agree_box" video-id="1"> | ||
139 | + <div class="voice_list" voiceitemid="1"> | ||
140 | + <div class="voice_box voice_third"> | ||
141 | + <div class="voice_item"> | ||
142 | + <text class="iconfont icon-luyin voice_icon"></text> | ||
143 | + <text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span>秒</text> | ||
144 | + </div> | ||
145 | + <div class="voice_btn_box"> | ||
146 | + <text class="iconfont icon-quxiao cancle_voice"></text> | ||
147 | + <text class="iconfont icon-tianjia add_voice"></text> | ||
148 | + </div> | ||
149 | + </div> | ||
150 | + <div class="voice_box voice_first" voiceid="1"> | ||
151 | + <div class="voice_item"> | ||
152 | + <text class="iconfont icon-huatong mike voice_icon"></text> | ||
153 | + <text class="voice_font huatong">点击图标开始语音语音最长60秒</text> | ||
154 | + </div> | ||
155 | + <div class="voice_btn_box"> | ||
156 | + <text class="iconfont icon-quxiao icon_cancle"></text> | ||
157 | + </div> | ||
158 | + </div> | ||
159 | + </div> | ||
160 | + </div> | ||
161 | + </div> | ||
162 | + | ||
163 | + <notempty name="info.reply"> | ||
164 | + <!--专家提问显示内容--> | ||
165 | + <div class="tab_content_box"> | ||
166 | + <div class="tab_info"> | ||
167 | + <text>专家提问</text> | ||
168 | + </div> | ||
169 | + <div class="user_info_box"> | ||
170 | + <eq name="info.reply.type" value="1"> | ||
171 | + <div class="voice_box" > | ||
172 | + <foreach name="info.reply.dir" item="item"> | ||
173 | + <div class="voice_item"> | ||
174 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
175 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
176 | + <text class="voice_font">点击图标开始播放</text> | ||
177 | + </div> | ||
178 | + </foreach> | ||
179 | + </div> | ||
180 | + <else/> | ||
181 | + <div class="tab_textarea"> | ||
182 | + <textarea readonly>{$info.reply.content}</textarea> | ||
183 | + </div> | ||
184 | + </eq> | ||
185 | + </div> | ||
186 | + </div> | ||
187 | + <!--回复专家的内容--> | ||
188 | + <div class="tab_content_box"> | ||
189 | + <div class="tab_info"> | ||
190 | + <text>回答</text> | ||
191 | + </div> | ||
192 | + <div class="user_info_box"> | ||
193 | + <notempty name="info.problem_again"> | ||
194 | + <eq name="info.problem_again.type" value="1"> | ||
195 | + <div class="voice_box" > | ||
196 | + <foreach name="info.problem_again.dir" item="item"> | ||
197 | + <div class="voice_item"> | ||
198 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
199 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
200 | + <text class="voice_font">点击图标开始播放</text> | ||
201 | + </div> | ||
202 | + </foreach> | ||
203 | + </div> | ||
204 | + <else/> | ||
205 | + <div class="tab_textarea"> | ||
206 | + <textarea readonly>{$info.problem_again.content}</textarea> | ||
207 | + </div> | ||
208 | + </eq> | ||
209 | + <else/> | ||
210 | + 尚未回答 | ||
211 | + </notempty> | ||
212 | + </div> | ||
213 | + </div> | ||
214 | + </notempty> | ||
215 | + | ||
216 | + <!--转诊意见内容部分--> | ||
217 | + <div class="tab_content_box info_item question_no"> | ||
218 | + <div class="tab_info inquiry_content title"> | ||
219 | + <text>转诊意见</text> | ||
220 | + <text class="iconfont icon-huatong voice_btn voice_btn2"></text> | ||
221 | + <text class="iconfont icon-tianxie"></text> | ||
222 | + </div> | ||
223 | + <div class="textarea_content"> | ||
224 | + <textarea class="area textarea2" type="text" placeholder="请输入" maxlength="1000"></textarea> | ||
225 | + <p class="text_num num_box"><span class="text-count">0</span>/1000</p> | ||
226 | + </div> | ||
227 | + <div id="voice_module2" class="voice_module agree_box" video-id="2"> | ||
228 | + <div class="voice_list" voiceitemid="2"> | ||
229 | + <div class="voice_box voice_third"> | ||
230 | + <div class="voice_item"> | ||
231 | + <text class="iconfont icon-luyin voice_icon"></text> | ||
232 | + <text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span>秒</text> | ||
233 | + </div> | ||
234 | + <div class="voice_btn_box"> | ||
235 | + <text class="iconfont icon-quxiao cancle_voice"></text> | ||
236 | + <text class="iconfont icon-tianjia add_voice"></text> | ||
237 | + </div> | ||
238 | + </div> | ||
239 | + <div class="voice_box voice_first" voiceid="2"> | ||
240 | + <div class="voice_item"> | ||
241 | + <text class="iconfont icon-huatong mike voice_icon"></text> | ||
242 | + <text class="voice_font huatong">点击图标开始语音语音最长60秒</text> | ||
243 | + </div> | ||
244 | + <div class="voice_btn_box"> | ||
245 | + <text class="iconfont icon-quxiao icon_cancle"></text> | ||
246 | + </div> | ||
247 | + </div> | ||
248 | + </div> | ||
249 | + </div> | ||
250 | + </div> | ||
251 | + | ||
252 | + <!--同意转诊须填表单--> | ||
253 | + <div class="tab_content_box question_no"> | ||
254 | + <div class="tab_content"> | ||
255 | + <div class="content_item"> | ||
256 | + <div class="tab_title">接诊信息(同意转诊时需要填写此表单)</div> | ||
257 | + <div class="info_box"> | ||
258 | + <div class="info_item"> | ||
259 | + <div class="title">接诊医院</div> | ||
260 | + <div class="info_input"><input type="text" id="receive_hospital" placeholder="请填写接诊医院"></div> | ||
261 | + </div> | ||
262 | + <div class="info_item"> | ||
263 | + <div class="title">转诊专家</div> | ||
264 | + <div class="info_input"><input type="text" id="receive_expert" placeholder="请填写转诊专家"></div> | ||
265 | + </div> | ||
266 | + <div class="info_item"> | ||
267 | + <div class="title">接诊地点</div> | ||
268 | + <div class="info_input"><input type="text" id="receive_address" placeholder="请填写接诊地点"></div> | ||
269 | + </div> | ||
270 | + <div class="info_item" id="showDatePicker"> | ||
271 | + <div class="title">就诊时间</div> | ||
272 | + <div class="info_input"><input class="time_value" id="receive_time" type="text" placeholder="请选择就诊时间"> | ||
273 | + <text class="iconfont icon-xiala"></text> | ||
274 | + </div> | ||
275 | + </div> | ||
276 | + </div> | ||
277 | + </div> | ||
278 | + </div> | ||
279 | + </div> | ||
280 | + | ||
281 | + <eq name="info.status" value="0"> | ||
282 | + <!--确认回复按钮--> | ||
283 | + <div class="agree_btn submit question_yes1" id="submit_reply">确认回复</div> | ||
284 | + <!----> | ||
285 | + <div class="bottom_box question_no"> | ||
286 | + <div class="agree_btn" id="agree_transfer">同意</div> | ||
287 | + <div class="bottom_btn">驳回</div> | ||
288 | + </div> | ||
289 | + </eq> | ||
290 | +</div> | ||
291 | +<div class="mask_box refuse_box" hidden> | ||
292 | + <div class="referral_popup_box"> | ||
293 | + <div>确认驳回</div> | ||
294 | + <div class="referral_info">确定驳回转诊吗?</div> | ||
295 | + <div class="referral_btn_box"> | ||
296 | + <div class="btn cancel_btn">取消</div> | ||
297 | + <div class="btn confirm_btn" id="refuse_transfer">确认</div> | ||
298 | + </div> | ||
299 | + </div> | ||
300 | +</div> | ||
301 | + | ||
302 | +<!--表单判断弹窗--> | ||
303 | +<div class="form_popup_box" hidden> | ||
304 | + <text></text> | ||
305 | +</div> | ||
306 | + | ||
307 | +<!--录音弹窗--> | ||
308 | +<div class="mask_box first" hidden> | ||
309 | + <div class="popup_box"> | ||
310 | + <div class="popup_title">录制语音</div> | ||
311 | + <div class="popup_time"> | ||
312 | + <div class="time-item"> | ||
313 | + <!--<span id="day_show">0天</span>--> | ||
314 | + <strong id="hour_show"> | ||
315 | + <text id="h"></text> | ||
316 | + 00:</strong> | ||
317 | + <strong id="minute_show"> | ||
318 | + <text></text> | ||
319 | + 01:</strong> | ||
320 | + <strong id="second_show"> | ||
321 | + <text></text> | ||
322 | + 00</strong> | ||
323 | + </div> | ||
324 | + <div class="popup_info">还可以录制 <span id="second_test">5</span> 秒</div> | ||
325 | + </div> | ||
326 | + <div class="popup_btn_box"> | ||
327 | + <div class="popup_item start "> | ||
328 | + <img class="popup_icon" src="__TMPL__/public/assets/images/eicon09@2x.png" alt=""> | ||
329 | + <div>开始</div> | ||
330 | + </div> | ||
331 | + <div class="popup_item pause" hidden> | ||
332 | + <img class="popup_icon" src="__TMPL__/public/assets/images/eicon13@2x.png" alt=""> | ||
333 | + <div>暂停</div> | ||
334 | + </div> | ||
335 | + <div class="popup_item stop" hidden> | ||
336 | + <img class="popup_icon" src="__TMPL__/public/assets/images/eicon14@2x.png" alt=""> | ||
337 | + <div>已停止</div> | ||
338 | + </div> | ||
339 | + <div class="popup_center play start"> | ||
340 | + <img src="__TMPL__/public/assets/images/eicon11@2x.png" alt=""> | ||
341 | + </div> | ||
342 | + <div class="popup_center stopping" hidden> | ||
343 | + <img src="__TMPL__/public/assets/images/eicon12@2x.png" alt=""> | ||
344 | + </div> | ||
345 | + <div class="popup_item next_step"> | ||
346 | + <img class="popup_icon" src="__TMPL__/public/assets/images/eicon10@2x.png" alt=""> | ||
347 | + <div>下一步</div> | ||
348 | + </div> | ||
349 | + </div> | ||
350 | + </div> | ||
351 | +</div> | ||
352 | + | ||
353 | +<!----> | ||
354 | +<div class="mask_box second" hidden> | ||
355 | + <div class="popup_box"> | ||
356 | + <div class="popup_title">录制语音</div> | ||
357 | + <div class="popup_time"> | ||
358 | + <div class="popup_btn audition">点击试听</div> | ||
359 | + <!--<div class="popup_info">时长:4分58秒</div>--> | ||
360 | + </div> | ||
361 | + <div class="popup_btn_box"> | ||
362 | + <div class="large_icon rerecord"> | ||
363 | + <img class="popup_icon " src="__TMPL__/public/assets/images/eicon15@2x.png" alt=""> | ||
364 | + <div>重新录制</div> | ||
365 | + </div> | ||
366 | + <div class="large_icon submit_voice"> | ||
367 | + <img class="popup_icon upload" src="__TMPL__/public/assets/images/eicon16@2x.png" alt=""> | ||
368 | + <div>我要发送</div> | ||
369 | + </div> | ||
370 | + </div> | ||
371 | + </div> | ||
372 | +</div> | ||
373 | + | ||
374 | +<script src="__TMPL__/public/assets/js/jquery-2.1.0.js"></script> | ||
375 | +<script src="__TMPL__/public/assets/js/weui.js"></script> | ||
376 | +<script src="__TMPL__/public/assets/js/myweui.js"></script> | ||
377 | +<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> | ||
378 | +<!--<script src="__TMPL__/public/assets/js/referral.js"></script>--> | ||
379 | +<script> | ||
380 | + $('.bottom_btn').click(function () { | ||
381 | + $('.refuse_box').show(); | ||
382 | + }); | ||
383 | + | ||
384 | + $('.cancel_btn').click(function () { | ||
385 | + $('.refuse_box').hide(); | ||
386 | + }); | ||
387 | + | ||
388 | + wx.config({$sdk}); | ||
389 | + //文本框显示字数 | ||
390 | + $(".area").on("input propertychange", function () { | ||
391 | + | ||
392 | + var $this = $(this), | ||
393 | + _val = $this.val(), | ||
394 | + count = ""; | ||
395 | + if (_val.length > 1000) { | ||
396 | + $this.val(_val.substring(0, 1000)); | ||
397 | + } | ||
398 | + count = 1000 - $this.val().length; | ||
399 | + $(this).siblings(".text_num").children('.text-count').text(count); | ||
400 | + }); | ||
401 | + | ||
402 | + //点击 | ||
403 | + $('.info_item').on('click','.title',function () { | ||
404 | + $(this).parent().toggleClass('voice') | ||
405 | + }) | ||
406 | + | ||
407 | + //点击正在播放按钮 | ||
408 | + $('.icon-luying_ongoing').click(function () { | ||
409 | + var videolist = $(".voice_module"); | ||
410 | + for (var i = 0; i < videolist.length; i++) { | ||
411 | + var videoid = $(videolist[i]).attr("video-id"); | ||
412 | + if (videoid == title_id) { | ||
413 | + $(videolist[i]).show(); | ||
414 | + $(videolist[i]).children('.voice_second').hide() | ||
415 | + $(videolist[i]).children('.voice_third').show(); | ||
416 | + } | ||
417 | + } | ||
418 | + }) | ||
419 | + | ||
420 | + //倒计时 | ||
421 | + var times = "60";//倒计时总秒数量 | ||
422 | + var time=""; | ||
423 | + var timeLength=0; | ||
424 | + function countDown(times) { | ||
425 | + var timer = null; | ||
426 | + timer = setInterval(function () { | ||
427 | + var day = 0, | ||
428 | + hour = 0, | ||
429 | + minute = 0, | ||
430 | + second = 0;//时间默认值 | ||
431 | + if (times > 0) { | ||
432 | + day = Math.floor(times / (60 * 60 * 24)); | ||
433 | + hour = Math.floor(times / (60 * 60)) - (day * 24); | ||
434 | + minute = Math.floor(times / 60) - (day * 24 * 60) - (hour * 60); | ||
435 | + second = Math.floor(times) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60); | ||
436 | + } | ||
437 | + if (day <= 9) day = '0' + day; | ||
438 | + if (hour <= 9) hour = '0' + hour; | ||
439 | + if (minute <= 9) minute = '0' + minute; | ||
440 | + if (second <= 9) second = '0' + second; | ||
441 | + | ||
442 | + $('#hour_show').html('<text id="h"></text>' + hour + ':'); | ||
443 | + $('#minute_show').html('<text></text>' + minute + ':'); | ||
444 | + $('#second_show').html('<text></text>' + second + ''); | ||
445 | + $('#second_test').html('<text></text>' + second + ''); | ||
446 | + | ||
447 | + // | ||
448 | + // console.log(day + "天:" + hour + "小时:" + minute + "分钟:" + second + "秒"); | ||
449 | + times--; | ||
450 | + | ||
451 | + }, 1000); | ||
452 | + // if (times <= 0) { | ||
453 | + // clearInterval(timer); | ||
454 | + // } | ||
455 | + | ||
456 | + $('.pause').click(function () { | ||
457 | + // timer(intDiff); | ||
458 | + clearInterval(timer); | ||
459 | + localStorage.setItem("times",times) | ||
460 | + }) | ||
461 | + $('.stop').click(function () { | ||
462 | + clearInterval(timer); | ||
463 | + times=0; | ||
464 | + }) | ||
465 | + $('.stopping').click(function () { | ||
466 | + clearInterval(timer); | ||
467 | + timeLength=60-times; | ||
468 | + console.log('录音时长:'+timeLength); | ||
469 | + localStorage.clear() | ||
470 | + }) | ||
471 | + } | ||
472 | + $('.start').click(function () { | ||
473 | + time=localStorage.getItem("times") | ||
474 | + if(time==null){ | ||
475 | + times = parseInt(60) | ||
476 | + }else{ | ||
477 | + times=time; | ||
478 | + } | ||
479 | + console.log(time) | ||
480 | + // myTimer(intDiff); | ||
481 | + countDown(times); | ||
482 | + localStorage.setItem("times",times) | ||
483 | + }) | ||
484 | + | ||
485 | + //添加一条新语音 | ||
486 | + var num = 1; | ||
487 | + $('.voice_module').on('click', '.add_voice', function () { | ||
488 | + times=60 | ||
489 | + // clearInterval(timer); | ||
490 | + var day = 0, | ||
491 | + hour = 0, | ||
492 | + minute = 0, | ||
493 | + second = 0;//时间默认值 | ||
494 | + if (day <= 9) day = '0' + day; | ||
495 | + if (hour <= 9) hour = '0' + hour; | ||
496 | + if (minute <= 9) minute = '0' + minute; | ||
497 | + if (second <= 9) second = '0' + second; | ||
498 | + | ||
499 | + $('#hour_show').html('<text id="h"></text>' + hour + ':'); | ||
500 | + $('#minute_show').html('<text></text>' + minute + ':'); | ||
501 | + $('#second_show').html('<text></text>' + second + ''); | ||
502 | + $('#second_test').html(60); | ||
503 | + | ||
504 | + num = num + 1 | ||
505 | + var parent = $(this).parents('.voice_module') | ||
506 | + var html = '<div class="voice_list" voiceitemid="'+num+'">\n' + | ||
507 | + '<div class="voice_box voice_third" style="display: none;">\n' + | ||
508 | + ' <div class="voice_item">\n' + | ||
509 | + ' <text class="iconfont icon-luyin voice_icon"></text>\n' + | ||
510 | + ' <text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span>秒</text>\n' + | ||
511 | + ' </div>\n' + | ||
512 | + ' <div class="voice_btn_box">\n' + | ||
513 | + ' <text class="iconfont icon-quxiao cancle_voice"></text>\n' + | ||
514 | + // ' <text class="iconfont icon-tianjia add_voice"></text>\n' + | ||
515 | + ' </div>\n' + | ||
516 | + ' </div>\n' + | ||
517 | + ' <div class="voice_box voice_first">\n' + | ||
518 | + ' <div class="voice_item">\n' + | ||
519 | + ' <text class="iconfont icon-huatong mike voice_icon"></text>\n' + | ||
520 | + ' <text class="voice_font huatong">点击图标开始语音语音最长60秒</text>\n' + | ||
521 | + ' </div>\n' + | ||
522 | + ' <div class="voice_btn_box">\n' + | ||
523 | + ' <text class="iconfont icon-quxiao icon_cancle cancle_voice"></text>\n' + | ||
524 | + ' </div>\n' + | ||
525 | + ' </div>\n' + | ||
526 | + '</div>' | ||
527 | + | ||
528 | + | ||
529 | + // parent.append($('.voice_list').html()); | ||
530 | + parent.append(html) | ||
531 | + | ||
532 | + }) | ||
533 | + | ||
534 | + //显示弹窗 | ||
535 | + var videoid=''; | ||
536 | + //生命全局唯一 音频 | ||
537 | + var voiceBox; | ||
538 | + $(document).on("click", ".mike", function () { | ||
539 | + $('.first').show() | ||
540 | + $('.play').show() | ||
541 | + $('.start').show() | ||
542 | + $('.stopping').hide() | ||
543 | + $('.stop').hide() | ||
544 | + $('.next_step').hide(); | ||
545 | + | ||
546 | + voiceBox = $(this).parents('.voice_list'); | ||
547 | + | ||
548 | + }); | ||
549 | + | ||
550 | + //删除语音 | ||
551 | + $(".voice_module").on("click",".cancle_voice",function(){ | ||
552 | + $(this).parents(".voice_box").remove(); | ||
553 | + }); | ||
554 | + | ||
555 | + //开始录音 | ||
556 | + var localId; | ||
557 | + $('.start').click(function () { | ||
558 | + $('.start').hide() | ||
559 | + $('.stop').hide() | ||
560 | + $('.play').hide() | ||
561 | + $('.pause').show() | ||
562 | + $('.stopping').show() | ||
563 | + $('.next_step').hide() | ||
564 | + /*微信开始录音*/ | ||
565 | + wx.startRecord(); | ||
566 | + }); | ||
567 | + | ||
568 | + //暂停 | ||
569 | + $('.pause').click(function () { | ||
570 | + $('.pause').hide() | ||
571 | + $('.start').show() | ||
572 | + $('.stopping').hide() | ||
573 | + | ||
574 | + }); | ||
575 | + | ||
576 | + //播放语音 | ||
577 | + $('.voice_puse').hide() | ||
578 | + //var mySound = new Audio('http://suzhou.w.bronet.cn/upload/admin/20181217/a22c54f3354951b1d612569a126480a5.mp3'); | ||
579 | + $('.voice_play').click(function () { | ||
580 | + var url=$(this).data('url'); | ||
581 | + var mySound = new Audio(url); | ||
582 | + mySound.play(); | ||
583 | + $(this).hide() | ||
584 | + $(this).siblings('.voice_puse').show() | ||
585 | + | ||
586 | + $('.voice_puse').click(function () { | ||
587 | + mySound.pause(); | ||
588 | + $(this).hide() | ||
589 | + $(this).siblings('.voice_play').show() | ||
590 | + }) | ||
591 | + }) | ||
592 | + | ||
593 | + //停止录音 | ||
594 | + $('.stopping').click(function () { | ||
595 | + $('.next_step').show() | ||
596 | + $('.stop').show() | ||
597 | + $('.pause').hide() | ||
598 | + wx.stopRecord({ | ||
599 | + success: function (res) { | ||
600 | + localId = res.localId; | ||
601 | + } | ||
602 | + | ||
603 | + }); | ||
604 | + }); | ||
605 | + | ||
606 | + //下一步 | ||
607 | + $('.next_step').click(function () { | ||
608 | + $('.first').hide(); | ||
609 | + $('.second').show(); | ||
610 | + | ||
611 | + }); | ||
612 | + | ||
613 | + //点击试听 | ||
614 | + $('.audition').click(function () { | ||
615 | + wx.onVoicePlayEnd({ | ||
616 | + success: function (res) { | ||
617 | + var localId = res.localId; // 返回音频的本地ID | ||
618 | + } | ||
619 | + }); | ||
620 | + wx.playVoice({ | ||
621 | + localId:localId //需要播放的音频的本地ID,由stopRecord接口获得 | ||
622 | + }); | ||
623 | + | ||
624 | + var videolist = $(".voice_module"); | ||
625 | + for (var i = 0; i < videolist.length; i++) { | ||
626 | + var videoid = $(videolist[i]).attr("video-id"); | ||
627 | + if (videoid == title_id) { | ||
628 | + $('.second').hide() | ||
629 | + $(videolist[i]).show(); | ||
630 | + $(videolist[i]).children('.voice_list').hide() | ||
631 | + $(videolist[i]).children('.voice_third').show(); | ||
632 | + } | ||
633 | + } | ||
634 | + }) | ||
635 | + | ||
636 | + // 列表中点击试听 | ||
637 | + $('.voice_third').click( | ||
638 | + function () { | ||
639 | + var tryId=$(this).attr('try-id'); | ||
640 | + wx.playVoice({ | ||
641 | + localId:tryId | ||
642 | + }); | ||
643 | + } | ||
644 | + ) | ||
645 | + | ||
646 | + //就诊时间 | ||
647 | + $('#showDatePicker').on('click', function () { | ||
648 | + weui.datePicker({ | ||
649 | + start: 2019, | ||
650 | + end: new Date().getFullYear(), | ||
651 | + onChange: function (result) { | ||
652 | + console.log(result); | ||
653 | + }, | ||
654 | + onConfirm: function (result) { | ||
655 | + console.log(result[0].label+' - '+result[1].label+' - '+result[2].label) | ||
656 | + $('.time_value').val(result[0].value+' - '+result[1].value+' - '+result[2].value) | ||
657 | + } | ||
658 | + }); | ||
659 | + }); | ||
660 | + | ||
661 | + //语音模块 | ||
662 | + $('.voice_third').hide() | ||
663 | + $('.icon_cancle').hide() | ||
664 | + | ||
665 | + var title_id = '' | ||
666 | + | ||
667 | + //我要发送 | ||
668 | + $('.submit_voice').click(function () { | ||
669 | + voiceBox.find('.voice_first').hide().siblings('.voice_third').show() | ||
670 | + wx.uploadVoice({localId: localId, // 需要上传的音频的本地ID,由stopRecord接口获得 | ||
671 | + isShowProgressTips: 1, // 默认为1,显示进度提示 | ||
672 | + success: function (res) { | ||
673 | + voiceBox.find('.voice_first').hide().siblings('.voice_third').attr('data-serverid',res.serverId); | ||
674 | + } | ||
675 | + }); | ||
676 | + voiceBox.find('.voice_first').hide().siblings('.voice_third').attr('data-try',localId); | ||
677 | + voiceBox.find('.voice_first').hide().siblings('.voice_third').attr('data-time',timeLength); | ||
678 | + voiceBox.find('.timeLength').html(timeLength); | ||
679 | + $('.second').hide() | ||
680 | + }) | ||
681 | + | ||
682 | + //确认音频 | ||
683 | + $('.upload').click(function () { | ||
684 | + var videolist = $(".voice_module"); | ||
685 | + for (var i = 0; i < videolist.length; i++) { | ||
686 | + var videoid = $(videolist[i]).attr("video-id"); | ||
687 | + if (videoid == title_id) { | ||
688 | + $('.second').hide() | ||
689 | + $(videolist[i]).show(); | ||
690 | + $(videolist[i]).children('.voice_list').hide() | ||
691 | + $(videolist[i]).children('.voice_third').show(); | ||
692 | + /*上面放上 音频id和本地地址*/ | ||
693 | + $(videolist[i]).children('.voice_third').attr('try-id',localId); | ||
694 | + $(videolist[i]).children('.voice_third').data('data-try',localId); | ||
695 | + $(videolist[i]).children('.voice_third').attr('id','audio'+videoid); | ||
696 | + wx.uploadVoice({ | ||
697 | + localId: localId, // 需要上传的音频的本地ID,由stopRecord接口获得 | ||
698 | + isShowProgressTips: 1, // 默认为1,显示进度提示 | ||
699 | + success: function (res) { | ||
700 | + var serverId = res.serverId; // 返回音频的服务器端ID | ||
701 | + $(videolist[i]).children('.voice_third').attr('server-id',serverId); | ||
702 | + $(videolist[i]).children('.voice_third').data('data-server',serverId); | ||
703 | + localId=''; | ||
704 | + } | ||
705 | + }); | ||
706 | + } | ||
707 | + } | ||
708 | + }) | ||
709 | + | ||
710 | + //重新录制 | ||
711 | + $('.rerecord').click(function () { | ||
712 | + $('#second_test').html(60); | ||
713 | + $('.first').show() | ||
714 | + $('.second').hide() | ||
715 | + $('.stop').hide() | ||
716 | + $('.stopping').hide() | ||
717 | + $('.start').show() | ||
718 | + }) | ||
719 | + | ||
720 | + //上传图片 | ||
721 | + $(function () { | ||
722 | + var tmpl = '<li class="weui-uploader__file" style="background-image:url(#url#)"></li>', | ||
723 | + $gallery = $("#gallery"), $galleryImg = $("#galleryImg"), | ||
724 | + $uploaderInput = $("#uploaderInput"), | ||
725 | + $uploaderFiles = $("#uploaderFiles") | ||
726 | + ; | ||
727 | + | ||
728 | + $uploaderInput.on("change", function (e) { | ||
729 | + // console.log(e) | ||
730 | + var src, url = window.URL || window.webkitURL || window.mozURL, files = e.target.files; | ||
731 | + for (var i = 0, len = files.length; i < len; ++i) { | ||
732 | + var file = files[i]; | ||
733 | + console.log(url.createObjectURL(file)) | ||
734 | + | ||
735 | + if (url) { | ||
736 | + src = url.createObjectURL(file); | ||
737 | + // var | ||
738 | + } else { | ||
739 | + src = e.target.result; | ||
740 | + } | ||
741 | + $uploaderFiles.append($(tmpl.replace('#url#', src))); | ||
742 | + } | ||
743 | + }); | ||
744 | + $uploaderFiles.on("click", "li", function () { | ||
745 | + $galleryImg.attr("style", this.getAttribute("style")); | ||
746 | + $gallery.fadeIn(100); | ||
747 | + }); | ||
748 | + $gallery.on("click", function () { | ||
749 | + $gallery.fadeOut(100); | ||
750 | + }); | ||
751 | + }); | ||
752 | + | ||
753 | + $('#is_have_question').click(function () { | ||
754 | + var data=$(this).attr('data-id'); | ||
755 | + if(data==1){ | ||
756 | + $('.question_yes').show(); | ||
757 | + $('.question_yes1').css('display','flex'); | ||
758 | + $('.question_no').hide(); | ||
759 | + $(this).attr('data-id',2); | ||
760 | + }else{ | ||
761 | + $('.question_yes').hide(); | ||
762 | + $('.question_yes1').hide(); | ||
763 | + $('.question_no').show(); | ||
764 | + $(this).attr('data-id',1); | ||
765 | + } | ||
766 | + }); | ||
767 | + | ||
768 | + //回复 | ||
769 | + $('#submit_reply').click(function () { | ||
770 | + /*获取病人主诉*/ | ||
771 | + var display=$('.voice_btn1').css('display'); | ||
772 | + //console.log(display1); | ||
773 | + if (display=='none'){ | ||
774 | + var reply=''; | ||
775 | + /*判断发送类型*/ | ||
776 | + var reply_type='1'; | ||
777 | + $('#voice_module1 .voice_third').each(function () { | ||
778 | + /*拼接信息*/ | ||
779 | + var voiceId1=$(this).attr('data-serverid'); | ||
780 | + if (voiceId1!=undefined){ | ||
781 | + if (reply==''){ | ||
782 | + reply=voiceId1; | ||
783 | + }else{ | ||
784 | + reply+=','+voiceId1; | ||
785 | + } | ||
786 | + } | ||
787 | + }) | ||
788 | + }else{ | ||
789 | + var reply=$('.textarea1').val(); | ||
790 | + var reply_type='2'; | ||
791 | + if (!reply){ | ||
792 | + $('.form_popup_box').show(); | ||
793 | + $('.form_popup_box').text('回复内容不能为空'); | ||
794 | + $('.form_popup_box').delay(1000).hide(0); | ||
795 | + return; | ||
796 | + } | ||
797 | + } | ||
798 | + alert(JSON.stringify({ | ||
799 | + reply:reply, | ||
800 | + reply_type:reply_type | ||
801 | + })) | ||
802 | + /*提交后台*/ | ||
803 | + $.ajax({ | ||
804 | + url:"{:url('replyTransfer',array('id'=>$info['id']))}", | ||
805 | + type:'POST', | ||
806 | + data:{ | ||
807 | + reply:reply, | ||
808 | + reply_type:reply_type | ||
809 | + }, | ||
810 | + success:function (res) { | ||
811 | + console.log(res); | ||
812 | + alert(JSON.stringify(res)); | ||
813 | + $('.box').show().delay(2000).hide(2) | ||
814 | + }, | ||
815 | + error:function (res) { | ||
816 | + alert(res); | ||
817 | + } | ||
818 | + }) | ||
819 | + }); | ||
820 | + | ||
821 | + //同意 | ||
822 | + $('#agree_transfer').click(function () { | ||
823 | + | ||
824 | + /*获取病人主诉*/ | ||
825 | + var display2=$('.voice_btn2').css('display'); | ||
826 | + //console.log(display1); | ||
827 | + if (display2=='none'){ | ||
828 | + var reply_again=''; | ||
829 | + /*判断发送类型*/ | ||
830 | + var ireply_again_type='1'; | ||
831 | + $('#voice_module2 .voice_third').each(function () { | ||
832 | + /*拼接信息*/ | ||
833 | + var voiceId1=$(this).attr('data-serverid'); | ||
834 | + if (voiceId1!=undefined){ | ||
835 | + if (reply_again==''){ | ||
836 | + reply_again=voiceId1; | ||
837 | + }else{ | ||
838 | + reply_again+=','+voiceId1; | ||
839 | + } | ||
840 | + } | ||
841 | + }) | ||
842 | + }else{ | ||
843 | + var reply_again=$('.textarea2').val(); | ||
844 | + var reply_again_type='2'; | ||
845 | + if (!reply_again){ | ||
846 | + $('.form_popup_box').show(); | ||
847 | + $('.form_popup_box').text('转诊意见'); | ||
848 | + $('.form_popup_box').delay(1000).hide(0); | ||
849 | + return; | ||
850 | + } | ||
851 | + } | ||
852 | + | ||
853 | + var receive_hospital = $('#receive_hospital').val(); | ||
854 | + var receive_expert = $('#receive_expert').val(); | ||
855 | + var receive_address = $('#receive_address').val(); | ||
856 | + var receive_time = $('#receive_time').val(); | ||
857 | + if (receive_hospital == '') { | ||
858 | + $('.form_popup_box').show(); | ||
859 | + $('.form_popup_box').text('请填写接诊医院'); | ||
860 | + $('.form_popup_box').delay(1000).hide(0); | ||
861 | + return false; | ||
862 | + } else if (receive_expert == '') { | ||
863 | + $('.form_popup_box').show(); | ||
864 | + $('.form_popup_box').text('请填写接诊专家'); | ||
865 | + $('.form_popup_box').delay(1000).hide(0); | ||
866 | + return false; | ||
867 | + } else if (receive_address == '') { | ||
868 | + $('.form_popup_box').show(); | ||
869 | + $('.form_popup_box').text('请填写接诊地点'); | ||
870 | + $('.form_popup_box').delay(1000).hide(0); | ||
871 | + return false; | ||
872 | + } else if (receive_time == '') { | ||
873 | + $('.form_popup_box').show(); | ||
874 | + $('.form_popup_box').text('请填写就诊时间'); | ||
875 | + $('.form_popup_box').delay(1000).hide(0); | ||
876 | + return false; | ||
877 | + } | ||
878 | + /*提交后台*/ | ||
879 | + $.ajax({ | ||
880 | + url:"{:url('agreeTransfer',array('id'=>$info['id']))}", | ||
881 | + type:'POST', | ||
882 | + data:{ | ||
883 | + receive_hospital:receive_hospital, | ||
884 | + receive_expert:receive_expert, | ||
885 | + receive_address:receive_address, | ||
886 | + receive_time:receive_time, | ||
887 | + reply_again:reply_again, | ||
888 | + reply_again_type:reply_again_type | ||
889 | + }, | ||
890 | + success:function (res) { | ||
891 | + console.log(res); | ||
892 | + alert(JSON.stringify(res)); | ||
893 | + $('.box').show().delay(2000).hide(2) | ||
894 | + }, | ||
895 | + error:function (res) { | ||
896 | + alert(res); | ||
897 | + } | ||
898 | + }) | ||
899 | + | ||
900 | + }); | ||
901 | + | ||
902 | + //驳回 | ||
903 | + $('#refuse_transfer').click(function () { | ||
904 | + $.ajax({ | ||
905 | + url:"{:url('refuseTransfer',array('id'=>$info['id']))}", | ||
906 | + type:'POST', | ||
907 | + success:function (res) { | ||
908 | + console.log(res); | ||
909 | + alert(JSON.stringify(res)); | ||
910 | + $('.box').show().delay(2000).hide(2) | ||
911 | + }, | ||
912 | + error:function (res) { | ||
913 | + alert(res); | ||
914 | + } | ||
915 | + }) | ||
916 | + }); | ||
917 | +</script> | ||
918 | +</body> | ||
919 | +</html> |
@@ -128,14 +128,14 @@ | @@ -128,14 +128,14 @@ | ||
128 | <div class="tab_content_box info_item question_yes"> | 128 | <div class="tab_content_box info_item question_yes"> |
129 | <div class="tab_info inquiry_content title"> | 129 | <div class="tab_info inquiry_content title"> |
130 | <text>提问</text> | 130 | <text>提问</text> |
131 | - <text class="iconfont icon-huatong voice_btn"></text> | 131 | + <text class="iconfont icon-huatong voice_btn voice_btn1"></text> |
132 | <text class="iconfont icon-tianxie"></text> | 132 | <text class="iconfont icon-tianxie"></text> |
133 | </div> | 133 | </div> |
134 | <div class="textarea_content"> | 134 | <div class="textarea_content"> |
135 | - <textarea class="area" type="text" placeholder="请输入" maxlength="1000"></textarea> | 135 | + <textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea> |
136 | <p class="text_num num_box"><span class="text-count">0</span>/1000</p> | 136 | <p class="text_num num_box"><span class="text-count">0</span>/1000</p> |
137 | </div> | 137 | </div> |
138 | - <div class="voice_module agree_box" video-id="1"> | 138 | + <div id="voice_module1" class="voice_module agree_box" video-id="1"> |
139 | <div class="voice_list" voiceitemid="1"> | 139 | <div class="voice_list" voiceitemid="1"> |
140 | <div class="voice_box voice_third"> | 140 | <div class="voice_box voice_third"> |
141 | <div class="voice_item"> | 141 | <div class="voice_item"> |
@@ -160,6 +160,59 @@ | @@ -160,6 +160,59 @@ | ||
160 | </div> | 160 | </div> |
161 | </div> | 161 | </div> |
162 | 162 | ||
163 | + <notempty name="info.reply"> | ||
164 | + <!--专家提问显示内容--> | ||
165 | + <div class="tab_content_box"> | ||
166 | + <div class="tab_info"> | ||
167 | + <text>专家提问</text> | ||
168 | + </div> | ||
169 | + <div class="user_info_box"> | ||
170 | + <eq name="info.reply.type" value="1"> | ||
171 | + <div class="voice_box" > | ||
172 | + <foreach name="info.reply.dir" item="item"> | ||
173 | + <div class="voice_item"> | ||
174 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
175 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
176 | + <text class="voice_font">点击图标开始播放</text> | ||
177 | + </div> | ||
178 | + </foreach> | ||
179 | + </div> | ||
180 | + <else/> | ||
181 | + <div class="tab_textarea"> | ||
182 | + <textarea readonly>{$info.reply.content}</textarea> | ||
183 | + </div> | ||
184 | + </eq> | ||
185 | + </div> | ||
186 | + </div> | ||
187 | + <!--回复专家的内容--> | ||
188 | + <div class="tab_content_box"> | ||
189 | + <div class="tab_info"> | ||
190 | + <text>回答</text> | ||
191 | + </div> | ||
192 | + <div class="user_info_box"> | ||
193 | + <notempty name="info.problem_again"> | ||
194 | + <eq name="info.problem_again.type" value="1"> | ||
195 | + <div class="voice_box" > | ||
196 | + <foreach name="info.problem_again.dir" item="item"> | ||
197 | + <div class="voice_item"> | ||
198 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
199 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
200 | + <text class="voice_font">点击图标开始播放</text> | ||
201 | + </div> | ||
202 | + </foreach> | ||
203 | + </div> | ||
204 | + <else/> | ||
205 | + <div class="tab_textarea"> | ||
206 | + <textarea readonly>{$info.problem_again.content}</textarea> | ||
207 | + </div> | ||
208 | + </eq> | ||
209 | + <else/> | ||
210 | + 尚未回答 | ||
211 | + </notempty> | ||
212 | + </div> | ||
213 | + </div> | ||
214 | + </notempty> | ||
215 | + | ||
163 | <!--转诊意见内容部分--> | 216 | <!--转诊意见内容部分--> |
164 | <div class="tab_content_box info_item question_no"> | 217 | <div class="tab_content_box info_item question_no"> |
165 | <div class="tab_info inquiry_content title"> | 218 | <div class="tab_info inquiry_content title"> |
@@ -195,29 +248,7 @@ | @@ -195,29 +248,7 @@ | ||
195 | </div> | 248 | </div> |
196 | </div> | 249 | </div> |
197 | </div> | 250 | </div> |
198 | - | ||
199 | - <notempty name="info.reply"> | ||
200 | - <!--专家提问显示内容--> | ||
201 | - <div class="tab_content_box"> | ||
202 | - <div class="tab_info"> | ||
203 | - <text>专家提问</text> | ||
204 | - </div> | ||
205 | - <div class="user_info_box"> | ||
206 | - {$info.reply} | ||
207 | - </div> | ||
208 | - </div> | ||
209 | - <!--回复专家的内容--> | ||
210 | - <div class="tab_content_box"> | ||
211 | - <div class="tab_info"> | ||
212 | - <text>回答</text> | ||
213 | - </div> | ||
214 | - <div class="user_info_box"> | ||
215 | - {$info.problem_again|default='尚未回答'} | ||
216 | - </div> | ||
217 | - </div> | ||
218 | - </notempty> | ||
219 | - | ||
220 | - | 251 | + |
221 | <!--同意转诊须填表单--> | 252 | <!--同意转诊须填表单--> |
222 | <div class="tab_content_box question_no"> | 253 | <div class="tab_content_box question_no"> |
223 | <div class="tab_content"> | 254 | <div class="tab_content"> |
@@ -226,19 +257,19 @@ | @@ -226,19 +257,19 @@ | ||
226 | <div class="info_box"> | 257 | <div class="info_box"> |
227 | <div class="info_item"> | 258 | <div class="info_item"> |
228 | <div class="title">接诊医院</div> | 259 | <div class="title">接诊医院</div> |
229 | - <div class="info_input"><input type="text" placeholder="请填写接诊医院"></div> | 260 | + <div class="info_input"><input type="text" id="receive_hospital" placeholder="请填写接诊医院"></div> |
230 | </div> | 261 | </div> |
231 | <div class="info_item"> | 262 | <div class="info_item"> |
232 | <div class="title">转诊专家</div> | 263 | <div class="title">转诊专家</div> |
233 | - <div class="info_input"><input type="text" placeholder="请填写接诊医院"></div> | 264 | + <div class="info_input"><input type="text" id="receive_expert" placeholder="请填写转诊专家"></div> |
234 | </div> | 265 | </div> |
235 | <div class="info_item"> | 266 | <div class="info_item"> |
236 | <div class="title">接诊地点</div> | 267 | <div class="title">接诊地点</div> |
237 | - <div class="info_input"><input type="text" placeholder="请填写接诊医院"></div> | 268 | + <div class="info_input"><input type="text" id="receive_address" placeholder="请填写接诊地点"></div> |
238 | </div> | 269 | </div> |
239 | <div class="info_item" id="showDatePicker"> | 270 | <div class="info_item" id="showDatePicker"> |
240 | <div class="title">就诊时间</div> | 271 | <div class="title">就诊时间</div> |
241 | - <div class="info_input"><input class="time_value" type="text" placeholder="请填写接诊医院"> | 272 | + <div class="info_input"><input class="time_value" id="receive_time" type="text" placeholder="请选择就诊时间"> |
242 | <text class="iconfont icon-xiala"></text> | 273 | <text class="iconfont icon-xiala"></text> |
243 | </div> | 274 | </div> |
244 | </div> | 275 | </div> |
@@ -246,26 +277,33 @@ | @@ -246,26 +277,33 @@ | ||
246 | </div> | 277 | </div> |
247 | </div> | 278 | </div> |
248 | </div> | 279 | </div> |
249 | - | ||
250 | - <!--确认回复按钮--> | ||
251 | - <div class="agree_btn submit question_yes1">确认回复</div> | ||
252 | - <!----> | ||
253 | - <div class="bottom_box question_no"> | ||
254 | - <div class="agree_btn">同意</div> | ||
255 | - <div class="bottom_btn">驳回</div> | ||
256 | - </div> | 280 | + |
281 | + <eq name="info.status" value="0"> | ||
282 | + <!--确认回复按钮--> | ||
283 | + <div class="agree_btn submit question_yes1" id="submit_reply">确认回复</div> | ||
284 | + <!----> | ||
285 | + <div class="bottom_box question_no"> | ||
286 | + <div class="agree_btn" id="agree_transfer">同意</div> | ||
287 | + <div class="bottom_btn">驳回</div> | ||
288 | + </div> | ||
289 | + </eq> | ||
257 | </div> | 290 | </div> |
258 | -<div class="mask_box" hidden> | 291 | +<div class="mask_box refuse_box" hidden> |
259 | <div class="referral_popup_box"> | 292 | <div class="referral_popup_box"> |
260 | <div>确认驳回</div> | 293 | <div>确认驳回</div> |
261 | <div class="referral_info">确定驳回转诊吗?</div> | 294 | <div class="referral_info">确定驳回转诊吗?</div> |
262 | <div class="referral_btn_box"> | 295 | <div class="referral_btn_box"> |
263 | <div class="btn cancel_btn">取消</div> | 296 | <div class="btn cancel_btn">取消</div> |
264 | - <div class="btn confirm_btn">确认</div> | 297 | + <div class="btn confirm_btn" id="refuse_transfer">确认</div> |
265 | </div> | 298 | </div> |
266 | </div> | 299 | </div> |
267 | </div> | 300 | </div> |
268 | 301 | ||
302 | +<!--表单判断弹窗--> | ||
303 | +<div class="form_popup_box" hidden> | ||
304 | + <text></text> | ||
305 | +</div> | ||
306 | + | ||
269 | <!--录音弹窗--> | 307 | <!--录音弹窗--> |
270 | <div class="mask_box first" hidden> | 308 | <div class="mask_box first" hidden> |
271 | <div class="popup_box"> | 309 | <div class="popup_box"> |
@@ -339,6 +377,14 @@ | @@ -339,6 +377,14 @@ | ||
339 | <script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> | 377 | <script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> |
340 | <!--<script src="__TMPL__/public/assets/js/referral.js"></script>--> | 378 | <!--<script src="__TMPL__/public/assets/js/referral.js"></script>--> |
341 | <script> | 379 | <script> |
380 | + $('.bottom_btn').click(function () { | ||
381 | + $('.refuse_box').show(); | ||
382 | + }); | ||
383 | + | ||
384 | + $('.cancel_btn').click(function () { | ||
385 | + $('.refuse_box').hide(); | ||
386 | + }); | ||
387 | + | ||
342 | wx.config({$sdk}); | 388 | wx.config({$sdk}); |
343 | //文本框显示字数 | 389 | //文本框显示字数 |
344 | $(".area").on("input propertychange", function () { | 390 | $(".area").on("input propertychange", function () { |
@@ -486,7 +532,7 @@ | @@ -486,7 +532,7 @@ | ||
486 | }) | 532 | }) |
487 | 533 | ||
488 | //显示弹窗 | 534 | //显示弹窗 |
489 | - var videoid='' | 535 | + var videoid=''; |
490 | //生命全局唯一 音频 | 536 | //生命全局唯一 音频 |
491 | var voiceBox; | 537 | var voiceBox; |
492 | $(document).on("click", ".mike", function () { | 538 | $(document).on("click", ".mike", function () { |
@@ -496,34 +542,15 @@ | @@ -496,34 +542,15 @@ | ||
496 | $('.stopping').hide() | 542 | $('.stopping').hide() |
497 | $('.stop').hide() | 543 | $('.stop').hide() |
498 | $('.next_step').hide(); | 544 | $('.next_step').hide(); |
499 | - // videoid=$(this).parents(".voice_module").attr("video-id") | ||
500 | - | ||
501 | - // $(this).parents(".voice_first").hide(); | ||
502 | - // $(this).parents(".voice_first").siblings(".voice_third").show() | ||
503 | - // | ||
504 | - // // vioceid=$(this).parents(".voice_first").attr("voiceid"); | ||
505 | - // | ||
506 | 545 | ||
507 | voiceBox = $(this).parents('.voice_list'); | 546 | voiceBox = $(this).parents('.voice_list'); |
508 | 547 | ||
509 | - // console.log(voiceBox) | ||
510 | - // $('.submit_voice').attr('videoid') | ||
511 | - // | ||
512 | - // var videolist = $(".voice_module"); | ||
513 | - // console.log(videolist) | ||
514 | - // for (var i = 0; i < videolist.length; i++) { | ||
515 | - // if (videoid == title_id) { | ||
516 | - // $(videolist[i]).children(".voice_list").children(".voice_list").hide(); | ||
517 | - // $(videolist[i]).children(".voice_list").children(".voice_third").show(); | ||
518 | - // } | ||
519 | - // } | ||
520 | - | ||
521 | }); | 548 | }); |
522 | 549 | ||
523 | //删除语音 | 550 | //删除语音 |
524 | $(".voice_module").on("click",".cancle_voice",function(){ | 551 | $(".voice_module").on("click",".cancle_voice",function(){ |
525 | $(this).parents(".voice_box").remove(); | 552 | $(this).parents(".voice_box").remove(); |
526 | - }) | 553 | + }); |
527 | 554 | ||
528 | //开始录音 | 555 | //开始录音 |
529 | var localId; | 556 | var localId; |
@@ -536,7 +563,7 @@ | @@ -536,7 +563,7 @@ | ||
536 | $('.next_step').hide() | 563 | $('.next_step').hide() |
537 | /*微信开始录音*/ | 564 | /*微信开始录音*/ |
538 | wx.startRecord(); | 565 | wx.startRecord(); |
539 | - }) | 566 | + }); |
540 | 567 | ||
541 | //暂停 | 568 | //暂停 |
542 | $('.pause').click(function () { | 569 | $('.pause').click(function () { |
@@ -544,6 +571,23 @@ | @@ -544,6 +571,23 @@ | ||
544 | $('.start').show() | 571 | $('.start').show() |
545 | $('.stopping').hide() | 572 | $('.stopping').hide() |
546 | 573 | ||
574 | + }); | ||
575 | + | ||
576 | + //播放语音 | ||
577 | + $('.voice_puse').hide() | ||
578 | + //var mySound = new Audio('http://suzhou.w.bronet.cn/upload/admin/20181217/a22c54f3354951b1d612569a126480a5.mp3'); | ||
579 | + $('.voice_play').click(function () { | ||
580 | + var url=$(this).data('url'); | ||
581 | + var mySound = new Audio(url); | ||
582 | + mySound.play(); | ||
583 | + $(this).hide() | ||
584 | + $(this).siblings('.voice_puse').show() | ||
585 | + | ||
586 | + $('.voice_puse').click(function () { | ||
587 | + mySound.pause(); | ||
588 | + $(this).hide() | ||
589 | + $(this).siblings('.voice_play').show() | ||
590 | + }) | ||
547 | }) | 591 | }) |
548 | 592 | ||
549 | //停止录音 | 593 | //停止录音 |
@@ -557,14 +601,14 @@ | @@ -557,14 +601,14 @@ | ||
557 | } | 601 | } |
558 | 602 | ||
559 | }); | 603 | }); |
560 | - }) | 604 | + }); |
561 | 605 | ||
562 | //下一步 | 606 | //下一步 |
563 | $('.next_step').click(function () { | 607 | $('.next_step').click(function () { |
564 | - $('.first').hide() | ||
565 | - $('.second').show() | 608 | + $('.first').hide(); |
609 | + $('.second').show(); | ||
566 | 610 | ||
567 | - }) | 611 | + }); |
568 | 612 | ||
569 | //点击试听 | 613 | //点击试听 |
570 | $('.audition').click(function () { | 614 | $('.audition').click(function () { |
@@ -719,8 +763,157 @@ | @@ -719,8 +763,157 @@ | ||
719 | $('.question_no').show(); | 763 | $('.question_no').show(); |
720 | $(this).attr('data-id',1); | 764 | $(this).attr('data-id',1); |
721 | } | 765 | } |
722 | - }) | 766 | + }); |
723 | 767 | ||
768 | + //回复 | ||
769 | + $('#submit_reply').click(function () { | ||
770 | + /*获取病人主诉*/ | ||
771 | + var display=$('.voice_btn1').css('display'); | ||
772 | + //console.log(display1); | ||
773 | + if (display=='none'){ | ||
774 | + var reply=''; | ||
775 | + /*判断发送类型*/ | ||
776 | + var reply_type='1'; | ||
777 | + $('#voice_module1 .voice_third').each(function () { | ||
778 | + /*拼接信息*/ | ||
779 | + var voiceId1=$(this).attr('data-serverid'); | ||
780 | + if (voiceId1!=undefined){ | ||
781 | + if (reply==''){ | ||
782 | + reply=voiceId1; | ||
783 | + }else{ | ||
784 | + reply+=','+voiceId1; | ||
785 | + } | ||
786 | + } | ||
787 | + }) | ||
788 | + }else{ | ||
789 | + var reply=$('.textarea1').val(); | ||
790 | + var reply_type='2'; | ||
791 | + if (!reply){ | ||
792 | + $('.form_popup_box').show(); | ||
793 | + $('.form_popup_box').text('回复内容不能为空'); | ||
794 | + $('.form_popup_box').delay(1000).hide(0); | ||
795 | + return; | ||
796 | + } | ||
797 | + } | ||
798 | + alert(JSON.stringify({ | ||
799 | + reply:reply, | ||
800 | + reply_type:reply_type | ||
801 | + })) | ||
802 | + /*提交后台*/ | ||
803 | + $.ajax({ | ||
804 | + url:"{:url('replyTransfer',array('id'=>$info['id']))}", | ||
805 | + type:'POST', | ||
806 | + data:{ | ||
807 | + reply:reply, | ||
808 | + reply_type:reply_type | ||
809 | + }, | ||
810 | + success:function (res) { | ||
811 | + console.log(res); | ||
812 | + alert(JSON.stringify(res)); | ||
813 | + $('.box').show().delay(2000).hide(2) | ||
814 | + }, | ||
815 | + error:function (res) { | ||
816 | + alert(res); | ||
817 | + } | ||
818 | + }) | ||
819 | + }); | ||
820 | + | ||
821 | + //同意 | ||
822 | + $('#agree_transfer').click(function () { | ||
823 | + | ||
824 | + /*获取病人主诉*/ | ||
825 | + var display2=$('.voice_btn2').css('display'); | ||
826 | + //console.log(display1); | ||
827 | + if (display2=='none'){ | ||
828 | + var reply_again=''; | ||
829 | + /*判断发送类型*/ | ||
830 | + var ireply_again_type='1'; | ||
831 | + $('#voice_module2 .voice_third').each(function () { | ||
832 | + /*拼接信息*/ | ||
833 | + var voiceId1=$(this).attr('data-serverid'); | ||
834 | + if (voiceId1!=undefined){ | ||
835 | + if (reply_again==''){ | ||
836 | + reply_again=voiceId1; | ||
837 | + }else{ | ||
838 | + reply_again+=','+voiceId1; | ||
839 | + } | ||
840 | + } | ||
841 | + }) | ||
842 | + }else{ | ||
843 | + var reply_again=$('.textarea2').val(); | ||
844 | + var reply_again_type='2'; | ||
845 | + if (!reply_again){ | ||
846 | + $('.form_popup_box').show(); | ||
847 | + $('.form_popup_box').text('转诊意见'); | ||
848 | + $('.form_popup_box').delay(1000).hide(0); | ||
849 | + return; | ||
850 | + } | ||
851 | + } | ||
852 | + | ||
853 | + var receive_hospital = $('#receive_hospital').val(); | ||
854 | + var receive_expert = $('#receive_expert').val(); | ||
855 | + var receive_address = $('#receive_address').val(); | ||
856 | + var receive_time = $('#receive_time').val(); | ||
857 | + if (receive_hospital == '') { | ||
858 | + $('.form_popup_box').show(); | ||
859 | + $('.form_popup_box').text('请填写接诊医院'); | ||
860 | + $('.form_popup_box').delay(1000).hide(0); | ||
861 | + return false; | ||
862 | + } else if (receive_expert == '') { | ||
863 | + $('.form_popup_box').show(); | ||
864 | + $('.form_popup_box').text('请填写接诊专家'); | ||
865 | + $('.form_popup_box').delay(1000).hide(0); | ||
866 | + return false; | ||
867 | + } else if (receive_address == '') { | ||
868 | + $('.form_popup_box').show(); | ||
869 | + $('.form_popup_box').text('请填写接诊地点'); | ||
870 | + $('.form_popup_box').delay(1000).hide(0); | ||
871 | + return false; | ||
872 | + } else if (receive_time == '') { | ||
873 | + $('.form_popup_box').show(); | ||
874 | + $('.form_popup_box').text('请填写就诊时间'); | ||
875 | + $('.form_popup_box').delay(1000).hide(0); | ||
876 | + return false; | ||
877 | + } | ||
878 | + /*提交后台*/ | ||
879 | + $.ajax({ | ||
880 | + url:"{:url('agreeTransfer',array('id'=>$info['id']))}", | ||
881 | + type:'POST', | ||
882 | + data:{ | ||
883 | + receive_hospital:receive_hospital, | ||
884 | + receive_expert:receive_expert, | ||
885 | + receive_address:receive_address, | ||
886 | + receive_time:receive_time, | ||
887 | + reply_again:reply_again, | ||
888 | + reply_again_type:reply_again_type | ||
889 | + }, | ||
890 | + success:function (res) { | ||
891 | + console.log(res); | ||
892 | + alert(JSON.stringify(res)); | ||
893 | + $('.box').show().delay(2000).hide(2) | ||
894 | + }, | ||
895 | + error:function (res) { | ||
896 | + alert(res); | ||
897 | + } | ||
898 | + }) | ||
899 | + | ||
900 | + }); | ||
901 | + | ||
902 | + //驳回 | ||
903 | + $('#refuse_transfer').click(function () { | ||
904 | + $.ajax({ | ||
905 | + url:"{:url('refuseTransfer',array('id'=>$info['id']))}", | ||
906 | + type:'POST', | ||
907 | + success:function (res) { | ||
908 | + console.log(res); | ||
909 | + alert(JSON.stringify(res)); | ||
910 | + $('.box').show().delay(2000).hide(2) | ||
911 | + }, | ||
912 | + error:function (res) { | ||
913 | + alert(res); | ||
914 | + } | ||
915 | + }) | ||
916 | + }); | ||
724 | </script> | 917 | </script> |
725 | </body> | 918 | </body> |
726 | </html> | 919 | </html> |
1 | +<!DOCTYPE html> | ||
2 | +<html lang="en"> | ||
3 | +<head> | ||
4 | + <meta charset="UTF-8"> | ||
5 | + <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no"> | ||
6 | + <title>转诊待答</title> | ||
7 | + <script src="__TMPL__/public/assets/js/fontsize.js"></script> | ||
8 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/init.css"> | ||
9 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/swiper-3.4.2.min.css"> | ||
10 | + <link rel="stylesheet" href="http://at.alicdn.com/t/font_793738_tlxymah92x.css"> | ||
11 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/weui.css"> | ||
12 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/myweui.css"> | ||
13 | + <link rel="stylesheet" href="__TMPL__/public/assets/css/referralModule.css"> | ||
14 | + <style> | ||
15 | + .voice_box{ | ||
16 | + width: 100%; | ||
17 | + } | ||
18 | + .question_yes,.question_yes1{display: none;} | ||
19 | + </style> | ||
20 | +</head> | ||
21 | +<body STYLE="background: #F5F6FA"> | ||
22 | +<div class="container"> | ||
23 | + <div class="tab_content_box top"> | ||
24 | + <div class="tab_info">转诊基本信息</div> | ||
25 | + <div class="tab_content"> | ||
26 | + <div class="content_item"> | ||
27 | + <div class="tab_title">临床表现</div> | ||
28 | + <eq name="info.clinical.type" value="1"> | ||
29 | + <div class="voice_box" > | ||
30 | + <foreach name="info.clinical.dir" item="item"> | ||
31 | + <div class="voice_item"> | ||
32 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
33 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
34 | + <text class="voice_font">点击图标开始播放</text> | ||
35 | + </div> | ||
36 | + </foreach> | ||
37 | + </div> | ||
38 | + <else/> | ||
39 | + <div class="tab_textarea"> | ||
40 | + <textarea readonly>{$info.clinical.content}</textarea> | ||
41 | + </div> | ||
42 | + </eq> | ||
43 | + </div> | ||
44 | + | ||
45 | + <div class="content_item"> | ||
46 | + <div class="tab_title">已做检查</div> | ||
47 | + <eq name="info.inspected.type" value="1"> | ||
48 | + <div class="voice_box" > | ||
49 | + <foreach name="info.inspected.dir" item="item"> | ||
50 | + <div class="voice_item"> | ||
51 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
52 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
53 | + <text class="voice_font">点击图标开始播放</text> | ||
54 | + </div> | ||
55 | + </foreach> | ||
56 | + </div> | ||
57 | + <else/> | ||
58 | + <div class="tab_textarea"> | ||
59 | + <textarea readonly>{$info.inspected.content}</textarea> | ||
60 | + </div> | ||
61 | + </eq> | ||
62 | + </div> | ||
63 | + <div class="content_item"> | ||
64 | + <div class="tab_title">已用药物</div> | ||
65 | + <eq name="info.used_drugs.type" value="1"> | ||
66 | + <div class="voice_box" > | ||
67 | + <foreach name="info.used_drugs.dir" item="item"> | ||
68 | + <div class="voice_item"> | ||
69 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
70 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
71 | + <text class="voice_font">点击图标开始播放</text> | ||
72 | + </div> | ||
73 | + </foreach> | ||
74 | + </div> | ||
75 | + <else/> | ||
76 | + <div class="tab_textarea"> | ||
77 | + <textarea readonly>{$info.used_drugs.content}</textarea> | ||
78 | + </div> | ||
79 | + </eq> | ||
80 | + </div> | ||
81 | + <div class="content_item"> | ||
82 | + <div class="tab_title">当前困惑</div> | ||
83 | + <eq name="info.problem.type" value="1"> | ||
84 | + <div class="voice_box" > | ||
85 | + <foreach name="info.problem.dir" item="item"> | ||
86 | + <div class="voice_item"> | ||
87 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
88 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
89 | + <text class="voice_font">点击图标开始播放</text> | ||
90 | + </div> | ||
91 | + </foreach> | ||
92 | + </div> | ||
93 | + <else/> | ||
94 | + <div class="tab_textarea"> | ||
95 | + <textarea readonly>{$info.problem.content}</textarea> | ||
96 | + </div> | ||
97 | + </eq> | ||
98 | + </div> | ||
99 | + <div class="content_item"> | ||
100 | + <div class="tab_title">咨询时间</div> | ||
101 | + <div>{$info.addtime|date='Y.m.d H:i:s',###}</div> | ||
102 | + </div> | ||
103 | + | ||
104 | + </div> | ||
105 | + </div> | ||
106 | + <div class="tab_content_box"> | ||
107 | + <div class="tab_info">转诊基本信息</div> | ||
108 | + <div class="user_info_box title_info" style="justify-content: normal"> | ||
109 | + <div class="head_box"><img src="{$info.avatar}" alt=""></div> | ||
110 | + <div> | ||
111 | + <div>姓名:{$info.user_nickname}</div> | ||
112 | + <div>电话:{$info.mobile}</div> | ||
113 | + <div>医院:{$info.hospital}</div> | ||
114 | + <div>科室:{$info.office}</div> | ||
115 | + </div> | ||
116 | + </div> | ||
117 | + </div> | ||
118 | + | ||
119 | + <!--提问内容部分--> | ||
120 | + <div class="tab_content_box info_item question_yes"> | ||
121 | + <div class="tab_info inquiry_content title"> | ||
122 | + <text>提问</text> | ||
123 | + <text class="iconfont icon-huatong voice_btn voice_btn1"></text> | ||
124 | + <text class="iconfont icon-tianxie"></text> | ||
125 | + </div> | ||
126 | + <div class="textarea_content"> | ||
127 | + <textarea class="area textarea1" type="text" placeholder="请输入" maxlength="1000"></textarea> | ||
128 | + <p class="text_num num_box"><span class="text-count">0</span>/1000</p> | ||
129 | + </div> | ||
130 | + <div id="voice_module1" class="voice_module agree_box" video-id="1"> | ||
131 | + <div class="voice_list" voiceitemid="1"> | ||
132 | + <div class="voice_box voice_third"> | ||
133 | + <div class="voice_item"> | ||
134 | + <text class="iconfont icon-luyin voice_icon"></text> | ||
135 | + <text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span>秒</text> | ||
136 | + </div> | ||
137 | + <div class="voice_btn_box"> | ||
138 | + <text class="iconfont icon-quxiao cancle_voice"></text> | ||
139 | + <text class="iconfont icon-tianjia add_voice"></text> | ||
140 | + </div> | ||
141 | + </div> | ||
142 | + <div class="voice_box voice_first" voiceid="1"> | ||
143 | + <div class="voice_item"> | ||
144 | + <text class="iconfont icon-huatong mike voice_icon"></text> | ||
145 | + <text class="voice_font huatong">点击图标开始语音语音最长60秒</text> | ||
146 | + </div> | ||
147 | + <div class="voice_btn_box"> | ||
148 | + <text class="iconfont icon-quxiao icon_cancle"></text> | ||
149 | + </div> | ||
150 | + </div> | ||
151 | + </div> | ||
152 | + </div> | ||
153 | + </div> | ||
154 | + | ||
155 | + <notempty name="info.reply"> | ||
156 | + <!--专家提问显示内容--> | ||
157 | + <div class="tab_content_box"> | ||
158 | + <div class="tab_info"> | ||
159 | + <text>专家提问</text> | ||
160 | + </div> | ||
161 | + <div class="user_info_box"> | ||
162 | + <eq name="info.reply.type" value="1"> | ||
163 | + <div class="voice_box" > | ||
164 | + <foreach name="info.reply.dir" item="item"> | ||
165 | + <div class="voice_item"> | ||
166 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
167 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
168 | + <text class="voice_font">点击图标开始播放</text> | ||
169 | + </div> | ||
170 | + </foreach> | ||
171 | + </div> | ||
172 | + <else/> | ||
173 | + <div class="tab_textarea"> | ||
174 | + <textarea readonly>{$info.reply.content}</textarea> | ||
175 | + </div> | ||
176 | + </eq> | ||
177 | + </div> | ||
178 | + </div> | ||
179 | + <!--回复专家的内容--> | ||
180 | + <div class="tab_content_box"> | ||
181 | + <div class="tab_info"> | ||
182 | + <text>回答</text> | ||
183 | + </div> | ||
184 | + <div class="user_info_box"> | ||
185 | + <notempty name="info.problem_again"> | ||
186 | + <eq name="info.problem_again.type" value="1"> | ||
187 | + <div class="voice_box" > | ||
188 | + <foreach name="info.problem_again.dir" item="item"> | ||
189 | + <div class="voice_item"> | ||
190 | + <text class="iconfont icon-luyin voice_icon voice_play" data-url="{$item}"></text> | ||
191 | + <text class="iconfont icon-luying_ongoing voice_icon voice_puse"></text> | ||
192 | + <text class="voice_font">点击图标开始播放</text> | ||
193 | + </div> | ||
194 | + </foreach> | ||
195 | + </div> | ||
196 | + <else/> | ||
197 | + <div class="tab_textarea"> | ||
198 | + <textarea readonly>{$info.problem_again.content}</textarea> | ||
199 | + </div> | ||
200 | + </eq> | ||
201 | + <else/> | ||
202 | + 尚未回答 | ||
203 | + </notempty> | ||
204 | + </div> | ||
205 | + </div> | ||
206 | + </notempty> | ||
207 | + | ||
208 | + <!--转诊意见内容部分--> | ||
209 | + <div class="tab_content_box info_item question_no"> | ||
210 | + <div class="tab_info inquiry_content title"> | ||
211 | + <text>转诊意见</text> | ||
212 | + <text class="iconfont icon-huatong voice_btn voice_btn2"></text> | ||
213 | + <text class="iconfont icon-tianxie"></text> | ||
214 | + </div> | ||
215 | + <div class="textarea_content"> | ||
216 | + <textarea class="area textarea2" type="text" placeholder="请输入" maxlength="1000"></textarea> | ||
217 | + <p class="text_num num_box"><span class="text-count">0</span>/1000</p> | ||
218 | + </div> | ||
219 | + <div id="voice_module2" class="voice_module agree_box" video-id="2"> | ||
220 | + <div class="voice_list" voiceitemid="2"> | ||
221 | + <div class="voice_box voice_third"> | ||
222 | + <div class="voice_item"> | ||
223 | + <text class="iconfont icon-luyin voice_icon"></text> | ||
224 | + <text class="voice_font luyin">点击图标可播放 时长:<span class="timeLength">0</span>秒</text> | ||
225 | + </div> | ||
226 | + <div class="voice_btn_box"> | ||
227 | + <text class="iconfont icon-quxiao cancle_voice"></text> | ||
228 | + <text class="iconfont icon-tianjia add_voice"></text> | ||
229 | + </div> | ||
230 | + </div> | ||
231 | + <div class="voice_box voice_first" voiceid="2"> | ||
232 | + <div class="voice_item"> | ||
233 | + <text class="iconfont icon-huatong mike voice_icon"></text> | ||
234 | + <text class="voice_font huatong">点击图标开始语音语音最长60秒</text> | ||
235 | + </div> | ||
236 | + <div class="voice_btn_box"> | ||
237 | + <text class="iconfont icon-quxiao icon_cancle"></text> | ||
238 | + </div> | ||
239 | + </div> | ||
240 | + </div> | ||
241 | + </div> | ||
242 | + </div> | ||
243 | + | ||
244 | + <!--同意转诊须填表单--> | ||
245 | + <div class="tab_content_box question_no"> | ||
246 | + <div class="tab_content"> | ||
247 | + <div class="content_item"> | ||
248 | + <div class="tab_title">接诊信息(同意转诊时需要填写此表单)</div> | ||
249 | + <div class="info_box"> | ||
250 | + <div class="info_item"> | ||
251 | + <div class="title">接诊医院</div> | ||
252 | + <div class="info_input"><input type="text" id="receive_hospital" value="{$info.receive_hospital}"></div> | ||
253 | + </div> | ||
254 | + <div class="info_item"> | ||
255 | + <div class="title">转诊专家</div> | ||
256 | + <div class="info_input"><input type="text" id="receive_expert" value="{$info.receive_expert}"></div> | ||
257 | + </div> | ||
258 | + <div class="info_item"> | ||
259 | + <div class="title">接诊地点</div> | ||
260 | + <div class="info_input"><input type="text" id="receive_address" value="{$info.receive_address}"></div> | ||
261 | + </div> | ||
262 | + <div class="info_item" id="showDatePicker"> | ||
263 | + <div class="title">就诊时间</div> | ||
264 | + <div class="info_input"><input class="time_value" id="receive_time" type="text" value="{$info.receive_time}"> | ||
265 | + </div> | ||
266 | + </div> | ||
267 | + </div> | ||
268 | + </div> | ||
269 | + </div> | ||
270 | + </div> | ||
271 | +</div> | ||
272 | +<div class="mask_box refuse_box" hidden> | ||
273 | + <div class="referral_popup_box"> | ||
274 | + <div>确认驳回</div> | ||
275 | + <div class="referral_info">确定驳回转诊吗?</div> | ||
276 | + <div class="referral_btn_box"> | ||
277 | + <div class="btn cancel_btn">取消</div> | ||
278 | + <div class="btn confirm_btn" id="refuse_transfer">确认</div> | ||
279 | + </div> | ||
280 | + </div> | ||
281 | +</div> | ||
282 | + | ||
283 | +<script src="__TMPL__/public/assets/js/jquery-2.1.0.js"></script> | ||
284 | +<script src="__TMPL__/public/assets/js/weui.js"></script> | ||
285 | +<script src="__TMPL__/public/assets/js/myweui.js"></script> | ||
286 | +<script src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script> | ||
287 | +<!--<script src="__TMPL__/public/assets/js/referral.js"></script>--> | ||
288 | +<script> | ||
289 | + $('.bottom_btn').click(function () { | ||
290 | + $('.refuse_box').show(); | ||
291 | + }); | ||
292 | + | ||
293 | + $('.cancel_btn').click(function () { | ||
294 | + $('.refuse_box').hide(); | ||
295 | + }); | ||
296 | + | ||
297 | + //文本框显示字数 | ||
298 | + $(".area").on("input propertychange", function () { | ||
299 | + | ||
300 | + var $this = $(this), | ||
301 | + _val = $this.val(), | ||
302 | + count = ""; | ||
303 | + if (_val.length > 1000) { | ||
304 | + $this.val(_val.substring(0, 1000)); | ||
305 | + } | ||
306 | + count = 1000 - $this.val().length; | ||
307 | + $(this).siblings(".text_num").children('.text-count').text(count); | ||
308 | + }); | ||
309 | + | ||
310 | + //点击 | ||
311 | + $('.info_item').on('click','.title',function () { | ||
312 | + $(this).parent().toggleClass('voice') | ||
313 | + }) | ||
314 | + | ||
315 | + //点击正在播放按钮 | ||
316 | + $('.icon-luying_ongoing').click(function () { | ||
317 | + var videolist = $(".voice_module"); | ||
318 | + for (var i = 0; i < videolist.length; i++) { | ||
319 | + var videoid = $(videolist[i]).attr("video-id"); | ||
320 | + if (videoid == title_id) { | ||
321 | + $(videolist[i]).show(); | ||
322 | + $(videolist[i]).children('.voice_second').hide() | ||
323 | + $(videolist[i]).children('.voice_third').show(); | ||
324 | + } | ||
325 | + } | ||
326 | + }) | ||
327 | + | ||
328 | + | ||
329 | + //播放语音 | ||
330 | + $('.voice_puse').hide() | ||
331 | + //var mySound = new Audio('http://suzhou.w.bronet.cn/upload/admin/20181217/a22c54f3354951b1d612569a126480a5.mp3'); | ||
332 | + $('.voice_play').click(function () { | ||
333 | + var url=$(this).data('url'); | ||
334 | + var mySound = new Audio(url); | ||
335 | + mySound.play(); | ||
336 | + $(this).hide() | ||
337 | + $(this).siblings('.voice_puse').show() | ||
338 | + | ||
339 | + $('.voice_puse').click(function () { | ||
340 | + mySound.pause(); | ||
341 | + $(this).hide() | ||
342 | + $(this).siblings('.voice_play').show() | ||
343 | + }) | ||
344 | + }) | ||
345 | +</script> | ||
346 | +</body> | ||
347 | +</html> |
@@ -950,7 +950,7 @@ | @@ -950,7 +950,7 @@ | ||
950 | } | 950 | } |
951 | }) | 951 | }) |
952 | }else{ | 952 | }else{ |
953 | - var inspected=$('.textarea1').val(); | 953 | + var inspected=$('.textarea2').val(); |
954 | var inspected_type='2'; | 954 | var inspected_type='2'; |
955 | if (!inspected){ | 955 | if (!inspected){ |
956 | $('.form_popup_box').show(); | 956 | $('.form_popup_box').show(); |
@@ -1004,7 +1004,7 @@ | @@ -1004,7 +1004,7 @@ | ||
1004 | } | 1004 | } |
1005 | }) | 1005 | }) |
1006 | }else{ | 1006 | }else{ |
1007 | - var used_drugs=$('.textarea3').val(); | 1007 | + var used_drugs=$('.textarea4').val(); |
1008 | var used_drugs_type='2'; | 1008 | var used_drugs_type='2'; |
1009 | if (!used_drugs){ | 1009 | if (!used_drugs){ |
1010 | $('.form_popup_box').show(); | 1010 | $('.form_popup_box').show(); |
-
请 注册 或 登录 后发表评论