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

排班

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