This commit is contained in:
shidongli 2023-11-14 15:53:48 +08:00
parent 4ad55d3b6d
commit 326919e98a
2 changed files with 100 additions and 89 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<view class="app"> <view class="app">
<view class="content" v-if='tabslist.length>0'> <view class="content" v-if='tabslist.length>0'>
<view class="" v-if="timecurrent==0"> <view class="toptime" v-if="timecurrent==0">
<span>{{tabslist[0].name}}&nbsp;&nbsp;{{tabslist[0].dates}}</span> <span>{{tabslist[0].name}}&nbsp;&nbsp;{{tabslist[0].dates}}</span>
</view> </view>
@ -36,8 +36,7 @@
<view class="bodyitem"> <view class="bodyitem">
<view class="" v-for="(item ,index) in List[timecurrent].morningList"> <view class="" v-for="(item ,index) in List[timecurrent].morningList">
<view @tap='taptimemorning(item,index)' <view @tap='taptimemorning(item,index)' :class="item.status==true?'morningbodytwo':'morningbody'">
:class="item.status==true?'morningbodytwo':'morningbody'">
<span class="spanitem">{{item.scheduleTimeSlot}}</span> <span class="spanitem">{{item.scheduleTimeSlot}}</span>
<view class="spanitem" v-if="item.status==false">不可预约</view> <view class="spanitem" v-if="item.status==false">不可预约</view>
<view class="spanitem" v-else>可预约</view> <view class="spanitem" v-else>可预约</view>
@ -52,8 +51,7 @@
</view> </view>
<view class="bodyitem"> <view class="bodyitem">
<view class="" v-for="(item ,index) in List[timecurrent].afternoonList"> <view class="" v-for="(item ,index) in List[timecurrent].afternoonList">
<view @tap='taptimeafter(item,index)' <view @tap='taptimeafter(item,index)' :class="item.status==true?'bodytwo':'body'">
:class="item.status==true?'bodytwo':'body'">
<span class="spanitem">{{item.scheduleTimeSlot}}</span> <span class="spanitem">{{item.scheduleTimeSlot}}</span>
<view class="spanitem" v-if="item.status==false">不可预约</view> <view class="spanitem" v-if="item.status==false">不可预约</view>
<view class="spanitem" v-else>可预约</view> <view class="spanitem" v-else>可预约</view>
@ -125,7 +123,7 @@
this.timeindexafter = null this.timeindexafter = null
this.timeindex = null this.timeindex = null
this.afterdata() this.afterdata()
} else if (this.Soonerorlater == 'all') { } else if (this.Soonerorlater == 'all') {
this.timeindexafter = null this.timeindexafter = null
this.timeindex = null this.timeindex = null
@ -133,19 +131,19 @@
} }
}, },
// //
morningdata(){ morningdata() {
this.qurey={ this.qurey = {
schedulePlanDetailIds:[], schedulePlanDetailIds: [],
status:'1', status: '1',
} }
getListByDoctor(this.doctorId).then(res => { getListByDoctor(this.doctorId).then(res => {
if (res.data) { if (res.data) {
res.data[this.timecurrent].morningList.forEach(e=>{ res.data[this.timecurrent].morningList.forEach(e => {
this.qurey.schedulePlanDetailIds.push(e.schedulePlanDetailId) this.qurey.schedulePlanDetailIds.push(e.schedulePlanDetailId)
}) })
updateStatus(this.qurey).then(res => { updateStatus(this.qurey).then(res => {
if (res.code == 500) { if (res.code == 500) {
@ -153,7 +151,7 @@
title: res.msg, title: res.msg,
type: 'error', type: 'error',
}) })
} else { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '修改成功', title: '修改成功',
@ -161,71 +159,71 @@
duration: '1000' duration: '1000'
}) })
this.updata() this.updata()
} }
}) })
} }
}) })
}, },
// //
afterdata(){ afterdata() {
this.qurey={ this.qurey = {
schedulePlanDetailIds:[], schedulePlanDetailIds: [],
status:'1', status: '1',
}, },
getListByDoctor(this.doctorId).then(res => { getListByDoctor(this.doctorId).then(res => {
if (res.data) { if (res.data) {
console.log(res.data[this.timecurrent].afternoonList) console.log(res.data[this.timecurrent].afternoonList)
// var schedulePlanDetailId // var schedulePlanDetailId
res.data[this.timecurrent].afternoonList.forEach(e=>{ res.data[this.timecurrent].afternoonList.forEach(e => {
this.qurey.schedulePlanDetailIds.push(e.schedulePlanDetailId) this.qurey.schedulePlanDetailIds.push(e.schedulePlanDetailId)
}) })
updateStatus(this.qurey).then(res => { updateStatus(this.qurey).then(res => {
if (res.code == 500) { if (res.code == 500) {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: res.msg, title: res.msg,
type: 'error', type: 'error',
}) })
} else { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '修改成功', title: '修改成功',
type: 'success', type: 'success',
duration: '1000' duration: '1000'
}) })
this.updata() this.updata()
} }
}) })
} }
}) })
}, },
// //
alldata(){ alldata() {
getListByDoctor(this.doctorId).then(res => { getListByDoctor(this.doctorId).then(res => {
this.qurey={ this.qurey = {
schedulePlanDetailIds:[], schedulePlanDetailIds: [],
status:'1', status: '1',
} }
if (res.data) { if (res.data) {
console.log(res.data[this.timecurrent].afternoonList) console.log(res.data[this.timecurrent].afternoonList)
// var schedulePlanDetailId // var schedulePlanDetailId
res.data[this.timecurrent].afternoonList.forEach(e=>{ res.data[this.timecurrent].afternoonList.forEach(e => {
this.qurey.schedulePlanDetailIds.push(e.schedulePlanDetailId) this.qurey.schedulePlanDetailIds.push(e.schedulePlanDetailId)
}) })
res.data[this.timecurrent].morningList.forEach(e=>{ res.data[this.timecurrent].morningList.forEach(e => {
this.qurey.schedulePlanDetailIds.push(e.schedulePlanDetailId) this.qurey.schedulePlanDetailIds.push(e.schedulePlanDetailId)
}) })
updateStatus(this.qurey).then(res => { updateStatus(this.qurey).then(res => {
if (res.code == 500) { if (res.code == 500) {
@ -233,7 +231,7 @@
title: res.msg, title: res.msg,
type: 'error', type: 'error',
}) })
} else { } else {
this.$refs.uToast.show({ this.$refs.uToast.show({
title: '修改成功', title: '修改成功',
@ -241,20 +239,20 @@
duration: '1000' duration: '1000'
}) })
this.updata() this.updata()
} }
}) })
} }
}) })
}, },
// //
taptimemorning(item, index) { taptimemorning(item, index) {
this.qurey={ this.qurey = {
schedulePlanDetailIds:[], schedulePlanDetailIds: [],
status:'1', status: '1',
} }
this.status = item.status this.status = item.status
this.timeindex = index this.timeindex = index
@ -265,7 +263,7 @@
this.qurey.status = "0" this.qurey.status = "0"
} }
this.qurey.schedulePlanDetailIds.push(item.schedulePlanDetailId) this.qurey.schedulePlanDetailIds.push(item.schedulePlanDetailId)
console.log(this.qurey) console.log(this.qurey)
@ -291,10 +289,10 @@
// //
taptimeafter(item, index) { taptimeafter(item, index) {
this.timeindexafter = index this.timeindexafter = index
this.qurey={ this.qurey = {
schedulePlanDetailIds:[], schedulePlanDetailIds: [],
status:'' status: ''
} }
if (item.status == true) { if (item.status == true) {
this.qurey.status = "1" this.qurey.status = "1"
@ -303,7 +301,7 @@
this.qurey.status = "0" this.qurey.status = "0"
} }
this.qurey.schedulePlanDetailIds.push(item.schedulePlanDetailId) this.qurey.schedulePlanDetailIds.push(item.schedulePlanDetailId)
console.log(this.qurey) console.log(this.qurey)
updateStatus(this.qurey).then(res => { updateStatus(this.qurey).then(res => {
@ -358,12 +356,12 @@
this.timeindex = null this.timeindex = null
this.Soonerorlater = null this.Soonerorlater = null
}, },
timedata(){ timedata() {
this.timecurrent++ this.timecurrent++
this.timeindexafter = null this.timeindexafter = null
this.timeindex = null this.timeindex = null
this.Soonerorlater = null this.Soonerorlater = null
}, },
} }
} }
@ -567,7 +565,7 @@
border-radius: 5rpx 5rpx 5rpx 0rpx; border-radius: 5rpx 5rpx 5rpx 0rpx;
::v-deep .u-tabs[data-v-59a86fad] { ::v-deep .u-tabs[data-v-59a86fad] {
padding: 74rpx 0 0 0; padding: 10rpx 0 0 0;
} }
::v-deep .uni-scroll-view, ::v-deep .uni-scroll-view,
@ -576,11 +574,17 @@
height: 100%; height: 100%;
} }
span { span {
position: absolute; position: relative !important;
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
top: 1%; // top: 1%;
margin-top: 14rpx;
display: inline-block;
// background: red;
/* width: 100%; */
height: 30px;
} }
::v-deep.tabs { ::v-deep.tabs {

View File

@ -64,6 +64,8 @@
{{list.personName}} {{list.personName}}
</view> </view>
<view class="fist"> <view class="fist">
<!-- <image></image> -->
<image class="imagelist" src="../../static/time.png" mode=""></image>
<image src="../../static/see.png" mode="" class="two" @tap="gotime"></image> <image src="../../static/see.png" mode="" class="two" @tap="gotime"></image>
</view> </view>
<view class="myorder titles" @tap="personlinfo()"> <view class="myorder titles" @tap="personlinfo()">
@ -383,9 +385,14 @@
left: 50%; left: 50%;
top: 13%; top: 13%;
transform: translateX(-50%); transform: translateX(-50%);
background: url(../../static/time.png) no-repeat center center fixed; // background: url(../../static/time.png) no-repeat center center fixed;
background-size: contain; // background-size: contain;
margin-bottom: 50rpx; margin-bottom: 50rpx;
.imagelist{
width: 100%;
height: 130rpx;
}
.two { .two {
width: 168rpx; width: 168rpx;
height: 54rpx; height: 54rpx;