From d762978263c36c5b5521d087860d6be754700d65 Mon Sep 17 00:00:00 2001
From: zq <136432190602163.com>
Date: Tue, 18 Nov 2025 18:25:23 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=97=A5=E5=8E=86=E5=B1=95?=
=?UTF-8?q?=E7=A4=BA=E4=B8=8D=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/HosInformation.vue | 45 +++++++++++++++++++++-----------------------
src/views/conflictDialog.vue | 4 ++--
2 files changed, 23 insertions(+), 26 deletions(-)
diff --git a/src/views/HosInformation.vue b/src/views/HosInformation.vue
index 5adeb7e..e0b3eca 100644
--- a/src/views/HosInformation.vue
+++ b/src/views/HosInformation.vue
@@ -697,7 +697,7 @@
+ ref="conflictDialog" :doctor_id="doctor_id" :rawScheduleDataProp="rawScheduleData" :depart_id="depart_id" :oldWorktimes="form.worktimes" @updateCalender="getDoctorHosPreview"/>
{
const list = response.msg;
if (response.code == 0) {
- this.hosList = Object.keys(list).map(item => {
- return {
- hid: item,
- h_depart_name: list[item].h_depart_name
- }
- });
- // 存储一份副本,用于后续操作
- this.hosListCopy = JSON.parse(JSON.stringify(this.hosList))
-
- // 保存原始数据
- this.rawScheduleData = JSON.parse(JSON.stringify(list));
-
- // 初始化当前月份的排班数据
- this.generateMonthSchedule(this.currentDay);
- this.countMonthlyConflicts();
-
- this.hosLength = Object.keys(list).length;
+ this.hosList = Object.keys(list).map(item => {
+ return {
+ hid: item,
+ h_depart_name: list[item].h_depart_name
+ }
+ });
+ // 存储一份副本,用于后续操作
+ this.hosListCopy = JSON.parse(JSON.stringify(this.hosList))
+
+ // 保存原始数据
+ this.rawScheduleData = JSON.parse(JSON.stringify(list));
+
+ // 初始化当前月份的排班数据
+ this.generateMonthSchedule(this.currentDay);
+ this.countMonthlyConflicts();
+
+ this.hosLength = Object.keys(list).length;
}
}).catch(error => {
@@ -2044,8 +2044,8 @@ export default {
currentDate.setDate(currentDate.getDate() + 1);
}
-
- this.calendarList = tempCalendarData;
+ this.$set(this, 'calendarList', tempCalendarData)
+ // this.calendarList = tempCalendarData;
console.log(this.calendarList,'===this.calendarList:');
},
addHospitalToSchedule(daySchedule, hospitalId, hospital, plan, workDesc) {
@@ -2178,7 +2178,7 @@ export default {
// 检查冲突
this.checkScheduleConflicts(daySchedule, dateStr);
- console.log(daySchedule,'daySchedule===');
+ // console.log(daySchedule,'daySchedule===');
return Object.keys(daySchedule).length > 1 ? daySchedule : null;
},
@@ -2369,9 +2369,6 @@ export default {
// 获取指定日期的排班信息(修改后的版本)
getDateSchedule(dateString) {
- if(dateString == '2025-11-18'){
- console.log('dateString==:',this.formattedCalendarData[dateString]);
- }
return this.formattedCalendarData[dateString] || null;
},
// 修改判断方法
diff --git a/src/views/conflictDialog.vue b/src/views/conflictDialog.vue
index c2769a8..13c8184 100644
--- a/src/views/conflictDialog.vue
+++ b/src/views/conflictDialog.vue
@@ -41,7 +41,6 @@ export default {
cancelBtnShow: String,
title: String,
// houseCallSettingForm: Object,
- // getDoctorHosPreview: Function,
// formatWorktimesArray: Function,
},
components: {
@@ -322,7 +321,8 @@ export default {
if (response.code == 0) {
this.$Message.success(response.msg || '设置成功')
// this.form.worktimes = worktimes;
- this.getDoctorHosPreview();
+ this.$emit('updateCalender')
+ // this.getDoctorHosPreview();
}
}).catch(error => {
console.error(error, 'error')