渣渣宝 4 роки тому
батько
коміт
347bd5dc52
1 змінених файлів з 572 додано та 547 видалено
  1. 572 547
      pages/service/more.vue

+ 572 - 547
pages/service/more.vue

xqd xqd xqd
@@ -314,9 +314,6 @@
 				this.addTime()
 			})
 			console.log(this.form.is_appoint.hospitalList.length)
-
-
-
 		},
 		mounted() {
 
@@ -788,9 +785,10 @@
 				 * 切换医院清空
 				 * 选择暂不选择清空
 				 */
+				slot: [],
 				morningSlot: 0, //早上
 				afternoonSlot: 0, //下午
-				nightSlot: 0, //晚上
+				// slot[hospitalcurrent].nig: 0, //晚上
 
 				hospitalcurrent: -1, // 保存选中的医院下标
 				/********************保存的数据****************************/
@@ -825,629 +823,656 @@
 				if (e != '') {
 					if (this.form.is_appoint.hospitalList[this.hospitalcurrent].service_times != "") { //选择了就诊时长
 						//判断有没有选择服务时间
-						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 /
+						if (this.slot[this.hospitalcurrent].mon != 0) {
+							this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.mon.amPerson = parseInt(this.slot[
+									this.hospitalcurrent].mon /
 								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 /
+						if (this.slot[this.hospitalcurrent].aft != 0) {
+							this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.aft.pmPerson = parseInt(this.slot[
+									this.hospitalcurrent].aft /
 								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 /
+						if (this.slot[this.hospitalcurrent].nig != 0) {
+							this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.nig.nightPerson = parseInt(this.slot[
+									this.hospitalcurrent].nig /
 								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_times) * e
 						}
 					} else {
 
 						switch (this.timeSlot) {
 							case 0:
-								this.morningSlot = time
+								this.slot[this.hospitalcurrent].mon = time
 								break;
 							case 1:
-								this.afternoonSlot = time
+								this.slot[this.hospitalcurrent].aft = time
 								break;
 							case 2:
-								this.nightSlot = time
+								this.slot[this.hospitalcurrent].nig = time
 								break;
 						}
 					}
 				}
 			},
-		
-		/**
-		 * 拿到返回值并赋值
-		 * 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:
+
+			/**
+			 * 拿到返回值并赋值
+			 * 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.slot[this.hospitalcurrent].mon = (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.slot[this.hospitalcurrent].aft = (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.slot[this.hospitalcurrent].nig = (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.slot[this.hospitalcurrent].mon = 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.slot[this.hospitalcurrent].aft = 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.slot[this.hospitalcurrent].nig = 0
+							}
+							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
+				// 在这里计算号源 通过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;
+							}
+
+
 						}
-						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)
+					} else { //没有选择就诊时长
+						let time = (e[1].value - e[0].value) * 30
 						switch (this.timeSlot) {
 							case 0:
-								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.mon.amPerson = time
+								this.slot[this.hospitalcurrent].mon = time
 								break;
 							case 1:
-								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.aft.pmPerson = time
+								this.slot[this.hospitalcurrent].aft = time
 								break;
 							case 2:
-								this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.nig.nightPerson = time
+								this.slot[this.hospitalcurrent].nig = 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;
+				}
+			},
+
+			/**
+			 * 选择时间
+			 * 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.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.slot[this.hospitalcurrent].mon != 0) {
+						this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.mon.amPerson = parseInt(this.slot[
+								this.hospitalcurrent].mon /
+							e[0].label) * this.form.is_appoint.hospitalList[this.hospitalcurrent].service_num
 					}
-				} 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;
+					if (this.slot[this.hospitalcurrent].aft != 0) {
+						this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.aft.pmPerson = parseInt(this.slot[
+								this.hospitalcurrent].aft /
+							e[0].label) * this.form.is_appoint.hospitalList[this.hospitalcurrent].service_num
+					}
+					if (this.slot[this.hospitalcurrent].nig != 0) {
+						this.form.is_appoint.hospitalList[this.hospitalcurrent].service_time.nig.nightPerson = parseInt(this.slot[
+								this.hospitalcurrent].nig /
+							e[0].label) * this.form.is_appoint.hospitalList[this.hospitalcurrent].service_num
 					}
 				}
-			}
-			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;
-			}
-		},
 
-		/**
-		 * 选择时间
-		 * 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.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
-			}
-			}
-			
-		},
+			},
 
-		/**
-		 * 选择医院
-		 */
-		selectHospital(e) {
+			/**
+			 * 选择医院
+			 */
+			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
+				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)
+				console.log(this.hospitalcurrent)
 
-			//清空暂存数据
-			// this.morningSlot = 0 //早上
-			// this.afternoonSlot = 0 //下午
-			// this.nightSlot = 0 //晚上
-		},
+				//清空暂存数据
+				// this.slot[hospitalcurrent].mon = 0 //早上
+				// this.afternoonSlot = 0 //下午
+				// this.slot[hospitalcurrent].nig = 0 //晚上
+			},
 
-		/*    分段器选择  */
-		sectionChange(index) {
-			this.curNow = index;
-		},
-		/*    保存       */
-		// 提示一下
-		pd() {
-			let that = this
-			uni.showModal({
-				title: "请确定信息填写完整,否则无法保存",
-				success: function(res) {
-					if (res.confirm) {
-						that.bc()
-					}
-				}
-			});
-		},
+			/*    分段器选择  */
+			sectionChange(index) {
+				this.curNow = index;
+			},
+			/*    保存       */
+			// 提示一下
+			pd() {
+				// 计算号源
 
+				let that = this
+				uni.showModal({
+					title: "请确定信息填写完整,否则无法保存",
+					success: function(res) {
+						if (res.confirm) {
+							that.bc()
+						}
+					}
+				});
+			},
 
-		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);
 
-		},
-		/**
-		 * @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;
+			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.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.status == 0) {
+					uni.showToast({
+						icon: 'none',
+						duration: 3000,
+						title: '操作成功',
 
+					})
 				}
+				console.log('res对象:', res);
+				// 延迟1秒
+				// setTimeout(function() {
+				// 	uni.switchTab({
+				// 		url: '../index/index'
+				// 	})
+				// }, 1000);
 
-				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 //晚上可预约号源
-								}
-							},
-						})
-					}
-					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
-			});
-			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);
+			},
+			/**
+			 * @author Liu Yuanhang
+			 * 获取页面显示状态以及数据
+			 */
+			getShows: async function() {
+				let res = await this.$request.post('doctor/getSettingListnew', {
+					'type': 2
 				});
-				console.log('我是电话', phones)
-
-				for (let i = 0; i < dh1.length; i++) {
-					if (phones.indexOf(dh1[i].id) != -1) {
-						dh1[i].checked = true
+				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;
 					}
-				}
 
-				for (let i = 0; i < dh2.length; i++) {
-					if (phones.indexOf(dh2[i].id) != -1) {
-						dh2[i].checked = true
+					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 : '';
+
 					}
-				}
 
-				for (let i = 0; i < dh3.length; i++) {
-					if (phones.indexOf(dh3[i].id) != -1) {
-						dh3[i].checked = true
+					if (res.data.list.men.length != 0) {
+						let dataList = res.data.list.men;
+						let lists = [];
+						for (let i = 0; i < dataList.length; i++) {
+							/**
+							 * 计算所有医院的上下晚时间段时长,用于计算号源
+							 * 需要拿到开始时间和结束时间,相减并判断是否为半点
+							 * 公式:( 结束时间(小时) - 开始时间(小时) ) * 60- ( 结束时间(分钟) - 开始时间(分钟) )  =  时长
+							 * */
+							let monDuration = (dataList[i].service_time[1].amEndTime.substr(0, 2) - dataList[i].service_time[1].amStartTime
+								.substr(0, 2)) * 60 + (dataList[i].service_time[1].amEndTime.substr(3, 5) - dataList[i].service_time[1].amStartTime
+								.substr(3, 5))
+							let aftDuration = (dataList[i].service_time[2].pmEndTime.substr(0, 2) - dataList[i].service_time[2].pmStartTime
+								.substr(0, 2)) * 60 + (dataList[i].service_time[2].pmEndTime.substr(3, 5) - dataList[i].service_time[2].pmStartTime
+								.substr(3, 5))
+							let nigDuration = (dataList[i].service_time[3].nightEndTime.substr(0, 2) - dataList[i].service_time[3].nightStartTime
+								.substr(0, 2)) * 60 + (dataList[i].service_time[3].nightEndTime.substr(3, 5) - dataList[i].service_time[3].nightStartTime
+								.substr(3, 5))
+							console.log("早", dataList[i].org_name, monDuration)
+							console.log("下", dataList[i].org_name, aftDuration)
+							console.log("晚", dataList[i].org_name, nigDuration)
+							this.slot.push({
+								mon: monDuration,
+								aft: aftDuration,
+								nig: nigDuration
+							});
+
+							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 //晚上可预约号源
+									}
+								},
+							})
+						}
+
+						console.log("计算出来的每个医院服务时长(单位:分钟)", this.slot)
+						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;
 				}
-			}
-
-			// 图文资讯渲染
-			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);
+				// this.reanders(res.data);
+			},
+			/**
+			 * 渲染选中数据
+			 * @author Liu Yuan hang
+			 * @param {Object} e
+			 */
+			reanders(e) {
+				uni.showLoading({
+					title: '渲染中',
+					mask: true
 				});
-				console.log('我是图文', chat)
-				for (let i = 0; i < tw1.length; i++) {
-					if (chat.indexOf(tw1[i].id) != -1) {
-						tw1[i].checked = 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 < tw2.length; i++) {
-					if (chat.indexOf(tw2[i].id) != -1) {
-						tw2[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 < tw3.length; i++) {
-					if (chat.indexOf(tw3[i].id) != -1) {
-						tw3[i].checked = true
+
+					for (let i = 0; i < dh3.length; i++) {
+						if (phones.indexOf(dh3[i].id) != -1) {
+							dh3[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
+				// 图文资讯渲染
+				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 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 i = 0; i < tw2.length; i++) {
+						if (chat.indexOf(tw2[i].id) != -1) {
+							tw2[i].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 i = 0; i < tw3.length; i++) {
+						if (chat.indexOf(tw3[i].id) != -1) {
+							tw3[i].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
+				}
+
+				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
+							}
+						}
+						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.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>