提交 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,78 +594,67 @@ ...@@ -591,78 +594,67 @@
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', type: 'warning',
duration: 1000, duration: 1000,
}); });
return false; return false;
} }
if (valid) { if (this.startTime == '') {
let req = null; this.$message({
if ( message: '请选择排班时间',
this.formData.receptionName == '站外医生' || type: 'warning',
this.formData.receptionName == '云鹊医助' duration: 1000,
) { });
this.formData.innerFlag = 2; // 外部 return false;
req = { }
id: this.diagnoseLogId, this.formData.innerFlag = 1; // 内部
bizType: 9, const req = {
innerFlag: this.formData.innerFlag, id: this.diagnoseLogId,
receptionId: this.formData.receptionId, innerFlag: this.formData.innerFlag,
receptionName: this.formData.receptionName, receptionId: this.formData.receptionId,
outsideDoctor: this.formData.outsideDoctor, receptionName: this.formData.receptionName,
// receptionBeginTime:this.rangeTime[0], receptionBeginTime: this.startTime,
// receptionEndTime:this.rangeTime[1], receptionEndTime: this.endTime,
receptionBeginTime: this.dayFormat(this.startTimeValue), diagnoseChannel: this.formData.diagnoseChannel,
receptionEndTime: this.endTimeValue, };
diagnoseChannel: this.formData.diagnoseChannel, 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 { } else {
this.formData.innerFlag = 1; // 内部 vm.$message.error(res.message);
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,
diagnoseChannel: this.formData.diagnoseChannel,
};
} }
vm.isClick = true; })
updateDiagnosis(req) .catch(function (err) {
.then(function (res) { vm.isClick = false;
vm.isClick = false; vm.$message.error(err.message);
if (res.code == '000000') { });
vm.cancel();
vm.$emit('search');
} else {
vm.$message.error(res.message);
}
})
.catch(function (err) {
vm.isClick = false;
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;
} }
}); });
}, },
......
...@@ -2,7 +2,7 @@ import fetch from '../fetch'; ...@@ -2,7 +2,7 @@ import fetch from '../fetch';
import { getBaseUrl } from '@/utils/index'; import { getBaseUrl } from '@/utils/index';
const headers = { const headers = {
'Content-Type': 'application/json;charset=UTF-8', 'Content-Type': 'application/json;charset=UTF-8',
token: localStorage.getItem('token'), token: localStorage.getItem('token'),
}; };
/* 保存问诊相关信息*/ /* 保存问诊相关信息*/
...@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册