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

排班

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