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

联调

上级 67b991a2
......@@ -78,3 +78,17 @@ export const getPlatformUpper = async () => {
method: 'post',
});
};
export const saveLevelAndDayCount = async (data) => {
return request({
url: '/diagnose/doctor/work/saveLevelAndDayCount',
data: data,
method: 'post',
});
};
export const getLevelAndDayCount = async (data) => {
return request({
url: `/diagnose/doctor/work/getLevelAndDayCount/${data.workId}`,
data: data,
method: 'post',
});
};
......@@ -6,176 +6,6 @@
@close="cancel"
@open="opendialog"
>
<!-- <el-row :gutter="30" class="row search" type="flex" style="margin-bottom:0;">-->
<!-- <el-form
ref="setForm"
:rules="addRules"
:model="formData"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%"
>
<el-form-item
label="接诊医生"
class="required-label"
prop="receptionId"
> -->
<!-- <el-input v-model="formData.doctorName" placeholder="请选择接诊医生" class="set-width" disabled></el-input>-->
<!-- <el-col :span="15">
<el-select
v-model="formData.receptionId"
filterable
placeholder="请选择接诊医生"
class="set-width"
style="width: 100%"
@change="doctorChanged($event)"
>
<el-option
v-for="item of doctorList"
:key="item.doctorId"
:label="item.doctorReceptionName"
:value="item.doctorId"
/>
</el-select>
</el-col>
</el-form-item>
<el-form-item label="接诊医生职称">
<el-col :span="15">
<el-input
v-model="formData.doctorTitle"
placeholder="请选择职称"
class="set-width"
disabled
style="width: 100%"
/> -->
<!-- <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-form-item>
<el-form-item label="接诊医生所在机构">
<el-col :span="15">
<el-input
v-model="formData.doctorHospital"
placeholder="请选择机构"
class="set-width"
disabled
style="width: 100%"
/>
</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 label="接诊医生所在科室">
<el-col :span="15">
<el-input
v-model="formData.doctorDepartment"
placeholder="请选择机构"
class="set-width"
disabled
style="width: 100%"
/> -->
<!-- <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-form-item>
<el-form-item label="接诊医生电话">
<el-col :span="15">
<el-input
v-model="formData.doctorMobile"
placeholder="请输入接诊医生手机号"
disabled
class="set-width"
style="width: 100%"
/>
</el-col>
</el-form-item>
<el-form-item
v-if="
formData.receptionName == '站外医生' ||
formData.receptionName == '云鹊医助'
"
label="外部医生姓名"
class="required-label"
prop="outsideDoctor"
>
<el-col :span="15">
<el-input
v-model="formData.outsideDoctor"
placeholder="请输入外部医生姓名"
class="set-width"
style="width: 135%"
/>
</el-col>
</el-form-item>
<el-form-item
label="问诊时间"
class="required-label"
>
<el-col :span="15">
<div
class="set-width grey-bg"
style="width: 100%"
@click="openDiagnosisStartTimeDialog"
>
<i class="el-icon-alarm-clock" />
<span v-if="!rangeTimeData">请选择问诊时间</span>
<span v-else>
{{
rangeTimeData
? rangeTimeData
: dayFormatWithoutSecond(startTimeValue)
}}
{{
dayFormatWithoutSecond(endTimeValue)
? ' -- ' + dayFormatWithoutSecond(endTimeValue)
: ''
}}</span>
</div>
</el-col>
</el-form-item>
<el-form-item
class="required-label"
prop="diagnoseChannel"
label="问诊方式"
>
<el-col :span="15">
<el-radio-group
v-model="formData.diagnoseChannel"
size="small"
style="line-height: 45px; width: 135%"
>
<el-radio :label="1">
APP问诊(系统发起问诊)
</el-radio>
<el-radio :label="2">
线下问诊(APP不会自动发起问诊)
</el-radio>
</el-radio-group>
</el-col>
</el-form-item>
</el-form> -->
<!-- </el-row>-->
<!-- <span
slot="footer"
class="dialog-footer"
style="text-align: center"
>
<el-button
type="primary"
@click="refreshData"
>刷新数据</el-button>
<el-button @click="cancel">取 消</el-button>
<el-button
type="primary"
:disabled="isClick"
@click="confirm"
>确定</el-button>
</span> -->
<div class="open-diagnosis-doctor">
<div class="choose-diagnosis-doctor">
<el-select
......@@ -195,20 +25,22 @@
<el-date-picker
v-model="chooseTime"
type="date"
:clearable="false"
placeholder="选择日期"
@change="getNowDate"
/>
</div>
<div class="doctor-diagnosis-doctor">
<div
v-if="formData.receptionName != ''"
class="doctor-diagnosis-doctor"
>
<div class="doctor-info">
<div class="doctor-info-nameRate">
<span class="name-info">{{ formData.receptionName }}</span>
<span class="name-info-rate">
<el-rate
v-model="rateValue"
:colors="colors"
disabled
/>
<span
class="rate-value"
>优先级<span> {{ rateValue }} </span></span>
</span>
</div>
<div class="doctor-info-phone">
......@@ -234,27 +66,51 @@
</div>
</div>
</div>
<div
v-else
class="doctor-diagnosis-none"
>
<span>未选定医生</span>
</div>
<div class="work-info-Num">
<span class="work-info-Num-span">可排班时间</span>
<div class="time-list-show">
<span
class="work-info-Num-span"
>可选排班时间(预约已满需要沟通确定时间)</span>
<div
v-if="timeChoosetList.length > 0"
class="time-list-show"
>
<div
v-for="(itemChild, indexChild) in timeChoosetList"
:key="indexChild"
class="home_grid_item"
>
<div class="grid_text">
<div
class="grid_text"
:class="chooseTimeIndex == indexChild && 'choose-time-choose'"
@click="getChooseTimeValue(itemChild, indexChild)"
>
<span
:class="
chooseTimeIndex == indexChild
? 'choose-time-choose'
: 'noChoose-time-choose'
itemChild.isFull == 1 ? 'show-meet-time' : 'no-meet-time'
"
@click="getChooseTimeValue(itemChild, indexChild)"
>{{ itemChild.leisureTime }}</span>
>{{ itemChild.time }}</span>
<p
:class="
itemChild.isFull == 1 ? 'can-meet-time' : 'canot-meet-time'
"
>
{{ itemChild.isFull == 1 ? '可约' : '已满' }}
</p>
</div>
</div>
</div>
<div
v-else
class="time-list-showNo"
>
<span> 无可选时间 </span>
</div>
<div class="work-info-botton">
<span
slot="footer"
......@@ -485,8 +341,8 @@
endTimeValue: '',
timeRange: '',
selfTimeRange: '',
timeChoosetList: [
],
giveTimeList: [],
timeChoosetList: [],
startTime: '',
endTime: '',
todayNum: '',
......@@ -536,9 +392,8 @@
getLeisureTime(chooseTime) {
console.log(this.doctorInfo);
const params = {
dictorId: this.formData.receptionId,
doctorId: this.formData.receptionId,
weekDay: chooseTime,
departmentId: this.formData.doctorDepartmentId,
};
getLeisureTime(params).then((res) => {
if (res.code == '000000') {
......@@ -699,18 +554,8 @@
startTimeConfirm(isCancle) {
console.log('isCancle-', isCancle);
if (isCancle == 'cancel') {
// this.startTimeValue = '';
this.endTimeValue = '';
this.timeRange = '';
// if (!this.startTimeValue) {
// this.timeRange = '';
// this.endTimeValue = '';
// }else{
// this.timeRange = Number(20);
// this.endTimeValue = dayjs(this.rangeTimeData)
// .add(this.timeRange, 'minute')
// .format('YYYY-MM-DD HH:mm:ss');
// }
}
if (isCancle == 'submit') {
if (String(this.startTimeValue).trim() === '' || !this.startTimeValue) {
......@@ -880,6 +725,19 @@
line-height: 18px;
margin-right: 10px;
}
.name-info-rate {
.rate-value {
padding: 5px 10px;
// width: 63px;
height: 18px;
background: #0d9078;
border-radius: 9px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
}
}
}
.doctor-info-phone {
font-size: 18px;
......@@ -924,6 +782,15 @@
}
}
}
.doctor-diagnosis-none {
background: rgba(240, 242, 245, 0.6);
border-radius: 8px;
height: 120px;
padding: 20px;
display: flex;
align-items: center;
justify-content: center;
}
.work-info-Num {
padding-top: 20px;
.work-info-Num-span {
......@@ -936,31 +803,58 @@
display: flex;
flex-wrap: wrap;
height: 100%;
justify-content: space-between;
padding-bottom: 20px;
.home_grid_item {
flex-basis: 25%;
flex-basis: 17%;
margin-bottom: 10px;
margin-top: 15px;
// text-align: center;
text-align: center;
padding: 0;
border-radius: 11px;
margin-right: 30px;
.grid_text {
background: #f5f6f8;
border: 1px solid transparent;
padding: 3px;
.show-meet-time {
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #212121;
}
.no-meet-time {
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
.can-meet-time {
font-size: 10px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0d9078;
padding: 2px;
}
.canot-meet-time {
font-size: 10px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
padding: 2px;
}
}
.choose-time-choose {
padding: 5px;
padding: 3px;
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;
}
}
}
.time-list-showNo {
height: 100px;
padding-top: 10px;
}
}
.work-info-botton {
......
<template>
<div>
<div class="setTime-show">
<el-dialog
:title="title"
:visible.sync="diagnosisTimeVisible"
@close="cancel"
>
<el-form
ref="setForm"
:rules="addRules"
:model="model"
label-width="250px"
label-suffix=":"
label-position="right"
size="mini"
style="width: 100%"
>
<el-form-item
label="助诊意向时间"
class="required-label"
prop="rangeTime"
>
<el-col :span="15">
<div class="choose-day-next">
<el-date-picker
v-model="rangeTime"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="pickerOptions1"
style="width: 135%"
v-model="chooseTime"
type="date"
placeholder="选择日期"
class="set-tiem-picker"
:clearable="false"
:picker-options="pickerOptionsStart"
@change="getNowDate"
/>
</el-col>
</el-form-item>
<el-form-item label="备注">
<el-col :span="15">
<el-input
v-model="model.assistantRemark"
type="textarea"
style="width: 135%"
size="small"
minlength="2"
maxlength="500"
placeholder="请输入备注"
/>
</el-col>
</el-form-item>
</el-form>
<!-- </el-row>-->
<el-button
class="next-day-pick"
@click="nextChangeData"
>
下一天
</el-button>
</div>
<div class="doctor-info">
<div class="name-floor">
<span class="name-info-detail">{{ userName }}</span>
<span class="doctor-info-name">基层医生</span>
<p class="info-phone">
{{ userNamePhone }}
</p>
</div>
<div class="daignose-info">
<span>分诊科室:{{ triageDepartment }}</span>
</div>
</div>
<div class="work-info-Num">
<span class="work-info-Num-span">可排班时间</span>
<div class="time-list-show">
<div
v-for="(itemChild, indexChild) in timeChoosetList"
:key="indexChild"
class="home_grid_item"
>
<div
class="grid_text"
:class="
chooseTimeIndex == indexChild &&
itemChild.isFull == 1 &&
'choose-time-choose'
"
@click="getChooseTimeValue(itemChild, indexChild)"
>
<span
:class="
itemChild.isFull == 1 ? 'show-meet-time' : 'no-meet-time'
"
>{{ itemChild.time }}</span>
<p
:class="
itemChild.isFull == 1 ? 'can-meet-time' : 'canot-meet-time'
"
>
{{ itemChild.isFull == 1 ? '可约' : '已满' }}
</p>
</div>
</div>
</div>
</div>
<div class="work-info-botton">
<span
slot="footer"
class="dialog-footer"
style="text-align: center"
>
<el-button @click="cancel">取 消</el-button>
<el-button
class="contest"
type="primary"
:disabled-="isClick"
:disabled="isClick"
@click="confirm"
>确定</el-button>
<el-button
class="cancel-submit"
@click="cancel"
>取 消</el-button>
</span>
</div>
</el-dialog>
</div>
</template>
<script>
import { updateDiagnosis } from '../../utils/diagnosis';
import { getLeisureTime } from '@/api/diagnosis';
import dayjs from 'dayjs';
let vm = null;
export default {
props: {
......@@ -82,15 +108,24 @@
type: Number,
default: 0,
},
userName: {
type: String,
default: '',
},
userNamePhone: {
type: String,
default: '',
},
triageDepartment: {
type: String,
default: '',
},
departmentId: {
type: String,
default: '',
},
},
data() {
// let checkDate = (rule, value, callback) => {
// if(!value) {
// callback(new Error("请选择助诊意向时间"));
// } else {
// callback();
// }
// }
return {
show: false,
title: '设置时间',
......@@ -101,40 +136,74 @@
assistantRemark: '',
},
rangeTime: '',
addRules: {
rangeTime: [
// {type: 'array',required: true, validator: checkDate, trigger: 'blur,change'}
{
type: 'array',
required: true,
// message: "预约时间不能为空",
// validator: checkDate,
trigger: 'change',
fields: {
0: { required: true, type: 'date', message: '开始时间不能为空' },
1: { required: true, type: 'date', message: '结束时间不能为空' },
},
},
],
},
pickerOptions1: {
chooseTime: dayjs(new Date()).format('YYYY-MM-DD'),
timeChoosetList: [],
chooseTimeIndex: 1000,
pickerOptionsStart: {
disabledDate: (time) => {
return time.getTime() < Date.now() - 1 * 24 * 3600 * 1000; // 减去一天的时间代表可以选择同一天;
const month = 28 * 24 * 60 * 60 * 1000; // 限定一个日期范围,这里是28天
return (
time.getTime() + 1 * 24 * 60 * 60 * 1000 < new Date() ||
time.getTime() > new Date().getTime() + month
);
},
},
};
},
watch: {
// diagnosisTimeVisible(val, b) {
// if (val != b ) {
// this.getLeisureTime();
// console.log(this.departmentId, 'bizTypebizTypebizType');
// }
// // 操作
// }
},
created() {
vm = this;
console.log(this.departmentId, 'bizTypebizTypebizType');
this.getLeisureTime();
},
methods: {
confirm() {
// this.$refs.setForm.validate((valid) => {
// if (valid) {
if (!(this.rangeTime != null && this.rangeTime.length > 0)) {
vm.$message.warning('请选择助诊意向时间');
getLeisureTime(time) {
console.log(this.doctorInfo);
const params = {
departmentId: this.departmentId,
weekDay: time ? time : this.chooseTime,
};
getLeisureTime(params).then((res) => {
if (res.code == '000000') {
console.log(res);
this.timeChoosetList = res.data || [];
}
});
},
getNowDate(value) {
this.chooseTime = dayjs(value).format('YYYY-MM-DD');
this.getLeisureTime(this.chooseTime);
},
nextChangeData() {
const maxDate = dayjs(new Date()).add(27, 'day').unix();
if (dayjs(this.chooseTime).unix() > maxDate) {
this.$message({
message: '时间不能超过28天',
type: 'warning',
duration: 1000,
});
return false;
}
this.chooseTime = dayjs(this.chooseTime)
.add(1, 'day')
.format('YYYY-MM-DD');
this.getLeisureTime(this.chooseTime);
},
getChooseTimeValue(value, index) {
if (value.isFull == 2) {
return;
}
this.chooseTimeIndex = index;
},
confirm() {
vm.isClick = true;
const req = {
id: this.diagnoseLogId,
......@@ -167,4 +236,147 @@
};
</script>
<style lang="scss" scoped></style>
<style lang="scss" scoped>
.setTime-show {
/deep/.el-dialog__body {
padding: 30px 50px;
.choose-day-next {
padding: 0 30px 15px 0;
.el-date-editor {
margin-right: 10px;
.el-input__inner {
border-radius: 16px;
}
}
.next-day-pick {
width: 120px;
border-radius: 20px;
border: 1px solid #0d9078;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0d9078;
}
}
.doctor-info {
background: #f0f2f5;
border-radius: 8px;
height: 68px;
display: flex;
.name-floor {
width: 50%;
padding: 10px 26px;
.name-info-detail {
font-size: 18px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #02120f;
margin-bottom: 8px;
margin-right: 5px;
}
.doctor-info-name {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
margin-bottom: 8px;
}
.info-phone {
font-size: 18px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #02120f;
}
}
.daignose-info {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
padding-top: 40px;
}
}
.work-info-Num {
padding-top: 20px;
.work-info-Num-span {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #02120f;
}
.time-list-show {
display: flex;
flex-wrap: wrap;
height: 100%;
// justify-content: space-between;
padding-bottom: 20px;
.home_grid_item {
flex-basis: 17%;
margin-bottom: 10px;
margin-top: 15px;
text-align: center;
padding: 0;
border-radius: 11px;
margin-right: 20px;
.grid_text {
background: #f5f6f8;
border: 1px solid transparent;
padding: 3px;
.show-meet-time {
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #212121;
}
.no-meet-time {
font-size: 13px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
}
.can-meet-time {
font-size: 10px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0d9078;
padding: 2px;
}
.canot-meet-time {
font-size: 10px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #666666;
padding: 2px;
}
}
.choose-time-choose {
padding: 3px;
background: #edfbf9;
border-radius: 4px;
border: 1px solid #a1e1d9;
color: #0d9078;
}
}
}
}
.dialog-footer {
.contest {
width: 180px;
height: 40px;
background: #0d9078;
border-radius: 20px;
}
.cancel-submit {
width: 180px;
height: 40px;
border-radius: 20px;
border: 1px solid #0d9078;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0d9078;
}
}
}
}
</style>
......@@ -435,7 +435,7 @@
@search="search"
/>
<diagnosis-doctor
v-if="diagnoseFlag"
v-if="diagnosisDoctorVisible"
:diagnosis-doctor-visible.sync="diagnosisDoctorVisible"
:diagnose-log-id="diagnoseLogId"
:diagnose-type="diagnoseType"
......@@ -452,9 +452,14 @@
@search="search"
/>
<diagnosis-time
v-if="diagnosisTimeVisible"
:diagnosis-time-visible.sync="diagnosisTimeVisible"
:diagnose-log-id="diagnoseLogId"
:biz-type="bizType"
:user-name="userName"
:user-name-phone="userNamePhone"
:triage-department="triageDepartment"
:department-id="departmentId"
@search="search"
/>
<rematching-doctor
......@@ -623,6 +628,10 @@
timer: null,
fromType: 0, // 1或不传为为预约单列表 2为运营预约单列表 3为分诊台 4为接诊台
doctorInfo: {},
userName: '',
userNamePhone: '',
triageDepartment: '',
departmentId: '',
};
},
watch: {
......@@ -1030,14 +1039,13 @@
},
// 设为待匹配医生
waitMatchDot(row) {
console.log(row, 'doctorData111');
this.doctorData = row;
this.diagnoseLogId = row.diagnoseLogId;
// 待分诊
// if(row.status == 22){
// this.doctorVisible = true;
// this.bizType = 7;
// this.triageDepartmentId = row.triageDepartmentId;
// }
// else {
this.userName = row.userName;
this.userNamePhone = row.userMobile;
this.triageDepartment = row.triageDepartment;
this.departmentId = row.departmentId;
this.diagnosisTimeVisible = true;
this.bizType = 5;
// }
......@@ -1108,13 +1116,11 @@
},
// 设为待确认时间
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) {
......
......@@ -59,10 +59,39 @@
.agment-box-left {
flex: 1;
height: 100%;
padding: 20px;
margin-left: 12px;
background: #fff;
border-radius: 6px;
text-align: center;
display: flex;
justify-content: center;
}
.el-dialog-show {
.set-agment-maxNum {
.first-show-num {
text-align: center;
padding-bottom: 30px;
}
.num-max {
text-align: center;
.hour-num-title {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #02120f;
}
.num-input-show {
padding-top: 10px;
.el-input {
width: 50%;
/deep/.el-input__inner {
border-radius: 20px;
text-align: center;
}
}
}
}
}
}
.ag-left-change {
// position: relative;
......@@ -86,28 +115,86 @@
top: 18px;
}
}
.show-work-set {
margin-top: 100px;
}
.agment-left-con {
margin-top: 70px;
background: #f0f2f5;
height: auto;
padding: 20px;
overflow: hidden;
border-radius: 8px;
padding: 15px;
text-align: center;
background: #f2f2f2;
border-radius: 12px;
}
.reset-doctor-schedu {
padding: 30px 15px 5px 15px;
text-align: center;
.copy-submit {
background: #fff;
border: 1px solid #9ed4ca;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0d9078;
}
}
.copy-doctor-schedu {
padding: 5px;
margin: 0 auto;
text-align: center;
.copy-submit {
background: #fff;
border: 1px solid #9ed4ca;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0d9078;
}
}
.agment-left-copy {
margin-top: 34px;
padding: 5px;
margin: 0 auto;
text-align: center;
.copy-reset-schedu {
padding-top: 14px;
.copy-week-schedu {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0d9078;
margin-right: 5px;
cursor: pointer;
}
.copy-reaset-line {
color: #d9d9d9;
}
.reset-week-schedu {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0d9078;
margin-left: 5px;
cursor: pointer;
}
}
}
.first-left-max {
padding: 5px;
margin: 0 auto;
text-align: center;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0d9078;
cursor: pointer;
}
.agment-head {
border-radius: 5px;
display: flex;
justify-content: flex-start;
align-items: flex-end;
text-align: center;
}
.agment-head-name {
font-size: 20px;
color: #02120f;
font-weight: 600;
padding: 3px;
}
.agment-head-phone {
font-size: 18px;
......@@ -116,8 +203,10 @@
.agment-hospital {
color: #89888b;
font-size: 16px;
margin-top: 14px;
line-height: 24px;
margin-top: 10px;
}
.agment-hospital-show {
margin-right: 10px;
}
.agment-hospital-ks {
margin-top: 8px;
......@@ -131,6 +220,15 @@
background: #fff;
pointer-events: none;
}
.new-max {
text-align: center;
margin-top: 20px;
}
.new-max-none {
text-align: center;
margin-top: 20px;
pointer-events: none;
}
.agment-head-priority {
padding-top: 20px;
display: flex;
......@@ -158,11 +256,11 @@
justify-content: center;
}
.copy-submit {
background: #fff;
background: #0d9078;
border: 1px solid #0d9078;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0d9078;
color: #ffffff;
}
.reset-submit {
background: #fff;
......@@ -187,8 +285,9 @@
}
/deep/.fc-header-toolbar {
position: absolute;
right: 1%;
top: 25px;
right: 0;
top: 15px;
padding: 20px;
width: 20%;
}
/deep/.fc-toolbar-title {
......@@ -212,7 +311,7 @@
.ag-left1 {
width: 12% !important;
right: 18% !important;
border: 1px solid red !important;
// border: 1px solid red !important;
}
.ag-left2 {
width: 12% !important;
......
......@@ -15,20 +15,6 @@
:class="{ w2: week == 2, w3: week == 3 }"
>
<FullCalendar :options="calendarOptions" />
<span>上限</span>
<div class="setMaxNum">
<div
v-for="(item, index) in maxList"
:key="index"
>
<el-input-number
v-model="item.preNum"
:min="0"
class="input-value"
@change="handleChange(item, index)"
/>
</div>
</div>
</div>
<div
class="agment-box-left"
......@@ -39,13 +25,12 @@
v-if="week == 2"
class="ag-left1"
/>
<!-- v-if="week == 2" -->
<div
v-if="week == 5"
class="ag-left2"
/>
<!-- -->
</div>
<div class="show-work-set">
<div class="agment-left-con">
<div class="agment-head">
<div class="agment-head-name">
......@@ -56,70 +41,109 @@
</div>
</div>
<div class="agment-hospital">
{{ this.schedulingTypeValue.hospital }}
</div>
<div class="agment-hospital agment-hospital-ks">
{{ this.schedulingTypeValue.departmentName }}
</div>
</div>
<div style="margin-top: 24px">
<p class="agment-head-title">
选择匹配优先级
</p>
<div :class="this.schedulingType == 3 ? 'agment-head-none' : ''">
<div class="agment-head-priority">
<p
v-for="(item, index) in createList"
:key="index"
class="item"
:class="{ active: item == currentIndex }"
@click="handlePriority(item)"
>
{{ item }}
</p>
<span
class="agment-hospital-show"
>{{ this.schedulingTypeValue.hospital }}
</span>
</div>
<div class="agment-hospital">
<span>{{ this.schedulingTypeValue.departmentName }}</span>
</div>
</div>
<div
v-if="this.schedulingType != 3"
class="agment-left-copy"
class="reset-doctor-schedu"
>
<el-button
round
class="copy-submit"
style="width: 210px"
@click="copyDoctoreScheduling"
style="width: 240px"
@click="resetDoctoreScheduling"
>
重复制上周排班
重置排班
</el-button>
</div>
<div
v-if="this.schedulingType != 3"
class="agment-left-button"
class="copy-doctor-schedu"
>
<el-button
round
class="reset-submit"
style="width: 110px"
@click="resetDoctoreScheduling"
class="copy-submit"
style="width: 240px"
@click="copyDoctoreScheduling"
>
重置
复制上周排班
</el-button>
</div>
<div
v-if="this.schedulingType != 3"
class="agment-left-copy"
>
<el-button
type="primary"
round
style="width: 110px"
class="copy-submit"
style="width: 240px"
@click="saveDoctoreScheduling(1)"
>
保存
保存全部
</el-button>
</div>
<div
v-if="this.schedulingType != 3"
class="first-left-max"
>
<span @click="centerDialogVisible = true">优先级和接诊上限设置</span>
</div>
</div>
</div>
<el-dialog
:visible.sync="centerDialogVisible"
width="30%"
center
class="el-dialog-show"
>
<div class="set-agment-maxNum">
<div class="first-show-num">
<span class="agment-head-title"> 选择匹配优先级 </span>
<div class="agment-head-priority">
<p
v-for="(item, index) in createList"
:key="index"
class="item"
:class="{ active: item == currentIndex }"
@click="handlePriority(item)"
>
{{ item }}
</p>
</div>
</div>
<div class="num-max">
<span class="hour-num-title">每小时接诊上限人数</span>
<div class="num-input-show">
<el-input-number
v-model="maxNumValue"
:min="10"
:max="20"
@change="getMaxNumValue"
/>
</div>
</div>
</div>
<span
slot="footer"
class="dialog-footer"
>
<el-button @click="centerDialogVisible = false">取 消</el-button>
<el-button
type="primary"
@click="submitSetData"
>确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
// import '@fullcalendar/core/vdom'
// import moment from 'moment';
import dayjs from 'dayjs';
import FullCalendar from '@fullcalendar/vue';
import dayGridPlugin from '@fullcalendar/daygrid';
......@@ -130,6 +154,8 @@
saveDutyRoster,
getLevel,
getDoctorInfo,
saveLevelAndDayCount,
getLevelAndDayCount,
} from '@/api/serviceSchedule';
export default {
name: 'Index',
......@@ -138,15 +164,7 @@
},
data() {
return {
maxList: [
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
],
maxPreNum: '',
chooseList: true,
id: '',
doctorId: '',
......@@ -230,8 +248,11 @@
isDoIt: false,
getEveryDay: '',
copyArr: [],
centerDialogVisible: false,
maxNumValue: '',
};
},
computed: {},
watch: {
week(newV, oldV) {
if (this.haveWeek.indexOf(newV) == -1) {
......@@ -241,6 +262,7 @@
if (newV !== oldV) {
this.handleInitSearch();
this.saveDoctoreScheduling(2, oldV);
// this.getLevelAndDayCount(newV);
}
},
},
......@@ -264,6 +286,7 @@
},
mounted() {
this.scrollerHeight = this.$refs.agment.clientHeight + 'px';
// this.scrollerHeight = 400 + 'px';
this.init();
},
methods: {
......@@ -285,14 +308,19 @@
this.calendarOptions.editable = false;
}
this.handleInitSearch();
this.getLevelAndDayCount();
},
handleChange(item, index) {
this.maxList.map((itemChild, indexChild) => {
return (itemChild.weekDay = dayjs(
dayjs(this.getEveryDay).add(indexChild, 'day')
).format('YYYY-MM-DD HH:mm:ss'));
getLevelAndDayCount(newV) {
const params = {
workId: newV ? newV : this.id,
};
getLevelAndDayCount(params).then((res) => {
if (res.code === '000000') {
console.log(res, 'res');
this.currentIndex = res.data.level;
this.maxNumValue = res.data.preNum;
}
});
this.maxList[index]['preNum'] = item.preNum;
},
getCopyData(data) {
const copyList = [];
......@@ -311,23 +339,6 @@
data.noAcceptList = copyList;
this.isDoIt = true;
},
getWeekMax(data) {
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;
}
this.maxList[index - 1].preNum = item.preNum;
this.maxList[index - 1].weekDay = dayjs(item.workDay)
.add(7, 'day')
.format('YYYY-MM-DD HH:mm:ss');
});
}
},
handleInitSearch(isReset, type) {
if (isReset && type != 1) {
this.calendarOptions.events = this.calendarOptions.events.filter(
......@@ -361,32 +372,8 @@
}
if (type == 1 && res.data.noAcceptList.length) {
this.getCopyData(res.data);
this.getWeekMax(res.data);
}
this.handleInitData(res.data);
if (type != 1) {
const countList = res.data.countList;
if (countList.length > 0) {
console.log(this.maxList, 'countListcountListcountListcountList');
countList.forEach((item) => {
let keyC = dayjs(item.workDay).day();
if (keyC == 0) {
keyC = 7;
}
this.maxList[keyC - 1].preNum = item.preNum || 0;
});
} else {
for (let i = 0; i < 7; i++) {
const maxListObj = {};
maxListObj.preNum = 0;
maxListObj.weekDay = dayjs(this.getEveryDay)
.add(i, 'day')
.format('YYYY-MM-DD HH:mm:ss');
this.maxList.push(maxListObj);
}
console.log(this.maxList, 'this.maxListthis.maxListthis.maxList');
}
}
} else {
this.$toast(res.message);
}
......@@ -420,30 +407,31 @@
},
handleDatesSet(dataInfo) {
this.getEveryDay = dayjs(dataInfo.startStr).format('YYYY-MM-DD HH:mm:ss');
const currentTime = new Date().getTime();
const getTime = new Date(dataInfo.startStr).getTime();
const cz = currentTime - getTime;
const oneHour = 1 * 60 * 60 * 1000 * 24;
const timeDifference = (cz / oneHour) | 0;
const currentTime = new Date().getTime(); // 今天的时间戳
const getTime = new Date(dataInfo.startStr).getTime(); // 每周周一的时间戳
const cz = currentTime - getTime; // 每周周一时间戳 - 今天的时间
const oneHour = 1 * 60 * 60 * 1000 * 24; // 一天的时间戳
const timeDifference = (cz / oneHour) | 0; // 每周一时间距离今天时间数量
const headObj = this.calendarOptions.customButtons.myCustomButton;
console.log(timeDifference, 'timeDifference');
// debugger;
if (timeDifference >= 0 && timeDifference < 7) {
if (timeDifference > 0 && timeDifference <= 6) {
// 过去
this.week = 1;
headObj.text = '本周';
} else if (timeDifference >= -6 && timeDifference <= -1) {
} else if (timeDifference >= -6 && timeDifference <= 0) {
// 未来
this.week = 3;
headObj.text = '下周';
} else if (timeDifference >= -13 && timeDifference <= -7) {
// 未来
this.week = 4;
headObj.text = '二周';
headObj.text = '二周';
} else if (timeDifference >= -20 && timeDifference <= -14) {
// 未来
this.week = 5;
headObj.text = '三周';
} else if (timeDifference > 7) {
headObj.text = '三周';
} else if (timeDifference >= 7) {
// 现在
headObj.text = '上周';
this.week = 2;
......@@ -487,6 +475,35 @@
event.revert();
return;
},
// 每小时接诊上限人数
getMaxNumValue(value) {
console.log(value, 'getMaxNumValue');
this.maxNumValue = value;
},
// 提交优先级和人数
submitSetData() {
if (this.maxNumValue == '') {
return this.$message({
message: '请设置每小时接诊上限人数',
type: 'warning',
});
}
const params = {
doctorId: this.doctorId,
level: this.currentIndex,
workId: this.id,
preNum: this.maxNumValue,
};
saveLevelAndDayCount(params).then((res) => {
if (res.code === '000000') {
this.$message({
message: '设置成功',
type: 'success',
});
this.centerDialogVisible = false;
}
});
},
selectInfo(info) {
const startDay = new Date(info.start).getDay();
const endDay = new Date(info.end).getDay();
......@@ -563,7 +580,6 @@
const objParms = {};
objParms.week = weekV ? weekV : this.week;
objParms.workId = this.schedulingTypeValue.id;
objParms.level = this.currentIndex;
objParms.list = [];
const data = this.calendarOptions.events;
data.forEach((item) => {
......@@ -574,17 +590,6 @@
objParms.list.push(obj);
}
});
// 对上限人数处理
this.maxList.forEach((item, index) => {
console.log(item, 'item');
if (!item.weekDay) {
item.weekDay = dayjs(this.getEveryDay)
.add(index, 'day')
.format('YYYY-MM-DD HH:mm:ss');
}
});
console.log(this.maxList, '122222maxListmaxListmaxListmaxList');
objParms.countReqList = this.maxList;
saveDutyRoster(objParms).then((res) => {
if (res.code === '000000') {
this.loading = false;
......
......@@ -44,7 +44,7 @@
</el-button>
</div>
<div class="agmentSelect-select-right">
设置系统单日接诊总上限
设置系统每小时接诊上限
<el-input-number
v-model="maxDiaNum"
:step="1"
......@@ -129,7 +129,7 @@
],
// timeZone: 'UTC',
locale: 'zh-cn',
aspectRatio: 2.5, // 设置日历单元格宽度与高度的比例。
aspectRatio: 4.5, // 设置日历单元格宽度与高度的比例。
schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives',
initialView: 'resourceTimeGridDay',
resources: [],
......@@ -139,7 +139,7 @@
slotMinWidth: 50,
resourceAreaWidth: '5%',
allDaySlot: false, // 周,日视图时,all-day 不显示
slotDuration: '00:05:00',
slotDuration: '01:00:00',
slotMinTime: '09:00',
slotMaxTime: '21:00',
slotLabelInterval: '',
......@@ -274,44 +274,15 @@
};
});
// this.getWidth = this.$refs.agmentSelect.scrollWidth + 'px';
this.getWidth = 3000 + 'px';
// this.getWidth = 3000 + 'px';
this.calendarOptions.events = [].concat(
dutyRosterPreList,
dutyWorkList
);
// this.calendarOptions.resources.push(
// {id: 1000105468, title: '吴明豪1'},
// {id: 1000205468, title: '吴明豪2'},
// {id: 1000305468, title: '吴明豪3'},
// {id: 1000405468, title: '吴明豪4'},
// {id: 1000505468, title: '吴明豪5'},
// {id: 1000605468, title: '吴明豪5'},
// {id: 1000705468, title: '吴明豪5'},
// {id: 1000805468, title: '吴明豪5'},
// {id: 1000905468, title: '吴明豪5'},
// {id: 1001505468, title: '吴明豪5'},
// {id: 1002505468, title: '吴明豪5'},
// {id: 1003505468, title: '吴明豪5'},
// {id: 1004505468, title: '吴明豪5'},
// {id: 1005505468, title: '吴明豪5'},
// {id: 1006505468, title: '吴明豪5'},
// {id: 1007505468, title: '吴明豪5'},
// {id: 1008505468, title: '吴明豪5'},
// {id: 1009505468, title: '吴明豪5'},
// {id: 1017505468, title: '吴明豪5'},
// {id: 1027505468, title: '吴明豪5'},
// {id: 1037505468, title: '吴明豪5'},
// {id: 1047505468, title: '吴明豪5'},
// {id: 1057505468, title: '吴明豪5'},
// {id: 1067505468, title: '吴明豪5'},
// {id: 1077505468, title: '吴明豪5'},
// {id: 1087505468, title: '吴明豪5'},
// {id: 1097505468, title: '吴明豪5'},
// {id: 1018505468, title: '吴明豪5'},
// {id: 1009505468, title: '吴明豪5'},);
// this.calendarOptions.resources = [{id: 1000105468, title: '吴明豪1'}, {id: 1000205468, title: '吴明豪2'}, {id: 1008505468, title: '吴明豪5'}, {id: 1008505461, title: '吴明豪5'}];
const calendarApi = this.$refs.fullCalendar.getApi();
this.getWidth = `${this.calendarOptions.resources.length * 150}px`;
this.getWidth = `${
(this.calendarOptions.resources.length + 1) * 150
}px`;
this.getMaxWidth = `${
this.calendarOptions.resources.length * 150 + 100
}px`;
......@@ -332,7 +303,7 @@
width: 100%;
}
.agment-box {
height: 100%;
// height: 100%;
padding: 0 25px 25px 25px;
border-radius: 6px;
flex: 3.8;
......@@ -401,15 +372,6 @@
display: flex;
}
}
// /deep/.fc-col-header-cell{
// width: 100px !important;
// }
// /deep/.fc-day-mon{
// width: 100px !important;
// }
// /deep/.fc-timegrid-col-frame{
// width: 100px !important;
// }
}
.w2 {
......@@ -446,12 +408,6 @@
border-radius: 6px;
}
.ag-left-change {
// position: relative;
// border:1px solid #ccc;
// height:40px;
// width:100%;
// display:flex;
// z-index:1;
div {
width: 9%;
height: 55px;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册