Browse Source

就诊人页面相关

master
kuaileWu 6 months ago
parent
commit
1185c49845
  1. 154
      components/visitorAccount.vue
  2. 113
      components/visitorList.vue
  3. 14
      pages.json
  4. 2
      pages/modify_visitor/modify_visitor.vue
  5. 74
      pages/prebook_list/prebook_list.vue
  6. 2
      pages/usercenter/usercenter.vue
  7. 189
      pages/visitors_new/visitors_new.vue
  8. 1
      static/images/frontend/add_visitor.svg
  9. 1
      static/images/frontend/herror.svg
  10. 1
      static/images/frontend/hicon.svg
  11. 54
      uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue

154
components/visitorAccount.vue

@ -0,0 +1,154 @@
<template>
<view class="visitor-account-com">
<uni-collapse>
<uni-collapse-item title="广安门中医医院中西医门诊部 中医科" :thumb="cssUrl+'hicon.svg'" :errmsg="errmsg">
<view class="collapse-list">
<view class="account-list">
<view class="account-item">
<view class="title PfScSemibold">单次项目</view>
<view class="item">
<text>针灸</text>
<text>余1次</text>
</view>
<view class="item">
<text>麦粒灸</text>
<text>余3次</text>
</view>
<view class="item notice">
<text>艾灸</text>
<text class="outnum">欠1次</text>
</view>
</view>
<view class="account-item">
<view class="accout-package">
<view class="title PfScSemibold">疗程套餐</view>
<span class="package-name over">上热下寒疗程包</span>
<view class="item">
<text>针灸</text>
<text>余1次</text>
</view>
<view class="item">
<text>麦粒灸</text>
<text>余3次</text>
</view>
<view class="item notice">
<text>艾灸</text>
<text class="outnum">欠1次</text>
</view>
</view>
<view class="accout-package">
<view class="title PfScMedium">疗程套餐</view>
<span class="package-name over">上热下寒疗程包</span>
<view class="item">
<text>针灸</text>
<text>余1次</text>
</view>
<view class="item">
<text>麦粒灸</text>
<text>余3次</text>
</view>
<view class="item notice">
<text>艾灸</text>
<text class="outnum">欠1次</text>
</view>
</view>
</view>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</template>
<script>
export default {
name: "visitorAccount",
props: {
errmsg: {
type: String,
default: ''
}
},
data() {
return {
cssUrl:this.cssUrl,
}
},
methods: {
}
};
</script>
<style lang="scss" scoped>
.visitor-account-com{
width: 100%;
height: auto;
overflow: hidden;
/deep/{
.uni-collapse-item__wrap{
background: #F9FAFB;
.uni-collapse-item__wrap-content{
background: #F8FFF7;
margin-bottom:24rpx;
&.open{
.account-list{
padding: 24rpx;
margin-top: 24rpx;
box-sizing: border-box;
width: 100%;
height: auto;
overflow: hidden;
.account-item{
margin-bottom: 40rpx;
&:last-of-type{
margin-bottom: 24rpx;
}
.item{
display: flex;
justify-content: space-between;
align-items: center;
height: 38rpx;
line-height: 38rpx;
margin-top: 24rpx;
font-size: 28rpx;
letter-spacing: 3.14rpx;
color: #333333;
text{
&.outnum{
color: #FD3B3B;
}
}
}
.accout-package{
margin-bottom: 40rpx;
&:last-of-type{
margin-bottom: 0rpx;
}
.package-name{
border-radius: 6rpx;
background: linear-gradient(270deg, #FFEFD5 0%, #FED9A6 100%);
height: 43rpx;
line-height: 43rpx;
padding: 0px 16rpx;
margin-top: 24rpx;
width: auto;
display: inline-block;
font-size: 28rpx;
color: #79624A;
text-align: center;
max-width: calc(100% - 24rpx);
}
}
}
}
}
}
}
}
}
</style>

113
components/visitorList.vue

@ -0,0 +1,113 @@
<template>
<view class="visitor-list-com">
<view class="nav">
<view class="add PfScMedium" @click="addVisitor">
<img :src="cssUrl+'add_visitor.svg'">
<text>增加就诊人</text>
</view>
<view :class="'item'+(userSelectIndex==0?' active':'')" @click="selectUser(0)">全部</view>
<view :class="'item'+(userSelectIndex==(key+1)?' active':'')" v-for="(item,key) in vistors" @click="selectUser(key+1)">{{item.name}}</view>
</view>
</view>
</template>
<script>
export default {
name: "visitorList",
props: {
add:{
type:Boolean,
default:()=>false
}
},
data() {
return {
cssUrl:this.cssUrl,
userSelectIndex:0,
vistors:false,
}
},
methods: {
addVisitor(){
location.href = '/pages/modify_visitor/modify_visitor?type=1'
},
selectUser(key){
this.userSelectIndex = key
var visitor_id = 0
if(this.userSelectIndex > 0) visitor_id = this.vistors[this.userSelectIndex-1].id
this.$emit('clickEvent', visitor_id)
},
getVisitors() {
var param = new Object()
param.page = 1
param.limit = 10000
this.$http.req('user/get_visitors', {}, 'GET').then(data=>{
if(data == -1) return
this.vistors = data
this.$emit('clickEvent', 0)
});
}
}
};
</script>
<style lang="scss" scoped>
.visitor-list-com{
width: 100%;
height: auto;
overflow: hidden;
.nav{
width: 100%;
display: flex;
height: 108rpx;
display: flex;
box-sizing: border-box;
overflow-x: auto;
align-items: center;
padding: 0 18rpx;
column-gap: 20rpx;
.item{
width: auto;
flex-shrink: 0;
padding: 0 20rpx;
height: 60rpx;
line-height: 60rpx;
background: rgba(201,203,209,0.25);
border-radius: 30rpx;
box-sizing: border-box;
font-size: 24rpx;
color: #616266;
min-width: 136rpx;
text-align: center;
&.active{
border: 1rpx solid #5BD07A;
color: #58CA7F;
background: #F8FFF7;
}
}
.add{
width: auto;
height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
z-index: 0;
border-radius: 100rpx;
background: #58CA7F;
font-size: 24rpx;
line-height: 30rpx;
text-align: center;
letter-spacing: 0rpx;
color: #FFFFFF;
padding: 0 12rpx;
flex-shrink: 0;
img{
height: 44rpx;
height: 44rpx;
}
}
}
}
</style>

14
pages.json

@ -6,6 +6,13 @@
}
},
{
"path" : "pages/visitors_new/visitors_new",
"style" :
{
"navigationBarTitleText" : ""
}
},
{
"path" : "pages/waiting_method/waiting_method",
"style" :
{
@ -70,6 +77,13 @@
"navigationBarTitleText": "就诊人",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/visitors_new/visitors_new",
"style" :
{
"navigationBarTitleText" : ""
}
}
],
"globalStyle": {

2
pages/modify_visitor/modify_visitor.vue

@ -3,7 +3,7 @@
<view class="block">
<!-- <view class="title PfScMedium">就诊人信息</view> -->
<input-box class="inputcom-wrapper" v-model="name" holder="填写姓名" label="患者姓名" @blurEvent="nameBlurEvent"></input-box>
<input-box class="inputcom-wrapper" v-model="idcard" holder="填写身份证后4位" label="身份证号" @blurEvent="idCardBlurEvent" rule="idcard"></input-box>
<input-box class="inputcom-wrapper" v-model="idcard" holder="填写身份证号码" label="身份证号" @blurEvent="idCardBlurEvent" rule="idcard"></input-box>
<input-box class="inputcom-wrapper" v-model="phone" holder="填写患者手机号" label="患者手机号" @blurEvent="phoneBlurEvent" rule="phone"></input-box>
</view>

74
pages/prebook_list/prebook_list.vue

@ -1,41 +1,33 @@
<template>
<view class="page-prebook-list">
<view class="nav">
<view :class="'item'+(userSelectIndex==0?' active':'')" @click="selectUser(0)">全部</view>
<view :class="'item'+(userSelectIndex==(key+1)?' active':'')" v-for="(item,key) in vistors" @click="selectUser(key+1)">{{item.name}}</view>
</view>
<visitor-list @clickEvent="getBookData" ref="visitors"></visitor-list>
<pre-book-list class="preg-books" :dataList="bookList"></pre-book-list>
</view>
</template>
<script>
import preBookList from '@/components/preBookList.vue'
import visitorList from '@/components/visitorList.vue'
export default {
data() {
return {
userSelectIndex:0,
vistors:false,
bookList:[]
}
},
components:{
preBookList
},
onShow(){
this.getVisitors()
preBookList,
visitorList
},
onReady() {
this.pageInit()
},
methods: {
selectUser(key){
this.userSelectIndex = key
this.getBookData()
},
getBookData() {
getBookData(visitor_id) {
var param = new Object()
param.page = 1
param.limit = 10000
if(this.userSelectIndex-1 >= 0){
param.visitor_id = this.vistors[this.userSelectIndex-1].id
console.log(this.vistors)
param.limit = 10000
if(visitor_id >= 0){
param.visitor_id = visitor_id
}else{
param.visitor_id = '0'
}
@ -56,18 +48,8 @@
// }
});
},
getVisitors() {
var param = new Object()
param.page = 1
param.limit = 10000
this.$http.req('user/get_visitors', {}, 'GET').then(data=>{
if(data == -1) return
this.vistors = data
this.getBookData()
});
},
pageInit() {
pageInit() {
this.$refs.visitors.getVisitors()
}
}
}
@ -80,36 +62,6 @@
box-sizing: border-box;
overflow-y: auto;
background: #F8F8F8;
.nav{
width: 100%;
display: flex;
height: 132rpx;
display: flex;
box-sizing: border-box;
overflow-x: auto;
align-items: center;
padding: 0 18rpx;
column-gap: 20rpx;
.item{
width: auto;
flex-shrink: 0;
padding: 0 20rpx;
height: 60rpx;
line-height: 60rpx;
background: rgba(201,203,209,0.25);
border-radius: 30rpx;
box-sizing: border-box;
font-size: 24rpx;
color: #616266;
min-width: 136rpx;
text-align: center;
&.active{
border: 1rpx solid #5BD07A;
color: #58CA7F;
background: #F8FFF7;
}
}
}
.preg-books{
width: 714rpx;
margin: 0 auto;

2
pages/usercenter/usercenter.vue

@ -14,7 +14,7 @@
<view class="item" @click="toPrebookList">
<img :src="cssUrl+'message.svg'" alt="">
<view>预约列表</view>
<view>候诊记录</view>
</view>
</view>

189
pages/visitors_new/visitors_new.vue

@ -0,0 +1,189 @@
<template>
<view class='waiting-method-page'>
<visitor-list @clickEvent="getBookData" ref="visitors" :add="true"></visitor-list>
<uni-card title="上官子涵" extra="身份证:9098******8778" margin="0 0 20rpx 0" shadow="none" :border="false" padding="24rpx" class="empty">
<!-- <visitor-account></visitor-account> -->
</uni-card>
<uni-card title="上官子涵" extra="身份证:9098******8778" margin="0 0 20rpx 0" shadow="none" :border="false" padding="24rpx" class="">
<visitor-account></visitor-account>
</uni-card>
<uni-card title="上官子涵" extra="身份证:9098******8778" margin="0 0 20rpx 0" shadow="none" :border="false" padding="24rpx" class="">
<visitor-account errmsg="4周未看病,请及时复诊"></visitor-account>
</uni-card>
<uni-card title="上官子涵" extra="身份证:9098******8778" margin="0 0 20rpx 0" shadow="none" :border="false" padding="24rpx" class="">
<visitor-account errmsg="4周未看病,请及时复诊"></visitor-account>
</uni-card>
</view>
</template>
<script>
import visitorList from '@/components/visitorList.vue'
import visitorAccount from '@/components/visitorAccount.vue'
export default {
data() {
return {
collapseValue:0,
html:'就诊须知',
cssUrl:this.cssUrl,
depart_id:0,
hospital_depart_name:'',
value:'',
type: 0,
types: [{
text: '等医生叫号',
value: 0
}, {
text: '找床位候诊',
value: 1
}],
}
},
components:{
visitorList,
visitorAccount
},
onLoad(option) {
},
onReady() {
this.pageInit()
},
methods: {
pageInit() {
this.$refs.visitors.getVisitors()
},
changeCollapse(e) {
console.log(e);
},
getBookData(visitor_id){
console.log(visitor_id)
}
}
}
</script>
<style lang="scss" scoped>
.waiting-method-page{
overflow: hidden;
/deep/ {
.uni-card{
border-radius: 0;
padding: 34rpx 42rpx !important;
.uni-collapse-item__title-arrow{
margin-right: 0;
}
.uni-collapse-item{
background: #F9FAFB;
}
&.empty{
.uni-card__content{
display: none;
}
}
.uni-collapse-item__title-wrap{
width: calc(100% - 40rpx);
}
.uni-card__content{
background: #F9FAFB;
margin-top: 28rpx;
}
.uni-collapse-item__title{
background: #F9FAFB;
&.uni-collapse-item-border{
border: none;
}
}
.uni-collapse-item__title-img{
width: 32rpx;
height: 32rpx;
margin-right: 12rpx;
}
.uni-collapse-item__title-box{
padding: 0;
background: #F9FAFB;
height: 39rpx;
line-height: 39rpx;
color: #333333;
font-size: 28rpx;
letter-spacing: 2rpx;
font-weight: 600;
}
@supports (-webkit-touch-callout: none) {
.uni-collapse-item__title-box{
font-weight: 500;
}
}
.uni-card__header{
border: none;
padding: 0;
.uni-card__header-extra .uni-card__header-extra-text{
font-size: 24rpx;
font-weight: normal;
line-height: normal;
letter-spacing: 0.14rpx;
color: #949699;
}
.uni-card__header-content .uni-card__header-content-title{
font-weight: 600;
line-height: 42rpx;
font-size: 32rpx;
color: #333333;
&:before{
content: '';
display: inline-block;
width: 8rpx;
height: 34rpx;
z-index: 0;
border-radius: 10rpx;
background: #58CA7F;
position: relative;
top: 5rpx;
margin-right: 12rpx;
}
}
}
}
}
.h-name{
padding: 36rpx 24rpx;
box-sizing: border-box;
width: 100%;
height: 116rpx;
margin-bottom: 20rpx;
background: white;
display: flex;
align-items: center;
font-size: 32rpx;
color: #000000;
}
.title-wrap{
width: 100%;
height: 100rpx;
}
.submit{
position: fixed;
width: 100%;
top: 82.41%;
.submitbtn{
width: 666rpx;
margin: 0 auto;
}
.tip{
text-align: center;
font-size: 28rpx;
color: #B3B4BC;
margin-top: 33rpx;
}
}
}
</style>

1
static/images/frontend/add_visitor.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="44" height="44" viewBox="0 0 44 44"><g><g><path d="M21.80182460784912,8.324324607849121C23.11532460784912,8.324324607849121,24.18022460784912,9.389164607849121,24.18022460784912,10.702704607849121L24.18022460784912,19.42342460784912L32.90092460784912,19.42342460784912C34.214424607849125,19.42342460784912,35.27932460784912,20.48822460784912,35.27932460784912,21.80182460784912C35.27932460784912,23.11532460784912,34.214424607849125,24.18022460784912,32.90092460784912,24.18022460784912L24.18022460784912,24.18022460784912L24.18022460784912,32.90092460784912C24.18022460784912,34.214424607849125,23.11532460784912,35.27932460784912,21.80182460784912,35.27932460784912C20.48822460784912,35.27932460784912,19.42342460784912,34.214424607849125,19.42342460784912,32.90092460784912L19.42342460784912,24.18022460784912L10.702704607849121,24.18022460784912C9.389164607849121,24.18022460784912,8.324324607849121,23.11532460784912,8.324324607849121,21.80182460784912C8.324324607849121,20.48822460784912,9.389164607849121,19.42342460784912,10.702704607849121,19.42342460784912L19.42342460784912,19.42342460784912L19.42342460784912,10.702704607849121C19.42342460784912,9.389164607849121,20.48822460784912,8.324324607849121,21.80182460784912,8.324324607849121Z" fill="#FFFFFF" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

1
static/images/frontend/herror.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="26" height="26" viewBox="0 0 26 26"><defs><clipPath id="master_svg0_135_45094"><rect x="0" y="0" width="26" height="26" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_135_45094)"><g><path d="M13,0C5.8203,0,0,5.8203,0,13C0,20.1797,5.8203,26,13,26C20.1797,26,26,20.1797,26,13C26,5.8203,20.1797,0,13,0ZM13,22.7847C11.5641,22.7847,10.4,21.6206,10.4,20.1847C10.4,18.7487,11.5641,17.5847,13,17.5847C14.4359,17.5847,15.6,18.7487,15.6,20.1847C15.6,21.6206,14.4359,22.7847,13,22.7847ZM13,16.159C11.2667,16.159,9.87567,8.06,9.87567,6.33533C9.87567,4.60981,11.2745,3.211,13,3.211C14.7255,3.211,16.1243,4.60981,16.1243,6.33533C16.1243,8.06,14.7333,16.159,13,16.159Z" fill="#FD3B3B" fill-opacity="1" style="mix-blend-mode:passthrough"/></g></g></svg>

After

Width:  |  Height:  |  Size: 863 B

1
static/images/frontend/hicon.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 14 KiB

54
uni_modules/uni-collapse/components/uni-collapse-item/uni-collapse-item.vue

@ -17,6 +17,12 @@
<uni-icons :color="disabled?'#ddd':'#bbb'" size="14" type="bottom" />
</view>
</view>
<view v-if="errmsg" class="error">
<img :src="cssUrl+'herror.svg'">
<span class="over errtxt">{{errmsg}}</span>
</view>
<view class="uni-collapse-item__wrap" :class="{'is--transition':showAnimation}"
:style="{height: (isOpen?height:0) +'px'}">
<view :id="elId" ref="collapse--hook" class="uni-collapse-item__wrap-content"
@ -98,7 +104,12 @@
showArrow: {
type: Boolean,
default: true
}
},
//
errmsg: {
type: String,
default: ''
},
},
data() {
// TODO IDbug
@ -108,7 +119,8 @@
isheight: null,
height: 0,
elId,
nameSync: 0
nameSync: 0,
cssUrl:this.cssUrl
}
},
watch: {
@ -397,6 +409,44 @@
transition-duration: 0.3s;
transition-timing-function: ease;
}
.error{
display: flex;
align-items: center;
column-gap: 12rpx;
width: 100%;
height: 36rpx;
overflow: hidden;
background-color: #F9FAFB;
box-sizing: border-box;
margin-top: 12rpx;
span{
font-size: 26rpx;
line-height: 26rpx;
}
img{
width: 26rpx;
height: 26rpx;
position: relative;
flex-shrink: 0;
position: relative;
top: -1rpx;
}
.errimg-box{
width: 26rpx;
height: 26rpx;
flex-shrink: 0;
}
.errtxt{
flex-grow: 1;
flex-shrink: 0;
font-size: 26rpx;
display: inline-block;
line-height: 26rpx;
letter-spacing: 0.69rpx;
color: #FD3B3B;
}
}
}
</style>

Loading…
Cancel
Save