提交 5a63daa5 编写于 作者: qian.jie's avatar qian.jie

排班

上级 b3741bad
...@@ -264,4 +264,19 @@ export const opAck = async (data) => { ...@@ -264,4 +264,19 @@ export const opAck = async (data) => {
data: data, data: data,
method: 'post', method: 'post',
}); });
}; };
\ No newline at end of file export const acceptsCeiling = async (data) => {
return request({
url: '/diagnose/admin/diagnose/accepts/ceiling',
params: data,
method: 'get',
});
};
export const getLeisureTime = async (data) => {
return request({
url: '/diagnose/doctor/work/getLeisureTime',
data: data,
method: 'post',
});
};
...@@ -72,3 +72,9 @@ export const setPlatformUpper = async (data) => { ...@@ -72,3 +72,9 @@ export const setPlatformUpper = async (data) => {
method: 'post', method: 'post',
}); });
}; };
export const getPlatformUpper = async () => {
return request({
url: '/diagnose/doctor/work/getPlatformUpper',
method: 'post',
});
};
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
@open="opendialog" @open="opendialog"
> >
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">--> <!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<el-form <!-- <el-form
ref="setForm" ref="setForm"
:rules="addRules" :rules="addRules"
:model="formData" :model="formData"
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
label="接诊医生" label="接诊医生"
class="required-label" class="required-label"
prop="receptionId" prop="receptionId"
> > -->
<!-- <el-input v-model="formData.doctorName" placeholder="请选择接诊医生" class="set-width" disabled></el-input>--> <!-- <el-input v-model="formData.doctorName" placeholder="请选择接诊医生" class="set-width" disabled></el-input>-->
<el-col :span="15"> <!-- <el-col :span="15">
<el-select <el-select
v-model="formData.receptionId" v-model="formData.receptionId"
filterable filterable
...@@ -49,11 +49,11 @@ ...@@ -49,11 +49,11 @@
class="set-width" class="set-width"
disabled disabled
style="width: 100%" style="width: 100%"
/> /> -->
<!-- <el-select v-model="formData.doctorTitle" placeholder="请选择职称" disabled class="set-width"> <!-- <el-select v-model="formData.doctorTitle" placeholder="请选择职称" disabled class="set-width">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> --> </el-select> -->
</el-col> <!-- </el-col>
</el-form-item> </el-form-item>
<el-form-item label="接诊医生所在机构"> <el-form-item label="接诊医生所在机构">
<el-col :span="15"> <el-col :span="15">
...@@ -64,11 +64,11 @@ ...@@ -64,11 +64,11 @@
disabled disabled
style="width: 100%" style="width: 100%"
/> />
</el-col> </el-col> -->
<!-- <el-select v-model="formData.doctorHospital" placeholder="请选择机构" disabled class="set-width"> <!-- <el-select v-model="formData.doctorHospital" placeholder="请选择机构" disabled class="set-width">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> --> </el-select> -->
</el-form-item> <!-- </el-form-item>
<el-form-item label="接诊医生所在科室"> <el-form-item label="接诊医生所在科室">
<el-col :span="15"> <el-col :span="15">
<el-input <el-input
...@@ -77,11 +77,11 @@ ...@@ -77,11 +77,11 @@
class="set-width" class="set-width"
disabled disabled
style="width: 100%" style="width: 100%"
/> /> -->
<!-- <el-select v-model="formData.doctorDepartment" placeholder="请选择科室" disabled class="set-width"> <!-- <el-select v-model="formData.doctorDepartment" placeholder="请选择科室" disabled class="set-width">
<el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option> <el-option v-for="item of sexList" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select> --> </el-select> -->
</el-col> <!-- </el-col>
</el-form-item> </el-form-item>
<el-form-item label="接诊医生电话"> <el-form-item label="接诊医生电话">
<el-col :span="15"> <el-col :span="15">
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
</el-radio-group> </el-radio-group>
</el-col> </el-col>
</el-form-item> </el-form-item>
</el-form> </el-form> -->
<!-- </el-row>--> <!-- </el-row>-->
<!-- <span <!-- <span
slot="footer" slot="footer"
...@@ -183,7 +183,6 @@ ...@@ -183,7 +183,6 @@
filterable filterable
placeholder="请选择接诊医生" placeholder="请选择接诊医生"
class="set-width" class="set-width"
style="width: 40%"
@change="doctorChanged($event)" @change="doctorChanged($event)"
> >
<el-option <el-option
...@@ -197,12 +196,13 @@ ...@@ -197,12 +196,13 @@
v-model="chooseTime" v-model="chooseTime"
type="date" type="date"
placeholder="选择日期" placeholder="选择日期"
@change="getNowDate"
/> />
</div> </div>
<div class="doctor-diagnosis-doctor"> <div class="doctor-diagnosis-doctor">
<div class="doctor-info"> <div class="doctor-info">
<div class="doctor-info-nameRate"> <div class="doctor-info-nameRate">
<span class="name-info">李晓明</span> <span class="name-info">{{ formData.receptionName }}</span>
<span class="name-info-rate"> <span class="name-info-rate">
<el-rate <el-rate
v-model="rateValue" v-model="rateValue"
...@@ -212,11 +212,11 @@ ...@@ -212,11 +212,11 @@
</span> </span>
</div> </div>
<div class="doctor-info-phone"> <div class="doctor-info-phone">
<span>123432123432123432123</span> <span>{{ formData.doctorMobile }}</span>
</div> </div>
<div class="doctor-info-hisDep"> <div class="doctor-info-hisDep">
<span>上海瑞金医院</span> <span>{{ formData.doctorHospital }}</span>
<span class="diasName">普外科</span> <span class="diasName">{{ formData.doctorDepartment }}</span>
</div> </div>
</div> </div>
<div class="doctor-info-Num"> <div class="doctor-info-Num">
...@@ -236,11 +236,25 @@ ...@@ -236,11 +236,25 @@
</div> </div>
<div class="work-info-Num"> <div class="work-info-Num">
<span class="work-info-Num-span">可排班时间</span> <span class="work-info-Num-span">可排班时间</span>
<div class="work-info-NumInfo"> <div class="time-list-show">
<span>9:00-10:00</span> <div
<span>9:00-10:00</span> v-for="(itemChild, indexChild) in timeChoosetList"
<span>9:00-10:00</span> :key="indexChild"
class="home_grid_item"
>
<div class="grid_text">
<span
:class="
chooseTimeIndex == indexChild
? 'choose-time-choose'
: 'noChoose-time-choose'
"
@click="getChooseTimeValue(itemChild, indexChild)"
>{{ itemChild.leisureTime }}</span>
</div>
</div>
</div> </div>
<div class="work-info-botton"> <div class="work-info-botton">
<span <span
slot="footer" slot="footer"
...@@ -248,11 +262,13 @@ ...@@ -248,11 +262,13 @@
style="text-align: center" style="text-align: center"
> >
<el-button <el-button
class="contest"
type="primary" type="primary"
:disabled="isClick" :disabled="isClick"
@click="confirm" @click="confirm"
>确定</el-button> >确定</el-button>
<el-button <el-button
class="refresh"
type="primary" type="primary"
@click="refreshData" @click="refreshData"
>刷新数据</el-button> >刷新数据</el-button>
...@@ -384,7 +400,7 @@ ...@@ -384,7 +400,7 @@
<script> <script>
import { updateDiagnosis } from '../../utils/diagnosis'; import { updateDiagnosis } from '../../utils/diagnosis';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { getDoctorList } from '@/api/diagnosis'; import { getDoctorList, getLeisureTime, acceptsCeiling } from '@/api/diagnosis';
let vm = null; let vm = null;
export default { export default {
...@@ -409,14 +425,21 @@ ...@@ -409,14 +425,21 @@
type: [Number, String], type: [Number, String],
default: 0, default: 0,
}, },
doctorInfo: {
type: Object,
default: () => {
return {};
},
},
}, },
data() { data() {
return { return {
chooseTime:'', chooseTimeIndex: 1000,
rateValue:3, chooseTime: '',
colors:['#0D9078', '#0D9078', '#0D9078'], rateValue: 3,
colors: ['#0D9078', '#0D9078', '#0D9078'],
show: false, show: false,
title: '设置接诊医生111', title: '设置接诊医生',
confirmTxt: '确定', confirmTxt: '确定',
cancleTxt: '', cancleTxt: '',
isClick: false, isClick: false,
...@@ -461,6 +484,70 @@ ...@@ -461,6 +484,70 @@
endTimeValue: '', endTimeValue: '',
timeRange: '', timeRange: '',
selfTimeRange: '', selfTimeRange: '',
timeChoosetList: [
{
id: 1,
leisureTime: '9:00-10:00',
allowClick: false,
},
{
id: 2,
leisureTime: '10:00-11:00',
allowClick: false,
},
{
id: 3,
leisureTime: '11:00-12:00',
allowClick: false,
},
{
id: 4,
leisureTime: '12:00-13:00',
allowClick: false,
},
{
id: 5,
leisureTime: '13:00-14:00',
allowClick: false,
},
{
id: 6,
leisureTime: '14:00-15:00',
allowClick: false,
},
{
id: 7,
leisureTime: '15:00-16:00',
allowClick: false,
},
{
id: 8,
leisureTime: '16:00-17:00',
allowClick: false,
},
{
id: 9,
leisureTime: '17:00-18:00',
allowClick: false,
},
{
id: 10,
leisureTime: '18:00-19:00',
allowClick: false,
},
{
id: 11,
leisureTime: '19:00-20:00',
allowClick: false,
},
{
id: 12,
leisureTime: '20:00-21:00',
allowClick: false,
},
],
startTime: '',
endTime: '',
}; };
}, },
watch: { watch: {
...@@ -481,7 +568,7 @@ ...@@ -481,7 +568,7 @@
}, },
created() { created() {
// this.startTimeValue = this.rangeTimeData; // this.startTimeValue = this.rangeTimeData;
console.log('``````', this.rangeTimeData); console.log('``````', this.formData);
// if (this.rangeTimeData) { // if (this.rangeTimeData) {
// this.timeRange = Number(20); // this.timeRange = Number(20);
// this.endTimeValue = dayjs(this.rangeTimeData) // this.endTimeValue = dayjs(this.rangeTimeData)
...@@ -493,6 +580,27 @@ ...@@ -493,6 +580,27 @@
this.getDoctorList(); this.getDoctorList();
}, },
methods: { methods: {
getChooseTimeValue(value, index) {
console.log(value, index);
this.chooseTimeIndex = index;
this.startTime = value.startDate;
this.endTime = value.endDate;
},
getNowDate(value) {
this.chooseTime = dayjs(value).format('YYYY-MM-DD HH:mm:ss');
this.getLeisureTime(this.chooseTime);
},
getLeisureTime(chooseTime) {
const params = {
dictorId: this.doctorInfo.doctorId,
weekDay: chooseTime,
};
getLeisureTime(params).then((res) => {
if (res.code == '000000') {
console.log(res);
}
});
},
confirm() { confirm() {
this.$refs.setForm.validate((valid) => { this.$refs.setForm.validate((valid) => {
if (!this.startTimeValue || !this.endTimeValue) { if (!this.startTimeValue || !this.endTimeValue) {
...@@ -582,15 +690,28 @@ ...@@ -582,15 +690,28 @@
doctorChanged(value) { doctorChanged(value) {
const selected = this.doctorList.find((item) => item.doctorId === value); const selected = this.doctorList.find((item) => item.doctorId === value);
if (selected) { if (selected) {
console.log(selected, 'selected');
this.formData.receptionId = value; this.formData.receptionId = value;
this.formData.receptionName = selected.doctorName; this.formData.receptionName = selected.doctorName;
this.formData.doctorTitle = selected.doctorTitle; this.formData.doctorTitle = selected.doctorTitle;
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.acceptsCeilings(this.formData.receptionId);
// debugger;
// this.formData.serviceFee = this.priceFilter(selected.serviceFee) // this.formData.serviceFee = this.priceFilter(selected.serviceFee)
} }
}, },
acceptsCeilings(doctorId) {
const params = {
doctorId: doctorId,
};
acceptsCeiling(params).then((res) => {
if (res.code == '000000') {
console.log(res);
}
});
},
getDoctorList() { getDoctorList() {
this.loading = true; this.loading = true;
this.listKey = 'sessionDoctorList' + this.diagnoseType; this.listKey = 'sessionDoctorList' + this.diagnoseType;
...@@ -624,7 +745,7 @@ ...@@ -624,7 +745,7 @@
if (!this.startTimeValue) { if (!this.startTimeValue) {
this.timeRange = ''; this.timeRange = '';
this.endTimeValue = ''; this.endTimeValue = '';
}else{ } else {
this.timeRange = Number(20); this.timeRange = Number(20);
this.endTimeValue = dayjs(this.rangeTimeData) this.endTimeValue = dayjs(this.rangeTimeData)
.add(this.timeRange, 'minute') .add(this.timeRange, 'minute')
...@@ -759,114 +880,158 @@ ...@@ -759,114 +880,158 @@
margin-right: 5px; margin-right: 5px;
width: 130px; width: 130px;
} }
.open-diagnosis-doctor{ .open-diagnosis-doctor {
padding: 40px; padding: 10px 40px 40px 40px;
.choose-diagnosis-doctor{ .choose-diagnosis-doctor {
.el-select{ .el-select {
margin-right: 30px; margin-right: 30px;
padding-bottom: 20px; padding-bottom: 20px;
.el-input{ .el-input {
width: 300px; width: 300px;
.el-input__inner{ .el-input__inner {
width: 300px; width: 300px;
height: 32px; height: 32px;
background: #FFFFFF; background: #ffffff;
border-radius: 16px; border-radius: 16px;
border: 1px solid rgba(0, 0, 0, 0.15); border: 1px solid rgba(0, 0, 0, 0.15);
} }
.el-input__suffix{ .el-input__suffix {
display: flex; display: flex;
align-items: center; align-items: center;
} }
} }
} }
.el-date-editor{ .el-date-editor {
.el-input__inner{ .el-input__inner {
width: 180px; width: 180px;
height: 32px; height: 32px;
background: #FFFFFF; background: #ffffff;
border-radius:16px; border-radius: 16px;
border: 1px solid rgba(0, 0, 0, 0.15); border: 1px solid rgba(0, 0, 0, 0.15);
} }
.el-input__prefix{ .el-input__prefix {
.el-input__icon{ .el-input__icon {
display: flex; display: flex;
align-items: center; align-items: center;
} }
} }
} }
} }
.doctor-diagnosis-doctor{ .doctor-diagnosis-doctor {
background: rgba(240, 242, 245, 0.6); background: rgba(240, 242, 245, 0.6);
border-radius: 8px; border-radius: 8px;
height: 120px; height: 120px;
padding: 20px; padding: 20px;
display: flex; display: flex;
.doctor-info{ .doctor-info {
width: 50%; width: 50%;
.doctor-info-nameRate{ .doctor-info-nameRate {
display: flex; display: flex;
.name-info{ .name-info {
min-width: 54px; min-width: 54px;
height: 18px; height: 18px;
font-size: 18px; font-size: 18px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #02120F; color: #02120f;
line-height: 18px; line-height: 18px;
margin-right: 10px; margin-right: 10px;
} }
} }
.doctor-info-phone{ .doctor-info-phone {
font-size: 18px; font-size: 18px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #02120F; color: #02120f;
padding-top: 10px; padding-top: 10px;
} }
.doctor-info-hisDep{ .doctor-info-hisDep {
font-size: 16px; font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #89888B; color: #89888b;
padding-top: 10px; padding-top: 10px;
.diasName{ .diasName {
padding-left: 10px; padding-left: 10px;
} }
} }
} }
.doctor-info-Num{ .doctor-info-Num {
display: flex; display: flex;
.doctor-info-NumToday{ .doctor-info-NumToday {
text-align: center; text-align: center;
min-width: 85px; min-width: 85px;
margin-right: 20px; margin-right: 20px;
.num-info-much{ .num-info-much {
font-size: 32px; font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #02120F; color: #02120f;
} }
} }
.doctor-info-maxToday{ .doctor-info-maxToday {
text-align: center; text-align: center;
min-width: 120px; min-width: 120px;
.num-info-much{ .num-info-much {
font-size: 32px; font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #02120F; color: #02120f;
} }
} }
} }
} }
.work-info-Num{ .work-info-Num {
padding-top: 20px; padding-top: 20px;
.work-info-Num-span{ .work-info-Num-span {
font-size: 14px; font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #02120F; color: #02120f;
}
.time-list-show {
display: flex;
flex-wrap: wrap;
height: 100%;
justify-content: space-between;
padding-bottom: 20px;
.home_grid_item {
flex-basis: 25%;
margin-bottom: 10px;
margin-top: 15px;
// text-align: center;
padding: 0;
border-radius: 11px;
.grid_text {
.choose-time-choose {
padding: 5px;
background: #edfbf9;
border-radius: 4px;
border: 1px solid #a1e1d9;
color: #0d9078;
}
.noChoose-time-choose {
padding: 5px;
background: #f5f6f8;
border-radius: 4px;
border: 1px solid #f5f6f8;
}
}
}
}
}
.work-info-botton {
.contest {
width: 200px;
border-radius: 18px;
}
.refresh {
width: 200px;
border-radius: 18px;
}
.el-button--default {
width: 150px;
border-radius: 18px;
} }
} }
} }
......
...@@ -441,6 +441,7 @@ ...@@ -441,6 +441,7 @@
:diagnose-type="diagnoseType" :diagnose-type="diagnoseType"
:doctor-id="doctorId" :doctor-id="doctorId"
:range-time-data="rangeTimeData" :range-time-data="rangeTimeData"
:doctor-info="doctorInfo"
@search="search" @search="search"
@changeStartTime="changeStartTime" @changeStartTime="changeStartTime"
/> />
...@@ -621,6 +622,7 @@ ...@@ -621,6 +622,7 @@
}, },
timer: null, timer: null,
fromType: 0, // 1或不传为为预约单列表 2为运营预约单列表 3为分诊台 4为接诊台 fromType: 0, // 1或不传为为预约单列表 2为运营预约单列表 3为分诊台 4为接诊台
doctorInfo: {},
}; };
}, },
watch: { watch: {
...@@ -1106,11 +1108,13 @@ ...@@ -1106,11 +1108,13 @@
}, },
// 设为待确认时间 // 设为待确认时间
waitMatchTime(row) { waitMatchTime(row) {
// debugger;
console.log(row, 'row'); console.log(row, 'row');
this.doctorInfo = row;
this.rangeTimeData = row.assistantBeginTime; this.rangeTimeData = row.assistantBeginTime;
this.diagnoseFlag = true; this.diagnoseFlag = true;
this.diagnosisDoctorVisible = true; this.diagnosisDoctorVisible = true;
// this.acceptsCeilings(row.doctorId);
this.diagnoseLogId = row.diagnoseLogId; this.diagnoseLogId = row.diagnoseLogId;
this.diagnoseType = row.diagnoseType; this.diagnoseType = row.diagnoseType;
if (row.doctorId == 0) { if (row.doctorId == 0) {
......
...@@ -6,19 +6,31 @@ ...@@ -6,19 +6,31 @@
border-radius: 6px; border-radius: 6px;
flex: 3.8; flex: 3.8;
} }
.setMaxNum{ .setMaxNum {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
} }
.list-item{ .input-value {
width: 100px;
/deep/.el-input-number__decrease {
width: 20px;
}
/deep/.el-input-number__increase {
width: 20px;
}
/deep/.el-input__inner {
padding: 0;
}
}
.list-item {
width: 86px; width: 86px;
height: 25px; height: 25px;
background: #FFFFFF; background: #ffffff;
border-radius: 16px; border-radius: 16px;
border: 1px solid rgba(0, 0, 0, 0.15); border: 1px solid rgba(0, 0, 0, 0.15);
text-align: center; text-align: center;
} }
.list-item-noth{ .list-item-noth {
width: 86px; width: 86px;
height: 25px; height: 25px;
background: red; background: red;
...@@ -26,21 +38,21 @@ ...@@ -26,21 +38,21 @@
border: 1px solid rgba(0, 0, 0, 0.15); border: 1px solid rgba(0, 0, 0, 0.15);
text-align: center; text-align: center;
} }
.w2{ .w2 {
/deep/.fc-prev-button{ /deep/.fc-prev-button {
background:#f4f4f5; background: #f4f4f5;
cursor: not-allowed; cursor: not-allowed;
border:1px solid #d9d9d9; border: 1px solid #d9d9d9;
} }
} }
.w3{ .w3 {
/deep/.fc-next-button{ /deep/.fc-next-button {
background:#f4f4f5; background: #f4f4f5;
border:1px solid #d9d9d9; border: 1px solid #d9d9d9;
cursor: not-allowed; cursor: not-allowed;
} }
} }
/deep/.fc-timegrid-event-harness{ /deep/.fc-timegrid-event-harness {
// position: absolute !important; // position: absolute !important;
left: 0 !important; left: 0 !important;
} }
...@@ -82,7 +94,7 @@ ...@@ -82,7 +94,7 @@
overflow: hidden; overflow: hidden;
border-radius: 8px; border-radius: 8px;
} }
.agment-left-copy{ .agment-left-copy {
margin-top: 34px; margin-top: 34px;
text-align: center; text-align: center;
} }
...@@ -115,19 +127,19 @@ ...@@ -115,19 +127,19 @@
color: #02120f; color: #02120f;
margin-top: 19px; margin-top: 19px;
} }
.agment-head-none{ .agment-head-none {
background: #fff; background: #fff;
pointer-events: none; pointer-events: none;
} }
.agment-head-priority { .agment-head-priority {
padding-top: 20px; padding-top: 20px;
display: flex; display: flex;
justify-content:center; justify-content: center;
align-items: center; align-items: center;
.item { .item {
width: 42px; width: 42px;
height: 32px; height: 32px;
margin-right:10px; margin-right: 10px;
border: 1px solid #d9d9d9; border: 1px solid #d9d9d9;
border-radius: 8px; border-radius: 8px;
text-align: center; text-align: center;
...@@ -145,19 +157,19 @@ ...@@ -145,19 +157,19 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.copy-submit{ .copy-submit {
background: #fff; background: #fff;
border: 1px solid #0D9078; border: 1px solid #0d9078;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #0D9078; color: #0d9078;
} }
.reset-submit{ .reset-submit {
background: #fff; background: #fff;
border: 1px solid #0D9078; border: 1px solid #0d9078;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #0D9078; color: #0d9078;
} }
/deep/.fc-timegrid-event { /deep/.fc-timegrid-event {
border-radius: 1px !important; border-radius: 1px !important;
...@@ -175,15 +187,15 @@ ...@@ -175,15 +187,15 @@
} }
/deep/.fc-header-toolbar { /deep/.fc-header-toolbar {
position: absolute; position: absolute;
right:1%; right: 1%;
top: 25px; top: 25px;
width: 20%; width: 20%;
} }
/deep/.fc-toolbar-title { /deep/.fc-toolbar-title {
font-size: 6px; font-size: 6px;
} }
/deep/.fc-toolbar-chunk{ /deep/.fc-toolbar-chunk {
display:flex; display: flex;
} }
/deep/.fc-button-primary { /deep/.fc-button-primary {
background: #fff; background: #fff;
...@@ -193,20 +205,20 @@ ...@@ -193,20 +205,20 @@
padding: 6px 16px; padding: 6px 16px;
flex-shrink: 0; flex-shrink: 0;
} }
@media screen and (min-width: 1000px) and (max-width: 1300px){ @media screen and (min-width: 1000px) and (max-width: 1300px) {
/deep/.fc-header-toolbar { /deep/.fc-header-toolbar {
right: 6%; right: 6%;
} }
.ag-left1 { .ag-left1 {
width:12% !important; width: 12% !important;
right: 18% !important; right: 18% !important;
border:1px solid red !important; border: 1px solid red !important;
} }
.ag-left2 { .ag-left2 {
width:12% !important; width: 12% !important;
right: 1% !important; right: 1% !important;
} }
} }
/deep/.fc-myCustomButton-button { /deep/.fc-myCustomButton-button {
padding: 6px 24px; padding: 6px 24px;
} }
...@@ -221,4 +233,3 @@ ...@@ -221,4 +233,3 @@
word-wrap: break-word; word-wrap: break-word;
white-space: normal; white-space: normal;
} }
...@@ -12,22 +12,25 @@ ...@@ -12,22 +12,25 @@
<div <div
ref="agment" ref="agment"
class="agment-box" class="agment-box"
:class="{'w2':week==2,'w3':week==3}" :class="{ w2: week == 2, w3: week == 3 }"
> >
<FullCalendar :options="calendarOptions" /> <FullCalendar :options="calendarOptions" />
<span>上限</span> <span>上限</span>
<div class="setMaxNum"> <div class="setMaxNum">
<div <div
v-for="(item,index) in maxList" v-for="(item, index) in maxList"
:key="index" :key="index"
:class="item.chooseList ? 'list-item-noth' : 'list-item' "
@click="getSetMax(item,index)"
> >
<span class="list-item-show">{{ item.value }}</span> <el-input-number
v-model="item.preNum"
:min="0"
class="input-value"
@change="handleChange(item, index)"
/>
</div> </div>
</div> </div>
</div> </div>
<div <div
class="agment-box-left" class="agment-box-left"
:style="{ height: scrollerHeight }" :style="{ height: scrollerHeight }"
> >
...@@ -35,7 +38,7 @@ ...@@ -35,7 +38,7 @@
<div <div
v-if="week == 2" v-if="week == 2"
class="ag-left1" class="ag-left1"
/> />
<!-- v-if="week == 2" --> <!-- v-if="week == 2" -->
<div <div
v-if="week == 5" v-if="week == 5"
...@@ -59,13 +62,11 @@ ...@@ -59,13 +62,11 @@
{{ this.schedulingTypeValue.departmentName }} {{ this.schedulingTypeValue.departmentName }}
</div> </div>
</div> </div>
<div <div style="margin-top: 24px">
style="margin-top: 24px"
>
<p class="agment-head-title"> <p class="agment-head-title">
选择匹配优先级 选择匹配优先级
</p> </p>
<div :class="this.schedulingType == 3 ? 'agment-head-none' : '' "> <div :class="this.schedulingType == 3 ? 'agment-head-none' : ''">
<div class="agment-head-priority"> <div class="agment-head-priority">
<p <p
v-for="(item, index) in createList" v-for="(item, index) in createList"
...@@ -137,19 +138,19 @@ ...@@ -137,19 +138,19 @@
}, },
data() { data() {
return { return {
maxList:[ maxList: [
{id:1, value:50, chooseList:false}, { preNum: 0 },
{id:2, value:50, chooseList:false}, { preNum: 0 },
{id:3, value:50, chooseList:false}, { preNum: 0 },
{id:4, value:50, chooseList:false}, { preNum: 0 },
{id:5, value:50, chooseList:false}, { preNum: 0 },
{id:6, value:50, chooseList:false}, { preNum: 0 },
{id:7, value:50, chooseList:false}, { preNum: 0 },
], ],
chooseList:true, chooseList: true,
id:'', id: '',
doctorId:'', doctorId: '',
schedulingTypeValue:{}, schedulingTypeValue: {},
schedulingType: 1, // 1 新增 2 编辑 3 查看 schedulingType: 1, // 1 新增 2 编辑 3 查看
createList: [], createList: [],
listDate: [], listDate: [],
...@@ -226,10 +227,9 @@ ...@@ -226,10 +227,9 @@
workingTicketVisible: false, // 工作表票详情页面 workingTicketVisible: false, // 工作表票详情页面
scrollerHeight: 0, scrollerHeight: 0,
loading: false, loading: false,
isDoIt:false, isDoIt: false,
getEveryDay:'', getEveryDay: '',
allShowList:[], copyArr: [],
}; };
}, },
watch: { watch: {
...@@ -239,7 +239,7 @@ ...@@ -239,7 +239,7 @@
this.haveWeek.push(newV); this.haveWeek.push(newV);
this.handleInitSearch(); this.handleInitSearch();
} }
if(newV !== oldV) { if (newV !== oldV) {
this.handleInitSearch(); this.handleInitSearch();
this.saveDoctoreScheduling(2, oldV); this.saveDoctoreScheduling(2, oldV);
} }
...@@ -248,12 +248,12 @@ ...@@ -248,12 +248,12 @@
created() { created() {
this.schedulingType = this.$route.query.type || 1; this.schedulingType = this.$route.query.type || 1;
this.id = this.$route.query.id; this.id = this.$route.query.id;
this.doctorId = this.$route.query.doctorId, (this.doctorId = this.$route.query.doctorId),
getDoctorInfo({ id: this.id }).then((res) => { getDoctorInfo({ id: this.id }).then((res) => {
if (res.code == '000000') { if (res.code == '000000') {
this.schedulingTypeValue = res.data; this.schedulingTypeValue = res.data;
this.currentIndex = res.data.level; this.currentIndex = res.data.level;
}else{ } else {
this.$toast(res.message); this.$toast(res.message);
} }
}); });
...@@ -289,33 +289,99 @@ ...@@ -289,33 +289,99 @@
} }
this.handleInitSearch(); this.handleInitSearch();
}, },
getSetMax(item, index) { handleChange(item, index) {
console.log(item, index, 'item,index'); console.log(this.getEveryDay, 'this.getEveryDay');
item.chooseList = !item.chooseList; this.maxList.map((itemChild, indexChild) => {
const obj = {}; console.log(indexChild, 'indexChild');
obj['weekDay'] = dayjs(dayjs(this.getEveryDay ).add(index, 'day')).format('YYYY-MM-DD HH:mm:ss'); return (itemChild.weekDay = dayjs(
obj['preNum'] = item.value; dayjs(this.getEveryDay).add(indexChild, 'day')
if(item.chooseList) { ).format('YYYY-MM-DD HH:mm:ss'));
this.allShowList.push(obj); });
}else{ this.maxList[index]['preNum'] = item.preNum;
this.allShowList.splice(index, 1); console.log(this.maxList, 'this.maxList');
},
getCopyData(data) {
this.calendarOptions.events = [];
const copyList = [];
const addDay = 7;
data.noAcceptList.map((item) => {
const obj = {};
obj['startTime'] = dayjs(item.startTime)
.add(addDay, 'day')
.format('YYYY-MM-DD HH:mm:ss');
obj['endTime'] = dayjs(item.endTime)
.add(addDay, 'day')
.format('YYYY-MM-DD HH:mm:ss');
copyList.push(obj);
});
data.noAcceptList = copyList;
this.isDoIt = true;
},
getWeekMax(data) {
console.log(this.maxList, 'this.maxList');
if (data.countList.length > 0) {
data.countList.forEach((item) => {
const clistDay = dayjs(item.workDay).day();
let index = 1;
if (clistDay) {
index = clistDay;
} else {
index = 7;
}
// console.log(this.maxList, this.maxList[index - 1].preNum, 'index');
this.maxList[index - 1].preNum = item.preNum;
// debugger;
this.maxList[index - 1].weekDay = dayjs(item.workDay)
.add(7, 'day')
.format('YYYY-MM-DD HH:mm:ss');
console.log(this.maxList, 'clistDay');
});
} }
console.log( this.allShowList, this.allShowList, 'cList');
}, },
handleInitSearch(isReset) { handleInitSearch(isReset, type) {
if (isReset) { if (isReset) {
this.calendarOptions.events = this.calendarOptions.events.filter((v) => (v.week !== this.week)); this.calendarOptions.events = this.calendarOptions.events.filter(
(v) => v.week !== this.week
);
console.log(this.calendarOptions.events); console.log(this.calendarOptions.events);
} }
let copyWeek = '';
if (type == 1) {
if (this.week == 1) {
copyWeek = 2;
} else if (this.week == 3) {
copyWeek = 1;
} else if (this.week == 4) {
copyWeek = 3;
} else if (this.week == 5) {
copyWeek = 4;
}
}
console.log(this.week, 'this.week');
const objParms = {}; const objParms = {};
objParms.doctorId = this.doctorId; objParms.doctorId = this.doctorId;
objParms.week = this.week; objParms.week = type == 1 ? copyWeek : this.week;
objParms.workId = this.id; objParms.workId = this.id;
// this.currentIndex = this.schedulingTypeValue.level; console.log(objParms.week, 'objParms.week');
dutyRosterQuery(objParms).then((res) => { dutyRosterQuery(objParms).then((res) => {
if (res.code == '000000') { if (res.code == '000000') {
this.calendarOptions.events = []; this.calendarOptions.events = [];
if (type == 1) {
this.getCopyData(res.data);
this.getWeekMax(res.data);
}
this.handleInitData(res.data); this.handleInitData(res.data);
if (res.data.countList.length > 0 && type != 1) {
const newAR = res.data.countList.map((item, index) => {
if (item.weekDay == this.maxList[index].weekDay) {
return {
preNum: item.preNum,
};
}
});
this.maxList = newAR;
console.log(newAR, 'newAR');
}
} else { } else {
this.$toast(res.message); this.$toast(res.message);
} }
...@@ -335,7 +401,6 @@ ...@@ -335,7 +401,6 @@
console.log(data.acceptList, 'data.acceptList'); console.log(data.acceptList, 'data.acceptList');
newDate = [].concat(acceptList, data.noAcceptList); newDate = [].concat(acceptList, data.noAcceptList);
} }
// const keyAll = ['end', 'endStr', 'id', 'start', 'startStr'];
newDate.forEach((item) => { newDate.forEach((item) => {
const dataObj = {}; const dataObj = {};
const id = (this.calendarOptions.events.length + 1) * 10; const id = (this.calendarOptions.events.length + 1) * 10;
...@@ -353,7 +418,10 @@ ...@@ -353,7 +418,10 @@
}, },
handleDatesSet(dataInfo) { handleDatesSet(dataInfo) {
this.getEveryDay = dayjs(dataInfo.startStr).format('YYYY-MM-DD HH:mm:ss'); this.getEveryDay = dayjs(dataInfo.startStr).format('YYYY-MM-DD HH:mm:ss');
console.log(this.getEveryDay, 'dataInfo.startStrdataInfo.startStrdataInfo.startStr'); console.log(
this.getEveryDay,
'dataInfo.startStrdataInfo.startStrdataInfo.startStr'
);
const currentTime = new Date().getTime(); const currentTime = new Date().getTime();
const getTime = new Date(dataInfo.startStr).getTime(); const getTime = new Date(dataInfo.startStr).getTime();
const cz = currentTime - getTime; const cz = currentTime - getTime;
...@@ -361,32 +429,28 @@ ...@@ -361,32 +429,28 @@
const timeDifference = (cz / oneHour) | 0; const timeDifference = (cz / oneHour) | 0;
const headObj = this.calendarOptions.customButtons.myCustomButton; const headObj = this.calendarOptions.customButtons.myCustomButton;
console.log(timeDifference, 'timeDifference'); console.log(timeDifference, 'timeDifference');
// debugger;
if (timeDifference >= 0 && timeDifference < 7) { if (timeDifference >= 0 && timeDifference < 7) {
// 过去 // 过去
this.week = 1; this.week = 1;
headObj.text = '本周'; headObj.text = '本周';
}else if (timeDifference == -6) { } else if (timeDifference >= -6 && timeDifference <= -1) {
// 未来 // 未来
this.week = 3; this.week = 3;
headObj.text = '下周'; headObj.text = '下周';
} else if (timeDifference == -13) { } else if (timeDifference >= -13 && timeDifference <= -7) {
// 未来 // 未来
this.week = 4; this.week = 4;
headObj.text = '下二周'; headObj.text = '下二周';
}else if (timeDifference == -20) { } else if (timeDifference >= -20 && timeDifference <= -14) {
// 未来 // 未来
this.week = 5; this.week = 5;
headObj.text = '下三周'; headObj.text = '下三周';
} else if (timeDifference == 7) { } else if (timeDifference > 7) {
// 现在 // 现在
headObj.text = '上周'; headObj.text = '上周';
this.week = 2; this.week = 2;
} }
this.allShowList = [];
this.maxList.map(item => {
return item.chooseList = false;
});
console.log( this.maxList, ' this.maxList');
}, },
eventResize(event) { eventResize(event) {
const index = this.getIdDeleteData(event.event.id); const index = this.getIdDeleteData(event.event.id);
...@@ -495,10 +559,11 @@ ...@@ -495,10 +559,11 @@
this.handleInitSearch(true); this.handleInitSearch(true);
}, },
copyDoctoreScheduling() { copyDoctoreScheduling() {
this.handleInitSearch(true, 1);
console.log(this.copyArr, 'copyArr');
}, },
saveDoctoreScheduling(type, weekV = 0) { saveDoctoreScheduling(type, weekV = 0) {
if(this.isDoIt) { if (this.isDoIt) {
console.log(this.week, 'this.week', weekV); console.log(this.week, 'this.week', weekV);
this.loading = true; this.loading = true;
const objParms = {}; const objParms = {};
...@@ -519,22 +584,18 @@ ...@@ -519,22 +584,18 @@
objParms.list.push(obj); objParms.list.push(obj);
} }
}); });
objParms.countReqList = this.allShowList; objParms.countReqList = this.maxList;
saveDutyRoster(objParms).then((res) => { saveDutyRoster(objParms).then((res) => {
if (res.code === '000000') { if (res.code === '000000') {
// this.$toast(res.message);
// this.handleInitSearch(true);
// this.$router.go(0);
this.loading = false; this.loading = false;
if(type == 1) { if (type == 1) {
this.$message({ this.$message({
message: '排班保存成功', message: '排班保存成功',
type: 'success' type: 'success',
}); });
} }
this.isDoIt = false; this.isDoIt = false;
} else { } else {
// this.$toast(res.message);
this.$message.error(res.message || '排班保存失败'); this.$message.error(res.message || '排班保存失败');
} }
}); });
......
...@@ -90,7 +90,8 @@ ...@@ -90,7 +90,8 @@
getFirstLevelLable, getFirstLevelLable,
childLabelList, childLabelList,
previewWork, previewWork,
setPlatformUpper setPlatformUpper,
getPlatformUpper,
} from '@/api/serviceSchedule'; } from '@/api/serviceSchedule';
export default { export default {
name: 'Index', name: 'Index',
...@@ -99,7 +100,7 @@ ...@@ -99,7 +100,7 @@
}, },
data() { data() {
return { return {
maxDiaNum:100, maxDiaNum: 100,
dateTime: '', dateTime: '',
interfaceOptions: [], interfaceOptions: [],
innerform: [], innerform: [],
...@@ -163,16 +164,25 @@ ...@@ -163,16 +164,25 @@
watch: {}, watch: {},
created() { created() {
this.getFirstLevelLable(); this.getFirstLevelLable();
this.getPlatformUpper();
}, },
mounted() {}, mounted() {},
methods: { methods: {
getPlatformUpper() {
getPlatformUpper().then((res) => {
if (res.code === '000000') {
console.log(res);
this.maxDiaNum = res.data;
}
});
},
setPlatformUpper() { setPlatformUpper() {
const params = { const params = {
num:this.maxDiaNum num: this.maxDiaNum,
}; };
setPlatformUpper(params).then(res => { setPlatformUpper(params).then((res) => {
if (res.code === '000000') { if (res.code === '000000') {
console.log(res); this.getPlatformUpper();
} }
}); });
}, },
...@@ -335,40 +345,40 @@ ...@@ -335,40 +345,40 @@
align-items: center; align-items: center;
padding: 20px 0 10px 20px; padding: 20px 0 10px 20px;
justify-content: space-between; justify-content: space-between;
.agmentSelect-select-left{ .agmentSelect-select-left {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
.serviceSchedule-cascader { .serviceSchedule-cascader {
background: #fff; background: #fff;
margin-right: 15px; margin-right: 15px;
} }
.serviceSchedule_dateTime { .serviceSchedule_dateTime {
margin-right: 15px; margin-right: 15px;
} }
.submit-btn { .submit-btn {
height: 32px; height: 32px;
background: #0d9078; background: #0d9078;
border-radius: 16px; border-radius: 16px;
display: flex; display: flex;
align-items: center; align-items: center;
} }
} }
.agmentSelect-select-right{ .agmentSelect-select-right {
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 30px;
.el-input-number {
margin: 0 10px;
}
.submit-btn {
height: 32px;
background: #0d9078;
border-radius: 16px;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; }
padding-right: 30px;
.el-input-number{
margin: 0 10px;
}
.submit-btn {
height: 32px;
background: #0d9078;
border-radius: 16px;
display: flex;
align-items: center;
}
} }
} }
.fullCalendar-show { .fullCalendar-show {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册