Przeglądaj źródła

排班、服务接口修改

渣渣宝 4 lat temu
rodzic
commit
ab92b59994

+ 5 - 1
pages/index/index.vue

xqd xqd
@@ -293,6 +293,10 @@
 
 		},
 		methods: {
+			
+			/**
+			 * 医生信息
+			 * */
 			getDocterInfo: async function() {
 				let res = await this.$request.post("doctor/doctorInfor", {}, false);
 				if (res.data != null) {
@@ -664,7 +668,7 @@
 				}
 			},
 			getStatus: async function() {
-				let res = await this.$request.post('doctor/getSettingList', {
+				let res = await this.$request.post('doctor/getSettingBase', {
 					'type': 1
 				}, false);
 

+ 73 - 40
pages/scheduling/month_Scheduling.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -108,7 +108,7 @@
 			})
 		},
 		onShow() {
-			this.defaultIndex= [0,0]
+			this.defaultIndex = [0, 0]
 			this.getNowTime()
 			if (this.refresh) {
 				this.monthList.splice(0, this.monthList.length);
@@ -182,12 +182,12 @@
 			}
 		},
 		methods: {
-			closePopup(){
+			closePopup() {
 				this.saveDayType.mon = 0
 				this.saveDayType.aft = 0
 				this.saveDayType.nig = 0
 			},
-			
+
 			close: async function() {
 				this.popupShow = false;
 				let SaveLists = [];
@@ -210,24 +210,24 @@
 						// 	SaveLists.push(3)
 						// } else if (this.saveDayType.nig == 0) {
 						// 	SaveLists.push(0)
-						// }
-						
-						// if (SaveLists.length != 0) {
-						if(this.saveDayType.length!=0){
-							
-							// let s = SaveLists.join(",");
-							let s = this.saveDayType;
-							if(typeof s=='object'){
-							 s = JSON.stringify(s);
+						// }
+
+						// if (SaveLists.length != 0) {
+						if (this.saveDayType.length != 0) {
+
+							// let s = SaveLists.join(",");
+							let s = this.saveDayType;
+							if (typeof s == 'object') {
+								s = JSON.stringify(s);
 							}
 							let tj = {
 								'schedule_date': SaveDate.date,
 								'week': SaveDate.week,
 								'type': s,
 								'organization_id': this.hospitalID,
-							}
-						
-							
+							}
+
+
 							let res = await this.$request.post("doctor/saveDay", tj);
 							if (res.status == 0) {
 								uni.showToast({
@@ -248,6 +248,11 @@
 					}
 				}
 			},
+
+			/**
+			 * 获取接口医院
+			 * 渲染颜色
+			 * */
 			getHostail: async function() {
 				let res = await this.$request.post("doctor/organizationList");
 				if (res.status == 0) {
@@ -282,19 +287,19 @@
 					this.getListTime(this.hospitalList[0].value)
 					this.hospital = this.hospitalList[0].label
 					this.hospitalID = this.hospitalList[0].value + ""
-					let day = new Date();
-					let a = day.getDate()
-					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 &&
-							this.overdue(x) ?
-							1 : 2
-						this.monthList[x + this.empty].aft = this.schedulingList[x].aft == "0" ? 0 : this.schedulingList[x].aft == this.hospitalID &&
-							this.overdue(x) ?
-							1 : 2
-						this.monthList[x + this.empty].nig = this.schedulingList[x].nig == "0" ? 0 : this.schedulingList[x].nig == this.hospitalID &&
-							this.overdue(x) ?
-							1 : 2
-					}
+					// let day = new Date();
+					// let a = day.getDate()
+					// 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 &&
+					// 		this.overdue(x) ?
+					// 		1 : 2
+					// 	this.monthList[x + this.empty].aft = this.schedulingList[x].aft == "0" ? 0 : this.schedulingList[x].aft == this.hospitalID &&
+					// 		this.overdue(x) ?
+					// 		1 : 2
+					// 	this.monthList[x + this.empty].nig = this.schedulingList[x].nig == "0" ? 0 : this.schedulingList[x].nig == this.hospitalID &&
+					// 		this.overdue(x) ?
+					// 		1 : 2
+					// }
 
 					// for (let x = 0; x < this.monthList.length - this.empty - a; x++) {
 					// 	this.monthList[x + this.empty - a].mon = this.schedulingList[x - a].mon == "0" ? 0 : 2
@@ -303,6 +308,11 @@
 					// }
 				}
 			},
+
+
+			/**
+			 * 判断时间  过去显示灰
+			 * */
 			overdue(day) {
 				let date = new Date();
 				if (this.year == date.getFullYear() && this.month == date.getMonth() && day + 1 <= date.getDate()) {
@@ -312,6 +322,8 @@
 				}
 
 			},
+
+
 			getMonthList: async function() {
 				console.log("请求数据", this.mothonStart, this.mothonEnd)
 				let res = await this.$request.post("doctor/monthDetail", {
@@ -322,17 +334,38 @@
 				if (res.status == 0) {
 					let data = res.data;
 					let newList = [];
-					for (let i = 0; i < data.length; i++) {
-						+
-						// console.log(i)
-						this.schedulingList.push({
-							mon: data[i].ident.zao,
-							aft: data[i].ident.xia,
-							nig: data[i].ident.wan
-						})
+					let date = new Date()
+					date.setFullYear(this.year, this.month + 1, 0);
+					console.log('请求数据的接口,需要查看这个月有几天', date.getDate())
+					for (let i = 0,j = 0; i < date.getDate(); i++) {
+						// console.log("数组长度",data.length ,"i",i,"j",j,data[j].schedule_date.substr(-2))
+						if (data.length > j) {
+							if (data[j].schedule_date.substr(-2) == i + 1) {
+								this.schedulingList.push({
+									mon: data[j].ident.zao,
+									aft: data[j].ident.xia,
+									nig: data[j].ident.wan
+								})
+								j++
+								
+							} else {
+								this.schedulingList.push({
+									mon: 0,
+									aft: 0,
+									nig: 0
+								})
+							}
+						} else {
+							this.schedulingList.push({
+								mon: 0,
+								aft: 0,
+								nig: 0
+							})
+						}
+
 					}
-					console.log('原数组:', this.schedulingList);
-					this.getNowmonth()
+					console.log("渲染后的数组",this.schedulingList)
+					this.getNowmonth() //渲染方法
 				} else {
 					uni.showModal({
 						title: '请求错误'
@@ -387,10 +420,10 @@
 				this.empty = date.getDay()
 
 				date.setFullYear(this.year, this.month + 1, 0); //查看这个月有几天
-
+				//接口用到的开始时间和结束时间
 				this.mothonStart = this.year + '-' + (this.month + 1) + '-' + '01'
-
 				this.mothonEnd = this.year + '-' + (this.month + 1) + '-' + date.getDate()
+
 				for (let c = 0; c < date.getDate(); c++) {
 					let months = (this.month + 1);
 					if (months < 10) {

+ 1 - 0
pages/scheduling/week_Scheduling.vue

xqd
@@ -284,6 +284,7 @@
 						}
 					})
 				} else {
+					console.log(res.message)
 					uni.showModal({
 						duration: 2000,
 						title: res.message,

+ 586 - 435
pages/service/more.vue

xqd xqd xqd xqd
@@ -302,7 +302,7 @@
 		<view style="padding: 20rpx 26rpx 200rpx 26rpx;background-color: #f3f3f3;color:#C0C0C0" v-show="showList[2].flag&&(SubsectionList[curNow].name=='门诊预约')">
 			提示:就诊人信息用于平台审核和医疗业务使用,不会外传。请正却确填写就诊人信息,如需修改身份信息可电话联系客服修改(13330431369)
 		</view>
-		<view class="bottomButton" @click="pd">保存</view>
+		<view class="bottomButton" @click="pd">保存{{curNow==0?"电话":curNow==1?"图文":"门诊"}}设置</view>
 	</view>
 </template>
 
@@ -310,10 +310,11 @@
 	export default {
 		onLoad(options) {
 			this.getShows();
-			this.$nextTick(function() {
-				this.addTime()
-			})
-			console.log(this.form.is_appoint.hospitalList.length)
+			this.getPhoneData();
+			// this.$nextTick(function() {
+			// 	this.addTime()
+			// })
+			// console.log(this.form.is_appoint.hospitalList.length)
 		},
 		mounted() {
 
@@ -1068,168 +1069,171 @@
 
 			/*    分段器选择  */
 			sectionChange(index) {
+				switch(index){
+					case 0:this.getPhoneData();break;
+					case 1:this.getChatData();break;
+					case 2:this.getMenData();break;
+				}
 				this.curNow = index;
 			},
 
 			/*    保存       */
 			pd() {
-				// 计算号源
 				let that = this
 				//判断有没有填写填写完整
-				console.log(this.form)
-				//电话
-				if (that.showList[0].flag) { //如果打开了电话服务
-					if(this.form.is_phone.base_price == ""){		//电话的基础价格没有填
-						uni.showToast({
-							title:'请填写电话咨询的基础价格,否则无法保存',
-							icon:'none'
-						})
-						return false
-					}
-					if(this.form.is_phone.step_price == ""){		//电话的步进价格没有填
-						uni.showToast({
-							title:'请填写电话咨询的步进价格,否则无法保存',
-							icon:'none'
-						})
-						return false
-					}
-					if(this.form.is_phone.mor_time == ""){		//电话的早上服务时间
-						uni.showToast({
-							title:'请填写电话咨询的上午服务时间,否则无法保存',
-							icon:'none'
-						})
-						return false
-					}
-					if(this.form.is_phone.aft_time == ""){		//电话的下午服务时间
-						uni.showToast({
-							title:'请填写电话咨询的下午服务时间,否则无法保存',
-							icon:'none'
-						})
-						return false
-					}
-					if(this.form.is_phone.nig_time == ""){		//电话的晚上服务时间
-						uni.showToast({
-							title:'请填写电话咨询的晚上服务时间,否则无法保存',
-							icon:'none'
-						})
-						return false
-					}
-					if(this.form.is_phone.person == ""){		//电话的服务人次
-						uni.showToast({
-							title:'请填写电话咨询的服务人次,否则无法保存',
-							icon:'none'
-						})
-						return false
-					}
-				}
-				//图文
-				if (that.showList[1].flag) {	//如果打开了图文服务
-					if(this.form.is_chat.base_price == ""){		//图文的基础价格没有填
-						uni.showToast({
-							title:'请填写图文咨询的基础价格,否则无法保存',
-							icon:'none'
-						})
-						return false
-					}
-					if(this.form.is_chat.mor_time == ""){		//图文的早上服务时间
-						uni.showToast({
-							title:'请填写图文咨询的上午服务时间,否则无法保存',
-							icon:'none'
-						})
-						return false
-					}
-					if(this.form.is_chat.aft_time == ""){		//图文的下午服务时间
-						uni.showToast({
-							title:'请填写图文咨询的下午服务时间,否则无法保存',
-							icon:'none'
-						})
-						return false
-					}
-					if(this.form.is_chat.nig_time == ""){		//图文的晚上服务时间
-						uni.showToast({
-							title:'请填写图文咨询的晚上服务时间,否则无法保存',
-							icon:'none'
-						})
-						return false
-					}
-					if(this.form.is_chat.person == ""){		//图文的服务人次
-						uni.showToast({
-							title:'请填写图文咨询的同时服务人次,否则无法保存',
-							icon:'none'
-						})
-						return false
-					}
-				}
-				//门诊
-				if (that.showList[2].flag) {
-					that.form.is_appoint.hospitalList.forEach(item => {
-						//基础价格
-						if(item.appoint_price == "" ){
-							uni.showToast({
-								title:'请填写'+item.name+'的基础价格,否则无法保存',
-								icon:'none'
-							})
-							return false
-						}
-						//上午
-						if(item.service_time.mon.amStartTime == "" ){
-							uni.showToast({
-								title:'请填写'+item.name+'的上午服务时间,否则无法保存',
-								icon:'none'
-							})
-							return false
-						}
-						//下午
-						if(item.service_time.aft.pmStartTime == "" ){
-							uni.showToast({
-								title:'请填写'+item.name+'的下午服务时间,否则无法保存',
-								icon:'none'
-							})
-							return false
-						}
-						//晚上
-						if(item.service_time.nig.nightStartTime== "" ){
-							uni.showToast({
-								title:'请填写'+item.name+'的晚上服务时间,否则无法保存',
-								icon:'none'
-							})
-							return false
-						}
-						//就诊时长
-						if(item.service_times == "" ){
-							uni.showToast({
-								title:'请填写'+item.name+'的就诊时长,否则无法保存',
-								icon:'none'
-							})
-							return false
+				switch(this.curNow){
+					case 0:		//电话的保存
+						if (that.showList[0].flag) { //如果打开了电话服务
+							if (this.form.is_phone.base_price == "") { //电话的基础价格没有填
+								uni.showToast({
+									title: '请填写电话咨询的基础价格,否则无法保存',
+									icon: 'none'
+								})
+								return false
+							}
+							if (this.form.is_phone.step_price == "") { //电话的步进价格没有填
+								uni.showToast({
+									title: '请填写电话咨询的步进价格,否则无法保存',
+									icon: 'none'
+								})
+								return false
+							}
+							if (this.form.is_phone.mor_time == "") { //电话的早上服务时间
+								uni.showToast({
+									title: '请填写电话咨询的上午服务时间,否则无法保存',
+									icon: 'none'
+								})
+								return false
+							}
+							if (this.form.is_phone.aft_time == "") { //电话的下午服务时间
+								uni.showToast({
+									title: '请填写电话咨询的下午服务时间,否则无法保存',
+									icon: 'none'
+								})
+								return false
+							}
+							if (this.form.is_phone.nig_time == "") { //电话的晚上服务时间
+								uni.showToast({
+									title: '请填写电话咨询的晚上服务时间,否则无法保存',
+									icon: 'none'
+								})
+								return false
+							}
+							if (this.form.is_phone.person == "") { //电话的服务人次
+								uni.showToast({
+									title: '请填写电话咨询的服务人次,否则无法保存',
+									icon: 'none'
+								})
+								return false
+							}
+							this.setPhoneData()
 						}
-						//同时服务订单数
-						if(item.service_num == "" ){
-							uni.showToast({
-								title:'请填写'+item.name+'的同时服务订单数,否则无法保存',
-								icon:'none'
-							})
-							return false
+						
+						break;
+					case 1:		//图文的保存
+						if (that.showList[1].flag) { //如果打开了图文服务
+							if (this.form.is_chat.base_price == "") { //图文的基础价格没有填
+								uni.showToast({
+									title: '请填写图文咨询的基础价格,否则无法保存',
+									icon: 'none'
+								})
+								return false
+							}
+							if (this.form.is_chat.mor_time == "") { //图文的早上服务时间
+								uni.showToast({
+									title: '请填写图文咨询的上午服务时间,否则无法保存',
+									icon: 'none'
+								})
+								return false
+							}
+							if (this.form.is_chat.aft_time == "") { //图文的下午服务时间
+								uni.showToast({
+									title: '请填写图文咨询的下午服务时间,否则无法保存',
+									icon: 'none'
+								})
+								return false
+							}
+							if (this.form.is_chat.nig_time == "") { //图文的晚上服务时间
+								uni.showToast({
+									title: '请填写图文咨询的晚上服务时间,否则无法保存',
+									icon: 'none'
+								})
+								return false
+							}
+							if (this.form.is_chat.person == "") { //图文的服务人次
+								uni.showToast({
+									title: '请填写图文咨询的同时服务人次,否则无法保存',
+									icon: 'none'
+								})
+								return false
+							}
+							this.setChatData()
 						}
-						//可预约天数
-						if(item.show_days == "" ){
-							uni.showToast({
-								title:'请填写'+item.name+'的可预约天数,否则无法保存',
-								icon:'none'
+						break;
+					case 2:		//门诊的保存
+						if (that.showList[2].flag) {
+							that.form.is_appoint.hospitalList.forEach(item => {
+								//基础价格
+								if (item.appoint_price == "") {
+									uni.showToast({
+										title: '请填写' + item.name + '的基础价格,否则无法保存',
+										icon: 'none'
+									})
+									return false
+								}
+								//上午
+								if (item.service_time.mon.amStartTime == "") {
+									uni.showToast({
+										title: '请填写' + item.name + '的上午服务时间,否则无法保存',
+										icon: 'none'
+									})
+									return false
+								}
+								//下午
+								if (item.service_time.aft.pmStartTime == "") {
+									uni.showToast({
+										title: '请填写' + item.name + '的下午服务时间,否则无法保存',
+										icon: 'none'
+									})
+									return false
+								}
+								//晚上
+								if (item.service_time.nig.nightStartTime == "") {
+									uni.showToast({
+										title: '请填写' + item.name + '的晚上服务时间,否则无法保存',
+										icon: 'none'
+									})
+									return false
+								}
+								//就诊时长
+								if (item.service_times == "") {
+									uni.showToast({
+										title: '请填写' + item.name + '的就诊时长,否则无法保存',
+										icon: 'none'
+									})
+									return false
+								}
+								//同时服务订单数
+								if (item.service_num == "") {
+									uni.showToast({
+										title: '请填写' + item.name + '的同时服务订单数,否则无法保存',
+										icon: 'none'
+									})
+									return false
+								}
+								//可预约天数
+								if (item.show_days == "") {
+									uni.showToast({
+										title: '请填写' + item.name + '的可预约天数,否则无法保存',
+										icon: 'none'
+									})
+									return false
+								}
 							})
-							return false
+							this.setMenData()
 						}
-					})
+						break;
 				}
-
-				// uni.showModal({
-				// 	title: "请确定信息填写完整,否则无法保存",
-				// 	success: function(res) {
-				// 		if (res.confirm) {
-							that.bc()
-				// 		}
-				// 	}
-				// });
 			},
 
 
@@ -1304,301 +1308,448 @@
 
 			},
 			/**
-			 * @author Liu Yuanhang
-			 * 获取页面显示状态以及数据
-			 */
-			getShows: async function() {
-				let res = await this.$request.post('doctor/getSettingListnew', {
+			 * 保存电话设置
+			 * */
+			setPhoneData: async function() {
+				let that = this;
+				let 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] : '';
+				console.log("保存电话设置",forms.is_phone)
+				console.log("保存电话设置",forms)
+				let sp = await this.$request.post('doctor/getSettingPhone', {
+					data: forms.is_phone,
+				});
+				if (sp.status == 0) {
+					uni.showToast({
+						icon: 'none',
+						duration: 1500,
+						title: '操作成功',
+				
+					})
+				}
+			},
+			/**
+			 *保存图文设置
+			 * */
+			setChatData: async function() {
+				let that = this;
+				let forms = JSON.parse(JSON.stringify(that.form));
+				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 sc = await this.$request.post('doctor/getSettingChat', {
+					data: forms.is_chat,
 					'type': 2
 				});
-				console.log("res", res);
-				if (res.status == 0) {
-					// 1.控制列表显示,2.渲染数据
-					//ltb 分段器赋值
-					this.showList[0].flag = res.data.show.is_phone;
-					this.showList[1].flag = res.data.show.is_chat;
-					this.showList[2].flag = res.data.show.is_appoint;
-
-					// 渲染显示的基础价格设置
-					this.form.is_phone.person = '';
-					this.form.is_chat.person = '';
-					this.form.is_appoint.person = '';
-
-					if (res.data.list.phone.length != 0) {
-						// 渲染电话的基础数据
-						this.form.is_phone.base_price = res.data.list.phone.base_price;
-						this.form.is_phone.step_price = res.data.list.phone.step_price;
-
-						this.form.is_phone.mor_time = res.data.list.phone.service_time[1] != undefined ? res.data.list.phone.service_time[
-							1].amStartTime + ' - ' + res.data.list.phone.service_time[1].amEndTime : '';
-						this.form.is_phone.aft_time = res.data.list.phone.service_time[2] != undefined ? res.data.list.phone.service_time[
-							2].pmStartTime + ' - ' + res.data.list.phone.service_time[2].pmEndTime : '';
-						this.form.is_phone.nig_time = res.data.list.phone.service_time[3] != undefined ? res.data.list.phone.service_time[
-							3].nightStartTime + ' - ' + res.data.list.phone.service_time[3].nightEndTime : '';
-
-						this.form.is_phone.person = res.data.list.phone.person;
-					}
-
-					if (res.data.list.chat.length != 0) {
-						// 渲染图文的基础数据
-						this.form.is_chat.base_price = res.data.list.chat.base_price;
-						this.form.is_chat.step_price = res.data.list.chat.step_price;
-						this.form.is_chat.person = res.data.list.chat.person;
-
-						this.form.is_chat.mor_time = res.data.list.chat.service_time[1] != undefined ? res.data.list.chat.service_time[
-								1]
-							.amStartTime + ' - ' + res.data.list.chat.service_time[1].amEndTime : '';
-						this.form.is_chat.aft_time = res.data.list.chat.service_time[2] != undefined ? res.data.list.chat.service_time[
-								2]
-							.pmStartTime + ' - ' + res.data.list.chat.service_time[2].pmEndTime : '';
-						this.form.is_chat.nig_time = res.data.list.chat.service_time[3] != undefined ? res.data.list.chat.service_time[
-								3]
-							.nightStartTime + ' - ' + res.data.list.chat.service_time[3].nightEndTime : '';
-
-					}
-
-					if (res.data.list.men.length != 0) {
-						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;
+				console.log("保存电话设置",sc)
+			},
+			/**
+			 * 保存门诊设置
+			 * */
+			setMenData: async function() {
+				let that = this;
+				let forms = JSON.parse(JSON.stringify(that.form));
+				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,
+					})
 				}
-				// this.reanders(res.data);
+				let sm = await this.$request.post('doctor/getSettingChat', {
+					data: forms.is_appoint,
+					'type': 2
+				});
+				console.log("保存电话设置",sm)
 			},
 			/**
-			 * 渲染选中数据
-			 * @author Liu Yuan hang
-			 * @param {Object} e
-			 */
-			reanders(e) {
-				uni.showLoading({
-					title: '渲染中',
-					mask: true
+			 * 电话数据获取
+			 * */
+			getPhoneData: async function() {
+				let gp = await this.$request.post('doctor/getSettingPhone', {
+					'type': 2
 				});
-				let oks, dh1, dh2, dh3, tw1, tw2, tw3;
-
-				// 电话
-				if (e.list.phone.length != 0) {
-					dh1 = this.dh.timeList1;
-					dh2 = this.dh.timeList2;
-					dh3 = this.dh.timeList3;
-					let phone = e.list.phone.service_time.split(',');
-					var phones = []; //保存转换后的整型字符串
-					phone.forEach(function(data, index, arr) {
-						phones.push(+data);
-					});
-					console.log('我是电话', phones)
-
-					for (let i = 0; i < dh1.length; i++) {
-						if (phones.indexOf(dh1[i].id) != -1) {
-							dh1[i].checked = true
-						}
-					}
-
-					for (let i = 0; i < dh2.length; i++) {
-						if (phones.indexOf(dh2[i].id) != -1) {
-							dh2[i].checked = true
-						}
+				console.log("电话数据获取", gp);
+				if (gp.status == 0) {
+					let data = gp.data.list
+					this.form.is_phone.base_price = data.base_price; //基础价格
+					this.form.is_phone.step_price = data.step_price; //步进价格
+					//早上  下午  晚上 
+					this.form.is_phone.mor_time = data.service_time[1] != undefined ? data.service_time[1].amStartTime + ' - ' + data
+						.service_time[1].amEndTime : '';
+					this.form.is_phone.aft_time = data.service_time[2] != undefined ? data.service_time[2].pmStartTime + ' - ' + data
+						.service_time[2].pmEndTime : '';
+					this.form.is_phone.nig_time = data.service_time[3] != undefined ? data.service_time[3].nightStartTime + ' - ' +
+						data.service_time[3].nightEndTime : '';
+					this.form.is_phone.person = data.person; //服务人次
+				}
+			},
+			/**
+			 * 图文数据获取
+			 * */
+			getChatData: async function() {
+				let gt = await this.$request.post('doctor/getSettingChat', {
+					'type': 2
+				});
+				console.log("图文数据获取", gt);
+				if (gt.status == 0) {
+					let data = gt.data.list
+					this.form.is_chat.base_price = data.base_price; //基础价格
+					// this.form.is_chat.step_price = data.chat.step_price; //步进价格
+					this.form.is_chat.person = data.person; //服务人次
+					//早上  下午  晚上
+					this.form.is_chat.mor_time = data.service_time[1] != undefined ? data.service_time[1].amStartTime + ' - ' + data.service_time[
+						1].amEndTime : '';
+					this.form.is_chat.aft_time = data.service_time[2] != undefined ? data.service_time[2].pmStartTime + ' - ' + data.service_time[
+						2].pmEndTime : '';
+					this.form.is_chat.nig_time = data.service_time[3] != undefined ? data.service_time[3].nightStartTime + ' - ' +
+						data.service_time[3].nightEndTime : '';
+				}
+			},
+			/**
+			 * 门诊数据获取
+			 * */
+			getMenData: async function() {
+				let gm = await this.$request.post('doctor/getSettingSchedule', {
+					'type': 2
+				});
+				console.log("门诊数据获取", gm);
+				if (gm.status == 0) {
+					let dataList = gm.data.list
+					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 //晚上可预约号源
+								}
+							},
+						})
 					}
-
-					for (let i = 0; i < dh3.length; i++) {
-						if (phones.indexOf(dh3[i].id) != -1) {
-							dh3[i].checked = true
-						}
+				
+					console.log("计算出来的每个医院服务时长(单位:分钟)", this.slot)
+					this.form.is_appoint.hospitalList = lists;
+					if (this.form.is_appoint.hospitalList.length == 1) {
+						this.hospitalcurrent = 0
 					}
 				}
+			},
+			/**
+			 * 获取服务开通状态
+			 * */
+			getShows: async function() {
+				// 清空价格
+				this.form.is_phone.person = '';
+				this.form.is_chat.person = '';
+				this.form.is_appoint.person = '';
 
-				// 图文资讯渲染
-				if (e.list.chat.length != 0) {
-					tw1 = this.tw.timeList1;
-					tw2 = this.tw.timeList2;
-					tw3 = this.tw.timeList3;
-					let chats = e.list.chat.service_time.split(',');
-					var chat = []; //保存转换后的整型字符串
-					chats.forEach(function(data, index, arr) {
-						chat.push(+data);
-					});
-					console.log('我是图文', chat)
-					for (let i = 0; i < tw1.length; i++) {
-						if (chat.indexOf(tw1[i].id) != -1) {
-							tw1[i].checked = true
-						}
-					}
-					for (let i = 0; i < tw2.length; i++) {
-						if (chat.indexOf(tw2[i].id) != -1) {
-							tw2[i].checked = true
-						}
-					}
-					for (let i = 0; i < tw3.length; i++) {
-						if (chat.indexOf(tw3[i].id) != -1) {
-							tw3[i].checked = true
-						}
-					}
+				//总控   全部的服务开通状态
+				let res = await this.$request.post('doctor/getSettingBase', {
+					'type': 2
+				});
+				console.log("总控数据获取", res);
+				if (res.status == 0) {
+					// 1.控制列表显示,2.渲染数据
+					//ltb 分段器赋值
+					this.showList[0].flag = res.data.is_phone;
+					this.showList[1].flag = res.data.is_chat;
+					this.showList[2].flag = res.data.is_appoint;
 				}
 
-				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 gp = await this.$request.post('doctor/getSettingPhone', {
+				// 	'type': 2
+				// });
+				// console.log("电话数据获取", gp);
+				// if (gp.status == 0) {
+				// 	let data = gp.data.list
+				// 	this.form.is_phone.base_price = data.base_price; //基础价格
+				// 	this.form.is_phone.step_price = data.step_price; //步进价格
+				// 	//早上  下午  晚上 
+				// 	this.form.is_phone.mor_time = data.service_time[1] != undefined ? data.service_time[1].amStartTime + ' - ' + data
+				// 		.service_time[1].amEndTime : '';
+				// 	this.form.is_phone.aft_time = data.service_time[2] != undefined ? data.service_time[2].pmStartTime + ' - ' + data
+				// 		.service_time[2].pmEndTime : '';
+				// 	this.form.is_phone.nig_time = data.service_time[3] != undefined ? data.service_time[3].nightStartTime + ' - ' +
+				// 		data.service_time[3].nightEndTime : '';
+				// 	this.form.is_phone.person = data.person; //服务人次
+				// }
+
+				// //图文  数据获取
+				// let gt = await this.$request.post('doctor/getSettingChat', {
+				// 	'type': 2
+				// });
+				// console.log("图文数据获取", gt);
+				// if (gt.status == 0) {
+				// 	let data = gt.data.list
+				// 	this.form.is_chat.base_price = data.base_price; //基础价格
+				// 	// this.form.is_chat.step_price = data.chat.step_price; //步进价格
+				// 	this.form.is_chat.person = data.person; //服务人次
+				// 	//早上  下午  晚上
+				// 	this.form.is_chat.mor_time = data.service_time[1] != undefined ? data.service_time[1].amStartTime + ' - ' + data.service_time[
+				// 		1].amEndTime : '';
+				// 	this.form.is_chat.aft_time = data.service_time[2] != undefined ? data.service_time[2].pmStartTime + ' - ' + data.service_time[
+				// 		2].pmEndTime : '';
+				// 	this.form.is_chat.nig_time = data.service_time[3] != undefined ? data.service_time[3].nightStartTime + ' - ' +
+				// 		data.service_time[3].nightEndTime : '';
+				// }
+				// let gm = await this.$request.post('doctor/getSettingSchedule', {
+				// 	'type': 2
+				// });
+				// console.log("门诊数据获取", gm);
+				// if (gm.status == 0) {
+				// 	let dataList = gm.data.list
+				// 	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 //晚上可预约号源
+				// 				}
+				// 			},
+				// 		})
+				// 	}
 
-					let p = 0;
-					var names = '';
-					if (mzCont == 1) {
-						for (let k = 0; k < this.mz1.timeList1.length; k++) {
-							if (men1s.indexOf(this.mz1.timeList1[k].id) != -1) {
-								this.mz1.timeList1[k].checked = true
-							}
-						}
-						for (let k = 0; k < this.mz1.timeList2.length; k++) {
-							if (men1s.indexOf(this.mz1.timeList2[k].id) != -1) {
-								this.mz1.timeList2[k].checked = true
-							}
-						}
-						for (let k = 0; k < this.mz1.timeList3.length; k++) {
-							if (men1s.indexOf(this.mz1.timeList3[k].id) != -1) {
-								this.mz1.timeList3[k].checked = true
-							}
-						}
-					} else if (mzCont == 2) {
-						for (let k = 0; k < this.mz1.timeList1.length; k++) {
-							if (men1s.indexOf(this.mz1.timeList1[k].id) != -1) {
-								this.mz1.timeList1[k].checked = true
-							}
-						}
-						for (let k = 0; k < this.mz1.timeList2.length; k++) {
-							if (men1s.indexOf(this.mz1.timeList2[k].id) != -1) {
-								this.mz1.timeList2[k].checked = true
-							}
-						}
-						for (let k = 0; k < this.mz1.timeList3.length; k++) {
-							if (men1s.indexOf(this.mz1.timeList3[k].id) != -1) {
-								this.mz1.timeList3[k].checked = true
-							}
-						}
+				// 	console.log("计算出来的每个医院服务时长(单位:分钟)", this.slot)
+				// 	this.form.is_appoint.hospitalList = lists;
+				// 	if (this.form.is_appoint.hospitalList.length == 1) {
+				// 		this.hospitalcurrent = 0
+				// 	}
+				// }
+
+
+
+				// if (res.data.list.phone.length != 0) {
+				// 	// 渲染电话的基础数据
+				// 	this.form.is_phone.base_price = res.data.list.phone.base_price;
+				// 	this.form.is_phone.step_price = res.data.list.phone.step_price;
+
+				// 	this.form.is_phone.mor_time = res.data.list.phone.service_time[1] != undefined ? res.data.list.phone.service_time[
+				// 		1].amStartTime + ' - ' + res.data.list.phone.service_time[1].amEndTime : '';
+				// 	this.form.is_phone.aft_time = res.data.list.phone.service_time[2] != undefined ? res.data.list.phone.service_time[
+				// 		2].pmStartTime + ' - ' + res.data.list.phone.service_time[2].pmEndTime : '';
+				// 	this.form.is_phone.nig_time = res.data.list.phone.service_time[3] != undefined ? res.data.list.phone.service_time[
+				// 		3].nightStartTime + ' - ' + res.data.list.phone.service_time[3].nightEndTime : '';
+
+				// 	this.form.is_phone.person = res.data.list.phone.person;
+				// }
+
+				// if (res.data.list.chat.length != 0) {
+				// 	// 渲染图文的基础数据
+				// 	this.form.is_chat.base_price = res.data.list.chat.base_price;
+				// 	this.form.is_chat.step_price = res.data.list.chat.step_price;
+				// 	this.form.is_chat.person = res.data.list.chat.person;
+
+				// 	this.form.is_chat.mor_time = res.data.list.chat.service_time[1] != undefined ? res.data.list.chat.service_time[
+				// 			1]
+				// 		.amStartTime + ' - ' + res.data.list.chat.service_time[1].amEndTime : '';
+				// 	this.form.is_chat.aft_time = res.data.list.chat.service_time[2] != undefined ? res.data.list.chat.service_time[
+				// 			2]
+				// 		.pmStartTime + ' - ' + res.data.list.chat.service_time[2].pmEndTime : '';
+				// 	this.form.is_chat.nig_time = res.data.list.chat.service_time[3] != undefined ? res.data.list.chat.service_time[
+				// 			3]
+				// 		.nightStartTime + ' - ' + res.data.list.chat.service_time[3].nightEndTime : '';
+
+				// }
+
+				// if (res.data.list.men.length != 0) {
+				// 	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 //晚上可预约号源
+				// 				}
+				// 			},
+				// 		})
+				// 	}
 
-						for (let k = 0; k < this.mz2.timeList1.length; k++) {
-							if (men2s.indexOf(this.mz2.timeList1[k].id) != -1) {
-								this.mz2.timeList1[k].checked = true
-							}
-						}
-						for (let k = 0; k < this.mz2.timeList2.length; k++) {
-							if (men2s.indexOf(this.mz2.timeList2[k].id) != -1) {
-								this.mz2.timeList2[k].checked = true
-							}
-						}
-						for (let k = 0; k < this.mz2.timeList3.length; k++) {
-							if (men2s.indexOf(this.mz2.timeList3[k].id) != -1) {
-								this.mz2.timeList3[k].checked = true
-							}
-						}
-					}
-				}
-				console.log(e.list);
-				uni.hideLoading();
-			},
-			dhchange(index) {
-				this.dhcurrent = index
-			},
-			twchange(index) {
-				this.twcurrent = index
-			},
-			mzchange1(index) {
-				this.mzcurrent1 = index
-			},
-			mzchange2(index) {
-				this.mzcurrent2 = index
+				// 	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;
+
+				// this.reanders(res.data);
 			},
+			/**
+			 * 选择医院   判断有没有认证的医院
+			 * */
 			xzyy() {
 				console.log(this.form.is_appoint.hospitalList.length)
 				console.log(this.form.is_appoint.hospitalList)

+ 2 - 2
pages/service/setservice.vue

xqd xqd
@@ -80,7 +80,7 @@
 			 * 查询开启状态(未完成暂时没有审核表)
 			 */
 			getStatus:async function(){
-				let res = await this.$request.post('doctor/getSettingList',{'type':1});
+				let res = await this.$request.post('doctor/getSettingBase',{'type':1});
 				console.log('我是res',res);
 				if(res.status==0){
 					this.serbicelist[0].state = res.data.is_phone;
@@ -127,7 +127,7 @@
 				if(typeof data != 'string'){
 					data = JSON.stringify(data);
 				}
-				let res = await this.$request.post('doctor/saveSettingList',{'type':1,'data':data});
+				let res = await this.$request.post('doctor/saveSettingBase',{'type':1,'data':data});
 				console.log(res);
 				if(res.status==0){
 					uni.showToast({