Browse Source

修改页面跳转方法

master
zq 4 months ago
parent
commit
f72646bd24
  1. 36
      components/inputBox.vue
  2. 15
      components/visitorList.vue
  3. 23
      pages/modify_visitor/modify_visitor.vue
  4. 5
      pages/prebook/prebook.vue
  5. 14
      pages/usercenter/usercenter.vue
  6. 28
      pages/visitors/visitors.vue
  7. 31
      pages/visitors_new/visitors_new.vue
  8. 9
      pages/waiting_method/waiting_method.vue

36
components/inputBox.vue

@ -4,12 +4,11 @@
<view class="top-wrapper flex"> <view class="top-wrapper flex">
<view class="left PfScMedium"> <view class="left PfScMedium">
<!-- <text :class="!required?'hide-start':''"><img :src="cssUrl+'hua.svg'" class="hua"></text> -->
<view>{{label}}</view> <view>{{label}}</view>
</view> </view>
<view class="right"> <view class="right">
<textarea v-if="autoHeight" :auto-height="true" :value="value" :placeholder="holder" @blur="handleBlur" @input="handleInput"></textarea> <textarea class="textarea" v-if="autoHeight" :auto-height="true" :value="value" :placeholder="holder" @blur="handleBlur" @input="handleInput"></textarea>
<input v-else :value="value" :placeholder="holder" @blur="handleBlur" @input="handleInput"></input> <input class="input" v-else :value="value" :placeholder="holder" @blur="handleBlur" @input="handleInput"></input>
</view> </view>
</view> </view>
@ -126,11 +125,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.input-com{ .input-com{
&:last-of-type{
.input-wrapper{
border: none !important;
}
}
.input-wrapper{ .input-wrapper{
min-height: 100rpx; min-height: 100rpx;
background: #FFFFFF; background: #FFFFFF;
@ -171,7 +166,10 @@ export default {
view{ view{
color: #000000; color: #000000;
letter-spacing: 2rpx; letter-spacing: 2rpx;
font-family: PingFang SC;
font-size: 32rpx; font-size: 32rpx;
font-weight: 500;
line-height: 44rpx;
color: #000000; color: #000000;
} }
.hide-start{ .hide-start{
@ -185,9 +183,29 @@ export default {
padding-left: 10rpx; padding-left: 10rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
textarea{ .input{
color: #222222;
&::placeholder{
font-size: 32rpx;
font-weight: normal;
line-height: 44rpx;
text-align: right;
letter-spacing: 0.24rpx;
color: #999999;
}
}
.textarea{
width: 100%; width: 100%;
height: 45rpx; height: 45rpx;
color: #222222;
&::placeholder{
font-size: 32rpx;
font-weight: normal;
line-height: 44rpx;
text-align: right;
letter-spacing: 0.24rpx;
color: #999999;
}
} }
} }
} }

15
components/visitorList.vue

@ -6,7 +6,8 @@
<text>增加就诊人</text> <text>增加就诊人</text>
</view> </view>
<view :class="'item ' + (userSelectIndex == 0 ? ' active' : '')" @click="selectUser(0)">全部</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 :class="'item' + (userSelectIndex == (key + 1) ? ' active' : '')" v-for="(item, key) in vistors"
@click="selectUser(key + 1)">{{ item.name }}</view>
</view> </view>
</view> </view>
</template> </template>
@ -30,7 +31,7 @@ export default {
}, },
methods: { methods: {
addVisitor() { addVisitor() {
location.href = '/pages/modify_visitor/modify_visitor?type=1' this.$nav.navToPath('/pages/modify_visitor/modify_visitor?type=1')
}, },
selectUser(key) { selectUser(key) {
this.userSelectIndex = key this.userSelectIndex = key
@ -63,6 +64,7 @@ export default {
width: 100%; width: 100%;
height: auto; height: auto;
overflow: hidden; overflow: hidden;
.nav { .nav {
width: 100%; width: 100%;
display: flex; display: flex;
@ -73,6 +75,7 @@ export default {
align-items: center; align-items: center;
padding: 0 18rpx; padding: 0 18rpx;
column-gap: 20rpx; column-gap: 20rpx;
.item { .item {
width: auto; width: auto;
flex-shrink: 0; flex-shrink: 0;
@ -86,14 +89,17 @@ export default {
color: #616266; color: #616266;
min-width: 136rpx; min-width: 136rpx;
text-align: center; text-align: center;
&.active { &.active {
border: 1rpx solid #5BD07A; border: 1rpx solid #5BD07A;
color: #58CA7F; color: #58CA7F;
font-weight: 500;
background: #F8FFF7; background: #F8FFF7;
} }
} }
.add { .add {
width: auto; width: 188rpx;
height: 60rpx; height: 60rpx;
display: flex; display: flex;
align-items: center; align-items: center;
@ -110,11 +116,10 @@ export default {
flex-shrink: 0; flex-shrink: 0;
img { img {
height: 44rpx; width: 44rpx;
height: 44rpx; height: 44rpx;
} }
} }
} }
} }
</style> </style>

23
pages/modify_visitor/modify_visitor.vue

@ -1,17 +1,16 @@
<template> <template>
<view class="visitor-form-page"> <view class="visitor-form-page">
<view class="block"> <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="name" holder="填写姓名" label="患者姓名" @blurEvent="nameBlurEvent"></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="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> <input-box class="inputcom-wrapper" v-model="phone" holder="填写患者手机号" label="患者手机号" @blurEvent="phoneBlurEvent" rule="phone"></input-box>
</view> </view>
<view class="submit-wrapper btPadding" v-if="!vid"> <view class="submit-wrapper btPadding" v-if="!vid">
<view :class="'btn btn3 submit'+(canSubmit?' primary':' noclick')" :hover-class="(canSubmit?'hover':'')" @click="submit" v-if="!vid"> <view :class="'btn btn3 PfScMedium submit'+(canSubmit?' primary':' noclick')" :hover-class="(canSubmit?'hover':'')" @click="submit" v-if="!vid">
确认新增 确认新增
</view> </view>
<view :class="'btn btn3 submit'+(canSubmit?' primary':' noclick')" :hover-class="(canSubmit?'hover':'')" @click="submit" v-else> <view :class="'btn btn3 PfScMedium submit'+(canSubmit?' primary':' noclick')" :hover-class="(canSubmit?'hover':'')" @click="submit" v-else>
确认修改 确认修改
</view> </view>
</view> </view>
@ -90,19 +89,10 @@
} }
uni.navigateBack() uni.navigateBack()
// this.$func.toPage('/pages/visitors/visitors?type='+this.type)
}); });
}, },
getVisitorInfo() { getVisitorInfo() {
this.visitor_info = JSON.parse(uni.getStorageSync('visitor_info_'+ this.vid)) this.visitor_info = JSON.parse(uni.getStorageSync('visitor_info_'+ this.vid))
//
// this.$http.req('user/get_visitor_info', {id:this.vid}, 'GET', true).then(data=>{
// if(data == -1) {
// this.$func.toPage('/pages/index/index')
// return
// }
console.log(this.visitor_info,'visitor_info');
this.name = this.visitor_info.name this.name = this.visitor_info.name
this.idcard = this.visitor_info.idcard this.idcard = this.visitor_info.idcard
this.phone = this.visitor_info.phone this.phone = this.visitor_info.phone
@ -110,7 +100,6 @@
this.idcardExtRule = true this.idcardExtRule = true
this.phoneRule = true this.phoneRule = true
this.checkSubmit() this.checkSubmit()
// });
}, },
nameBlurEvent(value, res){ nameBlurEvent(value, res){
this.name = value this.name = value
@ -153,14 +142,15 @@
height: 100vh; height: 100vh;
overflow-y: scroll; overflow-y: scroll;
.block{ .block{
// min-height: 50vh;
// min-height: 662rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0rpx 2rpx 24rpx 0rpx rgba(0,0,0,0.03); box-shadow: 0rpx 2rpx 24rpx 0rpx rgba(0,0,0,0.03);
border-radius: 8rpx; border-radius: 8rpx;
width: 714rpx; width: 714rpx;
margin: 20rpx auto 0rpx; margin: 20rpx auto 0rpx;
overflow: hidden; overflow: hidden;
&:nth-child(3){
border: none !important;
}
.title{ .title{
font-size: 32rpx; font-size: 32rpx;
color: #000000; color: #000000;
@ -170,9 +160,6 @@
letter-spacing: 2rpx; letter-spacing: 2rpx;
margin: 36rpx 0 36rpx 24rpx; margin: 36rpx 0 36rpx 24rpx;
} }
.inputcom-wrapper{
// margin-bottom: 20rpx;
}
} }
.submit-wrapper{ .submit-wrapper{
overflow: hidden; overflow: hidden;

5
pages/prebook/prebook.vue

@ -122,9 +122,7 @@
times:false, times:false,
success() { success() {
setTimeout(function(){ setTimeout(function(){
uni.navigateTo({ this.$nav.navToPath("/pages/prebook_list/prebook_list")
url:"/pages/prebook_list/prebook_list"
})
}, 1500) }, 1500)
} }
}) })
@ -207,7 +205,6 @@
// this.getAvailabletRegistrationTime(false, chooseDay) // this.getAvailabletRegistrationTime(false, chooseDay)
// return // return
// } // }
let remain = 1
if(data.remain < this.activeVisitors.length){ if(data.remain < this.activeVisitors.length){
this.needSelectMembers = true this.needSelectMembers = true
this.$set(this.times, 'remain', data.remain) this.$set(this.times, 'remain', data.remain)

14
pages/usercenter/usercenter.vue

@ -45,19 +45,13 @@
}); });
}, },
toVisitors(){ toVisitors(){
uni.navigateTo({ this.$nav.navToPath('/pages/visitors_new/visitors_new?type=2')
url:'/pages/visitors_new/visitors_new?type=2'
})
}, },
toPrebookList(){ toPrebookList(){
uni.navigateTo({ this.$nav.navToPath('/pages/prebook_list/prebook_list')
url:'/pages/prebook_list/prebook_list'
})
}, },
toUserModify(){ toUserModify(){
uni.navigateTo({ this.$nav.navToPath('/pages/user_modify/user_modify')
url:'/pages/user_modify/user_modify'
})
} }
} }
} }
@ -74,7 +68,7 @@
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
border-radius: 100%; border-radius: 100%;
margin: 17rpx auto 24rpx; margin: 20rpx auto 24rpx;
} }
.ucode{ .ucode{
width: 80%; width: 80%;

28
pages/visitors/visitors.vue

@ -177,9 +177,10 @@
}, },
methods: { methods: {
reback(){ reback(){
uni.navigateTo({ // uni.navigateTo({
url:'/' // url:'/'
}) // })
this.$nav.navToPath('/')
}, },
// -- // --
@ -218,9 +219,7 @@
}); });
}, },
appointTime(){ appointTime(){
uni.navigateTo({ this.$nav.navToPath("/pages/visitors/visitors?type=1&is_preview=1")
url:"/pages/visitors/visitors?type=1&is_preview=1"
})
}, },
modifyVistor(visitor){ modifyVistor(visitor){
uni.setStorageSync('visitor_info_'+visitor.id, JSON.stringify(visitor)) uni.setStorageSync('visitor_info_'+visitor.id, JSON.stringify(visitor))
@ -277,7 +276,6 @@
this.visitUsers = [...this.visitUsers] this.visitUsers = [...this.visitUsers]
this.popMsgs = [] this.popMsgs = []
var popmsgIndex = 0
for (var i = 0; i < this.visitUsers.length; i++) { for (var i = 0; i < this.visitUsers.length; i++) {
this.visitUsers[i].select = false this.visitUsers[i].select = false
} }
@ -325,7 +323,7 @@
popCancel(e){ popCancel(e){
}, },
addVisitor(){ addVisitor(){
location.href = "/pages/modify_visitor/modify_visitor?type="+this.type this.$nav.navToPath("/pages/modify_visitor/modify_visitor?type="+this.type)
}, },
toPrebook(){ toPrebook(){
if(this.selectCount <= 0){ if(this.selectCount <= 0){
@ -341,15 +339,12 @@
uni.setStorageSync('active_visitors', JSON.stringify(this.activeVisitors)) uni.setStorageSync('active_visitors', JSON.stringify(this.activeVisitors))
// => // =>
if((this.type == 0 || this.type == 1) && !this.is_preview){ if((this.type == 0 || this.type == 1) && !this.is_preview){
uni.navigateTo({ this.$nav.navToPath('/pages/waiting_method/waiting_method')
url:'/pages/waiting_method/waiting_method'
})
return return
} }
// //
uni.navigateTo({ this.$nav.navToPath("/pages/prebook/prebook")
url:"/pages/prebook/prebook"
})
} }
} }
} }
@ -486,11 +481,6 @@
display: block; display: block;
margin: 0 auto; margin: 0 auto;
} }
// <view class="submit flex" v-if="type == 3 && !hasBaoDaoData" @click="toPrebook">
// <view :class="'btn cancel btn1'" hover-class="hover" @click="reback"></view>
// <view class="btn primary btn1" hover-class="hover" @click="cancelBook"></view>
// </view>
.baodao-submit{ .baodao-submit{
justify-content: center; justify-content: center;
column-gap: 42rpx; column-gap: 42rpx;

31
pages/visitors_new/visitors_new.vue

@ -5,22 +5,6 @@
<uni-card v-if="visitor_id==0 || (visitor_id!=0 && visitor_id==item.id)" v-for="(item,key) in visitor_list" :title="item.name" :extra="'身份证:'+item.idcard_txt" :class="((visitor_list && item.h_list && item.h_list.length>0)?'':'empty')" margin="0 0 0rpx 0" shadow="none" :border="false" padding="24rpx"> <uni-card v-if="visitor_id==0 || (visitor_id!=0 && visitor_id==item.id)" v-for="(item,key) in visitor_list" :title="item.name" :extra="'身份证:'+item.idcard_txt" :class="((visitor_list && item.h_list && item.h_list.length>0)?'':'empty')" margin="0 0 0rpx 0" shadow="none" :border="false" padding="24rpx">
<visitor-account v-for="(item2,key2) in item.h_list" :depart_id="item2.depart_id" :visitor_id="item.id" :thumb="cssUrl+'hicon.svg'" v-if="visitor_list && item.h_list && item.h_list.length>0" :errmsg="(!item2.weeks ? '' : ' '+(item2.weeks<=10?item2.weeks:('超过10')))+'周未看病,请及时复诊'"></visitor-account> <visitor-account v-for="(item2,key2) in item.h_list" :depart_id="item2.depart_id" :visitor_id="item.id" :thumb="cssUrl+'hicon.svg'" v-if="visitor_list && item.h_list && item.h_list.length>0" :errmsg="(!item2.weeks ? '' : ' '+(item2.weeks<=10?item2.weeks:('超过10')))+'周未看病,请及时复诊'"></visitor-account>
</uni-card> </uni-card>
<!-- <uni-card title="上官子涵" extra="身份证:9098******8778" margin="0 0 20rpx 0" shadow="none" :border="false" padding="24rpx" class="">
<visitor-account :thumb="cssUrl+'hicon.svg'"></visitor-account>
</uni-card>
<uni-card title="上官子涵" extra="身份证:9098******8778" margin="0 0 20rpx 0" shadow="none" :border="false" padding="24rpx" class="">
<visitor-account :thumb="cssUrl+'hicon.svg'" 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 :thumb="cssUrl+'hicon.svg'" errmsg="4周未看病,请及时复诊"></visitor-account>
<visitor-account :thumb="cssUrl+'hicon.svg'" errmsg="4周未看病,请及时复诊"></visitor-account>
</uni-card> -->
<view class="bt btPadding"></view> <view class="bt btPadding"></view>
</view> </view>
@ -33,30 +17,18 @@
export default { export default {
data() { data() {
return { return {
collapseValue:0,
html:'就诊须知',
cssUrl:this.cssUrl, cssUrl:this.cssUrl,
depart_id:0, depart_id:0,
hospital_depart_name:'', hospital_depart_name:'',
visitor_list:false, visitor_list:false,
value:'', value:'',
visitor_id:0, visitor_id:0,
type: 0,
types: [{
text: '等医生叫号',
value: 0
}, {
text: '找床位候诊',
value: 1
}],
} }
}, },
components:{ components:{
visitorList, visitorList,
visitorAccount visitorAccount
}, },
onLoad(option) {
},
onReady() { onReady() {
this.pageInit() this.pageInit()
}, },
@ -64,9 +36,6 @@
pageInit() { pageInit() {
this.$refs.visitors.getVisitors() this.$refs.visitors.getVisitors()
}, },
changeCollapse(e) {
console.log(e);
},
setVisitorListData(e) { setVisitorListData(e) {
this.visitor_list = e this.visitor_list = e
}, },

9
pages/waiting_method/waiting_method.vue

@ -15,6 +15,7 @@
</view> </view>
</template> </template>
<script> <script>
import userCard from '@/components/userCard.vue'; import userCard from '@/components/userCard.vue';
@ -61,7 +62,6 @@
this.visitUsers = data; this.visitUsers = data;
this.visitUsers = [...this.visitUsers] this.visitUsers = [...this.visitUsers]
this.popMsgs = [] this.popMsgs = []
var popmsgIndex = 0
for (var i = 0; i < this.visitUsers.length; i++) { for (var i = 0; i < this.visitUsers.length; i++) {
this.visitUsers[i].select = false this.visitUsers[i].select = false
} }
@ -99,9 +99,10 @@
this.$http.req('user/checkin', obj, 'POST').then(data => { this.$http.req('user/checkin', obj, 'POST').then(data => {
// //
if(data == -1) return if(data == -1) return
uni.navigateTo({ // uni.navigateTo({
url: '/pages/prebook_list/prebook_list' // url: '/pages/prebook_list/prebook_list'
}); // });
this.$nav.navToPath('/pages/prebook_list/prebook_list')
}).catch(err => { }).catch(err => {
this.$pop.msg('提交失败,请重试'); this.$pop.msg('提交失败,请重试');
}); });

Loading…
Cancel
Save