分包医生

This commit is contained in:
zoujiandong
2024-01-16 14:59:06 +08:00
parent 562d4e9691
commit d5a9339ddd
1060 changed files with 3177 additions and 44707 deletions
+387
View File
@@ -0,0 +1,387 @@
import { API } from '../../../../utils/network/api'
import Toast from 'tdesign-miniprogram/toast/index';
let api = new API()
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
navbarData: {
showCapsule: 1, //是否显示左上角图标 1表示显示 0表示不显示
title: '服务设置', //导航栏 中间的标题
},
show:false,
content_message:'',
process_message:'',
showCycle:false,
customRounds:null,
columnsRound:false,
showProcess:false,
showCustom:false,
showSave:false,
showDraft:false,
showPreview:false,
contentradio:'',
processradio:'',
columnsCycle:[],
columnsRound:[50,100,200,'不限次','自定义'],
autosize:{minHeight: 80},
cycle:'',
config_service_id:'',
rounds:null,
static_host: api.getStaticHost()
},
onChangeContent(event){
this.setData({
contentradio: event.detail,
});
},
onChangeProcess(event){
this.setData({
processradio: event.detail,
});
},
openDialog(e){
let {id}=e.currentTarget.dataset;
if(id==1){
this.setData({
show:true,
})
}else{
this.setData({
showProcess:true,
})
}
},
onClickHide(){
this.setData({
show:false
});
if(this.data.contentradio==1){
this.setData({
content_message:'1、服务包含肝脏病理切片解读,需患者邮寄肝脏切片;\n'+
'2、针对病例切片多学科会诊,包含:临床、影像、肝脏病理等学科;\n'+
'3、给出分析报告与治疗方案;\n'+
'4、服务周期,大概7~15天,期间可以不限次(医生自己定义)沟通病情。'
})
}else{
this.setData({
content_message:'1、概述服务所包含内容,如报告解读(可包含超声报告、CT报告、肝脏病理报告及其他常规报告)或者病情解析;\n2、详细描述服务所包含的具体服务或者形\n3、请给出服务周期;\n4、描述该项所提供服务的特点。'
})
}
},
closeCustom(){
console.log(this.data.customRounds);
if(!this.data.customRounds && this.data.customRounds!==0){
wx.showToast({
title: '请输入回合数',
icon:'none'
})
return false
};
if(!(this.data.customRounds>=1 && this.data.customRounds<=300) ){
wx.showToast({
title: '回合数需要在1~300之间',
icon:'none'
})
return false
}
this.setData({
showCustom:false,
rounds:this.data.customRounds
})
},
changeCustomIpt(event){
let {value}= event.detail;
console.log(value);
this.setData({
customRounds:value
})
},
onClickHideshowProcess(){
this.setData({
showProcess:false
})
if(this.data.processradio==1){
this.setData({
process_message:'1、医生与患者线上沟通确定肝脏病理切片解读事项\n'+
'2、患者按要求线下邮寄切片并线上提醒医生已寄出;\n'+
'3、医生线下收到切片后阅片解读或组织多学科会诊;\n'+
'4、医生线上给出分析报告和治疗方案。'
})
}else{
this.setData({
process_message:'1、针对本项目服务,医生与患者各自需要所作事情;\n'+
'2、所做事情用1、2、3点按照时间顺序进行详细描述。'
})
}
},
openCycle(){
this.setData({
showCycle:true
})
},
onCancelCycle(){
this.setData({
showCycle:false
})
},
onConfirmCycle(event){
const { value} = event.detail;
this.setData({
showCycle:false ,
cycle: value
});
},
openRound(){
this.setData({
showRound:true
})
},
onCancelRound(){
this.setData({
showRound:false
})
},
onConfirmRound(event){
const { value} = event.detail;
if(value=='自定义'){
this.setData({
showCustom:true,
showRound:false
})
}else{
this.setData({
showRound:false,
rounds:value
})
}
},
savecancelDialog(){
this.setData({
showSave:false
})
},
saveconfirmDialog(){
let {cycle,rounds,content_message,process_message,config_service_id}=this.data;
wx.setStorageSync('service_setting',{
cycle,
rounds,
content_message,
process_message,
})
this.setData({
showSave:false
})
if(config_service_id){
this.putConfig();
}else{
this.postConfig();
}
},
draftcancelDialog(){
this.setData({
showDraft:false
})
this.getConfig();
},
draftconfirmDialog(){
const service_setting=wx.getStorageSync('service_setting');
this.setData({
cycle:service_setting.cycle,
rounds:service_setting.rounds,
content_message:service_setting.content_message,
process_message:service_setting.process_message,
showDraft:false
})
},
previewcancelDialog(){
this.setData({
showPreview:false
})
},
previewconfirmDialog(){
this.setData({
showPreview:false
})
},
save(){
let {cycle,rounds,content_message,process_message}=this.data;
if(cycle || rounds || content_message || process_message){
this.setData({
showSave:true
})
}
},
validate(){
let {process_message,content_message,cycle,rounds}=this.data;
if(content_message.length<10){
wx.showToast({
title: '服务内容不少于10个字符',
icon:'none'
})
return false
};
if(process_message.length<10){
wx.showToast({
title: '服务流程不少于10个字符',
icon:'none'
})
return false
}
if(!cycle){
wx.showToast({
title: '请设置服务周期',
icon:'none'
})
return false
}
if(!rounds){
wx.showToast({
title: '请设置服务回合数',
icon:'none'
})
return false
}
return true
},
postConfig(){//新增
let {process_message,content_message,cycle,rounds}=this.data;
if(this.validate()){
api.postServiceConfig({
service_content:content_message,
service_process:process_message,
service_period:cycle,
service_rounds:rounds=='不限次'?0:rounds
}).then(response => {
if(response.data==200){
wx.showToast({
title: 'title',
icon:'新增成功'
})
wx.navigateBack()
}
}).catch(errors => {console.error(errors);})
}
},
putConfig(){ //修改
let {config_service_id,process_message,content_message,cycle,rounds}=this.data;
if(this.validate()){
api.putServiceConfig({
service_content:content_message,
service_process:process_message,
service_period:cycle,
service_rounds:rounds=='不限次'?0:rounds
},config_service_id).then(response => {
if(response.data==200){
wx.showToast({
title: 'title',
icon:'修改成功'
})
wx.navigateBack()
}
}).catch(errors => {console.error(errors);})
}
},
getConfig(){
let {inquiry_type,inquiry_mode}=this.data;
api.getServiceConfig({
inquiry_type:1,
inquiry_mode:6
}).then(response => {
let result=response.data;
if(result){
this.setData({
'content_message':result.service_content,
'process_message':result.service_process,
'cycle':result.service_period,
'rounds':result.service_rounds
})
}
}).catch(errors => {console.error(errors);})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const service_setting=wx.getStorageSync('service_setting');
let arr=[];
for (let i =2; i < 31; i++) {
arr.push(i)
}
this.setData({
columnsCycle:arr
})
if(options.config_service_id){
this.setData({
config_service_id:options.config_service_id
})
}
if(service_setting){
this.setData({
showDraft:true
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
@@ -0,0 +1,13 @@
{
"usingComponents": {
"te-nav-bar": "../../../../commpents/te_navbar/index",
"van-icon": "@vant/weapp/icon/index",
"van-radio": "@vant/weapp/radio/index",
"van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index",
"t-dialog": "tdesign-miniprogram/dialog/dialog",
"van-radio-group": "@vant/weapp/radio-group/index",
"van-overlay": "@vant/weapp/overlay/index",
"van-field": "@vant/weapp/field/index"
}
}
+193
View File
@@ -0,0 +1,193 @@
<!--Pages/service_setting/index.wxml-->
<view class="page">
<te-nav-bar navbar-data='{{navbarData}}'></te-nav-bar>
<view class="container">
<view class="brandbox">
<view class="brand">
<view class="titlebox">
<view class="name">服务内容</view>
<view class="moban" bindtap="openDialog" data-id="1">使用模板 ></view>
</view>
<van-field value="{{ content_message }}" label="" type="textarea" placeholder="请填写自定义的服务内容,内容简洁明了。(10-500" autosize="{{autosize}}" maxlength="500" show-word-limit border="{{ false }}" />
</view>
<view class="brand">
<view class="titlebox">
<view class="name">服务流程</view>
<view class="moban" bindtap="openDialog" data-id="2">使用模板 ></view>
</view>
<van-field value="{{ process_message }}" label="" type="textarea" placeholder="请填写自定义的服务流程,内容简洁明了。(10-500" autosize="{{autosize}}" maxlength="500" show-word-limit border="{{ false }}" />
</view>
<view class="cell" bindtap="openCycle">
<view class="name">服务周期</view>
<view class="right">
<view class="msg" wx:if="{{cycle}}">{{cycle}}天</view>
<view class="msg" wx:else>去设置</view>
<van-icon name="arrow" class="icon" />
</view>
</view>
<view class="cell" bindtap="openRound">
<view class="name">服务回合数</view>
<view class="right">
<view class="msg" wx:if="{{rounds}}">{{rounds}}</view>
<view class="msg" wx:else>去设置</view>
<van-icon name="arrow" class="icon" />
</view>
</view>
<view class="eyebox">
<image src="{{static_host}}/applet/doctor/static/images/yishi/eye.png" mode="" class="eye" />
<view class="text">预览效果</view>
</view>
</view>
<view class="btnbox">
<view class="btn" bindtap="save">保存</view>
</view>
</view>
</view>
<van-overlay show="{{ show }}" z-index="9900">
<view class="wrapper">
<view class="configbox">
<view class="title">服务内容</view>
<view class="tipmsg">内容会展示给患者,请仔细编写并删除
相关提示语</view>
<van-radio-group value="{{ contentradio }}" bind:change="onChangeContent">
<view class="listbox">
<view class="list">
<view class="titlebox">
<view class="name">模板1</view>
<van-radio name="1" checked-color="#3CC7C0">选择此模板</van-radio>
</view>
<view class="tipbox {{contentradio==1?'active':''}}">
<view class="msg">1、服务包含肝脏病理切片解读,需患者邮寄肝脏切片</view>
<view class="msg">2、针对病例切片多学科会诊,包含:临床、影像、肝脏病理等学科;</view>
<view class="msg">3、给出分析报告与治疗方案;</view>
<view class="msg">4、服务周期,大概7~15天,期间可以不限次(医生自己定义)沟通病情。</view>
</view>
</view>
<view class="list">
<view class="titlebox">
<view class="name">模板2</view>
<van-radio name="2" checked-color="#3CC7C0" >选择此模板</van-radio>
</view>
<view class="tipbox {{contentradio==2?'active':''}}">
<view class="msg">1、概述服务所包含内容,如报告解读(可包含超声报告、CT报告、肝脏病理报告及其他常规报告)或者病情解析;</view>
<view class="msg">2、详细描述服务所包含的具体服务或者形式;</view>
<view class="msg">3、请给出服务周期;</view>
<view class="msg">4、描述该项所提供服务的特点。</view>
</view>
</view>
</view>
</van-radio-group>
<view class="confirm" bindtap="onClickHide" >确认选择</view>
</view>
</view>
</van-overlay>
<van-overlay show="{{ showProcess }}" z-index="9900">
<view class="wrapper">
<view class="configbox">
<view class="title">服务流程</view>
<view class="tipmsg">内容会展示给患者,请仔细编写并删除
相关提示语</view>
<van-radio-group value="{{ processradio }}" bind:change="onChangeProcess">
<view class="listbox">
<view class="list">
<view class="titlebox">
<view class="name">模板1</view>
<van-radio name="1" checked-color="#3CC7C0">选择此模板</van-radio>
</view>
<view class="tipbox {{processradio==1?'active':''}}">
<view class="msg">1、医生与患者线上沟通确定肝脏病理切片解读事项</view>
<view class="msg">2、患者按要求线下邮寄切片并线上提醒医生已寄出;</view>
<view class="msg">3、医生线下收到切片后阅片解读或组织多学科会诊;</view>
<view class="msg">4、医生线上给出分析报告和治疗方案。</view>
</view>
</view>
<view class="list">
<view class="titlebox">
<view class="name">模板2</view>
<van-radio name="2" checked-color="#3CC7C0" >选择此模板</van-radio>
</view>
<view class="tipbox {{processradio==2?'active':''}}">
<view class="msg">1、针对本项目服务,医生与患者各自需要所作事情;</view>
<view class="msg">2、所做事情用1、2、3点按照时间顺序进行详细描述。</view>
</view>
</view>
</view>
</van-radio-group>
<view class="confirm" bindtap="onClickHideshowProcess">确认选择</view>
</view>
</view>
</van-overlay>
<van-popup
show="{{ showCycle }}"
round
position="bottom"
custom-style="height: 50%"
>
<van-picker columns="{{ columnsCycle }}" show-toolbar
title="选择服务周期" bind:cancel="onCancelCycle"
bind:confirm="onConfirmCycle" />
</van-popup>
<van-popup
show="{{ showRound }}"
round
position="bottom"
custom-style="height: 50%"
>
<van-picker columns="{{ columnsRound }}" show-toolbar
title="选择服务回合数" bind:cancel="onCancelRound"
bind:confirm="onConfirmRound" />
</van-popup>
<van-overlay show="{{ showCustom }}" z-index="9900">
<view class="wrapper">
<view class="custombox">
<view class="title">自定义服务回合数</view>
<view class="roundBox">
<view class="name">回合数</view>
<input type="number" placeholder="请输入" class="ipt" value="{{customRounds}}" bindinput="changeCustomIpt" placeholder-style="color: rgba(0,0,0,0.25);font-size:32rpx"/>
</view>
<view class="btnround" bindtap="closeCustom">确认</view>
</view>
</view>
</van-overlay>
<t-dialog
visible="{{ showSave }}"
title="提示"
content="是否保存服务设置内容?"
>
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="savecancelDialog">
取消
</view>
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="saveconfirmDialog">
保存
</view>
</t-dialog>
<t-dialog
visible="{{ showDraft }}"
title="提示"
content="是否加载之前保存的草稿内容?"
>
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="draftcancelDialog">
取消
</view>
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="draftconfirmDialog">
加载
</view>
</t-dialog>
<t-dialog
visible="{{ showPreview }}"
title="提示"
content="可以预览患者端效果,是否查看?"
>
<view slot="cancel-btn" class="dialog dialog_cancel_btn" bindtap="previewcancelDialog">
取消
</view>
<view slot="confirm-btn" class="dialog dialog_confirm_btn" bindtap="previewconfirmDialog">
前往
</view>
</t-dialog>
+292
View File
@@ -0,0 +1,292 @@
/* Pages/service_setting/index.wxss */
.page {
height: 100vh;
display: flex;
overflow: hidden;
flex-direction: column;
}
.container {
display: flex;
flex-direction: column;
height: calc(100vh - 138rpx);
background-color: #F6F6F6;
}
.brandbox {
padding: 32rpx 30rpx 0;
flex: 1;
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
.titlebox {
margin-top: 20rpx;
display: flex;
align-items: flex-end;
justify-content: space-between;
}
.brand {
margin-bottom: 24rpx;
padding: 30rpx;
background: #FFFFFF;
border-radius: 14rpx;
}
.titlebox .name {
font-size: 32rpx;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
}
.titlebox .moban {
width: 151rpx;
height: 48rpx;
display: flex;
align-items: center;
justify-content: center;
background: #FFFFFF;
border-radius: 50rpx;
border: 1rpx solid #3CC7C0;
font-size: 24rpx;
font-weight: 500;
color: #3CC7C0;
}
.van-cell {
padding: 13rpx 0 !important;
}
.cell {
margin-bottom: 24rpx;
padding: 30rpx;
background: #FFFFFF;
border-radius: 14rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.right {
display: flex;
font-size: 28rpx;
font-weight: 400;
color: rgba(0, 0, 0, 0.45);
align-items: center;
}
.icon {
margin-top: 2rpx;
}
.eyebox {
padding-top: 20rpx;
display: flex;
align-items: center;
margin-bottom: 20rpx;
justify-content: center;
}
.eye {
margin-top: 2rpx;
width: 40rpx;
height: 40rpx;
}
.eyebox .text {
font-size: 32rpx;
margin-left: 5rpx;
font-weight: 500;
color: #3BB5FE;
}
.btnbox {
margin-bottom: 20rpx;
}
.btn {
margin: 0 30rpx;
height: 88rpx;
display: flex;
justify-content: center;
align-items: center;
background: #3CC7C0;
border-radius: 8rpx;
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
}
.wrapper {
display: flex;
align-items: center;
flex-direction: column;
justify-content: center;
height:100vh;
}
.configbox {
box-sizing: border-box;
padding: 24rpx 30rpx;
background-color: #fff;
width: 90%;
border-radius: 16rpx;
}
.configbox .title {
font-size: 36rpx;
font-weight: 500;
color: rgba(0, 0, 0, 0.85);
text-align: center;
}
.tipmsg {
margin-top: 12rpx;
font-size: 28rpx;
font-weight: 400;
color: #3BB5FE;
line-height: 44rpx;
text-align: center;
padding: 10rpx 60rpx;
background: #F2F8FF;
}
.tipbox {
margin-top: 20rpx;
background: #EEEEF0;
border-radius: 8rpx;
padding:24rpx;
box-sizing: border-box;
font-size: 28rpx;
font-weight: 400;
margin-bottom: 5rpx;
color: rgba(0, 0, 0, 0.65);
line-height: 44rpx;
border: 1rpx solid #EEEEF0 ;
}
.tipbox.active{
margin-top: 20rpx;
background: #FFFFFF;
border-radius: 8rpx;
padding:24rpx;
box-sizing: border-box;
font-size: 28rpx;
font-weight: 400;
margin-bottom: 5rpx;
color: rgba(0, 0, 0, 0.65);
line-height: 44rpx;
border: 1rpx solid #3CC7C0;
}
.van-radio{
display: flex;
flex-direction: row-reverse;
}
.van-radio__icon{
margin-left: 10rpx;
}
.van-radio__label{
color: rgba(0,0,0,0.45)!important;
font-size: 28rpx!important;
}
.confirm{
display: flex;
align-items: center;
justify-content: center;
height: 88rpx;
background: linear-gradient(90deg, #3CC7C0 0%, #62EBE4 100%);
border-radius: 8rpx;
font-size: 32rpx;
margin-top: 24rpx;
font-weight: 500;
color: #FFFFFF;
}
.custom-class{
position: absolute;
bottom:0;
}
.van-picker__cancel{
color: rgba(0,0,0,0.65)!important;
}
.van-picker__confirm{
color: #3CC7C0!important;
}
.custombox{
padding:32rpx;
width:70%;
border-radius: 16rpx;
background-color: #fff;
}
.roundBox{
margin: 56rpx 0;
display: flex;
justify-content: space-between;
}
.custombox .title{
text-align: center;
font-size: 36rpx;
font-weight: 500;
color: rgba(0,0,0,0.85)
}
.custombox .name{
font-size: 32rpx;
font-weight: 400;
color: rgba(0,0,0,0.85);
}
.custombox .ipt{
text-align: right;
}
.btnround{
width:100%;
height: 88rpx;
background: #3CC7C0;
border-radius: 8rpx;
font-size: 32rpx;
font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
.dialog{
width: 50%;
text-align: center;
height: 100rpx;
line-height: 100rpx;
}
.dialog_cancel_btn{
position: relative;
}
.dialog_cancel_btn::before {
content: ' ';
position: absolute;
box-sizing: border-box;
top: 0;
left: 0;
border-top: 2px solid var(--td-border-color, #e7e7e7);
border-right: 2px solid var(--td-border-color, #e7e7e7);
transform: scale(0.5);
transform-origin: 0 0;
width: 200%;
height: 200%;
border-radius: 0;
border-top-left-radius: 0px;
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
}
.dialog_confirm_btn{
border-top: 1px solid #E9E9E9;
color: #3CC7C0;
}
.t-button__content{
color: #3CC7C0 !important;
}
.t-dialog__button--text:before {
border-top: 2px solid #E9E9E9 !important;
border-left: 2px solid var(--td-border-color, #E9E9E9);
border-top-color: #E9E9E9 !important;
}