diff --git a/src/views/DoctorInformation.vue b/src/views/DoctorInformation.vue
index 14109fb..14393cd 100644
--- a/src/views/DoctorInformation.vue
+++ b/src/views/DoctorInformation.vue
@@ -356,7 +356,7 @@ export default {
fd.append('first_visit_audit', siteForm.first_visit_audit)
fd.append('approver_phone', siteForm.approver_phone)
this.setApproverWechat(fd)
- },
+ },
setApproverWechat(param) {
this.$http('POST', '/api/admin/set_doctor_approver', param).then(response => {
if (response.code != 0) {
@@ -400,22 +400,21 @@ export default {
return
}
- // 接口待定
- // this.$http('POST', '/api/admin/set_doctor_approver', {
- // is_allow_coincide:this.siteForm.is_allow_coincide
- // }).then(response => {
- // if (response.code != 0) {
- // this.$message.error(response.msg)
- // return;
- // }
-
- // this.$message.success(response.msg)
- // if (this.doctorId) return;
-
- // }).catch(error => {
- // console.error(error, 'error')
- // this.$message.error('设置失败')
- // })
+ this.$http('POST', '/api/admin/set_doctor_approver', {
+ is_allow_coincide:this.siteForm.is_allow_coincide
+ }).then(response => {
+ if (response.code != 0) {
+ this.$message.error(response.msg)
+ return;
+ }
+
+ this.$message.success(response.msg)
+ if (this.doctorId) return;
+
+ }).catch(error => {
+ console.error(error, 'error')
+ this.$message.error('设置失败')
+ })
},
handleApproverWechatChange(file, fileList) {
diff --git a/src/views/HosInformation.vue b/src/views/HosInformation.vue
index 17a6476..1f7d09b 100644
--- a/src/views/HosInformation.vue
+++ b/src/views/HosInformation.vue
@@ -87,7 +87,7 @@
+ format="HH:mm" value-format="HH:mm">
@@ -97,7 +97,7 @@
+ format="HH:mm" value-format="HH:mm">
@@ -605,11 +605,11 @@
{{ currentEditingDate }}{{ isToday(currentEditingDate) ? '(今日)' : '' }}
-
-
上午出诊
-
下午出诊
-
全天出诊
-
不出诊
+
+ 上午出诊
+ 下午出诊
+ 全天出诊
+ 不出诊
@@ -970,6 +970,7 @@ export default {
conflictCount: 0, // 冲突天数统计
tempAdjustments: {}, // 存储临时调诊数据 {日期: {医院ID: {原班次, 新班次, 状态}}}
currentEditingHospital: null, // 当前正在编辑的医院
+ currentDate:Date.now(),
currentEditingDate: null, // 当前正在编辑的日期
currentClickDate: null, // 当前正在编辑的日期
isShowDialogDate: false,//单个医院日期是否显示
@@ -1005,6 +1006,7 @@ export default {
originalMorningSelected: [], // 保存原始上午选中状态
originalAfternoonSelected: [], // 保存原始下午选中状态
forceTime: Date.now(),
+ singleCurrentPlan:null,
}
},
created() {
@@ -1169,7 +1171,6 @@ export default {
return true;
},
morningSelectedNames() {
- // console.log('执行了1次', this.morningSelectedHospitals);
return this.getSelectedNames(this.morningSelectedHospitals);
},
afternoonSelectedNames() {
@@ -1182,7 +1183,6 @@ export default {
return date >= today;
},
getSelectedNames(selectedList) {
- // console.log(selectedList, 'getSelectedNames----selectedList====');
if (selectedList.length === 0) {
return '不出诊';
}
@@ -1191,7 +1191,6 @@ export default {
const hospital = this.hosList.find(item => item.hid === hid);
return hospital ? hospital.name : '';
}).filter(name => name);
- // console.log(selectedNames, 'getSelectedNames--selectedNames');
return selectedNames.join('、') || '休息';
},
handleEvent(data) {
@@ -1210,7 +1209,6 @@ export default {
this.isShowAddAliPay = true;
},
toggleAfternoonDropdown() {
- // console.log('----09999', this.afternoonSelectedHospitals);
if (this.isAfternoonDropdownOpen) {
this.$refs.afternoonSelect.blur();
} else {
@@ -1254,7 +1252,6 @@ export default {
getDateCellClass(dateString) {
const schedule = this.getDateSchedule(dateString);
- // console.log(schedule, 'getDateCellClass-schedule');
if (!schedule) return '';
for (const key in schedule) {
if (key !== '0' && schedule[key] && schedule[key].length > 0) {
@@ -1396,7 +1393,6 @@ export default {
handleDateClick(dateString, event) {
this.currentClickDate = dateString
event.stopPropagation();
- // isConflictDate()
const clickedDate = new Date(dateString);
const today = new Date();
today.setHours(0, 0, 0, 0);
@@ -1411,13 +1407,13 @@ export default {
if (this.isShowDialogDate) {
this.singleHosTitle = this.weekDaysDesc[clickedDate.getDay()] + '出诊规则';
+ }else{
+ this.singleHosTitle = '出诊日历'
}
// 获取该日期涉及的所有医院
const hospitals = this.getHospitalsByDate(dateString);
- // console.log('点击日期获取到的医院数据:', hospitals);
-
// 重构医院数据,确保正确设置上下午出诊状态
this.hosList = this.hosListCopy.map(item => {
let hospitalInfo = {
@@ -1456,30 +1452,26 @@ export default {
break;
}
}
-
- console.log(`医院 ${item.h_depart_name} 排班状态:`, {
- currentPlan: hospitalInfo.currentPlan,
- morning_plan: hospitalInfo.morning_plan,
- afternoon_plan: hospitalInfo.afternoon_plan
- });
-
return hospitalInfo;
});
- // console.log('处理后的医院列表:', this.hosList);
-
// 根据医院数量决定弹出哪种对话框
if (this.hosList.length === 1) {
this.currentEditingHospital = hospitals[0];
+ if(this.currentEditingHospital){
+ this.singleCurrentPlan = this.currentEditingHospital.currentPlan;
+ }else{
+ this.singleCurrentPlan = '0'
+ }
this.singleHosVisiable = true;
} else {
this.initSelectedHospitals(this.hosList);
+ this.singleCurrentPlan = null;
this.moreHosVisiable = true;
}
+ this.currentDate = Date.now()
},
initSelectedHospitals(hospitals) {
- // console.log('开始初始化选中医院:', hospitals);
-
// 保存原始选中状态
this.originalMorningSelected = [...this.morningSelectedHospitals];
this.originalAfternoonSelected = [...this.afternoonSelectedHospitals];
@@ -1490,12 +1482,6 @@ export default {
hospitals.forEach(hospital => {
const { hid, morning_plan, afternoon_plan } = hospital;
- console.log(`医院 ${hospital.name} 状态:`, {
- hid,
- morning_plan,
- afternoon_plan
- });
-
if (morning_plan === '1') {
this.morningSelectedHospitals = [...this.morningSelectedHospitals, hid];
}
@@ -1519,12 +1505,6 @@ export default {
const afternoonConflict = this.afternoonSelectedHospitals.length > 1;
this.hasConflict = morningConflict || afternoonConflict;
-
- console.log('冲突检查结果:', {
- morningConflict,
- afternoonConflict,
- hasConflict: this.hasConflict
- });
},
// 修改确认多医院临时调诊的方法
@@ -1537,7 +1517,6 @@ export default {
}
const plans = [];
- // console.log('moreTempConfirm:', this.hosList);
// 处理所有医院,为每个医院生成对应的排班计划
this.hosList.forEach(hospital => {
const { hid } = hospital;
@@ -1585,7 +1564,6 @@ export default {
// 设置临时调诊数据----
async saveTempAdjustment(dateString, newPlan) {
- // console.log(newPlan, 'newPlan====');
try {
const response = await this.$http('POST', '/api/admin/set_visit_change', {
doctor_id: this.doctor_id,
@@ -1612,19 +1590,16 @@ export default {
getHospitalsByDate(dateString) {
const schedule = this.getDateSchedule(dateString);
if (!schedule) {
- console.log(`日期 ${dateString} 无排班数据`);
return [];
}
const hospitals = [];
- // console.log(`日期 ${dateString} 的排班数据:`, schedule);
// 遍历所有班次类型收集医院
Object.keys(schedule).forEach(shiftType => {
if (['_isTempAdjust', '_conflicts', '0'].includes(shiftType)) return;
const list = schedule[shiftType];
- // console.log(`班次 ${shiftType} 的医院列表:`, list);
if (Array.isArray(list) && list.length > 0) {
list.forEach(hospital => {
@@ -1639,13 +1614,11 @@ export default {
isCancelled: hospital.isCancelled,
workTime: hospital.workTime
});
- // console.log(`添加医院到列表: ${hospital.hospital_name}`, hospital);
}
});
}
});
- // console.log(`最终获取到的医院列表:`, hospitals);
return hospitals;
},
// tooltip的出诊文案
@@ -1830,16 +1803,12 @@ export default {
const newPlan = adjustment.newPlan.toString();
const originalPlanStr = originalPlan.toString();
if (newPlan === "0" && originalPlanStr !== "0") {
- // console.log(` - 状态: cancelled (班次取消)`);
return 'cancelled';
} else if (originalPlanStr === "0" && newPlan !== "0") {
- // console.log(` - 状态: added (新增班次)`);
return 'added';
} else if (originalPlanStr !== newPlan) {
- // console.log(` - 状态: changed (班次变更)`);
return 'changed';
} else {
- // console.log(` - 状态: same (与固定排班一致)`);
return 'same';
}
},
@@ -1866,23 +1835,18 @@ export default {
const date = new Date(dateStr);
const dayOfWeek = date.getDay() === 0 ? 7 : date.getDay();
- // console.log(`getOriginalPlan: ${dateStr}, 星期${dayOfWeek}, 医院${hospitalId}`);
-
// 固定排班
if (hospital.worktime_no_fixed === 0 && hospital.worktime_list && hospital.worktime_list[dayOfWeek]) {
const plan = hospital.worktime_list[dayOfWeek].plan.toString();
- // console.log(` - 固定排班: ${plan}`);
return plan;
}
// 非固定排班中的具体日期
if (hospital.worktime_no_fixed === 1 && hospital.worktime_list && hospital.worktime_list[dateStr]) {
const plan = hospital.worktime_list[dateStr].plan.toString();
- // console.log(` - 非固定排班: ${plan}`);
return plan;
}
- // console.log(` - 默认: 0`);
return "0";
},
// 检查是否存在冲突(不允许时段重合时)
@@ -1897,8 +1861,6 @@ export default {
},
// 统计本月多医院出诊冲突
countMonthlyConflicts() {
- // console.log('=== 开始月度冲突统计 ===');
-
const monthStart = new Date(this.currentDay.getFullYear(), this.currentDay.getMonth(), 1);
const monthEnd = new Date(this.currentDay.getFullYear(), this.currentDay.getMonth() + 1, 0);
const today = new Date();
@@ -1918,7 +1880,6 @@ export default {
if (hasConflict) {
conflicts.push(dateStr);
conflictCount++;
- console.log(`统计到冲突: ${dateStr}`);
}
} else {
console.log(`无排班数据: ${dateStr}`);
@@ -1952,8 +1913,6 @@ export default {
const hospitals = schedule[shiftType];
if (!hospitals || hospitals.length === 0) continue;
- console.log(`班次 ${shiftType}:`, hospitals);
-
hospitals.forEach(hospital => {
if (hospital.isCancelled) return; // 跳过已取消的
@@ -1991,7 +1950,6 @@ export default {
},
// 判断是否为冲突日期
isConflictDate(dateString) {
- // console.log(this.conflictDates, dateString, '冲突日期');
return this.conflictDates.includes(dateString);
},
// 添加月份变化监听方法
@@ -2011,7 +1969,6 @@ export default {
}).then(response => {
const list = response.msg;
if (response.code == 0) {
- // 处理医院列表
this.hosList = Object.keys(list).map(item => {
return {
hid: item,
@@ -2020,6 +1977,7 @@ export default {
});
// 存储一份副本,用于后续操作
this.hosListCopy = JSON.parse(JSON.stringify(this.hosList))
+
// 保存原始数据
this.rawScheduleData = JSON.parse(JSON.stringify(list));
@@ -2088,20 +2046,7 @@ export default {
}
this.calendarList = tempCalendarData;
- console.log('最终排班数据:', this.calendarList);
- },
-
- isTempAdjustDate(dateString) {
- if (!this.rawScheduleData) return false;
-
- // 遍历所有医院,检查是否有该日期的临时调整
- for (const hospitalId in this.rawScheduleData) {
- const hospital = this.rawScheduleData[hospitalId];
- if (hospital.temp_change_worktime && hospital.temp_change_worktime[dateString]) {
- return true;
- }
- }
- return false;
+ console.log(this.calendarList,'===this.calendarList:');
},
addHospitalToSchedule(daySchedule, hospitalId, hospital, plan, workDesc) {
const shiftType = plan.toString();
@@ -2204,8 +2149,6 @@ export default {
newPlan: finalPlan,
status: this.getTempAdjustmentStatus(dateStr, hospitalId, originalPlan)
};
-
- console.log(`医院 ${hospitalId} 在 ${dateStr}: 原计划=${originalPlan}, 新计划=${finalPlan}, 状态=${this.tempAdjustments[dateStr][hospitalId].status}`);
} else {
// 固定排班
if (worktime_no_fixed === 0 && worktime_list && worktime_list[dayOfWeek]) {
@@ -2235,13 +2178,12 @@ export default {
// 检查冲突
this.checkScheduleConflicts(daySchedule, dateStr);
+ console.log(daySchedule,'daySchedule===');
return Object.keys(daySchedule).length > 1 ? daySchedule : null;
},
// 检查排班冲突
checkScheduleConflicts(daySchedule) {
- console.log(daySchedule, 'daySchedule===检查排班冲突');
-
if (!this.is_allow_coincide) return;
daySchedule._conflicts = [];
@@ -2294,7 +2236,6 @@ export default {
message: `下午班冲突: ${Array.from(timeSlotConflicts.afternoon).map(h => h.split('_')[1]).join('、')}`
});
}
- console.log(daySchedule, 'daySchedule====');
},
@@ -2337,7 +2278,6 @@ export default {
plans["morning_plan"] = '1';
plans["afternoon_plan"] = '1';
}
- console.log(plans, 'plans');
let plansList = []
plansList.push(plans)
this.saveTempAdjustment(this.currentEditingDate, plansList)
@@ -2399,7 +2339,6 @@ export default {
overrideWeekTitles() {
this.$nextTick(() => {
const weekHeaders = document.querySelectorAll('.el-calendar-table thead th');
- console.log(weekHeaders, 'weekHeaders====');
if (weekHeaders.length === 7) {
weekHeaders.forEach((th, index) => {
th.textContent = this.weekDaysDesc[index];
@@ -2429,6 +2368,9 @@ export default {
// 获取指定日期的排班信息(修改后的版本)
getDateSchedule(dateString) {
+ if(dateString == '2025-11-18'){
+ console.log('dateString==:',this.formattedCalendarData[dateString]);
+ }
return this.formattedCalendarData[dateString] || null;
},
// 修改判断方法
@@ -2483,7 +2425,6 @@ export default {
) {
this.wxpayList = response.data[this.payTypeWeixin]
this.selectWxpay = this.wxpayList.filter(item => item.is_bind)[0];
- console.log(this.selectWxpay, 'this.selectWxpay');
} else {
this.selectWxpay = null;
}
@@ -2508,7 +2449,6 @@ export default {
depart_id: this.depart_id,
pay_switch: this.onLinePay
}).then(response => {
- console.log(response, '===');
const { code } = response
const msg = this.onLinePay === 1 ? '已开启' : '已关闭'
const type = code === 0 ? 'success' : 'error';
@@ -2544,7 +2484,6 @@ export default {
})
},
changeSelectWeixin(item) {
- console.log(item, 'item')
// if(this.bindWxpayId === item.payid){
// this.bindWxpayId = 0
// this.selectWxpay = null
@@ -2587,7 +2526,6 @@ export default {
this.isShowAddPay = true;
},
handleregisterCancel() {
- console.log('取消');
this.freeRegVisible = false;
this.registrationVisible = false;
},
@@ -2666,7 +2604,6 @@ export default {
this.form.search_city = item.city
this.form.address = item.address
this.form.h_pos = item.location.lat + ',' + item.location.lng
- console.log(item)
},
getInternetHospital(queryString) {
if (!this.hospitalSearchFlag) return;
@@ -2701,7 +2638,6 @@ export default {
})
},
queryHospital(queryString, cb) {
- console.log(queryString)
cb(this.hospitalRestaurants);
},
random() {
@@ -2744,6 +2680,17 @@ export default {
'afternoon_worktime': response.data.afternoon_worktime ? response.data.afternoon_worktime.split('-') : ''
}
this.houseCallSettingForm.worktimes = JSON.parse(JSON.stringify(this.form.worktimes));
+ // ---------还没有数据
+ const {display_work_days,worktime_no_fixed} = response.data;
+ if(display_work_days > 0){
+ this.houseCallSettingForm.planDays = display_work_days;
+ }else{
+ this.houseCallSettingForm.display_work_days = display_work_days
+ }
+ this.houseCallSettingForm.worktime_no_fixed = worktime_no_fixed
+
+ // ---------还没有数据
+
this.departType = (response.data.type || response.data.type === 0 || response.data.type === "0") ? [Number(response.data.type)] : []
this.departIsFixed = response.data.is_fixed == "1" ? true : false
@@ -2961,7 +2908,6 @@ export default {
this.editorProjectInfo({ need_countdown: row.need_countdown, project_id: row.id })
},
handleClick1(row) {
- console.log(row);
this.$router.push(`/addNewTreatment?package_id=${row.id}&doctor_id=${this.doctor_id}&depart_id=${this.depart_id}`)
// 跳转编辑页面
},
@@ -2971,7 +2917,6 @@ export default {
},
// 处理全选按钮变化
handleSelectAllChange(val) {
- console.log(this.$refs.multipleTable, 'multipleTable-');
if (val) {
// 只选中未选中的行
const unselectedRows = this.projectList.filter(
@@ -2999,7 +2944,6 @@ export default {
this.isIndeterminate = !noneSelected && !allSelected;
},
handleSelectAllChange1(val) {
- console.log(this.$refs.multipleTable, 'multipleTable-');
if (val) {
// 只选中未选中的行
const unselectedRows = this.courseList.filter(
@@ -3018,7 +2962,6 @@ export default {
// 处理选择变化
handleSelectionChange1(rows) {
- console.log(rows, '1=====');
this.selectedRows1 = rows;
// 更新全选按钮状态
const allSelected = rows.length === this.courseList.length;
@@ -3041,8 +2984,6 @@ export default {
if (name == 'project') {
// 修改项目列表
url = '/api/admin/project_mutil_option';
- // selectedRows
- console.log(this.selectedRows, '----09999888');
this.selectedRows.forEach(item => {
if (item.status != type) {
str.push(item.id)
@@ -3055,7 +2996,6 @@ export default {
props.project_ids = str.join(',')
} else {
// 修改疗程套餐
- // selectedRows1
this.selectedRows1.forEach(item => {
if (item.status != type) {
str.push(item.id)
@@ -3067,7 +3007,6 @@ export default {
}
props.package_ids = str.join(',')
}
- // console.log(url,props);
this.changePackData(url, props, name)
},
//
@@ -3091,13 +3030,9 @@ export default {
console.error(error, 'error')
})
},
- ChangeTime(type) {
- console.log(this.form.morning_worktime, type, '===');
- },
onSwitchChange(data) {
this.form.is_fixed = data ? 1 : 0
this.departIsFixed = data
- console.log(data, '---');
},
updateHosInfo(props, url) {
if (this.doctor_id) props.doctor_id = this.doctor_id;
@@ -3449,7 +3384,7 @@ export default {
display: flex;
align-items: center;
justify-content: space-between;
- gap: 12px;
+ // gap: 3px;
margin-bottom: 10px;
// color: #303133;
diff --git a/src/views/conflictDialog.vue b/src/views/conflictDialog.vue
index 16d09de..12adab0 100644
--- a/src/views/conflictDialog.vue
+++ b/src/views/conflictDialog.vue
@@ -70,7 +70,6 @@ export default {
}
},
created() {
- console.log(this.rawScheduleDataProp,'-----t111his.rawScheduleDataProp===');
this.rawScheduleData1 = this.rawScheduleDataProp;
},
@@ -78,7 +77,6 @@ export default {
// 监听 props 变化
rawScheduleDataProp(newVal) {
this.rawScheduleData1 = newVal
- console.log(newVal,'===----00999');
},
} ,
@@ -86,10 +84,6 @@ export default {
if(this.cancelBtnShow == '0'){
this.visitShowCancelBtn = false;
}
- // console.log(this.rawScheduleDataProp,'this.rawScheduleDataProp===');
- // if(this.rawScheduleDataProp){
- // this.rawScheduleData1 = this.rawScheduleDataProp;
- // }
if(this.cancelText){
this.visitConfirmText = this.cancelText;
}
@@ -130,7 +124,7 @@ export default {
const data = this.analyzeCurrentMonthConflicts();
this.hasConflictresultLength = data.length;
this.hasConflictresult = data.length > 3 ? data.slice(0, 3) : data;
- console.log(this.hasConflictresult, 'this.hasConflictresult');
+ // console.log(this.hasConflictresult, 'this.hasConflictresult');
}
}).catch(error => {
console.error(error, 'error')
@@ -275,7 +269,6 @@ export default {
// ..end
async setDepartWorkTime() {
const { display_work_days, planDays, worktime_no_fixed,worktimes } = this.houseCallSettingForm;
-
const params = {
doctor_id: this.doctor_id,
depart_id: this.depart_id,
@@ -289,9 +282,6 @@ export default {
// 检查冲突:当前设置医院的新排班 vs 其他医院的现有排班
const conflictResults = this.checkScheduleConflict(worktimes, worktime_no_fixed);
-
- console.log('冲突检测结果:', conflictResults);
-
// 为固定出诊并且存在冲突时展示弹出框
if (conflictResults.hasConflict && worktime_no_fixed == 0) {
this.visitDialogVisible = true;
@@ -311,7 +301,6 @@ export default {
async saveWorkTimeDirect() {
const { display_work_days, planDays, worktime_no_fixed, worktimes } = this.houseCallSettingForm;
var worktimesArray = this.formatWorktimesArray(worktimes)
- console.log(worktimesArray,'worktimesArray===');
const params = {
doctor_id: this.doctor_id,
depart_id: this.depart_id,
@@ -338,19 +327,12 @@ export default {
// 检查排班冲突
checkScheduleConflict(newWorktimes, worktime_no_fixed) {
- console.log(newWorktimes, worktime_no_fixed,this.rawScheduleData1, 'newWorktimes, worktime_no_fixed');
- debugger
const conflicts = [];
let hasConflict = false;
if (!this.rawScheduleData1) {
return { hasConflict: false, conflicts: [] };
}
-
- // console.log('开始冲突检测,当前设置医院:', this.depart_id);
- // console.log('新排班设置:', newWorktimes);
- // console.log('所有医院数据:', this.rawScheduleData1);
-
// 遍历所有其他医院的排班数据
Object.keys(this.rawScheduleData1).forEach(hospitalId => {
// 跳过当前正在设置的医院 (depart_id=4)
@@ -358,13 +340,9 @@ export default {
console.log('跳过当前医院:', hospitalId);
return;
}
-
const hospital = this.rawScheduleData1[hospitalId];
- console.log(`检查医院 ${hospitalId}: ${hospital.h_depart_name}`, hospital);
-
// 根据排班类型检查冲突
const hospitalConflicts = this.checkHospitalConflict(newWorktimes, hospital, worktime_no_fixed);
- console.log(`医院 ${hospitalId} 的冲突:`, hospitalConflicts);
if (hospitalConflicts.length > 0) {
conflicts.push(...hospitalConflicts);
@@ -377,7 +355,6 @@ export default {
},
// 检查单个医院的冲突
checkHospitalConflict(newWorktimes, hospital) {
- debugger
const conflicts = [];
if (hospital.worktime_no_fixed === 0) {
@@ -393,9 +370,6 @@ export default {
// 检查与固定排班医院的冲突
checkVsFixedHospital(newWorktimes, hospital) {
const conflicts = [];
-
- console.log('检查固定排班医院冲突:', hospital.h_depart_name, hospital.worktime_list);
-
// 遍历新设置的每周排班
Object.keys(newWorktimes).forEach(weekDay => {
const newPlan = newWorktimes[weekDay].plan;
@@ -405,13 +379,10 @@ export default {
// 检查医院在该工作日的排班
const hospitalPlan = hospital.worktime_list && hospital.worktime_list[weekDay];
- console.log(`周${weekDay}: 新排班=${newPlan}, 医院排班=`, hospitalPlan);
-
if (hospitalPlan && hospitalPlan.plan !== '0') {
// 获取冲突的具体时段
const conflictShift = this.getConflictShift(newPlan, hospitalPlan.plan);
if (conflictShift) {
- console.log(`发现冲突: 周${weekDay} 新${newPlan} vs 医院${hospitalPlan.plan}, 冲突时段: ${conflictShift}`);
conflicts.push(this.createConflictInfo(
`每${this.getWeekDayName(parseInt(weekDay))}`,
hospital.h_depart_name,
@@ -430,8 +401,6 @@ export default {
checkVsNonFixedHospital(newWorktimes, hospital) {
const conflicts = [];
- console.log('检查非固定排班医院冲突:', hospital.h_depart_name, hospital.worktime_list);
-
if (!hospital.worktime_list) return conflicts;
// 遍历非固定排班医院的所有具体日期排班
@@ -448,12 +417,9 @@ export default {
const newSchedule = newWorktimes[weekDayKey];
if (!newSchedule || newSchedule.plan === '0') return;
- // console.log(`日期${dateStr}(周${dayOfWeek}): 新排班=${newSchedule.plan}, 医院排班=${hospitalPlan.plan}`);
-
// 获取冲突的具体时段
const conflictShift = this.getConflictShift(newSchedule.plan, hospitalPlan.plan);
if (conflictShift) {
- // console.log(`发现冲突: ${dateStr} 新${newSchedule.plan} vs 医院${hospitalPlan.plan}, 冲突时段: ${conflictShift}`);
conflicts.push(this.createConflictInfo(
dateStr,
hospital.h_depart_name,
@@ -470,7 +436,6 @@ export default {
return conflicts;
},
createConflictInfo(date, hospitalName, newPlan, conflictShift, scheduleType, workDesc, dayOfWeek) {
- // console.log(dayOfWeek,this.getWeekDayName(1),'createConflictInfo:dayOfWeek');
const planMap = {
'0': '休息',
'1': '上午班',