Browse Source

Merge branch 'master' of gitea.intra.yunpaper.com:kuaileadmin/acupuncture_register_system_uniapp

master
zq 1 month ago
parent
commit
58974a01f0
  1. 38
      App.vue
  2. 303
      components/bookBox.vue
  3. 6
      main.js
  4. 226
      pages/index/index.vue
  5. 12
      中医针灸改版2.0_2025_03_06/需求拆分.txt
  6. 14
      针灸挂号系统功能拆分.txt

38
App.vue

@ -4,6 +4,42 @@
doctorId:'',
doctoridStorageKey:'doctor_id'
},
onShow: function() {
var updateManager = uni.getUpdateManager();
updateManager.onCheckForUpdate(function(res) {
console.log("是否有最近版本", res.hasUpdate)
});
updateManager.onUpdateReady(function(res) {
uni.showModal({
title: '更新提示',
content: '新版本已经准备好,是否重启应用?',
showCancel: false,
success(res) {
if (res.confirm) {
updateManager.applyUpdate();
}
}
});
});
updateManager.onUpdateFailed(function(res) {
uni.showModal({
title: '提示',
content: '新版小程序下载失败\n请自行退出程序,手动卸载本程序,再运行',
confirmText: "知道了",
showCancel: false,
success(res) {
wx.exitMiniProgram({
success: () => {
console.log('退出小程序成功');
}
});
}
});
});
},
onLaunch: function(option) {
console.log(option, 'option====');
var did = false
@ -82,7 +118,6 @@
}
},
onShow: function() {},
onHide: function() {}
}
</script>
@ -242,6 +277,7 @@
}
.btn{
text-align: center;
font-size: 32rpx;
}
.primary.btn{
background-color: #39D067;

303
components/bookBox.vue

@ -1,303 +0,0 @@
<template>
<view class="book-com">
<view class="date-wraper">
<view :class="'date'+((selectDay===item.date)?' active':'')" v-for="(item,key) in Object.values(RegistrationTimeList)" @click="chooseDay(item.date)">
<view class="top">
<view>{{item.month}}.{{ item.day }}</view>
<view class="PfScMedium">{{item.week_desc}}</view>
</view>
<view :class="'bot'+((item.work_desc !== '不出诊')?' active':'')+(key==0?' PfScMedium':'')">
{{item.work_desc}}
</view>
</view>
</view>
<view class="datelist">
<view :class="'item'+(timeList.am.length<=0?' itemempty':' ')" v-if="bookTimeList">
<view class="title PfScMedium">上午预约</view>
<view class="inner-wrapper" v-if="timeList.am.length>0">
<view v-for="(item,key) in timeList.am" :class="'son PfScMedium'+( time2remain[item] <=0?' disable':'')" @click="confirmSubmit(item, 1)" :hover-class="time2remain[item]>0?'hover2':''">
{{item.split('-')[0]}}
<text v-if="visitorList.length > time2remain[item] || time2remain[item]<=0">{{time2remain[item]>0?("(名额余"+time2remain[item]+")"):(time2remainExpire[item]?'':'(名额已满)')}}</text>
</view>
</view>
<view class="empty" v-else>
<img :src="cssUrl+'empty.png'" alt="">
<view class="info">当前时间段不可预约</view>
</view>
</view>
<view :class="'item'+(timeList.pm.length<=0?' itemempty':' ')" v-if="bookTimeList">
<view class="title PfScMedium">下午预约</view>
<view class="inner-wrapper" v-if="timeList.pm.length>0">
<view :class="'son PfScMedium'+(time2remain[item]<=0?' disable':'')" @click="confirmSubmit(item, 2)" :hover-class="time2remain[item]>0?'hover2':''" v-for="(item,key) in timeList.pm">
{{item.split('-')[0]}}
<text v-if="visitorList.length > time2remain[item] || time2remain[item]<=0">{{time2remain[item]>0?("(名额余"+time2remain[item]+")"):(time2remainExpire[item]?'':'(名额已满)')}}</text>
</view>
</view>
<view class="empty" v-else>
<img :src="cssUrl+'empty.png'" alt="">
<view class="info">当前时间段不可预约</view>
</view>
</view>
<view class="empty-all" v-else>
<img :src="cssUrl+'empty.png'" alt="">
<view class="info2">
<view class="PfScMedium">{{timeList.type_text}}</view>
<view>请选择其他可预约日期</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "bookBox",
props: {
visitorList:{
type:Array,
default:()=>[]
},
},
data() {
return {
cssUrl:this.cssUrl,
time2remain:[],
bookTimeList:false,
timeList:true,
disable:true,
selectDay:-1,
RegistrationTimeList:[],
nowtime:'',
time2remainExpire:[],
}
},
methods: {
dataInit(allDate,chooseDate) {//
let firstRegistrationTime = allDate['date2time']
this.RegistrationTimeList = allDate['date2work']
this.nowtime = allDate['nowtime']
this.time2remain = allDate['time2remain'];
for (var key in this.time2remain) {
if (this.time2remain.hasOwnProperty(key)) {
var times = key.split('-')
var end_times = chooseDate+' '+times[1]
this.time2remainExpire[key] = 0
if(this.nowtime >= end_times) this.time2remainExpire[key] = 1
}
}
if(chooseDate){
this.selectDay = chooseDate;
}else{
this.selectDay = Object.keys(this.RegistrationTimeList)[0];
if(!this.selectDay)return
this.chooseDay(this.selectDay)
return
}
this.bookTimeList = false
if(firstRegistrationTime.am.length > 0 || firstRegistrationTime.pm.length > 0) this.bookTimeList = true
this.timeList = firstRegistrationTime
},
chooseDay(date){
this.selectDay = date
this.bookTimeList = false
this.$emit('getAvailabletRegistrationTime', true,this.selectDay)
},
confirmSubmit(time_interval, type){
let param = new Object()
if(this.time2remain[time_interval] <= 0) return
param.date = this.selectDay
param.time_interval = time_interval
param.type = type
this.$emit('confirmSubmitEvent', param)
}
}
};
</script>
<style lang="scss" scoped>
.book-com{
width: 100%;
height: auto;
overflow: hidden;
.date-wraper{
width: 714rpx;
margin: 24rpx auto 0;
height: 218rpx;
background: #FFFFFF;
box-shadow: 0rpx 2rpx 24rpx 0rpx rgba(0,0,0,0.03);
overflow-x: auto;
display: flex;
box-sizing: border-box;
padding: 40rpx 24rpx;
.date{
width: 120rpx;
flex-shrink: 0;
margin-right: 18rpx;
.top{
width: 106rpx;
height: 98rpx;
padding-top: 8rpx !important;
box-sizing: border-box;
view{
color: #333333;
font-size: 28rpx;
line-height: 36rpx;
height: 36rpx;
text-align: center;
}
view:last-of-type{
margin-top: 10rpx;
}
}
.bot{
height: 32rpx;
font-size: 24rpx;
color: #999999;
line-height: 32rpx;
margin-top: 14rpx;
text-align: center;
&.active{
color: #50C382;
}
}
&.active{
.top{
background: #39D067;
border-radius: 8rpx;
view{
color: white !important;
}
}
}
}
}
.datelist{
width: 714rpx;
margin: 20rpx auto 0;
height: auto;
background: #F8F8F8;
border-radius: 8rpx;
box-sizing: border-box;
overflow: hidden;
.title{
height: 50rpx;
font-size: 32rpx;
color: #000000;
line-height: 50rpx;
letter-spacing: 2rpx;
padding-top: 24rpx;
margin-bottom: 24rpx;
background: #FFFFFF;
}
.item{
min-height: 318rpx;
padding: 0 24rpx 0rpx 24rpx;
box-shadow: 0rpx 24rpx 24rpx 0rpx rgba(0,0,0,0.03);
background: #FFFFFF;
position: relative;
margin-bottom: 20rpx;
&.itemallempty{
background: #FFFFFF !important;
}
&.itemempty{
height: 420rpx !important;
padding-bottom: 0rpx !important;
}
.empty{
position: absolute;
top: 0;
left: 147rpx;
width: 420rpx;
height: 420rpx;
img{
width: 420rpx;
height: 420rpx;
display: block;
height: 420rpx;
margin: 0 auto;
}
.info{
width: 100%;
position: absolute;
z-index: 2;
bottom: 42rpx;
text-align: center;
height: 40rpx;
font-size: 28rpx;
color: #AEB0B8;
line-height: 40rpx;
}
}
.inner-wrapper{
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.son{
display: flex;
align-items: center;
justify-content: center;
width: 320rpx;
height: 86rpx;
background: #F8FFF7;
border-radius: 8rpx;
border: 2rpx solid #39D067;
margin-bottom: 20rpx;
color: #50C382;
font-size: 30rpx;
&.disable{
background: #F1F1F1;
border: 2rpx solid #CACACA;
color: #999999;
}
}
}
}
img{
width: 420rpx;
height: 420rpx;
display: block;
height: 420rpx;
margin: 0 auto;
}
.info2{
position: absolute;
bottom: 50rpx;
width: 100%;
view{
width: 100%;
text-align: center;
}
view:first-of-type{
font-size: 28rpx;
height: 40rpx;
width: 100%;
color: #AEB0B8;
line-height: 40rpx;
}
view:last-of-type{
height: 33rpx;
font-size: 24rpx;
color: #BEC1CA;
line-height: 33rpx;
margin-top: 14rpx;
}
}
.empty-all{
height: 454rpx;
padding-bottom: 20rpx;
background: #FFFFFF;
position: relative;
}
}
}
</style>

6
main.js

@ -287,6 +287,12 @@ function req(url, data={}, method = 'POST', header={}) {
}
return;
}
if (rs.confirm && rdata.code!=CODE_LOGIN_EXIPRE && rdata.msg && rdata.msg.indexOf('用户信息不存在') > -1) {
removeLogin();
navToPath('/pages/index/index')
return;
}
}
});

226
pages/index/index.vue

@ -4,24 +4,25 @@
<view class="left">
<view class="flex top PfScMedium">
<view class="ft50 over2">{{ doctorInfo.doctor_info.doctor_name }}</view>
<view v-if="doctor_dept">
<view class="over2">{{doctor_dept}}</view>
<view v-if="doctorInfo.doctor_info.label">
<view class="over2">{{ doctorInfo.doctor_info.label }}</view>
</view>
</view>
<view class="bt over2" v-if="doctorInfo.doctor_info.doctor_desc">
{{ doctorInfo.doctor_info.doctor_desc }}
</view>
</view>
<img class="right" :src="doctorInfo.doctor_info.avator" alt="" @click="enlargePicture(doctorInfo.doctor_info.avator)" v-if="doctorInfo.doctor_info.avator">
<img class="right" :src="doctorInfo.doctor_info.avator" alt=""
@click="enlargePicture(doctorInfo.doctor_info.avator)" v-if="doctorInfo.doctor_info.avator">
</view>
<view class="block desc-wrapper" v-if="doctorInfo.doctor_info.doctor_detail">
<view class="title-wrapper flex">
<!-- <view class="title-wrapper flex">
<view class="title">
医生简介
</view>
<img :src="cssUrl+'right_bg.png'" alt="">
</view>
</view> -->
<view class="con">
{{ doctorInfo.doctor_info.doctor_detail }}
@ -29,13 +30,12 @@
</view>
<view class="block hospital-wrapper" v-if="hospitals">
<view class="title-wrapper flex">
<!-- <view class="title-wrapper flex">
<view class="title">
出诊信息
</view>
<img :src="cssUrl+'right_bg.png'" alt="">
</view>
</view> -->
<view class="item" v-for="(item, key) in hospitals">
<view class="top flex">
@ -59,12 +59,12 @@
</view>
</view>
<view class="center">
<view class="center" v-if="item.workdate_desc">
出诊{{ item.workdate_desc }}
</view>
<uni-collapse ref="collapse" v-model="collapseValue[key]" class="notice-collapse" v-if="item.notice">
<uni-collapse-item title="就诊须知">
<uni-collapse-item title="预约须知">
<view class=" content">
<view class="text" v-html="item.notice"></view>
</view>
@ -72,7 +72,7 @@
</uni-collapse>
<view class="bot primary btn btn2" hover-class="hover" @click="toVisitors(item)" v-if="item.type == 0">
预约看病
开始预约
</view>
</view>
</view>
@ -81,7 +81,7 @@
<view class="header flex">
<view class="title-wrapper flex booklist">
<view class="title">
最近就诊
最近预约
</view>
<img :src="cssUrl + 'right_bg.png'" alt="">
</view>
@ -91,12 +91,29 @@
</view>
</view>
</view>
<pre-book-list class="preg-books" :dataList="recentAppoint" :topnopadding="true" v-if="this.doctorInfo && !this.doctorInfo.is_all_card"></pre-book-list>
<pre-book-list class="preg-books" :dataList="recentAppoint" :topnopadding="true"
v-if="this.doctorInfo && !this.doctorInfo.is_all_card"></pre-book-list>
<tabbar current="1" leftButtonText="主页" v-if="!doctorInfo.is_all_card"></tabbar>
<!-- #ifdef MP-WEIXIN -->
<doctorImport v-if="user_type == '1' || user_type == '2'"></doctorImport>
<!-- #endif -->
<uni-popup ref="nameWrap" :safe-area="false">
<view class="popup-container">
<view class="header">
<view class="title PfScMedium">需要填写真实姓名来确保您账号的唯一性</view>
</view>
<view class="label">真实姓名</view>
<input type="text" class="realName" v-model="realName" placeholder-class="placeholder-style" placeholder="请填写">
<view class="confirm-button-wrapper btPadding">
<view class="confirm-button PfScMedium" @click="handleConfirm">
完成
</view>
</view>
</view>
</uni-popup>
<button class="getphone-box" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber" v-if="!doctorInfo.aid"></button>
</view>
</template>
@ -110,6 +127,7 @@
export default {
data() {
return {
realName:'',
collapseValue: [],
cssUrl: this.cssUrl,
code: '',
@ -122,7 +140,11 @@
loginToken: false,
state: '',
workdate: [],
user_type:-1
user_type: -1,
show_info:false,
showNameDialog: false,
userName: "",
hasRejectedPhone: false, //
}
},
components: {
@ -142,7 +164,7 @@
this.doctor_id = getApp().globalData.doctorId
if (!this.doctor_id) return
var title = '预约就诊'
var title = ''
if (this.code) title = '登录'
uni.setNavigationBarTitle({
title: title
@ -155,8 +177,31 @@
await this.getDoctorInfo()
},
methods: {
toLocation(hospital){
handleConfirm(){
if(!this.realName.trim()){
uni.showModal({
title:'提示',
content: '姓名不可为空',
})
return
}
this.$http.req('/api/user/set_realname', { realname:this.realName}, 'POST').then(data => {
if (data == -1) return
this.$refs.nameWrap.close()
});
},
getPhoneNumber(e) {
console.log(e)
if (e.detail.errMsg === 'getPhoneNumber:ok') {
this.$http.req('api/user/bind_phone', {phonecode:e.detail.code}, 'POST').then(data=>{
if(data == -1) return
this.getDoctorInfo()
});
} else {
}
},
toLocation(hospital) {
// #ifdef MP-WEIXIN
var lngLat = hospital.hospital_pos.toString().split(',')
var lng = Number(lngLat[1])
@ -239,10 +284,23 @@
}
this.pageShow = true;
let visitFlag = true;
this.doctorInfo = data;
this.user_type = this.doctorInfo.user_type;
if(!data.realname && data.aid) {
this.$nextTick(() => {
this.$refs.nameWrap.open('bottom')
})
}
var title = this.doctorInfo.doctor_info.doctor_name + '主页'
uni.setNavigationBarTitle({
title: title
})
if (this.doctorInfo.doctor_info && this.doctorInfo.doctor_info.depart_name && this.doctorInfo.doctor_info.depart_name.length > 0) {
this.doctor_dept = this.doctorInfo.doctor_info.depart_name;
}
@ -267,7 +325,7 @@
}
this.hospital_departs = this.doctorInfo.hospital_departs.map((item, index) => {
item.workdate_desc = this.doctorInfo.workdate_desc[item.depart_id]
if (this.doctorInfo.workdate_desc) item.workdate_desc = this.doctorInfo.workdate_desc[item.depart_id]
return item
})
});
@ -285,7 +343,6 @@
uni.setStorageSync('depart', JSON.stringify(hospital))
uni.setStorageSync('doctor_info', JSON.stringify(this.doctorInfo))
this.$nav.navToPath("/pages/visitors/visitors?type=1&is_preview=1")
},
toPrebookList() {
this.$nav.navToPath("/pages/prebook_list/prebook_list")
@ -322,11 +379,14 @@
min-height: 208rpx;
padding: 27rpx 40rpx 24rpx;
box-sizing: border-box;
.left {
width: 510rpx;
.top {
overflow: hidden;
margin-top: 31rpx;
& view:first-of-type {
color: #333;
letter-spacing: 1.32rpx;
@ -334,6 +394,7 @@
max-width: 250rpx;
font-weight: 500;
}
& view:last-of-type {
view {
width: auto;
@ -350,6 +411,7 @@
}
}
}
.bt {
width: 480rpx;
line-height: 40rpx;
@ -358,6 +420,7 @@
margin-top: 21rpx;
}
}
.right {
flex-grow: 1;
display: block;
@ -366,6 +429,7 @@
width: 160rpx;
}
}
.block {
background: #FFFFFF;
border-radius: 8rpx;
@ -375,16 +439,19 @@
width: 714rpx;
margin-bottom: 20rpx;
}
.desc-wrapper {
box-shadow: 0rpx 2rpx 24rpx 0rpx rgba(0, 0, 0, 0.03);
color: #949699;
font-size: 30rpx;
line-height: 50rpx;
.con {
overflow-y: auto;
max-height: 200rpx;
color: #666666;
}
.con::-webkit-scrollbar {
display: none;
width: 0;
@ -392,6 +459,7 @@
color: transparent;
}
}
.title-wrapper {
.title {
width: 117rpx;
@ -405,14 +473,17 @@
border-radius: 8rpx 0rpx 0rpx 8rpx;
background: linear-gradient(98deg, #53C184 0%, #5CD378 100%);
}
&.booklist .title {
margin-bottom: 0rpx;
}
img {
width: 48rpx;
height: 42rpx;
}
}
.hospital-wrapper {
.item {
min-height: 207rpx;
@ -426,23 +497,28 @@
padding-bottom: 0rpx;
border-bottom: none !important;
}
.top {
.left {
flex-grow: 1;
.title {
align-items: center;
flex-wrap: wrap;
column-gap: 20rpx;
row-gap: 12rpx;
.hospital_name {
color: #333;
font-size: 32rpx;
}
img {
width: 20rpx;
height: 32rpx;
}
.fixed_hospital {
border-radius: 6rpx;
background: #F7FCFF;
@ -459,6 +535,7 @@
}
}
.date {
line-height: 40rpx;
font-size: 28rpx;
@ -466,6 +543,7 @@
margin-top: 22rpx;
}
}
.right {
width: 172rpx;
flex-shrink: 0;
@ -473,6 +551,7 @@
color: #666666;
display: flex;
justify-content: flex-end;
.map-wrap {
font-size: 26rpx;
font-weight: normal;
@ -481,10 +560,12 @@
color: #666666;
margin-top: 4rpx;
}
img {
width: 52rpx;
height: 52rpx;
}
.copy_btn {
display: block;
line-height: normal;
@ -495,6 +576,7 @@
}
}
}
.center {
justify-content: flex-start;
align-items: center;
@ -512,8 +594,10 @@
margin-bottom: 24rpx;
word-break: break-all;
}
.notice-collapse {
margin-top: 24rpx;
::v-deep {
.uni-collapse-item__title-box {
padding: 0;
@ -526,36 +610,45 @@
font-weight: normal;
margin-top: 0rpx;
}
.uni-collapse-item__title {
border: none !important;
}
.uni-collapse-item__title-arrow {
width: 32rpx;
height: 32rpx;
margin-left: 12rpx;
}
.uni-icons {
width: 32rpx;
height: 32rpx;
}
.uni-collapse-item__title-text {
font-size: 28rpx;
letter-spacing: 0.22rpx;
color: #949699;
}
.uni-collapse-item__title-wrap {
width: auto;
flex: unset;
}
.content {
color: red !important;
}
.uni-collapse-item__wrap-content {
border: none !important;
}
.uni-collapse-item__title.is-open {
margin-bottom: 24rpx;
}
.content {
width: 100%;
height: auto;
@ -564,6 +657,7 @@
background: #F8F6F9;
border-radius: 12rpx;
}
.content .text {
font-size: 28rpx;
font-weight: normal;
@ -581,15 +675,19 @@
}
}
}
.visit-wrapper {
margin-bottom: 0;
.header {
justify-content: space-between;
.opt {
align-items: center;
overflow: hidden;
font-size: 26rpx;
color: #949699;
img {
width: 20rpx;
height: 32rpx;
@ -598,11 +696,103 @@
}
}
}
.preg-books {
width: 714rpx;
margin: 0 auto;
}
.getphone-box{
position: fixed;
left: 0;
top: 0;
width: 100vw;
height: 100vh;
z-index: 8999999999;
opacity: 0;
}
}
.popup-container {
position: relative;
max-height: calc(100vh - 200rpx);
overflow-y: scroll;
background: #ffffff;
border-radius: 40rpx 40rpx 0px 0px;
padding: 42rpx 48rpx 16rpx;
.header {
position: relative;
text-align: left;
.title {
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
letter-spacing: normal;
color: #000000;
}
}
.label {
margin-top: 54rpx;
font-family: PingFang SC;
font-size: 34rpx;
font-weight: 500;
line-height: 47.6rpx;
letter-spacing: normal;
color: #000000;
}
.realName {
color: #000000;
font-size: 34rpx;
line-height: 40rpx;
height: 40rpx;
font-family: PingFang SC;
font-weight: normal;
letter-spacing: normal;
padding: 22rpx 0;
border-bottom: 2rpx solid rgba(0, 0, 0, 0.1);
margin-bottom: 160rpx;
margin-top: 22rpx;
&::placeholder {
opacity: 0.3;
}
}
.placeholder-style {
opacity: 0.3;
}
.confirm-button-wrapper {
display: flex;
align-items: center;
justify-content: center;
.confirm-button {
justify-content: center;
display: flex;
align-items: center;
font-weight: 600;
font-size: 34rpx;
color: #ffffff;
text-align: center;
width: 368rpx;
height: 80rpx;
border-radius: 8rpx;
background: #07C160;
}
}
.date {
margin: 12rpx 36rpx 42rpx;
text-align: center;
color: #000000;
font-size: 26rpx;
font-family: PingFang SC;
}
}
</style>

12
中医针灸改版2.0_2025_03_06/需求拆分.txt

@ -1,23 +1,23 @@
中医针灸患者端静态页面及样式改造
1.首页调整
(1)首页医院地址导航在小程序中打开样式
(2)增加就诊须知折叠面板
(2)增加预约须知折叠面板
(3)增加医保定点标签
(4)出诊医院列表样式调整
2.底部公共菜单增加“现场报道”入口
3.首页医院列表部分样式调整
4.选择就诊人列表页面调整
4.选择预约人列表页面调整
进行中
4.新增就诊人页面样式改造
4.新增预约人页面样式改造
5.扫码报道页面
6.确认报道页面
7.确认报道空页面
8.候诊方式页面
9.个人中心页面样式改造
11.就诊人列表页面
12.就诊记录页面
13.就诊详情页面样式改造
11.预约人列表页面
12.预约记录页面
13.预约详情页面样式改造
14.候诊状态,所在床位弹窗
1.首页医院地址导航在小程序中打开调整

14
针灸挂号系统功能拆分.txt

@ -14,23 +14,23 @@
2.用户端首页样式调整
已完成
1.挂号就诊人页面
2.新增就诊人信息页面
1.挂号预约人页面
2.新增预约人信息页面
已完成
1.针灸挂号系统选择就诊人页面
2.修改就诊人信息页面
3.就诊人信息页面
1.针灸挂号系统选择预约人页面
2.修改预约人信息页面
3.预约人信息页面
待完成
一、患者端 静态页面
2.就诊人预约挂号页面
2.预约人预约挂号页面
预计完成 2024-03-11 09:30~2024-03-11 19:00
3.个人中心页面
4.修改个人资料页面
预计完成 2024-03-12 09:30~2024-03-12 19:00
5.就诊人列表页面
5.预约人列表页面
预计完成 2024-03-13 09:30~2024-03-13 19:00
6.预约列表页面

Loading…
Cancel
Save