|
@@ -271,8 +271,22 @@
|
|
<view class="list">服务时间</view>
|
|
<view class="list">服务时间</view>
|
|
<view style="margin-top: 20rpx;">
|
|
<view style="margin-top: 20rpx;">
|
|
<!-- 医院分段器 -->
|
|
<!-- 医院分段器 -->
|
|
- <view style="margin-bottom: 40rpx;">
|
|
|
|
- <u-subsection :list="hospital" :current="hospitalcurrent" @change="yychange"></u-subsection>
|
|
|
|
|
|
+ <view style="margin-bottom: 40rpx;" v-if="hospitalTotal == 1">
|
|
|
|
+ <view class="total">
|
|
|
|
+ <view class="front">{{hospitalOne}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view style="margin-bottom: 40rpx;" v-else>
|
|
|
|
+ <view class="total" v-show="changeOne">
|
|
|
|
+ <view class="front">{{hospitalOne}}</view>
|
|
|
|
+ <view style="height: 100%;width: 20rpx;"></view>
|
|
|
|
+ <view class="back" @click="hostow">{{hospitalTow}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="total" v-show="!changeOne">
|
|
|
|
+ <view class="back" @click="hosone">{{hospitalOne}}</view>
|
|
|
|
+ <view style="height: 100%;width: 20rpx;"></view>
|
|
|
|
+ <view class="front">{{hospitalTow}}</view>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<!-- 当医院更换时 -->
|
|
<!-- 当医院更换时 -->
|
|
<view v-if="hospitalcurrent == 0">
|
|
<view v-if="hospitalcurrent == 0">
|
|
@@ -480,7 +494,12 @@
|
|
}, {
|
|
}, {
|
|
flag: true
|
|
flag: true
|
|
}, ],
|
|
}, ],
|
|
- hospital: [{'name':'医院1'},{'name':'医院2'}],
|
|
|
|
|
|
+ //医院
|
|
|
|
+ hospitalOne: '11',
|
|
|
|
+ hospitalTow: '22',
|
|
|
|
+ hospitalTotal: 2,
|
|
|
|
+ changeOne: true,
|
|
|
|
+ //
|
|
hospitals: [],
|
|
hospitals: [],
|
|
hospitalcurrent: 0,
|
|
hospitalcurrent: 0,
|
|
list: [{
|
|
list: [{
|
|
@@ -573,7 +592,7 @@
|
|
}],
|
|
}],
|
|
|
|
|
|
/********************保存的数据****************************/
|
|
/********************保存的数据****************************/
|
|
-
|
|
|
|
|
|
+
|
|
form: {
|
|
form: {
|
|
is_chat: {
|
|
is_chat: {
|
|
base_price: "20",
|
|
base_price: "20",
|
|
@@ -589,118 +608,151 @@
|
|
},
|
|
},
|
|
is_appoint: {
|
|
is_appoint: {
|
|
base_price: "20",
|
|
base_price: "20",
|
|
- type:"3",
|
|
|
|
|
|
+ type: "3",
|
|
person: 5,
|
|
person: 5,
|
|
- hospitals:[{
|
|
|
|
|
|
+ hospitals: [{
|
|
service_time: "1",
|
|
service_time: "1",
|
|
relation_id: 0
|
|
relation_id: 0
|
|
- },{
|
|
|
|
|
|
+ }, {
|
|
service_time: "1",
|
|
service_time: "1",
|
|
relation_id: 0
|
|
relation_id: 0
|
|
}]
|
|
}]
|
|
},
|
|
},
|
|
- type:2
|
|
|
|
|
|
+ type: 2
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
/* 保存 */
|
|
/* 保存 */
|
|
- bc:async function(e) {
|
|
|
|
|
|
+ bc: async function(e) {
|
|
let that = this;
|
|
let that = this;
|
|
/**
|
|
/**
|
|
* 电话
|
|
* 电话
|
|
* */
|
|
* */
|
|
-
|
|
|
|
- that.form.is_phone.service_time='';
|
|
|
|
- that.form.is_chat.service_time='';
|
|
|
|
- that.form.is_appoint.hospitals[0].service_time='';
|
|
|
|
- that.form.is_appoint.hospitals[1].service_time='';
|
|
|
|
- for(let i in that.dh.timeList1){ //遍历选中 保存id
|
|
|
|
- if(that.dh.timeList1[i].checked){that.form.is_phone.service_time = that.form.is_phone.service_time+","+that.dh.timeList1[i].id}
|
|
|
|
|
|
+
|
|
|
|
+ that.form.is_phone.service_time = '';
|
|
|
|
+ that.form.is_chat.service_time = '';
|
|
|
|
+ that.form.is_appoint.hospitals[0].service_time = '';
|
|
|
|
+ that.form.is_appoint.hospitals[1].service_time = '';
|
|
|
|
+ for (let i in that.dh.timeList1) { //遍历选中 保存id
|
|
|
|
+ if (that.dh.timeList1[i].checked) {
|
|
|
|
+ that.form.is_phone.service_time = that.form.is_phone.service_time + "," + that.dh.timeList1[i].id
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- for(let i in that.dh.timeList2){ //遍历选中 保存id
|
|
|
|
- if(that.dh.timeList2[i].checked){that.form.is_phone.service_time = that.form.is_phone.service_time+","+that.dh.timeList2[i].id}
|
|
|
|
|
|
+ for (let i in that.dh.timeList2) { //遍历选中 保存id
|
|
|
|
+ if (that.dh.timeList2[i].checked) {
|
|
|
|
+ that.form.is_phone.service_time = that.form.is_phone.service_time + "," + that.dh.timeList2[i].id
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- for(let i in that.dh.timeList3){ //遍历选中 保存id
|
|
|
|
- if(that.dh.timeList3[i].checked){that.form.is_phone.service_time = that.form.is_phone.service_time+","+that.dh.timeList3[i].id}
|
|
|
|
|
|
+ for (let i in that.dh.timeList3) { //遍历选中 保存id
|
|
|
|
+ if (that.dh.timeList3[i].checked) {
|
|
|
|
+ that.form.is_phone.service_time = that.form.is_phone.service_time + "," + that.dh.timeList3[i].id
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//判断开头第一个是否为逗号,是就删除逗号
|
|
//判断开头第一个是否为逗号,是就删除逗号
|
|
- if(that.form.is_phone.service_time.startsWith(",")){
|
|
|
|
- that.form.is_phone.service_time= that.form.is_phone.service_time.substr(1);
|
|
|
|
|
|
+ if (that.form.is_phone.service_time.startsWith(",")) {
|
|
|
|
+ that.form.is_phone.service_time = that.form.is_phone.service_time.substr(1);
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* 图文
|
|
* 图文
|
|
* */
|
|
* */
|
|
-
|
|
|
|
- for(let i in that.tw.timeList1){ //遍历选中 保存id
|
|
|
|
- if(that.tw.timeList1[i].checked){that.form.is_chat.service_time = that.form.is_chat.service_time+","+that.tw.timeList1[i].id}
|
|
|
|
|
|
+
|
|
|
|
+ for (let i in that.tw.timeList1) { //遍历选中 保存id
|
|
|
|
+ if (that.tw.timeList1[i].checked) {
|
|
|
|
+ that.form.is_chat.service_time = that.form.is_chat.service_time + "," + that.tw.timeList1[i].id
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- for(let i in that.tw.timeList2){ //遍历选中 保存id
|
|
|
|
- if(that.tw.timeList2[i].checked){that.form.is_chat.service_time = that.form.is_chat.service_time+","+that.tw.timeList2[i].id}
|
|
|
|
|
|
+ for (let i in that.tw.timeList2) { //遍历选中 保存id
|
|
|
|
+ if (that.tw.timeList2[i].checked) {
|
|
|
|
+ that.form.is_chat.service_time = that.form.is_chat.service_time + "," + that.tw.timeList2[i].id
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- for(let i in that.tw.timeList3){ //遍历选中 保存id
|
|
|
|
- if(that.tw.timeList3[i].checked){that.form.is_chat.service_time =thatthat.form.is_chat.service_time+","+that.tw.timeList3[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
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//判断开头第一个是否为逗号,是就删除逗号
|
|
//判断开头第一个是否为逗号,是就删除逗号
|
|
- if(that.form.is_chat.service_time.startsWith(",")){
|
|
|
|
-
|
|
|
|
- that.form.is_chat.service_time= that.form.is_chat.service_time.substr(1);
|
|
|
|
|
|
+ if (that.form.is_chat.service_time.startsWith(",")) {
|
|
|
|
+
|
|
|
|
+ that.form.is_chat.service_time = that.form.is_chat.service_time.substr(1);
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* 门诊
|
|
* 门诊
|
|
* */
|
|
* */
|
|
- for(let i in that.mz1.timeList1){ //遍历选中 保存id
|
|
|
|
- if(that.mz1.timeList1[i].checked){that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time+","+that.mz1.timeList1[i].id}
|
|
|
|
|
|
+ for (let i in that.mz1.timeList1) { //遍历选中 保存id
|
|
|
|
+ if (that.mz1.timeList1[i].checked) {
|
|
|
|
+ that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time + "," + that.mz1
|
|
|
|
+ .timeList1[i].id
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- for(let i in that.mz1.timeList2){ //遍历选中 保存id
|
|
|
|
- if(that.mz1.timeList2[i].checked){that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time+","+that.mz1.timeList2[i].id}
|
|
|
|
|
|
+ for (let i in that.mz1.timeList2) { //遍历选中 保存id
|
|
|
|
+ if (that.mz1.timeList2[i].checked) {
|
|
|
|
+ that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time + "," + that.mz1
|
|
|
|
+ .timeList2[i].id
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- for(let i in that.mz1.timeList3){ //遍历选中 保存id
|
|
|
|
- if(that.mz1.timeList3[i].checked){that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time+","+that.mz1.timeList3[i].id}
|
|
|
|
|
|
+ for (let i in that.mz1.timeList3) { //遍历选中 保存id
|
|
|
|
+ if (that.mz1.timeList3[i].checked) {
|
|
|
|
+ that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time + "," + that.mz1
|
|
|
|
+ .timeList3[i].id
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//判断开头第一个是否为逗号,是就删除逗号
|
|
//判断开头第一个是否为逗号,是就删除逗号
|
|
- if(that.form.is_appoint.hospitals[0].service_time.startsWith(",")){
|
|
|
|
-
|
|
|
|
- that.form.is_appoint.hospitals[0].service_time= that.form.is_appoint.hospitals[0].service_time.substr(1);
|
|
|
|
|
|
+ if (that.form.is_appoint.hospitals[0].service_time.startsWith(",")) {
|
|
|
|
+
|
|
|
|
+ that.form.is_appoint.hospitals[0].service_time = that.form.is_appoint.hospitals[0].service_time.substr(1);
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* 门诊
|
|
* 门诊
|
|
* */
|
|
* */
|
|
- for(let i in that.mz2.timeList1){ //遍历选中 保存id
|
|
|
|
- if(that.mz2.timeList1[i].checked){that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time+","+that.mz2.timeList1[i].id}
|
|
|
|
|
|
+ for (let i in that.mz2.timeList1) { //遍历选中 保存id
|
|
|
|
+ if (that.mz2.timeList1[i].checked) {
|
|
|
|
+ that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time + "," + that.mz2
|
|
|
|
+ .timeList1[i].id
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- for(let i in that.mz2.timeList2){ //遍历选中 保存id
|
|
|
|
- if(that.mz2.timeList2[i].checked){that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time+","+that.mz2.timeList2[i].id}
|
|
|
|
|
|
+ for (let i in that.mz2.timeList2) { //遍历选中 保存id
|
|
|
|
+ if (that.mz2.timeList2[i].checked) {
|
|
|
|
+ that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time + "," + that.mz2
|
|
|
|
+ .timeList2[i].id
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- for(let i in that.mz2.timeList3){ //遍历选中 保存id
|
|
|
|
- if(that.mz2.timeList3[i].checked){that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time+","+that.mz2.timeList3[i].id}
|
|
|
|
|
|
+ for (let i in that.mz2.timeList3) { //遍历选中 保存id
|
|
|
|
+ if (that.mz2.timeList3[i].checked) {
|
|
|
|
+ that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time + "," + that.mz2
|
|
|
|
+ .timeList3[i].id
|
|
|
|
+ }
|
|
}
|
|
}
|
|
//判断开头第一个是否为逗号,是就删除逗号
|
|
//判断开头第一个是否为逗号,是就删除逗号
|
|
- if(that.form.is_appoint.hospitals[1].service_time.startsWith(",")){
|
|
|
|
- that.form.is_appoint.hospitals[1].service_time= that.form.is_appoint.hospitals[1].service_time.substr(1);
|
|
|
|
|
|
+ if (that.form.is_appoint.hospitals[1].service_time.startsWith(",")) {
|
|
|
|
+ that.form.is_appoint.hospitals[1].service_time = that.form.is_appoint.hospitals[1].service_time.substr(1);
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
var forms = JSON.parse(JSON.stringify(that.form));
|
|
var forms = JSON.parse(JSON.stringify(that.form));
|
|
- if(typeof forms!='string'){
|
|
|
|
- forms = JSON.stringify(forms)
|
|
|
|
|
|
+ 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){
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ 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({
|
|
uni.showToast({
|
|
- icon:'none',
|
|
|
|
- duration:3000,
|
|
|
|
- title:'操作成功',
|
|
|
|
-
|
|
|
|
|
|
+ icon: 'none',
|
|
|
|
+ duration: 3000,
|
|
|
|
+ title: '操作成功',
|
|
|
|
+
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- console.log('res对象:',res);
|
|
|
|
|
|
+ console.log('res对象:', res);
|
|
},
|
|
},
|
|
/**
|
|
/**
|
|
* @author Liu Yuanhang
|
|
* @author Liu Yuanhang
|
|
@@ -711,39 +763,38 @@
|
|
'type': 2
|
|
'type': 2
|
|
});
|
|
});
|
|
if (res.status == 0) {
|
|
if (res.status == 0) {
|
|
-
|
|
|
|
// 1.控制列表显示,2.渲染数据
|
|
// 1.控制列表显示,2.渲染数据
|
|
this.showList[0].flag = res.data.show.is_phone;
|
|
this.showList[0].flag = res.data.show.is_phone;
|
|
this.showList[1].flag = res.data.show.is_chat;
|
|
this.showList[1].flag = res.data.show.is_chat;
|
|
this.showList[2].flag = res.data.show.is_appoint;
|
|
this.showList[2].flag = res.data.show.is_appoint;
|
|
-
|
|
|
|
// 获取医院
|
|
// 获取医院
|
|
- if (res.data.org.length!=0) {
|
|
|
|
- this.hospital=[];
|
|
|
|
- this.hospital = res.data.org;
|
|
|
|
- // this.hospital = res.data.org;
|
|
|
|
- this.hospitals = res.data.orgs;
|
|
|
|
- if(res.data.orgs.length==1){
|
|
|
|
|
|
+ if (res.data.org.length != 0) {
|
|
|
|
+ if (res.data.orgs.length == 1) {
|
|
|
|
+ this.hospitalTotal = 1
|
|
this.form.is_appoint.hospitals[0].relation_id = res.data.orgs[0].id
|
|
this.form.is_appoint.hospitals[0].relation_id = res.data.orgs[0].id
|
|
- }else if(res.data.orgs.length==2){
|
|
|
|
|
|
+ this.hospitalOne = res.data.org[0].name
|
|
|
|
+ } else if (res.data.orgs.length == 2) {
|
|
|
|
+ this.hospitalTotal = 2
|
|
this.form.is_appoint.hospitals[0].relation_id = res.data.orgs[0].id
|
|
this.form.is_appoint.hospitals[0].relation_id = res.data.orgs[0].id
|
|
this.form.is_appoint.hospitals[1].relation_id = res.data.orgs[1].id
|
|
this.form.is_appoint.hospitals[1].relation_id = res.data.orgs[1].id
|
|
- }else{
|
|
|
|
|
|
+ this.hospitalOne = res.data.org[0].name
|
|
|
|
+ this.hospitalTow = res.data.org[1].name
|
|
|
|
+ } else {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
- icon:'none',
|
|
|
|
- title:'医院不存在'
|
|
|
|
|
|
+ icon: 'none',
|
|
|
|
+ title: '医院不存在'
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
// 渲染显示的基础价格设置
|
|
// 渲染显示的基础价格设置
|
|
this.form.is_phone.person = '';
|
|
this.form.is_phone.person = '';
|
|
- this.form.is_chat.person ='';
|
|
|
|
- this.form.is_appoint.person='';
|
|
|
|
-
|
|
|
|
|
|
+ this.form.is_chat.person = '';
|
|
|
|
+ this.form.is_appoint.person = '';
|
|
|
|
+
|
|
if (res.data.list.phone.length != 0) {
|
|
if (res.data.list.phone.length != 0) {
|
|
// 渲染电话的基础数据
|
|
// 渲染电话的基础数据
|
|
this.form.is_phone.base_price = res.data.list.phone.base_price;
|
|
this.form.is_phone.base_price = res.data.list.phone.base_price;
|
|
@@ -764,10 +815,10 @@
|
|
this.form.is_appoint.step_price = res.data.list.men[0].step_price;
|
|
this.form.is_appoint.step_price = res.data.list.men[0].step_price;
|
|
this.form.is_appoint.person = res.data.list.men[0].person;
|
|
this.form.is_appoint.person = res.data.list.men[0].person;
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
/* 渲染时间 */
|
|
/* 渲染时间 */
|
|
//电话的时间
|
|
//电话的时间
|
|
@@ -814,12 +865,12 @@
|
|
dh2 = this.dh.timeList2;
|
|
dh2 = this.dh.timeList2;
|
|
dh3 = this.dh.timeList3;
|
|
dh3 = this.dh.timeList3;
|
|
let phone = e.list.phone.service_time.split(',');
|
|
let phone = e.list.phone.service_time.split(',');
|
|
- var phones=[];//保存转换后的整型字符串
|
|
|
|
- phone.forEach(function(data,index,arr){
|
|
|
|
- phones.push(+data);
|
|
|
|
- });
|
|
|
|
|
|
+ var phones = []; //保存转换后的整型字符串
|
|
|
|
+ phone.forEach(function(data, index, arr) {
|
|
|
|
+ phones.push(+data);
|
|
|
|
+ });
|
|
console.log('我是电话', phones)
|
|
console.log('我是电话', phones)
|
|
-
|
|
|
|
|
|
+
|
|
for (let i = 0; i < dh1.length; i++) {
|
|
for (let i = 0; i < dh1.length; i++) {
|
|
if (phones.indexOf(dh1[i].id) != -1) {
|
|
if (phones.indexOf(dh1[i].id) != -1) {
|
|
dh1[i].checked = true
|
|
dh1[i].checked = true
|
|
@@ -840,101 +891,101 @@
|
|
}
|
|
}
|
|
|
|
|
|
// 图文资讯渲染
|
|
// 图文资讯渲染
|
|
- 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){
|
|
|
|
|
|
+ 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
|
|
tw1[i].checked = true
|
|
}
|
|
}
|
|
- }
|
|
|
|
- for(let i=0;i<tw2.length;i++){
|
|
|
|
- if(chat.indexOf(tw2[i].id)!=-1){
|
|
|
|
|
|
+ }
|
|
|
|
+ for (let i = 0; i < tw2.length; i++) {
|
|
|
|
+ if (chat.indexOf(tw2[i].id) != -1) {
|
|
tw2[i].checked = true
|
|
tw2[i].checked = true
|
|
}
|
|
}
|
|
- }
|
|
|
|
- for(let i=0;i<tw3.length;i++){
|
|
|
|
- if(chat.indexOf(tw3[i].id)!=-1){
|
|
|
|
|
|
+ }
|
|
|
|
+ for (let i = 0; i < tw3.length; i++) {
|
|
|
|
+ if (chat.indexOf(tw3[i].id) != -1) {
|
|
tw3[i].checked = true
|
|
tw3[i].checked = true
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
let mzCont = e.list.men.length;
|
|
let mzCont = e.list.men.length;
|
|
- if(mzCont>0){
|
|
|
|
-
|
|
|
|
|
|
+ if (mzCont > 0) {
|
|
|
|
+
|
|
let men = e.list.men;
|
|
let men = e.list.men;
|
|
- let men1 = e.list.men[0].service_time.split(',');
|
|
|
|
- let men2 = e.list.men[1].service_time.split(',');
|
|
|
|
|
|
+ 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[0].relation_id = e.list.men[0].relation_id
|
|
this.form.is_appoint.hospitals[1].relation_id = e.list.men[1].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 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 = '';
|
|
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
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ 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);
|
|
console.log(e.list);
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
@@ -951,9 +1002,7 @@
|
|
mzchange2(index) {
|
|
mzchange2(index) {
|
|
this.mzcurrent2 = index
|
|
this.mzcurrent2 = index
|
|
},
|
|
},
|
|
- yychange(index) {
|
|
|
|
- this.hospitalcurrent = index
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
change(index) {
|
|
change(index) {
|
|
console.log('点击了', index == true)
|
|
console.log('点击了', index == true)
|
|
switch (index) {
|
|
switch (index) {
|
|
@@ -1091,6 +1140,15 @@
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
}
|
|
}
|
|
|
|
+ },
|
|
|
|
+ hosone() {
|
|
|
|
+ this.hospitalcurrent = 0
|
|
|
|
+ this.changeOne = true
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ hostow() {
|
|
|
|
+ this.hospitalcurrent = 1
|
|
|
|
+ this.changeOne = false
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -1156,6 +1214,41 @@
|
|
justify-content: center;
|
|
justify-content: center;
|
|
background-color: #0B73B9;
|
|
background-color: #0B73B9;
|
|
color: #FFFFFF;
|
|
color: #FFFFFF;
|
|
- z-index: 1;
|
|
|
|
|
|
+ z-index: 99;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .total {
|
|
|
|
+ height: 80rpx;
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
+ background-color: #eeeeef;
|
|
|
|
+ padding: 10rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //模拟分段器
|
|
|
|
+ .front {
|
|
|
|
+ height: 100%;
|
|
|
|
+ flex-grow: 1;
|
|
|
|
+ background-color: #FFF;
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .back {
|
|
|
|
+ height: 100%;
|
|
|
|
+ flex-grow: 1;
|
|
|
|
+ background-color: #FFF;
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ align-items: center;
|
|
|
|
+ font-size: 30rpx;
|
|
|
|
+ background-color: #eeeeef;
|
|
}
|
|
}
|
|
-</style>
|
|
|
|
|
|
+</style>
|