Browse Source

Merge pull request '修改日历展示不更新问题' (#17) from calender-1105 into master

Reviewed-on: #17
master
zhangqi 3 weeks ago
parent
commit
a5ef32f0fb
  1. 45
      src/views/HosInformation.vue
  2. 4
      src/views/conflictDialog.vue

45
src/views/HosInformation.vue

@ -697,7 +697,7 @@
</el-form> </el-form>
</GuipDialog> </GuipDialog>
<ConflictDialog :is_allow_coincide="is_allow_coincide" :h_realname="form.h_realname" :houseCallSettingForm="houseCallSettingForm" <ConflictDialog :is_allow_coincide="is_allow_coincide" :h_realname="form.h_realname" :houseCallSettingForm="houseCallSettingForm"
ref="conflictDialog" :doctor_id="doctor_id" :rawScheduleDataProp="rawScheduleData" :depart_id="depart_id" :oldWorktimes="form.worktimes"/> ref="conflictDialog" :doctor_id="doctor_id" :rawScheduleDataProp="rawScheduleData" :depart_id="depart_id" :oldWorktimes="form.worktimes" @updateCalender="getDoctorHosPreview"/>
<GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="true" width="762px" <GuipDialog :dialogVisible="dialogVisible" :title="dialogTitle" :show-close-button="true" width="762px"
:show-cancel-button="true" @confirm="handleConfirm" @cancel="handleCancel" @close="handleClose" :show-cancel-button="true" @confirm="handleConfirm" @cancel="handleCancel" @close="handleClose"
@ -1969,23 +1969,23 @@ export default {
}).then(response => { }).then(response => {
const list = response.msg; const list = response.msg;
if (response.code == 0) { if (response.code == 0) {
this.hosList = Object.keys(list).map(item => { this.hosList = Object.keys(list).map(item => {
return { return {
hid: item, hid: item,
h_depart_name: list[item].h_depart_name h_depart_name: list[item].h_depart_name
} }
}); });
// //
this.hosListCopy = JSON.parse(JSON.stringify(this.hosList)) this.hosListCopy = JSON.parse(JSON.stringify(this.hosList))
// //
this.rawScheduleData = JSON.parse(JSON.stringify(list)); this.rawScheduleData = JSON.parse(JSON.stringify(list));
// //
this.generateMonthSchedule(this.currentDay); this.generateMonthSchedule(this.currentDay);
this.countMonthlyConflicts(); this.countMonthlyConflicts();
this.hosLength = Object.keys(list).length; this.hosLength = Object.keys(list).length;
} }
}).catch(error => { }).catch(error => {
@ -2044,8 +2044,8 @@ export default {
currentDate.setDate(currentDate.getDate() + 1); currentDate.setDate(currentDate.getDate() + 1);
} }
this.$set(this, 'calendarList', tempCalendarData)
this.calendarList = tempCalendarData; // this.calendarList = tempCalendarData;
console.log(this.calendarList,'===this.calendarList:'); console.log(this.calendarList,'===this.calendarList:');
}, },
addHospitalToSchedule(daySchedule, hospitalId, hospital, plan, workDesc) { addHospitalToSchedule(daySchedule, hospitalId, hospital, plan, workDesc) {
@ -2178,7 +2178,7 @@ export default {
// //
this.checkScheduleConflicts(daySchedule, dateStr); this.checkScheduleConflicts(daySchedule, dateStr);
console.log(daySchedule,'daySchedule==='); // console.log(daySchedule,'daySchedule===');
return Object.keys(daySchedule).length > 1 ? daySchedule : null; return Object.keys(daySchedule).length > 1 ? daySchedule : null;
}, },
@ -2369,9 +2369,6 @@ export default {
// //
getDateSchedule(dateString) { getDateSchedule(dateString) {
if(dateString == '2025-11-18'){
console.log('dateString==:',this.formattedCalendarData[dateString]);
}
return this.formattedCalendarData[dateString] || null; return this.formattedCalendarData[dateString] || null;
}, },
// //

4
src/views/conflictDialog.vue

@ -41,7 +41,6 @@ export default {
cancelBtnShow: String, cancelBtnShow: String,
title: String, title: String,
// houseCallSettingForm: Object, // houseCallSettingForm: Object,
// getDoctorHosPreview: Function,
// formatWorktimesArray: Function, // formatWorktimesArray: Function,
}, },
components: { components: {
@ -322,7 +321,8 @@ export default {
if (response.code == 0) { if (response.code == 0) {
this.$Message.success(response.msg || '设置成功') this.$Message.success(response.msg || '设置成功')
// this.form.worktimes = worktimes; // this.form.worktimes = worktimes;
this.getDoctorHosPreview(); this.$emit('updateCalender')
// this.getDoctorHosPreview();
} }
}).catch(error => { }).catch(error => {
console.error(error, 'error') console.error(error, 'error')

Loading…
Cancel
Save