yanjie пре 4 година
родитељ
комит
e74024ac29

+ 103 - 0
components/datepicker/datepicker.vue

xqd
@@ -0,0 +1,103 @@
+<template>
+	<view class="main">
+		<view class="leftcontainer">
+			<scroll-view scroll-y="true" style="height: 700rpx;">
+				<view :class="leftindex==index?'leftstyle leftstyle_active':'leftstyle'" v-for="(item,index) in date[0]" @click="selectdate(item,index)"
+				 :key="index">
+					{{item.date}}
+				</view>
+			</scroll-view>
+		</view>
+		<view class="rightcontainer">
+			<scroll-view scroll-y="true" style="height: 700rpx;">
+				<u-grid :col="3">
+					<u-grid-item v-for="(itm,idx) in rightday" @click="selectday(itm)" :key="idx">
+						<view class="">
+							预约时间:
+						</view>
+						<view class="margin-top-sm">{{itm.start_time_period}} - {{itm.end_time_period}}</view>
+						<view class="margin-top-sm text-blue">
+							可预约号源:{{itm.can_appoint_num}}
+						</view>
+					</u-grid-item>
+				</u-grid>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			date: {
+				type: Array,
+			}
+		},
+		onShow() {
+			console.log("hahah")
+		},
+		mounted() {
+
+		},
+		data() {
+			return {
+				leftindex: 0,
+				rightday: [],
+				year: ""
+			}
+		},
+
+		methods: {
+			selectdate(item, index) {
+				this.leftindex = index
+				this.year = item.date
+				this.date[1].forEach(data => {
+					data.forEach(itm => {
+						if (itm.schedule_id == item.id) {
+							this.rightday = data
+						}
+					})
+				})
+			},
+			selectday(itm) {
+				// console.log(itm)
+				if (this.year != "") {
+					itm.year = this.year
+				}
+				this.$emit('callbacktime', itm)
+			}
+		}
+	};
+</script>
+
+<style scoped>
+	.main {
+		display: flex;
+		/* margin-left: 15rpx;
+		margin-right: 15rpx; */
+	}
+
+	.leftcontainer {
+		border-right: 1rpx solid #efefef;
+		width: 25%;
+	}
+
+	.rightcontainer {
+		width: 75%;
+	}
+
+	.leftstyle {
+		width: 100%;
+		height: 80rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		font-size: 30rpx;
+		color: #0B73B9;
+	}
+
+	.leftstyle_active {
+		color: #fff;
+		background-color: #0B73B9;
+	}
+</style>

+ 146 - 0
components/loading/loading.vue

xqd
@@ -0,0 +1,146 @@
+<template>
+	<view class="container-main" v-if="show">
+		<view class="loader">
+
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			show: {
+				type: Boolean,
+				default: true
+			}
+		},
+		onLoad(options) {
+
+		},
+		onShow() {
+
+		},
+		mounted() {
+
+		},
+		data() {
+			return {
+
+			}
+		},
+
+		methods: {
+
+		}
+	};
+</script>
+
+<style lang="scss">
+	.container-main {
+		height: 100vh;
+		width: 100%;
+		position: relative;
+		z-index: 999;
+		background-color: #fff;
+	}
+
+	$colors: hsla(337, 84, 48, 0.75) hsla(160, 50, 48, 0.75) hsla(190, 61, 65, 0.75) hsla(41, 82, 52, 0.75);
+	$size: 2.5em;
+	$thickness: 0.5em;
+	// Calculated variables.
+	$lat: ($size - $thickness) / 2;
+	$offset: $lat - $thickness;
+
+	.loader {
+		position: relative;
+		width: $size;
+		height: $size;
+		transform: rotate(165deg);
+
+		&:before,
+		&:after {
+			content: '';
+			position: absolute;
+			top: 50%;
+			left: 50%;
+			display: block;
+			width: $thickness;
+			height: $thickness;
+			border-radius: $thickness / 2;
+			transform: translate(-50%, -50%);
+		}
+
+		&:before {
+			animation: before 2s infinite;
+		}
+
+		&:after {
+			animation: after 2s infinite;
+		}
+	}
+
+	@keyframes before {
+		0% {
+			width: $thickness;
+			box-shadow:
+				$lat (-$offset) nth($colors, 1),
+				(-$lat) $offset nth($colors, 3);
+		}
+
+		35% {
+			width: $size;
+			box-shadow:
+				0 (-$offset) nth($colors, 1),
+				0 $offset nth($colors, 3);
+		}
+
+		70% {
+			width: $thickness;
+			box-shadow:
+				(-$lat) (-$offset) nth($colors, 1),
+				$lat $offset nth($colors, 3);
+		}
+
+		100% {
+			box-shadow:
+				$lat (-$offset) nth($colors, 1),
+				(-$lat) $offset nth($colors, 3);
+		}
+	}
+
+	@keyframes after {
+		0% {
+			height: $thickness;
+			box-shadow:
+				$offset $lat nth($colors, 2),
+				(-$offset) (-$lat) nth($colors, 4);
+		}
+
+		35% {
+			height: $size;
+			box-shadow:
+				$offset 0 nth($colors, 2),
+				(-$offset) 0 nth($colors, 4);
+		}
+
+		70% {
+			height: $thickness;
+			box-shadow:
+				$offset (-$lat) nth($colors, 2),
+				(-$offset) $lat nth($colors, 4);
+		}
+
+		100% {
+			box-shadow:
+				$offset $lat nth($colors, 2),
+				(-$offset) (-$lat) nth($colors, 4);
+		}
+	}
+
+	.loader {
+		position: absolute;
+		top: calc(50% - #{$size / 2});
+		left: calc(50% - #{$size / 2});
+		z-index: 999;
+	}
+</style>

+ 0 - 136
components/uni-section/uni-section.vue

xqd
@@ -1,136 +0,0 @@
-<template>
-	<view class="uni-section" nvue>
-		<view v-if="type" class="uni-section__head">
-			<view :class="type" class="uni-section__head-tag" />
-		</view>
-		<view class="uni-section__content">
-			<text :class="{'distraction':!subTitle}" class="uni-section__content-title">{{ title }}</text>
-			<text v-if="subTitle" class="uni-section__content-sub">{{ subTitle }}</text>
-		</view>
-		<slot />
-	</view>
-</template>
-
-<script>
-
-	/**
-	 * Section 标题栏
-	 * @description 标题栏
-	 * @property {String} type = [line|circle] 标题装饰类型
-	 * 	@value line 竖线
-	 * 	@value circle 圆形
-	 * @property {String} title 主标题
-	 * @property {String} subTitle 副标题
-	 */
-
-	export default {
-		name: 'UniSection',
-		props: {
-			type: {
-				type: String,
-				default: ''
-			},
-			title: {
-				type: String,
-				default: ''
-			},
-			subTitle: {
-				type: String,
-				default: ''
-			}
-		},
-		data() {
-			return {}
-		},
-		watch: {
-			title(newVal) {
-				if (uni.report && newVal !== '') {
-					uni.report('title', newVal)
-				}
-			}
-		},
-		methods: {
-			onClick() {
-				this.$emit('click')
-			}
-		}
-	}
-</script>
-<style lang="scss" scoped>
-	.uni-section {
-		position: relative;
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		margin-top: 10px;
-		flex-direction: row;
-		align-items: center;
-		padding: 0 10px;
-		height: 50px;
-		background-color: $uni-bg-color-grey;
-		/* #ifdef APP-NVUE */
-		// border-bottom-color: $uni-border-color;
-		// border-bottom-style: solid;
-		// border-bottom-width: 0.5px;
-		/* #endif */
-		font-weight: normal;
-	}
-	/* #ifndef APP-NVUE */
-	// .uni-section:after {
-	// 	position: absolute;
-	// 	bottom: 0;
-	// 	right: 0;
-	// 	left: 0;
-	// 	height: 1px;
-	// 	content: '';
-	// 	-webkit-transform: scaleY(.5);
-	// 	transform: scaleY(.5);
-	// 	background-color: $uni-border-color;
-	// }
-	/* #endif */
-
-	.uni-section__head {
-		flex-direction: row;
-		justify-content: center;
-		align-items: center;
-		margin-right: 10px;
-	}
-
-	.line {
-		height: 15px;
-		background-color: $uni-text-color-disable;
-		border-radius: 5px;
-		width: 3px;
-	}
-
-	.circle {
-		width: 8px;
-		height: 8px;
-		border-top-right-radius: 50px;
-		border-top-left-radius: 50px;
-		border-bottom-left-radius: 50px;
-		border-bottom-right-radius: 50px;
-		background-color: $uni-text-color-disable;
-	}
-
-	.uni-section__content {
-		flex-direction: column;
-		flex: 1;
-		color: $uni-text-color;
-	}
-
-	.uni-section__content-title {
-		font-size: $uni-font-size-base;
-		color: $uni-text-color;
-	}
-
-	.distraction {
-		flex-direction: row;
-		align-items: center;
-	}
-
-	.uni-section__content-sub {
-		font-size: $uni-font-size-sm;
-		color: $uni-text-color-grey;
-	}
-</style>

+ 0 - 279
components/uni-transition/uni-transition.vue

xqd
@@ -1,279 +0,0 @@
-<template>
-	<view v-if="isShow" ref="ani" class="uni-transition" :class="[ani.in]" :style="'transform:' +transform+';'+stylesObject"
-	 @click="change">
-		 <slot></slot>
-	</view>
-</template>
-
-<script>
-	// #ifdef APP-NVUE
-	const animation = uni.requireNativePlugin('animation');
-	// #endif
-	/**
-	 * Transition 过渡动画
-	 * @description 简单过渡动画组件
-	 * @tutorial https://ext.dcloud.net.cn/plugin?id=985
-	 * @property {Boolean} show = [false|true] 控制组件显示或隐藏
-     * @property {Array} modeClass = [fade|slide-top|slide-right|slide-bottom|slide-left|zoom-in|zoom-out] 过渡动画类型
-     *  @value fade 渐隐渐出过渡
-     *  @value slide-top 由上至下过渡
-     *  @value slide-right 由右至左过渡
-     *  @value slide-bottom 由下至上过渡
-     *  @value slide-left 由左至右过渡
-     *  @value zoom-in 由小到大过渡
-     *  @value zoom-out 由大到小过渡
-	 * @property {Number} duration 过渡动画持续时间
-	 * @property {Object} styles 组件样式,同 css 样式,注意带’-‘连接符的属性需要使用小驼峰写法如:`backgroundColor:red`
-	 */
-	export default {
-		name: 'uniTransition',
-		props: {
-			show: {
-				type: Boolean,
-				default: false
-			},
-			modeClass: {
-				type: Array,
-				default () {
-					return []
-				}
-			},
-			duration: {
-				type: Number,
-				default: 300
-			},
-			styles: {
-				type: Object,
-				default () {
-					return {}
-				}
-			}
-		},
-		data() {
-			return {
-				isShow: false,
-				transform: '',
-				ani: { in: '',
-					active: ''
-				}
-			};
-		},
-		watch: {
-			show: {
-				handler(newVal) {
-					if (newVal) {
-						this.open()
-					} else {
-						this.close()
-					}
-				},
-				immediate: true
-			}
-		},
-		computed: {
-			stylesObject() {
-				let styles = {
-					...this.styles,
-					'transition-duration': this.duration / 1000 + 's'
-				}
-				let transfrom = ''
-				for (let i in styles) {
-					let line = this.toLine(i)
-					transfrom += line + ':' + styles[i] + ';'
-				}
-				return transfrom
-			}
-		},
-		created() {
-			// this.timer = null
-			// this.nextTick = (time = 50) => new Promise(resolve => {
-			// 	clearTimeout(this.timer)
-			// 	this.timer = setTimeout(resolve, time)
-			// 	return this.timer
-			// });
-		},
-		methods: {
-			change() {
-				this.$emit('click', {
-					detail: this.isShow
-				})
-			},
-			open() {
-				clearTimeout(this.timer)
-				this.isShow = true
-				this.transform = ''
-				this.ani.in = ''
-				for (let i in this.getTranfrom(false)) {
-					if (i === 'opacity') {
-						this.ani.in = 'fade-in'
-					} else {
-						this.transform += `${this.getTranfrom(false)[i]} `
-					}
-				}
-				this.$nextTick(() => {
-					setTimeout(() => {
-						this._animation(true)
-					}, 50)
-				})
-
-			},
-			close(type) {
-				clearTimeout(this.timer)
-				this._animation(false)
-			},
-			_animation(type) {
-				let styles = this.getTranfrom(type)
-				// #ifdef APP-NVUE
-				if(!this.$refs['ani']) return
-				animation.transition(this.$refs['ani'].ref, {
-					styles,
-					duration: this.duration, //ms
-					timingFunction: 'ease',
-					needLayout: false,
-					delay: 0 //ms
-				}, () => {
-					if (!type) {
-						this.isShow = false
-					}
-					this.$emit('change', {
-						detail: this.isShow
-					})
-				})
-				// #endif
-				// #ifndef APP-NVUE
-				this.transform = ''
-				for (let i in styles) {
-					if (i === 'opacity') {
-						this.ani.in = `fade-${type?'out':'in'}`
-					} else {
-						this.transform += `${styles[i]} `
-					}
-				}
-				this.timer = setTimeout(() => {
-					if (!type) {
-						this.isShow = false
-					}
-					this.$emit('change', {
-						detail: this.isShow
-					})
-
-				}, this.duration)
-				// #endif
-
-			},
-			getTranfrom(type) {
-				let styles = {
-					transform: ''
-				}
-				this.modeClass.forEach((mode) => {
-					switch (mode) {
-						case 'fade':
-							styles.opacity = type ? 1 : 0
-							break;
-						case 'slide-top':
-							styles.transform += `translateY(${type?'0':'-100%'}) `
-							break;
-						case 'slide-right':
-							styles.transform += `translateX(${type?'0':'100%'}) `
-							break;
-						case 'slide-bottom':
-							styles.transform += `translateY(${type?'0':'100%'}) `
-							break;
-						case 'slide-left':
-							styles.transform += `translateX(${type?'0':'-100%'}) `
-							break;
-						case 'zoom-in':
-							styles.transform += `scale(${type?1:0.8}) `
-							break;
-						case 'zoom-out':
-							styles.transform += `scale(${type?1:1.2}) `
-							break;
-					}
-				})
-				return styles
-			},
-			_modeClassArr(type) {
-				let mode = this.modeClass
-				if (typeof(mode) !== "string") {
-					let modestr = ''
-					mode.forEach((item) => {
-						modestr += (item + '-' + type + ',')
-					})
-					return modestr.substr(0, modestr.length - 1)
-				} else {
-					return mode + '-' + type
-				}
-			},
-			// getEl(el) {
-			// 	console.log(el || el.ref || null);
-			// 	return el || el.ref || null
-			// },
-			toLine(name) {
-				return name.replace(/([A-Z])/g, "-$1").toLowerCase();
-			}
-		}
-	}
-</script>
-
-<style>
-	.uni-transition {
-		transition-timing-function: ease;
-		transition-duration: 0.3s;
-		transition-property: transform, opacity;
-	}
-
-	.fade-in {
-		opacity: 0;
-	}
-
-	.fade-active {
-		opacity: 1;
-	}
-
-	.slide-top-in {
-		/* transition-property: transform, opacity; */
-		transform: translateY(-100%);
-	}
-
-	.slide-top-active {
-		transform: translateY(0);
-		/* opacity: 1; */
-	}
-
-	.slide-right-in {
-		transform: translateX(100%);
-	}
-
-	.slide-right-active {
-		transform: translateX(0);
-	}
-
-	.slide-bottom-in {
-		transform: translateY(100%);
-	}
-
-	.slide-bottom-active {
-		transform: translateY(0);
-	}
-
-	.slide-left-in {
-		transform: translateX(-100%);
-	}
-
-	.slide-left-active {
-		transform: translateX(0);
-		opacity: 1;
-	}
-
-	.zoom-in-in {
-		transform: scale(0.8);
-	}
-
-	.zoom-out-active {
-		transform: scale(1);
-	}
-
-	.zoom-out-in {
-		transform: scale(1.2);
-	}
-</style>

+ 28 - 12
pages.json

xqd xqd
@@ -206,18 +206,18 @@
 		// 	}
 		// },
 		//服务包订单
-		{
-			"path": "pages/service_box/box_details",
-			"style": {
-				"navigationBarTitleText": "我的服务包"
-			}
-		},
-		{
-			"path": "pages/service_box/choiceBox",
-			"style": {
-				"navigationBarTitleText": "服务包详情"
-			}
-		},
+		// {
+		// 	"path": "pages/service_box/box_details",
+		// 	"style": {
+		// 		"navigationBarTitleText": "我的服务包"
+		// 	}
+		// },
+		// {
+		// 	"path": "pages/service_box/choiceBox",
+		// 	"style": {
+		// 		"navigationBarTitleText": "服务包详情"
+		// 	}
+		// },
 		// {
 		// 	"path": "pages/vaccines/vaccines_info",
 		// 	"style": {
@@ -574,6 +574,22 @@
 					}
 				}
 			]
+		},
+		{
+			"root": "pages/service_box",
+			"pages": [{
+					"path": "box_details",
+					"style": {
+						"navigationBarTitleText": "我的服务包"
+					}
+				},
+				{
+					"path": "choiceBox",
+					"style": {
+						"navigationBarTitleText": "服务包详情"
+					}
+				}
+			]
 		}
 	],
 	"tabBar": {

+ 58 - 13
pages/childcare/child_care.vue

xqd xqd xqd xqd xqd xqd
@@ -46,8 +46,7 @@
 				</view>
 			</view>
 		</view>
-		<u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" :default-selector='[0, 1]' 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> -->
 		<u-popup v-model="showpeople" mode="bottom" border-radius="14" length="50%">
 			<view class="popup_title">
 				<view class="popup_title_text">选择就诊人</view>
@@ -82,10 +81,14 @@
 				提交申请
 			</view>
 		</view>
+		<u-popup v-model="dateshow" mode="bottom" :safe-area-inset-bottom="true" border-radius="14" length="50%" height="700rpx">
+			<datepicker :date="multiSelector" @callbacktime="callbacktime" ref="date"></datepicker>
+		</u-popup>
 	</view>
 </template>
 
 <script>
+	import datepicker from '../../components/datepicker/datepicker'
 	import {
 		mapState,
 		mapMutations,
@@ -100,6 +103,9 @@
 				hasLogin: 'verifyJwt'
 			})
 		},
+		components:{
+			datepicker
+		},
 		onLoad() {
 
 		},
@@ -138,7 +144,8 @@
 				yimiao: "",
 				yimiaoInfo: "",
 				time: "",
-				childcare: []
+				childcare: [],
+				dateshow:false
 			}
 		},
 		methods: {
@@ -162,21 +169,59 @@
 					return false
 				}
 				let res = await this.$request.post("/api/v1/docter/timePeriodList", {
-					organization_id: this.doctor.id
+					organization_id: this.doctor.id,
+					schedule_type: 3
 				})
 				console.log(res)
 				if (res.status == 0) {
-					res.data.list.forEach(item => {
-						item.start_time_period = item.start_time_period + '-' + item.end_time_period
+					let times = []
+					// res.data.list.forEach(item => {
+					// 	item.start_time_period = item.start_time_period + '-' + item.end_time_period
+					// })
+					// this.multiSelector.push(res.data.dates)
+					// this.multiSelector.push(res.data.list)
+					let nian = res.data.data.map(item => {
+						return {
+							date:item.schedule_date,
+							id:item.id
+						}
+					})
+					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
+								}
+							}
+						})
+						times.push(time)
+					})
+					// 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(times)
+					let arr = this.multiSelector[1][0]
+					arr.forEach(item=>{
+						item.year = nian[0].date
 					})
-					this.multiSelector.push(res.data.dates)
-					this.multiSelector.push(res.data.list)
+					this.$refs.date.rightday = arr
+					console.log(this.multiSelector)
 				}
 			},
-			callbacktime(arr) {
-				this.timehour = this.multiSelector[1][arr[1]].id
-				this.yuyuevalue = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
-				this.time = this.multiSelector[0][arr[0]]
+			callbacktime(item) {
+				// this.timehour = this.multiSelector[1][arr[1]].id
+				// this.yuyuevalue = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
+				// this.time = this.multiSelector[0][arr[0]]
+				this.timehour = item.id
+				this.yuyuevalue = item.year + " " + item.start_time_period + "-" + item.end_time_period
+				this.time = item.year
+				this.dateshow = false
 			},
 			//添加就诊人
 			addPeople(e) {
@@ -209,7 +254,7 @@
 					})
 					return false
 				}
-				this.show = true
+				this.dateshow = true
 			},
 			gotopay: async function() {
 				if (this.huanzheID == "") {

+ 104 - 39
pages/doctor_related/doctor_info.vue

xqd xqd xqd xqd xqd xqd
@@ -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;"
 				 @click="xuantime">
 					已选时间:{{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 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 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 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>
 		<u-no-network></u-no-network>
 		<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>
 </template>
 
 <script>
+	import datepicker from '../../components/datepicker/datepicker'
 	var user = require('../../common/user.js');
 	export default {
+		components: {
+			datepicker
+		},
 		onLoad(options) {
 			this.doctorid = options.id
 			if (options.time != undefined) {
@@ -180,7 +188,8 @@
 				istuwen: false,
 				ismenzhen: false,
 				loading: true,
-				is_can_appoint: ""
+				is_can_appoint: "",
+				dateshow: false
 
 			}
 		},
@@ -230,37 +239,82 @@
 					docter_id: this.doctorid
 				})
 				if (res.status == 0) {
-					console.log(res)
+					console.log(res, "sssss")
 					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 => {
-							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(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)
-						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() {
 				if (this.multiSelector.length != 0) {
-					this.show = !this.show
+					this.dateshow = !this.dateshow
 				} else {
 					uni.showToast({
 						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
 			}
 		}
 	};

+ 9 - 1
pages/index/message.vue

xqd xqd xqd xqd
@@ -1,5 +1,6 @@
 <template>
 	<view class="main">
+		<!-- <loading :show="isshow"></loading> -->
 		<view class="padding-lr">
 			<view v-for="(item,index) in messageList" @click="gotoliaotian(item)" :key="index" class="padding-lr-sm padding-tb-sm bg-white margin-top-sm fade-in"
 			 :style="'border-radius: 16rpx;box-shadow: 0 0 50rpx 0 rgba(0, 0, 0, 0.1);'+'opacity:'+opacity+';'+'transform: scale('+scale+');'">
@@ -28,7 +29,11 @@
 </template>
 
 <script>
+	import loading from '../../components/loading/loading'
 	export default {
+		components: {
+			loading
+		},
 		onLoad(options) {
 
 		},
@@ -66,8 +71,10 @@
 			});
 		},
 		mounted() {
+			// this.isshow = true
 			setTimeout(() => {
 				this.handleScroll()
+				// this.isshow = false
 			}, 800)
 		},
 		data() {
@@ -81,7 +88,8 @@
 				},
 				imService: null,
 				opacity: 0,
-				scale: 0.8
+				scale: 0.8,
+				isshow: false
 			}
 		},
 		onReachBottom() {

+ 88 - 15
pages/vaccines/vaccines_info.vue

xqd xqd xqd xqd xqd xqd
@@ -19,8 +19,8 @@
 			</view>
 			<view class="padding-sm bg-white" v-if="doctor!=''">
 				<scroll-view scroll-x="true" enable-flex="true" style="display: flex;height: 145rpx;">
-					<view class="flex flex-direction align-center justify-center margin-right-xs" @click="gotodoctorinfo(item.id)" style="width: 120rpx;height: 130rpx;"
-					 v-for="(item,index) in doctor.docter" :key="index">
+					<view class="flex flex-direction align-center justify-center margin-right-xs" @click="gotodoctorinfo(item.id)"
+					 style="width: 120rpx;height: 130rpx;" v-for="(item,index) in doctor.docter" :key="index">
 						<u-avatar :src="item.avatar" mode="circle"></u-avatar>
 						<view class="">
 							{{item.name}}
@@ -45,8 +45,8 @@
 				</view>
 			</view>
 		</view>
-		<u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" :default-selector='[0, 1]' range-key="start_time_period"
-		 :range="multiSelector"></u-picker>
+		<!-- <u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" :default-selector='[0, 1]' range-key="start_time_period"
+		 :range="multiSelector"></u-picker> -->
 		<u-popup v-model="showpeople" mode="bottom" border-radius="14" length="50%">
 			<view class="popup_title">
 				<view class="popup_title_text">选择就诊人</view>
@@ -81,14 +81,21 @@
 				提交申请
 			</view>
 		</view>
+		<u-popup v-model="dateshow" mode="bottom" :safe-area-inset-bottom="true" border-radius="14" length="50%" height="700rpx">
+			<datepicker :date="multiSelector" @callbacktime="callbacktime" ref="date"></datepicker>
+		</u-popup>
 	</view>
 </template>
 
 <script>
+	import datepicker from '../../components/datepicker/datepicker'
 	var user = require('../../common/user.js');
 	export default {
 		onLoad() {
 
+		},
+		components:{
+			datepicker
 		},
 		onShow() {
 			if (this.doctor != null) {
@@ -117,7 +124,8 @@
 				jigouID: "",
 				yimiao: "请选择接种疫苗",
 				yimiaoInfo: "",
-				time: ""
+				time: "",
+				dateshow:false
 			}
 		},
 		methods: {
@@ -141,21 +149,86 @@
 					return false
 				}
 				let res = await this.$request.post("/api/v1/docter/timePeriodList", {
-					organization_id: this.doctor.id
+					organization_id: this.doctor.id,
+					schedule_type: 2
 				})
 				console.log(res)
 				if (res.status == 0) {
-					res.data.list.forEach(item => {
-						item.start_time_period = item.start_time_period + '-' + item.end_time_period
+					let times = []
+					// res.data.list.forEach(item => {
+					// 	item.start_time_period = item.start_time_period + '-' + item.end_time_period
+					// })
+					// this.multiSelector.push(res.data.dates)
+					// this.multiSelector.push(res.data.list)
+					if (res.data.data.length == 0) {
+						uni.showToast({
+							title: "尚未排班",
+							icon: "none"
+						})
+						return false
+					}
+					// 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)
+					let nian = res.data.data.map(item => {
+						return {
+							date:item.schedule_date,
+							id:item.id
+						}
+					})
+					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
+								}
+							}
+						})
+						times.push(time)
+					})
+					// 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(times)
+					let arr = this.multiSelector[1][0]
+					arr.forEach(item=>{
+						item.year = nian[0].date
 					})
-					this.multiSelector.push(res.data.dates)
-					this.multiSelector.push(res.data.list)
+					this.$refs.date.rightday = arr
+					console.log(this.multiSelector)
 				}
 			},
-			callbacktime(arr) {
-				this.timehour = this.multiSelector[1][arr[1]].id
-				this.yuyuevalue = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
-				this.time = this.multiSelector[0][arr[0]]
+			callbacktime(item) {
+				// this.timehour = this.multiSelector[1][arr[1]].id
+				// this.yuyuevalue = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
+				// this.time = this.multiSelector[0][arr[0]]
+				this.timehour = item.id
+				this.yuyuevalue = item.year + " " + item.start_time_period + "-" + item.end_time_period
+				this.time = item.year
+				this.dateshow = false
 			},
 			//添加就诊人
 			addPeople(e) {
@@ -188,7 +261,7 @@
 					})
 					return false
 				}
-				this.show = true
+				this.dateshow = true
 			},
 			gotopay: async function() {
 				if (this.huanzheID == "") {