Kaynağa Gözat

排班按钮修改,注册并登录跳转

渣渣宝 4 yıl önce
ebeveyn
işleme
1734d17032

+ 2 - 2
pages/conversation/conversation.vue

xqd xqd
@@ -30,7 +30,7 @@
 			<u-empty text="暂无数据" v-if="list.length<=0" mode="order" margin-top="250"></u-empty>
 		</view>
 		<!-- 这是通话记录 当值为false1时显示 -->
-		<view class="cu-list menu-avatar margin-top-xs" v-else @click="call">
+		<view class="cu-list menu-avatar margin-top-xs" v-else>
 			<view class="cu-item u-border-bottom" v-for="(item,index) in listPhone" :key="index" @click="call">
 				<view class="cu-avatar radius lg" style="background-image:url(https://ossweb-img.qq.com/images/lol/img/champion/Taric.png);border-radius: 50%;">
 					<view class="cu-tag badge"></view>
@@ -44,7 +44,7 @@
 					</view>
 				</view>
 			</view>
-			<u-empty text="暂无数据" v-if="listPhone.length<=0"" mode=" order" margin-top="250"></u-empty>
+			<u-empty text="暂无数据" v-if="listPhone.length<=0" mode="order" margin-top="250"></u-empty>
 		</view>
 
 	</view>

+ 2 - 1
pages/conversation/conversationWindow.vue

xqd xqd
@@ -89,7 +89,7 @@
 
 			this.initialListeners();
 			//每次进入聊天页面,总是滚动到底部
-			this.scrollToBottom()
+			
 			//收到的消息设置为已读
 			if (this.messages.length != 0) {
 				this.imService.markPrivateMessageAsRead(this.friend.uuid);
@@ -238,6 +238,7 @@
 						duration: 10
 					})
 				})
+				console.log("滚动")
 			},
 			sendImage() {
 				uni.chooseImage({

+ 6 - 1
pages/information/modifypassword.vue

xqd
@@ -60,8 +60,13 @@
 				}else{
 					let res = await this.$request.post('doctor/passwordEdit',{'lis':this.value1,'newpassword':this.value3});
 					if(res.status==0){
+						uni.showToast({
+						    title: "修改成功",
+						    duration: 2000,
+							icon:'none'
+						});
 						uni.switchTab({
-						url: '/pages/index/index'
+							url: '/pages/index/index'
 						})
 					}else{
 						uni.showToast({

+ 1 - 0
pages/login/login.vue

xqd
@@ -249,6 +249,7 @@
 							//连接IM
 							getApp().globalData.imService.connectIM();
 						}
+						console.log("准备跳转")
 						// 写一个跳转到首页
 						setTimeout(function() {
 							uni.navigateBack({

+ 33 - 26
pages/login/reg.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -30,7 +30,7 @@
 				<view style="margin-right: 20rpx;">
 					<u-line color="#D8D8D8" direction="col" />
 				</view>
-				<input v-model="password" placeholder="请输入密码" :password="true" style="height: 28rpx;" maxlength="6" />
+				<input v-model="password" placeholder="请输入密码" :password="true" style="height: 28rpx;" />
 			</view>
 			<!-- 再次密码 -->
 			<view style="padding-bottom: 36rpx;display: flex;border-bottom: 1rpx solid #E0E0E0;margin-bottom: 60rpx">
@@ -40,10 +40,10 @@
 				<view style="margin-right: 20rpx;">
 					<u-line color="#D8D8D8" direction="col" />
 				</view>
-				<input v-model="confirmpwd" placeholder="请再次输入密码" :password="true" style="height: 28rpx;" maxlength="6" />
+				<input v-model="confirmpwd" placeholder="请再次输入密码" :password="true" style="height: 28rpx;" />
 			</view>
 			<!-- 验证码 -->
-			<view style="padding-bottom: 36rpx;display: flex;border-bottom: 1rpx solid #E0E0E0;margin-bottom: 60rpx" >
+			<view style="padding-bottom: 36rpx;display: flex;border-bottom: 1rpx solid #E0E0E0;margin-bottom: 60rpx">
 				<!-- 图标 手机图标-->
 				<image src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/Verification.png" style="width: 32rpx;height: 32rpx;margin-right: 20rpx;"></image>
 				<!-- 线条 方向是竖-->
@@ -97,11 +97,11 @@
 				password: "", //密码
 				confirmpwd: "", //确认密码
 				verCode: "", //验证码
-				sourceVerCode:"",// 后台返回的验证码
-				isRotate:false
+				sourceVerCode: "", // 后台返回的验证码
+				isRotate: false
 			}
 		},
-		
+
 		components: {
 			wInput,
 			wButton,
@@ -126,11 +126,11 @@
 					});
 					return false;
 				}
-				console.log("手机号",_this.phoneData)
+				console.log("手机号", _this.phoneData)
 				let res = await this.$request.post("common/putverfiy", {
 					'phone': _this.phoneData
 				});
-				console.log("res.data",res.data)
+				console.log("res.data", res.data)
 				if (res.status == 0) {
 					uni.setStorageSync('verfiyCode', );
 					this.sourceVerCode = res.data
@@ -156,7 +156,7 @@
 					});
 				}
 			},
-			startReg:async function() {
+			startReg: async function() {
 				//注册
 				if (this.isRotate) {
 					//判断是否加载中,避免重复点击请求
@@ -170,7 +170,7 @@
 					});
 					return false;
 				}
-				if(this.verCode.length==0){
+				if (this.verCode.length == 0) {
 					uni.showToast({
 						icon: 'none',
 						position: 'bottom',
@@ -186,11 +186,11 @@
 					});
 					return false;
 				}
-				if (this.password.length != 6) {
+				if (this.password.length < 6) {
 					uni.showToast({
 						icon: 'none',
 						position: 'bottom',
-						title: '密码位数不低于6位'
+						title: '密码位数不低于6位'
 					});
 					return false;
 				}
@@ -202,10 +202,13 @@
 					})
 					return false
 				}
-				
-				_this.isRotate = true//开始加载动画
-				
-				let res = await this.$request.post('common/phoneRegister',{'phone':this.phoneData,'password':this.password});
+
+				_this.isRotate = true //开始加载动画
+
+				let res = await this.$request.post('common/phoneRegister', {
+					'phone': this.phoneData,
+					'password': this.password
+				});
 				if (res.status == 0) {
 					uni.showToast({
 						icon: 'none',
@@ -215,8 +218,8 @@
 					store.commit('setJwt', res.data.token);
 					store.commit('setUser', res.data);
 					store.commit('login');
-				
-					uni.removeStorage('verfiyCode')				
+					console.log(res)
+					uni.removeStorage('verfiyCode')
 					getApp().globalData.imService = new IMService();
 					let loginResult = getApp().globalData.imService.login({
 						uuid: res.data.data.flag,
@@ -227,12 +230,15 @@
 						//连接IM
 						getApp().globalData.imService.connectIM();
 					}
+					console.log("准备跳转")
 					// 写一个跳转到首页
-					setTimeout(function() {
-						uni.navigateBack({
-							delta: 2
-						})
-					}, 2000)
+					uni.switchTab({
+						url: "../index/index"
+					})
+					_this.isRotate = false
+
+					
+
 					return false;
 				} else {
 					uni.showToast({
@@ -240,10 +246,11 @@
 						position: 'bottom',
 						title: res.message
 					});
+					_this.isRotate = false
 					return false;
 				}
-				
-				
+
+
 				// setTimeout(function() {//三秒后关闭加载动画
 				// 	_this.isRotate = false
 				// }, 3000)
@@ -253,7 +260,7 @@
 					url: "login"
 				})
 			}
-			
+
 		}
 	}
 </script>

+ 146 - 75
pages/scheduling/month_Scheduling.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -4,7 +4,7 @@
 		<u-select v-model="hospitalListShow" :list="hospitalList" @confirm="setSelectHospital"></u-select>
 		<u-select v-model="timeShow" mode="mutil-column-auto" :list="timeList" @confirm="yearConfirm"></u-select>
 		<!--日视图弹出层-->
-		<u-popup v-model="popupShow" mode="bottom" border-radius="50" :mask-close-able="false">
+		<u-popup v-model="popupShow" mode="bottom" border-radius="50">
 			<!-- <view style="margin: 20rpx 0;" class="flex justify-center align-center">
 				<u-icon name="arrow-down" @click="close()"></u-icon>
 			</view> -->
@@ -19,16 +19,16 @@
 				</view>
 			</view>
 			<!-- 上下晚显示 -->
-			<view class="flex justify-center" style="" v-else>
+			<view class="flex justify-center align-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>
+					<view :class="monthList[day+empty-1].mon==0 ? 'nullStyle' : monthList[day+empty-1].mon==1 ? 'monStyle' :'otherStyle' "
+					 @click="modify(1)">上午</view>
 					<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>
+					<view :class="monthList[day+empty-1].aft==0 ? 'nullStyle' : monthList[day+empty-1].aft==1 ? 'aftStyle' :'otherStyle' "
+					 @click="modify(2)">下午</view>
 					<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>
+					<view :class="monthList[day+empty-1].nig==0 ? 'nullStyle' : monthList[day+empty-1].nig==1 ? 'nigStyle' :'otherStyle' "
+					 @click="modify(3)">晚上</view>
 					<text>{{hospitalTimes.wan.nightStartTime}} 至 {{hospitalTimes.wan.nightEndTime}}</text>
 				</view>
 			</view>
@@ -101,9 +101,10 @@
 				// this.getListTime()
 				this.getHostail()
 				this.getNowTime()
-				this.getMonth();
+				this.getMonthList();
+				// this.getMonthList();
 				// this.getNowmonth()
-
+				console.log("s", this.schedulingList)
 			})
 
 		},
@@ -142,8 +143,12 @@
 				hospitalListShow: false, //控制医院选择器
 				hospitalTimes: 0,
 				// 医院列表
-				hospitalList: [],
-				saveDayType:{mon:0,aft:0,nig:0},
+				hospitalList: [],
+				saveDayType: {
+					mon: 0,
+					aft: 0,
+					nig: 0
+				},
 				// 一个月的排班数据 从一号开始
 				//下标0为一号,值为医院ID
 				// 没有排班记录为0
@@ -194,20 +199,29 @@
 			close: async function() {
 				this.popupShow = false;
 				let SaveLists = [];
-				let SaveDate = JSON.parse(JSON.stringify(this.saveDay));
-				console.log('修改数据:',this.saveDayType);
-		
+				let SaveDate = JSON.parse(JSON.stringify(this.saveDay));
+				console.log('修改数据:', this.saveDayType)
+				console.log(this.saveDay)
 				if (this.saveDay != 0) {
 					if (this.hospitalID != 0) {
 						if (this.saveDayType.mon == this.hospitalID) {
 							SaveLists.push(1)
 						}
+						//else if(this.saveDayType.mon == 0){
+						// SaveLists.push(0)
+						// }
 						if (this.saveDayType.aft == this.hospitalID) {
 							SaveLists.push(2)
 						}
+						//else if(this.saveDayType.aft == 0){
+						// 	SaveLists.push(0)
+						// }
 						if (this.saveDayType.nig == this.hospitalID) {
 							SaveLists.push(3)
 						}
+						//else if(this.saveDayType.nig == 0){
+						// 	SaveLists.push(0)
+						// }
 						if (SaveLists.length != 0) {
 							let s = SaveLists.join(",");
 							let tj = {
@@ -217,7 +231,6 @@
 								'organization_id': this.hospitalID,
 							}
 							console.log(tj);
-							console.log(1111)
 							// if(typeof tj=='object'){
 							//  tj = JSON.stringify(tj);
 							// }
@@ -227,8 +240,9 @@
 									title: "修改成功!",
 								})
 								SaveLists = [];
-								this.saveDay = 0;SaveDate=0;
-							
+								this.saveDay = 0;
+								SaveDate = 0;
+
 							}
 
 						}
@@ -284,7 +298,7 @@
 					}
 				}
 			},
-			getMonth: async function() {
+			getMonthList: async function() {
 				console.log("请求数据", this.mothonStart, this.mothonEnd)
 				let res = await this.$request.post("doctor/monthDetail", {
 					'start_day': this.mothonStart,
@@ -360,13 +374,8 @@
 				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++) {
-					console.log(this.schedulingList[c].mon == "" ? 0 : this.schedulingList[c].mon == this.hospitalID ? 1 : 2)
 					let months = (this.month + 1);
 					if (months < 10) {
 						months = "0" + months;
@@ -388,6 +397,7 @@
 					})
 				}
 				console.log(this.monthList)
+
 			},
 
 			getWeekList(strs) {;
@@ -412,8 +422,20 @@
 				let newLists = [];
 				if (res.status == 0) {
 					if (res.data.length == 0) {
-						uni.showToast({
-							title: '请先去设置排班!'
+						uni.showModal({
+							title: '请先去设置排班',
+							success: function(res) {
+								if (res.confirm) {
+									uni.redirectTo({
+										url: "/pages/service/more"
+									})
+								} else {
+									uni.navigateBack({
+										delta: 1
+									})
+								}
+
+							}
 						})
 						return false;
 					} else {
@@ -430,18 +452,18 @@
 
 				this.getListTime(e[0].value)
 				this.hospital = e[0].label
-				this.hospitalID = e[0].value + ""
-				console.log('月份:',this.monthList);
+				this.hospitalID = e[0].value + ""
+				console.log('月份:', this.monthList);
 				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 :3
+						1 : 2
 					this.monthList[x + this.empty].aft = this.schedulingList[x].aft == "0" ? 0 : this.schedulingList[x].aft == this
 						.hospitalID ?
-						1 : 3
+						1 : 2
 					this.monthList[x + this.empty].nig = this.schedulingList[x].nig == "0" ? 0 : this.schedulingList[x].nig == this
 						.hospitalID ?
-						1 : 3
+						1 : 2
 				}
 			},
 			/**
@@ -467,10 +489,10 @@
 				if (index >= this.empty) {
 					this.monthList.map(val => {
 						val.select = false
-					})
-					this.saveDayType.mon= this.schedulingList[index-2].mon;
-					this.saveDayType.aft= this.schedulingList[index-2].aft;
-					this.saveDayType.nig= this.schedulingList[index-2].nig;
+					})
+					this.saveDayType.mon = this.schedulingList[index - 2].mon;
+					this.saveDayType.aft = this.schedulingList[index - 2].aft;
+					this.saveDayType.nig = this.schedulingList[index - 2].nig;
 					this.monthList[index].select = true
 					this.day = text
 					this.popupShow = true
@@ -496,7 +518,7 @@
 				this.month = e[1].value - 1
 				this.monthList = []
 				this.schedulingList = []
-				this.getMonth();
+				this.getMonthList();
 				this.day = 0
 				console.log(e)
 			},
@@ -505,61 +527,61 @@
 			 * id 1早上 2下午 3晚上
 			 * */
 			modify(id) {
+				this.saveDay = this.monthList[this.day + this.empty - 1];
 				if (id == 0) {
-					this.monthList[this.day + this.empty - 1].mon = this.hospitalID //
+					this.monthList[this.day + this.empty - 1].mon = 1 //
 					this.schedulingList[this.day - 1].mon = this.hospitalID
+					this.saveDayType.mon = this.hospitalID;
 
-					this.monthList[this.day + this.empty - 1].aft = this.hospitalID //
+					this.monthList[this.day + this.empty - 1].aft = 1 //
 					this.schedulingList[this.day - 1].aft = this.hospitalID
+					this.saveDayType.aft = this.hospitalID;
 
-					this.monthList[this.day + this.empty - 1].nig = this.hospitalID //
+					this.monthList[this.day + this.empty - 1].nig = 1 //
 					this.schedulingList[this.day - 1].nig = this.hospitalID
+					this.saveDayType.nig = this.hospitalID;
 				} else {
-				
+
 					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
-								this.saveDayType.mon =0;
+								this.schedulingList[this.day - 1].mon = 0
+								this.saveDayType.mon = 0;
 							} else if (this.monthList[this.day + this.empty - 1].mon == 0) {
-								this.monthList[this.day + this.empty - 1].mon = this.hospitalID //
-								this.schedulingList[this.day - 1].mon = this.hospitalID
-								console.log('选择了早上的医院:',this.hospitalID);
+								this.monthList[this.day + this.empty - 1].mon = 1 //
+								this.schedulingList[this.day - 1].mon = this.hospitalID
 								this.saveDayType.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
-								this.saveDayType.aft =0;
+								this.schedulingList[this.day - 1].aft = 0
+								this.saveDayType.aft = 0;
 							} else if (this.monthList[this.day + this.empty - 1].aft == 0) {
-								this.monthList[this.day + this.empty - 1].aft = this.hospitalID //
-								this.schedulingList[this.day - 1].aft = this.hospitalID
-								console.log('选择了下午的医院:',this.hospitalID);
+								this.monthList[this.day + this.empty - 1].aft = 1 //
+								this.schedulingList[this.day - 1].aft = this.hospitalID
 								this.saveDayType.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
+								this.schedulingList[this.day - 1].nig = 0
 								this.saveDayType.nig = 0;
 							} else if (this.monthList[this.day + this.empty - 1].nig == 0) {
-								this.monthList[this.day + this.empty - 1].nig = this.hospitalID //
-								this.schedulingList[this.day - 1].nig = this.hospitalID
-								 
-								console.log('选择了晚上的医院:',this.hospitalID);
+								this.monthList[this.day + this.empty - 1].nig = 1 //
+								this.schedulingList[this.day - 1].nig = this.hospitalID
 								this.saveDayType.nig = this.hospitalID;
 							}
 							break;
-					}
-					this.saveDay = this.monthList[this.day + this.empty - 1];
-					console.log('选择的日期:',this.monthList[this.day + this.empty - 1]);
-					console.log('ID:',id);
+					}
+					// this.saveDay = this.monthList[this.day + this.empty - 1];
+					console.log('选择的日期:', this.monthList[this.day + this.empty - 1]);
+					console.log('ID:', id);
 					// this.$forceUpdate();
-				} 
+				}
 			},
 			/**
 			 * 跳转周视图
@@ -587,19 +609,68 @@
 		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;
-	 
-	 } */
+	/* //空按钮样式 */
+	.nullStyle {
+		text-align: center;
+		padding: 10rpx 0;
+		border: 0.3rpx solid #909399;
+		background-color: #FFF;
+		border-radius: 30rpx;
+		color: #000;
+		font-weight: bold;
+		margin: 20rpx 0 10rpx 0;
+	}
+	
+	,
+	/* //上午按钮样式 */
+	.monStyle {
+		text-align: center;
+		padding: 10rpx 0;
+		border: 0.3rpx solid #5667c8;
+		background-color: #5667c8;
+		border-radius: 30rpx;
+		color: #fff;
+		fontWeight: bold;
+		margin: 20rpx 0 10rpx 0;
+	}
+	
+	,
+	/* //下午按钮样式 */
+	.aftStyle {
+		text-align: center;
+		padding: 10rpx 0;
+		color: #FFF;
+		border-radius: 30rpx;
+		border: 0.3rpx solid #ec9d75;
+		background-color: #ec9d75;
+		color: #fff;
+		font-weight: bold;
+		margin: 20rpx 0 10rpx 0;
+	}
+	
+	,
+	/* //晚上按钮样式 */
+	.nigStyle {
+		text-align: center;
+		padding: 10rpx 0;
+		border: 0.3rpx solid #55aa7f;
+		background-color: #55aa7f;
+		color: #fff;
+		border-radius: 30rpx;
+		font-weight: bold;
+		margin: 20rpx 0 10rpx 0;
+	}
+	
+	,
+	/* //其他医院按钮样式 */
+	.otherStyle {
+		text-align: center;
+		padding: 10rpx 0;
+		border: 0.3rpx solid #989898;
+		background-color: #989898;
+		border-radius: 30rpx;
+		color: #fff;
+		font-weight: bold;
+		margin: 20rpx 0 10rpx 0;
+	}
 </style>

+ 109 - 49
pages/scheduling/week_Scheduling.vue

xqd xqd xqd xqd xqd xqd
@@ -22,16 +22,13 @@
 		<view v-for="item,index in weekList" class="week" :key="index">
 			<view style="flex-grow: 1;text-align: center;border-right: 2rpx solid #808080;font-size: 36rpx;margin-right: 30rpx;">{{weekTitlelist[index].text}}</view>
 			<view style="flex-grow: 2;">
-				<u-button :custom-style="item.mon == hospitalID ? monStyle : item.mon == 0 ? nullStyle :otherStyle" size="mini"
-				 shape="circle" @click="modify(1,index)" throttleTime="1000">上午</u-button>
+				<view :class="item.mon == hospitalID ? 'monStyle' : item.mon == 0 ? 'nullStyle' :'otherStyle'" @click="modify(1,index)">上午</view>
 			</view>
 			<view style="flex-grow: 2;">
-				<u-button :custom-style="item.aft == hospitalID ? aftStyle : item.aft == 0 ? nullStyle :otherStyle" size="mini"
-				 shape="circle" @click="modify(2,index)" throttleTime="1000">下午</u-button>
+				<view :class="item.aft == hospitalID ? 'aftStyle' : item.aft == 0 ? 'nullStyle' :'otherStyle'" @click="modify(2,index)">下午</view>
 			</view>
 			<view style="flex-grow: 2;">
-				<u-button :custom-style="item.nig == hospitalID ? nigStyle : item.nig == 0 ? nullStyle :otherStyle" size="mini"
-				 shape="circle" @click="modify(3,index)" throttleTime="1000">晚上</u-button>
+				<view :class="item.nig == hospitalID ? 'nigStyle' : item.nig == 0 ? 'nullStyle' :'otherStyle'" @click="modify(3,index)">晚上</view>
 			</view>
 		</view>
 
@@ -111,46 +108,7 @@
 					},
 				],
 
-				//空按钮样式
-				nullStyle: {
-					backgroundColor: '#FFF',
-					color: '#000',
-					fontWeight: "bold",
-					margin: '20rpx 0 10rpx 0',
-					width: "80%"
-				},
-				//上午按钮样式
-				monStyle: {
-					backgroundColor: '#5667c8',
-					color: '#fff',
-					fontWeight: "bold",
-					margin: '20rpx 0 10rpx 0',
-					width: "80%"
-				},
-				//下午按钮样式
-				aftStyle: {
-					backgroundColor: '#ec9d75',
-					color: '#fff',
-					fontWeight: "bold",
-					margin: '20rpx 0 10rpx 0',
-					width: "80%"
-				},
-				//晚上按钮样式
-				nigStyle: {
-					backgroundColor: '#55aa7f',
-					color: '#fff',
-					fontWeight: "bold",
-					margin: '20rpx 0 10rpx 0',
-					width: "80%"
-				},
-				//其他医院按钮样式
-				otherStyle: {
-					backgroundColor: '#989898',
-					color: '#fff',
-					fontWeight: "bold",
-					margin: '20rpx 0 10rpx 0',
-					width: "80%"
-				}
+
 			}
 		},
 		methods: {
@@ -222,7 +180,7 @@
 			/**
 			 * 点击排班
 			 * */
-			modify(id, index) {
+			modifys(id, index) {
 				switch (id) {
 					case 1:
 						if (this.weekList[index].mon == this.hospitalID) {
@@ -246,8 +204,36 @@
 						}
 						break;
 				}
-				console.log(this.weekList)
+			},
+			modify(id, index) {
+				this.$nextTick(function() {
+					this.modifys(id, index)
+				})
+
 				this.$forceUpdate();
+				// switch (id) {
+				// 	case 1:
+				// 		if (this.weekList[index].mon == this.hospitalID) {
+				// 			this.weekList[index].mon = 0;
+				// 		} else if (this.weekList[index].mon == 0) {
+				// 			this.weekList[index].mon = this.hospitalID
+				// 		}
+				// 		break;
+				// 	case 2:
+				// 		if (this.weekList[index].aft == this.hospitalID) {
+				// 			this.weekList[index].aft = 0;
+				// 		} else if (this.weekList[index].aft == 0) {
+				// 			this.weekList[index].aft = this.hospitalID
+				// 		}
+				// 		break;
+				// 	case 3:
+				// 		if (this.weekList[index].nig == this.hospitalID) {
+				// 			this.weekList[index].nig = 0;
+				// 		} else if (this.weekList[index].nig == 0) {
+				// 			this.weekList[index].nig = this.hospitalID
+				// 		}
+				// 		break;
+				// }
 			},
 			submit: async function() {
 				let newData = [];
@@ -262,19 +248,22 @@
 						}
 					})
 				}
+				console.log("newData", newData)
 				if (typeof newData == 'object') {
 					newData = JSON.stringify(newData);
 				}
 				let res = await this.$request.post("doctor/week_scheduling", {
 					'data': newData
 				});
+
+				console.log("res", res)
 				if (res.status == 0) {
 					uni.showToast({
 						duration: 2000,
 						title: '排班成功',
 						success() {
 							uni.navigateBack({
-								delta:1
+								delta: 1
 							})
 						}
 					})
@@ -313,4 +302,75 @@
 		display: flex;
 		align-items: center;
 	}
+
+
+
+
+	/* //空按钮样式 */
+	.nullStyle {
+		text-align: center;
+		padding: 10rpx 0;
+		border: 0.3rpx solid #909399;
+		background-color: #FFF;
+		border-radius: 30rpx;
+		color: #000;
+		font-weight: bold;
+		margin: 20rpx 0 10rpx 0;
+		width: 80%;
+	}
+
+	,
+	/* //上午按钮样式 */
+	.monStyle {
+		text-align: center;
+		padding: 10rpx 0;
+		background-color: #5667c8;
+		border-radius: 30rpx;
+		color: #fff;
+		fontWeight: bold;
+		margin: 20rpx 0 10rpx 0;
+		width: 80%;
+	}
+
+	,
+	/* //下午按钮样式 */
+	.aftStyle {
+		text-align: center;
+		padding: 10rpx 0;
+		color: #FFF;
+		border-radius: 30rpx;
+		background-color: #ec9d75;
+		color: #fff;
+		font-weight: bold;
+		margin: 20rpx 0 10rpx 0;
+		width: 80%
+	}
+
+	,
+	/* //晚上按钮样式 */
+	.nigStyle {
+		text-align: center;
+		padding: 10rpx 0;
+		border: 0.3rpx solid #909399;
+		background-color: #55aa7f;
+		color: #fff;
+		border-radius: 30rpx;
+		font-weight: bold;
+		margin: 20rpx 0 10rpx 0;
+		width: 80%;
+	}
+
+	,
+	/* //其他医院按钮样式 */
+	.otherStyle {
+		text-align: center;
+		padding: 10rpx 0;
+		background-color: #989898;
+		border-radius: 30rpx;
+		color: #fff;
+		font-weight: bold;
+		margin: 20rpx 0 10rpx 0;
+		width: 80%;
+
+	}
 </style>

+ 560 - 524
pages/service/more.vue

xqd xqd xqd xqd xqd xqd
@@ -174,7 +174,6 @@
 		<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>
@@ -272,8 +271,8 @@
 					</view>
 					<!-- 右 -->
 					<view class="right">
-						<u-input v-model="form.is_appoint.hospitalList[hospitalcurrent].service_num" type="digit" :border="true"
-						 placeholder="请输入人次" />
+						<u-input v-model="form.is_appoint.hospitalList[hospitalcurrent].service_num" type="number" :border="true"
+						 placeholder="请输入人次" @blur="change" />
 					</view>
 				</view>
 				<!-- 预约天数 -->
@@ -285,8 +284,8 @@
 					</view>
 					<!-- 右 -->
 					<view class="right">
-						<u-input v-model="form.is_appoint.hospitalList[hospitalcurrent].show_days" type="digit" :border="true"
-						 placeholder="请输入人次" />
+						<u-input v-model="form.is_appoint.hospitalList[hospitalcurrent].show_days" type="number" :border="true"
+						 placeholder="请输入天数" />
 					</view>
 				</view>
 			</view>
@@ -315,8 +314,8 @@
 				this.addTime()
 			})
 			console.log(this.form.is_appoint.hospitalList.length)
-			
-			
+
+
 
 		},
 		mounted() {
@@ -822,109 +821,26 @@
 			}
 		},
 		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 != '暂不选择') {
+			change(e) {
+				if (e != '') {
 					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;
-
+						//判断有没有选择服务时间
+						if (this.morningSlot != 0) {
+							console.log(this.morningSlot)
+							console.log(this.form.is_appoint.hospitalList[this.hospitalcurrent].service_times)
+							this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.mon.amPerson = parseInt(this.morningSlot /
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_times) * e
+						}
+						if (this.afternoonSlot != 0) {
+							this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.aft.pmPerson = parseInt(this.afternoonSlot /
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_times) * e
+						}
+						if (this.nightSlot != 0) {
+							this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.nig.nightPerson = parseInt(this.nightSlot /
+								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_times) * e
 						}
-					} else { //没有选择就诊时长
-						let time = (e[1].value - e[0].value) * 30
+					} else {
+
 						switch (this.timeSlot) {
 							case 0:
 								this.morningSlot = time
@@ -938,480 +854,600 @@
 						}
 					}
 				}
-				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) {
+		
+		/**
+		 * 拿到返回值并赋值
+		 * timeSlot:0
+		 * 时间段.0上午 1下午 2晚上
+		 * servicesType:0
+		 * 服务种类 0电话 1图文 2门诊
+		 * */
+		confirm(e) {
+			if (e[0].label != '暂不选择') {
+				switch (this.timeSlot) {
 					case 0:
-						this.morShow = true;
+						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:
-						this.aftShow = true;
+						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:
-						this.nigShow = true;
+						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:
 				}
-			},
-
-			/**
-			 * 选择就诊时长
-			 */
-			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)
+			} 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 != "") { //选择了就诊时长
+					if (this.form.is_appoint.hospitalList[this.hospitalcurrent].service_num != "") { //选择了就诊时长并填写了同时服务订单数
+						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;
+						}
 
-			/**
-			 * 选择医院
-			 */
-			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
+					}
+				} 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)
+		},
 
-				console.log(this.hospitalcurrent)
-
-				//清空暂存数据
-				// this.morningSlot = 0 //早上
-				// this.afternoonSlot = 0 //下午
-				// this.nightSlot = 0 //晚上
-			},
-
-			/*    分段器选择  */
-			sectionChange(index) {
-				this.curNow = index;
-			},
-			/*    保存       */
-			// 提示一下
-			pd() {
-				let that = this
-				uni.showModal({
-						title: "请确定信息填写完整,否则无法保存",
-						success: function(res) {
-							if (res.confirm) {
-								that.bc()
-							}
-						}
-				});
-			},
+		/**
+		 * 给所有时间段数组赋值
+		 * */
+		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;
+			}
+		},
 
+		/**
+		 * 选择时间
+		 * 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;
+			}
+		},
 
-			bc: async function() {
-				let that = this;
-				var forms = JSON.parse(JSON.stringify(that.form));
-				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,
-					})
-				}
-				forms.is_appoint = newMenList;
-				if (typeof forms != 'string') {
-					forms = JSON.stringify(forms)
-				}
-				let res = await that.$request.post('doctor/saveSettingList', {
-					data: forms,
-					type: 2
-				});
+		/**
+		 * 选择就诊时长
+		 */
+		selectService(e) {
+			console.log("同时服务订单数", this.form.is_appoint.hospitalList[this.hospitalcurrent].service_num)
+			this.form.is_appoint.hospitalList[this.hospitalcurrent].service_times = e[0].label
+			if(this.form.is_appoint.hospitalList[this.hospitalcurrent].service_num != ""){
+				if (this.morningSlot != 0) {
+				this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.mon.amPerson = parseInt(this.morningSlot / 
+				e[0].label)*this.form.is_appoint.hospitalList[this.hospitalcurrent].service_num
+			}
+			if (this.afternoonSlot != 0) {
+				this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.aft.pmPerson = parseInt(this.afternoonSlot /
+					e[0].label)*this.form.is_appoint.hospitalList[this.hospitalcurrent].service_num
+			}
+			if (this.nightSlot != 0) {
+				this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.nig.nightPerson = parseInt(this.nightSlot / 
+				e[0].label)*this.form.is_appoint.hospitalList[this.hospitalcurrent].service_num
+			}
+			}
+			
+		},
 
-				if (res.status == 0) {
-					uni.showToast({
-						icon: 'none',
-						duration: 3000,
-						title: '操作成功',
+		/**
+		 * 选择医院
+		 */
+		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('res对象:', res);
-				// 延迟1秒
-				// setTimeout(function() {
-				// 	uni.switchTab({
-				// 		url: '../index/index'
-				// 	})
-				// }, 1000);
-
-			},
-			/**
-			 * @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;
-
-
+			}
 
+			console.log(this.hospitalcurrent)
 
+			//清空暂存数据
+			// this.morningSlot = 0 //早上
+			// this.afternoonSlot = 0 //下午
+			// this.nightSlot = 0 //晚上
+		},
 
-					// 渲染显示的基础价格设置
-					this.form.is_phone.person = '';
-					this.form.is_chat.person = '';
-					this.form.is_appoint.person = '';
+		/*    分段器选择  */
+		sectionChange(index) {
+			this.curNow = index;
+		},
+		/*    保存       */
+		// 提示一下
+		pd() {
+			let that = this
+			uni.showModal({
+				title: "请确定信息填写完整,否则无法保存",
+				success: function(res) {
+					if (res.confirm) {
+						that.bc()
+					}
+				}
+			});
+		},
 
-					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 : '';
+		bc: async function() {
+			let that = this;
+			var forms = JSON.parse(JSON.stringify(that.form));
+			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,
+				})
+			}
+			forms.is_appoint = newMenList;
+			if (typeof forms != 'string') {
+				forms = JSON.stringify(forms)
+			}
+			console.log("forms",forms)
+			let res = await that.$request.post('doctor/saveSettingList', {
+				data: forms,
+				type: 2
+			});
+
+			if (res.status == 0) {
+				uni.showToast({
+					icon: 'none',
+					duration: 3000,
+					title: '操作成功',
+
+				})
+			}
+			console.log('res对象:', res);
+			// 延迟1秒
+			// setTimeout(function() {
+			// 	uni.switchTab({
+			// 		url: '../index/index'
+			// 	})
+			// }, 1000);
 
-						this.form.is_phone.person = res.data.list.phone.person;
-					}
+		},
+		/**
+		 * @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.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) {
-						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 //晚上可预约号源
-									}
+				if (res.data.list.men.length != 0) {
+					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 //上午可预约号源
 								},
-							})
-						}
-						this.form.is_appoint.hospitalList = lists;
-						if(this.form.is_appoint.hospitalList.length==1){
-							this.hospitalcurrent = 0
-						}
+								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 //晚上可预约号源
+								}
+							},
+						})
+					}
+					this.form.is_appoint.hospitalList = lists;
+					if (this.form.is_appoint.hospitalList.length == 1) {
+						this.hospitalcurrent = 0
 					}
-					/* 渲染时间 */
-					//电话的时间
-					// 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
+				/* 渲染时间 */
+				//电话的时间
+				// 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);
 				});
-				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
-						}
+				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 < 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
-						}
+				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
-						}
+			// 图文资讯渲染
+			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 < 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
-						}
+				}
+				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
-							}
+			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.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.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
-							}
+					}
+				} 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.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.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.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.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
-							}
+					}
+					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
-			},
-			xzyy(){
-				console.log(this.form.is_appoint.hospitalList.length)
-				console.log(this.form.is_appoint.hospitalList)
-				if(this.form.is_appoint.hospitalList.length != 0){
-					this.hospitalShow=true
-				}else{
-					uni.showModal({
-							title: "您还没有已认证的医院,确认去认证?",
-							success: function(res) {
-								if (res.confirm) {
-									uni.redirectTo({
-										url:"/pages/login/doctorRenzheng"
-									})
-								}
-							}
-					});
-				}
 			}
-
+			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
+		},
+		xzyy() {
+			console.log(this.form.is_appoint.hospitalList.length)
+			console.log(this.form.is_appoint.hospitalList)
+			if (this.form.is_appoint.hospitalList.length != 0) {
+				this.hospitalShow = true
+			} else {
+				uni.showModal({
+					title: "您还没有已认证的医院,确认去认证?",
+					success: function(res) {
+						if (res.confirm) {
+							uni.redirectTo({
+								url: "/pages/login/doctorRenzheng"
+							})
+						}
+					}
+				});
+			}
 		}
+
+	}
 	};
 </script>