liuyuanhang преди 4 години
родител
ревизия
9d8b9f0a0a
променени са 5 файла, в които са добавени 2504 реда и са изтрити 2243 реда
  1. BIN
      pages/.DS_Store
  2. 505 368
      pages/scheduling/month_Scheduling.vue
  3. 108 22
      pages/scheduling/week_Scheduling.vue
  4. 224 227
      pages/scheduling/year_Scheduling.vue
  5. 1667 1626
      pages/service/more.vue

BIN
pages/.DS_Store


+ 505 - 368
pages/scheduling/month_Scheduling.vue

xqd
@@ -1,391 +1,528 @@
-<template>
-	<view style="width: 100%;height: 100%;">
-		<!--医院列表 -->
-		<u-select v-model="hospitalListShow" :list="hospitalList" @confirm="setSelectHospital"></u-select>
-		<!--日视图弹出层-->
-		<u-popup v-model="popupShow" mode="bottom" border-radius="50" @close="allow=false">
-			<!-- 标题按钮 -->
-			<view class="flex justify-center align-center" style="padding: 30rpx 0;font-size: 38rpx;font-weight: bold;background-color: #D2F1F0;">
-				<text style="flex-grow: 1;text-align: center;">{{day}}日排班详情</text>
-				<u-icon v-if="!allow" name="setting-fill" style="margin-right: 50rpx;" @click="allow = true"></u-icon>
-				<u-icon v-else name="close" style="margin-right: 50rpx;" @click="allow = false"></u-icon>
-			</view>
-			<view v-if="monthList[day+empty-1].mon==0&&monthList[day+empty-1].aft==0&&monthList[day+empty-1].nig==0" style="height: 500rpx;" class="flex justify-center align-center">
-				<view style="width: 80%;">
-					<u-button shape="circle" :custom-style="otherStyle" @click="modify(0)">暂无排班  点击新增</u-button>
-				</view>
-			</view>
-			<!-- 上下晚显示 -->
-			<view class="flex justify-center" style="" v-else>
-				<view style="width: 80%;margin: 20rpx 0;text-align: center;font-size: 38rpx;">
-					<u-button shape="circle" :custom-style="monthList[day+empty-1].mon==0 ? nullStyle : monthList[day+empty-1].mon==1 ? monStyle :otherStyle " throttleTime="1000" @click="modify(1)">上午</u-button>
-					<text>08:30 至 11.30</text>
-					<u-button shape="circle" :custom-style="monthList[day+empty-1].aft==0 ? nullStyle : monthList[day+empty-1].aft==1 ? aftStyle :otherStyle " throttleTime="1000" @click="modify(2)">下午</u-button>
-					<text>13:30 至 15.30</text>
-					<u-button shape="circle" :custom-style="monthList[day+empty-1].nig==0 ? nullStyle : monthList[day+empty-1].nig==1 ? nigStyle :otherStyle " throttleTime="1000" @click="modify(3)">晚上</u-button>
-					<text>20:00 至 23.30</text>
-				</view>
-			</view>
-		</u-popup>
+<template>
+	<view style="width: 100%;height: 100%;">
+		<!--医院列表 -->
+		<u-select v-model="hospitalListShow" :list="hospitalList" @confirm="setSelectHospital"></u-select>
+		<!--日视图弹出层-->
+		<u-popup v-model="popupShow" mode="bottom" border-radius="50" @close="allow=false" :mask-close-able="false">
+		  <view style="margin: 20rpx 0;" class="flex justify-center align-center">
+		    <u-icon name="arrow-down"@click="close()"></u-icon>
+		  </view>
 		
-		<!-- 顶部标题和按钮 -->
-		<view class="flex justify-between align-center" style="margin: 40rpx 28rpx;">
-			<view style="font-size: 50rpx;flex-grow: 2;" @click="jumpYear">{{year}}年{{month}}月</view>
-			<view class="flex justify-around align-center" style="flex-grow: 3;">
-				<view class="drop-down" @click="hospitalListShow=!hospitalListShow">
-					<text>{{hospital}}</text>
-					<u-icon name="arrow-down-fill" size="32" color="#848484" v-show="!hospitalListShow"></u-icon>
-					<u-icon name="arrow-up-fill" size="32" color="#848484" v-show="hospitalListShow"></u-icon>
-				</view>
-				<view style="background-color: #5555ff; padding: 8rpx;border-radius: 5rpx;">
-					<u-icon name="list-dot" size="38" color="#fff" @click="jumpWeek"></u-icon>
-				</view>
-			</view>
-		</view>
-		<view>
-			<!-- 一排星期 -->
-			<view class="flex justify-around align-center" style="height: 80rpx;background-color: #CCE6FF;">
-				<text v-for="item,index in weekList" :key="index" style="font-size: 28rpx;">{{item.text}}</text>
-			</view>
-			<view class="flex flex-wrap " >
-				<view class="" style="width: 14%;padding: 0 0 20rpx 0;font-size: 32rpx;font-weight: 590;height: auto;font-weight: bold;"
-				 v-for="item,index in monthList" :key="index" @click="setDay(index,item.text)">
-					<view class="flex justify-center align-center" :style="!item.select?
-							'height: 100rpx;width: 100rpx;border-radius:50%;font-weight: bold;'
-							:'height: 100rpx;width: 100rpx;border-radius:50%;background:#00aaff;color:#fff;font-weight: bold;'">{{item.text}}</view>
-					<!-- 排班情况 -->
-					<view style="color: #FFF;text-align: center;font-size: 28rpx;" >
-						<view :style="item.mon==1?
-							'margin: 5rpx 10rpx;background:#00aaff;border-radius: 50rpx;font-size: 20rpx;padding:6rpx 0;'
-							:'margin: 5rpx 10rpx;background:#cccccc;border-radius: 50rpx;font-size: 20rpx;padding:6rpx 0'
-						" v-if="item.mon > 0">上午</view>
-						
-						<view  :style="item.aft==1?
-							'margin: 5rpx 10rpx;background:#ffaa00;border-radius: 50rpx;font-size: 20rpx;padding:6rpx 0;'
-							:'margin: 5rpx 10rpx;background:#cccccc;border-radius: 50rpx;font-size: 20rpx;padding:6rpx 0'
-						" v-if="item.aft > 0">下午</view>
-						
-						<view  :style="item.nig==1?
-							'margin: 5rpx 10rpx;background:#55aa00;border-radius: 50rpx;font-size: 20rpx;padding:6rpx 0;'
-							:'margin: 5rpx 10rpx;background:#cccccc;border-radius: 50rpx;font-size: 20rpx;padding:6rpx 0'
-						" v-if="item.nig > 0">晚上</view>
-					</view>
-				</view>
-			</view>
+		
+			<!-- 标题按钮 -->
+			<view class="flex justify-center align-center" style="padding: 30rpx 0;font-size: 38rpx;font-weight: bold;background-color: #D2F1F0;">
+				<text style="flex-grow: 1;text-align: center;padding-left: 90rpx;">{{day}}日排班详情</text>
+				<u-icon v-if="!allow" name="setting-fill" style="margin-right: 50rpx;" @click="allow = true"></u-icon>
+				<u-icon v-else name="close" style="margin-right: 50rpx;" @click="allow = false"></u-icon>
+			</view>
+			<view v-if="monthList[day+empty-1].mon==0&&monthList[day+empty-1].aft==0&&monthList[day+empty-1].nig==0" style="height: 500rpx;" class="flex justify-center align-center">
+				<view style="width: 80%;">
+					<u-button shape="circle" :custom-style="otherStyle" @click="modify(0)">暂无排班  点击新增</u-button>
+				</view>
+			</view>
+			<!-- 上下晚显示 -->
+			<view class="flex justify-center" style="" v-else>
+				<view style="width: 80%;margin: 20rpx 0;text-align: center;font-size: 38rpx;">
+					<u-button shape="circle" :custom-style="monthList[day+empty-1].mon==0 ? nullStyle : monthList[day+empty-1].mon==1 ? monStyle :otherStyle " throttleTime="1000" @click="modify(1)">上午</u-button>
+					<text>{{hospitalTimes.zao.amStartTime}} 至 {{hospitalTimes.zao.amEndTime}}</text>
+					<u-button shape="circle" :custom-style="monthList[day+empty-1].aft==0 ? nullStyle : monthList[day+empty-1].aft==1 ? aftStyle :otherStyle " throttleTime="1000" @click="modify(2)">下午</u-button>
+					<text>{{hospitalTimes.zhong.pmStartTime}} 至 {{hospitalTimes.zhong.pmEndTime}}</text>
+					<u-button shape="circle" :custom-style="monthList[day+empty-1].nig==0 ? nullStyle : monthList[day+empty-1].nig==1 ? nigStyle :otherStyle " throttleTime="1000" @click="modify(3)">晚上</u-button>
+					<text>{{hospitalTimes.wan.nightStartTime}} 至 {{hospitalTimes.wan.nightEndTime}}</text>
+				</view>
+			</view>
+		</u-popup>
+		
+		<!-- 顶部标题和按钮 -->
+		<view class="flex justify-between align-center" style="margin: 40rpx 28rpx;">
+			<view style="font-size: 50rpx;flex-grow: 2;" @click="jumpYear">{{year}}年{{month+1}}月</view>
+			<view class="flex justify-around align-center" style="flex-grow: 3;">
+				<view class="drop-down" @click="hospitalListShow=!hospitalListShow">
+					<text>{{hospital}}</text>
+					<u-icon name="arrow-down-fill" size="32" color="#848484" v-show="!hospitalListShow"></u-icon>
+					<u-icon name="arrow-up-fill" size="32" color="#848484" v-show="hospitalListShow"></u-icon>
+				</view>
+				<view style="background-color: #5555ff; padding: 8rpx;border-radius: 5rpx;">
+					<u-icon name="list-dot" size="38" color="#fff" @click="jumpWeek"></u-icon>
+				</view>
+			</view>
+		</view>
+		<view>
+			<!-- 一排星期 -->
+			<view class="flex justify-around align-center" style="height: 80rpx;background-color: #CCE6FF;">
+				<text v-for="item,index in weekList" :key="index" style="font-size: 28rpx;">{{item.text}}</text>
+			</view>
+			<view class="flex flex-wrap " >
+				<view class="" style="width: 14%;padding: 0 0 20rpx 0;font-size: 32rpx;font-weight: 590;height: auto;font-weight: bold;"
+				 v-for="item,index in monthList" :key="index" @click="setDay(index,item.text)">
+					<view class="flex justify-center align-center" :style="!item.select?
+							'height: 100rpx;width: 100rpx;border-radius:50%;font-weight: bold;'
+							:'height: 100rpx;width: 100rpx;border-radius:50%;background:#00aaff;color:#fff;font-weight: bold;'">{{item.text}}</view>
+					<!-- 排班情况 -->
+					<view style="color: #FFF;text-align: center;font-size: 28rpx;" >
+						<view :style="item.mon==1?
+							'margin: 5rpx 10rpx;background:#00aaff;border-radius: 50rpx;font-size: 20rpx;padding:6rpx 0;'
+							:'margin: 5rpx 10rpx;background:#cccccc;border-radius: 50rpx;font-size: 20rpx;padding:6rpx 0'
+						" v-if="item.mon > 0">上午</view>
+						
+						<view  :style="item.aft==1?
+							'margin: 5rpx 10rpx;background:#ffaa00;border-radius: 50rpx;font-size: 20rpx;padding:6rpx 0;'
+							:'margin: 5rpx 10rpx;background:#cccccc;border-radius: 50rpx;font-size: 20rpx;padding:6rpx 0'
+						" v-if="item.aft > 0">下午</view>
+						
+						<view  :style="item.nig==1?
+							'margin: 5rpx 10rpx;background:#55aa00;border-radius: 50rpx;font-size: 20rpx;padding:6rpx 0;'
+							:'margin: 5rpx 10rpx;background:#cccccc;border-radius: 50rpx;font-size: 20rpx;padding:6rpx 0'
+						" v-if="item.nig > 0">晚上</view>
+					</view>
+				</view>
+			</view>
 		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		onLoad() {
+		
+	<!-- 	  <view class="bottomButton" @click="paiban">
+		   保存
+		  </view> -->
+	</view>
+</template>
+
+<script>
+	export default {
+		onLoad() {
 			this.$nextTick(function() {
-				this.getNowTime()
-				this.getNowmonth()
+				// this.getListTime()
+				this.getHostail()
+				this.getNowTime()
+				this.getMonth();
+				// this.getNowmonth()
+				
 			})
-			this.hospital = this.hospitalList[0].label
-			this.hospitalID = this.hospitalList[0].value+""
-		},
-		onShow() {
-			if (this.load) {
-				this.monthList = []
-				this.getNowmonth()
+		
+		},
+		onShow() {
+			if (this.load) {
+				this.monthList = []
+				this.schedulingList = []
+				this.getMonth();
+				// this.getNowmonth()
 				this.day = 0
-			}
-
-		},
-		data() {
-			return {
-				year: 0, //年
-				month: 0, //月
-				day: 0, //日
-				empty: 0, // 一号前面有几个空
-				load: false, //控制加载,从年视图返回执行onshow
-				popupShow: false, //控制弹窗弹出层
-				weekList: [{
-					text: "日"
-				}, {
-					text: "一"
-				}, {
-					text: "二"
-				}, {
-					text: "三"
-				}, {
-					text: "四"
-				}, {
-					text: "五"
-				}, {
-					text: "六"
-				}],
-				monthList: [],//这个月的数据,不要动
-
-				hospital: "",//现在选中的医院
-				hospitalID:"1",//选中的医院ID
-				hospitalListShow: false,//控制医院选择器
-				// 医院列表
-				hospitalList: [{
-						value: 1,
-						label: "测试医院1"
-					},
-					{
-						value: 2,
-						label: "测试医院2"
-					},
-					{
-						value: 3,
-						label: "测试医院3"
-					},
-					{
-						value: 4,
-						label: "测试医院4"
-					}
-				],
-				// 一个月的排班数据 从一号开始
-				//下标0为一号,值为医院ID
-				// 没有排班记录为0
-				schedulingList: [
-					{mon: "1",aft:"1",nig:"1"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "0",aft:"0",nig:"0"},
-					{mon: "0",aft:"1",nig:"0"},
-					{mon: "0",aft:"2",nig:"0"},
-					{mon: "1",aft:"0",nig:"0"},
-					{mon: "2",aft:"0",nig:"0"},
-					{mon: "1",aft:"1",nig:"0"},
-					{mon: "2",aft:"2",nig:"0"},
-					{mon: "1",aft:"1",nig:"1"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "1",aft:"1",nig:"2"},
-					{mon: "0",aft:"0",nig:"2"},
-					{mon: "0",aft:"2",nig:"0"},
-					{mon: "0",aft:"1",nig:"2"},
-					{mon: "2",aft:"0",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"0",nig:"0"},
-					{mon: "2",aft:"1",nig:"2"},
-					{mon: "2",aft:"0",nig:"2"},
-					{mon: "2",aft:"2",nig:"0"},
-					{mon: "2",aft:"0",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"0",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"0",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"0",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-					{mon: "2",aft:"2",nig:"2"},
-				],
 				
-				// 弹出层数据
-				allow:false ,//允许设置
-				//空按钮样式
-				nullStyle:{
-					backgroundColor: '#FFF',
-					color:'#000',
-					fontWeight: "bold",
-					margin:'20rpx 0 10rpx 0'
-				},
-				//上午按钮样式
-				monStyle:{
-					backgroundColor: '#5667c8',
-					color:'#fff',
-					fontWeight: "bold",
-					margin:'20rpx 0 10rpx 0'
-				},
-				//下午按钮样式
-				aftStyle:{
-					backgroundColor: '#ec9d75',
-					color:'#fff',
-					fontWeight: "bold",
-					margin:'20rpx 0 10rpx 0'
-				},
-				//晚上按钮样式
-				nigStyle:{
-					backgroundColor: '#55aa7f',
-					color:'#fff',
-					fontWeight: "bold",
-					margin:'20rpx 0 10rpx 0'
+			}
+		},
+		data() {
+			return {
+				year: 0, //年
+				month: 0, //月
+				day: 0, //日
+				empty: 0, // 一号前面有几个空
+				load: false, //控制加载,从年视图返回执行onshow
+				popupShow: false, //控制弹窗弹出层
+				weekList: [{
+						text: "日"
+					}, {
+						text: "一"
+					}, {
+						text: "二"
+					}, {
+						text: "三"
+					}, {
+						text: "四"
+					}, {
+						text: "五"
+					}, {
+					text: "六"
+										}],
+				monthList: [],//这个月的数据,不要动
+
+				hospital: "",//现在选中的医院
+				hospitalID:"1",//选中的医院ID
+				hospitalListShow: false,//控制医院选择器
+				hospitalTimes:0,
+				// 医院列表
+				hospitalList: [
+				],
+				// 一个月的排班数据 从一号开始
+				//下标0为一号,值为医院ID
+				// 没有排班记录为0
+				schedulingList: [],
+				
+				mothonStart:'',
+				mothonEnd:'',
+				// 弹出层数据
+				allow:false ,//允许设置
+				//空按钮样式
+				nullStyle:{
+					backgroundColor: '#FFF',
+					color:'#000',
+					fontWeight: "bold",
+					margin:'20rpx 0 10rpx 0'
 				},
-				//其他医院按钮样式
-				otherStyle:{
-					backgroundColor: '#989898',
-					color:'#fff',
-					fontWeight: "bold",
-					margin:'20rpx 0 10rpx 0'
-				} 
-			}
-		},
+				saveDay:0,
+				//上午按钮样式
+				monStyle:{
+					backgroundColor: '#5667c8',
+					color:'#fff',
+					fontWeight: "bold",
+					margin:'20rpx 0 10rpx 0'
+				},
+				//下午按钮样式
+				aftStyle:{
+					backgroundColor: '#ec9d75',
+					color:'#fff',
+					fontWeight: "bold",
+					margin:'20rpx 0 10rpx 0'
+				},
+				//晚上按钮样式
+				nigStyle:{
+					backgroundColor: '#55aa7f',
+					color:'#fff',
+					fontWeight: "bold",
+					margin:'20rpx 0 10rpx 0'
+				},
+				//其他医院按钮样式
+				otherStyle:{
+					backgroundColor: '#989898',
+					color:'#fff',
+					fontWeight: "bold",
+					margin:'20rpx 0 10rpx 0'
+				} 
+			}
+		},
 		methods: {
-			/**
-			 * 获取现在的日期
-			 * */
-			getNowTime() {
-				var d = new Date();
-				this.year = d.getFullYear()
-				this.month = d.getMonth() + 1
-				this.day = d.getDate()
-
+			close:async function(){
+			 this.popupShow=false;
+			 let SaveLists=[];
+			 let SaveDate = this.saveDay;
+			 if(this.saveDay!=0){
+				 if(this.hospitalID!=0){
+					 if(SaveDate.mon==this.hospitalID){
+						 SaveLists.push(1)
+					 }
+					 if(SaveDate.aft==this.hospitalID){
+						SaveLists.push(2)
+					 }
+					 if(SaveDate.nig==this.hospitalID){
+						SaveLists.push(3)
+					 }
+					 if(SaveLists.length!=0){
+						 let s = SaveLists.join(",");
+						 let tj={
+							 'schedule_date':SaveDate.date,
+							 'week':SaveDate.week,
+							 'type':s,
+							 'organization_id':this.hospitalID,
+						 }
+						 console.log(tj);
+						 // if(typeof tj=='object'){
+							//  tj = JSON.stringify(tj);
+						 // }
+						 let res = await this.$request.post("doctor/saveDay",tj);
+						 if(res.status==0){
+							 uni.showToast({
+								title:"修改成功!",
+							 })
+							 SaveLists=[];
+							 this.saveDay = 0;
+							 
+						 }
+						
+					 }
+					 
+				 }else{
+					 uni.showModal({
+						title:'请选择医院'
+					 })
+				 }
+			 }
+		    },
+			getHostail:async function(){
+				let res=await this.$request.post("doctor/organizationList");
+				if(res.status==0){
+					let data=res.data;
+					let newList=[];
+					if(data.length==0){
+						uni.showModal({
+							title:'请先认证医院'
+						})
+					}else{
+						for(let i=0;i<data.length;i++){
+							newList.push({
+								value:data[i].value,
+								label:data[i].label,
+							})
+						}
+					}
+					console.log('机构获取,',res);
+					this.hospitalList = newList;
+					this.getListTime(this.hospitalList[0].value)
+					this.hospital = this.hospitalList[0].label
+					this.hospitalID = this.hospitalList[0].value+""
+					
+				}
 			},
-			/**
-			 * 拿到一个月的数据
-			 * */
-			getNowmonth() {
-				let oneDayTime = 24 * 60 * 60 * 1000; //固定数据 一天的时长
-				var date = new Date()
-				this.day = date.getDate()
-				date.setFullYear(this.year, this.month - 1, 1); //这个月的一号
-				for (let b = 0; b < date.getDay(); b++) {
-					this.monthList.push({
-						text: "",
-						select: false
+			
+			getMonth:async function(){
+				console.log("请求数据",this.mothonStart,this.mothonEnd)
+				let res = await this.$request.post("doctor/monthDetail",{'start_day':this.mothonStart,'end_day':this.mothonEnd});
+				if(res.status==0){
+					let data = res.data;
+					let newList=[];
+					for(let i=0;i<data.length;i++){
+						this.schedulingList.push({
+								mon:data[i].ident.zao,
+								aft:data[i].ident.xia,
+								nig:data[i].ident.wan
+						})
+					}
+					console.log('原数组:',this.schedulingList);
+					this.getNowmonth()
+				}else{
+					uni.showModal({
+						title:'请求错误'
 					})
 				}
-				this.empty = date.getDay()
-				console.log(date.getDay())
-				date.setFullYear(this.year, this.month - 1, 0); //查看这个月有几天
+			},
+			/**
+			 * 获取现在的日期
+			 * */
+			getNowTime() {
+				var d = new Date();
+				this.year = d.getFullYear()
+				this.month = d.getMonth()
+				this.day = d.getDate()
+				this.mothonStart=this.year+'-'+(this.month+1)+'-'+'01'
+				d.setFullYear(this.year, this.month+1, 0);
+				this.mothonEnd=this.year+'-'+(this.month+1)+'-'+d.getDate()
+			},
+			/**
+			 * 拿到一个月的数据
+			 * */
+			getNowmonth() {
+				let oneDayTime = 24 * 60 * 60 * 1000; //固定数据 一天的时长
+				var date = new Date()
+				this.day = date.getDate()
+				date.setFullYear(this.year, this.month, 1); //这个月的一号
+				for (let b = 0; b < date.getDay(); b++) {
+					this.monthList.push({
+						text: "",
+						select: false
+					})
+				}
+				this.empty = date.getDay()
+
+				date.setFullYear(this.year, this.month+1, 0); //查看这个月有几天
+				console.log('查看这个月有几天:',date.setFullYear(this.year, this.month+1, 0));
+				console.log(this.year, this.month)
+				console.log("本月最后一号",date.getDate());
+				
+				this.mothonStart=this.year+'-'+(this.month+1)+'-'+'01'
+				
+				this.mothonEnd=this.year+'-'+(this.month+1)+'-'+date.getDate()
+				// this.getMonth();
+				
 				
-				for (let c = 0; c < date.getDate(); c++) {
+				
+				
+				for (let c = 0; c < date.getDate(); c++) {
 					console.log(this.schedulingList[c].mon==""?0:this.schedulingList[c].mon==this.hospitalID?1:2 )
-					this.monthList.push({
+					let months = (this.month+1);
+					if(months<10){
+						months = "0"+months;
+					}
+					let days = (c + 1);
+					if(days<10){
+						days = "0"+days;
+					}
+					this.monthList.push({
 						text: c + 1,
-						select: false,
-						//判断方法,通过判断是不是选中的医院ID
-						//0没有排班,1有排班,2有排班,但不是这个医院
-						mon:this.schedulingList[c].mon=="0"?0:this.schedulingList[c].mon==this.hospitalID?1:2 ,
-						aft:this.schedulingList[c].aft=="0"?0:this.schedulingList[c].aft==this.hospitalID?1:2 ,
-						nig:this.schedulingList[c].nig=="0"?0:this.schedulingList[c].nig==this.hospitalID?1:2 
-					})
-				}
-				console.log(this.monthList)
+						date: this.year+'-'+months+'-'+ days,
+						week: this.getWeekList(this.year+'-'+months+'-'+ days),
+						select: false,
+						//判断方法,通过判断是不是选中的医院ID
+						//0没有排班,1有排班,2有排班,但不是这个医院
+						mon:this.schedulingList[c].mon=="0"?0:this.schedulingList[c].mon==this.hospitalID?1:2 ,
+						aft:this.schedulingList[c].aft=="0"?0:this.schedulingList[c].aft==this.hospitalID?1:2 ,
+						nig:this.schedulingList[c].nig=="0"?0:this.schedulingList[c].nig==this.hospitalID?1:2 
+					})
+				}
+				console.log(this.monthList)
 			},
-			/**
-			 * 切换医院
-			 * */
-			setSelectHospital (e) {
-				console.log(e)
-				this.hospital = e[0].label
-				this.hospitalID = e[0].value+""
-				for(let x = 0; x < this.monthList.length-this.empty; x++){
-					this.monthList[x+this.empty].mon = this.schedulingList[x].mon=="0"?0:this.schedulingList[x].mon==this.hospitalID?1:2 
-					this.monthList[x+this.empty].aft = this.schedulingList[x].aft=="0"?0:this.schedulingList[x].aft==this.hospitalID?1:2 
-					this.monthList[x+this.empty].nig = this.schedulingList[x].nig=="0"?0:this.schedulingList[x].nig==this.hospitalID?1:2 
-				}
+			
+			getWeekList(strs){;
+				var weekDay = [7, 1,2, 3,4, 5, 6];  
+				let times = strs.replace(/-/g,'/');
+				var myDate = new Date(Date.parse(times));  
+				return weekDay[myDate.getDay()];
 			},
-			/**
-			 * 点击对应日期
-			 * */
-			setDay(index,text) {
-				if (index >= this.empty) {
-					this.monthList.map(val => {
-						val.select = false
-					})
-					this.monthList[index].select = true
-					this.day = text
-					this.popupShow = true
-				}
+			
+			getimePate(str){
+				console.log(str);
+				var date = new Date(str.replace(/-/g,'/'));
+				console.log(date)
+				return Date.parse(date);
 				
 			},
-			/**
-			 * 跳转到年视图
-			 * */
-			jumpYear() {
-				setTimeout(function() {
-					uni.navigateTo({
-						url: "year_Scheduling"
-					})
-				}, 300)
-			},
-			/**
-			 * 日视图按钮点击
-			 * id 1早上 2下午 3晚上
-			 * */
-			modify(id){
-				if(id==0){
-					this.monthList[this.day+this.empty-1].mon=1//
-					this.schedulingList[this.day-1].mon = this.hospitalID
-					
-					this.monthList[this.day+this.empty-1].aft=1//
-					this.schedulingList[this.day-1].aft = this.hospitalID
-					
-					this.monthList[this.day+this.empty-1].nig=1//
-					this.schedulingList[this.day-1].nig = this.hospitalID
-				}
-				if(this.allow){
-					switch(id){
-						case 1 :
-							if(this.monthList[this.day+this.empty-1].mon==1){//当这个按钮状态为1 选择了医院且是当前医院
-								this.monthList[this.day+this.empty-1].mon=0//就取消选择
-								this.schedulingList[this.day-1].mon = 0
-							}else if(this.monthList[this.day+this.empty-1].mon==0){
-								this.monthList[this.day+this.empty-1].mon=1//
-								this.schedulingList[this.day-1].mon = this.hospitalID
-							}
-							break;
-						case 2 :
-							if(this.monthList[this.day+this.empty-1].aft==1){//当这个按钮状态为1 选择了医院且是当前医院
-								this.monthList[this.day+this.empty-1].aft=0//就取消选择
-								this.schedulingList[this.day-1].aft = 0
-							}else if(this.monthList[this.day+this.empty-1].aft==0){
-								this.monthList[this.day+this.empty-1].aft=1//
-								this.schedulingList[this.day-1].aft = this.hospitalID
-							}
-							break;
-						case 3 :
-							if(this.monthList[this.day+this.empty-1].nig==1){//当这个按钮状态为1 选择了医院且是当前医院
-								this.monthList[this.day+this.empty-1].nig=0//就取消选择
-								this.schedulingList[this.day-1].nig = 0
-							}else if(this.monthList[this.day+this.empty-1].nig==0){
-								this.monthList[this.day+this.empty-1].nig=1//
-								this.schedulingList[this.day-1].nig = this.hospitalID
-							}
-							break;
+			
+			getListTime:async function(org_id){
+				let res= await this.$request.post('doctor/getOrgTimes',{org_id:org_id});
+				let newLists=[];
+				if(res.status==0){
+					if(res.data.length==0){
+						uni.showToast({
+							title:'请先去设置排班!'
+						})
+						return false;
+					}else{
+						this.hospitalTimes = res.data;
+						
+						console.log('时间:',this.hospitalTimes)
 					}
-					this.$forceUpdate();
-				}else{
-					
 				}
-			},
-			/**
-			 * 跳转周视图
-			 * */
-			jumpWeek(){
-				uni.navigateTo({
-					url:'week_Scheduling'
-				})
-			}
-		}
-	}
-</script>
+			},
+			/**
+			 * 切换医院
+			 * */
+			setSelectHospital (e) {
 
-<style>
-	/* 下拉按钮 */
-	.drop-down {
-		border: 1rpx solid #AAAAAA;
-		font-size: 32rpx;
-		flex-grow: 1;
-		margin-right: 30rpx;
-		border-radius: 15rpx;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		padding: 10rpx 15rpx;
+				this.getListTime(e[0].value)
+				this.hospital = e[0].label
+				this.hospitalID = e[0].value+""
+				for(let x = 0; x < this.monthList.length-this.empty; x++){
+					this.monthList[x+this.empty].mon = this.schedulingList[x].mon=="0"?0:this.schedulingList[x].mon==this.hospitalID?1:2 
+					this.monthList[x+this.empty].aft = this.schedulingList[x].aft=="0"?0:this.schedulingList[x].aft==this.hospitalID?1:2 
+					this.monthList[x+this.empty].nig = this.schedulingList[x].nig=="0"?0:this.schedulingList[x].nig==this.hospitalID?1:2 
+				}
+			},
+			/**
+			 * 点击对应日期
+			 * */
+			setDay(index,text) {
+				// 获取当前日期
+				var date = new Date();
+				// 获取当前月份
+				var nowMonth = date.getMonth() + 1;
+				// 获取当前是几号
+				var strDate = date.getDate();
+				// 添加分隔符“-”
+				var seperator = "-";	
+				// 最后拼接字符串,得到一个格式为(yyyy-MM-dd)的日期
+				var nowDate = date.getFullYear() + seperator + nowMonth + seperator + strDate
+				if(this.getimePate(nowDate)>this.getimePate(this.monthList[index].date)){
+					uni.showModal({
+						title:'只能修改今天之后的数据!'
+					})
+					return false;
+				}
+				if (index >= this.empty) {
+					this.monthList.map(val => {
+						val.select = false
+					})
+					this.monthList[index].select = true
+					this.day = text
+					this.popupShow = true
+				}
+				
+			},
+			
+			/**
+			 * 跳转到年视图
+			 * */
+			jumpYear() {
+				setTimeout(function() {
+					uni.navigateTo({
+						url: "year_Scheduling"
+					})
+				}, 300)
+			},
+			/**
+			 * 日视图按钮点击
+			 * id 1早上 2下午 3晚上
+			 * */
+			modify(id){
+				if(id==0){
+					this.monthList[this.day+this.empty-1].mon=1//
+					this.schedulingList[this.day-1].mon = this.hospitalID
+					
+					this.monthList[this.day+this.empty-1].aft=1//
+					this.schedulingList[this.day-1].aft = this.hospitalID
+					
+					this.monthList[this.day+this.empty-1].nig=1//
+					this.schedulingList[this.day-1].nig = this.hospitalID
+				}
+				if(this.allow){
+					this.saveDay = this.monthList[this.day+this.empty-1];
+					switch(id){
+						case 1 :
+							if(this.monthList[this.day+this.empty-1].mon==1){//当这个按钮状态为1 选择了医院且是当前医院
+								this.monthList[this.day+this.empty-1].mon=0//就取消选择
+								this.schedulingList[this.day-1].mon = 0
+							}else if(this.monthList[this.day+this.empty-1].mon==0){
+								this.monthList[this.day+this.empty-1].mon=1//
+								this.schedulingList[this.day-1].mon = this.hospitalID
+							}
+							break;
+						case 2 :
+							if(this.monthList[this.day+this.empty-1].aft==1){//当这个按钮状态为1 选择了医院且是当前医院
+								this.monthList[this.day+this.empty-1].aft=0//就取消选择
+								this.schedulingList[this.day-1].aft = 0
+							}else if(this.monthList[this.day+this.empty-1].aft==0){
+								this.monthList[this.day+this.empty-1].aft=1//
+								this.schedulingList[this.day-1].aft = this.hospitalID
+							}
+							break;
+						case 3 :
+							if(this.monthList[this.day+this.empty-1].nig==1){//当这个按钮状态为1 选择了医院且是当前医院
+								this.monthList[this.day+this.empty-1].nig=0//就取消选择
+								this.schedulingList[this.day-1].nig = 0
+							}else if(this.monthList[this.day+this.empty-1].nig==0){
+								this.monthList[this.day+this.empty-1].nig=1//
+								this.schedulingList[this.day-1].nig = this.hospitalID
+							}
+							break;
+					}
+					this.$forceUpdate();
+				}else{
+					console.log('到我了!');
+				}
+			},
+			/**
+			 * 跳转周视图
+			 * */
+			jumpWeek(){
+				uni.navigateTo({
+					url:'week_Scheduling'
+				})
+			}
+		}
+	}
+</script>
+
+<style>
+	/* 下拉按钮 */
+	.drop-down {
+		border: 1rpx solid #AAAAAA;
+		font-size: 32rpx;
+		flex-grow: 1;
+		margin-right: 30rpx;
+		border-radius: 15rpx;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 10rpx 15rpx;
 	}
+	
+	/* 底部按钮 */
+/* 	 .bottomButton {
+	  position: fixed;
+	  bottom: 0;
+	  left: 0;
+	  width: 100%;
+	  height: 100rpx;
+	  display: flex;
+	  align-items: center;
+	  justify-content: center;
+	  background-color: #0000ff;
+	  color: #FFFFFF;
+	  z-index: 1;
+	 
+	 } */
 </style>

+ 108 - 22
pages/scheduling/week_Scheduling.vue

xqd xqd xqd xqd xqd
@@ -47,6 +47,8 @@
 	export default {
 		onLoad() {
 			this.$nextTick(function() {
+				this.getHostail()
+				this.getWeek();
 
 			})
 			this.hospital = this.hospitalList[0].label
@@ -92,14 +94,14 @@
 					text: '周日'
 				}, ],
 				weekList: [{
-						mon: 1,
-						aft: 1,
-						nig: 1
+						mon: 0,
+						aft: 0,
+						nig: 0
 					},
 					{
-						mon: 2,
-						aft: 2,
-						nig: 2
+						mon: 0,
+						aft: 0,
+						nig: 0
 					},
 					{
 						mon: 0,
@@ -107,24 +109,24 @@
 						nig: 0
 					},
 					{
-						mon: 1,
-						aft: 1,
-						nig: 2
+						mon: 0,
+						aft: 0,
+						nig: 0
 					},
 					{
-						mon: 1,
-						aft: 1,
-						nig: 2
+						mon: 0,
+						aft: 0,
+						nig: 0
 					},
 					{
-						mon: 1,
-						aft: 1,
-						nig: 2
+						mon: 0,
+						aft: 0,
+						nig: 0
 					},
 					{
-						mon: 1,
-						aft: 1,
-						nig: 2
+						mon: 0,
+						aft: 0,
+						nig: 0
 					},
 				],
 
@@ -171,6 +173,61 @@
 			}
 		},
 		methods: {
+			
+			getHostail:async function(){
+				let res=await this.$request.post("doctor/organizationList");
+				if(res.status==0){
+					let data=res.data;
+					let newList=[];
+					if(data.length==0){
+						uni.showModal({
+							title:'请先认证医院'
+						})
+					}else{
+						for(let i=0;i<data.length;i++){
+							newList.push({
+								value:data[i].value,
+								label:data[i].label,
+							})
+						}
+					}
+					this.hospitalList = newList;
+				}
+			},
+			
+			getWeek:async function(){
+				let res = await this.$request.post("doctor/getLinsDetailnew");
+				console.log('res',res);
+				let weekList = this.weekTitlelist;
+				if(res.status==0){
+					let newList=[];
+					let data=res.data.list;
+					if(data.length==0){
+						for(let y=0;y<7;y++){
+							newList.push({
+								mon:0,
+								aft:0,
+								nig:0
+							})
+						}
+					}else{
+						for(let y=0;y<7;y++){
+								for(let i=0;i<data.length;i++){
+									if(weekList[y].text==data[i].week){
+										newList.push({
+											mon:data[i].ident.zao_id,
+											aft:data[i].ident.xia_id,
+											nig:data[i].ident.wan_id,
+										})
+									}
+							}
+							
+						}
+					}
+					this.weekList=newList;
+						
+				}
+			},
 			/**
 			 * 切换医院
 			 * */
@@ -209,10 +266,39 @@
 				console.log(this.weekList)
 				this.$forceUpdate();
 			},
-			submit(){
-				uni.navigateBack({
-					delta:1
-				})
+			submit:async function(){
+				let newData=[];
+				let list=this.weekList;
+				for(let i=0;i<list.length;i++){
+					newData.push({
+						week:i+1,
+						identifi:{
+							zao:list[i].mon,
+							zhong:list[i].aft,
+							wan:list[i].nig,
+						}
+					})
+				}
+				if(typeof newData=='object'){
+					newData = JSON.stringify(newData);
+				}
+				let res = await this.$request.post("doctor/week_scheduling",{'data':newData});
+				if (res.status == 0) {
+					uni.showToast({
+						duration: 2000,
+						title: '排班成功',
+						success() {
+							uni.switchTab({
+								url: '/pages/index/index'
+							})
+						}
+					})
+				} else {
+					uni.showModal({
+						duration: 2000,
+						title: res.message,
+					})
+				}
 			}
 		}
 	}

+ 224 - 227
pages/scheduling/year_Scheduling.vue

xqd
@@ -1,228 +1,225 @@
-<!-- 年视图 -->
-<template style="background-color:#FFF ;">
-	<view style="width: 100%;height: 100%;background-color:#FFF ;">
-		<view style="height: 40rpx;"></view>
-		<view style="margin: 0 40rpx ;">
-			<view style="font-size: 50rpx;font-weight: 500;margin-bottom: 30rpx;display: flex;justify-content: space-around;">
-				<u-icon name="arrow-left" @click="reduce"></u-icon>
-				<text>{{year}}年</text>
-				<u-icon name="arrow-right" @click="plus"></u-icon>
-			</view>
-			<!-- 月 -->
-			<view v-if="load" class="flex justify-center align-center" style="height: 80vh;">
-				<u-loading mode="circle" size="50"></u-loading>
-			</view>
-
-			<view v-else>
-				<u-grid :col="3" :border="false" align="center">
-					<u-grid-item v-for="item,index in time" :key="index" @click="jumpMonth(index)">
-						<view style="font-size: 40rpx;width: 100%;">{{item.title}}</view>
-						<view style="height: 280rpx;">
-							<u-grid :col="7" style="font-size: 20rpx;" :border="false">
-								<u-grid-item>日</u-grid-item>
-								<u-grid-item>一</u-grid-item>
-								<u-grid-item>二</u-grid-item>
-								<u-grid-item>三</u-grid-item>
-								<u-grid-item>四</u-grid-item>
-								<u-grid-item>五</u-grid-item>
-								<u-grid-item>六</u-grid-item>
-								<u-grid-item v-for="mitem,mindex in item.month" :key="mindex">{{mitem.text}}</u-grid-item>
-							</u-grid>
-						</view>
-					</u-grid-item>
-				</u-grid>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		onLoad() {
-			this.load = true
-			this.getNowTime()
-			this.setWeek()
-			this.$nextTick(function() {
-				this.getweek()
-				this.load = false
-			})
-
-		},
-		data() {
-			return {
-				load: true, //加载列表展示
-				year: 0,
-				nowYear:0,
-				month: 0,
-				time: [{
-						title: '',
-						month: []
-					},
-					{
-						title: '',
-						month: []
-					},
-					{
-						title: '',
-						month: []
-					},
-					{
-						title: '',
-						month: []
-					},
-					{
-						title: '',
-						month: []
-					},
-					{
-						title: '',
-						month: []
-					},
-					{
-						title: '',
-						month: []
-					},
-					{
-						title: '',
-						month: []
-					},
-					{
-						title: '',
-						month: []
-					},
-					{
-						title: '',
-						month: []
-					},
-					{
-						title: '',
-						month: []
-					},
-					{
-						title: '',
-						month: []
-					},
-				],
-			}
-		},
-		methods: {
-			/**
-			 * 拿到当前年
-			 * */
-			getNowTime() {
-				var d = new Date();
-				this.year = d.getFullYear()
-				this.nowYear = d.getFullYear()
-				this.month = d.getMonth() //实际上1月值为0,配合下面下标判断,不加1
-			},
-			/**
-			 * 给所有数据加月
-			 * */
-			setWeek() {
-				for (let w = 0; w < 12; w++) {
-					this.time[w].title = (w + 1) + '月'
-				}
-				console.log(this.time)
-			},
-			/**
-			 * 拿到这年到一月一号的数据
-			 * */
-			getweek() {
-				let startYear = this.year; //开始年
-				let startMonth = 1; //开始月
-				let startDay = 1; //开始的日
-				let oneDayTime = 24 * 60 * 60 * 1000; //固定数据 一天的时长
-				for (let a = 0; a < 12; a++) {
-					var date = new Date()
-					date.setFullYear(this.year, a, 1); //今年每个月的一号
-					for (let b = 0; b < date.getDay(); b++) {
-						this.time[a].month.push({
-							text: ""
-						})
-					}
-					date.setFullYear(this.year, a + 1, 0); //查看这个月有几天
-					// console.log(date.getDate())
-					for (let c = 0; c < date.getDate(); c++) {
-						this.time[a].month.push({
-							text: c + 1
-						})
-					}
-				}
-			},
-			/**
-			 * 加年数
-			 * */
-			plus() {
-				this.time.map(val => {
-					val.month.splice(0, val.month.length)
-				})
-				this.year++
-				this.setWeek()
-				this.getweek()
-
-			},
-			/**
-			 * 减年数
-			 * */
-			reduce() {
-				if(this.year==2020){
-					uni.showToast({
-						icon:'none',
-						title:'无法跳转'
-					})
-				}else{
-					this.time.map(val => {
-					val.month.splice(0, val.month.length)
-				})
-				this.year--
-				this.setWeek()
-				this.getweek()
-				}
-				
-
-			},
-			/**
-			 * 跳转
-			 * */
-			jumpMonth(index) {
-				if (!(index < this.month)) {
-					let pages = getCurrentPages();
-					let prevPage = pages[pages.length - 2];
-					console.log(pages)
-					console.log(prevPage)
-					console.log(prevPage.$vm.year)
-					console.log(prevPage.$vm.month)
-					prevPage.$vm.year = this.year;
-					prevPage.$vm.month = index + 1;
-					prevPage.$vm.load = true;
-					uni.navigateBack({
-						delta: 1
-					})
-				} else {
-					if(this.year>this.nowYear){
-						let pages = getCurrentPages();
-						let prevPage = pages[pages.length - 2];
-						console.log(pages)
-						console.log(prevPage)
-						console.log(prevPage.$vm.year)
-						console.log(prevPage.$vm.month)
-						prevPage.$vm.year = this.year;
-						prevPage.$vm.month = index + 1;
-						prevPage.$vm.load = true;
-						uni.navigateBack({
-							delta: 1
-						})
-					}else{
-					uni.showToast({
-						icon:'none',
-						title:'只能选择'+(this.month+1)+'月以后的日期'+this.year+this.nowYear
-					})
-					}
-				}
-			}
-		}
-	}
-</script>
-
-<style>
+<!-- 年视图 -->
+<template style="background-color:#FFF ;">
+	<view style="width: 100%;height: 100%;background-color:#FFF ;">
+		<view style="height: 40rpx;"></view>
+		<view style="margin: 0 40rpx ;">
+			<view style="font-size: 50rpx;font-weight: 500;margin-bottom: 30rpx;display: flex;justify-content: space-around;">
+				<u-icon name="arrow-left" @click="reduce"></u-icon>
+				<text>{{year}}年</text>
+				<u-icon name="arrow-right" @click="plus"></u-icon>
+			</view>
+			<!-- 月 -->
+			<view v-if="load" class="flex justify-center align-center" style="height: 80vh;">
+				<u-loading mode="circle" size="50"></u-loading>
+			</view>
+
+			<view v-else>
+				<u-grid :col="3" :border="false" align="center">
+					<u-grid-item v-for="item,index in time" :key="index" @click="jumpMonth(index)">
+						<view style="font-size: 40rpx;width: 100%;">{{item.title}}</view>
+						<view style="height: 280rpx;">
+							<u-grid :col="7" style="font-size: 20rpx;" :border="false">
+								<u-grid-item>日</u-grid-item>
+								<u-grid-item>一</u-grid-item>
+								<u-grid-item>二</u-grid-item>
+								<u-grid-item>三</u-grid-item>
+								<u-grid-item>四</u-grid-item>
+								<u-grid-item>五</u-grid-item>
+								<u-grid-item>六</u-grid-item>
+								<u-grid-item v-for="mitem,mindex in item.month" :key="mindex">{{mitem.text}}</u-grid-item>
+							</u-grid>
+						</view>
+					</u-grid-item>
+				</u-grid>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		onLoad() {
+			this.load = true
+			this.getNowTime()
+			this.setWeek()
+			this.$nextTick(function() {
+				this.getweek()
+				this.load = false
+			})
+
+		},
+		data() {
+			return {
+				load: true, //加载列表展示
+				year: 0,
+				nowYear:0,
+				month: 0,
+				time: [{
+						title: '',
+						month: []
+					},
+					{
+						title: '',
+						month: []
+					},
+					{
+						title: '',
+						month: []
+					},
+					{
+						title: '',
+						month: []
+					},
+					{
+						title: '',
+						month: []
+					},
+					{
+						title: '',
+						month: []
+					},
+					{
+						title: '',
+						month: []
+					},
+					{
+						title: '',
+						month: []
+					},
+					{
+						title: '',
+						month: []
+					},
+					{
+						title: '',
+						month: []
+					},
+					{
+						title: '',
+						month: []
+					},
+					{
+						title: '',
+						month: []
+					},
+				],
+			}
+		},
+		methods: {
+			/**
+			 * 拿到当前年
+			 * */
+			getNowTime() {
+				var d = new Date();
+				this.year = d.getFullYear()
+				this.nowYear = d.getFullYear()
+				this.month = d.getMonth() //实际上1月值为0,配合下面下标判断,不加1
+			},
+			/**
+			 * 给所有数据加月
+			 * */
+			setWeek() {
+				for (let w = 0; w < 12; w++) {
+					this.time[w].title = (w + 1) + '月'
+				}
+				console.log(this.time)
+			},
+			/**
+			 * 拿到这年到一月一号的数据
+			 * */
+			getweek() {
+				let startYear = this.year; //开始年
+				let startMonth = 1; //开始月
+				let startDay = 1; //开始的日
+				let oneDayTime = 24 * 60 * 60 * 1000; //固定数据 一天的时长
+				for (let a = 0; a < 12; a++) {
+					var date = new Date()
+					date.setFullYear(this.year, a, 1); //今年每个月的一号
+					for (let b = 0; b < date.getDay(); b++) {
+						this.time[a].month.push({
+							text: ""
+						})
+					}
+					date.setFullYear(this.year, a + 1, 0); //查看这个月有几天
+					// console.log(date.getDate())
+					for (let c = 0; c < date.getDate(); c++) {
+						this.time[a].month.push({
+							text: c + 1
+						})
+					}
+				}
+			},
+			/**
+			 * 加年数
+			 * */
+			plus() {
+				this.time.map(val => {
+					val.month.splice(0, val.month.length)
+				})
+				this.year++
+				this.setWeek()
+				this.getweek()
+
+			},
+			/**
+			 * 减年数
+			 * */
+			reduce() {
+				if(this.year==2020){
+					uni.showToast({
+						icon:'none',
+						title:'无法跳转'
+					})
+				}else{
+					this.time.map(val => {
+					val.month.splice(0, val.month.length)
+				})
+				this.year--
+				this.setWeek()
+				this.getweek()
+				}
+				
+
+			},
+			/**
+			 * 跳转
+			 * */
+			jumpMonth(index) {
+				console.log(this.year,index)
+				if (!(index < this.month)) {
+					let pages = getCurrentPages();
+					let prevPage = pages[pages.length - 2];
+					console.log(pages)
+					console.log(prevPage)
+					console.log(prevPage.$vm.year)
+					console.log(prevPage.$vm.month)
+					prevPage.$vm.year = this.year;
+					prevPage.$vm.month = index ;
+					prevPage.$vm.load = true;
+					uni.navigateBack({
+						delta: 1
+					})
+				} else {
+					if(this.year>this.nowYear){
+						let pages = getCurrentPages();
+						let prevPage = pages[pages.length - 2];
+						prevPage.$vm.year = this.year;
+						prevPage.$vm.month = index ;
+						prevPage.$vm.load = true;
+						uni.navigateBack({
+							delta: 1
+						})
+					}else{
+					uni.showToast({
+						icon:'none',
+						title:'只能选择'+(this.month+1)+'月以后的日期'+this.year+this.nowYear
+					})
+					}
+				}
+			}
+		}
+	}
+</script>
+
+<style>
 </style>

+ 1667 - 1626
pages/service/more.vue

xqd
@@ -1,1632 +1,1673 @@
-<template style="background-color: #f3f3f3;">
-	<view style="width: 100%;height: 100%;">
-		<!-- 按需求加分段器 -->
-		<u-subsection :list="SubsectionList" mode="button" :current="curNow" @change="sectionChange"></u-subsection>
-		<!-- 早上 -->
-		<u-select v-model="morShow" mode="mutil-column-auto" :list="morList" @confirm="confirm"></u-select>
-		<!-- 下午 -->
-		<u-select v-model="aftShow" mode="mutil-column-auto" :list="aftList" @confirm="confirm"></u-select>
-		<!-- 晚上 -->
-		<u-select v-model="nigShow" mode="mutil-column-auto" :list="nigList" @confirm="confirm"></u-select>
-		<!-- 服务时间选择 -->
-		<u-select v-model="serviceShow" :list="serviceTimelist" @confirm="selectService"></u-select>
-		<!-- 医院选择 -->
-		<u-select v-model="hospitalShow" :list="form.hospitalList" @confirm="selectHospital" label-name="name"></u-select>
-
-		<!-- 电话咨询 -->
-		<view class="v" v-show="showList[0].flag&&(SubsectionList[curNow].name=='电话咨询')">
-			<!-- 基础价格 -->
-			<view class="list">
-				<!-- 左 -->
-				<view class="left">
-					<view class="t1">基础价格<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(元)</text></view>
-					<view class="t2">基础价格为包含十分钟的起步价</view>
-				</view>
-				<!-- 右 -->
-				<view class="right">
-					<u-input v-model="form.is_phone.base_price" type="digit" :border="true" placeholder="请输入金额" />
-				</view>
-			</view>
-			<!-- 步进价格 -->
-			<view class="list">
-				<!-- 左 -->
-				<view class="left">
-					<view class="t1">步进价格<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(元/每分钟)</text></view>
-					<view class="t2">步进价格为超过起步价时长的价格</view>
-				</view>
-				<!-- 右 -->
-				<view class="right">
-					<u-input v-model="form.is_phone.step_price" type="digit" :border="true" placeholder="请输入金额" />
-				</view>
-			</view>
-			<!-- 服务时间 -->
-			<view class="list" style="margin-bottom: 20rpx;">服务时间</view>
-			<!-- 线 -->
-			<u-line color="#e7e7e7" />
-			<!-- 早上 -->
-			<view style="margin-top: 20rpx;">
-				<view>
-					<view class="flex justify-between" style="margin-bottom: 16rpx;">
-						<text>上午服务时间</text>
-						
-					</view>
-					<view class="select_time" @click="selectTime(0,0)">
-						<text>{{form.is_phone.mor_time==""?"选择开始时间 - 结束时间":form.is_phone.mor_time}}</text>
-						<u-icon name="clock"></u-icon>
-					</view>
-				</view>
-			</view>
-			<!-- 下午 -->
-			<view style="margin-top: 20rpx;">
-				<view>
-					<view class="flex justify-between" style="margin-bottom: 16rpx;">
-						<text>下午服务时间</text>
-						
-					</view>
-					<view class="select_time" @click="selectTime(1,0)">
-						<text>{{form.is_phone.aft_time==""?"选择开始时间 - 结束时间":form.is_phone.aft_time}}</text>
-						<u-icon name="clock"></u-icon>
-					</view>
-				</view>
-			</view>
-			<!-- 晚上 -->
-			<view style="margin-top: 20rpx;">
-				<view>
-					<view class="flex justify-between" style="margin-bottom: 16rpx;">
-						<text>晚上服务时间</text>
-						
-					</view>
-					<view class="select_time" @click="selectTime(2,0)">
-						<text>{{form.is_phone.nig_time==""?"选择开始时间 - 结束时间":form.is_phone.nig_time}}</text>
-						<u-icon name="clock"></u-icon>
-					</view>
-				</view>
-			</view>
-			<!-- 服务人次 -->
-			<view class="list">
-				<!-- 左 -->
-				<view class="left">
-					<view class="t1">服务人次<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(人/每小时)</text></view>
-					<view class="t2">本项目每小时最大接收的服务人次</view>
-				</view>
-				<!-- 右 -->
-				<view class="right">
-					<u-input v-model="form.is_phone.person" type="digit" :border="true" placeholder="请输入人次" />
-				</view>
-			</view>
-
-		</view>
-		<view v-if="!showList[0].flag&&(SubsectionList[curNow].name=='电话咨询')" style="height: 50vh;">
-			<u-empty text="未开通" mode="data"></u-empty>
-		</view>
-		<view style="padding: 20rpx 26rpx 200rpx 26rpx;background-color: #f3f3f3;color:#C0C0C0" v-show="showList[0].flag&&(SubsectionList[curNow].name=='电话咨询')">
-			提示:就诊人信息用于平台审核和医疗业务使用,不会外传。请正却确填写就诊人信息,如需修改身份信息可电话联系客服修改(13330431369)
-		</view>
-
-		<!-- 图文咨询 -->
-		<view class="v" v-show="showList[1].flag&&(SubsectionList[curNow].name=='图文咨询')">
-			<!-- 标题 -->
-			<view class="title">图文咨询</view>
-			<!-- 线 -->
-			<u-line color="#e7e7e7" />
-			<!-- 基础价格 -->
-			<view class="list">
-				<!-- 左 -->
-				<view class="left">
-					<view class="t1">基础价格<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(元)</text></view>
-					<view class="t2">基础价格为包含十分钟的起步价</view>
-				</view>
-				<!-- 右 -->
-				<view class="right">
-					<u-input v-model="form.is_chat.base_price" type="digit" :border="true" placeholder="请输入金额" />
-				</view>
-			</view>
-			<!-- 服务时间 -->
-			<view class="list" style="margin-bottom: 20rpx;">服务时间</view>
-			<!-- 线 -->
-			<u-line color="#e7e7e7" />
-			<!-- 早上 -->
-			<view style="margin-top: 20rpx;">
-				<view>
-					<view class="flex justify-between" style="margin-bottom: 16rpx;">
-						<text>上午服务时间</text>
-					</view>
-					<view class="select_time" @click="selectTime(0,1)">
-						<text>{{form.is_chat.mor_time==""?"选择开始时间 - 结束时间":form.is_chat.mor_time}}</text>
-						<u-icon name="clock"></u-icon>
-					</view>
-				</view>
-			</view>
-			<!-- 下午 -->
-			<view style="margin-top: 20rpx;">
-				<view>
-					<view class="flex justify-between" style="margin-bottom: 16rpx;">
-						<text>下午服务时间</text>
-					</view>
-					<view class="select_time" @click="selectTime(1,1)">
-						<text>{{form.is_chat.aft_time==""?"选择开始时间 - 结束时间":form.is_chat.aft_time}}</text>
-						<u-icon name="clock"></u-icon>
-					</view>
-				</view>
-			</view>
-			<!-- 晚上 -->
-			<view style="margin-top: 20rpx;">
-				<view>
-					<view class="flex justify-between" style="margin-bottom: 16rpx;">
-						<text>晚上服务时间</text>
-					</view>
-					<view class="select_time" @click="selectTime(2,1)">
-						<text>{{form.is_chat.nig_time==""?"选择开始时间 - 结束时间":form.is_chat.nig_time}}</text>
-						<u-icon name="clock"></u-icon>
-					</view>
-				</view>
-			</view>
-			<!-- 服务人次 -->
-			<view class="list">
-				<!-- 左 -->
-				<view class="left">
-					<view class="t1">同时服务人次<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(人/每小时)</text></view>
-					<view class="t2">本项目每小时最大接收的服务人次</view>
-				</view>
-				<!-- 右 -->
-				<view class="right">
-					<u-input v-model="form.is_chat.person" type="digit" :border="true" placeholder="请输入人次" />
-				</view>
-			</view>
-		</view>
-		<view v-if="!showList[1].flag&&(SubsectionList[curNow].name=='图文咨询')" style="height: 50vh;">
-			<u-empty text="未开通" mode="data"></u-empty>
-		</view>
-
-		<view style="padding: 20rpx 26rpx 200rpx 26rpx;background-color: #f3f3f3;color:#C0C0C0" v-show="showList[1].flag&&(SubsectionList[curNow].name=='图文咨询')">
-			提示:就诊人信息用于平台审核和医疗业务使用,不会外传。请正却确填写就诊人信息,如需修改身份信息可电话联系客服修改(13330431369)
-		</view>
-
-		<!-- 门诊预约 -->
-		<view class="v" v-show="showList[2].flag&&(SubsectionList[curNow].name=='门诊预约')">
-			<view v-if="form.is_appoint.name != ''">
-				<view>
-					<u-button @click="hospitalShow = true">{{form.is_appoint.name}}</u-button>
-				</view>
-				<!-- 基础价格 -->
-				<view class="list">
-					<!-- 左 -->
-					<view class="left">
-						<view class="t1">基础价格<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(元)</text></view>
-						<view class="t2">基础价格为包含十分钟的起步价</view>
-					</view>
-					<!-- 右 -->
-					<view class="right">
-						<u-input v-model="form.is_appoint.base_price" type="digit" :border="true" placeholder="请输入金额" />
-					</view>
-				</view>
-				<!-- 服务时间 -->
-				<view class="list" style="margin-bottom: 20rpx;">服务时间</view>
-				<!-- 线 -->
-				<u-line color="#e7e7e7" />
-				<!-- 早上 -->
-				<view style="margin-top: 20rpx;">
-					<view>
-						<view class="flex justify-between" style="margin-bottom: 16rpx;">
-							<text>上午服务时间</text>
-							<text style="color:#4CA0FC;">可预约号源: {{form.is_appoint.mor_num}}个</text>
-						</view>
-						<view class="select_time" @click="selectTime(0,2)">
-							<text>{{form.is_appoint.mor_time==""?"选择开始时间 - 结束时间":form.is_appoint.mor_time}}</text>
-							<u-icon name="clock"></u-icon>
-						</view>
-					</view>
-				</view>
-				<!-- 下午 -->
-				<view style="margin-top: 20rpx;">
-					<view>
-						<view class="flex justify-between" style="margin-bottom: 16rpx;">
-							<text>下午服务时间</text>
-							<text style="color:#4CA0FC;">可预约号源: {{form.is_appoint.aft_num}}个</text>
-						</view>
-						<view class="select_time" @click="selectTime(1,2)">
-							<text>{{form.is_appoint.aft_time==""?"选择开始时间 - 结束时间":form.is_appoint.aft_time}}</text>
-							<u-icon name="clock"></u-icon>
-						</view>
-					</view>
-				</view>
-				<!-- 晚上 -->
-				<view style="margin-top: 20rpx;">
-					<view>
-						<view class="flex justify-between" style="margin-bottom: 16rpx;">
-							<text>晚上服务时间</text>
-							<text style="color:#4CA0FC;">可预约号源: {{form.is_appoint.nig_num}}个</text>
-						</view>
-						<view class="select_time" @click="selectTime(2,2)">
-							<text>{{form.is_appoint.nig_time==""?"选择开始时间 - 结束时间":form.is_appoint.nig_time}}</text>
-							<u-icon name="clock"></u-icon>
-						</view>
-					</view>
-				</view>
-				<!-- 服务时长 -->
-				<view class="list">
-					<!-- 左 -->
-					<view class="left">
-						<view class="t1">就诊时长<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(分钟)</text></view>
-						<view class="t2">修改就诊时长,不影响已预约的订单</view>
-					</view>
-					<!-- 右 -->
-					<view class="right" @click="serviceShow = true">
-						<text style="margin-right: 20rpx;color: #c1c1c1;font-size: 30rpx;">{{form.is_appoint.see_doc_time==""?"请选择":form.is_appoint.see_doc_time}}</text>
-						<u-icon :name="serviceShow?'arrow-up':'arrow-down'" size="30"></u-icon>
-					</view>
-				</view>
-				<!-- 服务订单 -->
-				<view class="list">
-					<!-- 左 -->
-					<view class="left">
-						<view class="t1">同时服务订单数<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(个)</text></view>
-						<view class="t2">同一时间可接待孩子数量</view>
-					</view>
-					<!-- 右 -->
-					<view class="right">
-						<u-input v-model="form.is_appoint.service_order" type="digit" :border="true" placeholder="请输入人次" />
-					</view>
-				</view>
-				<!-- 预约天数 -->
-				<view class="list">
-					<!-- 左 -->
-					<view class="left">
-						<view class="t1">可预约天数<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(自然天)</text></view>
-						<view class="t2">修改预约天数,不影响已预约的订单</view>
-					</view>
-					<!-- 右 -->
-					<view class="right">
-						<u-input v-model="form.is_chat.appointment" type="digit" :border="true" placeholder="请输入人次" />
-					</view>
-				</view>
-			</view>
-			<view style="width: 100%;height: 60vh;display: flex;justify-content: center;align-items: center;" v-else>
-				<view style="width: 90%;">
-					<view style="width: 100%;text-align: center;margin-bottom: 40rpx;font-size: 40rpx;">请选择医院</view>
-					<u-button shape="circle" type="primary" @click="hospitalShow = true">请选择医院</u-button>
-				</view>
-			</view>
-		</view>
-		<view v-if="!showList[2].flag&&(SubsectionList[curNow].name=='门诊预约')" style="height: 50vh;">
-			<u-empty text="未开通" mode="data"></u-empty>
-		</view>
-		<view style="padding: 20rpx 26rpx 200rpx 26rpx;background-color: #f3f3f3;color:#C0C0C0" v-show="showList[2].flag&&(SubsectionList[curNow].name=='门诊预约')">
-			提示:就诊人信息用于平台审核和医疗业务使用,不会外传。请正却确填写就诊人信息,如需修改身份信息可电话联系客服修改(13330431369)
-		</view>
-		<view class="bottomButton" @click="bc">保存</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		onLoad(options) {
-			// this.getShows();
-			this.$nextTick(function() {
-				this.addTime()
-			})
-
-		},
-		mounted() {
-
-		},
-		data() {
-			return {
-				SubsectionList: [{
-					name: '电话咨询'
-				}, {
-					name: '图文咨询'
-				}, {
-					name: '门诊预约'
-				}],
-				curNow: 0,// 控制列表显示:0=电话,1=图文,2=门诊预约
-				//控制器
-				morShow: false, //早上
-				aftShow: false, //下午
-				nigShow: false, //晚上
-				serviceShow: false, //服务时间选择
-				hospitalShow: false, //医院选择
-				//时间列表
-				list: [{
-						value:1,
-						label: '00:30'
-					},
-					{value:2,
-						label: '01:00'
-					},
-					{value:3,
-						label: '01:30'
-					},
-					{value:4,
-						label: '02:00'
-					},
-					{value:5,
-						label: '02:30'
-					},
-					{value:6,
-						label: '03:00'
-					},
-					{value:7,
-						label: '03:30'
-					},
-					{value:8,
-						label: '04:00'
-					},
-					{value:9,
-						label: '04:30'
-					},
-					{value:10,
-						label: '05:00'
-					},
-					{value:11,
-						label: '05:30'
-					},
-					{value:12,
-						label: '06:00'
-					},
-					{value:13,
-						label: '06:30'
-					},
-					{value:14,
-						label: '07:00'
-					},
-					{value:15,
-						label: '07:30'
-					},
-					{value:16,
-						label: '08:00'
-					},
-					{value:18,
-						label: '08:30'
-					},
-					{value:19,
-						label: '09:00'
-					},
-					{value:20,
-						label: '09:30'
-					},
-					{value:21,
-						label: '10:00'
-					},
-					{value:22,
-						label: '10:30'
-					},
-					{value:23,
-						label: '11:00'
-					},
-					{value:24,
-						label: '11:30'
-					},
-					{value:25,
-						label: '12:00'
-					},
-					{value:26,
-						label: '12:30'
-					},
-					{value:27,
-						label: '13:00'
-					},
-					{value:28,
-						label: '13:30'
-					},
-					{value:29,
-						label: '14:00'
-					},
-					{value:30,
-						label: '14:30'
-					},
-					{value:31,
-						label: '15:00'
-					},
-					{value:32,
-						label: '15:30'
-					},
-					{value:33,
-						label: '16:00'
-					},
-					{value:34,
-						label: '16:30'
-					},
-					{value:35,
-						label: '17:00'
-					},
-					{value:36,
-						label: '17:30'
-					},
-					{value:37,
-						label: '18:00'
-					},
-					{value:38,
-						label: '18:30'
-					},
-					{value:39,
-						label: '19:00'
-					},
-					{value:40,
-						label: '19:30'
-					},
-					{value:41,
-						label: '20:00'
-					},
-					{value:42,
-						label: '20:30'
-					},
-					{value:43,
-						label: '21:00'
-					},
-					{value:44,
-						label: '21:30'
-					},
-					{value:45,
-						label: '22:00'
-					},
-					{value:46,
-						label: '22:30'
-					},
-					{value:47,
-						label: '23:00'
-					},
-					{value:48,
-						label: '23:30'
-					},
-					{value:49,
-						label: '24:00'
-					},
-				],
-				morList: [{
-						label: '暂不选择',
-						children: [{
-							label: '暂不选择'
-						}]
-					},
-					{
-						label: '00:00',
-						children: []
-					},
-					{
-						label: '00:30',
-						children: []
-					},
-					{
-						label: '01:00',
-						children: []
-					},
-					{
-						label: '01:30',
-						children: []
-					},
-					{
-						label: '02:00',
-						children: []
-					},
-					{
-						label: '02:30',
-						children: []
-					},
-					{
-						label: '03:00',
-						children: []
-					},
-					{
-						label: '03:30',
-						children: []
-					},
-					{
-						label: '04:00',
-						children: []
-					},
-					{
-						label: '04:30',
-						children: []
-					},
-					{
-						label: '05:00',
-						children: []
-					},
-					{
-						label: '05:30',
-						children: []
-					},
-					{
-						label: '06:00',
-						children: []
-					},
-					{
-						label: '06:30',
-						children: []
-					},
-					{
-						label: '07:00',
-						children: []
-					},
-					{
-						label: '07:30',
-						children: []
-					},
-					{
-						label: '08:00',
-						children: []
-					},
-					{
-						label: '08:30',
-						children: []
-					},
-					{
-						label: '09:00',
-						children: []
-					},
-					{
-						label: '09:30',
-						children: []
-					},
-					{
-						label: '10:00',
-						children: []
-					},
-					{
-						label: '10:30',
-						children: []
-					},
-					{
-						label: '11:00',
-						children: []
-					},
-					{
-						label: '11:30',
-						children: []
-					},
-				],
-				aftList: [{
-						label: '暂不选择',
-						children: [{
-							label: '暂不选择'
-						}]
-					},
-					{
-						label: '12:00',
-						children: []
-					},
-					{
-						label: '12:30',
-						children: []
-					},
-					{
-						label: '13:00',
-						children: []
-					},
-					{
-						label: '13:30',
-						children: []
-					},
-					{
-						label: '14:00',
-						children: []
-					},
-					{
-						label: '14:30',
-						children: []
-					},
-					{
-						label: '15:00',
-						children: []
-					},
-					{
-						label: '15:30',
-						children: []
-					},
-					{
-						label: '16:00',
-						children: []
-					},
-					{
-						label: '16:30',
-						children: []
-					},
-					{
-						label: '17:00',
-						children: []
-					},
-					{
-						label: '17:30',
-						children: []
-					},
-				],
-				nigList: [{
-						label: '暂不选择',
-						children: [{
-							label: '暂不选择'
-						}]
-					},
-					{
-						label: '18:00',
-						children: []
-					},
-					{
-						label: '18:30',
-						children: []
-					},
-					{
-						label: '19:00',
-						children: []
-					},
-					{
-						label: '19:30',
-						children: []
-					},
-					{
-						label: '20:00',
-						children: []
-					},
-					{
-						label: '20:30',
-						children: []
-					},
-					{
-						label: '21:00',
-						children: []
-					},
-					{
-						label: '21:30',
-						children: []
-					},
-					{
-						label: '22:00',
-						children: []
-					},
-					{
-						label: '22:30',
-						children: []
-					},
-					{
-						label: '23:00',
-						children: []
-					},
-					{
-						label: '23:30',
-						children: []
-					},
-					{
-						label: '24:00',
-						children: []
-					},
-				],
-				serviceTimelist: [{
-						label: '10'
-					},
-					{
-						label: '15'
-					},
-					{
-						label: '20'
-					},
-					{
-						label: '30'
-					},
-					{
-						label: '60'
-					},
-				],
-				showList: [{
-						flag: true
-					}, {
-						flag: true
-					}, {
-						flag: true
-					}, 
-				],
-				//医院
-				hospitalTotal: 2,
-				changeOne: true,
-				//
-				hospitals: [],
-				hospitalcurrent: 0,
-
-				//判断应该赋值的位置,每次时间选择,保存点击位置
-				timeSlot: 0, //时间段.0上午 1下午 2晚上
-				servicesType: 0, //服务种类 0电话 1图文 2门诊
-				
-				/**
-				 * 暂时保存的门诊服务时间段
-				 * 切换医院清空
-				 * 选择暂不选择清空
-				 */
-				morningSlot: 0 ,//早上
-				afternoonSlot: 0 ,//下午
-				nightSlot: 0 ,//晚上
-
-
-				/********************保存的数据****************************/
-				form: {
-					is_phone: { //电话
-						base_price: "20", //基础价格
-						mor_time: "", //上午服务时间
-						aft_time: "", //上午服务时间
-						nig_time: "", //晚上服务时间
-						service_order: 0, //同时服务订单数
-						type: "1"
-					},
-					is_chat: { //图文
-						base_price: "20", //基础价格
-						step_price: "", //步进价格
-						mor_time: "", //上午服务时间
-						aft_time: "", //上午服务时间
-						nig_time: "", //晚上服务时间
-						service_order: 0, //同时服务订单数
-						type: "2"
-					},
-					is_appoint: { //门诊
-						name: "", //加载的时候不加载医院,需要选择医院后才显示
-						base_price: "20", //基础价格
-						mor_time: "", //上午服务时间
-						mor_num: 0, //上午可预约号源
-						aft_time: "", //上午服务时间
-						aft_num: 0, //下午可预约号源
-						nig_time: "", //晚上服务时间
-						nig_num: 0, //晚上可预约号源
-						see_doc_time: "", //就诊时长
-						service_order: 0, //同时服务订单数
-						appointment: 0, //可预约天数
-						type: "3"
-					},
-					//可以通过修改label-name属性来改变医院名字字段显示
-					hospitalList: [{
-							name: "测试医院1"
-						},
-						{
-							name: "测试医院2"
-						},
-						{
-							name: "测试医院3"
-						},
-					]
-				}
-
-			}
-		},
-		methods: {
-			/**
-			 * 拿到返回值并赋值
-			 * timeSlot:0
-			 * 时间段.0上午 1下午 2晚上
-			 * servicesType:0
-			 * 服务种类 0电话 1图文 2门诊
-			 * */
-			confirm(e) {
-				if (e[0].label != '暂不选择') {
-					switch (this.timeSlot) {
-						case 0:
-							if (this.servicesType == 0) {
-								this.form.is_phone.mor_time = e[0].label + ' - ' + e[1].label//电话
-							} 
-							else if (this.servicesType == 1) {
-								this.form.is_chat.mor_time = e[0].label + ' - ' + e[1].label//图文
-							} 
-							else if (this.servicesType == 2) {
-								this.form.is_appoint.mor_time = e[0].label + ' - ' + e[1].label//门诊
-								this.morningSlot = (e[1].value-e[0].value)*30
-							} 
-							break;
-						case 1:
-							if (this.servicesType == 0) {
-								this.form.is_phone.aft_time = e[0].label + ' - ' + e[1].label//电话
-							} 
-							else if (this.servicesType == 1) {
-								this.form.is_chat.aft_time = e[0].label + ' - ' + e[1].label//图文
-							} 
-							else if (this.servicesType == 2) {
-								this.form.is_appoint.aft_time = e[0].label + ' - ' + e[1].label//门诊
-								this.afternoonSlot = (e[1].value-e[0].value)*30
-							} 
-							break;
-						case 2:
-							if (this.servicesType == 0) {
-								this.form.is_phone.nig_time = e[0].label + ' - ' + e[1].label//电话
-							} 
-							else if (this.servicesType == 1) {
-								this.form.is_chat.nig_time = e[0].label + ' - ' + e[1].label//图文
-							} 
-							else if (this.servicesType == 2) {
-								this.form.is_appoint.nig_time = e[0].label + ' - ' + e[1].label//门诊
-								this.nightSlot = (e[1].value-e[0].value)*30
-							} 
-							break;
-						default:
-					}
-				} else {//选择了暂不选择,清空
-					switch (this.timeSlot) {
-						case 0: //早上
-							if (this.servicesType == 0) {
-								this.form.is_phone.mor_time = ""//电话
-							} 
-							else if (this.servicesType == 1) {
-								this.form.is_chat.mor_time = ""//图文
-							} 
-							else if (this.servicesType == 2) {
-								this.form.is_appoint.mor_time = ""//门诊
-								this.morningSlot = 0
-							} 
-							break;
-						case 1://下午
-							if (this.servicesType == 0) {
-								this.form.is_phone.aft_time = ""//电话
-							} 
-							else if (this.servicesType == 1) {
-								this.form.is_chat.aft_time = ""//图文
-							} 
-							else if (this.servicesType == 2) {
-								this.form.is_appoint.aft_time = ""//门诊
-								this.afternoonSlot = 0
-							} 
-							break;
-						case 2://晚上
-							if (this.servicesType == 0) {
-								this.form.is_phone.nig_time = ""//电话
-							} 
-							else if (this.servicesType == 1) {
-								this.form.is_chat.nig_time = ""//图文
-							} 
-							else if (this.servicesType == 2) {
-								this.form.is_appoint.nig_time = ""//门诊
-								this.nightSlot = 0
-							} 
-							break;
-						default:
-					}
-				}
-				// 在这里计算号源 通过value相减得到时间段值
-				//在门诊页面选择 并 选择了时间
-				if (this.servicesType == 2 && e[0].label != '暂不选择'){
-					if(this.form.is_appoint.see_doc_time!=""){//选择了就诊时长
-						let time = parseInt((e[1].value-e[0].value)*30/this.form.is_appoint.see_doc_time)
-						console.log(time)
-						switch(this.timeSlot){
-							case 0:
-								this.form.is_appoint.mor_num = time
-								break;
-							case 1:
-								this.form.is_appoint.aft_num = time
-								break;
-							case 2:
-								this.form.is_appoint.nig_num = time
-								break;
-							
-						}
-					}else{ //没有选择就诊时长
-						let time = (e[1].value-e[0].value)*30
-						switch(this.timeSlot){
-							case 0:
-								this.morningSlot = time
-								break;
-							case 1:
-								this.afternoonSlot = time
-								break;
-							case 2:
-								this.nightSlot = time
-								break;
-						}
-					}
-				}
-				console.log(this.form)
-			},
-			
-			/**
-			 * 给所有时间段数组赋值
-			 * */
-			addTime() {
-				// 早上
-				for (let a = 1; a < this.morList.length; a++) { //从1开始,避开暂不选择
-					this.morList[a].children = this.list.slice(a - 1, 24)
-					this.morList[a].value = a-1;
-				}
-				//下午
-				for (let a = 1; a < this.aftList.length; a++) { //从1开始,避开暂不选择
-					this.aftList[a].children = this.list.slice(23 + a, 36)
-					this.aftList[a].value = 24+a;
-				}
-				//晚上
-				for (let a = 1; a < this.nigList.length; a++) { //从1开始,避开暂不选择
-					this.nigList[a].children = this.list.slice(35 + a)
-					this.nigList[a].value = 36+a;
-				}
-				console.log("早上",this.morList)
-				console.log("下午",this.aftList)
-				console.log("晚上",this.nigList)
-			},
-			
-			/**
-			 * 选择时间
-			 * timeSlot		选择的时间段
-			 * servicesType	选择的服务
-			 * */
-			selectTime(timeSlot, servicesType) {
-				//保存位置
-				this.timeSlot = timeSlot;
-				this.servicesType = servicesType;
-				//显示选择器
-				switch (timeSlot) {
-					case 0:
-						this.morShow = true;
-						break;
-					case 1:
-						this.aftShow = true;
-						break;
-					case 2:
-						this.nigShow = true;
-						break;
-				}
-			},
-			
-			/**
-			 * 选择就诊时长
-			 */
-			selectService(e) {
-				console.log("早上时间,单位分钟",this.morningSlot)
-				console.log("下午时间",this.afternoonSlot)
-				console.log("晚上时间",this.nightSlot)
-				this.form.is_appoint.see_doc_time = e[0].label
-				if(this.morningSlot != 0){
-					this.form.is_appoint.mor_num =  parseInt(this.morningSlot/e[0].label) 
-				}
-				if(this.afternoonSlot != 0){
-					this.form.is_appoint.aft_num =  parseInt(this.afternoonSlot/e[0].label) 
-				}
-				if(this.nightSlot != 0){
-					this.form.is_appoint.nig_num =  parseInt(this.nightSlot/e[0].label) 
-				}
-			},
-			
-			/**
-			 * 选择医院
-			 */
-			selectHospital(e){
-				this.form.is_appoint.name = e[0].label
-				//清空暂存数据
-				this.morningSlot=0 //早上
-				this.afternoonSlot=0 //下午
-				this.nightSlot=0 //晚上
-			},
-			
-			/*    分段器选择  */
-			sectionChange(index) {
-				this.curNow = index;
-			},
-			/*    保存       */
-			bc: async function(e) {
-				let that = this;
-				/**
-				 * 电话
-				 * */
-
-				that.form.is_phone.service_time = '';
-				that.form.is_chat.service_time = '';
-				that.form.is_appoint.hospitals[0].service_time = '';
-				that.form.is_appoint.hospitals[1].service_time = '';
-				for (let i in that.dh.timeList1) { //遍历选中 保存id
-					if (that.dh.timeList1[i].checked) {
-						that.form.is_phone.service_time = that.form.is_phone.service_time + "," + that.dh.timeList1[i].id
-					}
-				}
-				for (let i in that.dh.timeList2) { //遍历选中 保存id
-					if (that.dh.timeList2[i].checked) {
-						that.form.is_phone.service_time = that.form.is_phone.service_time + "," + that.dh.timeList2[i].id
-					}
-				}
-				for (let i in that.dh.timeList3) { //遍历选中 保存id
-					if (that.dh.timeList3[i].checked) {
-						that.form.is_phone.service_time = that.form.is_phone.service_time + "," + that.dh.timeList3[i].id
-					}
-				}
-				//判断开头第一个是否为逗号,是就删除逗号
-				if (that.form.is_phone.service_time.startsWith(",")) {
-					that.form.is_phone.service_time = that.form.is_phone.service_time.substr(1);
-				}
-				/**
-				 * 图文
-				 * */
-
-				for (let i in that.tw.timeList1) { //遍历选中 保存id
-					if (that.tw.timeList1[i].checked) {
-						that.form.is_chat.service_time = that.form.is_chat.service_time + "," + that.tw.timeList1[i].id
-					}
-				}
-				for (let i in that.tw.timeList2) { //遍历选中 保存id
-					if (that.tw.timeList2[i].checked) {
-						that.form.is_chat.service_time = that.form.is_chat.service_time + "," + that.tw.timeList2[i].id
-					}
-				}
-				for (let i in that.tw.timeList3) { //遍历选中 保存id
-					if (that.tw.timeList3[i].checked) {
-						that.form.is_chat.service_time = that.form.is_chat.service_time + "," + that.tw.timeList3[i].id
-					}
-				}
-				//判断开头第一个是否为逗号,是就删除逗号
-				if (that.form.is_chat.service_time.startsWith(",")) {
-
-					that.form.is_chat.service_time = that.form.is_chat.service_time.substr(1);
-				}
-				/**
-				 * 门诊
-				 * */
-				for (let i in that.mz1.timeList1) { //遍历选中 保存id
-					if (that.mz1.timeList1[i].checked) {
-						that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time + "," + that.mz1
-							.timeList1[i].id
-					}
-				}
-				for (let i in that.mz1.timeList2) { //遍历选中 保存id
-					if (that.mz1.timeList2[i].checked) {
-						that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time + "," + that.mz1
-							.timeList2[i].id
-					}
-				}
-				for (let i in that.mz1.timeList3) { //遍历选中 保存id
-					if (that.mz1.timeList3[i].checked) {
-						that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time + "," + that.mz1
-							.timeList3[i].id
-					}
-				}
-				//判断开头第一个是否为逗号,是就删除逗号
-				if (that.form.is_appoint.hospitals[0].service_time.startsWith(",")) {
-
-					that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time.substr(1);
-				}
-				/**
-				 * 门诊
-				 * */
-				for (let i in that.mz2.timeList1) { //遍历选中 保存id
-					if (that.mz2.timeList1[i].checked) {
-						that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time + "," + that.mz2
-							.timeList1[i].id
-					}
-				}
-				for (let i in that.mz2.timeList2) { //遍历选中 保存id
-					if (that.mz2.timeList2[i].checked) {
-						that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time + "," + that.mz2
-							.timeList2[i].id
-					}
-				}
-				for (let i in that.mz2.timeList3) { //遍历选中 保存id
-					if (that.mz2.timeList3[i].checked) {
-						that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time + "," + that.mz2
-							.timeList3[i].id
-					}
-				}
-				//判断开头第一个是否为逗号,是就删除逗号
-				if (that.form.is_appoint.hospitals[1].service_time.startsWith(",")) {
-					that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time.substr(1);
-				}
-
-
-
+<template style="background-color: #f3f3f3;">
+	<view style="width: 100%;height: 100%;">
+		<!-- 按需求加分段器 -->
+		<u-subsection :list="SubsectionList" mode="button" :current="curNow" @change="sectionChange"></u-subsection>
+		<!-- 早上 -->
+		<u-select v-model="morShow" mode="mutil-column-auto" :list="morList" @confirm="confirm"></u-select>
+		<!-- 下午 -->
+		<u-select v-model="aftShow" mode="mutil-column-auto" :list="aftList" @confirm="confirm"></u-select>
+		<!-- 晚上 -->
+		<u-select v-model="nigShow" mode="mutil-column-auto" :list="nigList" @confirm="confirm"></u-select>
+		<!-- 服务时间选择 -->
+		<u-select v-model="serviceShow" :list="serviceTimelist" @confirm="selectService"></u-select>
+		<!-- 医院选择 -->
+		<u-select v-model="hospitalShow" :list="form.is_appoint.hospitalList" @confirm="selectHospital" label-name="name" value-name="id"></u-select>
+
+		<!-- 电话咨询 -->
+		<view class="v" v-show="showList[0].flag&&(SubsectionList[curNow].name=='电话咨询')">
+			<!-- 基础价格 -->
+			<view class="list">
+				<!-- 左 -->
+				<view class="left">
+					<view class="t1">基础价格<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(元)</text></view>
+					<view class="t2">基础价格为包含十分钟的起步价</view>
+				</view>
+				<!-- 右 -->
+				<view class="right">
+					<u-input v-model="form.is_phone.base_price" type="digit" :border="true" placeholder="请输入金额" />
+				</view>
+			</view>
+			<!-- 步进价格 -->
+			<view class="list">
+				<!-- 左 -->
+				<view class="left">
+					<view class="t1">步进价格<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(元/每分钟)</text></view>
+					<view class="t2">步进价格为超过起步价时长的价格</view>
+				</view>
+				<!-- 右 -->
+				<view class="right">
+					<u-input v-model="form.is_phone.step_price" type="digit" :border="true" placeholder="请输入金额" />
+				</view>
+			</view>
+			<!-- 服务时间 -->
+			<view class="list" style="margin-bottom: 20rpx;">服务时间</view>
+			<!-- 线 -->
+			<u-line color="#e7e7e7" />
+			<!-- 早上 -->
+			<view style="margin-top: 20rpx;">
+				<view>
+					<view class="flex justify-between" style="margin-bottom: 16rpx;">
+						<text>上午服务时间</text>
+
+					</view>
+					<view class="select_time" @click="selectTime(0,0)">
+						<text>{{form.is_phone.mor_time==""?"选择开始时间 - 结束时间":form.is_phone.mor_time}}</text>
+						<u-icon name="clock"></u-icon>
+					</view>
+				</view>
+			</view>
+			<!-- 下午 -->
+			<view style="margin-top: 20rpx;">
+				<view>
+					<view class="flex justify-between" style="margin-bottom: 16rpx;">
+						<text>下午服务时间</text>
+
+					</view>
+					<view class="select_time" @click="selectTime(1,0)">
+						<text>{{form.is_phone.aft_time==""?"选择开始时间 - 结束时间":form.is_phone.aft_time}}</text>
+						<u-icon name="clock"></u-icon>
+					</view>
+				</view>
+			</view>
+			<!-- 晚上 -->
+			<view style="margin-top: 20rpx;">
+				<view>
+					<view class="flex justify-between" style="margin-bottom: 16rpx;">
+						<text>晚上服务时间</text>
+
+					</view>
+					<view class="select_time" @click="selectTime(2,0)">
+						<text>{{form.is_phone.nig_time==""?"选择开始时间 - 结束时间":form.is_phone.nig_time}}</text>
+						<u-icon name="clock"></u-icon>
+					</view>
+				</view>
+			</view>
+			<!-- 服务人次 -->
+			<view class="list">
+				<!-- 左 -->
+				<view class="left">
+					<view class="t1">服务人次<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(人/每小时)</text></view>
+					<view class="t2">本项目每小时最大接收的服务人次</view>
+				</view>
+				<!-- 右 -->
+				<view class="right">
+					<u-input v-model="form.is_phone.person" type="digit" :border="true" placeholder="请输入人次" />
+				</view>
+			</view>
+
+		</view>
+		<view v-if="!showList[0].flag&&(SubsectionList[curNow].name=='电话咨询')" style="height: 50vh;">
+			<u-empty text="未开通" mode="data"></u-empty>
+		</view>
+		<view style="padding: 20rpx 26rpx 200rpx 26rpx;background-color: #f3f3f3;color:#C0C0C0" v-show="showList[0].flag&&(SubsectionList[curNow].name=='电话咨询')">
+			提示:就诊人信息用于平台审核和医疗业务使用,不会外传。请正却确填写就诊人信息,如需修改身份信息可电话联系客服修改(13330431369)
+		</view>
+
+		<!-- 图文咨询 -->
+		<view class="v" v-show="showList[1].flag&&(SubsectionList[curNow].name=='图文咨询')">
+			<!-- 标题 -->
+			<view class="title">图文咨询</view>
+			<!-- 线 -->
+			<u-line color="#e7e7e7" />
+			<!-- 基础价格 -->
+			<view class="list">
+				<!-- 左 -->
+				<view class="left">
+					<view class="t1">基础价格<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(元)</text></view>
+					<view class="t2">基础价格为包含十分钟的起步价</view>
+				</view>
+				<!-- 右 -->
+				<view class="right">
+					<u-input v-model="form.is_chat.base_price" type="digit" :border="true" placeholder="请输入金额" />
+				</view>
+			</view>
+			<!-- 服务时间 -->
+			<view class="list" style="margin-bottom: 20rpx;">服务时间</view>
+			<!-- 线 -->
+			<u-line color="#e7e7e7" />
+			<!-- 早上 -->
+			<view style="margin-top: 20rpx;">
+				<view>
+					<view class="flex justify-between" style="margin-bottom: 16rpx;">
+						<text>上午服务时间</text>
+					</view>
+					<view class="select_time" @click="selectTime(0,1)">
+						<text>{{form.is_chat.mor_time==""?"选择开始时间 - 结束时间":form.is_chat.mor_time}}</text>
+						<u-icon name="clock"></u-icon>
+					</view>
+				</view>
+			</view>
+			<!-- 下午 -->
+			<view style="margin-top: 20rpx;">
+				<view>
+					<view class="flex justify-between" style="margin-bottom: 16rpx;">
+						<text>下午服务时间</text>
+					</view>
+					<view class="select_time" @click="selectTime(1,1)">
+						<text>{{form.is_chat.aft_time==""?"选择开始时间 - 结束时间":form.is_chat.aft_time}}</text>
+						<u-icon name="clock"></u-icon>
+					</view>
+				</view>
+			</view>
+			<!-- 晚上 -->
+			<view style="margin-top: 20rpx;">
+				<view>
+					<view class="flex justify-between" style="margin-bottom: 16rpx;">
+						<text>晚上服务时间</text>
+					</view>
+					<view class="select_time" @click="selectTime(2,1)">
+						<text>{{form.is_chat.nig_time==""?"选择开始时间 - 结束时间":form.is_chat.nig_time}}</text>
+						<u-icon name="clock"></u-icon>
+					</view>
+				</view>
+			</view>
+			<!-- 服务人次 -->
+			<view class="list">
+				<!-- 左 -->
+				<view class="left">
+					<view class="t1">同时服务人次<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(人/每小时)</text></view>
+					<view class="t2">本项目每小时最大接收的服务人次</view>
+				</view>
+				<!-- 右 -->
+				<view class="right">
+					<u-input v-model="form.is_chat.person" type="digit" :border="true" placeholder="请输入人次" />
+				</view>
+			</view>
+		</view>
+		<view v-if="!showList[1].flag&&(SubsectionList[curNow].name=='图文咨询')" style="height: 50vh;">
+			<u-empty text="未开通" mode="data"></u-empty>
+		</view>
+
+		<view style="padding: 20rpx 26rpx 200rpx 26rpx;background-color: #f3f3f3;color:#C0C0C0" v-show="showList[1].flag&&(SubsectionList[curNow].name=='图文咨询')">
+			提示:就诊人信息用于平台审核和医疗业务使用,不会外传。请正却确填写就诊人信息,如需修改身份信息可电话联系客服修改(13330431369)
+		</view>
+
+		<!-- 门诊预约 -->
+		<view class="v" v-show="showList[2].flag&&(SubsectionList[curNow].name=='门诊预约')">
+			<view v-if="hospitalcurrent != -1">
+				<view>
+					<u-button @click="hospitalShow = true">{{form.is_appoint.hospitalList[hospitalcurrent].name}}</u-button>
+				</view>
+				<!-- 基础价格 -->
+				<view class="list">
+					<!-- 左 -->
+					<view class="left">
+						<view class="t1">基础价格<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(元)</text></view>
+						<view class="t2">基础价格为包含十分钟的起步价</view>
+					</view>
+					<!-- 右 -->
+					<view class="right">
+						<u-input v-model="form.is_appoint.hospitalList[hospitalcurrent].appoint_price" type="digit" :border="true" placeholder="请输入金额" />
+					</view>
+				</view>
+				<!-- 服务时间 -->
+				<view class="list" style="margin-bottom: 20rpx;">服务时间</view>
+				<!-- 线 -->
+				<u-line color="#e7e7e7" />
+				<!-- 早上 -->
+				<view style="margin-top: 20rpx;">
+					<view>
+						<view class="flex justify-between" style="margin-bottom: 16rpx;">
+							<text>上午服务时间</text>
+							<text style="color:#4CA0FC;">可预约号源: {{form.is_appoint.hospitalList[hospitalcurrent].service_time.mon.amPerson}}个</text>
+						</view>
+						<view class="select_time" @click="selectTime(0,2)">
+							<text>{{form.is_appoint.hospitalList[hospitalcurrent].service_time.mon.amStartTime==""?
+							"选择开始时间 - 结束时间":
+							form.is_appoint.hospitalList[hospitalcurrent].service_time.mon.amStartTime+" - " + form.is_appoint.hospitalList[hospitalcurrent].service_time.mon.amEndTime}}</text>
+							<u-icon name="clock"></u-icon>
+						</view>
+					</view>
+				</view>
+				<!-- 下午 -->
+				<view style="margin-top: 20rpx;">
+					<view>
+						<view class="flex justify-between" style="margin-bottom: 16rpx;">
+							<text>下午服务时间</text>
+							<text style="color:#4CA0FC;">可预约号源: {{form.is_appoint.hospitalList[hospitalcurrent].service_time.aft.pmPerson}}个</text>
+						</view>
+						<view class="select_time" @click="selectTime(1,2)">
+							<text>{{form.is_appoint.hospitalList[hospitalcurrent].service_time.aft.pmStartTime==""?
+								"选择开始时间 - 结束时间":
+								form.is_appoint.hospitalList[hospitalcurrent].service_time.aft.pmStartTime + " - " +
+								form.is_appoint.hospitalList[hospitalcurrent].service_time.aft.pmEndTime}}</text>
+							<u-icon name="clock"></u-icon>
+						</view>
+					</view>
+				</view>
+				<!-- 晚上 -->
+				<view style="margin-top: 20rpx;">
+					<view>
+						<view class="flex justify-between" style="margin-bottom: 16rpx;">
+							<text>晚上服务时间</text>
+							<text style="color:#4CA0FC;">可预约号源: {{form.is_appoint.hospitalList[hospitalcurrent].service_time.nig.nightPerson}}个</text>
+						</view>
+						<view class="select_time" @click="selectTime(2,2)">
+							<text>{{form.is_appoint.hospitalList[hospitalcurrent].service_time.nig.nightStartTime==""?
+							"选择开始时间 - 结束时间":
+							form.is_appoint.hospitalList[hospitalcurrent].service_time.nig.nightStartTime + " - " +
+							form.is_appoint.hospitalList[hospitalcurrent].service_time.nig.nightEndTime
+							}}</text>
+							<u-icon name="clock"></u-icon>
+						</view>
+					</view>
+				</view>
+				<!-- 服务时长 -->
+				<view class="list">
+					<!-- 左 -->
+					<view class="left">
+						<view class="t1">就诊时长<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(分钟)</text></view>
+						<view class="t2">修改就诊时长,不影响已预约的订单</view>
+					</view>
+					<!-- 右 -->
+					<view class="right" @click="serviceShow = true">
+						<text style="margin-right: 20rpx;color: #c1c1c1;font-size: 30rpx;">{{form.is_appoint.hospitalList[hospitalcurrent].service_times==""?"请选择":form.is_appoint.hospitalList[hospitalcurrent].service_times}}</text>
+						<u-icon :name="serviceShow?'arrow-up':'arrow-down'" size="30"></u-icon>
+					</view>
+				</view>
+				<!-- 服务订单 -->
+				<view class="list">
+					<!-- 左 -->
+					<view class="left">
+						<view class="t1">同时服务订单数<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(个)</text></view>
+						<view class="t2">同一时间可接待孩子数量</view>
+					</view>
+					<!-- 右 -->
+					<view class="right">
+						<u-input v-model="form.is_appoint.hospitalList[hospitalcurrent].service_num" type="digit" :border="true" placeholder="请输入人次" />
+					</view>
+				</view>
+				<!-- 预约天数 -->
+				<view class="list">
+					<!-- 左 -->
+					<view class="left">
+						<view class="t1">可预约天数<text style="font-size: 24rpx;color: #666666;margin-left: 10rpx;">(自然天)</text></view>
+						<view class="t2">修改预约天数,不影响已预约的订单</view>
+					</view>
+					<!-- 右 -->
+					<view class="right">
+						<u-input v-model="form.is_appoint.hospitalList[hospitalcurrent].show_days" type="digit" :border="true" placeholder="请输入人次" />
+					</view>
+				</view>
+			</view>
+			<view style="width: 100%;height: 60vh;display: flex;justify-content: center;align-items: center;" v-else>
+				<view style="width: 90%;">
+					<view style="width: 100%;text-align: center;margin-bottom: 40rpx;font-size: 40rpx;">请选择医院</view>
+					<u-button shape="circle" type="primary" @click="hospitalShow = true">请选择医院</u-button>
+				</view>
+			</view>
+		</view>
+		<view v-if="!showList[2].flag&&(SubsectionList[curNow].name=='门诊预约')" style="height: 50vh;">
+			<u-empty text="未开通" mode="data"></u-empty>
+		</view>
+		<view style="padding: 20rpx 26rpx 200rpx 26rpx;background-color: #f3f3f3;color:#C0C0C0" v-show="showList[2].flag&&(SubsectionList[curNow].name=='门诊预约')">
+			提示:就诊人信息用于平台审核和医疗业务使用,不会外传。请正却确填写就诊人信息,如需修改身份信息可电话联系客服修改(13330431369)
+		</view>
+		<view class="bottomButton" @click="bc">保存</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		onLoad(options) {
+			this.getShows();
+			this.$nextTick(function() {
+				this.addTime()
+			})
+
+		},
+		mounted() {
+
+		},
+		data() {
+			return {
+				SubsectionList: [{
+					name: '电话咨询'
+				}, {
+					name: '图文咨询'
+				}, {
+					name: '门诊预约'
+				}],
+				curNow: 0, // 控制列表显示:0=电话,1=图文,2=门诊预约
+				//控制器
+				morShow: false, //早上
+				aftShow: false, //下午
+				nigShow: false, //晚上
+				serviceShow: false, //服务时间选择
+				hospitalShow: false, //医院选择
+				//时间列表
+				list: [{
+						value: 1,
+						label: '00:30'
+					},
+					{
+						value: 2,
+						label: '01:00'
+					},
+					{
+						value: 3,
+						label: '01:30'
+					},
+					{
+						value: 4,
+						label: '02:00'
+					},
+					{
+						value: 5,
+						label: '02:30'
+					},
+					{
+						value: 6,
+						label: '03:00'
+					},
+					{
+						value: 7,
+						label: '03:30'
+					},
+					{
+						value: 8,
+						label: '04:00'
+					},
+					{
+						value: 9,
+						label: '04:30'
+					},
+					{
+						value: 10,
+						label: '05:00'
+					},
+					{
+						value: 11,
+						label: '05:30'
+					},
+					{
+						value: 12,
+						label: '06:00'
+					},
+					{
+						value: 13,
+						label: '06:30'
+					},
+					{
+						value: 14,
+						label: '07:00'
+					},
+					{
+						value: 15,
+						label: '07:30'
+					},
+					{
+						value: 16,
+						label: '08:00'
+					},
+					{
+						value: 18,
+						label: '08:30'
+					},
+					{
+						value: 19,
+						label: '09:00'
+					},
+					{
+						value: 20,
+						label: '09:30'
+					},
+					{
+						value: 21,
+						label: '10:00'
+					},
+					{
+						value: 22,
+						label: '10:30'
+					},
+					{
+						value: 23,
+						label: '11:00'
+					},
+					{
+						value: 24,
+						label: '11:30'
+					},
+					{
+						value: 25,
+						label: '12:00'
+					},
+					{
+						value: 26,
+						label: '12:30'
+					},
+					{
+						value: 27,
+						label: '13:00'
+					},
+					{
+						value: 28,
+						label: '13:30'
+					},
+					{
+						value: 29,
+						label: '14:00'
+					},
+					{
+						value: 30,
+						label: '14:30'
+					},
+					{
+						value: 31,
+						label: '15:00'
+					},
+					{
+						value: 32,
+						label: '15:30'
+					},
+					{
+						value: 33,
+						label: '16:00'
+					},
+					{
+						value: 34,
+						label: '16:30'
+					},
+					{
+						value: 35,
+						label: '17:00'
+					},
+					{
+						value: 36,
+						label: '17:30'
+					},
+					{
+						value: 37,
+						label: '18:00'
+					},
+					{
+						value: 38,
+						label: '18:30'
+					},
+					{
+						value: 39,
+						label: '19:00'
+					},
+					{
+						value: 40,
+						label: '19:30'
+					},
+					{
+						value: 41,
+						label: '20:00'
+					},
+					{
+						value: 42,
+						label: '20:30'
+					},
+					{
+						value: 43,
+						label: '21:00'
+					},
+					{
+						value: 44,
+						label: '21:30'
+					},
+					{
+						value: 45,
+						label: '22:00'
+					},
+					{
+						value: 46,
+						label: '22:30'
+					},
+					{
+						value: 47,
+						label: '23:00'
+					},
+					{
+						value: 48,
+						label: '23:30'
+					},
+					{
+						value: 49,
+						label: '24:00'
+					},
+				],
+				morList: [{
+						label: '暂不选择',
+						children: [{
+							label: '暂不选择'
+						}]
+					},
+					{
+						label: '00:00',
+						children: []
+					},
+					{
+						label: '00:30',
+						children: []
+					},
+					{
+						label: '01:00',
+						children: []
+					},
+					{
+						label: '01:30',
+						children: []
+					},
+					{
+						label: '02:00',
+						children: []
+					},
+					{
+						label: '02:30',
+						children: []
+					},
+					{
+						label: '03:00',
+						children: []
+					},
+					{
+						label: '03:30',
+						children: []
+					},
+					{
+						label: '04:00',
+						children: []
+					},
+					{
+						label: '04:30',
+						children: []
+					},
+					{
+						label: '05:00',
+						children: []
+					},
+					{
+						label: '05:30',
+						children: []
+					},
+					{
+						label: '06:00',
+						children: []
+					},
+					{
+						label: '06:30',
+						children: []
+					},
+					{
+						label: '07:00',
+						children: []
+					},
+					{
+						label: '07:30',
+						children: []
+					},
+					{
+						label: '08:00',
+						children: []
+					},
+					{
+						label: '08:30',
+						children: []
+					},
+					{
+						label: '09:00',
+						children: []
+					},
+					{
+						label: '09:30',
+						children: []
+					},
+					{
+						label: '10:00',
+						children: []
+					},
+					{
+						label: '10:30',
+						children: []
+					},
+					{
+						label: '11:00',
+						children: []
+					},
+					{
+						label: '11:30',
+						children: []
+					},
+				],
+				aftList: [{
+						label: '暂不选择',
+						children: [{
+							label: '暂不选择'
+						}]
+					},
+					{
+						label: '12:00',
+						children: []
+					},
+					{
+						label: '12:30',
+						children: []
+					},
+					{
+						label: '13:00',
+						children: []
+					},
+					{
+						label: '13:30',
+						children: []
+					},
+					{
+						label: '14:00',
+						children: []
+					},
+					{
+						label: '14:30',
+						children: []
+					},
+					{
+						label: '15:00',
+						children: []
+					},
+					{
+						label: '15:30',
+						children: []
+					},
+					{
+						label: '16:00',
+						children: []
+					},
+					{
+						label: '16:30',
+						children: []
+					},
+					{
+						label: '17:00',
+						children: []
+					},
+					{
+						label: '17:30',
+						children: []
+					},
+				],
+				nigList: [{
+						label: '暂不选择',
+						children: [{
+							label: '暂不选择'
+						}]
+					},
+					{
+						label: '18:00',
+						children: []
+					},
+					{
+						label: '18:30',
+						children: []
+					},
+					{
+						label: '19:00',
+						children: []
+					},
+					{
+						label: '19:30',
+						children: []
+					},
+					{
+						label: '20:00',
+						children: []
+					},
+					{
+						label: '20:30',
+						children: []
+					},
+					{
+						label: '21:00',
+						children: []
+					},
+					{
+						label: '21:30',
+						children: []
+					},
+					{
+						label: '22:00',
+						children: []
+					},
+					{
+						label: '22:30',
+						children: []
+					},
+					{
+						label: '23:00',
+						children: []
+					},
+					{
+						label: '23:30',
+						children: []
+					},
+					{
+						label: '24:00',
+						children: []
+					},
+				],
+				serviceTimelist: [{
+						label: '10'
+					},
+					{
+						label: '15'
+					},
+					{
+						label: '20'
+					},
+					{
+						label: '30'
+					},
+					{
+						label: '60'
+					},
+				],
+				showList: [{
+					flag: true
+				}, {
+					flag: true
+				}, {
+					flag: true
+				}, ],
+				//医院
+				hospitalTotal: 2,
+				changeOne: true,
+
+				//
+				hospitals: [],
+
+
+				//判断应该赋值的位置,每次时间选择,保存点击位置
+				timeSlot: 0, //时间段.0上午 1下午 2晚上
+				servicesType: 0, //服务种类 0电话 1图文 2门诊
+
+				/**
+				 * 暂时保存的门诊服务时间段
+				 * 切换医院清空
+				 * 选择暂不选择清空
+				 */
+				morningSlot: 0, //早上
+				afternoonSlot: 0, //下午
+				nightSlot: 0, //晚上
+
+				hospitalcurrent: -1, // 保存选中的医院下标
+				/********************保存的数据****************************/
+				form: {
+					is_phone: { //电话
+						base_price: "20", //基础价格
+						mor_time: "", //上午服务时间
+						aft_time: "", //上午服务时间
+						nig_time: "", //晚上服务时间
+						service_order: 0, //同时服务订单数
+						type: "1"
+					},
+					is_chat: { //图文
+						base_price: "20", //基础价格
+						step_price: "", //步进价格
+						mor_time: "", //上午服务时间
+						aft_time: "", //上午服务时间
+						nig_time: "", //晚上服务时间
+						service_order: 0, //同时服务订单数
+						type: "2"
+					},
+					is_appoint: { //门诊
+						type: "3",
+						hospitalList: [{
+								id: 50, //医院Id
+								name:"测试1",
+								show_days: 0, //可预约天数
+								service_times: 0, //就诊时长
+								appoint_price: "52.00", //基础价格
+								service_num:0,
+								service_time: {
+									mon: {
+										"amStartTime": "08:00", //上午服务时间
+										"amEndTime": "12:00",
+										"amPerson": 3 //上午可预约号源
+									},
+									aft: {
+										"pmStartTime": "14:00", //下午服务时间
+										"pmEndTime": "18:00",
+										"pmPerson": 5 //下午可预约号源
+									},
+									nig: {
+										"nightStartTime": "18:00", //晚上服务时间
+										"nightEndTime": "23:00",
+										"nightPerson": 4 //晚上可预约号源
+									}
+								},
+
+								// label: "",
+								// name: "测试医院6",
+								// base_price: "20", //基础价格
+								// mor_time: "", //上午服务时间
+								// mor_num: 0, //上午可预约号源
+								// aft_time: "", //下午服务时间
+								// aft_num: 0, //下午可预约号源
+								// nig_time: "", //晚上服务时间
+								// nig_num: 0, //晚上可预约号源
+								// see_doc_time: "", //就诊时长
+								// service_order: 0, //同时服务订单数
+								// appointment: 0, //可预约天数
+							},
+							{
+								id: 1, //医院Id
+								name:"测试2",
+								show_days: 0, //可预约天数
+								service_times: 0, //就诊时长
+								appoint_price: "52.00", //基础价格
+								service_num:0,
+								service_time: {
+									mon: {
+										"amStartTime": "08:00", //上午服务时间
+										"amEndTime": "12:00",
+										"amPerson": 3 //上午可预约号源
+									},
+									aft: {
+										"pmStartTime": "14:00", //下午服务时间
+										"pmEndTime": "18:00",
+										"pmPerson": 5 //下午可预约号源
+									},
+									nig: {
+										"nightStartTime": "18:00", //晚上服务时间
+										"nightEndTime": "23:00",
+										"nightPerson": 4 //晚上可预约号源
+									}
+								},
+							},
+							{
+								id: 3, //医院Id
+								name:"测试5",
+								show_days: 0, //可预约天数
+								service_times: 0, //就诊时长
+								appoint_price: "52.00", //基础价格
+								service_num:0,
+								service_time: {
+									mon: {
+										"amStartTime": "08:00", //上午服务时间
+										"amEndTime": "12:00",
+										"amPerson": 3 //上午可预约号源
+									},
+									aft: {
+										"pmStartTime": "14:00", //下午服务时间
+										"pmEndTime": "18:00",
+										"pmPerson": 5 //下午可预约号源
+									},
+									nig: {
+										"nightStartTime": "18:00", //晚上服务时间
+										"nightEndTime": "23:00",
+										"nightPerson": 4 //晚上可预约号源
+									}
+								},
+							},
+						],
+					},
+				}
+
+			}
+		},
+		methods: {
+			/**
+			 * 拿到返回值并赋值
+			 * timeSlot:0
+			 * 时间段.0上午 1下午 2晚上
+			 * servicesType:0
+			 * 服务种类 0电话 1图文 2门诊
+			 * */
+			confirm(e) {
+				if (e[0].label != '暂不选择') {
+					switch (this.timeSlot) {
+						case 0:
+							if (this.servicesType == 0) {
+								this.form.is_phone.mor_time = e[0].label + ' - ' + e[1].label //电话
+							} else if (this.servicesType == 1) {
+								this.form.is_chat.mor_time = e[0].label + ' - ' + e[1].label //图文
+							} else if (this.servicesType == 2) {
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.mon.amStartTime = e[0].label
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.mon.amEndTime = e[1].label //门诊
+								this.morningSlot = (e[1].value - e[0].value) * 30
+							}
+							break;
+						case 1:
+							if (this.servicesType == 0) {
+								this.form.is_phone.aft_time = e[0].label + ' - ' + e[1].label //电话
+							} else if (this.servicesType == 1) {
+								this.form.is_chat.aft_time = e[0].label + ' - ' + e[1].label //图文
+							} else if (this.servicesType == 2) {
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.aft.pmStartTime = e[0].label
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.aft.pmEndTime = e[1].label //门诊
+								this.afternoonSlot = (e[1].value - e[0].value) * 30
+							}
+							break;
+						case 2:
+							if (this.servicesType == 0) {
+								this.form.is_phone.nig_time = e[0].label + ' - ' + e[1].label //电话
+							} else if (this.servicesType == 1) {
+								this.form.is_chat.nig_time = e[0].label + ' - ' + e[1].label //图文
+							} else if (this.servicesType == 2) {
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.nig.nightStartTime = e[0].label
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.nig.nightEndTime = e[1].label //门诊
+								this.nightSlot = (e[1].value - e[0].value) * 30
+							}
+							break;
+						default:
+					}
+				} else { //选择了暂不选择,清空
+					switch (this.timeSlot) {
+						case 0: //早上
+							if (this.servicesType == 0) {
+								this.form.is_phone.mor_time = "" //电话
+							} else if (this.servicesType == 1) {
+								this.form.is_chat.mor_time = "" //图文
+							} else if (this.servicesType == 2) {
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.mon.amStartTime = ""
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.mon.amEndTime = "" //门诊
+								this.morningSlot = 0
+							}
+							break;
+						case 1: //下午
+							if (this.servicesType == 0) {
+								this.form.is_phone.aft_time = "" //电话
+							} else if (this.servicesType == 1) {
+								this.form.is_chat.aft_time = "" //图文
+							} else if (this.servicesType == 2) {
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.aft.pmStartTime = ""
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.aft.pmEndTime = "" //门诊
+								this.afternoonSlot = 0
+							}
+							break;
+						case 2: //晚上
+							if (this.servicesType == 0) {
+								this.form.is_phone.nig_time = "" //电话
+							} else if (this.servicesType == 1) {
+								this.form.is_chat.nig_time = "" //图文
+							} else if (this.servicesType == 2) {
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.nig.nightStartTime = ""
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.nig.nightEndTime = "" //门诊
+								this.nightSlot = 0
+							}
+							break;
+						default:
+					}
+				}
+				// 在这里计算号源 通过value相减得到时间段值
+				//在门诊页面选择 并 选择了时间
+				if (this.servicesType == 2 && e[0].label != '暂不选择') {
+					if (this.form.is_appoint.hospitalList[this.hospitalcurrent].service_times != "") { //选择了就诊时长
+						let time = parseInt((e[1].value - e[0].value) * 30 / this.form.is_appoint.hospitalList[this.hospitalcurrent].service_times)
+						console.log(time)
+						switch (this.timeSlot) {
+							case 0:
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.mon.amPerson = time
+								break;
+							case 1:
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.aft.pmPerson = time
+								break;
+							case 2:
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.nig.nightPerson = time
+								break;
+
+						}
+					} else { //没有选择就诊时长
+						let time = (e[1].value - e[0].value) * 30
+						switch (this.timeSlot) {
+							case 0:
+								this.morningSlot = time
+								break;
+							case 1:
+								this.afternoonSlot = time
+								break;
+							case 2:
+								this.nightSlot = time
+								break;
+						}
+					}
+				}
+				console.log(this.form)
+			},
+
+			/**
+			 * 给所有时间段数组赋值
+			 * */
+			addTime() {
+				// 早上
+				for (let a = 1; a < this.morList.length; a++) { //从1开始,避开暂不选择
+					this.morList[a].children = this.list.slice(a - 1, 24)
+					this.morList[a].value = a - 1;
+				}
+				//下午
+				for (let a = 1; a < this.aftList.length; a++) { //从1开始,避开暂不选择
+					this.aftList[a].children = this.list.slice(23 + a, 36)
+					this.aftList[a].value = 24 + a;
+				}
+				//晚上
+				for (let a = 1; a < this.nigList.length; a++) { //从1开始,避开暂不选择
+					this.nigList[a].children = this.list.slice(35 + a)
+					this.nigList[a].value = 36 + a;
+				}
+				console.log("早上", this.morList)
+				console.log("下午", this.aftList)
+				console.log("晚上", this.nigList)
+			},
+
+			/**
+			 * 选择时间
+			 * timeSlot		选择的时间段
+			 * servicesType	选择的服务
+			 * */
+			selectTime(timeSlot, servicesType) {
+				//保存位置
+				this.timeSlot = timeSlot;
+				this.servicesType = servicesType;
+				//显示选择器
+				switch (timeSlot) {
+					case 0:
+						this.morShow = true;
+						break;
+					case 1:
+						this.aftShow = true;
+						break;
+					case 2:
+						this.nigShow = true;
+						break;
+				}
+			},
+
+			/**
+			 * 选择就诊时长
+			 */
+			selectService(e) {
+				console.log("早上时间,单位分钟", this.morningSlot)
+				console.log("下午时间", this.afternoonSlot)
+				console.log("晚上时间", this.nightSlot)
+				this.form.is_appoint.hospitalList[this.hospitalcurrent].service_times = e[0].label
+				if (this.morningSlot != 0) {
+					this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.mon.amPerson = parseInt(this.morningSlot / e[0].label)
+				}
+				if (this.afternoonSlot != 0) {
+					this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.aft.pmPerson = parseInt(this.afternoonSlot / e[0].label)
+				}
+				if (this.nightSlot != 0) {
+					this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.nig.nightPerson = parseInt(this.nightSlot / e[0].label)
+				}
+			},
+
+			/**
+			 * 选择医院
+			 */
+			selectHospital(e) {
+
+				for(let a = 0;a<this.form.is_appoint.hospitalList.length;a++){
+					if(e[0].value == this.form.is_appoint.hospitalList[a].id){
+						this.hospitalcurrent = a
+					}
+				}
+				
+				console.log(this.hospitalcurrent)
+
+				//清空暂存数据
+				// this.morningSlot = 0 //早上
+				// this.afternoonSlot = 0 //下午
+				// this.nightSlot = 0 //晚上
+			},
+
+			/*    分段器选择  */
+			sectionChange(index) {
+				this.curNow = index;
+			},
+			/*    保存       */
+			bc: async function(e) {
+				let that = this;
+				/**
+				 * 电话
+				 * */
+				// that.form.is_phone.service_time = '';
+				// that.form.is_chat.service_time = '';
+				// that.form.is_appoint.hospitals[0].service_time = '';
+				// that.form.is_appoint.hospitals[1].service_time = '';
+				// for (let i in that.dh.timeList1) { //遍历选中 保存id
+				// 	if (that.dh.timeList1[i].checked) {
+				// 		that.form.is_phone.service_time = that.form.is_phone.service_time + "," + that.dh.timeList1[i].id
+				// 	}
+				// }
+				// for (let i in that.dh.timeList2) { //遍历选中 保存id
+				// 	if (that.dh.timeList2[i].checked) {
+				// 		that.form.is_phone.service_time = that.form.is_phone.service_time + "," + that.dh.timeList2[i].id
+				// 	}
+				// }
+				// for (let i in that.dh.timeList3) { //遍历选中 保存id
+				// 	if (that.dh.timeList3[i].checked) {
+				// 		that.form.is_phone.service_time = that.form.is_phone.service_time + "," + that.dh.timeList3[i].id
+				// 	}
+				// }
+				// //判断开头第一个是否为逗号,是就删除逗号
+				// if (that.form.is_phone.service_time.startsWith(",")) {
+				// 	that.form.is_phone.service_time = that.form.is_phone.service_time.substr(1);
+				// }
+				// /**
+				//  * 图文
+				//  * */
+
+				// for (let i in that.tw.timeList1) { //遍历选中 保存id
+				// 	if (that.tw.timeList1[i].checked) {
+				// 		that.form.is_chat.service_time = that.form.is_chat.service_time + "," + that.tw.timeList1[i].id
+				// 	}
+				// }
+				// for (let i in that.tw.timeList2) { //遍历选中 保存id
+				// 	if (that.tw.timeList2[i].checked) {
+				// 		that.form.is_chat.service_time = that.form.is_chat.service_time + "," + that.tw.timeList2[i].id
+				// 	}
+				// }
+				// for (let i in that.tw.timeList3) { //遍历选中 保存id
+				// 	if (that.tw.timeList3[i].checked) {
+				// 		that.form.is_chat.service_time = that.form.is_chat.service_time + "," + that.tw.timeList3[i].id
+				// 	}
+				// }
+				// //判断开头第一个是否为逗号,是就删除逗号
+				// if (that.form.is_chat.service_time.startsWith(",")) {
+
+				// 	that.form.is_chat.service_time = that.form.is_chat.service_time.substr(1);
+				// }
+				// /**
+				//  * 门诊
+				//  * */
+				// for (let i in that.mz1.timeList1) { //遍历选中 保存id
+				// 	if (that.mz1.timeList1[i].checked) {
+				// 		that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time + "," + that.mz1
+				// 			.timeList1[i].id
+				// 	}
+				// }
+				// for (let i in that.mz1.timeList2) { //遍历选中 保存id
+				// 	if (that.mz1.timeList2[i].checked) {
+				// 		that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time + "," + that.mz1
+				// 			.timeList2[i].id
+				// 	}
+				// }
+				// for (let i in that.mz1.timeList3) { //遍历选中 保存id
+				// 	if (that.mz1.timeList3[i].checked) {
+				// 		that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time + "," + that.mz1
+				// 			.timeList3[i].id
+				// 	}
+				// }
+				// //判断开头第一个是否为逗号,是就删除逗号
+				// if (that.form.is_appoint.hospitals[0].service_time.startsWith(",")) {
+
+				// 	that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time.substr(1);
+				// }
+				// /**
+				//  * 门诊
+				//  * */
+				// for (let i in that.mz2.timeList1) { //遍历选中 保存id
+				// 	if (that.mz2.timeList1[i].checked) {
+				// 		that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time + "," + that.mz2
+				// 			.timeList1[i].id
+				// 	}
+				// }
+				// for (let i in that.mz2.timeList2) { //遍历选中 保存id
+				// 	if (that.mz2.timeList2[i].checked) {
+				// 		that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time + "," + that.mz2
+				// 			.timeList2[i].id
+				// 	}
+				// }
+				// for (let i in that.mz2.timeList3) { //遍历选中 保存id
+				// 	if (that.mz2.timeList3[i].checked) {
+				// 		that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time + "," + that.mz2
+				// 			.timeList3[i].id
+				// 	}
+				// }
+				// //判断开头第一个是否为逗号,是就删除逗号
+				// if (that.form.is_appoint.hospitals[1].service_time.startsWith(",")) {
+				// 	that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time.substr(1);
+				// }
+
+
+
 				var forms = JSON.parse(JSON.stringify(that.form));
-				if (typeof forms != 'string') {
-					forms = JSON.stringify(forms)
-				}
-
-
-				console.log('我是form', that.form)
-				console.log('我是formzifuc', forms)
-				let res = await that.$request.post('doctor/saveSettingList', {
-					data: forms,
-					type: 2
-				});
-				if (res.status == 0) {
-					uni.showToast({
-						icon: 'none',
-						duration: 3000,
-						title: '操作成功',
-
-					})
+				let phone_am = forms.is_phone.mor_time!=''?forms.is_phone.mor_time.split(' - '):'';
+				let phone_pm = forms.is_phone.aft_time!=''?forms.is_phone.aft_time.split(' - '):'';
+			    let phone_ni = forms.is_phone.nig_time!=''?forms.is_phone.nig_time.split(' - '):'';  
+				forms.is_phone.amStartTime = phone_am!=''?phone_am[0]:'';
+				forms.is_phone.amEndTime = phone_am!=''?phone_am[1]:'';
+				forms.is_phone.pmStartTime = phone_pm!=''?phone_pm[0]:'';
+				forms.is_phone.pmEndTime = phone_pm!=''?phone_pm[1]:'';
+				forms.is_phone.nightStartTime = phone_ni!=''?phone_ni[0]:'';
+				forms.is_phone.nightEndTime = phone_ni!=''?phone_ni[1]:'';
+				
+				
+				let chat_am = forms.is_chat.mor_time!=''?forms.is_chat.mor_time.split(' - '):'';
+				let chat_pm = forms.is_chat.aft_time!=''?forms.is_chat.aft_time.split(' - '):'';
+				let chat_ni = forms.is_chat.nig_time!=''?forms.is_chat.nig_time.split(' - '):'';  
+				forms.is_chat.amStartTime = chat_am!=''?chat_am[0]:'';
+				forms.is_chat.amEndTime = chat_am!=''?chat_am[1]:'';
+				forms.is_chat.pmStartTime = chat_pm!=''?chat_pm[0]:'';
+				forms.is_chat.pmEndTime = chat_pm!=''?chat_pm[1]:'';
+				forms.is_chat.nightStartTime = chat_ni!=''?chat_ni[0]:'';
+				forms.is_chat.nightEndTime = chat_ni!=''?chat_ni[1]:'';
+				
+				let newMenList=[];
+				for(let i=0;i<forms.is_appoint.hospitalList.length;i++){
+					newMenList.push(
+					 { 
+						"base_price":forms.is_appoint.hospitalList[i].appoint_price,
+						"service_times":forms.is_appoint.hospitalList[i].service_times,
+						"service_num":forms.is_appoint.hospitalList[i].service_num,
+						"amStartTime":forms.is_appoint.hospitalList[i].service_time.mon.amStartTime,
+						"amEndTime":forms.is_appoint.hospitalList[i].service_time.mon.amEndTime,
+						"amPerson":forms.is_appoint.hospitalList[i].service_time.mon.amPerson,
+						"pmStartTime":forms.is_appoint.hospitalList[i].service_time.aft.pmStartTime,
+						"pmEndTime":forms.is_appoint.hospitalList[i].service_time.aft.pmEndTime,
+						"pmPerson":forms.is_appoint.hospitalList[i].service_time.aft.pmPerson,
+						"nightStartTime":forms.is_appoint.hospitalList[i].service_time.nig.nightStartTime,
+						"nightEndTime":forms.is_appoint.hospitalList[i].service_time.nig.nightEndTime,
+						"nightPerson":forms.is_appoint.hospitalList[i].service_time.nig.nightPerson,
+						"show_days":forms.is_appoint.hospitalList[i].show_days,
+						"org_id":forms.is_appoint.hospitalList[i].id,
+					 }
+					)
 				}
-				console.log('res对象:', res);
-				// 延迟2秒
-				setTimeout(function() {
-					uni.switchTab({
-						url: '../index/index'
-					})
-				}, 2000);
-
-			},
-			/**
-			 * @author Liu Yuanhang
-			 * 获取页面显示状态以及数据
-			 */
-			getShows: async function() {
-				let res = await this.$request.post('doctor/getSettingList', {
-					'type': 2
+				forms.is_appoint=newMenList;
+				if (typeof forms != 'string') {
+					forms = JSON.stringify(forms)
+				}
+				let res = await that.$request.post('doctor/saveSettingList', {
+					data: forms,
+					type: 2
 				});
-				if (res.status == 0) {
-					// 1.控制列表显示,2.渲染数据
-					//ltb 分段器赋值
-					this.showList[0].flag = res.data.show.is_phone;
-					this.showList[1].flag = res.data.show.is_chat;
-					this.showList[2].flag = res.data.show.is_appoint;
-					// 获取医院
-					if (res.data.org.length != 0) {
-						if (res.data.orgs.length == 1) {
-							this.hospitalTotal = 1
-							this.form.is_appoint.hospitals[0].relation_id = res.data.orgs[0].id
-							this.hospitalOne = res.data.org[0].name
-						} else if (res.data.orgs.length == 2) {
-							this.hospitalTotal = 2
-							this.form.is_appoint.hospitals[0].relation_id = res.data.orgs[0].id
-							this.form.is_appoint.hospitals[1].relation_id = res.data.orgs[1].id
-							this.hospitalOne = res.data.org[0].name
-							this.hospitalTow = res.data.org[1].name
-						} else {
-							uni.showToast({
-								icon: 'none',
-								title: '医院不存在'
-							})
-						}
-
-
-					}
-
-
-					// 渲染显示的基础价格设置
-					this.form.is_phone.person = '';
-					this.form.is_chat.person = '';
-					this.form.is_appoint.person = '';
-
-					if (res.data.list.phone.length != 0) {
-						// 渲染电话的基础数据
-						this.form.is_phone.base_price = res.data.list.phone.base_price;
-						this.form.is_phone.step_price = res.data.list.phone.step_price;
-						this.form.is_phone.person = res.data.list.phone.person;
-					}
-
-					if (res.data.list.chat.length != 0) {
-						// 渲染图文的基础数据
-						this.form.is_chat.base_price = res.data.list.chat.base_price;
-						this.form.is_chat.step_price = res.data.list.chat.step_price;
-						this.form.is_chat.person = res.data.list.chat.person;
-					}
-
+				
+				if (res.status == 0) {
+					uni.showToast({
+						icon: 'none',
+						duration: 3000,
+						title: '操作成功',
+
+					})
+				}
+				console.log('res对象:', res);
+				// 延迟2秒
+				setTimeout(function() {
+					uni.switchTab({
+						url: '../index/index'
+					})
+				}, 2000);
+
+			},
+			/**
+			 * @author Liu Yuanhang
+			 * 获取页面显示状态以及数据
+			 */
+			getShows: async function() {
+				let res = await this.$request.post('doctor/getSettingListnew', {
+					'type': 2
+				});
+				console.log("res", res);
+				if (res.status == 0) {
+					// 1.控制列表显示,2.渲染数据
+					//ltb 分段器赋值
+					this.showList[0].flag = res.data.show.is_phone;
+					this.showList[1].flag = res.data.show.is_chat;
+					this.showList[2].flag = res.data.show.is_appoint;
+
+
+
+
+
+					// 渲染显示的基础价格设置
+					this.form.is_phone.person = '';
+					this.form.is_chat.person = '';
+					this.form.is_appoint.person = '';
+
+					if (res.data.list.phone.length != 0) {
+						// 渲染电话的基础数据
+						this.form.is_phone.base_price = res.data.list.phone.base_price;
+						this.form.is_phone.step_price = res.data.list.phone.step_price;
+
+						this.form.is_phone.mor_time = res.data.list.phone.service_time[1] != undefined ? res.data.list.phone.service_time[
+							1].amStartTime + ' - ' + res.data.list.phone.service_time[1].amEndTime : '';
+						this.form.is_phone.aft_time = res.data.list.phone.service_time[2] != undefined ? res.data.list.phone.service_time[
+							2].pmStartTime + ' - ' + res.data.list.phone.service_time[2].pmEndTime : '';
+						this.form.is_phone.nig_time = res.data.list.phone.service_time[3] != undefined ? res.data.list.phone.service_time[
+							3].nightStartTime + ' - ' + res.data.list.phone.service_time[3].nightEndTime : '';
+
+						this.form.is_phone.person = res.data.list.phone.person;
+					}
+
+					if (res.data.list.chat.length != 0) {
+						// 渲染图文的基础数据
+						this.form.is_chat.base_price = res.data.list.chat.base_price;
+						this.form.is_chat.step_price = res.data.list.chat.step_price;
+						this.form.is_chat.person = res.data.list.chat.person;
+
+						this.form.is_chat.mor_time = res.data.list.chat.service_time[1] != undefined ? res.data.list.chat.service_time[1]
+							.amStartTime + ' - ' + res.data.list.chat.service_time[1].amEndTime : '';
+						this.form.is_chat.aft_time = res.data.list.chat.service_time[2] != undefined ? res.data.list.chat.service_time[2]
+							.pmStartTime + ' - ' + res.data.list.chat.service_time[2].pmEndTime : '';
+						this.form.is_chat.nig_time = res.data.list.chat.service_time[3] != undefined ? res.data.list.chat.service_time[3]
+							.nightStartTime + ' - ' + res.data.list.chat.service_time[3].nightEndTime : '';
+
+					}
+					
 					if (res.data.list.men.length != 0) {
-						// 渲染门诊预约的基础数据
-						this.form.is_appoint.base_price = res.data.list.men[0].base_price;
-						this.form.is_appoint.step_price = res.data.list.men[0].step_price;
-						this.form.is_appoint.person = res.data.list.men[0].person;
-					}
-
-					/* 渲染时间 */
-					//电话的时间
-					console.log(res.data.times)
-					let dhtime = JSON.parse(JSON.stringify(res.data.times))
-					this.dh.timeList1 = dhtime.list1;
-					this.dh.timeList2 = dhtime.list2;
-					this.dh.timeList3 = dhtime.list3;
-
-					//图文的时间
-					let twtime = JSON.parse(JSON.stringify(res.data.times))
-					this.tw.timeList1 = twtime.list1;
-					this.tw.timeList2 = twtime.list2;
-					this.tw.timeList3 = twtime.list3;
-
-					// 门诊时间
-					let mz1 = JSON.parse(JSON.stringify(res.data.times))
-					this.mz1.timeList1 = mz1.list1;
-					this.mz1.timeList2 = mz1.list2;
-					this.mz1.timeList3 = mz1.list3;
-
-					let mz2 = JSON.parse(JSON.stringify(res.data.times))
-					this.mz2.timeList1 = mz2.list1;
-					this.mz2.timeList2 = mz2.list2;
-					this.mz2.timeList3 = mz2.list3;
-				}
-				this.reanders(res.data);
-			},
-			/**
-			 * 渲染选中数据
-			 * @author Liu Yuan hang
-			 * @param {Object} e
-			 */
-			reanders(e) {
-				uni.showLoading({
-					title: '渲染中',
-					mask: true
-				});
-				let oks, dh1, dh2, dh3, tw1, tw2, tw3;
-
-				// 电话
-				if (e.list.phone.length != 0) {
-					dh1 = this.dh.timeList1;
-					dh2 = this.dh.timeList2;
-					dh3 = this.dh.timeList3;
-					let phone = e.list.phone.service_time.split(',');
-					var phones = []; //保存转换后的整型字符串
-					phone.forEach(function(data, index, arr) {
-						phones.push(+data);
-					});
-					console.log('我是电话', phones)
-
-					for (let i = 0; i < dh1.length; i++) {
-						if (phones.indexOf(dh1[i].id) != -1) {
-							dh1[i].checked = true
-						}
-					}
-
-					for (let i = 0; i < dh2.length; i++) {
-						if (phones.indexOf(dh2[i].id) != -1) {
-							dh2[i].checked = true
-						}
-					}
-
-					for (let i = 0; i < dh3.length; i++) {
-						if (phones.indexOf(dh3[i].id) != -1) {
-							dh3[i].checked = true
-						}
-					}
-				}
-
-				// 图文资讯渲染
-				if (e.list.chat.length != 0) {
-					tw1 = this.tw.timeList1;
-					tw2 = this.tw.timeList2;
-					tw3 = this.tw.timeList3;
-					let chats = e.list.chat.service_time.split(',');
-					var chat = []; //保存转换后的整型字符串
-					chats.forEach(function(data, index, arr) {
-						chat.push(+data);
-					});
-					console.log('我是图文', chat)
-					for (let i = 0; i < tw1.length; i++) {
-						if (chat.indexOf(tw1[i].id) != -1) {
-							tw1[i].checked = true
-						}
-					}
-					for (let i = 0; i < tw2.length; i++) {
-						if (chat.indexOf(tw2[i].id) != -1) {
-							tw2[i].checked = true
-						}
-					}
-					for (let i = 0; i < tw3.length; i++) {
-						if (chat.indexOf(tw3[i].id) != -1) {
-							tw3[i].checked = true
-						}
-					}
-				}
-
-				let mzCont = e.list.men.length;
-				if (mzCont > 0) {
-
-					let men = e.list.men;
-					let men1 = e.list.men[0].service_time.split(',');
-					let men2 = e.list.men[1].service_time.split(',');
-					this.form.is_appoint.hospitals[0].relation_id = e.list.men[0].relation_id
-					this.form.is_appoint.hospitals[1].relation_id = e.list.men[1].relation_id
-					var men1s = []; //保存转换后的整型字符串
-					var men2s = []; //保存转换后的整型字符串
-					men1.forEach(function(data, index, arr) {
-						men1s.push(+data);
-					});
-					men2.forEach(function(data, index, arr) {
-						men2s.push(+data);
-					});
-
-					let p = 0;
-					var names = '';
-					if (mzCont == 1) {
-						for (let k = 0; k < this.mz1.timeList1.length; k++) {
-							if (men1s.indexOf(this.mz1.timeList1[k].id) != -1) {
-								this.mz1.timeList1[k].checked = true
-							}
-						}
-						for (let k = 0; k < this.mz1.timeList2.length; k++) {
-							if (men1s.indexOf(this.mz1.timeList2[k].id) != -1) {
-								this.mz1.timeList2[k].checked = true
-							}
-						}
-						for (let k = 0; k < this.mz1.timeList3.length; k++) {
-							if (men1s.indexOf(this.mz1.timeList3[k].id) != -1) {
-								this.mz1.timeList3[k].checked = true
-							}
-						}
-					} else if (mzCont == 2) {
-						for (let k = 0; k < this.mz1.timeList1.length; k++) {
-							if (men1s.indexOf(this.mz1.timeList1[k].id) != -1) {
-								this.mz1.timeList1[k].checked = true
-							}
-						}
-						for (let k = 0; k < this.mz1.timeList2.length; k++) {
-							if (men1s.indexOf(this.mz1.timeList2[k].id) != -1) {
-								this.mz1.timeList2[k].checked = true
-							}
-						}
-						for (let k = 0; k < this.mz1.timeList3.length; k++) {
-							if (men1s.indexOf(this.mz1.timeList3[k].id) != -1) {
-								this.mz1.timeList3[k].checked = true
-							}
-						}
-
-						for (let k = 0; k < this.mz2.timeList1.length; k++) {
-							if (men2s.indexOf(this.mz2.timeList1[k].id) != -1) {
-								this.mz2.timeList1[k].checked = true
-							}
-						}
-						for (let k = 0; k < this.mz2.timeList2.length; k++) {
-							if (men2s.indexOf(this.mz2.timeList2[k].id) != -1) {
-								this.mz2.timeList2[k].checked = true
-							}
-						}
-						for (let k = 0; k < this.mz2.timeList3.length; k++) {
-							if (men2s.indexOf(this.mz2.timeList3[k].id) != -1) {
-								this.mz2.timeList3[k].checked = true
-							}
-						}
-					}
-				}
-				console.log(e.list);
-				uni.hideLoading();
-			},
-			dhchange(index) {
-				this.dhcurrent = index
-			},
-			twchange(index) {
-				this.twcurrent = index
-			},
-			mzchange1(index) {
-				this.mzcurrent1 = index
-			},
-			mzchange2(index) {
-				this.mzcurrent2 = index
-			},
-
-			change(index) {
-				console.log('点击了', index == true)
-				switch (index) {
-					case 1:
-						if (this.all1[0].checked == true) {
-							this.dh.timeList1.map(val => {
-								val.checked = true;
-							})
-						} else {
-							this.dh.timeList1.map(val => {
-								val.checked = false;
-							})
-						}
-						break;
-					case 2:
-						if (this.all2[0].checked == true) {
-							this.dh.timeList2.map(val => {
-								val.checked = true;
-							})
-						} else {
-							this.dh.timeList2.map(val => {
-								val.checked = false;
-							})
-						}
-						break;
-					case 3:
-						if (this.all3[0].checked == true) {
-							this.dh.timeList3.map(val => {
-								val.checked = true;
-							})
-						} else {
-							this.dh.timeList3.map(val => {
-								val.checked = false;
-							})
-						}
-						break;
-					case 4:
-						if (this.all4[0].checked == true) {
-							this.tw.timeList1.map(val => {
-								val.checked = true;
-							})
-						} else {
-							this.tw.timeList1.map(val => {
-								val.checked = false;
-							})
-						}
-						break;
-					case 5:
-						if (this.all5[0].checked == true) {
-							this.tw.timeList2.map(val => {
-								val.checked = true;
-							})
-						} else {
-							this.tw.timeList2.map(val => {
-								val.checked = false;
-							})
-						}
-						break;
-					case 6:
-						if (this.all6[0].checked == true) {
-							this.tw.timeList3.map(val => {
-								val.checked = true;
+						let dataList = res.data.list.men;
+						let lists = [];
+						for(let i=0;i<dataList.length;i++){
+							lists.push({
+								id: dataList[i].org_id, //医院Id
+								name:dataList[i].org_name,
+								show_days: dataList[i].show_days, //可预约天数
+								service_times: dataList[i].service_times, //就诊时长
+								appoint_price: dataList[i].appoint_price, //基础价格
+								service_num:dataList[i].service_num,
+								service_time: {
+									mon: {
+										"amStartTime": dataList[i].service_time[1].amStartTime, //上午服务时间
+										"amEndTime": dataList[i].service_time[1].amEndTime,
+										"amPerson": dataList[i].service_time[1].amPerson //上午可预约号源
+									},
+									aft: {
+										"pmStartTime": dataList[i].service_time[2].pmStartTime, //下午服务时间
+										"pmEndTime": dataList[i].service_time[2].pmEndTime,
+										"pmPerson": dataList[i].service_time[2].pmPerson, //下午可预约号源
+									},
+									nig: {
+										"nightStartTime": dataList[i].service_time[3].nightStartTime, //晚上服务时间
+										"nightEndTime": dataList[i].service_time[3].nightEndTime,
+										"nightPerson": dataList[i].service_time[3].nightPerson //晚上可预约号源
+									}
+								},	
 							})
-						} else {
-							this.tw.timeList3.map(val => {
-								val.checked = false;
-							})
-						}
-						break;
-					case 7:
-						if (this.all7[0].checked == true) {
-							this.mz1.timeList1.map(val => {
-								val.checked = true;
-							})
-						} else {
-							this.mz1.timeList1.map(val => {
-								val.checked = false;
-							})
-						}
-						break;
-					case 8:
-						if (this.all8[0].checked == true) {
-							this.mz1.timeList2.map(val => {
-								val.checked = true;
-							})
-						} else {
-							this.mz1.timeList2.map(val => {
-								val.checked = false;
-							})
-						}
-						break;
-					case 9:
-						if (this.all9[0].checked == true) {
-							this.mz1.timeList3.map(val => {
-								val.checked = true;
-							})
-						} else {
-							this.mz1.timeList3.map(val => {
-								val.checked = false;
-							})
-						}
-						break;
-					case 10:
-						if (this.all10[0].checked == true) {
-							this.mz2.timeList1.map(val => {
-								val.checked = true;
-							})
-						} else {
-							this.mz2.timeList1.map(val => {
-								val.checked = false;
-							})
-						}
-						break;
-					case 11:
-						if (this.all11[0].checked == true) {
-							this.mz2.timeList2.map(val => {
-								val.checked = true;
-							})
-						} else {
-							this.mz2.timeList2.map(val => {
-								val.checked = false;
-							})
-						}
-						break;
-					case 12:
-						if (this.all12[0].checked == true) {
-							this.mz2.timeList3.map(val => {
-								val.checked = true;
-							})
-						} else {
-							this.mz2.timeList3.map(val => {
-								val.checked = false;
-							})
-						}
-						break;
-					default:
-				}
-			},
-			hosone() {
-				this.hospitalcurrent = 0
-				this.changeOne = true
-
-			},
-			hostow() {
-				this.hospitalcurrent = 1
-				this.changeOne = false
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	.v {
-		padding: 28rpx 28rpx 40rpx 28rpx;
-		background-color: #FFFFFF;
-
-		.title {
-			font-size: 30rpx;
-			font-weight: bold;
-			margin-bottom: 28rpx
-		}
-
-		.list {
-			margin-top: 40rpx;
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-
-			.left {
-
-				.t1 {
-					font-size: 28rpx;
-					margin-bottom: 14rpx;
-				}
-
-				.t2 {
-					font-size: 22rpx;
-					color: #999999;
-				}
-			}
-
-			.right {}
-		}
-	}
-
-	.btnAll {
-		display: flex;
-		margin-bottom: 28rpx;
-
-	}
-
-	.but {
-		margin-bottom: 28rpx;
-		width: 55%;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.bottomButton {
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		width: 100%;
-		height: 100rpx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		background-color: #0B73B9;
-		color: #FFFFFF;
-		z-index: 99;
-	}
-
-	.total {
-		height: 80rpx;
-		border-radius: 10rpx;
-		background-color: #eeeeef;
-		padding: 10rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-	}
-
-	//模拟分段器
-	.front {
-		height: 100%;
-		flex-grow: 1;
-		background-color: #FFF;
-		border-radius: 10rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		font-weight: bold;
-		font-size: 30rpx;
-	}
-
-	.back {
-		height: 100%;
-		flex-grow: 1;
-		background-color: #FFF;
-		border-radius: 10rpx;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		font-size: 30rpx;
-		background-color: #eeeeef;
-	}
-
-	.select_time {
-		display: flex;
-		justify-content: space-between;
-		border: 1rpx solid #dbdbdb;
-		border-radius: 10rpx;
-		padding: 14rpx 30rpx;
-		color: #cfcfcf;
-	}
+						}	
+						this.form.is_appoint.hospitalList = lists;
+					}
+					/* 渲染时间 */
+					//电话的时间
+					// console.log(res.data.times)
+					// let dhtime = JSON.parse(JSON.stringify(res.data.times))
+					// this.dh.timeList1 = dhtime.list1;
+					// this.dh.timeList2 = dhtime.list2;
+					// this.dh.timeList3 = dhtime.list3;
+
+					// //图文的时间
+					// let twtime = JSON.parse(JSON.stringify(res.data.times))
+					// this.tw.timeList1 = twtime.list1;
+					// this.tw.timeList2 = twtime.list2;
+					// this.tw.timeList3 = twtime.list3;
+
+					// // 门诊时间
+					// let mz1 = JSON.parse(JSON.stringify(res.data.times))
+					// this.mz1.timeList1 = mz1.list1;
+					// this.mz1.timeList2 = mz1.list2;
+					// this.mz1.timeList3 = mz1.list3;
+
+					// let mz2 = JSON.parse(JSON.stringify(res.data.times))
+					// this.mz2.timeList1 = mz2.list1;
+					// this.mz2.timeList2 = mz2.list2;
+					// this.mz2.timeList3 = mz2.list3;
+				}
+				// this.reanders(res.data);
+			},
+			/**
+			 * 渲染选中数据
+			 * @author Liu Yuan hang
+			 * @param {Object} e
+			 */
+			reanders(e) {
+				uni.showLoading({
+					title: '渲染中',
+					mask: true
+				});
+				let oks, dh1, dh2, dh3, tw1, tw2, tw3;
+
+				// 电话
+				if (e.list.phone.length != 0) {
+					dh1 = this.dh.timeList1;
+					dh2 = this.dh.timeList2;
+					dh3 = this.dh.timeList3;
+					let phone = e.list.phone.service_time.split(',');
+					var phones = []; //保存转换后的整型字符串
+					phone.forEach(function(data, index, arr) {
+						phones.push(+data);
+					});
+					console.log('我是电话', phones)
+
+					for (let i = 0; i < dh1.length; i++) {
+						if (phones.indexOf(dh1[i].id) != -1) {
+							dh1[i].checked = true
+						}
+					}
+
+					for (let i = 0; i < dh2.length; i++) {
+						if (phones.indexOf(dh2[i].id) != -1) {
+							dh2[i].checked = true
+						}
+					}
+
+					for (let i = 0; i < dh3.length; i++) {
+						if (phones.indexOf(dh3[i].id) != -1) {
+							dh3[i].checked = true
+						}
+					}
+				}
+
+				// 图文资讯渲染
+				if (e.list.chat.length != 0) {
+					tw1 = this.tw.timeList1;
+					tw2 = this.tw.timeList2;
+					tw3 = this.tw.timeList3;
+					let chats = e.list.chat.service_time.split(',');
+					var chat = []; //保存转换后的整型字符串
+					chats.forEach(function(data, index, arr) {
+						chat.push(+data);
+					});
+					console.log('我是图文', chat)
+					for (let i = 0; i < tw1.length; i++) {
+						if (chat.indexOf(tw1[i].id) != -1) {
+							tw1[i].checked = true
+						}
+					}
+					for (let i = 0; i < tw2.length; i++) {
+						if (chat.indexOf(tw2[i].id) != -1) {
+							tw2[i].checked = true
+						}
+					}
+					for (let i = 0; i < tw3.length; i++) {
+						if (chat.indexOf(tw3[i].id) != -1) {
+							tw3[i].checked = true
+						}
+					}
+				}
+
+				let mzCont = e.list.men.length;
+				if (mzCont > 0) {
+
+					let men = e.list.men;
+					let men1 = e.list.men[0].service_time.split(',');
+					let men2 = e.list.men[1].service_time.split(',');
+					this.form.is_appoint.hospitals[0].relation_id = e.list.men[0].relation_id
+					this.form.is_appoint.hospitals[1].relation_id = e.list.men[1].relation_id
+					var men1s = []; //保存转换后的整型字符串
+					var men2s = []; //保存转换后的整型字符串
+					men1.forEach(function(data, index, arr) {
+						men1s.push(+data);
+					});
+					men2.forEach(function(data, index, arr) {
+						men2s.push(+data);
+					});
+
+					let p = 0;
+					var names = '';
+					if (mzCont == 1) {
+						for (let k = 0; k < this.mz1.timeList1.length; k++) {
+							if (men1s.indexOf(this.mz1.timeList1[k].id) != -1) {
+								this.mz1.timeList1[k].checked = true
+							}
+						}
+						for (let k = 0; k < this.mz1.timeList2.length; k++) {
+							if (men1s.indexOf(this.mz1.timeList2[k].id) != -1) {
+								this.mz1.timeList2[k].checked = true
+							}
+						}
+						for (let k = 0; k < this.mz1.timeList3.length; k++) {
+							if (men1s.indexOf(this.mz1.timeList3[k].id) != -1) {
+								this.mz1.timeList3[k].checked = true
+							}
+						}
+					} else if (mzCont == 2) {
+						for (let k = 0; k < this.mz1.timeList1.length; k++) {
+							if (men1s.indexOf(this.mz1.timeList1[k].id) != -1) {
+								this.mz1.timeList1[k].checked = true
+							}
+						}
+						for (let k = 0; k < this.mz1.timeList2.length; k++) {
+							if (men1s.indexOf(this.mz1.timeList2[k].id) != -1) {
+								this.mz1.timeList2[k].checked = true
+							}
+						}
+						for (let k = 0; k < this.mz1.timeList3.length; k++) {
+							if (men1s.indexOf(this.mz1.timeList3[k].id) != -1) {
+								this.mz1.timeList3[k].checked = true
+							}
+						}
+
+						for (let k = 0; k < this.mz2.timeList1.length; k++) {
+							if (men2s.indexOf(this.mz2.timeList1[k].id) != -1) {
+								this.mz2.timeList1[k].checked = true
+							}
+						}
+						for (let k = 0; k < this.mz2.timeList2.length; k++) {
+							if (men2s.indexOf(this.mz2.timeList2[k].id) != -1) {
+								this.mz2.timeList2[k].checked = true
+							}
+						}
+						for (let k = 0; k < this.mz2.timeList3.length; k++) {
+							if (men2s.indexOf(this.mz2.timeList3[k].id) != -1) {
+								this.mz2.timeList3[k].checked = true
+							}
+						}
+					}
+				}
+				console.log(e.list);
+				uni.hideLoading();
+			},
+			dhchange(index) {
+				this.dhcurrent = index
+			},
+			twchange(index) {
+				this.twcurrent = index
+			},
+			mzchange1(index) {
+				this.mzcurrent1 = index
+			},
+			mzchange2(index) {
+				this.mzcurrent2 = index
+			},
+
+		}
+	};
+</script>
+
+<style lang="scss">
+	.v {
+		padding: 28rpx 28rpx 40rpx 28rpx;
+		background-color: #FFFFFF;
+
+		.title {
+			font-size: 30rpx;
+			font-weight: bold;
+			margin-bottom: 28rpx
+		}
+
+		.list {
+			margin-top: 40rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+
+			.left {
+
+				.t1 {
+					font-size: 28rpx;
+					margin-bottom: 14rpx;
+				}
+
+				.t2 {
+					font-size: 22rpx;
+					color: #999999;
+				}
+			}
+
+			.right {}
+		}
+	}
+
+	.btnAll {
+		display: flex;
+		margin-bottom: 28rpx;
+
+	}
+
+	.but {
+		margin-bottom: 28rpx;
+		width: 55%;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.bottomButton {
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		width: 100%;
+		height: 100rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		background-color: #0B73B9;
+		color: #FFFFFF;
+		z-index: 99;
+	}
+
+	.total {
+		height: 80rpx;
+		border-radius: 10rpx;
+		background-color: #eeeeef;
+		padding: 10rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+	}
+
+	//模拟分段器
+	.front {
+		height: 100%;
+		flex-grow: 1;
+		background-color: #FFF;
+		border-radius: 10rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		font-weight: bold;
+		font-size: 30rpx;
+	}
+
+	.back {
+		height: 100%;
+		flex-grow: 1;
+		background-color: #FFF;
+		border-radius: 10rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		font-size: 30rpx;
+		background-color: #eeeeef;
+	}
+
+	.select_time {
+		display: flex;
+		justify-content: space-between;
+		border: 1rpx solid #dbdbdb;
+		border-radius: 10rpx;
+		padding: 14rpx 30rpx;
+		color: #cfcfcf;
+	}
 </style>