| xqd
@@ -3,8 +3,8 @@
|
|
|
<!-- 新 -->
|
|
|
<u-select v-model="show" :list="list" @confirm="choiceNew"></u-select>
|
|
|
<!-- 历史 -->
|
|
|
- <u-select v-model="oldshow" :list="oldlist" @confirm=""></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="oldshow" :list="oldlist" @confirm="cliold"></u-select>
|
|
|
<!-- 医院 -->
|
|
|
<u-select v-model="hospitalshow" mode="single-column" :list="hospitalList" @confirm="confirmhospital" value="0"></u-select>
|
|
|
<!-- 新增-->
|
| xqd
@@ -122,10 +122,10 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- 保存 -->
|
|
|
- <view class="bottomButton" @click="bc" v-if="!old">
|
|
|
+ <view class="bottomButton" @click="modalShow=!modalShow" v-if="!old">
|
|
|
保存
|
|
|
</view>
|
|
|
-
|
|
|
+ <u-modal v-model="modalShow" content="保存后不可修改,确定保存?" @confirm="bc" :show-cancel-button="true"></u-modal>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
| xqd
@@ -133,6 +133,10 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ //已经保存?
|
|
|
+ fixed: false,
|
|
|
+ //弹窗
|
|
|
+ modalShow: false,
|
|
|
//切换历史和新增
|
|
|
old: false,
|
|
|
//新增的排班选择 最多排四周
|
| xqd
@@ -209,75 +213,73 @@
|
|
|
afternoon: '',
|
|
|
night: ''
|
|
|
}],
|
|
|
-
|
|
|
- saveList:[
|
|
|
- {
|
|
|
- organization_id: '',
|
|
|
- schedule_date: '',
|
|
|
- per_time_num: 10,
|
|
|
- identifi:{
|
|
|
- 'zao':false,
|
|
|
- 'zhong':false,
|
|
|
- 'wan':false
|
|
|
- }
|
|
|
- }, {
|
|
|
- organization_id: '',
|
|
|
- schedule_date: '',
|
|
|
- per_time_num: 10,
|
|
|
- identifi:{
|
|
|
- 'zao':false,
|
|
|
- 'zhong':false,
|
|
|
- 'wan':false
|
|
|
- }
|
|
|
- }, {
|
|
|
- organization_id: '',
|
|
|
- schedule_date: '',
|
|
|
- per_time_num: 10,
|
|
|
- identifi:{
|
|
|
- 'zao':false,
|
|
|
- 'zhong':false,
|
|
|
- 'wan':false
|
|
|
- }
|
|
|
- }, {
|
|
|
- organization_id: '',
|
|
|
- schedule_date: '',
|
|
|
- per_time_num: 10,
|
|
|
- identifi:{
|
|
|
- 'zao':false,
|
|
|
- 'zhong':false,
|
|
|
- 'wan':false
|
|
|
- }
|
|
|
- }, {
|
|
|
- organization_id: '',
|
|
|
- schedule_date: '',
|
|
|
- per_time_num: 10,
|
|
|
- identifi:{
|
|
|
- 'zao':false,
|
|
|
- 'zhong':false,
|
|
|
- 'wan':false
|
|
|
- }
|
|
|
- }, {
|
|
|
- organization_id: '',
|
|
|
- schedule_date: '',
|
|
|
- per_time_num:10,
|
|
|
- identifi:{
|
|
|
- 'zao':false,
|
|
|
- 'zhong':false,
|
|
|
- 'wan':false
|
|
|
- }
|
|
|
-
|
|
|
- }, {
|
|
|
- organization_id: '',
|
|
|
- schedule_date: '',
|
|
|
- per_time_num: 10,
|
|
|
- identifi:{
|
|
|
- 'zao':false,
|
|
|
- 'zhong':false,
|
|
|
- 'wan':false
|
|
|
- }
|
|
|
- },
|
|
|
- ],
|
|
|
-
|
|
|
+
|
|
|
+ saveList: [{
|
|
|
+ organization_id: '',
|
|
|
+ schedule_date: '',
|
|
|
+ per_time_num: 10,
|
|
|
+ identifi: {
|
|
|
+ 'zao': false,
|
|
|
+ 'zhong': false,
|
|
|
+ 'wan': false
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ organization_id: '',
|
|
|
+ schedule_date: '',
|
|
|
+ per_time_num: 10,
|
|
|
+ identifi: {
|
|
|
+ 'zao': false,
|
|
|
+ 'zhong': false,
|
|
|
+ 'wan': false
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ organization_id: '',
|
|
|
+ schedule_date: '',
|
|
|
+ per_time_num: 10,
|
|
|
+ identifi: {
|
|
|
+ 'zao': false,
|
|
|
+ 'zhong': false,
|
|
|
+ 'wan': false
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ organization_id: '',
|
|
|
+ schedule_date: '',
|
|
|
+ per_time_num: 10,
|
|
|
+ identifi: {
|
|
|
+ 'zao': false,
|
|
|
+ 'zhong': false,
|
|
|
+ 'wan': false
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ organization_id: '',
|
|
|
+ schedule_date: '',
|
|
|
+ per_time_num: 10,
|
|
|
+ identifi: {
|
|
|
+ 'zao': false,
|
|
|
+ 'zhong': false,
|
|
|
+ 'wan': false
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ organization_id: '',
|
|
|
+ schedule_date: '',
|
|
|
+ per_time_num: 10,
|
|
|
+ identifi: {
|
|
|
+ 'zao': false,
|
|
|
+ 'zhong': false,
|
|
|
+ 'wan': false
|
|
|
+ }
|
|
|
+
|
|
|
+ }, {
|
|
|
+ organization_id: '',
|
|
|
+ schedule_date: '',
|
|
|
+ per_time_num: 10,
|
|
|
+ identifi: {
|
|
|
+ 'zao': false,
|
|
|
+ 'zhong': false,
|
|
|
+ 'wan': false
|
|
|
+ }
|
|
|
+ }, ],
|
|
|
+
|
|
|
//历史记录的数组
|
|
|
oldWeek: [],
|
|
|
//选择医院
|
| xqd
@@ -292,81 +294,81 @@
|
|
|
}
|
|
|
},
|
|
|
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)
|
|
|
+ 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,
|
|
|
}
|
|
|
- this.oldlist = lists
|
|
|
+ lists.push(obj)
|
|
|
}
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- cliold:async function(e){
|
|
|
-
|
|
|
- let times = e[0].label;
|
|
|
- times = times.split(" 至 ");
|
|
|
- let startime = times[0];
|
|
|
- let endtime = times[1];
|
|
|
- let weekArr = this.getDateStr(startime, endtime, 0);
|
|
|
-
|
|
|
- let res = await this.$request.post("doctor/getLinsDetail",{'start_date':startime,'end_date':endtime});
|
|
|
- console.log('老得:',this.oldWeek);
|
|
|
- console.log('新的',res.data);
|
|
|
- if(res.status==0){
|
|
|
- if(typeof res.data[0]!=undefined && typeof res.data[0]!='undefined'){
|
|
|
- let data = res.data;
|
|
|
- let arr =[];
|
|
|
- for(let i=0;i<this.oldWeek.length;i++){
|
|
|
- for(let p=0;p<data.length;p++){
|
|
|
- if(this.oldWeek[i].value==data[p].schedule_date){
|
|
|
- this.oldWeek[i].morning = data[p].type.zao?data[p].type.zao:'暂无';
|
|
|
- this.oldWeek[i].afternoon =data[p].type.xia?data[p].type.xia:'暂无';
|
|
|
- this.oldWeek[i].night =data[p].type.wan?data[p].type.wan:'暂无';
|
|
|
- }
|
|
|
+ this.oldlist = lists
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ cliold: async function(e) {
|
|
|
+
|
|
|
+ let times = e[0].label;
|
|
|
+ times = times.split(" 至 ");
|
|
|
+ let startime = times[0];
|
|
|
+ let endtime = times[1];
|
|
|
+ let weekArr = this.getDateStr(startime, endtime, 0);
|
|
|
+
|
|
|
+ let res = await this.$request.post("doctor/getLinsDetail", {
|
|
|
+ 'start_date': startime,
|
|
|
+ 'end_date': endtime
|
|
|
+ });
|
|
|
+ console.log('老得:', this.oldWeek);
|
|
|
+ console.log('新的', res.data);
|
|
|
+ if (res.status == 0) {
|
|
|
+ if (typeof res.data[0] != undefined && typeof res.data[0] != 'undefined') {
|
|
|
+ let data = res.data;
|
|
|
+ let arr = [];
|
|
|
+ for (let i = 0; i < this.oldWeek.length; i++) {
|
|
|
+ for (let p = 0; p < data.length; p++) {
|
|
|
+ if (this.oldWeek[i].value == data[p].schedule_date) {
|
|
|
+ this.oldWeek[i].morning = data[p].type.zao ? data[p].type.zao : '暂无';
|
|
|
+ this.oldWeek[i].afternoon = data[p].type.xia ? data[p].type.xia : '暂无';
|
|
|
+ this.oldWeek[i].night = data[p].type.wan ? data[p].type.wan : '暂无';
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- }else{
|
|
|
- for(let i=0;i<this.oldWeek.length;i++){
|
|
|
- this.oldWeek[i].morning = '暂无';
|
|
|
- this.oldWeek[i].afternoon ='暂无';
|
|
|
- this.oldWeek[i].night ='暂无';
|
|
|
- }
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < this.oldWeek.length; i++) {
|
|
|
+ this.oldWeek[i].morning = '暂无';
|
|
|
+ this.oldWeek[i].afternoon = '暂无';
|
|
|
+ this.oldWeek[i].night = '暂无';
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
- },
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
getDateStr(startDate, endDate, dayLength) {
|
|
|
var str = startDate;
|
|
|
- for (var i = 0 ;; i++) {
|
|
|
+ for (var i = 0;; i++) {
|
|
|
var getDate = this.getTargetDate(startDate, dayLength);
|
|
|
startDate = getDate;
|
|
|
if (getDate <= endDate) {
|
|
|
- str += ','+getDate;
|
|
|
+ str += ',' + getDate;
|
|
|
} else {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
let dates = str.split(',');
|
|
|
- let arr =[];
|
|
|
+ let arr = [];
|
|
|
let obj;
|
|
|
- for(let i=0;i<7;i++){
|
|
|
+ for (let i = 0; i < 7; i++) {
|
|
|
obj = {
|
|
|
title: this.getweeks(dates[i]),
|
|
|
value: dates[i].substring(5),
|
| xqd
@@ -378,65 +380,69 @@
|
|
|
}
|
|
|
this.oldWeek = arr
|
|
|
},
|
|
|
- getweeks(date){
|
|
|
+ getweeks(date) {
|
|
|
var weekDay = ["星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"];
|
|
|
var dateStr = date;
|
|
|
var myDate = new Date(Date.parse(dateStr.replace(/-/g, "/")));
|
|
|
return weekDay[myDate.getDay()]
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
// startDate: 开始时间;dayLength:每隔几天,0-代表获取每天,1-代表日期间隔一天
|
|
|
- getTargetDate(date,dayLength) {
|
|
|
+ getTargetDate(date, dayLength) {
|
|
|
dayLength = dayLength + 1;
|
|
|
- var tempDate = new Date(date);
|
|
|
- tempDate.setDate(tempDate.getDate() + dayLength);
|
|
|
- var year = tempDate.getFullYear();
|
|
|
- var month = tempDate.getMonth() + 1 < 10 ? "0" + (tempDate.getMonth() + 1) : tempDate.getMonth() + 1;
|
|
|
- var day = tempDate.getDate() < 10 ? "0" + tempDate.getDate() : tempDate.getDate();
|
|
|
-
|
|
|
+ var tempDate = new Date(date);
|
|
|
+ tempDate.setDate(tempDate.getDate() + dayLength);
|
|
|
+ var year = tempDate.getFullYear();
|
|
|
+ var month = tempDate.getMonth() + 1 < 10 ? "0" + (tempDate.getMonth() + 1) : tempDate.getMonth() + 1;
|
|
|
+ var day = tempDate.getDate() < 10 ? "0" + tempDate.getDate() : tempDate.getDate();
|
|
|
+
|
|
|
return year + "-" + month + "-" + day;
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
//点击新增周
|
|
|
- choiceNew(e){
|
|
|
-
|
|
|
+ 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 * (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
|
|
|
- this.saveList[i].schedule_date ='2020-'+week
|
|
|
+ this.saveList[i].schedule_date = '2020-' + week
|
|
|
}
|
|
|
this.getTemplate()
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
// 早下晚的点击事件
|
|
|
clickMorning(index) {
|
|
|
- this.position.day = index
|
|
|
- this.position.time = 1
|
|
|
- this.hospitalshow = true
|
|
|
+ if (this.fixed) {
|
|
|
+ this.position.day = index
|
|
|
+ this.position.time = 1
|
|
|
+ this.hospitalshow = true
|
|
|
+ }
|
|
|
},
|
|
|
clickAfternoon(index) {
|
|
|
- this.position.day = index
|
|
|
- this.position.time = 2
|
|
|
- this.hospitalshow = true
|
|
|
+ if (this.fixed) {
|
|
|
+ this.position.day = index
|
|
|
+ this.position.time = 2
|
|
|
+ this.hospitalshow = true
|
|
|
+ }
|
|
|
},
|
|
|
clicknight(index) {
|
|
|
- this.position.day = index
|
|
|
- this.position.time = 3
|
|
|
- this.hospitalshow = true
|
|
|
+ if (this.fixed) {
|
|
|
+ this.position.day = index
|
|
|
+ this.position.time = 3
|
|
|
+ this.hospitalshow = true
|
|
|
+ }
|
|
|
},
|
|
|
//医院选择器的确认点击事件
|
|
|
confirmhospital(e) {
|
|
|
let es = JSON.parse(JSON.stringify(e));
|
|
|
-
|
|
|
+
|
|
|
var lists;
|
|
|
-
|
|
|
+
|
|
|
if (this.position.time == 1) {
|
|
|
this.hospitalWeek[this.position.day].morning = es[0].label
|
|
|
this.saveList[this.position.day].identifi.zao = es[0].value;
|
| xqd
@@ -449,27 +455,31 @@
|
|
|
}
|
|
|
this.saveList[this.position.day].organization_id = es[0].value
|
|
|
// this.saveList[this.position.day].schedule_date ='2020-'+this.hospitalWeek[this.position.day].value
|
|
|
- this.position.day='';
|
|
|
- this.position.time='';
|
|
|
+ this.position.day = '';
|
|
|
+ this.position.time = '';
|
|
|
this.hospitalshow = false;
|
|
|
},
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
//保存
|
|
|
- bc:async function(e) {
|
|
|
+ bc: async function(e) {
|
|
|
+
|
|
|
let that = this;
|
|
|
let forms = JSON.stringify(that.saveList);
|
|
|
- let res = await that.$request.post("doctor/scheduling",{data:forms});
|
|
|
- if(res.status==0){
|
|
|
+ console.log("forms", that.saveList)
|
|
|
+ let res = await that.$request.post("doctor/scheduling", {
|
|
|
+ data: forms
|
|
|
+ });
|
|
|
+ if (res.status == 0) {
|
|
|
uni.showToast({
|
|
|
- duration:2000,
|
|
|
- title:'排班成功'
|
|
|
+ duration: 2000,
|
|
|
+ title: '排班成功'
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
- // uni.switchTab({
|
|
|
- // url: '/pages/index/index'
|
|
|
- // })
|
|
|
+
|
|
|
+ uni.switchTab({
|
|
|
+ url: '/pages/index/index'
|
|
|
+ })
|
|
|
},
|
|
|
//获取时间
|
|
|
getTime() {
|
| xqd
@@ -490,27 +500,27 @@
|
|
|
//直接获取这周五的时间,然后遍历 给选择器
|
|
|
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)
|
|
|
+ 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) //周一的时间
|
|
|
+ console.log('第', i + 1, '个周一的时间', week1) //周一的时间
|
|
|
//周日
|
|
|
- aData.setTime(aData.getTime() + 24 * 60 * 60 * 1000 * (aData.getDay()+5))
|
|
|
+ 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) //周日的时间
|
|
|
+ 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();
|
|
|
+ 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
|
|
|
- this.saveList[i].schedule_date ='2020-'+week
|
|
|
+ this.saveList[i].schedule_date = '2020-' + week
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
this.getTemplate()
|
|
|
|
|
|
// var date = new Date();
|
| xqd
@@ -540,42 +550,45 @@
|
|
|
// alert(week)
|
|
|
// return currentdate;
|
|
|
},
|
|
|
-
|
|
|
- getTemplate:async function(){
|
|
|
+
|
|
|
+ getTemplate: async function() {
|
|
|
let that = this;
|
|
|
- let startTime = '2020-'+that.hospitalWeek[0].value;
|
|
|
- let endTime = '2020-'+that.hospitalWeek[6].value;
|
|
|
- let res = await that.$request.post("doctor/getLinsDetail",{'start_date':startTime,'end_date':endTime});
|
|
|
- if(res.status==0){
|
|
|
- if(typeof res.data[0]!=undefined && typeof res.data[0]!='undefined'){
|
|
|
+ let startTime = '2020-' + that.hospitalWeek[0].value;
|
|
|
+ let endTime = '2020-' + that.hospitalWeek[6].value;
|
|
|
+ let res = await that.$request.post("doctor/getLinsDetail", {
|
|
|
+ 'start_date': startTime,
|
|
|
+ 'end_date': endTime
|
|
|
+ });
|
|
|
+ if (res.status == 0) {
|
|
|
+ if (typeof res.data[0] != undefined && typeof res.data[0] != 'undefined') {
|
|
|
let data = res.data;
|
|
|
- let arr =[];
|
|
|
- for(let i=0;i<this.hospitalWeek.length;i++){
|
|
|
- for(let p=0;p<data.length;p++){
|
|
|
- if(this.hospitalWeek[i].value==data[p].schedule_date){
|
|
|
- this.saveList[i].identifi.zao = data[p].type.zao_id?data[p].type.zao_id:false;
|
|
|
- this.saveList[i].identifi.zhong = data[p].type.xia_id?data[p].type.xia_id:false;
|
|
|
- this.saveList[i].identifi.wan = data[p].type.wan_id?data[p].type.wan_id:false;
|
|
|
- this.hospitalWeek[i].morning = data[p].type.zao?data[p].type.zao:'暂无';
|
|
|
- this.hospitalWeek[i].afternoon =data[p].type.xia?data[p].type.xia:'暂无';
|
|
|
- this.hospitalWeek[i].night =data[p].type.wan?data[p].type.wan:'暂无';
|
|
|
+ let arr = [];
|
|
|
+ for (let i = 0; i < this.hospitalWeek.length; i++) {
|
|
|
+ for (let p = 0; p < data.length; p++) {
|
|
|
+ if (this.hospitalWeek[i].value == data[p].schedule_date) {
|
|
|
+ this.saveList[i].identifi.zao = data[p].type.zao_id ? data[p].type.zao_id : false;
|
|
|
+ this.saveList[i].identifi.zhong = data[p].type.xia_id ? data[p].type.xia_id : false;
|
|
|
+ this.saveList[i].identifi.wan = data[p].type.wan_id ? data[p].type.wan_id : false;
|
|
|
+ this.hospitalWeek[i].morning = data[p].type.zao ? data[p].type.zao : '暂无';
|
|
|
+ this.hospitalWeek[i].afternoon = data[p].type.xia ? data[p].type.xia : '暂无';
|
|
|
+ this.hospitalWeek[i].night = data[p].type.wan ? data[p].type.wan : '暂无';
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- }else{
|
|
|
- for(let i=0;i<this.hospitalWeek.length;i++){
|
|
|
+
|
|
|
+ } else {
|
|
|
+ for (let i = 0; i < this.hospitalWeek.length; i++) {
|
|
|
this.saveList[i].identifi.zao = false;
|
|
|
this.saveList[i].identifi.zhong = false;
|
|
|
this.saveList[i].identifi.wan = false;
|
|
|
this.hospitalWeek[i].morning = '';
|
|
|
- this.hospitalWeek[i].afternoon ='';
|
|
|
- this.hospitalWeek[i].night ='';
|
|
|
+ this.hospitalWeek[i].afternoon = '';
|
|
|
+ this.hospitalWeek[i].night = '';
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
},
|
|
|
|
|
|
/**
|
| xqd
@@ -583,8 +596,6 @@
|
|
|
*/
|
|
|
gethospitalList: async function() {
|
|
|
let that = this;
|
|
|
-
|
|
|
-
|
|
|
let res = await that.$request.post("doctor/organizationList");
|
|
|
if (res.status == 0) {
|
|
|
that.hospitalList = res.data
|
| xqd
@@ -596,6 +607,7 @@
|
|
|
this.getTime();
|
|
|
this.gethospitalList();
|
|
|
this.getOldList();
|
|
|
+ this.cliold()
|
|
|
console.log(this.time)
|
|
|
},
|
|
|
}
|