优化聊天
This commit is contained in:
parent
9859b0cbea
commit
75c9d6cae2
@ -5,6 +5,7 @@
|
|||||||
"van-tab": "@vant/weapp/tab/index",
|
"van-tab": "@vant/weapp/tab/index",
|
||||||
"van-tabs": "@vant/weapp/tabs/index",
|
"van-tabs": "@vant/weapp/tabs/index",
|
||||||
"t-avatar": "tdesign-miniprogram/avatar/avatar",
|
"t-avatar": "tdesign-miniprogram/avatar/avatar",
|
||||||
"van-button": "@vant/weapp/button/index"
|
"van-button": "@vant/weapp/button/index",
|
||||||
|
"van-empty": "@vant/weapp/empty/index"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -39,73 +39,77 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<van-empty description="暂无数据" wx:if="{{data_list_0.length == 0}}" />
|
||||||
</van-tab>
|
</van-tab>
|
||||||
<van-tab title="已审核处方">
|
<van-tab title="已审核处方">
|
||||||
<view class="item">
|
<view class="item" wx:for="{{data_list_1}}">
|
||||||
<view class="item_txt">
|
<view class="item_txt">
|
||||||
<view class="pre_content">处方订单号:2023010510324649</view>
|
<view class="pre_content">处方订单号:{{item.prescription_code}}</view>
|
||||||
<view class="end_content">
|
<view class="end_content" bindtap="go" data-url="/Pages/yaoshi/medicalrecord/medicalrecord?order_inquiry_id={{item.order_inquiry_id }}&order_prescription_id={{item.order_prescription_id}}">
|
||||||
<van-button type="primary" color="#ec871e" size="small">查看病例</van-button>
|
<van-button type="primary" color="#ec871e" size="small">查看病例</van-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="item_txt">
|
<view class="item_txt">
|
||||||
<view class="pre_content">开方时间:2023-01-16 08:52</view>
|
<view class="pre_content">开方时间:{{item.created_at}}</view>
|
||||||
<view class="end_content" style="color: #2196f3;">通过</view>
|
<view class="end_content" style="color: #2196f3;">通过</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="item_txt">
|
<view class="item_txt">
|
||||||
<view class="pre_content">张三/男/45岁</view>
|
<view class="pre_content">{{item.patient_name}}/{{item.patient_sex==1?'男':'女'}}/{{item.patient_age}}岁</view>
|
||||||
<view class="end_content">
|
<view class="end_content">
|
||||||
<!-- <van-button type="primary" color="linear-gradient(to bottom, #5EA8D5, #63CFEA)" size="small">去审方</van-button> -->
|
<!-- <van-button type="primary" color="linear-gradient(to bottom, #5EA8D5, #63CFEA)" size="small">去审方</van-button> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<van-empty description="暂无数据" wx:if="{{data_list_1.length == 0}}" />
|
||||||
</van-tab>
|
</van-tab>
|
||||||
<van-tab title="驳回处方">
|
<van-tab title="驳回处方">
|
||||||
<view class="item">
|
<view class="item" wx:for="{{data_list_2}}">
|
||||||
<view class="item_txt">
|
<view class="item_txt">
|
||||||
<view class="pre_content">处方订单号:2023010510324649</view>
|
<view class="pre_content">处方订单号:{{item.prescription_code}}</view>
|
||||||
<view class="end_content">
|
<view class="end_content" bindtap="go" data-url="/Pages/yaoshi/medicalrecord/medicalrecord?order_inquiry_id={{item.order_inquiry_id }}&order_prescription_id={{item.order_prescription_id}}">
|
||||||
<van-button type="primary" color="#ec871e" size="small">查看病例</van-button>
|
<van-button type="primary" color="#ec871e" size="small">查看病例</van-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="item_txt">
|
<view class="item_txt">
|
||||||
<view class="pre_content">开方时间:2023-01-16 08:52</view>
|
<view class="pre_content">开方时间:{{item.created_at}}</view>
|
||||||
<view class="end_content" style="color: red;">驳回</view>
|
<view class="end_content" style="color: red;">驳回</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="item_txt">
|
<view class="item_txt">
|
||||||
<view class="pre_content">张三/男/45岁</view>
|
<view class="pre_content">{{item.patient_name}}/{{item.patient_sex==1?'男':'女'}}/{{item.patient_age}}岁</view>
|
||||||
<view class="end_content">
|
<view class="end_content">
|
||||||
<!-- <van-button type="primary" color="linear-gradient(to bottom, #5EA8D5, #63CFEA)" size="small">去审方</van-button> -->
|
<!-- <van-button type="primary" color="linear-gradient(to bottom, #5EA8D5, #63CFEA)" size="small">去审方</van-button> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<van-empty description="暂无数据" wx:if="{{data_list_2.length == 0}}" />
|
||||||
</van-tab>
|
</van-tab>
|
||||||
<van-tab title="不通过">
|
<van-tab title="不通过">
|
||||||
<view class="item">
|
<view class="item" wx:for="{{data_list_3}}">
|
||||||
<view class="item_txt">
|
<view class="item_txt">
|
||||||
<view class="pre_content">处方订单号:2023010510324649</view>
|
<view class="pre_content">处方订单号:{{item.prescription_code}}</view>
|
||||||
<view class="end_content">
|
<view class="end_content" bindtap="go" data-url="/Pages/yaoshi/medicalrecord/medicalrecord?order_inquiry_id={{item.order_inquiry_id }}&order_prescription_id={{item.order_prescription_id}}">
|
||||||
<van-button type="primary" color="#ec871e" size="small">查看病例</van-button>
|
<van-button type="primary" color="#ec871e" size="small">查看病例</van-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="item_txt">
|
<view class="item_txt">
|
||||||
<view class="pre_content">开方时间:2023-01-16 08:52</view>
|
<view class="pre_content">开方时间:{{item.created_at}}</view>
|
||||||
<view class="end_content" style="color: red;">驳回</view>
|
<view class="end_content" style="color: red;">驳回</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="item_txt">
|
<view class="item_txt">
|
||||||
<view class="pre_content">张三/男/45岁</view>
|
<view class="pre_content">{{item.patient_name}}/{{item.patient_sex==1?'男':'女'}}/{{item.patient_age}}岁</view>
|
||||||
<view class="end_content">
|
<view class="end_content">
|
||||||
<!-- <van-button type="primary" color="linear-gradient(to bottom, #5EA8D5, #63CFEA)" size="small">去审方</van-button> -->
|
<!-- <van-button type="primary" color="linear-gradient(to bottom, #5EA8D5, #63CFEA)" size="small">去审方</van-button> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<van-empty description="暂无数据" wx:if="{{data_list_3.length == 0}}" />
|
||||||
</van-tab>
|
</van-tab>
|
||||||
</van-tabs>
|
</van-tabs>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -1,41 +1,60 @@
|
|||||||
|
import { API } from './../../../utils/network/api'
|
||||||
|
const api = new API()
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
data: {
|
data: {
|
||||||
patient_account: "",
|
|
||||||
title: '',
|
title: '',
|
||||||
height: app.globalData.height,
|
height: app.globalData.height,
|
||||||
order_inquiry_id: "",
|
order_inquiry_id: "",
|
||||||
inquiry_type: "",
|
baseInfo: {}
|
||||||
},
|
},
|
||||||
onLoad(option) {
|
onLoad(option) {
|
||||||
console.log("chat onload", option);
|
console.log("chat onload", option);
|
||||||
let from_account = option.from_account;
|
|
||||||
let order_inquiry_id = option.order_inquiry_id;
|
let order_inquiry_id = option.order_inquiry_id;
|
||||||
let inquiry_type = option.inquiry_type;
|
|
||||||
this.setData({
|
this.setData({
|
||||||
patient_account: from_account,
|
|
||||||
order_inquiry_id: order_inquiry_id,
|
order_inquiry_id: order_inquiry_id,
|
||||||
inquiry_type: inquiry_type,
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
console.log("chat onUnload");
|
console.log("chat onUnload");
|
||||||
},
|
},
|
||||||
onShow(){
|
onShow(){
|
||||||
let _this = this;
|
console.log("chat onShow");
|
||||||
let interval = setInterval(() => {
|
this.getInquiryMessageBasic();
|
||||||
console.log("chat init ,");
|
|
||||||
console.log("app.globalData.chat_sdk_ready: ", app.globalData.chat_sdk_ready);
|
|
||||||
if(app.globalData.chat_sdk_ready){
|
|
||||||
const TUIChat = _this.selectComponent('#TUIChat');
|
|
||||||
TUIChat.init();
|
|
||||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, _this.$onMessageReceived, _this);
|
|
||||||
clearInterval(interval);
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
},
|
},
|
||||||
$onMessageReceived(value) {
|
$onMessageReceived(value) {
|
||||||
const message = value.data[0];
|
const message = value.data[0];
|
||||||
console.log("message from chat: ",message)
|
console.log("message from chat: ",message)
|
||||||
}
|
},
|
||||||
|
initChat(){
|
||||||
|
let _this = this;
|
||||||
|
let count = 0;
|
||||||
|
let interval = setInterval(() => {
|
||||||
|
console.log("chat init count: ", count);
|
||||||
|
console.log("app.globalData.chat_sdk_ready: ", app.globalData.chat_sdk_ready);
|
||||||
|
if(app.globalData.chat_sdk_ready){
|
||||||
|
const TUIChat = _this.selectComponent('#TUIChat');
|
||||||
|
TUIChat.init();
|
||||||
|
// wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, _this.$onMessageReceived, _this);
|
||||||
|
clearInterval(interval);
|
||||||
|
}
|
||||||
|
count = count + 1;
|
||||||
|
if(count > 5){//如果尝试5次不成功就去主动调用IM初始化
|
||||||
|
app.imInit();
|
||||||
|
count = 0;
|
||||||
|
}
|
||||||
|
}, 1000);
|
||||||
|
},
|
||||||
|
//获取问诊订单消息内页基础数据
|
||||||
|
getInquiryMessageBasic() {
|
||||||
|
console.log("order_inquiry_id: ", this.data.order_inquiry_id);
|
||||||
|
api.getInquiryMessageBasic({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
|
||||||
|
console.log(response);
|
||||||
|
this.setData({
|
||||||
|
baseInfo: response.data
|
||||||
|
})
|
||||||
|
}).then(res => {
|
||||||
|
this.initChat();
|
||||||
|
}).catch(errors => {console.error(errors);})
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<!-- 一对一聊天 不带会话列表 -->
|
<!-- 一对一聊天 不带会话列表 -->
|
||||||
<view>
|
<view>
|
||||||
<TUIChat id="TUIChat" currentConversationID="C2C{{patient_account}}" inquiry_type="{{inquiry_type}}" order_inquiry_id="{{order_inquiry_id}}"
|
<TUIChat id="TUIChat" currentConversationID="C2C{{baseInfo.patient_user_id}}" inquiry_type="{{baseInfo.inquiry_type}}" order_inquiry_id="{{order_inquiry_id}}" baseInfo="{{baseInfo}}"
|
||||||
hasCallKit="{{ true }}" bind:handleCall="handleCall"></TUIChat>
|
hasCallKit="{{ true }}" bind:handleCall="handleCall"></TUIChat>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { API } from './../../../utils/network/api'
|
import { API } from './../../../utils/network/api'
|
||||||
|
|
||||||
const api = new API()
|
const api = new API()
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
@ -84,4 +83,9 @@ Page({
|
|||||||
console.log(url);
|
console.log(url);
|
||||||
app.go(url);
|
app.go(url);
|
||||||
},
|
},
|
||||||
|
gochat(e){
|
||||||
|
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
||||||
|
let url = "/Pages/yishi/chat/index?order_inquiry_id="+order_inquiry_id;
|
||||||
|
app.go(url);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
@ -47,7 +47,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 底部按钮 -->
|
<!-- 底部按钮 -->
|
||||||
<view class="item_bottom">
|
<view class="item_bottom" bindtap="gochat" data-order_inquiry_id="{{item.order_inquiry_id}}">
|
||||||
<view class="item_bottom_btn">问诊记录</view>
|
<view class="item_bottom_btn">问诊记录</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -35,6 +35,7 @@ Page({
|
|||||||
doctors_advice_focus: false,
|
doctors_advice_focus: false,
|
||||||
case_detail: {},
|
case_detail: {},
|
||||||
sub_disabled: false,
|
sub_disabled: false,
|
||||||
|
from: ""
|
||||||
},
|
},
|
||||||
onDoctorsAdviceFocus(){
|
onDoctorsAdviceFocus(){
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -42,6 +43,7 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onLoad(options){
|
onLoad(options){
|
||||||
|
let from = options.from;
|
||||||
let order_inquiry_id = options.order_inquiry_id;
|
let order_inquiry_id = options.order_inquiry_id;
|
||||||
let order_prescription_id = options.order_prescription_id ;
|
let order_prescription_id = options.order_prescription_id ;
|
||||||
//获取患者问诊病例
|
//获取患者问诊病例
|
||||||
@ -59,6 +61,7 @@ Page({
|
|||||||
this.setData({
|
this.setData({
|
||||||
order_inquiry_id: order_inquiry_id,
|
order_inquiry_id: order_inquiry_id,
|
||||||
order_prescription_id: order_prescription_id,
|
order_prescription_id: order_prescription_id,
|
||||||
|
from: from
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
select_drug(e){
|
select_drug(e){
|
||||||
@ -360,6 +363,9 @@ Page({
|
|||||||
title: '提交成功',
|
title: '提交成功',
|
||||||
icon: "success"
|
icon: "success"
|
||||||
})
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
wx.navigateBack();
|
||||||
|
}, 1000);
|
||||||
}).catch(errors => {
|
}).catch(errors => {
|
||||||
console.error(errors);
|
console.error(errors);
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -430,13 +436,15 @@ Page({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
api.putDoctorPrescription(params).then(response => {
|
api.putDoctorPrescription(params).then(response => {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
title: '提交成功',
|
title: '提交成功',
|
||||||
icon: "success"
|
icon: "success"
|
||||||
})
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
wx.navigateBack();
|
||||||
|
}, 1000);
|
||||||
}).catch(errors => {
|
}).catch(errors => {
|
||||||
console.error(errors);
|
console.error(errors);
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
<van-cell-group inset>
|
<van-cell-group inset>
|
||||||
<van-cell use-label-slot bind:click="showZhenDuan" custom-style="font-size:30rpx;color: #333;" title="诊断" >
|
<van-cell use-label-slot bind:click="showZhenDuan" custom-style="font-size:30rpx;color: #333;" title="诊断" >
|
||||||
<view class="addzhenduan">+添加诊断</view>
|
<view class="addzhenduan" wx:if="{{from != 'chat'}}">+添加诊断</view>
|
||||||
<view slot="label">
|
<view slot="label">
|
||||||
<view style="margin-top: 20rpx;" class="label_item" wx:for="{{zhenduan_list}}">
|
<view style="margin-top: 20rpx;" class="label_item" wx:for="{{zhenduan_list}}">
|
||||||
<van-icon name="delete" catchtap="delZhenDuan" color="red" data-disease_class_id="{{item.icd_id}}" /><text style="margin-left: 10rpx;">{{item.icd_name}}</text>
|
<van-icon name="delete" catchtap="delZhenDuan" color="red" data-disease_class_id="{{item.icd_id}}" /><text style="margin-left: 10rpx;">{{item.icd_name}}</text>
|
||||||
@ -48,14 +48,14 @@
|
|||||||
<view class="drugs_name">{{ drugs.product_name }}(数量{{ drugs.prescription_product_num}})</view>
|
<view class="drugs_name">{{ drugs.product_name }}(数量{{ drugs.prescription_product_num}})</view>
|
||||||
<view class="drugs_guige">用法用量:{{ drugs.single_use }};{{ drugs.frequency_use }};{{ drugs.single_unit }}</view>
|
<view class="drugs_guige">用法用量:{{ drugs.single_use }};{{ drugs.frequency_use }};{{ drugs.single_unit }}</view>
|
||||||
<!-- <view class="drugs_dosage">备注:{{ drugs.drugs_dosage }}</view> -->
|
<!-- <view class="drugs_dosage">备注:{{ drugs.drugs_dosage }}</view> -->
|
||||||
<view class="btn">
|
<view class="btn" wx:if="{{from != 'chat'}}">
|
||||||
<van-button bind:click="editDrug" size="small" custom-style="font-size:28rpx;" data-product_id="{{drugs.product_id}}" color="#666" plain round type="info">编辑</van-button>
|
<van-button bind:click="editDrug" size="small" custom-style="font-size:28rpx;" data-product_id="{{drugs.product_id}}" color="#666" plain round type="info">编辑</van-button>
|
||||||
<van-button bind:click="delDrug" custom-style="margin-left: 20rpx;font-size:28rpx;" data-product_id="{{drugs.product_id}}" size="small" color="#666" plain round type="info">删除</van-button>
|
<van-button bind:click="delDrug" custom-style="margin-left: 20rpx;font-size:28rpx;" data-product_id="{{drugs.product_id}}" size="small" color="#666" plain round type="info">删除</van-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="adddrugs_btn">
|
<view class="adddrugs_btn" wx:if="{{from != 'chat'}}">
|
||||||
<van-button bind:click="showPopup" color="rgba(44,241,248,0.28);" custom-style="color:#3CC7C0; font-size:30rpx; border-radius: 10rpx;" type="primary" block>+添加药品</van-button>
|
<van-button bind:click="showPopup" color="rgba(44,241,248,0.28);" custom-style="color:#3CC7C0; font-size:30rpx; border-radius: 10rpx;" type="primary" block>+添加药品</van-button>
|
||||||
</view>
|
</view>
|
||||||
<form bindsubmit="{{ order_prescription_id == ''?'postDoctorPrescription':'putDoctorPrescription' }}">
|
<form bindsubmit="{{ order_prescription_id == ''?'postDoctorPrescription':'putDoctorPrescription' }}">
|
||||||
@ -63,7 +63,8 @@
|
|||||||
<view class="doctors_advice" bindtap="onDoctorsAdviceFocus">
|
<view class="doctors_advice" bindtap="onDoctorsAdviceFocus">
|
||||||
<textarea auto-height focus="{{doctors_advice_focus}}" maxlength="1000" bindblur="getAdvice" style="width: 100%;" placeholder-style="font-size:24rpx; color:#999" placeholder="请输入医嘱(5-200字)" name="doctors_advice" value="{{doctor_advice}}"></textarea>
|
<textarea auto-height focus="{{doctors_advice_focus}}" maxlength="1000" bindblur="getAdvice" style="width: 100%;" placeholder-style="font-size:24rpx; color:#999" placeholder="请输入医嘱(5-200字)" name="doctors_advice" value="{{doctor_advice}}"></textarea>
|
||||||
</view>
|
</view>
|
||||||
<view class="sub_btn">
|
<!-- 从聊天页面过来的不显示按钮 -->
|
||||||
|
<view class="sub_btn" wx:if="{{from != 'chat'}}">
|
||||||
<van-button disabled="{{sub_disabled}}" form-type="submit" color="#3CC7C0; font-size:30rpx; border-radius: 10rpx;" type="primary" block>{{ order_prescription_id == ''?'提交审核':'重开处方' }}</van-button>
|
<van-button disabled="{{sub_disabled}}" form-type="submit" color="#3CC7C0; font-size:30rpx; border-radius: 10rpx;" type="primary" block>{{ order_prescription_id == ''?'提交审核':'重开处方' }}</van-button>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,12 @@ Page({
|
|||||||
console.log("wenzhen onload");
|
console.log("wenzhen onload");
|
||||||
let usertype = wx.getStorageSync('usertype');
|
let usertype = wx.getStorageSync('usertype');
|
||||||
let userID = wx.getStorageSync('user_id_'+usertype);
|
let userID = wx.getStorageSync('user_id_'+usertype);
|
||||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
if(wx.$TUIKit){
|
||||||
|
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||||
|
}else{
|
||||||
|
app.imInit();
|
||||||
|
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||||
|
}
|
||||||
setInterval(() => {
|
setInterval(() => {
|
||||||
let system_notice_unreadnnum = wx.getStorageSync(userID+"_system_notice_unreadnnum");
|
let system_notice_unreadnnum = wx.getStorageSync(userID+"_system_notice_unreadnnum");
|
||||||
let service_notice_unreadnnum = wx.getStorageSync(userID+"_service_notice_unreadnnum");
|
let service_notice_unreadnnum = wx.getStorageSync(userID+"_service_notice_unreadnnum");
|
||||||
@ -70,6 +75,11 @@ Page({
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
console.log("开始查询订单状态")
|
console.log("开始查询订单状态")
|
||||||
this.formatStatus();
|
this.formatStatus();
|
||||||
|
}).catch(error => {
|
||||||
|
console.log(error)
|
||||||
|
// 补偿登录操作
|
||||||
|
app.imInit();
|
||||||
|
this.getConversationList();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
go(e){
|
go(e){
|
||||||
@ -302,6 +312,7 @@ Page({
|
|||||||
})
|
})
|
||||||
|
|
||||||
if(wenzhen_info == 0) wenzhen_info = "";
|
if(wenzhen_info == 0) wenzhen_info = "";
|
||||||
|
if(wenzhen_info > 99) wenzhen_info = "99+";
|
||||||
wx.setStorageSync(userID+'_wenzhen_info', wenzhen_info);
|
wx.setStorageSync(userID+'_wenzhen_info', wenzhen_info);
|
||||||
|
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import formateTime from '../../../../../utils/formate-time';
|
import formateTime from '../../../../../utils/formate-time';
|
||||||
import constant from '../../../../../utils/constant';
|
import constant from '../../../../../utils/constant';
|
||||||
|
const app = getApp()
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
Component({
|
Component({
|
||||||
/**
|
/**
|
||||||
@ -144,6 +145,7 @@ Component({
|
|||||||
const renderDom = [{
|
const renderDom = [{
|
||||||
type: 'prescribe',
|
type: 'prescribe',
|
||||||
product_name: data.product_name,
|
product_name: data.product_name,
|
||||||
|
order_inquiry_id: data.order_inquiry_id,
|
||||||
order_prescription_id: data.order_prescription_id,
|
order_prescription_id: data.order_prescription_id,
|
||||||
pharmacist_verify_time: data.pharmacist_verify_time.substring(0,10),
|
pharmacist_verify_time: data.pharmacist_verify_time.substring(0,10),
|
||||||
}];
|
}];
|
||||||
@ -209,5 +211,9 @@ Component({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
go(e){
|
||||||
|
let url = e.currentTarget.dataset.url;
|
||||||
|
app.go(url);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@ -54,7 +54,10 @@
|
|||||||
<view class="evaluation_button">点击评价</view>
|
<view class="evaluation_button">点击评价</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 自定义开处方样式 -->
|
<!-- 自定义开处方样式 -->
|
||||||
<view wx:if="{{renderDom[0].type==='prescribe'}}" class="gdxz_custom_order_prescribe_message" bindtap="toBuy">
|
<view wx:if="{{renderDom[0].type==='prescribe'}}"
|
||||||
|
class="gdxz_custom_order_prescribe_message"
|
||||||
|
data-url="/Pages/yishi/onlinechufang/index?order_inquiry_id={{renderDom[0].order_inquiry_id}}&order_prescription_id={{renderDom[0].order_prescription_id}}&from=chat"
|
||||||
|
bindtap="go">
|
||||||
<view class="prescribe_title">
|
<view class="prescribe_title">
|
||||||
处方已开具
|
处方已开具
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -86,7 +86,6 @@ Component({
|
|||||||
errorMessage: {},
|
errorMessage: {},
|
||||||
errorMessageID: '',
|
errorMessageID: '',
|
||||||
typingMessage: {},
|
typingMessage: {},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
lifetimes: {
|
lifetimes: {
|
||||||
|
|||||||
@ -16,6 +16,8 @@
|
|||||||
.t-message{
|
.t-message{
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: -9;
|
z-index: -9;
|
||||||
|
width: calc(100vw - 20rpx);
|
||||||
|
padding: 0 10rpx;
|
||||||
}
|
}
|
||||||
.t-recieve-message {
|
.t-recieve-message {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -35,7 +37,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
width: 100vw;
|
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
.t-self-message-body {
|
.t-self-message-body {
|
||||||
|
|||||||
@ -60,6 +60,15 @@ Component({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
baseInfo: {
|
||||||
|
type: Object,
|
||||||
|
value: {},
|
||||||
|
observer(baseInfo) {
|
||||||
|
this.setData({
|
||||||
|
"navbarData.title": baseInfo.patient_family_name
|
||||||
|
});
|
||||||
|
},
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
lifetimes: {
|
lifetimes: {
|
||||||
@ -92,7 +101,8 @@ Component({
|
|||||||
|
|
||||||
},
|
},
|
||||||
ready() {
|
ready() {
|
||||||
this.getInquiryMessageBasic()
|
//修改为组件传值
|
||||||
|
// this.getInquiryMessageBasic()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@ -127,7 +137,6 @@ Component({
|
|||||||
showCapsule: 2, //是否显示左上角图标 1表示显示 0表示不显示
|
showCapsule: 2, //是否显示左上角图标 1表示显示 0表示不显示
|
||||||
title: '', //导航栏 中间的标题
|
title: '', //导航栏 中间的标题
|
||||||
},
|
},
|
||||||
baseInfo: {},
|
|
||||||
navbar_height: 0,
|
navbar_height: 0,
|
||||||
dialog_visible: false,
|
dialog_visible: false,
|
||||||
|
|
||||||
@ -151,7 +160,7 @@ Component({
|
|||||||
confirmDialog(){
|
confirmDialog(){
|
||||||
api.putDoctorInquiryFinish({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
|
api.putDoctorInquiryFinish({order_inquiry_id: this.data.order_inquiry_id}).then(response => {
|
||||||
console.log(response);
|
console.log(response);
|
||||||
|
this.getInquiryMessageBasic()
|
||||||
}).catch(errors => {console.error(errors);})
|
}).catch(errors => {console.error(errors);})
|
||||||
this.setData({
|
this.setData({
|
||||||
dialog_visible: false
|
dialog_visible: false
|
||||||
@ -164,7 +173,6 @@ Component({
|
|||||||
console.log(response);
|
console.log(response);
|
||||||
this.setData({
|
this.setData({
|
||||||
baseInfo: response.data,
|
baseInfo: response.data,
|
||||||
"navbarData.title": response.data.patient_name
|
|
||||||
})
|
})
|
||||||
}).catch(errors => {console.error(errors);})
|
}).catch(errors => {console.error(errors);})
|
||||||
},
|
},
|
||||||
@ -263,7 +271,7 @@ Component({
|
|||||||
setNewInputStyle(event.detail.event.detail.height);
|
setNewInputStyle(event.detail.event.detail.height);
|
||||||
this.setData({
|
this.setData({
|
||||||
'viewData.style': newInputStyle,
|
'viewData.style': newInputStyle,
|
||||||
input_area_style: "position: absolute; bottom: 30px;"
|
input_area_style: "position: absolute; bottom: 45rpx;"
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 监听键盘,失去焦点时收起键盘
|
// 监听键盘,失去焦点时收起键盘
|
||||||
|
|||||||
@ -3,12 +3,12 @@
|
|||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="info" wx:if="{{ true }}">
|
<view class="info" wx:if="{{ true }}">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="name">{{baseInfo.patient_name}}</view>
|
<view class="name">{{baseInfo.patient_family_name}}</view>
|
||||||
<view class="age">{{baseInfo.patient_sex==1?'男':'女'}}|{{baseInfo.patient_age}}岁</view>
|
<view class="age">{{baseInfo.patient_family_sex==1?'男':'女'}}|{{baseInfo.patient_family_age}}岁</view>
|
||||||
<view class="status">{{baseInfo.inquiry_status==1?'待支付':baseInfo.inquiry_status==2?'待分配':baseInfo.inquiry_status==3?'待接诊':baseInfo.inquiry_status==4?'已接诊':baseInfo.inquiry_status==5?'已完成':baseInfo.inquiry_status==6?'已结束':baseInfo.inquiry_status==7?'已取消':'未知'}}</view>
|
<view class="status {{baseInfo.inquiry_status==5?'status_complete':''}}">{{baseInfo.inquiry_status==1?'待支付':baseInfo.inquiry_status==2?'待分配':baseInfo.inquiry_status==3?'待接诊':baseInfo.inquiry_status==4?'已接诊':baseInfo.inquiry_status==5?'已完成':baseInfo.inquiry_status==6?'已结束':baseInfo.inquiry_status==7?'已取消':'未知'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="right">
|
||||||
<text class="right_txt" bindtap="putDoctorInquiryFinish">结束问诊</text>
|
<text class="right_txt" bindtap="putDoctorInquiryFinish" wx:if="{{baseInfo.inquiry_status==4}}">结束问诊</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -30,20 +30,20 @@
|
|||||||
<view class="group-profile">
|
<view class="group-profile">
|
||||||
<TUIGroup id="TUIGroup" wx:if="{{isShow}}" conversation="{{conversation}}" bind:groupCall="groupCall" bind:showConversationList="showConversationList"></TUIGroup>
|
<TUIGroup id="TUIGroup" wx:if="{{isShow}}" conversation="{{conversation}}" bind:groupCall="groupCall" bind:showConversationList="showConversationList"></TUIGroup>
|
||||||
</view>
|
</view>
|
||||||
<view class="input-area" style="{{input_area_style}}">
|
<view class="input-area" style="{{input_area_style}}" wx:if="{{baseInfo.inquiry_status == 4}}">
|
||||||
<view class="message-input" style="{{viewData.style}}" wx:if="{{showChat}}">
|
<view class="message-input" style="{{viewData.style}}" wx:if="{{showChat}}">
|
||||||
<MessageInput bind:myhandleExtensions="myhandleExtensions" id="MessageInput" inquiry_type="{{inquiry_type}}" order_inquiry_id="{{order_inquiry_id}}" conversation="{{conversation}}" hasCallKit="{{hasCallKit}}" bind:sendMessage="sendMessage" bind:downKeysBoards="downKeysBoards" bind:pullKeysBoards="pullKeysBoards" bind:showMessageErrorImage="showMessageErrorImage"
|
<MessageInput bind:myhandleExtensions="myhandleExtensions" id="MessageInput" inquiry_type="{{inquiry_type}}" order_inquiry_id="{{order_inquiry_id}}" conversation="{{conversation}}" hasCallKit="{{hasCallKit}}" bind:sendMessage="sendMessage" bind:downKeysBoards="downKeysBoards" bind:pullKeysBoards="pullKeysBoards" bind:showMessageErrorImage="showMessageErrorImage"
|
||||||
bind:handleCall="handleCall" ></MessageInput>
|
bind:handleCall="handleCall" ></MessageInput>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view style="height: 40px;position: fixed;bottom: 0;width: 100%;background-color: #fff;z-index: 1;">
|
||||||
<view style="height: 40px;position: fixed;bottom: 0;width: 100%;background-color: #fff;">
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<t-dialog
|
<t-dialog
|
||||||
visible="{{ dialog_visible }}"
|
visible="{{ dialog_visible }}"
|
||||||
title="温馨提示"
|
title="温馨提示"
|
||||||
content="您确认结束问诊?"
|
content="确定要结束问诊么?"
|
||||||
>
|
>
|
||||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="cancelDialog">
|
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="cancelDialog">
|
||||||
取消
|
取消
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
background-color: #F4F4F4;
|
background-color: #F4F4F4;
|
||||||
|
z-index: 0;
|
||||||
}
|
}
|
||||||
.safetytips-box{
|
.safetytips-box{
|
||||||
background: rgba(255, 149, 0, 0.1);
|
background: rgba(255, 149, 0, 0.1);
|
||||||
@ -97,7 +98,8 @@
|
|||||||
}
|
}
|
||||||
.input-area {
|
.input-area {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 999999;
|
z-index: 2;
|
||||||
|
/* z-index: 999999; */
|
||||||
/* position: absolute;
|
/* position: absolute;
|
||||||
bottom: 20px; */
|
bottom: 20px; */
|
||||||
}
|
}
|
||||||
@ -111,7 +113,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
padding-bottom: var(--padding);
|
padding-bottom: var(--padding);
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
z-index: 999999;
|
/* z-index: 999999; */
|
||||||
}
|
}
|
||||||
.calling {
|
.calling {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@ -173,6 +175,9 @@
|
|||||||
color: #FA541C;
|
color: #FA541C;
|
||||||
padding: 10rpx 20rpx;
|
padding: 10rpx 20rpx;
|
||||||
}
|
}
|
||||||
|
.status_complete{
|
||||||
|
color: #C5C5C5;
|
||||||
|
}
|
||||||
.dialog{
|
.dialog{
|
||||||
width: 50%;
|
width: 50%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { API } from "../../utils/network/api";
|
import { API } from "../../utils/network/api";
|
||||||
const api = new API()
|
const api = new API()
|
||||||
|
const app = getApp()
|
||||||
// commpents/wenzhen_data/index.js
|
// commpents/wenzhen_data/index.js
|
||||||
Component({
|
Component({
|
||||||
/**
|
/**
|
||||||
@ -81,9 +82,7 @@ Component({
|
|||||||
*/
|
*/
|
||||||
methods: {
|
methods: {
|
||||||
go(e){
|
go(e){
|
||||||
wx.navigateTo({
|
app.go(e.currentTarget.dataset.url);
|
||||||
url: e.currentTarget.dataset.url
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
goChat(e){
|
goChat(e){
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -98,9 +97,8 @@ Component({
|
|||||||
let from_account = e.currentTarget.dataset.from_account;
|
let from_account = e.currentTarget.dataset.from_account;
|
||||||
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
||||||
let inquiry_type = e.currentTarget.dataset.inquiry_type;
|
let inquiry_type = e.currentTarget.dataset.inquiry_type;
|
||||||
wx.navigateTo({
|
let url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type;
|
||||||
url: e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type
|
app.go(url);
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
<van-popup show="{{ show }}" bind:close="onClose" round>
|
<van-popup show="{{ show }}" bind:close="onClose" round>
|
||||||
<view class="pop_content">
|
<view class="pop_content">
|
||||||
<view class="pop_title">温馨提示</view>
|
<view class="pop_title">温馨提示</view>
|
||||||
<view class="pop_note">为保障服务质量,请您查看患者病历信息在选择是否接诊。</view>
|
<view class="pop_note">为保障服务质量,请您查看患者病历信息再选择是否接诊。</view>
|
||||||
<view class="pop_btn">
|
<view class="pop_btn">
|
||||||
<view class="pop_btn_left" bindtap="go" data-from_account="{{from_account}}" data-url="/Pages/yishi/case/index?order_inquiry_id={{order_inquiry_id}}" >去查看</view>
|
<view class="pop_btn_left" bindtap="go" data-from_account="{{from_account}}" data-url="/Pages/yishi/case/index?order_inquiry_id={{order_inquiry_id}}" >去查看</view>
|
||||||
<view class="pop_btn_right" bindtap="postDoctorInquiry" data-from_account="{{from_account}}" data-inquiry_type="{{inquiry_type}}" data-order_inquiry_id="{{order_inquiry_id}}" data-url="/Pages/yishi/chat/index" >去接诊</view>
|
<view class="pop_btn_right" bindtap="postDoctorInquiry" data-from_account="{{from_account}}" data-inquiry_type="{{inquiry_type}}" data-order_inquiry_id="{{order_inquiry_id}}" data-url="/Pages/yishi/chat/index" >去接诊</view>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user