|
@@ -69,8 +69,8 @@
|
|
<view v-else class="text-lg margin-top-sm" style="color: rgb(238, 170, 63);border-bottom: 3rpx solid rgb(238, 170, 63); width: 530rpx;"
|
|
<view v-else class="text-lg margin-top-sm" style="color: rgb(238, 170, 63);border-bottom: 3rpx solid rgb(238, 170, 63); width: 530rpx;"
|
|
@click="xuantime">
|
|
@click="xuantime">
|
|
已选时间:{{daytime||'该医生暂未排班'}}
|
|
已选时间:{{daytime||'该医生暂未排班'}}
|
|
- <u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" range-key="start_time_period"
|
|
|
|
- :range="multiSelector"></u-picker>
|
|
|
|
|
|
+ <!-- <u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" range-key="start_time_period"
|
|
|
|
+ :range="multiSelector"></u-picker> -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view v-if="isjigou" bindtap="goAdrPostion" class="pr pt10 pb10 margin-lr-sm margin-top-sm m-bg-white" style="border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
|
|
<view v-if="isjigou" bindtap="goAdrPostion" class="pr pt10 pb10 margin-lr-sm margin-top-sm m-bg-white" style="border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);">
|
|
@@ -126,16 +126,24 @@
|
|
</button>
|
|
</button>
|
|
<button v-if="barindex==1" class="submit text-white" :disabled="isphone" @click="phonezixun" :style="!isphone?'background-color: rgb(11,115,186);font-size: 26rpx;':'font-size: 26rpx;color:gray'">电话咨询</button>
|
|
<button v-if="barindex==1" class="submit text-white" :disabled="isphone" @click="phonezixun" :style="!isphone?'background-color: rgb(11,115,186);font-size: 26rpx;':'font-size: 26rpx;color:gray'">电话咨询</button>
|
|
<button v-else-if="barindex==2" class="submit text-white" :disabled="istuwen" @click="phonezixun" :style="!istuwen?'background-color: rgb(11,115,186);font-size: 26rpx;':'font-size: 26rpx;color:gray'">图文咨询</button>
|
|
<button v-else-if="barindex==2" class="submit text-white" :disabled="istuwen" @click="phonezixun" :style="!istuwen?'background-color: rgb(11,115,186);font-size: 26rpx;':'font-size: 26rpx;color:gray'">图文咨询</button>
|
|
- <button v-else class="submit text-white" @click="phonezixun" :disabled="ismenzhen||daytime==''||is_can_appoint==0" :style="!ismenzhen&&daytime!=''&&is_can_appoint!=0?'background-color: rgb(11,115,186);font-size: 26rpx;':'font-size: 26rpx;color:gray'">门诊预约</button>
|
|
|
|
|
|
+ <button v-else class="submit text-white" @click="phonezixun" :disabled="ismenzhen||daytime==''||is_can_appoint==0"
|
|
|
|
+ :style="!ismenzhen&&daytime!=''&&is_can_appoint!=0?'background-color: rgb(11,115,186);font-size: 26rpx;':'font-size: 26rpx;color:gray'">门诊预约</button>
|
|
</view>
|
|
</view>
|
|
<u-no-network></u-no-network>
|
|
<u-no-network></u-no-network>
|
|
<u-skeleton :loading="loading" el-color="#ddd" :animation="true" bgColor="#FFF"></u-skeleton>
|
|
<u-skeleton :loading="loading" el-color="#ddd" :animation="true" bgColor="#FFF"></u-skeleton>
|
|
|
|
+ <u-popup v-model="dateshow" :safe-area-inset-bottom="true" mode="bottom" border-radius="14" length="50%" height="700rpx">
|
|
|
|
+ <datepicker :date="multiSelector" @callbacktime="callbacktime" ref="date"></datepicker>
|
|
|
|
+ </u-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import datepicker from '../../components/datepicker/datepicker'
|
|
var user = require('../../common/user.js');
|
|
var user = require('../../common/user.js');
|
|
export default {
|
|
export default {
|
|
|
|
+ components: {
|
|
|
|
+ datepicker
|
|
|
|
+ },
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
this.doctorid = options.id
|
|
this.doctorid = options.id
|
|
if (options.time != undefined) {
|
|
if (options.time != undefined) {
|
|
@@ -180,7 +188,8 @@
|
|
istuwen: false,
|
|
istuwen: false,
|
|
ismenzhen: false,
|
|
ismenzhen: false,
|
|
loading: true,
|
|
loading: true,
|
|
- is_can_appoint: ""
|
|
|
|
|
|
+ is_can_appoint: "",
|
|
|
|
+ dateshow: false
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -230,37 +239,82 @@
|
|
docter_id: this.doctorid
|
|
docter_id: this.doctorid
|
|
})
|
|
})
|
|
if (res.status == 0) {
|
|
if (res.status == 0) {
|
|
- console.log(res)
|
|
|
|
|
|
+ console.log(res, "sssss")
|
|
if (res.data.data.length != 0) {
|
|
if (res.data.data.length != 0) {
|
|
|
|
+ // let nian = res.data.data.map(item => {
|
|
|
|
+ // return item.schedule_date
|
|
|
|
+ // })
|
|
|
|
+ // let time = res.data.data.map(item => {
|
|
|
|
+ // return item.schedule_period.map(itm => {
|
|
|
|
+ // itm.organization.org_id = itm.organization['id']
|
|
|
|
+ // return {
|
|
|
|
+ // can_appoint_num: itm.can_appoint_num,
|
|
|
|
+ // ...itm.organization,
|
|
|
|
+ // ...itm.time_period
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
|
|
+ // time[0].forEach(item => {
|
|
|
|
+ // item.start_time_period = item.start_time_period + '-' + item.end_time_period
|
|
|
|
+ // })
|
|
|
|
+ // this.multiSelector.push(nian)
|
|
|
|
+ // time[0].sort((a,b)=> {return a.end_time_period>b.end_time_period?1:-1})
|
|
|
|
+ // this.multiSelector.push(time[0])
|
|
|
|
+ // console.log(this.multiSelector)
|
|
|
|
+ // this.daytime = this.multiSelector[0][0] + " " + this.multiSelector[1][0].start_time_period
|
|
|
|
+ // this.hospital = this.multiSelector[1][0].name
|
|
|
|
+ // this.address = this.multiSelector[1][0].address
|
|
|
|
+ // this.jigouid = this.multiSelector[1][0].org_id
|
|
|
|
+ // this.is_can_appoint = this.multiSelector[1][0].can_appoint_num
|
|
|
|
+ // this.year = this.multiSelector[0][0]
|
|
|
|
+ // console.log(this.jigouid)
|
|
|
|
+ // this.yearid = this.multiSelector[1][0].id
|
|
|
|
+ // console.log(this.yearid)
|
|
|
|
+ // this.distance = parseInt(this.multiSelector[1][0].distance) / 1000
|
|
|
|
+
|
|
|
|
+ let times = []
|
|
let nian = res.data.data.map(item => {
|
|
let nian = res.data.data.map(item => {
|
|
- return item.schedule_date
|
|
|
|
|
|
+ return {
|
|
|
|
+ date: item.schedule_date,
|
|
|
|
+ id: item.id
|
|
|
|
+ }
|
|
})
|
|
})
|
|
- let time = res.data.data.map(item => {
|
|
|
|
- return item.schedule_period.map(itm => {
|
|
|
|
- itm.organization.org_id = itm.organization['id']
|
|
|
|
- return {
|
|
|
|
- can_appoint_num: itm.can_appoint_num,
|
|
|
|
- ...itm.organization,
|
|
|
|
- ...itm.time_period
|
|
|
|
|
|
+ res.data.data.forEach(item => {
|
|
|
|
+ let time = item.schedule_period.map(itm => {
|
|
|
|
+ if (item.id == itm.schedule_id) {
|
|
|
|
+ itm.organization.org_id = itm.organization['id']
|
|
|
|
+ return {
|
|
|
|
+ schedule_id: itm.schedule_id,
|
|
|
|
+ can_appoint_num: itm.can_appoint_num,
|
|
|
|
+ ...itm.organization,
|
|
|
|
+ ...itm.time_period
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- })
|
|
|
|
- time[0].forEach(item => {
|
|
|
|
- item.start_time_period = item.start_time_period + '-' + item.end_time_period
|
|
|
|
|
|
+ times.push(time)
|
|
})
|
|
})
|
|
this.multiSelector.push(nian)
|
|
this.multiSelector.push(nian)
|
|
- this.multiSelector.push(time[0])
|
|
|
|
|
|
+ times.forEach(item => {
|
|
|
|
+ item.sort((a, b) => {
|
|
|
|
+ return a.end_time_period > b.end_time_period ? 1 : -1
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ this.multiSelector.push(times)
|
|
console.log(this.multiSelector)
|
|
console.log(this.multiSelector)
|
|
- this.daytime = this.multiSelector[0][0] + " " + this.multiSelector[1][0].start_time_period
|
|
|
|
- this.hospital = this.multiSelector[1][0].name
|
|
|
|
- this.address = this.multiSelector[1][0].address
|
|
|
|
- this.jigouid = this.multiSelector[1][0].org_id
|
|
|
|
- this.is_can_appoint = this.multiSelector[1][0].can_appoint_num
|
|
|
|
- this.year = this.multiSelector[0][0]
|
|
|
|
- console.log(this.jigouid)
|
|
|
|
- this.yearid = this.multiSelector[1][0].id
|
|
|
|
- console.log(this.yearid)
|
|
|
|
- this.distance = parseInt(this.multiSelector[1][0].distance) / 1000
|
|
|
|
|
|
+ this.daytime = this.multiSelector[0][0].date + " " + this.multiSelector[1][0][0].start_time_period + "-" + this.multiSelector[
|
|
|
|
+ 1][0][0].end_time_period
|
|
|
|
+ this.hospital = this.multiSelector[1][0][0].name
|
|
|
|
+ this.address = this.multiSelector[1][0][0].address
|
|
|
|
+ this.jigouid = this.multiSelector[1][0][0].org_id
|
|
|
|
+ this.is_can_appoint = this.multiSelector[1][0][0].can_appoint_num
|
|
|
|
+ this.year = this.multiSelector[0][0].date
|
|
|
|
+ this.yearid = this.multiSelector[1][0][0].id
|
|
|
|
+ this.distance = parseInt(this.multiSelector[1][0][0].distance) / 1000
|
|
|
|
+ let arr = this.multiSelector[1][0]
|
|
|
|
+ arr.forEach(item=>{
|
|
|
|
+ item.year = nian[0].date
|
|
|
|
+ })
|
|
|
|
+ this.$refs.date.rightday = arr
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -288,7 +342,7 @@
|
|
},
|
|
},
|
|
xuantime() {
|
|
xuantime() {
|
|
if (this.multiSelector.length != 0) {
|
|
if (this.multiSelector.length != 0) {
|
|
- this.show = !this.show
|
|
|
|
|
|
+ this.dateshow = !this.dateshow
|
|
} else {
|
|
} else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
title: "该医生暂未排班",
|
|
title: "该医生暂未排班",
|
|
@@ -296,17 +350,28 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- callbacktime(arr) {
|
|
|
|
- this.daytime = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
|
|
|
|
- this.hospital = this.multiSelector[1][arr[1]].name
|
|
|
|
- this.address = this.multiSelector[1][arr[1]].address
|
|
|
|
- this.jigouid = this.multiSelector[1][arr[1]].org_id
|
|
|
|
- this.is_can_appoint = this.multiSelector[1][arr[1]].can_appoint_num
|
|
|
|
- this.year = this.multiSelector[0][arr[0]]
|
|
|
|
- console.log(this.multiSelector[1][arr[1]])
|
|
|
|
- this.yearid = this.multiSelector[1][arr[1]].id
|
|
|
|
- console.log(this.yearid)
|
|
|
|
- this.distance = parseInt(this.multiSelector[1][arr[1]].distance) / 1000
|
|
|
|
|
|
+ callbacktime(item) {
|
|
|
|
+ console.log(item)
|
|
|
|
+ // this.daytime = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
|
|
|
|
+ // this.hospital = this.multiSelector[1][arr[1]].name
|
|
|
|
+ // this.address = this.multiSelector[1][arr[1]].address
|
|
|
|
+ // this.jigouid = this.multiSelector[1][arr[1]].org_id
|
|
|
|
+ // this.is_can_appoint = this.multiSelector[1][arr[1]].can_appoint_num
|
|
|
|
+ // this.year = this.multiSelector[0][arr[0]]
|
|
|
|
+ // console.log(this.multiSelector[1][arr[1]])
|
|
|
|
+ // this.yearid = this.multiSelector[1][arr[1]].id
|
|
|
|
+ // console.log(this.yearid)
|
|
|
|
+ // this.distance = parseInt(this.multiSelector[1][arr[1]].distance) / 1000
|
|
|
|
+
|
|
|
|
+ this.daytime = item.year + " " + item.start_time_period + "-" + item.end_time_period
|
|
|
|
+ this.hospital = item.name
|
|
|
|
+ this.address = item.address
|
|
|
|
+ this.jigouid = item.org_id
|
|
|
|
+ this.is_can_appoint = item.can_appoint_num
|
|
|
|
+ this.year = item.year
|
|
|
|
+ this.yearid = item.id
|
|
|
|
+ this.distance = parseInt(item.distance) / 1000
|
|
|
|
+ this.dateshow = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|