ソースを参照

Ltb2020年11月12日14:24:55
排班时间获取完成

老狐\25396 4 年 前
コミット
64751ead86
4 ファイル変更298 行追加330 行削除
  1. 1 1
      pages.json
  2. 157 99
      pages/Scheduling.vue
  3. 58 48
      pages/login/doctorRenzheng.vue
  4. 82 182
      pages/service/more.vue

+ 1 - 1
pages.json

xqd
@@ -196,7 +196,7 @@
 		"current": 0, //当前激活的模式(list 的索引项)
 		"list": [{
 			"name": "test", //模式名称
-			"path": "pages/service/setservice", //启动页面,必选
+			"path": "pages/Scheduling", //启动页面,必选
 			"query": "" //启动参数,在页面的onLoad函数里面得到
 		}]
 	}

+ 157 - 99
pages/Scheduling.vue

xqd xqd xqd xqd xqd xqd xqd
@@ -1,9 +1,9 @@
 <template>
 	<view style="width: 100%;height: 100%;">
 		<!-- 新 -->
-		<u-select v-model="show" :list="list" @confirm=""></u-select>
+		<u-select v-model="show" :list="list" @confirm="choiceNew"></u-select>
 		<!-- 历史 -->
-		<u-select v-model="oldshow" :list="oldlist"  @confirm="cliold"></u-select>
+		<u-select v-model="oldshow" :list="oldlist" @confirm=""></u-select>
 		<!-- 医院 -->
 		<u-select v-model="hospitalshow" :list="hospitalList" @confirm="confirmhospital"></u-select>
 		<!-- 新增-->
@@ -89,13 +89,13 @@
 				<!-- 晚上 -->
 				<view class="title" style="width: 26%;">晚上</view>
 			</view>
-			
+
 			<!-- 表格一条内容  循环七遍-->
 			<view v-for="(item,index) in oldWeek" :key='index'>
 				<u-line color="#cecece" />
 				<!-- 星期一 -->
 				<view class="flex" style="background-color: #FFFFFF;">
-			
+
 					<view class="content" style="width: 20%;font-weight: bold;">
 						<view>
 							<view style="text-align: center;">{{item.value}}</view>
@@ -104,17 +104,17 @@
 					</view>
 					<u-line color="#cecece" direction="col" />
 					<!-- 上午 -->
-					<view class="content" style="width: 26%;" >
+					<view class="content" style="width: 26%;">
 						<view style="width: 80%;text-align: center;word-break:break-all">{{item.morning}}</view>
 					</view>
 					<u-line color="#cecece" direction="col" />
 					<!-- 下午 -->
-					<view class="content" style="width: 26%;" >
+					<view class="content" style="width: 26%;">
 						<view style="width: 80%;text-align: center;word-break:break-all">{{item.afternoon}}</view>
 					</view>
 					<u-line color="#cecece" direction="col" />
 					<!-- 晚上 -->
-					<view class="content" style="width: 26%;" >
+					<view class="content" style="width: 26%;">
 						<view style="width: 80%;text-align: center;word-break:break-all">{{item.night}}</view>
 					</view>
 				</view>
@@ -130,31 +130,23 @@
 
 <script>
 	export default {
-		onLoad() {
-			this.time = this.getTime();
-			this.gethospitalList();
-			this.getOldList();
-			console.log(this.time)
-		},
 		data() {
 			return {
-				//时间
-				time:'',
 				//切换历史和新增
 				old: false,
 				//新增的排班选择   最多排四周
 				show: false,
 				list: [{
-					value: '1',
+					value: '0',
 					label: '2020.10.26 - 2020-11-1'
 				}, {
-					value: '2',
+					value: '1',
 					label: '2020.11.2 - 2020-11-8'
 				}, {
-					value: '3',
+					value: '2',
 					label: '2020.11.9 - 2020-11-15'
 				}, {
-					value: '4',
+					value: '3',
 					label: '2020.11.16 - 2020-11-22'
 				}],
 				//历史的排班选择
@@ -217,7 +209,49 @@
 					night: ''
 				}],
 				//历史记录的数组
-				oldWeek: [],
+				oldWeek: [{
+					title: '周一',
+					value: '10-26',
+					morning: '历史',
+					afternoon: '历史',
+					night: '历史'
+				}, {
+					title: '周二',
+					value: '10-27',
+					morning: '历史',
+					afternoon: '历史',
+					night: '历史'
+				}, {
+					title: '周三',
+					value: '10-28',
+					morning: '历史',
+					afternoon: '历史',
+					night: '历史'
+				}, {
+					title: '周四',
+					value: '10-29',
+					morning: '历史',
+					afternoon: '历史',
+					night: '历史'
+				}, {
+					title: '周五',
+					value: '10-30',
+					morning: '历史',
+					afternoon: '历史',
+					night: '历史'
+				}, {
+					title: '周六',
+					value: '10-31',
+					morning: '历史',
+					afternoon: '历史',
+					night: '历史'
+				}, {
+					title: '周日',
+					value: '11-01',
+					morning: '历史',
+					afternoon: '历史',
+					night: '历史'
+				}],
 				//选择医院
 				hospital: '',
 				hospitalList: [],
@@ -230,23 +264,16 @@
 			}
 		},
 		methods: {
-			getOldList:async function(){
-				let res = await this.$request.post("doctor/getLinsList");
-				if(res.status==0){
-					if(res.data!=null){
-						let datas = JSON.parse(JSON.stringify(res.data))
-						let lists = []
-						var obj;
-						for(let i=0;i<datas.length;i++){
-							obj = {
-								value:datas[i].start_time.id+' 至 '+datas[i].end_time.id,
-								label:datas[i].start_time.schedule_date+' 至 '+datas[i].end_time.schedule_date,
-							}
-							lists.push(obj)
-						}
-						this.oldlist = lists
-					}
-				}			
+			//点击新增周
+			choiceNew(e){
+				console.log(e)
+				var bData = new Date();
+				bData.setTime(bData.getTime() + 24 * 60 * 60 * 1000 * (8 - bData.getDay()+(7*e[0].value)))
+				for(let i=0;i<7;i++){
+					var week =(bData.getMonth() + 1) + "-" + bData.getDate();
+					bData.setTime(bData.getTime() + 24 * 60 * 60 * 1000 * 1);
+					this.hospitalWeek[i].value = week
+				}
 			},
 			// 早下晚的点击事件
 			clickMorning(index) {
@@ -280,84 +307,115 @@
 				}
 
 			},
-			cliold:async function(e){
-				let times = e[0].label;
-				times = times.split(" 至 ");
-				let startime = times[0];
-				let endtime = times[1];
-				let res = await this.$request.post("doctor/getLinsDetail",{'start_date':startime,'end_date':endtime});
-				if(res.status==0){
-					if(res.data!=null){
-						let data = res.data;
-						let arr =[];
-						let obj;
-						for(let i=0;i<7;i++){
-							obj = {
-								title: data[i].week,
-								value: data[i].schedule_date,
-								morning: data[i].type.zao?data[i].name:'暂无',
-								afternoon: data[i].type.xia?data[i].name:'暂无',
-								night: data[i].type.wan?data[i].name:'暂无',
-							}
-							arr.push(obj)
-						}
-						this.oldWeek = arr
-					}
-				}
-	
-			},
-			
-			 
-
 
 			//保存
 			bc(e) {
 				uni.switchTab({
-					url:'/pages/index/index'
+					url: '/pages/index/index'
 				})
 			},
 			//获取时间
-			getTime(){
-			      var date = new Date();
-			      var seperator1 = "-";
-			      var seperator2 = ":";
-			      //以下代码依次是获取当前时间的年月日时分秒
-			      var year = date.getFullYear();
-			      var month = date.getMonth() + 1;
-			      var strDate = date.getDate();
-			      var minute = date.getMinutes();
-			      var hour = date.getHours();
-			      var second = date.getSeconds();
-			      //固定时间格式
-			      if (month >= 1 && month <= 9) {
-			        month = "0" + month;
-			      }
-			      if (strDate >= 0 && strDate <= 9) {
-			        strDate = "0" + strDate;
-			      }
-			      var currentdate =  year + seperator1 + month + seperator1 + strDate 
-				  
-				  
-				  // var dateArray = nowTime.split("-");
-				  // var date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
-				  // var week = "星期" + "日一二三四五六".charAt(date.getDay());
-				  // this.nowWeek = week // 赋值本地数据
-				  // alert(week)
-				  return currentdate;
+			getTime() {
+				var week = [{
+					value: 1,
+					label: ''
+				}, {
+					value: 2,
+					label: ''
+				}, {
+					value: 3,
+					label: ''
+				}, {
+					value: 4,
+					label: ''
+				}]
+
+				//直接获取这周五的时间,然后遍历 给选择器
+				var aData = new Date();
+				aData.setTime(aData.getTime() + 24 * 60 * 60 * 1000 * (7 - aData.getDay()))
+				for(let i=0;i<4;i++){
+					aData.setTime(aData.getTime() + 24 * 60 * 60 * 1000 *1)
+					var week1 = aData.getFullYear() + "." + (aData.getMonth() + 1) + "." + aData.getDate();
+					console.log('第',i+1,'个周一的时间', week1) //周一的时间
+					//周日
+					aData.setTime(aData.getTime() + 24 * 60 * 60 * 1000 * (aData.getDay()+5))
+					var week2 = aData.getFullYear() + "." + (aData.getMonth() + 1) + "." + aData.getDate();
+					console.log('第',i+1,'个周日的时间', week2) //周日的时间
+					this.list[i].label = week1 + ' - ' + week2 //给选择器数组
+				}
+				//直接获取下周一时间,给表格
+				var bData = new Date();
+				bData.setTime(bData.getTime() + 24 * 60 * 60 * 1000 * (8 - bData.getDay()))
+				for(let i=0;i<7;i++){
+					var week =(bData.getMonth() + 1) + "-" + bData.getDate();
+					bData.setTime(bData.getTime() + 24 * 60 * 60 * 1000 * 1);
+					this.hospitalWeek[i].value = week
+				}
+				
+				
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+				//    var date = new Date();
+				//    var seperator1 = "-";
+				//    var seperator2 = ":";
+				//    //以下代码依次是获取当前时间的年月日时分秒
+				//    var year = date.getFullYear();
+				//    var month = date.getMonth() + 1;
+				//    var strDate = date.getDate();
+				//    var minute = date.getMinutes();
+				//    var hour = date.getHours();
+				//    var second = date.getSeconds();
+				//    //固定时间格式
+				//    if (month >= 1 && month <= 9) {
+				//      month = "0" + month;
+				//    }
+				//    if (strDate >= 0 && strDate <= 9) {
+				//      strDate = "0" + strDate;
+				//    }
+				//    var currentdate =  year + seperator1 + month + seperator1 + strDate 
+
+
+				// var dateArray = nowTime.split("-");
+				// var date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]);
+				// var week = "星期" + "日一二三四五六".charAt(date.getDay());
+				// this.nowWeek = week // 赋值本地数据
+				// alert(week)
+				// return currentdate;
 			},
-			
+
 			/**
 			 * 获取医院
 			 */
-			gethospitalList:async function(){
+			gethospitalList: async function() {
 				let that = this;
 				let res = await that.$request.post("doctor/organizationList");
-				if(res.status==0){
+				if (res.status == 0) {
 					that.hospitalList = res.data
 				}
-				console.log('我是医院',res);
+				console.log('我是医院', res);
 			}
-		}
+		},
+		onLoad() {
+			this.getTime();
+			// this.gethospitalList();
+			// console.log(this.time)
+		},
 	}
 </script>
 

+ 58 - 48
pages/login/doctorRenzheng.vue

xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd xqd
@@ -31,7 +31,7 @@
 					<view>医生姓名</view>
 				</view>
 				<view style="width: 70%;">
-					<u-input v-model="form.name"  type="text" :border="false" placeholder="请填写真实姓名" input-align="right" />
+					<u-input v-model="form.name" type="text" :border="false" placeholder="请填写真实姓名" input-align="right" />
 				</view>
 			</view>
 			<u-line color="#f0f2f5" />
@@ -207,7 +207,7 @@
 			</view>
 			<!-- 上传 -->
 			<view>
-				<u-upload :action="action" :file-list="certificate" max-count="2"></u-upload>
+				<u-upload :action="action" :file-list="form.certificate" max-count="2" ref="Upractice" :auto-upload="true"></u-upload>
 			</view>
 		</view>
 		<view style="border-bottom: 0.5rpx solid #EFEFEF;padding: 10rpx 25rpx;">
@@ -217,7 +217,7 @@
 			</view>
 			<!-- 上传 -->
 			<view>
-				<u-upload :action="action" :file-list="idPhoto" max-count="2"></u-upload>
+				<u-upload :action="action" :file-list="form.idPhoto" max-count="2" ref="Ucard_photo" :auto-upload="true"></u-upload>
 			</view>
 
 		</view>
@@ -228,7 +228,7 @@
 			</view>
 			<!-- 上传 -->
 			<view>
-				<u-upload :action="action" :file-list="doctorQualification" max-count="2"></u-upload>
+				<u-upload :action="action" :file-list="form.doctorQualification" max-count="2" ref="Uis_quali" :auto-upload="true"></u-upload>
 			</view>
 
 		</view>
@@ -249,6 +249,7 @@
 		mounted() {},
 		data() {
 			return {
+				action: 'https://xiaoyunimg.top/api/v2/Common/uploadFile',
 				//保存选择的列数
 				province: '', //省
 				city: '', //市
@@ -260,13 +261,13 @@
 					name: '', //姓名
 					sex: '', //性别
 					ID: '', //身份证
-					works:[  // 入库数组
-						{ 
+					works: [ // 入库数组
+						{
 							hospital: '', //医院id
 							department: '', //科室id
 							qualifications: '' //资质id
 						},
-						{ 
+						{
 							hospital: '', //医院id
 							department: '', //科室id
 							qualifications: '' //资质id
@@ -290,12 +291,16 @@
 						department: '科室名称', //科室
 						qualifications: '默认资质' //资质
 					},
-					// certificate: [], //证书
-					// idPhoto: [], //身份证
-					// doctorQualification: [] ,//医生资格
-					practice: ["https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg",'https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg'], // 医师执业证书(清晰照片和信息页面) 必须两个都传,不可以只上传一个
-					card_photo: ["https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg","https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg"], //身份证 , 必须两个都传,不可以只上传一个
-					is_quail: ["https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg","https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg"] //医生资格, 必须两个都传,不可以只上传一个
+					// url: 图片地址
+					// error:组件内部使用,不应根据此值判断上传是否成功,而应根据progress属性
+					// progress:如果值为100,表示图片上传成功
+					// response:上传成功后,服务器返回的数据,这是最有用的了
+					certificate: [], //证书
+					idPhoto: [], //身份证
+					doctorQualification: [], //医生资格
+					// practice: ["https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg",'https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg'], // 医师执业证书(清晰照片和信息页面) 必须两个都传,不可以只上传一个
+					// card_photo: ["https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg","https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg"], //身份证 , 必须两个都传,不可以只上传一个
+					// is_quail: ["https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg","https://dss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3363295869,2467511306&fm=26&gp=0.jpg"] //医生资格, 必须两个都传,不可以只上传一个
 				},
 				//性别选择
 				sexshow: false,
@@ -364,27 +369,7 @@
 			}
 		},
 		methods: {
-			// <!-- 性别选择器 -->
-			// <u-select v-model="sexshow" :list="sexlist" @confirm="sexconfirm"></u-select>
-			// <!-- 省 -->
-			// <u-select v-model="provinceshow" :list="provincelist" @confirm="sheng" value-name="id" label-name="name"></u-select>
-			// <u-select v-model="provinceshow2" :list="provincelist2" @confirm="sheng2" value-name="id" label-name="name"></u-select>
-			// <!-- 市 -->
-			// <u-select v-model="cityshow" :list="citylist" @confirm="shi" value-name="id" label-name="name"></u-select>
-			// <u-select v-model="cityshow2" :list="citylist2" @confirm="shi2" value-name="id" label-name="name"></u-select>
-			// <!-- 区县 -->
-			// <u-select v-model="areashow" :list="arealist" @confirm="qu" value-name="id" label-name="name"></u-select>
-			// <u-select v-model="areashow2" :list="arealist2" @confirm="qu2" value-name="id" label-name="name"></u-select>
-			// <!-- 医院 -->
-			// <u-select v-model="hospitalshow" :list="hospitallist" @confirm="yy" value-name="id" label-name="name"></u-select>
-			// <u-select v-model="hospitalshow2" :list="hospitallist2" @confirm="yy2" value-name="id" label-name="name"></u-select>
-			// <!-- 科室 -->
-			// <u-select v-model="departmentshow" :list="departmentlist" @confirm="ks" value-name="id" label-name="name"></u-select>
-			// <u-select v-model="departmentshow2" :list="departmentlist2" @confirm="ks2" value-name="id" label-name="name"></u-select>
-			// <!-- 资质 -->
-			// <u-select v-model="qualificationsshow" :list="qualificationslist" @confirm="zz" value-name="id"
-			//  label-name="name"></u-select>
-			// <u-select v-model="qualificationsshow2" :list="qualificationslist2" @confirm="zz2" value-name="id" label-name="name"></u-select>
+			
 			/*****************view点击**********************/
 			//省
 			viewsheng1(e) {
@@ -559,28 +544,28 @@
 			},
 			//医院选择器
 			yy(e) {
-				console.log('打开了医院选择器1',e)
+				console.log('打开了医院选择器1', e)
 				this.form.work1.hospital = e[0].label
 				this.form.works[0].hospital = e[0].value;
-				 
+
 				this.departmentconfirm()
 			},
 			yy2(e) {
-				console.log('打开了医院选择器2',e)
+				console.log('打开了医院选择器2', e)
 				this.form.work2.hospital = e[0].label
 				this.form.works[1].hospital = e[0].value;
 				this.departmentconfirm()
 			},
 			//科室
 			ks(e) {
-				console.log('打开了科室选择器1',e)
+				console.log('打开了科室选择器1', e)
 				this.form.work1.department = e[0].label
 				this.form.works[0].department = e[0].value;
-				
+
 				this.qualificationsconfirm()
 			},
 			ks2(e) {
-				console.log('打开了科室选择器2',e)
+				console.log('打开了科室选择器2', e)
 				this.form.work2.department = e[0].label
 				this.form.works[1].department = e[0].value;
 				this.qualificationsconfirm()
@@ -680,20 +665,45 @@
 			},
 			// 保存
 			bc: async function() {
-				 
-				if(typeof this.form.works != 'string'){
+				//照片
+				let practice = []	//证书
+				let card_photo = []	//身份证
+				let is_quali = []	//资格
+				// 通过filter,筛选出上传进度为100的文件(因为某些上传失败的文件,进度值不为100,这个是可选的操作)
+				// practice = this.$refs.uUpload.lists.filter(val => {
+				// 	return val.progress == 100;
+				// })
+				// card_photo = this.$refs.uUpload.lists.filter(val => {
+				// 	return val.progress == 100;
+				// })
+				// is_quail = this.$refs.uUpload.lists.filter(val => {
+				// 	return val.progress == 100;
+				// })
+				// 如果您不需要进行太多的处理,直接如下即可
+				practice = this.$refs.Upractice.lists;//证书
+				card_photo = this.$refs.Ucard_photo.lists;//身份证
+				is_quali = this.$refs.Uis_quali.lists;//资格
+				
+				this.form.certificate = practice
+				this.form.idPhoto = card_photo
+				this.form.doctorQualification = is_quali
+				console.log(this.form.certificate)
+				console.log(this.form.idPhoto)
+				console.log(this.form.doctorQualification)
+		
+				if (typeof this.form.works != 'string') {
 					this.form.works = JSON.stringify(this.form.works);
 				}
 				
 				// 注意要 {'doctor_name':'ddd',doctor_sex:1....}分开传值因为我方便拦截垃圾数据
 				let res = await this.$request.post('doctor/addthen', this.form);
-				console.log('res...:',res);
-				if(res.status==0){
+				console.log('res...:', res);
+				if (res.status == 0) {
 					uni.switchTab({
 						url: '../index/index'
 					})
 				}
-				
+
 			},
 			ChooseImage() {
 				let that = this;
@@ -705,7 +715,7 @@
 						let tempFilePaths = res.tempFilePaths;
 						// 图片上传案例
 						const uploadTask = wx.uploadFile({
-							url: 'https://xiaoyunimg.top/api/v2/Common/uploadFile',
+							url: 'http://182.92.112.142/api/v2/Common/uploadFile',
 							filePath: tempFilePaths[0],
 							name: 'file',
 							success: function(uploadFileRes) {
@@ -739,7 +749,7 @@
 		justify-content: center;
 		background-color: #0B73B9;
 		color: #FFFFFF;
-		z-index: 1;
+		z-index: 99;
 		font-size: 32rpx;
 	}
 
@@ -749,4 +759,4 @@
 		align-items: center;
 		display: flex;
 	}
-</style>
+</style>

+ 82 - 182
pages/service/more.vue

xqd xqd xqd xqd xqd xqd
@@ -480,7 +480,13 @@
 				}, {
 					flag: true
 				}, ],
-				hospital: [{'name':'医院1'},{'name':'医院2'}],
+				hospital: [{
+					name: '熊科医院'
+				}, 
+				// {
+				// 	name: '测试医院'
+				// },
+				],
 				hospitals: [],
 				hospitalcurrent: 0,
 				list: [{
@@ -597,109 +603,88 @@
 							service_time: "",
 							relation_id: 0
 						}]
-					},
-					type:2
+					}
 				}
 
 			}
 		},
 		methods: {
 			/*    保存       */
-			bc:async function(e) {
-				let that = this;
+			bc(e) {
 				/**
 				 * 电话
 				 * */
-				 
-				 that.form.is_phone.service_time='';
-				 that.form.is_chat.service_time='';
-				 that.form.is_appoint.hospitals[0].service_time='';
-				 that.form.is_appoint.hospitals[1].service_time='';
-				for(let i in that.dh.timeList1){		//遍历选中 保存id
-					if(that.dh.timeList1[i].checked){that.form.is_phone.service_time = that.form.is_phone.service_time+","+that.dh.timeList1[i].id}
+				for(let i in this.dh.timeList1){		//遍历选中 保存id
+					if(this.dh.timeList1[i].checked){this.form.is_phone.service_time = this.form.is_phone.service_time+","+this.dh.timeList1[i].id}
 				}
-				for(let i in that.dh.timeList2){		//遍历选中 保存id
-					if(that.dh.timeList2[i].checked){that.form.is_phone.service_time = that.form.is_phone.service_time+","+that.dh.timeList2[i].id}
+				for(let i in this.dh.timeList2){		//遍历选中 保存id
+					if(this.dh.timeList2[i].checked){this.form.is_phone.service_time = this.form.is_phone.service_time+","+this.dh.timeList2[i].id}
 				}
-				for(let i in that.dh.timeList3){		//遍历选中 保存id
-					if(that.dh.timeList3[i].checked){that.form.is_phone.service_time = that.form.is_phone.service_time+","+that.dh.timeList3[i].id}
+				for(let i in this.dh.timeList3){		//遍历选中 保存id
+					if(this.dh.timeList3[i].checked){this.form.is_phone.service_time = this.form.is_phone.service_time+","+this.dh.timeList3[i].id}
 				}
 				//判断开头第一个是否为逗号,是就删除逗号
-				if(that.form.is_phone.service_time.startsWith(",")){
-					that.form.is_phone.service_time= that.form.is_phone.service_time.substr(1);
+				if(this.form.is_phone.service_time.startsWith(",")){
+					this.form.is_phone.service_time= this.form.is_phone.service_time.substr(1);
 				}
 				/**
 				 * 图文
 				 * */
-				 
-				for(let i in that.tw.timeList1){		//遍历选中 保存id
-					if(that.tw.timeList1[i].checked){that.form.is_chat.service_time = that.form.is_chat.service_time+","+that.tw.timeList1[i].id}
+				for(let i in this.tw.timeList1){		//遍历选中 保存id
+					if(this.tw.timeList1[i].checked){this.form.is_chat.service_time = this.form.is_chat.service_time+","+this.tw.timeList1[i].id}
 				}
-				for(let i in that.tw.timeList2){		//遍历选中 保存id
-					if(that.tw.timeList2[i].checked){that.form.is_chat.service_time = that.form.is_chat.service_time+","+that.tw.timeList2[i].id}
+				for(let i in this.tw.timeList2){		//遍历选中 保存id
+					if(this.tw.timeList2[i].checked){this.form.is_chat.service_time = this.form.is_chat.service_time+","+this.tw.timeList2[i].id}
 				}
-				for(let i in that.tw.timeList3){		//遍历选中 保存id
-					if(that.tw.timeList3[i].checked){that.form.is_chat.service_time =thatthat.form.is_chat.service_time+","+that.tw.timeList3[i].id}
+				for(let i in this.tw.timeList3){		//遍历选中 保存id
+					if(this.tw.timeList3[i].checked){this.form.is_chat.service_time = this.form.is_chat.service_time+","+this.tw.timeList3[i].id}
 				}
 				//判断开头第一个是否为逗号,是就删除逗号
-				if(that.form.is_chat.service_time.startsWith(",")){
-					
-					that.form.is_chat.service_time= that.form.is_chat.service_time.substr(1);
+				if(this.form.is_chat.service_time.startsWith(",")){
+					this.form.is_chat.service_time= this.form.is_chat.service_time.substr(1);
 				}
 				/**
 				 * 门诊
 				 * */
-				for(let i in that.mz1.timeList1){		//遍历选中 保存id
-					if(that.mz1.timeList1[i].checked){that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time+","+that.mz1.timeList1[i].id}
+				for(let i in this.mz1.timeList1){		//遍历选中 保存id
+					if(this.mz1.timeList1[i].checked){this.form.is_appoint.hospitals[0].service_time = this.form.is_appoint.hospitals[0].service_time+","+this.mz1.timeList1[i].id}
 				}
-				for(let i in that.mz1.timeList2){		//遍历选中 保存id
-					if(that.mz1.timeList2[i].checked){that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time+","+that.mz1.timeList2[i].id}
+				for(let i in this.mz1.timeList2){		//遍历选中 保存id
+					if(this.mz1.timeList2[i].checked){this.form.is_appoint.hospitals[0].service_time = this.form.is_appoint.hospitals[0].service_time+","+this.mz1.timeList2[i].id}
 				}
-				for(let i in that.mz1.timeList3){		//遍历选中 保存id
-					if(that.mz1.timeList3[i].checked){that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time+","+that.mz1.timeList3[i].id}
+				for(let i in this.mz1.timeList3){		//遍历选中 保存id
+					if(this.mz1.timeList3[i].checked){this.form.is_appoint.hospitals[0].service_time = this.form.is_appoint.hospitals[0].service_time+","+this.mz1.timeList3[i].id}
 				}
 				//判断开头第一个是否为逗号,是就删除逗号
-				if(that.form.is_appoint.hospitals[0].service_time.startsWith(",")){
-					
-					that.form.is_appoint.hospitals[0].service_time= that.form.is_appoint.hospitals[0].service_time.substr(1);
+				if(this.form.is_appoint.hospitals[0].service_time.startsWith(",")){
+					this.form.is_appoint.hospitals[0].service_time= this.form.is_appoint.hospitals[0].service_time.substr(1);
 				}
 				/**
 				 * 门诊
 				 * */
-				for(let i in that.mz2.timeList1){		//遍历选中 保存id
-					if(that.mz2.timeList1[i].checked){that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time+","+that.mz2.timeList1[i].id}
+				for(let i in this.mz2.timeList1){		//遍历选中 保存id
+					if(this.mz2.timeList1[i].checked){this.form.is_appoint.hospitals[1].service_time = this.form.is_appoint.hospitals[1].service_time+","+this.mz2.timeList1[i].id}
 				}
-				for(let i in that.mz2.timeList2){		//遍历选中 保存id
-					if(that.mz2.timeList2[i].checked){that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time+","+that.mz2.timeList2[i].id}
+				for(let i in this.mz2.timeList2){		//遍历选中 保存id
+					if(this.mz2.timeList2[i].checked){this.form.is_appoint.hospitals[1].service_time = this.form.is_appoint.hospitals[1].service_time+","+this.mz2.timeList2[i].id}
 				}
-				for(let i in that.mz2.timeList3){		//遍历选中 保存id
-					if(that.mz2.timeList3[i].checked){that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time+","+that.mz2.timeList3[i].id}
+				for(let i in this.mz2.timeList3){		//遍历选中 保存id
+					if(this.mz2.timeList3[i].checked){this.form.is_appoint.hospitals[1].service_time = this.form.is_appoint.hospitals[1].service_time+","+this.mz2.timeList3[i].id}
 				}
 				//判断开头第一个是否为逗号,是就删除逗号
-				if(that.form.is_appoint.hospitals[1].service_time.startsWith(",")){
-					that.form.is_appoint.hospitals[1].service_time= that.form.is_appoint.hospitals[1].service_time.substr(1);
+				if(this.form.is_appoint.hospitals[1].service_time.startsWith(",")){
+					this.form.is_appoint.hospitals[1].service_time= this.form.is_appoint.hospitals[1].service_time.substr(1);
 				}
 				
 				
-			 
-				var forms = JSON.parse(JSON.stringify(that.form));
-				if(typeof forms!='string'){
-					forms = JSON.stringify(forms) 
-				}
-				 
-				 
-				console.log('我是form',that.form)
-				console.log('我是formzifuc',forms)
-				let res = await that.$request.post('doctor/saveSettingList',{data:forms,type:2});
-				if(res.status==0){
-					uni.showToast({
-						icon:'none',
-						duration:3000,
-						title:'操作成功',
-						
-					})
-				}
-				console.log('res对象:',res);
+				
+				
+				
+				
+				console.log(this.form)
+				uni.navigateBack({
+					delta: 1
+				})
 			},
 			/**
 			 * @author Liu Yuanhang
@@ -712,24 +697,11 @@
 				if (res.status == 0) {
 
 					// 1.控制列表显示,2.渲染数据
-					this.showList[0].flag = res.data.show.is_phone;
-					this.showList[1].flag = res.data.show.is_chat;
-					this.showList[2].flag = res.data.show.is_appoint;
-
-					// 获取医院
-					if (res.data.org != null) {
-						this.hospital=[];
-						// this.hospital = res.data.org;
-						this.hospitals = res.data.orgs;
-						
-					}
-
+					// 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 != null) {
 						// 渲染电话的基础数据
 						this.form.is_phone.base_price = res.data.list.phone.base_price;
@@ -751,7 +723,13 @@
 						this.form.is_appoint.person = res.data.list.men.person;
 					}
 
-					
+					// 获取医院
+					if (res.data.org != null) {
+						console.log('获取医院', res.data.org)
+						this.hospital = res.data.org;
+						this.hospitals = res.data.orgs;
+						
+					}
 
 					/* 渲染时间 */
 					//电话的时间
@@ -797,13 +775,8 @@
 					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 phones = e.list.phone.service_time;
 					console.log('我是电话', phones)
-		 
 					for (let i = 0; i < dh1.length; i++) {
 						if (phones.indexOf(dh1[i].id) != -1) {
 							dh1[i].checked = true
@@ -824,101 +797,28 @@
 				}
 
 				// 图文资讯渲染
-				if(e.list.chat!=null){
-					tw1=this.tw.timeList1;
-					tw2=this.tw.timeList2;
-					tw3=this.tw.timeList3;
-					 let chats = e.list.chat.service_time.split(',');
-					 var chat=[];//保存转换后的整型字符串
-					  chats.forEach(function(data,index,arr){  
-					         chat.push(+data);  
-					  });  
-					 console.log('我是图文',chat)
-					 for(let i=0;i<tw1.length;i++){
-						if(chat.indexOf(tw1[i].id)!=-1){
-							tw1[i].checked = true
-						}
-					 }
-					 for(let i=0;i<tw2.length;i++){
-						if(chat.indexOf(tw2[i].id)!=-1){
-							tw2[i].checked = true
-						}
-					 }
-					 for(let i=0;i<tw3.length;i++){
-						if(chat.indexOf(tw3[i].id)!=-1){
-							tw3[i].checked = true
-						}
-					 }
-				}
-			 
-				let mzCont = e.list.men.length;
-				if(mzCont>0){
-					 
-					let men = e.list.men;
-					let men1 =  e.list.men[0].service_time.split(',');
-					let men2 =  e.list.men[1].service_time.split(',');
-					var men1s=[];//保存转换后的整型字符串
-					var men2s=[];//保存转换后的整型字符串
-					 men1.forEach(function(data,index,arr){  
-					        men1s.push(+data);  
-					 });  
-					 men2.forEach(function(data,index,arr){
-					        men2s.push(+data);  
-					 }); 
-					 
-					let p =0;
-					var names = '';
-					  if(mzCont==1){
-						  for(let k=0;k<this.mz1.timeList1.length;k++){
-						  	if(men1s.indexOf(this.mz1.timeList1[k].id)!=-1){
-						  		this.mz1.timeList1[k].checked = true
-						  	}
-						  }
-						  for(let k=0;k<this.mz1.timeList2.length;k++){
-						  	if(men1s.indexOf(this.mz1.timeList2[k].id)!=-1){
-						  		this.mz1.timeList2[k].checked = true
-						  	}
-						  }						  					 
-						  for(let k=0;k<this.mz1.timeList3.length;k++){
-						  	if(men1s.indexOf(this.mz1.timeList3[k].id)!=-1){
-						  		this.mz1.timeList3[k].checked = true
-						  	}
-						  }
-					  }else if(mzCont==2){
-						  for(let k=0;k<this.mz1.timeList1.length;k++){
-						  	if(men1s.indexOf(this.mz1.timeList1[k].id)!=-1){
-						  		this.mz1.timeList1[k].checked = true
-						  	}
-						  }
-						  for(let k=0;k<this.mz1.timeList2.length;k++){
-						  	if(men1s.indexOf(this.mz1.timeList2[k].id)!=-1){
-						  		this.mz1.timeList2[k].checked = true
-						  	}
-						  }						  					 
-						  for(let k=0;k<this.mz1.timeList3.length;k++){
-						  	if(men1s.indexOf(this.mz1.timeList3[k].id)!=-1){
-						  		this.mz1.timeList3[k].checked = true
-						  	}
-						  }
-						  
-						  for(let k=0;k<this.mz2.timeList1.length;k++){
-						  	if(men2s.indexOf(this.mz2.timeList1[k].id)!=-1){
-						  		this.mz2.timeList1[k].checked = true
-						  	}
-						  }
-						  for(let k=0;k<this.mz2.timeList2.length;k++){
-						  	if(men2s.indexOf(this.mz2.timeList2[k].id)!=-1){
-						  		this.mz2.timeList2[k].checked = true
-						  	}
-						  }						  					 
-						  for(let k=0;k<this.mz2.timeList3.length;k++){
-						  	if(men2s.indexOf(this.mz2.timeList3[k].id)!=-1){
-						  		this.mz2.timeList3[k].checked = true
-						  	}
-						  }
-					  }
-				}
-				console.log(e.list);
+				// if(e.list.chat!=null){
+				// tw1=this.tw.timeList1;
+				// tw2=this.tw.timeList2;
+				// tw3=this.tw.timeList3;
+				//  let chat = e.list.chat.service_time;
+				//  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
+				// 	}
+				//  }
+				// }
 				uni.hideLoading();
 			},
 			dhchange(index) {