提交 695c2f12 编写于 作者: qian.jie's avatar qian.jie

排班

上级 5a63daa5
......@@ -222,13 +222,13 @@
<div class="doctor-info-Num">
<div class="doctor-info-NumToday">
<div class="num-info-much">
90
{{ todayNum }}
</div>
<div>今日接诊人数</div>
</div>
<div class="doctor-info-maxToday">
<div class="num-info-much">
120
{{ maxTodayNum }}
</div>
<div>今日接诊上限人数</div>
</div>
......@@ -398,7 +398,7 @@
</template>
<script>
import { updateDiagnosis } from '../../utils/diagnosis';
import { manualQueue } from '../../utils/diagnosis';
import dayjs from 'dayjs';
import { getDoctorList, getLeisureTime, acceptsCeiling } from '@/api/diagnosis';
......@@ -436,7 +436,7 @@
return {
chooseTimeIndex: 1000,
chooseTime: '',
rateValue: 3,
rateValue: 0,
colors: ['#0D9078', '#0D9078', '#0D9078'],
show: false,
title: '设置接诊医生',
......@@ -456,6 +456,7 @@
receptionEndTime: '',
bizType: '',
diagnoseChannel: 1,
doctorDepartmentId: '',
},
doctorList: [],
sessionDoctorList: [],
......@@ -548,6 +549,8 @@
],
startTime: '',
endTime: '',
todayNum: '',
maxTodayNum: '',
};
},
watch: {
......@@ -591,68 +594,59 @@
this.getLeisureTime(this.chooseTime);
},
getLeisureTime(chooseTime) {
console.log(this.doctorInfo);
const params = {
dictorId: this.doctorInfo.doctorId,
dictorId: this.formData.receptionId,
weekDay: chooseTime,
departmentId: this.formData.doctorDepartmentId,
};
getLeisureTime(params).then((res) => {
if (res.code == '000000') {
console.log(res);
this.timeChoosetList = res.data || [];
}
});
},
confirm() {
this.$refs.setForm.validate((valid) => {
if (!this.startTimeValue || !this.endTimeValue) {
console.log(this.startTime, 'starrrr');
if (this.formData.receptionName == '') {
this.$message({
message: '请选择问诊时间',
message: '请先选择接诊医生',
type: 'warning',
duration: 1000,
});
return false;
}
if (this.startTime == '') {
this.$message({
message: '请选择排班时间',
type: 'warning',
duration: 1000,
});
return false;
}
if (valid) {
let req = null;
if (
this.formData.receptionName == '站外医生' ||
this.formData.receptionName == '云鹊医助'
) {
this.formData.innerFlag = 2; // 外部
req = {
id: this.diagnoseLogId,
bizType: 9,
innerFlag: this.formData.innerFlag,
receptionId: this.formData.receptionId,
receptionName: this.formData.receptionName,
outsideDoctor: this.formData.outsideDoctor,
// receptionBeginTime:this.rangeTime[0],
// receptionEndTime:this.rangeTime[1],
receptionBeginTime: this.dayFormat(this.startTimeValue),
receptionEndTime: this.endTimeValue,
diagnoseChannel: this.formData.diagnoseChannel,
};
} else {
this.formData.innerFlag = 1; // 内部
req = {
const req = {
id: this.diagnoseLogId,
bizType: 9,
innerFlag: this.formData.innerFlag,
receptionId: this.formData.receptionId,
receptionName: this.formData.receptionName,
// receptionBeginTime:this.rangeTime[0],
// receptionEndTime:this.rangeTime[1],
receptionBeginTime: this.dayFormat(this.startTimeValue),
receptionEndTime: this.endTimeValue,
receptionBeginTime: this.startTime,
receptionEndTime: this.endTime,
diagnoseChannel: this.formData.diagnoseChannel,
};
}
vm.isClick = true;
updateDiagnosis(req)
manualQueue(req)
.then(function (res) {
vm.isClick = false;
if (res.code == '000000') {
vm.cancel();
vm.$emit('search');
this.todayNum = '';
this.maxTodayNum = '';
this.rateValue = '';
this.chooseTime = '';
this.startTime = '';
this.endTime = '';
} else {
vm.$message.error(res.message);
}
......@@ -661,8 +655,6 @@
vm.isClick = false;
vm.$message.error(err.message);
});
}
});
},
refreshData() {
const key = 'sessionDoctorList' + this.diagnoseType;
......@@ -675,6 +667,14 @@
// this.startTimeValue = this.rangeTimeData;
// this.endTimeValue = '';
// this.timeRange = Number(20);
this.todayNum = '';
this.maxTodayNum = '';
this.rateValue = '';
this.chooseTime = '';
this.timeChoosetList = [];
this.chooseTimeIndex = null;
this.startTime = '';
this.endTime = '';
this.$emit('update:diagnosisDoctorVisible', false);
},
opendialog() {
......@@ -697,6 +697,7 @@
this.formData.doctorHospital = selected.doctorHospital;
this.formData.doctorDepartment = selected.doctorDepartment;
this.formData.doctorMobile = selected.doctorMobile;
this.formData.doctorDepartmentId = selected.doctorDepartmentId;
this.acceptsCeilings(this.formData.receptionId);
// debugger;
// this.formData.serviceFee = this.priceFilter(selected.serviceFee)
......@@ -708,7 +709,9 @@
};
acceptsCeiling(params).then((res) => {
if (res.code == '000000') {
console.log(res);
this.todayNum = res.data.dayAcceptsCount || 0;
this.maxTodayNum = res.data.dayAcceptsCeiling || 0;
this.rateValue = res.data.level;
}
});
},
......
......@@ -16,6 +16,15 @@ export const updateDiagnosis = (params) => {
});
};
export const manualQueue = (params) => {
return fetch({
headers,
url: getBaseUrl('/diagnose/diagnose/manual/queue'),
method: 'post',
data: params,
description: '保存问诊相关信息',
});
};
/* 批量设置运营*/
export const batchSetOperator = (params) => {
return fetch({
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册