分包医生
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
var filters = {//截取字符串返回
|
||||
substring:function(str,start,end){
|
||||
if(!str){
|
||||
return
|
||||
}
|
||||
//也可做一些判断 //我不需要所以没做其他处理,直接返回的
|
||||
return str.substring(start,end);
|
||||
}
|
||||
}
|
||||
module.exports = {
|
||||
substring:filters.substring
|
||||
}
|
||||
@@ -0,0 +1,576 @@
|
||||
import { API } from '../../../../utils/network/api'
|
||||
import { getTimeAgo } from '../../../../utils/util'
|
||||
// import TIM from '../../../TUIKit/lib/tim-wx-sdk';
|
||||
const api = new API()
|
||||
const app = getApp()
|
||||
Page({
|
||||
data: {
|
||||
navbarData: {
|
||||
showCapsule: 0, //是否显示左上角图标 1表示显示 0表示不显示
|
||||
title: '问诊消息', //导航栏 中间的标题
|
||||
},
|
||||
height: app.globalData.height,
|
||||
has_data: false,
|
||||
data_list_1: [],
|
||||
data_list_2: [],
|
||||
data_list_3: [],
|
||||
data_list_4: [],
|
||||
data_list_5: [],
|
||||
data_list_5_loading: false,
|
||||
static_host: api.getStaticHost(),
|
||||
conversationList: [],
|
||||
message_inquiry_type: 99999,
|
||||
now_message_inquiry_type: 5,
|
||||
system_notice_unreadnnum: "",
|
||||
service_notice_unreadnnum: "",
|
||||
hasOnShow: false,
|
||||
show: false,
|
||||
show_dialog_from_account: "",
|
||||
show_dialog_order_inquiry_id: "",
|
||||
show_dialog_inquiry_type: "",
|
||||
unreadnnum_inter: 0,
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 0,
|
||||
last_page: 0,
|
||||
dot_1: false,
|
||||
dot_2: false,
|
||||
dot_3: false,
|
||||
dot_4: false,
|
||||
},
|
||||
onLoad() {
|
||||
console.log("wenzhen onloadddd");
|
||||
|
||||
// if(wx.$TUIKit){
|
||||
// wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
// }else{
|
||||
// app.imInit().then(res => {
|
||||
// console.log("wenzhen onload imInit");
|
||||
// wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
// });
|
||||
// }
|
||||
|
||||
//监听网络状态变化事件
|
||||
wx.onNetworkStatusChange(function (res) {
|
||||
console.log("onNetworkStatusChange from wenzhen: ")
|
||||
console.log(res.isConnected)
|
||||
console.log(res.networkType)
|
||||
// wx.showToast({
|
||||
// title: '网络类型'+res.networkType,
|
||||
// })
|
||||
})
|
||||
|
||||
},
|
||||
initInterval(){
|
||||
let _this = this;
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
let userID = wx.getStorageSync('user_id_'+usertype);
|
||||
let unreadnnum_inter = setInterval(() => {
|
||||
let system_notice_unreadnnum = wx.getStorageSync(userID+"_system_notice_unreadnnum");
|
||||
let service_notice_unreadnnum = wx.getStorageSync(userID+"_service_notice_unreadnnum");
|
||||
this.setData({
|
||||
system_notice_unreadnnum: system_notice_unreadnnum,
|
||||
service_notice_unreadnnum: service_notice_unreadnnum,
|
||||
})
|
||||
|
||||
if(_this.data.data_list_1.length > 0 || _this.data.data_list_2.length > 0 || _this.data.data_list_3.length > 0 || _this.data.data_list_4.length > 0 || _this.data.data_list_5.length > 0){
|
||||
_this.setData({
|
||||
has_data: true
|
||||
})
|
||||
_this.selectComponent('#tabs').resize();
|
||||
let getCurrentName = _this.selectComponent('#tabs').getCurrentName();
|
||||
let now_message_inquiry_type = _this.data.now_message_inquiry_type;
|
||||
if(getCurrentName != now_message_inquiry_type){
|
||||
_this.setData({
|
||||
now_message_inquiry_type: getCurrentName
|
||||
})
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
this.setData({
|
||||
unreadnnum_inter: unreadnnum_inter
|
||||
})
|
||||
console.log("app.globalData.unreadnnum_inter: ", app.globalData.unreadnnum_inter);
|
||||
},
|
||||
onShow: function () {
|
||||
console.log("onShow from wenzhen V2")
|
||||
if(this.data.hasOnShow){
|
||||
wx.stopPullDownRefresh()
|
||||
return;
|
||||
}
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().setData({
|
||||
active: 1 //数字是当前页面在tabbar的索引,如我的查询页索引是2,因此这边为2,同理首页就为0,审批页面为1
|
||||
})
|
||||
|
||||
this.getTabBar().startInterval()
|
||||
}
|
||||
this.getDoctorInquiryFinishMessage();
|
||||
this.getDoctorMessageNotice();
|
||||
this.getConversationList();
|
||||
if(this.data.unreadnnum_inter == 0){
|
||||
this.initInterval();
|
||||
}
|
||||
//避免onshow加载多次
|
||||
this.setData({
|
||||
hasOnShow: true
|
||||
})
|
||||
|
||||
|
||||
if(wx.$TUIKit){
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
}else{
|
||||
app.imInit().then(res => {
|
||||
console.log("wenzhen onload imInit");
|
||||
wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
|
||||
});
|
||||
}
|
||||
},
|
||||
onHide(){
|
||||
console.log("onHideonHide from wenzhen")
|
||||
if (typeof this.getTabBar === 'function' && this.getTabBar()) {
|
||||
this.getTabBar().stopInterval()
|
||||
}
|
||||
clearInterval(this.data.unreadnnum_inter)
|
||||
this.setData({
|
||||
hasOnShow: false,
|
||||
data_list_1: [],
|
||||
data_list_2: [],
|
||||
data_list_3: [],
|
||||
data_list_4: [],
|
||||
data_list_5: [],
|
||||
message_inquiry_type: 9999,
|
||||
now_message_inquiry_type: 5,
|
||||
unreadnnum_inter: 0,
|
||||
has_data: false,
|
||||
current_page: 0,
|
||||
total: 0,
|
||||
per_page: 0,
|
||||
last_page: 0,
|
||||
dot_1: false,
|
||||
dot_2: false,
|
||||
dot_3: false,
|
||||
dot_4: false,
|
||||
})
|
||||
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived);
|
||||
},
|
||||
onUnload(){
|
||||
console.log("onUnload from wenzhen")
|
||||
this.setData({
|
||||
hasOnShow: false,
|
||||
message_inquiry_type: 9999,
|
||||
now_message_inquiry_type: 5,
|
||||
})
|
||||
},
|
||||
getConversationList(){
|
||||
console.log("getConversationListgetConversationListgetConversationList");
|
||||
app.imInit().then(res => {
|
||||
console.log("wenzhen onload imInit: ", res);
|
||||
wx.$TUIKit.getConversationList().then((imResponse) => {
|
||||
console.log("imResponse.data.conversationList from wenzhen_v2: ", imResponse.data.conversationList);
|
||||
this.setData({
|
||||
conversationList: imResponse.data.conversationList,
|
||||
});
|
||||
}).then(() => {
|
||||
console.log("开始查询订单状态")
|
||||
this.formatStatus();
|
||||
}).catch(error => {
|
||||
console.log(error)
|
||||
});
|
||||
});
|
||||
},
|
||||
go(e){
|
||||
this.setData({
|
||||
show: false
|
||||
})
|
||||
let url = e.currentTarget.dataset.url;
|
||||
let name = e.currentTarget.dataset.name;
|
||||
wx.setStorageSync(name, 0);
|
||||
app.go(url);
|
||||
},
|
||||
$onMessageReceived(value) {
|
||||
const message = value.data[0];
|
||||
console.log("message from wenzhen: ",message)
|
||||
this.getConversationList();
|
||||
// let cloudCustomData = JSON.parse(message.cloudCustomData);
|
||||
// let inquiry_type = cloudCustomData.inquiry_type;
|
||||
// let order_inquiry_id = cloudCustomData.order_inquiry_id;
|
||||
// let type = message.type;
|
||||
// let message_txt = "新消息";
|
||||
// console.log(type)
|
||||
// switch (type) {
|
||||
// case TIM.TYPES.MSG_TEXT:
|
||||
// console.log("文本消息");
|
||||
// message_txt = message.payload.text;
|
||||
// break;
|
||||
// case TIM.TYPES.MSG_IMAGE:
|
||||
// console.log("图片消息");
|
||||
// message_txt = "[图片]";
|
||||
// break;
|
||||
// case TIM.TYPES.MSG_AUDIO:
|
||||
// console.log("音频消息")
|
||||
// message_txt = "[语言]";
|
||||
// break;
|
||||
// case TIM.TYPES.MSG_VIDEO:
|
||||
// console.log("视频消息");
|
||||
// message_txt = "[视频]";
|
||||
// break;
|
||||
// case TIM.TYPES.MSG_FILE:
|
||||
// console.log("文件消息")
|
||||
// message_txt = "[文件]";
|
||||
// break;
|
||||
// case TIM.TYPES.MSG_CUSTOM:
|
||||
// console.log("自定义消息")
|
||||
// break;
|
||||
// case TIM.TYPES.MSG_MERGER:
|
||||
// console.log("合并消息")
|
||||
// break;
|
||||
// case TIM.TYPES.MSG_LOCATION:
|
||||
// console.log("位置消息")
|
||||
// message_txt = "[位置]";
|
||||
// break;
|
||||
// case TIM.TYPES.MSG_FACE:
|
||||
// console.log("表情消息")
|
||||
// message_txt = "[表情]";
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// let list_name = "data_list_" + inquiry_type;
|
||||
// let _index = this.data[list_name].findIndex(item => {
|
||||
// return item.order_inquiry_id == order_inquiry_id;
|
||||
// })
|
||||
|
||||
// let new_list = [];
|
||||
// //没有当前会话
|
||||
// if(_index > -1){
|
||||
// let target = list_name + "[" + _index + "].last_message_content.Text";
|
||||
// let target_dot = list_name + "[" + _index + "].message_dot";
|
||||
// console.log("target: ",target);
|
||||
// this.setData({
|
||||
// [target]: message_txt,
|
||||
// [target_dot]: true
|
||||
// })
|
||||
// new_list.push(this.data[list_name][_index]);//先放入目标
|
||||
// }else{
|
||||
// let item = {};
|
||||
// item.inquiry_status = message.inquiry_status;
|
||||
// let txt = {};
|
||||
// txt.Text= message_txt;
|
||||
// item.last_message_content = txt;
|
||||
// item.message_send_time = message.message_send_time;
|
||||
// item.message_seq = message.message_seq;
|
||||
// item.message_type = message.message_type;
|
||||
// item.order_inquiry_id = message.order_inquiry_id;
|
||||
// item.patient_age = message.patient_age;
|
||||
// item.patient_name = message.patient_name;
|
||||
// item.patient_sex = message.patient_sex;
|
||||
// item.to_user_id = message.to_user_id;
|
||||
// item.message_dot = true;
|
||||
// new_list.push(item);
|
||||
// }
|
||||
|
||||
// //置顶
|
||||
// this.data[list_name].forEach((item, index) => {
|
||||
// if(index != _index){
|
||||
// new_list.push(item)
|
||||
// }
|
||||
// })
|
||||
|
||||
// this.setData({
|
||||
// [list_name]: new_list
|
||||
// })
|
||||
|
||||
},
|
||||
formatStatus(){
|
||||
let order_inquiry_id_list = [];
|
||||
order_inquiry_id_list.push("");//初始化一个,防止失败
|
||||
this.data.conversationList.forEach(item => {
|
||||
let conversationID = item.conversationID;
|
||||
if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
|
||||
let lastMessage = item.lastMessage;
|
||||
if(!lastMessage) return;
|
||||
let cloudCustomData = lastMessage.cloudCustomData;
|
||||
if(!cloudCustomData) return;
|
||||
let cloudCustomDataJson;
|
||||
try {
|
||||
cloudCustomDataJson = JSON.parse(cloudCustomData);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return;
|
||||
}
|
||||
let order_inquiry_id = cloudCustomDataJson.order_inquiry_id;
|
||||
order_inquiry_id_list.push(order_inquiry_id);//准备去请求后端那订单状态
|
||||
})
|
||||
let conversationList = this.data.conversationList;
|
||||
//获取医生问诊消息用户属性
|
||||
api.getDoctorInquiryMessageAttr({order_inquiry_ids: order_inquiry_id_list.join(",")}).then(response => {
|
||||
let new_conversationList = [];
|
||||
if(response.data.length > 0){
|
||||
conversationList.forEach(item => {
|
||||
let conversationID = item.conversationID;
|
||||
if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
|
||||
let lastMessage = item.lastMessage;
|
||||
if(!lastMessage) return;
|
||||
let cloudCustomData = lastMessage.cloudCustomData;
|
||||
if(!cloudCustomData) return;
|
||||
let cloudCustomDataJson;
|
||||
try {
|
||||
cloudCustomDataJson = JSON.parse(item.lastMessage.cloudCustomData);
|
||||
} catch (error) {
|
||||
return;
|
||||
}
|
||||
let order_inquiry_id = cloudCustomDataJson.order_inquiry_id;
|
||||
let order = response.data.find(attr_item => {
|
||||
return attr_item.order_inquiry_id == order_inquiry_id;
|
||||
})
|
||||
if(!order) return;
|
||||
|
||||
let inquiry_status = order.inquiry_status;
|
||||
//inquiry_status 状态
|
||||
if(inquiry_status !=3 && inquiry_status != 4){
|
||||
return;
|
||||
}
|
||||
item.inquiry_status = inquiry_status;
|
||||
item.patient_age = order.patient_age;
|
||||
item.patient_name = order.patient_name;
|
||||
item.patient_sex = order.patient_sex;
|
||||
new_conversationList.push(item);
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
conversationList: new_conversationList
|
||||
})
|
||||
}).then(() => {
|
||||
console.log("开始格式化formatConversationList")
|
||||
this.formatConversationList();
|
||||
}).catch(errors => {console.error(errors);})
|
||||
},
|
||||
formatConversationList(){
|
||||
let session_list = [];
|
||||
let session_data_list_1 = [];
|
||||
let session_data_list_2 = [];
|
||||
let session_data_list_3 = [];
|
||||
let session_data_list_4 = [];
|
||||
let session_data_list_5 = [];
|
||||
session_list.push(session_data_list_1);
|
||||
session_list.push(session_data_list_2);
|
||||
session_list.push(session_data_list_3);
|
||||
session_list.push(session_data_list_4);
|
||||
session_list.push(session_data_list_5);
|
||||
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
let userID = wx.getStorageSync('user_id_'+usertype);
|
||||
let totalUnreadCount = 0;
|
||||
let message_inquiry_type = this.data.message_inquiry_type;
|
||||
|
||||
this.data.conversationList.forEach(item => {
|
||||
let conversationID = item.conversationID;
|
||||
if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
|
||||
let lastMessage = item.lastMessage;
|
||||
let type = lastMessage.type;
|
||||
let userProfile = item.userProfile;
|
||||
if(!lastMessage) return;
|
||||
let cloudCustomData = lastMessage.cloudCustomData;
|
||||
if(!cloudCustomData) return;
|
||||
let cloudCustomDataJson = JSON.parse(cloudCustomData);
|
||||
let order_inquiry_id = cloudCustomDataJson.order_inquiry_id;
|
||||
if(!order_inquiry_id) return;
|
||||
let inquiry_type = cloudCustomDataJson.inquiry_type;
|
||||
if(!inquiry_type) return;
|
||||
if(inquiry_type > 4) return;
|
||||
if(inquiry_type < message_inquiry_type){
|
||||
message_inquiry_type = inquiry_type;
|
||||
}
|
||||
//去重order_inquiry_id
|
||||
let index = this.checkOrderInquiryId(session_list[inquiry_type - 1], order_inquiry_id);
|
||||
if(index > -1) return;
|
||||
let patient_family_data = cloudCustomDataJson.patient_family_data;
|
||||
if(patient_family_data == undefined) return;
|
||||
console.log("patient_family_data: ", patient_family_data);
|
||||
let session_item = {};
|
||||
session_item.inquiry_status = item.inquiry_status;//订单状态暂无
|
||||
let txt = {};
|
||||
if(lastMessage.messageForShow == "[自定义消息]"){
|
||||
let text = "自定义消息";
|
||||
let payload = lastMessage.payload;
|
||||
if(payload) {
|
||||
console.log("payload: ",payload.data);
|
||||
let payloadJson = JSON.parse(payload.data);
|
||||
text = payloadJson.title.replaceAll(/—/g, "");
|
||||
}
|
||||
lastMessage.messageForShow = text;
|
||||
}
|
||||
if(lastMessage.isRevoked){
|
||||
if(lastMessage.fromAccount == app.globalData.config.userID){
|
||||
lastMessage.messageForShow = "你撤回了一条消息";
|
||||
}else{
|
||||
lastMessage.messageForShow = "对方撤回了一条消息";
|
||||
}
|
||||
}
|
||||
txt.Text= lastMessage.messageForShow;
|
||||
session_item.last_message_content = txt;
|
||||
session_item.message_send_time = getTimeAgo(lastMessage.lastTime);
|
||||
session_item.message_type = type;
|
||||
session_item.order_inquiry_id = order_inquiry_id;
|
||||
session_item.inquiry_type = inquiry_type;
|
||||
session_item.patient_age = patient_family_data.patient_age;
|
||||
session_item.patient_name = patient_family_data.patient_name;
|
||||
session_item.patient_sex = patient_family_data.patient_sex;
|
||||
session_item.from_account = userProfile.userID;
|
||||
let unreadCount = item.unreadCount;
|
||||
if(unreadCount > 0){
|
||||
totalUnreadCount = totalUnreadCount + unreadCount;
|
||||
session_item.message_dot = true;
|
||||
let dot_name = "dot_"+inquiry_type
|
||||
this.setData({
|
||||
[dot_name]: true
|
||||
})
|
||||
}else{
|
||||
if(item.inquiry_status == 3){
|
||||
totalUnreadCount = totalUnreadCount + 1;
|
||||
session_item.message_dot = true;
|
||||
let dot_name = "dot_"+inquiry_type
|
||||
this.setData({
|
||||
[dot_name]: true
|
||||
})
|
||||
}else{
|
||||
session_item.message_dot = false;
|
||||
}
|
||||
}
|
||||
session_list[inquiry_type - 1].push(session_item);
|
||||
})
|
||||
|
||||
|
||||
wx.setStorageSync(userID+'_wenzhen_info', totalUnreadCount);
|
||||
|
||||
|
||||
this.setData({
|
||||
data_list_1: session_data_list_1,
|
||||
data_list_2: session_data_list_2,
|
||||
data_list_3: session_data_list_3,
|
||||
data_list_4: session_data_list_4,
|
||||
message_inquiry_type: message_inquiry_type
|
||||
})
|
||||
wx.stopPullDownRefresh()
|
||||
// this.selectComponent('#tabs').resize();
|
||||
|
||||
},
|
||||
checkOrderInquiryId(list, order_inquiry_id){
|
||||
let index = list.findIndex(item => {
|
||||
return item.order_inquiry_id == order_inquiry_id;
|
||||
})
|
||||
return index;
|
||||
},
|
||||
onTabsChange(e){
|
||||
console.log(e);
|
||||
},
|
||||
goChat(e){
|
||||
this.setData({
|
||||
show: false
|
||||
})
|
||||
|
||||
// console.log("开始订阅消息");
|
||||
// wx.requestSubscribeMessage({
|
||||
// tmplIds: ['jhYUf91ULCTX_f69hazqAYwImdFf8ELasRAwB6X-MTM'],
|
||||
// success (res) {
|
||||
// console.log(res);
|
||||
// }
|
||||
// })
|
||||
let from_account = e.currentTarget.dataset.from_account;
|
||||
let order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
||||
let inquiry_type = e.currentTarget.dataset.inquiry_type;
|
||||
let url = e.currentTarget.dataset.url+"?from_account="+from_account+"&order_inquiry_id="+order_inquiry_id+"&inquiry_type="+inquiry_type;
|
||||
app.go(url);
|
||||
},
|
||||
postDoctorInquiry(e){
|
||||
this.setData({
|
||||
show: false
|
||||
})
|
||||
console.log("order_inquiry_id: ", e.currentTarget.dataset.order_inquiry_id);
|
||||
let params = {};
|
||||
params.order_inquiry_id = e.currentTarget.dataset.order_inquiry_id;
|
||||
console.log("params: ",params)
|
||||
api.postDoctorInquiry(params).then(response => {
|
||||
console.log("开始接诊");
|
||||
console.log(response);
|
||||
}).then(() => {
|
||||
this.goChat(e);
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
//获取上方角标
|
||||
getDoctorMessageNotice(e){
|
||||
let usertype = wx.getStorageSync('usertype');
|
||||
let userID = wx.getStorageSync('user_id_'+usertype);
|
||||
api.getDoctorMessageNotice().then(response => {
|
||||
let service_message_notice = response.data.service_message_notice;
|
||||
let system_message_notice = response.data.system_message_notice;
|
||||
wx.setStorageSync(userID+"_service_notice_unreadnnum", service_message_notice==true?1:"");//3、医生端系统通知
|
||||
wx.setStorageSync(userID+"_system_notice_unreadnnum", system_message_notice);//4、医生端服务通知
|
||||
}).catch(errors => {
|
||||
console.error(errors);
|
||||
})
|
||||
},
|
||||
tabShow(e){
|
||||
let show_dialog_from_account = e.currentTarget.dataset.show_dialog_from_account;
|
||||
let show_dialog_order_inquiry_id = e.currentTarget.dataset.show_dialog_order_inquiry_id;
|
||||
let show_dialog_inquiry_type = e.currentTarget.dataset.show_dialog_inquiry_type;
|
||||
console.log("tabShowtabShowtabShowtabShow");
|
||||
this.setData({
|
||||
show_dialog_from_account: show_dialog_from_account,
|
||||
show_dialog_order_inquiry_id: show_dialog_order_inquiry_id,
|
||||
show_dialog_inquiry_type: show_dialog_inquiry_type,
|
||||
show: true
|
||||
})
|
||||
},
|
||||
onClose(){
|
||||
console.log("onCloseonCloseonCloseonClose")
|
||||
this.setData({
|
||||
show: false
|
||||
})
|
||||
},
|
||||
vanTabsChange(e){
|
||||
console.log(e)
|
||||
this.setData({
|
||||
now_message_inquiry_type: e.detail.name
|
||||
})
|
||||
},
|
||||
onPullDownRefresh(){
|
||||
console.log("用户下拉动作")
|
||||
this.onHide();
|
||||
this.onShow();
|
||||
},
|
||||
onReachBottom() {
|
||||
console.log('===触底了!!===');
|
||||
let now_message_inquiry_type = this.data.now_message_inquiry_type;
|
||||
if(now_message_inquiry_type == 5){
|
||||
if(this.data.current_page < this.data.last_page){//最后一页时停止分页
|
||||
this.getDoctorInquiryFinishMessage()
|
||||
}
|
||||
}
|
||||
},
|
||||
getDoctorInquiryFinishMessage(){
|
||||
let data_list_5 = this.data.data_list_5;
|
||||
let params = {};
|
||||
params.page = this.data.current_page + 1;
|
||||
this.setData({data_list_5_loading: true})
|
||||
api.getDoctorInquiryFinishMessage(params).then(response => {
|
||||
console.log(response);
|
||||
this.setData({
|
||||
"data_list_5": data_list_5.concat(response.data.data),
|
||||
current_page: response.data.current_page,
|
||||
total: response.data.total,
|
||||
per_page: response.data.per_page,
|
||||
last_page: response.data.last_page
|
||||
})
|
||||
// this.selectComponent('#tabs').resize();
|
||||
}).then(res =>{
|
||||
this.setData({ data_list_5_loading: false})
|
||||
}).catch(errors => {
|
||||
this.setData({ data_list_5_loading: false})
|
||||
console.error(errors);
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"te-nav-bar": "../../../../commpents/te_navbar/index",
|
||||
"wenzhen-data": "../../../../commpents/wenzhen_data/index",
|
||||
"t-tabs": "tdesign-miniprogram/tabs/tabs",
|
||||
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
|
||||
"t-badge": "tdesign-miniprogram/badge/badge",
|
||||
"van-button": "@vant/weapp/button/index",
|
||||
"van-empty": "@vant/weapp/empty/index",
|
||||
"van-image": "@vant/weapp/image/index",
|
||||
"van-tab": "@vant/weapp/tab/index",
|
||||
"van-tabs": "@vant/weapp/tabs/index",
|
||||
"t-dialog": "tdesign-miniprogram/dialog/dialog",
|
||||
"van-divider": "@vant/weapp/divider/index",
|
||||
"van-loading": "@vant/weapp/loading/index"
|
||||
},
|
||||
"enablePullDownRefresh": true,
|
||||
"onReachBottomDistance": 100
|
||||
}
|
||||
@@ -0,0 +1,378 @@
|
||||
<!-- 问诊页面 -->
|
||||
<wxs module="dateSubstr" src="./substr.wxs"></wxs>
|
||||
|
||||
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
|
||||
<view class="container">
|
||||
<view class="top">
|
||||
<view class="top_left" bindtap="go" data-name="service_notice_unreadnnum" data-url="/user/pages/yishi/service_notice/index">
|
||||
<t-badge dot="{{service_notice_unreadnnum > 0}}" offset="{{ [1, 1] }}" class="wrapper">
|
||||
<van-image src="{{static_host}}/applet/doctor/static/images/yishi/service_notice.png" fit="heightFix" height="108rpx" aria-label="notice" />
|
||||
</t-badge>
|
||||
服务通知
|
||||
</view>
|
||||
<view class="top_right" bindtap="go" data-name="system_notice_unreadnnum" data-url="/user/pages/yishi/system_notice/index">
|
||||
<t-badge offset="{{ [1, 1] }}" class="wrapper" wx:if="{{system_notice_unreadnnum == ''}}">
|
||||
<van-image src="{{static_host}}/applet/doctor/static/images/yishi/system_notice.png" fit="heightFix" height="108rpx" aria-label="notice" />
|
||||
</t-badge>
|
||||
|
||||
<t-badge count="{{system_notice_unreadnnum}}" offset="{{ [1, 1] }}" class="wrapper" wx:else>
|
||||
<van-image src="{{static_host}}/applet/doctor/static/images/yishi/system_notice.png" fit="heightFix" height="108rpx" aria-label="notice" />
|
||||
</t-badge>
|
||||
系统公告
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="empty" wx:if="{{ has_data==false }}" >
|
||||
<view wx:if="{{!data_list_5_loading}}">
|
||||
<van-image src="{{static_host}}/applet/doctor/static/images/yishi/wnzhen_empty.png" fit="heightFix" height="108rpx" aria-label="empty" />
|
||||
<view class="empty_note">未收到任何消息</view>
|
||||
</view>
|
||||
<van-loading size="24px" wx:if="{{data_list_5_loading}}">加载中...</van-loading>
|
||||
</view>
|
||||
<!-- <van-button color="#3CC7C0" custom-style="width: 92vw;margin: 0 auto;border-radius: 10rpx;" block wx:if="{{ !has_data }}">开通图文问诊</van-button> -->
|
||||
|
||||
<!-- <view class="tabs" wx:if="{{ has_data }}" >
|
||||
<t-tabs
|
||||
default-value="{{ message_inquiry_type }}"
|
||||
sticky
|
||||
bind:change="onTabsChange"
|
||||
bind:scroll="onStickyScroll"
|
||||
t-class="custom-tabs"
|
||||
theme="line"
|
||||
swipeable="{{false}}"
|
||||
custom-style="font-size: 32rpx"
|
||||
>
|
||||
<t-tab-panel label="在线问诊" value="1" wx:if="{{data_list_1.length > 0}}">
|
||||
|
||||
<wenzhen-data
|
||||
name="{{ item.patient_name }}"
|
||||
sex="{{ item.patient_sex==1?'男':'女' }}"
|
||||
age="{{ item.patient_age }}"
|
||||
date="{{ item.message_send_time }}"
|
||||
desc="{{ item.last_message_content.Text }}"
|
||||
status="{{ item.inquiry_status }}"
|
||||
order_inquiry_id="{{ item.order_inquiry_id }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
|
||||
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
|
||||
message_dot="{{item.message_dot}}"
|
||||
wx:for="{{ data_list_1 }}"
|
||||
/>
|
||||
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_1.length == 0}}" />
|
||||
</t-tab-panel>
|
||||
|
||||
<t-tab-panel label="快速问诊" value="2" wx:if="{{data_list_2.length > 0}}">
|
||||
|
||||
<wenzhen-data
|
||||
name="{{ item.patient_name }}"
|
||||
sex="{{ item.patient_sex==1?'男':'女' }}"
|
||||
age="{{ item.patient_age }}"
|
||||
date="{{ item.message_send_time }}"
|
||||
desc="{{ item.last_message_content.Text }}"
|
||||
status="{{ item.inquiry_status }}"
|
||||
order_inquiry_id="{{ item.order_inquiry_id }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
|
||||
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
|
||||
message_dot="{{item.message_dot}}"
|
||||
from_account="{{item.from_account}}"
|
||||
wx:for="{{ data_list_2 }}"
|
||||
/>
|
||||
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_2.length == 0}}" />
|
||||
|
||||
</t-tab-panel>
|
||||
<t-tab-panel label="公益问诊" value="3" wx:if="{{data_list_3.length > 0}}">
|
||||
|
||||
<wenzhen-data
|
||||
name="{{ item.patient_name }}"
|
||||
sex="{{ item.patient_sex==1?'男':'女' }}"
|
||||
age="{{ item.patient_age }}"
|
||||
date="{{ item.message_send_time }}"
|
||||
desc="{{ item.last_message_content.Text }}"
|
||||
status="{{ item.inquiry_status }}"
|
||||
order_inquiry_id="{{ item.order_inquiry_id }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
|
||||
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
|
||||
message_dot="{{item.message_dot}}"
|
||||
wx:for="{{ data_list_3 }}"
|
||||
/>
|
||||
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_3.length == 0}}" />
|
||||
|
||||
</t-tab-panel>
|
||||
<t-tab-panel label="问诊购药" value="4" wx:if="{{data_list_4.length > 0}}">
|
||||
|
||||
<wenzhen-data
|
||||
name="{{ item.patient_name }}"
|
||||
sex="{{ item.patient_sex==1?'男':'女' }}"
|
||||
age="{{ item.patient_age }}"
|
||||
date="{{ item.message_send_time }}"
|
||||
desc="{{ item.last_message_content.Text }}"
|
||||
status="{{ item.inquiry_status }}"
|
||||
order_inquiry_id="{{ item.order_inquiry_id }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
|
||||
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
|
||||
message_dot="{{item.message_dot}}"
|
||||
wx:for="{{ data_list_4 }}"
|
||||
/>
|
||||
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_4.length == 0}}" />
|
||||
</t-tab-panel>
|
||||
<t-tab-panel label="问诊结束" value="5" wx:if="{{data_list_5.length > 0}}">
|
||||
|
||||
<wenzhen-data
|
||||
name="{{ item.patient_name }}"
|
||||
sex="{{ item.patient_sex==1?'男':'女' }}"
|
||||
age="{{ item.patient_age }}"
|
||||
date="{{ item.message_send_time }}"
|
||||
desc="{{ item.last_message_content.Text }}"
|
||||
status="{{ item.inquiry_status }}"
|
||||
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
|
||||
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
|
||||
message_dot="{{item.message_dot}}"
|
||||
wx:for="{{ data_list_5 }}"
|
||||
/>
|
||||
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_5.length == 0}}" />
|
||||
</t-tab-panel>
|
||||
</t-tabs>
|
||||
</view> -->
|
||||
|
||||
<view class="tabs" wx:if="{{ has_data==true }}">
|
||||
<van-tabs
|
||||
color="#3CC7C0"
|
||||
title-active-color="#3CC7C0"
|
||||
border="{{true}}"
|
||||
id="tabs"
|
||||
bind:change="vanTabsChange"
|
||||
wx:if="{{ has_data }}"
|
||||
>
|
||||
<van-tab title="在线问诊" dot="{{dot_1}}" name="1">
|
||||
<!-- <wenzhen-data
|
||||
name="{{ item.patient_name }}"
|
||||
sex="{{ item.patient_sex==1?'男':'女' }}"
|
||||
age="{{ item.patient_age }}"
|
||||
date="{{ item.message_send_time }}"
|
||||
desc="{{ item.last_message_content.Text }}"
|
||||
status="{{ item.inquiry_status }}"
|
||||
order_inquiry_id="{{ item.order_inquiry_id }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
|
||||
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
|
||||
message_dot="{{item.message_dot}}"
|
||||
wx:for="{{ data_list_1 }}"
|
||||
/> -->
|
||||
|
||||
<!-- aa -->
|
||||
<view class="content" wx:for="{{ data_list_1 }}">
|
||||
<view class="content_1">
|
||||
<view class="name">
|
||||
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
|
||||
{{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}}<t-badge dot="{{item.message_dot || item.inquiry_status==3}}" offset="{{ [-4, 4] }}" content="岁" />
|
||||
</view>
|
||||
<view class="date"> {{item.message_send_time}}</view>
|
||||
</view>
|
||||
<view class="content_2">{{item.last_message_content.Text}}</view>
|
||||
<view class="content_3">
|
||||
<view class="status">{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status == 3 }}">
|
||||
<van-button bind:click="go" data-url="/user/pages/yishi/case/index?order_inquiry_id={{item.order_inquiry_id}}" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
|
||||
<van-button type="default"
|
||||
bindtap="tabShow"
|
||||
data-show_dialog_from_account="{{item.from_account}}"
|
||||
data-show_dialog_order_inquiry_id="{{item.order_inquiry_id}}"
|
||||
data-show_dialog_inquiry_type="{{item.inquiry_type}}"
|
||||
custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;margin-left:20rpx;" color="#3CC7C0">去接诊</van-button>
|
||||
</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status >= 4 }}">
|
||||
<van-button bind:click="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/TUIChatService/pages/index" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
|
||||
<!-- <van-button bind:click="go" data-url="/user/pages/yishi/chat_session/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">会话列表</van-button> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_1.length == 0}}" />
|
||||
<!-- aa -->
|
||||
</van-tab>
|
||||
<van-tab title="快速问诊" dot="{{dot_2}}" name="2">
|
||||
<!-- <wenzhen-data
|
||||
name="{{ item.patient_name }}"
|
||||
sex="{{ item.patient_sex==1?'男':'女' }}"
|
||||
age="{{ item.patient_age }}"
|
||||
date="{{ item.message_send_time }}"
|
||||
desc="{{ item.last_message_content.Text }}"
|
||||
status="{{ item.inquiry_status }}"
|
||||
order_inquiry_id="{{ item.order_inquiry_id }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
|
||||
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
|
||||
message_dot="{{item.message_dot}}"
|
||||
wx:for="{{ data_list_2 }}"
|
||||
/> -->
|
||||
|
||||
<view class="content" wx:for="{{ data_list_2 }}">
|
||||
<view class="content_1">
|
||||
<view class="name">
|
||||
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
|
||||
{{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}}<t-badge dot="{{item.message_dot || item.inquiry_status==3}}" offset="{{ [-4, 4] }}" content="岁" />
|
||||
</view>
|
||||
<view class="date"> {{item.message_send_time}}</view>
|
||||
</view>
|
||||
<view class="content_2">{{item.last_message_content.Text}}</view>
|
||||
<view class="content_3">
|
||||
<view class="status">{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status == 3 }}">
|
||||
<van-button bind:click="go" data-url="/user/pages/yishi/case/index?order_inquiry_id={{item.order_inquiry_id}}" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
|
||||
<van-button type="default" bindtap="tabShow"
|
||||
data-show_dialog_from_account="{{item.from_account}}"
|
||||
data-show_dialog_order_inquiry_id="{{item.order_inquiry_id}}"
|
||||
data-show_dialog_inquiry_type="{{item.inquiry_type}}"
|
||||
custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;margin-left:20rpx;" color="#3CC7C0">去接诊</van-button>
|
||||
</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status >= 4 }}">
|
||||
<van-button bind:click="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/TUIChatService/pages/index" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
|
||||
<!-- <van-button bind:click="go" data-url="/user/pages/yishi/chat_session/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">会话列表</van-button> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_2.length == 0}}" />
|
||||
</van-tab>
|
||||
<van-tab title="公益问诊" dot="{{dot_3}}" name="3">
|
||||
<!-- <wenzhen-data
|
||||
name="{{ item.patient_name }}"
|
||||
sex="{{ item.patient_sex==1?'男':'女' }}"
|
||||
age="{{ item.patient_age }}"
|
||||
date="{{ item.message_send_time }}"
|
||||
desc="{{ item.last_message_content.Text }}"
|
||||
status="{{ item.inquiry_status }}"
|
||||
order_inquiry_id="{{ item.order_inquiry_id }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
|
||||
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
|
||||
message_dot="{{item.message_dot}}"
|
||||
wx:for="{{ data_list_3 }}"
|
||||
/> -->
|
||||
|
||||
<view class="content" wx:for="{{ data_list_3 }}">
|
||||
<view class="content_1">
|
||||
<view class="name">
|
||||
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
|
||||
{{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}}<t-badge dot="{{item.message_dot || item.inquiry_status==3}}" offset="{{ [-4, 4] }}" content="岁" />
|
||||
</view>
|
||||
<view class="date"> {{item.message_send_time}}</view>
|
||||
</view>
|
||||
<view class="content_2">{{item.last_message_content.Text}}</view>
|
||||
<view class="content_3">
|
||||
<view class="status">{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status == 3 }}">
|
||||
<van-button bind:click="go" data-url="/user/pages/yishi/case/index?order_inquiry_id={{item.order_inquiry_id}}" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
|
||||
<van-button type="default" bindtap="tabShow"
|
||||
data-show_dialog_from_account="{{item.from_account}}"
|
||||
data-show_dialog_order_inquiry_id="{{item.order_inquiry_id}}"
|
||||
data-show_dialog_inquiry_type="{{item.inquiry_type}}"
|
||||
custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;margin-left:20rpx;" color="#3CC7C0">去接诊</van-button>
|
||||
</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status >= 4 }}">
|
||||
<van-button bind:click="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/TUIChatService/pages/index" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
|
||||
<!-- <van-button bind:click="go" data-url="/user/pages/yishi/chat_session/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">会话列表</van-button> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_3.length == 0}}" />
|
||||
</van-tab>
|
||||
<van-tab title="问诊购药" dot="{{dot_4}}" name="4">
|
||||
<!-- <wenzhen-data
|
||||
name="{{ item.patient_name }}"
|
||||
sex="{{ item.patient_sex==1?'男':'女' }}"
|
||||
age="{{ item.patient_age }}"
|
||||
date="{{ item.message_send_time }}"
|
||||
desc="{{ item.last_message_content.Text }}"
|
||||
status="{{ item.inquiry_status }}"
|
||||
order_inquiry_id="{{ item.order_inquiry_id }}"
|
||||
inquiry_type="{{item.inquiry_type}}"
|
||||
from_account="{{item.from_account}}"
|
||||
status_text="{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}"
|
||||
note="{{ item.inquiry_status==3?'不接诊24小时后自动取消':'' }}"
|
||||
message_dot="{{item.message_dot}}"
|
||||
wx:for="{{ data_list_4 }}"
|
||||
/> -->
|
||||
|
||||
<view class="content" wx:for="{{ data_list_4 }}">
|
||||
<view class="content_1">
|
||||
<view class="name">
|
||||
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
|
||||
{{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}}<t-badge dot="{{item.message_dot || item.inquiry_status==3}}" offset="{{ [-4, 4] }}" content="岁" />
|
||||
</view>
|
||||
<view class="date"> {{item.message_send_time}}</view>
|
||||
</view>
|
||||
<view class="content_2">{{item.last_message_content.Text}}</view>
|
||||
<view class="content_3">
|
||||
<view class="status">{{ item.inquiry_status==1?'待支付':item.inquiry_status==2?'待分配':item.inquiry_status==3?'待接诊':item.inquiry_status==4?'接诊中':item.inquiry_status==5?'已完成':item.inquiry_status==6?'已结束':item.inquiry_status==7?'已取消':'其他' }}</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status == 3 }}">
|
||||
<van-button bind:click="go" data-url="/user/pages/yishi/case/index?order_inquiry_id={{item.order_inquiry_id}}" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">查看病历</van-button>
|
||||
<van-button type="default" bindtap="tabShow"
|
||||
data-show_dialog_from_account="{{item.from_account}}"
|
||||
data-show_dialog_order_inquiry_id="{{item.order_inquiry_id}}"
|
||||
data-show_dialog_inquiry_type="{{item.inquiry_type}}"
|
||||
custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;margin-left:20rpx;" color="#3CC7C0">去接诊</van-button>
|
||||
</view>
|
||||
<view class="btn" wx:if="{{ item.inquiry_status >= 4 }}">
|
||||
<van-button bind:click="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/TUIChatService/pages/index" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
|
||||
<!-- <van-button bind:click="go" data-url="/user/pages/yishi/chat_session/index" plain custom-style="width:200rpx; border-radius: 10rpx;" color="#3CC7C0">会话列表</van-button> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_4.length == 0}}" />
|
||||
</van-tab>
|
||||
<van-tab title="问诊结束" name="5">
|
||||
<view class="content" wx:for="{{ data_list_5 }}" bindtap="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/TUIChatService/pages/index">
|
||||
<view class="content_1" >
|
||||
<view class="name">
|
||||
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
|
||||
{{item.patient_name}} {{item.patient_sex==1?'男':'女'}}|{{item.patient_age}}<t-badge dot="{{false}}" offset="{{ [-4, 4] }}" content="岁" />
|
||||
</view>
|
||||
<view class="date"> {{dateSubstr.substring(item.complete_time,0,10)}}</view>
|
||||
</view>
|
||||
<view class="content_2">问诊已结束</view>
|
||||
<view class="content_3">
|
||||
<view class="status status_end">{{ item.inquiry_type==1?'专家问诊':item.inquiry_type==2?'快速问诊':item.inquiry_type==3?'公益问诊':item.inquiry_type==4?'问诊购药':'其他' }}</view>
|
||||
</view>
|
||||
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
|
||||
</view>
|
||||
|
||||
<view style="width: 100%;text-align: center;">
|
||||
<van-loading size="24px" wx:if="{{data_list_5_loading}}">加载中...</van-loading>
|
||||
</view>
|
||||
<van-empty description="暂无数据" wx:if="{{data_list_5.length == 0}}" />
|
||||
<van-divider contentPosition="center" wx:if="{{data_list_5.length > 0 && current_page == last_page}}">到底了~</van-divider>
|
||||
</van-tab>
|
||||
</van-tabs>
|
||||
</view>
|
||||
<view style="height: 200rpx;"></view>
|
||||
|
||||
|
||||
<t-dialog
|
||||
visible="{{ show }}"
|
||||
title="温馨提示"
|
||||
close-on-overlay-click
|
||||
bind:close="onClose"
|
||||
content="为保障服务质量,请您查看患者病历后再去接诊"
|
||||
>
|
||||
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="go" data-from_account="{{show_dialog_from_account}}" data-url="/user/pages/yishi/case/index?order_inquiry_id={{show_dialog_order_inquiry_id}}" >去查看</view>
|
||||
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="postDoctorInquiry" data-from_account="{{show_dialog_from_account}}" data-inquiry_type="{{show_dialog_inquiry_type}}" data-order_inquiry_id="{{show_dialog_order_inquiry_id}}" data-url="/TUIChatService/pages/index" >去接诊</view>
|
||||
</t-dialog>
|
||||
</view>
|
||||
@@ -0,0 +1,139 @@
|
||||
page{
|
||||
background-color: #F4F4F4;
|
||||
}
|
||||
.container{
|
||||
width: 100vw;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
.top{
|
||||
margin: 0 auto 30rpx auto;
|
||||
display: flex;
|
||||
padding: 20rpx 20rpx;
|
||||
background-color: rgb(255, 255, 255);
|
||||
}
|
||||
.top_left, .top_right{
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
color: #666666;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.top_left{
|
||||
border-right: 1px solid #F4F4F4;
|
||||
}
|
||||
.t-tab-panel,.t-tabs__content {
|
||||
background-color: #F4F4F4 !important;
|
||||
}
|
||||
.t-tabs__item--active{
|
||||
color: #49B9AD !important;
|
||||
font-size: 32rpx !important;
|
||||
}
|
||||
.t-tabs__item-inner--line{
|
||||
font-size: 28rpx !important;
|
||||
}
|
||||
.t-tabs__track{
|
||||
background-color: var(--td-tab-track-color, var(--td-primary-color, #49B9AD)) !important;
|
||||
}
|
||||
.empty{
|
||||
width: 92vw;
|
||||
margin: 0 auto;
|
||||
height: 500rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.empty_note{
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
.badge--t-badge {
|
||||
vertical-align: baseline !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
.content{
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
.content_1,.content_3,.content_2{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: 20rpx 30rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.content_1,.content_3{
|
||||
flex: 5;
|
||||
}
|
||||
.name{
|
||||
font-size: 30rpx;
|
||||
color: #666666;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
display: flex;
|
||||
}
|
||||
.date{
|
||||
font-size: 30rpx;
|
||||
color: #999;
|
||||
}
|
||||
.content_2{
|
||||
background-color: #FAFAFA;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
min-height: 70rpx;
|
||||
padding: 10rpx 20rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
display: block;
|
||||
line-height: 70rpx;
|
||||
}
|
||||
.status{
|
||||
font-size: 26rpx;
|
||||
color: #FA541C;
|
||||
flex: 1;
|
||||
}
|
||||
.status_end{
|
||||
color: #666666;
|
||||
}
|
||||
.btn{
|
||||
flex: 2;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.content_4{
|
||||
flex: 5;
|
||||
font-size: 24rpx;
|
||||
color: #E34D59;
|
||||
justify-self:flex-end;
|
||||
text-align:right;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #E3E4E5;
|
||||
align-items: center;
|
||||
margin: 0 30rpx;
|
||||
min-height: 70rpx;
|
||||
}
|
||||
.dialog{
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.dialog_cancel_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
border-right: 1px solid #E9E9E9;
|
||||
}
|
||||
.dialog_confirm_btn{
|
||||
border-top: 1px solid #E9E9E9;
|
||||
color: #3CC7C0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user