8.10提交代码 糖组检测

This commit is contained in:
zoujiandong 2023-08-10 16:17:27 +08:00
parent 34e177d957
commit 833def112c
33 changed files with 688 additions and 190 deletions

View File

@ -19,8 +19,11 @@ Page({
})
},
goReport(event){
const url=event.currentTarget.dataset.url;
},
formatImgList(){
let diagnose_images = this.data.case_detail.diagnose_images;
let diagnose_images = this.data.case_detail.diagnose_images?this.data.case_detail.diagnose_images:[];
let img_list = [];
diagnose_images.forEach(item => {
let img = {};

View File

@ -2,6 +2,7 @@
"component": true,
"usingComponents": {
"te-nav-bar": "/commpents/te_navbar",
"van-icon": "@vant/weapp/icon/index",
"van-uploader": "@vant/weapp/uploader/index"
}
}

View File

@ -58,7 +58,16 @@
</view>
</view>
<view class="sugarbox" wx:if="{{case_detail.detection_project}}" bindtap="goReport" data-url="{{case_detail.detection_link}}">
<view class="main_title">{{case_detail.detection_project_name}}</view>
<view class="data_box sugar">
<view class="sugar_left">
<view class="name">糖组检测</view>
<view class="date">{{case_detail.detection_time}}</view>
</view>
<van-icon name="arrow" />
</view>
</view>
<view class="main_title" wx:if="{{!(case_detail.is_taboo == null && case_detail.is_allergy_history == null && case_detail.is_family_history == null && case_detail.is_pregnant == null && case_detail.drink_wine_status == null && case_detail.smoke_status == null && case_detail.is_operation == null && case_detail.chemical_compound_status == null && case_detail.chemical_compound_status == null)}}">其他信息</view>
<view class="data_box orther" wx:if="{{!(case_detail.is_taboo == null && case_detail.is_allergy_history == null && case_detail.is_family_history == null && case_detail.is_pregnant == null && case_detail.drink_wine_status == null && case_detail.smoke_status == null && case_detail.is_operation == null && case_detail.chemical_compound_status == null && case_detail.chemical_compound_status == null)}}">
<view class="disease_box">

View File

@ -100,3 +100,20 @@ page{
margin-bottom: 50rpx;
}
.sugar{
display: flex;
align-items: center;
justify-content:space-between ;
}
.sugar .name{
color:#333;
font-size: 30rpx;
}
.sugar .date{
margin-top: 12rpx;
font-size: 24rpx;
font-weight: 400;
color: rgba(0,0,0,0.45);
}

View File

@ -0,0 +1,136 @@
// Pages/yishi/medince_list/index.js
import { API } from './../../../utils/network/api'
import debounce from "./../../../utils/debounce"
let api = new API()
Page({
/**
* 页面的初始数据
*/
data: {
navbarData: {
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
title: '药品清单', //导航栏 中间的标题
},
page:1,
list:[],
isLock:false,
per_page:10,
keyword:'',
},
changeInput:debounce(function(event){
const { value }= event.detail;
this.setData({
isLock:false,
page:1,
list:[],
keyword:value
})
this.handleGetList();
},600),
goSearch(){
this.setData({
isLock:false,
list:[],
page:1
})
this.handleGetList();
},
confirmSearch(event){
const { value }= event.detail;
this.setData({
isLock:false,
list:[],
page:1,
keyword:value
})
this.handleGetList();
},
lower(){
console.log('===触底了!!===');
let {page,isLock}=this.data;
if(!isLock){
page++;
this.setData({
page:page
});
this.handleGetList();
}
},
/**
* 生命周期函数--监听页面加载
*/
handleGetList(){
const {page,per_page,keyword}=this.data;
api.getMedinceList({
page,
per_page,
keyword,
}).then(data=>{
let result=data.data.data;
if(result.length==0){
this.setData({
isLock:true
});
return false;
}
this.setData({
list:this.data.list.concat(result)
});
}).catch(errors => {console.error(errors);})
},
onLoad(options) {
this.handleGetList();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -0,0 +1,9 @@
{
"component": true,
"usingComponents": {
"te-nav-bar": "/commpents/te_navbar",
"van-image": "@vant/weapp/image/index",
"van-divider": "@vant/weapp/divider/index",
"van-empty": "@vant/weapp/empty/index"
}
}

View File

@ -0,0 +1,35 @@
<!--Pages/yishi/medince_list/index.wxml-->
<te-nav-bar navbar-data='{{navbarData}}'></te-nav-bar>
<view class="container">
<view class="searchCon">
<view class="searchbox">
<input type="text" value="" class="searchIpt" placeholder="请输入药品名称" confirm-type="search" bindinput="changeInput" bindconfirm="confirmSearch"/>
<image src="../../../static/images/yishi/tabbar_icon/ss.png" mode="" class="searchImg" bindtap="goSearch"/>
</view>
</view>
<scroll-view scroll-y="true" class="scrollbox" bindscrolltolower="lower" wx:if="{{list.length>0}}" >
<view class="cell" wx:for="{{list}}" wx:key="product_id" >
<view class="medimgbox">
<view class="tips">
<view class="desc">处方药品</view>
<view class="desc">依据法规不展示包装</view>
</view>
<image class="medImg" src="../../../static/images/yishi/tabbar_icon/zhiyao.png" mode=""/>
</view>
<view class="rightbox">
<view class="info">
<view class="name">{{item.product_name}}/{{item.packaging_unit}}</view>
<view class="company">{{item.manufacturer}}</view>
</view>
<view class="bottombox">
<view class="price">¥ {{item.product_price}}</view>
<view class="num">库存:{{item.stock}}</view>
</view>
</view>
</view>
<van-divider contentPosition="center" wx:if="{{list.length > 0 && isLock}}">到底了~</van-divider>
</scroll-view>
<van-empty description="暂无数据" wx:if="{{list.length == 0}}" />
</view>

View File

@ -0,0 +1,117 @@
/* Pages/yishi/medince_list/index.wxss */
page{
height:100vh;
background-color: #F6F6F6;
}
.container{
height:calc(100vh - 135rpx);
display: flex;
overflow: hidden;
/* overflow-y: scroll; */
/* -webkit-overflow-scrolling: touch; */
flex-direction: column;
}
.searchCon{
width:100%;
background:#fff;
}
.searchbox{
display: flex;
margin:32rpx;
align-items: center;
height: 80rpx;
background: #FFFFFF;
border-radius: 40rpx;
border: 2rpx solid #3CC7C0;
}
.searchIpt{
flex:1;
margin-left: 32px;
}
.searchImg{
width: 40rpx;
height:40rpx;
padding:30rpx;
}
.tips{
display: flex;
flex-direction: column;
justify-content: center;
position: absolute;
width: 200rpx;
height:200rpx;
font-size: 22rpx;
font-weight: 400;
color: #666666;
}
.desc{
text-align: center;
}
.medimgbox{
position: relative;
width: 200rpx;
height:200rpx;
margin-left: 30rpx;
display: flex;
justify-content: center;
align-items: center;
border-radius:5rpx;
}
.medImg{
width:120rpx;
height:128rpx;
}
.cell{
padding:20rpx 0;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 16rpx 2rpx rgba(0,0,0,0.02);
border-radius: 12rpx;
margin:0 32rpx 20rpx;
display: flex;
}
.rightbox{
flex:1;
margin-left: 24rpx;
margin-right: 20rpx;
}
.scrollbox{
margin-top: 20rpx;
flex:1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.bottombox{
display: flex;
align-items: center;
justify-content: space-between;
}
.info .name{
word-break: break-all;
font-size: 32rpx;
font-weight: 600;
color: rgba(0,0,0,0.85);
}
.company{
margin-top: 5rpx;
font-size: 26rpx;
font-weight: 400;
color: rgba(0,0,0,0.45);
}
.price{
font-size: 28rpx;
color: #EF4F20;
}
.rightbox{
display: flex;
flex-direction: column;
justify-content: space-between;
}
.num{
font-size: 28rpx;
font-weight: 400;
color: rgba(0,0,0,0.65);
}

View File

@ -1,7 +1,7 @@
<view class="container">
<view class="top"></view>
<view class="title" style="top: {{stateHeight}}px;height: {{navHeight}}px;line-height: {{navHeight}}px;">{{ title }}</view>
<view class="info_box" style="top: {{stateHeight}}px;">
<view class="info_box" >
<!-- 跳转我的信息 -->
<view class="photo" bindtap="go" data-url="/Pages/yishi/myinfo/index">
<t-avatar class="avatar" size="large" image="{{avatar}}" />
@ -18,7 +18,7 @@
</view>
</view>
<view class="account" style="top: {{stateHeight}}px;">
<view class="account" >
<view class="account_top">
<view class="account_top_left">
<view class="account_title">
@ -47,7 +47,8 @@
</view>
</view>
<view class="content" style="top: calc(20rpx + {{stateHeight}}px);">
<view class="content">
<van-cell size="large" url="/Pages/yishi/medince_list/index" link-type="navigateTo" title-style="font-size: 34rpx;" title="药品清单" is-link />
<van-cell size="large" url="/Pages/yishi/myaccount/index" link-type="navigateTo" title-style="font-size: 34rpx;" title="我的账户" is-link />
<van-cell size="large" url="/Pages/yishi/bankcard/index" link-type="navigateTo" title-style="font-size: 34rpx;" title="我的银行卡" is-link />
<van-cell size="large" url="/Pages/yishi/mycard/index" link-type="navigateTo" title-style="font-size: 34rpx;" title="我的名片" is-link />

View File

@ -2,6 +2,10 @@ page{
background-color: #F5F5F5;
}
.container{
background: linear-gradient(180deg, #3CC7C0 0%, rgba(60,199,192,0) 50%);
padding-bottom: 100rpx;
min-height:100vh;
width: 100vw;
color: #fff;
position: relative;
@ -9,7 +13,7 @@ page{
.top{
width: 100%;
height: 500rpx;
background-color: #3CC7C0;
/* background-color: #3CC7C0; */
position: absolute;
}
.title{
@ -17,6 +21,7 @@ page{
text-align: center;
}
.info_box{
margin-top: 24rpx;
width: 100%;
height: 200rpx;
position: relative;
@ -62,6 +67,7 @@ page{
width: 92vw;
margin: 0 auto;
height: 272rpx;
margin-top: 24rpx;
position: relative;
border-radius: 20rpx;
display: flex;
@ -104,8 +110,8 @@ page{
.content{
width: 92vw;
background-color: #fff;
margin: 0 auto;
position: relative;
margin: 24rpx auto 0;
position: static;
border-radius: 20rpx;
padding: 20rpx 0;
}

View File

@ -12,6 +12,7 @@ Page({
showText: false,
saveImgPath: "",
info: {},
codeImg:'',
// https://github.com/Kujiale-Mobile/Painter
template: {
width: '750px',
@ -160,6 +161,7 @@ Page({
console.log(response);
this.setData({
info: response.data,
codeImg:response.data.qr_code_url+"?v=3.0",
"template.views[3].url" : response.data.qr_code_url,
"template.views[4].url" : response.data.avatar,
"template.views[5].text" : response.data.user_name,

View File

@ -14,7 +14,7 @@
<t-avatar class="avatar" size="large" image="{{info.avatar}}" />
</view>
<view class="qrcode">
<van-image bindtap="showVisible" src="{{info.qr_code_url+'?v=2.0'}}" fit="heightFix" width="150" height="150" aria-label="qrcode" />
<van-image bindtap="showVisible" src="{{codeImg}}" fit="heightFix" width="150" height="150" aria-label="qrcode" />
<text>让您的患者微信扫码,线上复诊更便捷</text>
</view>

View File

@ -10,6 +10,8 @@ Page({
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
title: '在线开方', //导航栏 中间的标题
},
autoHeight:{ minHeight: 100},
add_disease_desc:'',//医生填写的病情主诉
height: app.globalData.height,
zhenduan_popshow: false,
drugs_popshow: false,
@ -323,6 +325,11 @@ Page({
})
}
},
onChangeTextAraa(event){
this.setData({
add_disease_desc:event.detail
})
},
getAdvice(e){
console.log(e.detail.value)
this.setData({
@ -351,7 +358,19 @@ Page({
params.prescription_product = this.data.drugs_box_item_list;
console.log(params);
//糖组检测需要填病情主诉;
let disease_desc=this.data.case_detail.disease_desc;
params.disease_desc=disease_desc?disease_desc:this.data.add_disease_desc;
if(!params.disease_desc){
wx.showToast({
title: '请填写病情主诉',
icon: "error"
})
this.setData({
sub_disabled: false
})
return;
}
if(prescription_icd.length == 0){
wx.showToast({
title: '请选择诊断',

View File

@ -1,5 +1,5 @@
<!-- <page-meta page-style="{{ page_meta_show ? 'overflow: hidden;' : '' }}" /> -->
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<te-nav-bar navbar-data='{{navbarData}}'></te-nav-bar>
<view class="container">
<view class="item">
<!-- 头部 -->
@ -12,7 +12,8 @@
<view class="item_content">
<view class="item_content_li">
<view class="item_content_li_title">病情主诉:</view>
<view class="item_content_li_txt">{{case_detail.disease_desc}}</view>
<van-field value="{{add_disease_desc}}" class="item_content_li_txt" label="" custom-style="border:1px solid #dfdfdf;border-radius:8rpx;" type="textarea" maxlength="500" placeholder="请填写患者病情" show-word-limit="{{true}}" autosize="{{autoHeight}}" wx:if="{{!case_detail.disease_desc}}" bind:change="onChangeTextAraa"/>
<view class="item_content_li_txt" wx:else>{{case_detail.disease_desc}}</view>
</view>
<view class="item_content_li" wx:if="{{case_detail.product.length > 0}}">
<view class="item_content_li_title">用药意向:</view>
@ -30,11 +31,11 @@
</view>
<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" wx:if="{{from != 'chat'}}">+添加诊断</view>
<view slot="label" style="width: 180%;">
<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}}" wx:if="{{from != 'chat'}}"/>
<van-icon name="delete" catchtap="delZhenDuan" color="red" data-disease_class_id="{{item.icd_id}}" wx:if="{{from != 'chat'}}" />
<text style="margin-left: 10rpx;">{{item.icd_name}}</text>
</view>
</view>
@ -77,140 +78,38 @@
</form>
<van-popup
show="{{ drugs_popshow }}"
closeable
round
position="bottom"
custom-style=""
bind:close="onClose"
>
<van-popup show="{{ drugs_popshow }}" closeable round position="bottom" custom-style="" bind:close="onClose">
<view class="pop_title">添加药品</view>
<view class="search_drug">
<view class="search_drug_btn">
<text class="search_drug_btn_title">药品名称</text>
<van-search model:value="{{ product_name }}"
class="search_drug_btn_input"
clearable shape="round"
placeholder="请输入药品名称或拼音码搜索"
bind:change="onDrugChange"
/>
<van-search model:value="{{ product_name }}" class="search_drug_btn_input" clearable shape="round" placeholder="请输入药品名称或拼音码搜索" bind:change="onDrugChange" />
</view>
<view class="search_drug_list" wx:if="{{ !drug_content_show }}">
<view class="search_drug_list_empty" wx:if="{{ search_drug_list_empty }}">
<van-image
width="300rpx"
height="300rpx"
fit="contain"
src="{{static_host}}/applet/doctor/static/images/yishi/search_drugs.png"
/>
<van-image width="300rpx" height="300rpx" fit="contain" src="{{static_host}}/applet/doctor/static/images/yishi/search_drugs.png" />
</view>
<view class="search_drug_list_noempty" wx:if="{{ !search_drug_list_empty }}">
<view class="search_drug_list_item"
data-product_name="{{item.product_name}}"
data-product_id="{{item.product_id}}"
data-single_use="{{item.single_use}}"
data-frequency_use="{{item.frequency_use}}"
data-single_unit="{{item.single_unit}}"
data-available_days="{{item.available_days}}"
data-packaging_unit="{{item.packaging_unit}}"
bindtap="select_drug"
wx:for="{{search_drug_list}}">
<view>{{item.product_name}}</view>
<view style="font-size: 26rpx;color: #3CC7C0;">{{item.manufacturer}}</view>
<view class="search_drug_list_item" data-product_name="{{item.product_name}}" data-product_id="{{item.product_id}}" data-single_use="{{item.single_use}}" data-frequency_use="{{item.frequency_use}}" data-single_unit="{{item.single_unit}}" data-available_days="{{item.available_days}}" data-packaging_unit="{{item.packaging_unit}}" bindtap="select_drug" wx:for="{{search_drug_list}}">
<view>{{item.product_name}}</view>
<view style="font-size: 26rpx;color: #3CC7C0;">{{item.manufacturer}}</view>
</view>
<!-- <view class="search_drug_list_item" data-search_value="恩替卡韦分散片" bindtap="select_drug">恩替卡韦分散片 0.5mg*7粒*3版</view>
<view class="search_drug_list_item" data-search_value="恩替卡韦片" bindtap="select_drug">恩替卡韦片 0.5mg*7粒*3版</view> -->
</view>
</view>
</view>
<van-cell-group wx:if="{{ drug_content_show }}">
<van-field
label="用法"
type="text"
model:value="{{save_durg_single_use}}"
input-align="left"
placeholder="请输入用法(口服)"
custom-style="font-size: 30rpx;"
clearable
confirm-type="next"
bind:confirm="changeFocus"
data-next_filed_focus="save_durg_frequency_use"
focus="{{now_filed_focus == 'save_durg_single_use'}}"
border="{{ true }}"
/>
<van-field
label="用次"
type="text"
model:value="{{save_durg_frequency_use}}"
input-align="left"
placeholder="请输入服用次一日1次"
custom-style="font-size: 30rpx;"
clearable
confirm-type="next"
bind:confirm="changeFocus"
data-next_filed_focus="save_durg_single_unit"
focus="{{now_filed_focus == 'save_durg_frequency_use'}}"
border="{{ true }}"
/>
<van-field
label="用量"
type="text"
model:value="{{save_durg_single_unit}}"
input-align="left"
placeholder="请输入用量一次3粒"
custom-style="font-size: 30rpx;"
clearable
confirm-type="next"
bind:confirm="changeFocus"
data-next_filed_focus="save_durg_available_days"
focus="{{now_filed_focus == 'save_durg_single_unit'}}"
border="{{ true }}"
/>
<van-field
label="用药天数"
type="text"
model:value="{{save_durg_available_days}}"
input-align="left"
placeholder="请输入时长"
custom-style="font-size: 30rpx;"
clearable
confirm-type="next"
bind:confirm="changeFocus"
data-next_filed_focus="save_durg_prescription_product_num"
focus="{{now_filed_focus == 'save_durg_available_days'}}"
border="{{ true }}"
/>
<van-field
label="药品数量"
type="number"
bind:input="get_save_durg_prescription_product_num"
value="{{save_durg_prescription_product_num}}"
input-align="left"
placeholder="请输入数量"
custom-style="font-size: 30rpx;"
clearable
confirm-type="next"
bind:confirm="changeFocus"
data-next_filed_focus="save_durg_packaging_unit"
focus="{{now_filed_focus == 'save_durg_prescription_product_num'}}"
border="{{ true }}"
/>
<van-field
label="单位"
type="text"
model:value="{{save_durg_packaging_unit}}"
input-align="left"
placeholder="盒/袋"
custom-style="font-size: 30rpx;"
clearable
confirm-type="done"
border="{{ true }}"
/>
<van-field label="用法" type="text" model:value="{{save_durg_single_use}}" input-align="left" placeholder="请输入用法(口服)" custom-style="font-size: 30rpx;" clearable confirm-type="next" bind:confirm="changeFocus" data-next_filed_focus="save_durg_frequency_use" focus="{{now_filed_focus == 'save_durg_single_use'}}" border="{{ true }}" />
<van-field label="用次" type="text" model:value="{{save_durg_frequency_use}}" input-align="left" placeholder="请输入服用次一日1次" custom-style="font-size: 30rpx;" clearable confirm-type="next" bind:confirm="changeFocus" data-next_filed_focus="save_durg_single_unit" focus="{{now_filed_focus == 'save_durg_frequency_use'}}" border="{{ true }}" />
<van-field label="用量" type="text" model:value="{{save_durg_single_unit}}" input-align="left" placeholder="请输入用量一次3粒" custom-style="font-size: 30rpx;" clearable confirm-type="next" bind:confirm="changeFocus" data-next_filed_focus="save_durg_available_days" focus="{{now_filed_focus == 'save_durg_single_unit'}}" border="{{ true }}" />
<van-field label="用药天数" type="text" model:value="{{save_durg_available_days}}" input-align="left" placeholder="请输入时长" custom-style="font-size: 30rpx;" clearable confirm-type="next" bind:confirm="changeFocus" data-next_filed_focus="save_durg_prescription_product_num" focus="{{now_filed_focus == 'save_durg_available_days'}}" border="{{ true }}" />
<van-field label="药品数量" type="number" bind:input="get_save_durg_prescription_product_num" value="{{save_durg_prescription_product_num}}" input-align="left" placeholder="请输入数量" custom-style="font-size: 30rpx;" clearable confirm-type="next" bind:confirm="changeFocus" data-next_filed_focus="save_durg_packaging_unit" focus="{{now_filed_focus == 'save_durg_prescription_product_num'}}" border="{{ true }}" />
<van-field label="单位" type="text" model:value="{{save_durg_packaging_unit}}" input-align="left" placeholder="盒/袋" custom-style="font-size: 30rpx;" clearable confirm-type="done" border="{{ true }}" />
<!-- <van-cell title="备注" bind:click="showNotePopup" is-link value="请选择" /> -->
<van-button bind:click="saveDrugs" custom-style="width: 90%;border-radius: 10rpx; margin: 20rpx auto;" type="primary" color="#3CC7C0" block>保存</van-button>
@ -218,35 +117,13 @@
</van-cell-group>
</van-popup>
<van-popup
show="{{ note_popshow }}"
round
position="bottom"
custom-style=""
bind:close="onCloseNote"
>
<van-picker
show-toolbar
columns="{{ note_columns }}"
title="选择备注"
bind:cancel="onCancelNote"
bind:confirm="onConfirmNote"
bind:change="onChangeNote" />
<van-popup show="{{ note_popshow }}" round position="bottom" custom-style="" bind:close="onCloseNote">
<van-picker show-toolbar columns="{{ note_columns }}" title="选择备注" bind:cancel="onCancelNote" bind:confirm="onConfirmNote" bind:change="onChangeNote" />
</van-popup>
<van-popup
show="{{ zhenduan_popshow }}"
closeable
position="bottom"
custom-style="height: calc(100vh - {{height*2 + 20}}px);"
bind:close="onZhenduanClose"
>
<van-popup show="{{ zhenduan_popshow }}" closeable position="bottom" custom-style="height: calc(100vh - {{height*2 + 20}}px);" bind:close="onZhenduanClose">
<view style="padding-left: 20rpx;font-size: 30rpx;color: #000;margin: 20rpx 0;">诊断</view>
<van-field
model:value="{{ disease_class_name }}"
placeholder="请输入疾病名称"
bind:change="onZhenDuanChange"
/>
<van-field model:value="{{ disease_class_name }}" placeholder="请输入疾病名称" bind:change="onZhenDuanChange" />
<view class="zhenduan_data_list">
<view bindtap="addZhenDuan" class="zhenduan_item" data-icd_name="{{item.icd_name}}" data-icd_id="{{item.icd_id}}" wx:for="{{zhenduan_search_list}}">
{{item.icd_name}}
@ -258,4 +135,4 @@
<view style="height: 50rpx;">
</view>
<van-dialog id="van-dialog" confirm-button-color="#3CC7C0"/>
<van-dialog id="van-dialog" confirm-button-color="#3CC7C0" />

View File

@ -12,15 +12,16 @@ Page({
height: app.globalData.height,
static_host: api.getStaticHost(),
has_data: false,
data_list_1: [],
data_list_2: [],
data_list_3: [],
data_list_4: [],
data_list_5: [],
data_list_5_loading: false,
data_list_1: [],//在线问诊
data_list_2: [],//快速问诊
data_list_3: [],//公益问诊
data_list_4: [], //问诊购药
data_list_5: [],//糖组检测
data_list_6: [],//问诊结束
data_list_6_loading: false,
conversationList: [],
message_inquiry_type: 99999,
now_message_inquiry_type: 5,
now_message_inquiry_type: 6,
system_notice_unreadnnum: "",
service_notice_unreadnnum: "",
hasOnShow: false,
@ -37,9 +38,10 @@ Page({
dot_2: false,
dot_3: false,
dot_4: false,
dot_5: false,
},
onLoad() {
// console.log("wenzhen onloadddd");
console.log("wenzhen onloadddd");
// if(wx.$TUIKit){
// wx.$TUIKit.on(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived, this);
@ -73,7 +75,7 @@ Page({
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){
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.data.data_list_6.length > 0){
_this.setData({
has_data: true
})
@ -141,6 +143,7 @@ Page({
data_list_3: [],
data_list_4: [],
data_list_5: [],
data_list_6: [],
message_inquiry_type: 9999,
now_message_inquiry_type: 5,
unreadnnum_inter: 0,
@ -153,6 +156,7 @@ Page({
dot_2: false,
dot_3: false,
dot_4: false,
dot_5: false,
})
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.MESSAGE_RECEIVED, this.$onMessageReceived);
wx.$TUIKit.off(wx.$TUIKitTIM.EVENT.SDK_READY, this.onSDKReady);
@ -162,7 +166,7 @@ Page({
this.setData({
hasOnShow: false,
message_inquiry_type: 9999,
now_message_inquiry_type: 5,
now_message_inquiry_type: 6,
})
},
onSDKReady(){
@ -350,7 +354,8 @@ Page({
item.patient_sex = order.patient_sex;
new_conversationList.push(item);
})
}
};
//console.log(new_conversationList);
this.setData({
conversationList: new_conversationList
})
@ -361,22 +366,26 @@ Page({
},
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 = [];
let session_data_list_6 = [];
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);
session_list.push(session_data_list_6);
let usertype = wx.getStorageSync('usertype');
let userID = wx.getStorageSync('user_id_'+usertype);
let totalUnreadCount = 0;
let message_inquiry_type = this.data.message_inquiry_type;
console.log("conversationList---------");
console.log(this.data.conversationList);
this.data.conversationList.forEach(item => {
let conversationID = item.conversationID;
if(conversationID == "C2Cadministrator") return;//如果是管理员消息直接跳过
@ -391,7 +400,7 @@ Page({
if(!order_inquiry_id) return;
let inquiry_type = cloudCustomDataJson.inquiry_type;
if(!inquiry_type) return;
if(inquiry_type > 4) return;
if(inquiry_type > 5) return;
if(inquiry_type < message_inquiry_type){
message_inquiry_type = inquiry_type;
}
@ -452,17 +461,20 @@ Page({
}
}
session_list[inquiry_type - 1].push(session_item);
console.log("--------------------")
console.log(session_list)
})
wx.setStorageSync(userID+'_wenzhen_info', totalUnreadCount);
console.log(session_data_list_3)
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,
data_list_5: session_data_list_5,
message_inquiry_type: message_inquiry_type
})
wx.stopPullDownRefresh()
@ -559,21 +571,21 @@ Page({
onReachBottom() {
// console.log('===触底了!!===');
let now_message_inquiry_type = this.data.now_message_inquiry_type;
if(now_message_inquiry_type == 5){
if(now_message_inquiry_type == 6){
if(this.data.current_page < this.data.last_page){//最后一页时停止分页
this.getDoctorInquiryFinishMessage()
}
}
},
getDoctorInquiryFinishMessage(){
let data_list_5 = this.data.data_list_5;
let data_list_6= this.data.data_list_6;
let params = {};
params.page = this.data.current_page + 1;
this.setData({data_list_5_loading: true})
this.setData({data_list_6_loading: true})
api.getDoctorInquiryFinishMessage(params).then(response => {
// console.log(response);
this.setData({
"data_list_5": data_list_5.concat(response.data.data),
"data_list_6": data_list_6.concat(response.data.data),
current_page: response.data.current_page,
total: response.data.total,
per_page: response.data.per_page,
@ -581,9 +593,9 @@ Page({
})
// this.selectComponent('#tabs').resize();
}).then(res =>{
this.setData({ data_list_5_loading: false})
this.setData({ data_list_6_loading: false})
}).catch(errors => {
this.setData({ data_list_5_loading: false})
this.setData({ data_list_6_loading: false})
console.error(errors);
})
}

View File

@ -23,11 +23,11 @@
</view>
<view class="empty" wx:if="{{ has_data==false }}" >
<view wx:if="{{!data_list_5_loading}}" class="empty_box">
<view wx:if="{{!data_list_6_loading}}" class="empty_box">
<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>
<van-loading size="24px" wx:if="{{data_list_6_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> -->
@ -334,8 +334,52 @@
<view class="content_4" wx:if="{{ item.inquiry_status == 3 }}">不接诊24小时后自动取消</view>
</view>
</van-tab>
<van-tab title="问诊结束" name="5" wx:if="{{data_list_5.length > 0}}">
<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="/Pages/yishi/chat/index">
<van-tab title="糖组检测" dot="{{dot_5}}" name="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 }}"
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_5 }}">
<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="/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="/Pages/yishi/chat/index" plain custom-style="padding:0 35rpx; height:67rpx; border-radius: 10rpx;" color="#3CC7C0">问诊详情</van-button>
<!-- <van-button bind:click="go" data-url="/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 }}">不接诊72小时后自动取消</view>
</view>
</van-tab>
<van-tab title="问诊结束" name="6" wx:if="{{data_list_6.length > 0}}">
<view class="content" wx:for="{{ data_list_6 }}" bindtap="goChat" data-from_account="{{item.from_account}}" data-inquiry_type="{{item.inquiry_type}}" data-order_inquiry_id="{{item.order_inquiry_id}}" data-url="/Pages/yishi/chat/index">
<view class="content_1" >
<view class="name">
<text style="font-size: 34rpx;color: #333;">就诊人:</text>
@ -351,10 +395,10 @@
</view>
<view style="width: 100%;text-align: center;">
<van-loading size="24px" wx:if="{{data_list_5_loading}}">加载中...</van-loading>
<van-loading size="24px" wx:if="{{data_list_6_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-empty description="暂无数据" wx:if="{{data_list_6.length == 0}}" />
<van-divider contentPosition="center" wx:if="{{data_list_6.length > 0 && current_page == last_page}}">到底了~</van-divider>
</van-tab>
</van-tabs>
</view>

View File

@ -17,6 +17,15 @@ Component({
});
},
},
patient_family_data:{
type: Object,
value: {},
observer(newVal) {
this.setData({
patient_family_data: newVal,
});
}
},
isMine: {
type: Boolean,
value: true,
@ -174,6 +183,25 @@ Component({
}];
return renderDom;
}
// 10:糖组检测
if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.SUGAR_CHECK) {
let data = customMessage.data;
const renderDom = [{
type: 'sugar_check',
title:customMessage.title,
disease_class_names:data.disease_class_names
}];
return renderDom;
}
// 11:患者信息
if (customMessage.message_type === GDXZ_CUSTOM_MSEEAGE.PATIENT_INFO) {
let data = customMessage.data;
const renderDom = [{
type: 'patient_info',
path:data.message_path
}];
return renderDom;
}
} catch (error) {
}
// 客服咨询
@ -223,6 +251,12 @@ Component({
} catch (error) {
}
},
goSick(event){
const url=event.currentTarget.dataset.url;
console.log(url);
app.go(url);
},
openLink(e) {
if (e.currentTarget.dataset.value.key === '立即前往') {
wx.navigateTo({

View File

@ -1,6 +1,7 @@
{
"component": true,
"usingComponents": {
"van-rate": "@vant/weapp/rate/index"
"van-rate": "@vant/weapp/rate/index",
"van-icon": "@vant/weapp/icon/index"
}
}

View File

@ -1,4 +1,4 @@
<view>
<view class="custom_wrap">
<view wx:if="{{renderDom[0].type ==='order'}}" class="custom-message {{isMine?'my-custom':''}}">
<image class="custom-image" src="{{renderDom[0].imageUrl}}" />
<view class="custom-content">
@ -86,5 +86,34 @@
</view>
</view>
</view>
<view wx:if="{{renderDom[0].type==='sugar_check'}}" class="sugarbox">
<view class="sugarcon">
<view class="title">
{{renderDom[0].title}}报告
</view>
<view class="patient_info">
<view class="name">就诊人:{{patient_family_data.patient_name}}<text wx:if="{{patient_family_data.patient_sex==1}}">男</text><text wx:elif="{{patient_family_data.patient_sex==2}}">女</text><text wx:else>未知</text>{{patient_family_data.patient_age}}岁)</view>
<view class="sick"> 所患疾病:{{renderDom[0].disease_class_names}}</view>
</view>
</view>
<view class="detail">
<view class="left">查看报告</view>
<image src="../../../../../static/images/back.png" class="back" mode="widthFix"/>
</view>
</view>
<view wx:if="{{renderDom[0].type==='patient_info'}}" class="patientbox" >
<image src="../../../../../static/images/patient_bg.png"
class="bg" mode=""/>
<view class="title">患者信息</view>
<view class="patient_info">
<view class="name">就诊人:{{patient_family_data.patient_name}}<text wx:if="{{patient_family_data.patient_sex==1}}">男</text><text wx:elif="{{patient_family_data.patient_sex==2}}">女</text><text wx:else>未知</text>{{patient_family_data.patient_age}}岁)</view>
<view class="look" bindtap="goSick" data-url="{{renderDom[0].path}}">
<view class="see">查看详情</view>
<van-icon name="arrow" color="rgba(0,0,0,0.45)" style="margin-top:4rpx;margin-left:8rpx;"/>
</view>
</view>
</view>
</view>

View File

@ -233,4 +233,104 @@ line-height: 42rpx;
padding: 15rpx 30rpx;
border-radius: 40rpx;
font-size: 30rpx;
}
/* 糖组检测 */
.back{
width:24rpx;
height:48rpx;
transform: rotate(180deg);
}
.sugarbox{
position: relative;
width: 420rpx;
background: rgb(255, 255, 255);
border: 1rpx solid #D8D8D8;
border-radius: 12rpx;
}
.sugarbox::after{
content:'';
position: absolute;
top: 35rpx;
left: 0;
transform: translate(-50%,-50%) rotate(45deg);
width: 16rpx;
height: 16rpx;
background: rgb(255, 255, 255);
border: 1rpx solid #D8D8D8;
border-style: none none solid solid;
}
.sugarcon{
margin:0rpx 24rpx 0;
}
.patient_info{
font-size: 28rpx;
font-weight: 400;
color: rgba(0,0,0,0.65);
line-height: 40rpx;
}
.sugarcon{
border-bottom: 1rpx solid rgba(0,0,0,0.12);
padding-bottom: 24rpx;
}
.sugarcon .title{
margin:24rpx 0 20rpx;
font-size: 32rpx;
font-weight: 500;
color: #3CC7C0;
}
.sugarbox .detail{
display: flex;
margin:0 24rpx;
height:88rpx;
font-size: 32rpx;
font-weight: 400;
color: rgba(0,0,0,0.85);
justify-content: space-between;
align-items: center;
}
/* 患者信息 */
.patientbox{
display: flex;
flex-direction: column;
width: calc(100vw - 40rpx);
text-align: center;
background-color: #fff;
border-radius: 12rpx;
overflow: hidden;
position: relative;
box-shadow: 0 0 6rpx 0 #ccc;
}
.patientbox .title{
position: relative;
text-align: left;
padding:0 24rpx;
height: 90rpx;
font-size: 32rpx;
border-bottom: 1rpx solid rgba(0,0,0,0.12);
font-weight: 550;
color: rgba(0,0,0,0.85);
line-height: 90rpx;
}
.patientbox .name{
color: rgba(0,0,0,0.85);
font-size: 32rpx;
}
.bg{
position: absolute;
z-index:0;
width:100%;
height:90rpx;
}
.patientbox .patient_info{
padding:40rpx 0;
margin:0 24rpx;
display: flex;
justify-content:space-between;
}
.look{
display: flex;
color:rgba(0,0,0,0.45);
align-items: center;
}

View File

@ -7,7 +7,15 @@ var concat = function() {
var connect = function() {
return arguments[0] + arguments[1]
}
var formateText=function (value){
if(!value){
return {}
}else{
return JSON.parse(value)
}
}
module.exports = {
concat: concat,
connect: connect
connect: connect,
formateText:formateText
};

View File

@ -355,7 +355,7 @@ Component({
let show_avatar = true;
if(type === "TIMCustomElem"){
const customMessage = JSON.parse(message.payload.data);
if(Number(customMessage.message_type) != GDXZ_CUSTOM_MSEEAGE.PRESCRIBE && Number(customMessage.message_type) != GDXZ_CUSTOM_MSEEAGE.PRESCRIBE_VERIFY){
if(Number(customMessage.message_type) != GDXZ_CUSTOM_MSEEAGE.PRESCRIBE && Number(customMessage.message_type) != GDXZ_CUSTOM_MSEEAGE.PRESCRIBE_VERIFY && Number(customMessage.message_type) != GDXZ_CUSTOM_MSEEAGE.SUGAR_CHECK){
show_avatar = false;
}
if(Number(customMessage.message_type) == GDXZ_CUSTOM_MSEEAGE.TRABECULA && refreshBaseInfo){
@ -374,6 +374,7 @@ Component({
},
// 历史消息渲染
$handleMessageRender(messageList, currentMessageList) {
console.log(messageList);
// console.log("handleMessageRenderhandleMessageRenderhandleMessageRender");
// this.showHistoryMessageTime(currentMessageList);
if (messageList.length > 0) {
@ -944,6 +945,11 @@ Component({
});
}
},
goMedinceList(){
wx.navigateTo({
url: '/Pages/yishi/medince_list/index',
})
},
},
});

View File

@ -55,7 +55,7 @@
<ImageMessage wx:if="{{item.type === 'TIMImageElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}" />
<VideoMessage wx:if="{{item.type === 'TIMVideoFileElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
<AudioMessage wx:if="{{item.type === 'TIMSoundElem'}}" message="{{item}}" data-index ='{{index}}' messageList="{{messageList}}" isMine="{{item.flow === 'out'}}"/>
<CustomMessage wx:if="{{item.type === 'TIMCustomElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}" bindtap="handleJumpLink" data-value = "{{item}}"/>
<CustomMessage wx:if="{{item.type === 'TIMCustomElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}" bindtap="handleJumpLink" data-value = "{{item}}" patient_family_data="{{concat.formateText(item.cloudCustomData).patient_family_data}}"/>
<FaceMessage wx:if="{{item.type === 'TIMFaceElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
<FileMessage wx:if="{{item.type === 'TIMFileElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
<MergerMessage wx:if="{{item.type === 'TIMRelayElem'}}" message="{{item}}" isMine="{{item.flow === 'out'}}"/>
@ -69,6 +69,7 @@
<SystemMessage message="{{item}}" bind:changeSystemMessageList="changeSystemMessageList"></SystemMessage>
</view>
</scroll-view>
<image src="../../../../../static/images/yishi/tabbar_icon/medinceList.png" class="medList" mode="" bindtap="goMedinceList"/>
</view>
<view wx:if="{{showDownJump}}" bindtap="handleJumpNewMessage">
<view class="new-message-item" >

View File

@ -1,6 +1,7 @@
.container{
width: 100%;
height: 100%;
position: relative;
background-color: #F4F4F4;
}
.message-list-container {
@ -267,4 +268,11 @@
.content_desc{
font-size: 28rpx;
color: rgb(146, 144, 144);
}
.medList{
position: absolute;
left:0;
bottom:10rpx;
width:153rpx;
height: 159rpx;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@ -49,6 +49,8 @@ const constant = {
PRESCRIBE: 6,//6:处方开具成功(医生端)
PRESCRIBE_VERIFY: 7,//7:处方审核通过(患者端)
BANNER_MESSAGE: 8,//8 弹框消息
SUGAR_CHECK:10,//糖组检测
PATIENT_INFO:11,//患者信息
},
OPERATING_ENVIRONMENT: 'imWxTuikit'

View File

@ -57,7 +57,8 @@
"Pages/yishi/yizhensetupprice/index",
"Pages/yishi/wenzhenorderV2/index",
"Pages/yishi/wenzhen_v3/wenzhen",
"Pages/agreement_page/index"
"Pages/agreement_page/index",
"Pages/yishi/medince_list/index"
],
"window": {
"navigationBarBackgroundColor": "#ffffff",

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

10
utils/debounce.js Normal file
View File

@ -0,0 +1,10 @@
function debounce(fn, delay){
let timer = null;
return function(){
clearTimeout(timer);
timer = setTimeout(()=> {
fn.apply(this, arguments);
}, delay)
}
}
export default debounce

View File

@ -798,6 +798,16 @@ class API extends HTTP {
}
})
}
//药品清单
getMedinceList(params) {
return this.request({
url: `${this.baseUrl}/basic/product`,
method: 'GET',
data: {
...params
}
})
}
}
export { API }