问诊表
This commit is contained in:
parent
41c265a4c2
commit
dd892964c9
@ -143,6 +143,8 @@ Component({
|
||||
title: ' ',
|
||||
notShow: false,
|
||||
isShow: true,
|
||||
timer:null,
|
||||
recordtime:0,
|
||||
commonFunction: [
|
||||
{ name: '常用语', key: '0' },
|
||||
{ name: '发送订单', key: '1' },
|
||||
@ -175,6 +177,13 @@ Component({
|
||||
});
|
||||
} else {
|
||||
// res.tempFilePath 存储录音文件的临时路径
|
||||
if(res.duration >= 59000){
|
||||
wx.showToast({
|
||||
title: '录音时间不能超过60s',
|
||||
duration:2000,
|
||||
icon: 'none',
|
||||
});
|
||||
}
|
||||
this.sendCallback();
|
||||
const message = wx.$TUIKit.createAudioMessage({
|
||||
to: this.getToAccount(),
|
||||
@ -266,24 +275,70 @@ Component({
|
||||
focus: false,
|
||||
});
|
||||
},
|
||||
openRecord(e,callback){
|
||||
let THIS=this;
|
||||
return new Promise((resolve, reject) => {
|
||||
wx.getSetting({
|
||||
success(res) {
|
||||
if(!(res.authSetting['scope.record'])) { // 关闭订阅消息主按钮
|
||||
return wx.showModal({
|
||||
title: '提示',
|
||||
content: '您已关闭麦克风权限,请点击“确认”按钮在设置中打开麦克风权限。',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
wx.openSetting({
|
||||
success(res) {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
complete(){
|
||||
|
||||
}
|
||||
});
|
||||
} else { // 开放订阅消息主按钮
|
||||
callback(e,THIS);
|
||||
resolve()
|
||||
}
|
||||
},
|
||||
complete(){
|
||||
wx.hideLoading();
|
||||
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 长按录音
|
||||
handleLongPress(e) {
|
||||
if(this.setMsgRound()){
|
||||
this.openRecord(e,this.recording);
|
||||
|
||||
},
|
||||
recording(e,THIS){
|
||||
console.log(THIS);
|
||||
if(THIS.setMsgRound()){
|
||||
wx.aegis.reportEvent({
|
||||
name: 'messageType',
|
||||
ext1: 'messageType-audio',
|
||||
ext2: wx.$chat_reportType,
|
||||
ext3: wx.$chat_SDKAppID,
|
||||
});
|
||||
this.recorderManager.start({
|
||||
THIS.recorderManager.start({
|
||||
duration: 60000, // 录音的时长,单位 ms,最大值 600000(10 分钟)
|
||||
sampleRate: 44100, // 采样率
|
||||
numberOfChannels: 1, // 录音通道数
|
||||
encodeBitRate: 192000, // 编码码率
|
||||
format: 'aac', // 音频格式,选择此格式创建的音频消息,可以在即时通信 IM 全平台(Android、iOS、微信小程序和Web)互通
|
||||
});
|
||||
this.setData({
|
||||
THIS.timer=setInterval(()=>{
|
||||
if(THIS.data.recordtime>59){
|
||||
clearInterval(THIS.timer)
|
||||
};
|
||||
THIS.setData({
|
||||
recordtime:THIS.data.recordtime+1
|
||||
});
|
||||
},1000)
|
||||
THIS.setData({
|
||||
startPoint: e.touches[0],
|
||||
title: '正在录音',
|
||||
// isRecording : true,
|
||||
@ -296,7 +351,6 @@ Component({
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
// 录音时的手势上划移动距离对应文案变化
|
||||
handleTouchMove(e) {
|
||||
if (this.data.isRecording) {
|
||||
@ -331,6 +385,7 @@ Component({
|
||||
});
|
||||
wx.hideLoading();
|
||||
this.recorderManager.stop();
|
||||
clearInterval(this.timer)
|
||||
},
|
||||
// 选中表情消息
|
||||
handleEmoji() {
|
||||
@ -753,7 +808,7 @@ Component({
|
||||
cloudCustomData: JSON.stringify({
|
||||
order_inquiry_id:this.data.order_inquiry_id,
|
||||
inquiry_type:this.data.inquiry_type,
|
||||
message_rounds:this.data.msgData.msg_round+1,
|
||||
message_rounds:this.data.msgData.msg_round,
|
||||
patient_family_data:this.data.patient_family_data,
|
||||
is_system:0
|
||||
}),
|
||||
|
||||
@ -95,6 +95,9 @@
|
||||
<view class="modal-loading">
|
||||
</view>
|
||||
</view>
|
||||
<view class="recordtime">
|
||||
00:{{recordtime<10?'0'+recordtime:recordtime}}
|
||||
</view>
|
||||
<view class="modal-title">
|
||||
{{title}}
|
||||
</view>
|
||||
|
||||
@ -61,7 +61,13 @@
|
||||
.audio-main{
|
||||
padding:12rpx 10rpx;
|
||||
}
|
||||
|
||||
.recordtime{
|
||||
display: flex;
|
||||
font-size: 32rpx;
|
||||
margin-bottom: 10rpx;
|
||||
justify-content: center;
|
||||
color:#fff;
|
||||
}
|
||||
.TUI-message-input-main-focus {
|
||||
|
||||
max-height: 300rpx;
|
||||
@ -169,9 +175,9 @@
|
||||
|
||||
.record-modal .wrapper {
|
||||
display: flex;
|
||||
height: 200rpx;
|
||||
height: 140rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 10vw;
|
||||
padding: 8vw;
|
||||
}
|
||||
|
||||
.record-modal .wrapper .modal-loading {
|
||||
|
||||
@ -245,9 +245,6 @@ Component({
|
||||
'msgData.msg_round':0,
|
||||
'msgData.msg_type':2
|
||||
});
|
||||
// if(cloudCustomData.order_inquiry_id!=this.data.order_inquiry_id){
|
||||
// return false;
|
||||
// };
|
||||
this.triggerEvent("getMessageRounds",this.data.msgData);
|
||||
break;
|
||||
};
|
||||
|
||||
@ -85,6 +85,20 @@ Page({
|
||||
}]
|
||||
|
||||
|
||||
},
|
||||
handleIpt(e){
|
||||
let key = e.target.dataset.id;
|
||||
let obj="personInfo."+key;
|
||||
if(key=='height' || key=="weight"){
|
||||
this.setData({
|
||||
[obj]:e.detail.value
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
[obj]: e.detail.value
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
handleSendFields(){
|
||||
const {order_inquiry_id,personInfo,list1,list2,marital_name,jobname,nationname}=this.data;
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
{{filter.formatwenzhenList(list1,'height').NUMBER}}、身高(CM)
|
||||
</view>
|
||||
<view class="iptbox">
|
||||
<input type="text" value="{{personInfo.height}}" bindinput="handleIpt" data-id="name" placeholder="请输入身高" placeholder-class="placeholder" class="ipt" disabled="{{!showBtn}}" />
|
||||
<input type="text" value="{{personInfo.height}}" bindinput="handleIpt" data-id="height" placeholder="请输入身高" placeholder-class="placeholder" class="ipt" disabled="{{!showBtn}}" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@ -22,7 +22,7 @@
|
||||
{{filter.formatwenzhenList(list1,'weight').NUMBER}}、体重(KG)
|
||||
</view>
|
||||
<view class="iptbox">
|
||||
<input type="text" value="{{personInfo.weight}}" bindinput="handleIpt" data-id="name" placeholder="请请输入体重" placeholder-class="placeholder" class="ipt" disabled="{{!showBtn}}" />
|
||||
<input type="text" value="{{personInfo.weight}}" bindinput="handleIpt" data-id="weight" placeholder="请请输入体重" placeholder-class="placeholder" class="ipt" disabled="{{!showBtn}}" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user