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

Merge branch 'develop' of...

Merge branch 'develop' of 192.168.110.53:com.pica.cloud.education.frontend/pica-admin-consultation into feature/jq
......@@ -52,3 +52,9 @@ export const saveDutyRoster = async (data) => {
method: 'post',
});
};
export const getDoctorInfo = async (data) => {
return request({
url: `/diagnose/doctor/work/selectById/${data.id}`,
method: 'post',
});
};
......@@ -6,6 +6,20 @@
border-radius: 6px;
flex: 3.8;
}
.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;
}
}
.agment-box-left {
flex: 1;
height: 100%;
......@@ -24,7 +38,6 @@
div {
width: 9%;
height: 55px;
//border: 1px solid #ccc;
}
.ag-left1 {
position: absolute;
......@@ -77,11 +90,12 @@
.agment-head-priority {
padding-top: 20px;
display: flex;
justify-content: space-between;
justify-content:center;
align-items: center;
.item {
width: 42px;
height: 32px;
margin-right:10px;
border: 1px solid #d9d9d9;
border-radius: 8px;
text-align: center;
......@@ -115,21 +129,38 @@
}
/deep/.fc-header-toolbar {
position: absolute;
right: 0;
right:1%;
top: 25px;
width: 20%;
display: flex;
}
/deep/.fc-toolbar-title {
font-size: 6px;
}
/deep/.fc-toolbar-chunk{
display:flex;
}
/deep/.fc-button-primary {
background: #fff;
color: #02120f;
border-color: #d9d9d9;
border-radius: 20px;
padding: 6px 16px;
flex-shrink: 0;
}
@media screen and (min-width: 1000px) and (max-width: 1300px){
/deep/.fc-header-toolbar {
right: 6%;
}
.ag-left1 {
width:12% !important;
right: 18% !important;
border:1px solid red !important;
}
.ag-left2 {
width:12% !important;
right: 1% !important;
}
}
/deep/.fc-myCustomButton-button {
padding: 6px 24px;
}
......@@ -144,3 +175,4 @@
word-wrap: break-word;
white-space: normal;
}
......@@ -11,11 +11,11 @@
<div
ref="agment"
class="agment-box"
:class="{'w2':week==2,'w3':week==3}"
>
<FullCalendar :options="calendarOptions" />
</div>
<div
v-if="this.schedulingType != 3"
<div
class="agment-box-left"
:style="{ height: scrollerHeight }"
>
......@@ -23,11 +23,13 @@
<div
v-if="week == 2"
class="ag-left1"
/>
/>
<!-- v-if="week == 2" -->
<div
v-if="week == 3"
class="ag-left2"
/>
<!-- -->
</div>
<div class="agment-left-con">
<div class="agment-head">
......@@ -45,7 +47,10 @@
{{ this.schedulingTypeValue.departmentName }}
</div>
</div>
<div style="margin-top: 24px">
<div
v-if="this.schedulingType != 3"
style="margin-top: 24px"
>
<p class="agment-head-title">
选择匹配优先级
</p>
......@@ -54,14 +59,17 @@
v-for="(item, index) in createList"
:key="index"
class="item"
:class="{ active: index == currentIndex }"
@click="handlePriority(index)"
:class="{ active: item == currentIndex }"
@click="handlePriority(item)"
>
{{ item.value }}
{{ item }}
</p>
</div>
</div>
<div class="agment-left-button">
<div
v-if="this.schedulingType != 3"
class="agment-left-button"
>
<el-button
type="primary"
round
......@@ -89,35 +97,27 @@
import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
import interactionPlugin from '@fullcalendar/interaction';
import { dutyRosterQuery, saveDutyRoster } from '@/api/serviceSchedule';
import {
dutyRosterQuery,
saveDutyRoster,
getLevel,
getDoctorInfo,
} from '@/api/serviceSchedule';
export default {
name: 'Index',
components: {
FullCalendar,
},
props: {
schedulingTypeValue: {
type: Object,
default: () => {
return {};
},
},
schedulingType: {
type: String,
default: '', // 1 新增 2 编辑 3 查看
},
createList: {
type: Array,
default: () => {
return [];
},
},
},
data() {
return {
id:'',
doctorId:'',
schedulingTypeValue:{},
schedulingType: 1, // 1 新增 2 编辑 3 查看
createList: [],
listDate: [],
week: 1, // 1:当前周 2:上一周 3:下一周
currentIndex: 2,
currentIndex: 3,
haveWeek: [1],
calendarOptions: {
// 引入的插件,比如fullcalendar/daygrid,fullcalendar/timegrid引入后才可显示月,周,日
......@@ -198,12 +198,27 @@
}
},
},
created() {
this.schedulingType = this.$route.query.type || 1;
this.id = this.$route.query.id;
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{
this.$toast(res.message);
}
});
getLevel().then((res) => {
if (res.code == '000000') {
this.createList = res.data;
}
});
},
mounted() {
console.log(this.$route.query.doctorId, 'doctorId');
console.log(this.$route.query.type, 'type');
console.log(this.$route.query.id, 'id');
this.scrollerHeight = this.$refs.agment.clientHeight + 'px';
this.schedulingType = this.$route.query.type;
// console.log(this.$refs.agment.clientHeight, 'this.$refs.agment.offsetHeight;');
this.init();
},
methods: {
......@@ -231,10 +246,10 @@
this.calendarOptions.events = [];
}
const objParms = {};
objParms.doctorId = this.schedulingTypeValue.doctorId;
objParms.doctorId = this.doctorId;
objParms.week = this.week;
objParms.workId = this.schedulingTypeValue.id;
this.currentIndex = this.schedulingTypeValue.level - 1;
objParms.workId = this.id;
// this.currentIndex = this.schedulingTypeValue.level;
dutyRosterQuery(objParms).then((res) => {
if (res.code == '000000') {
this.handleInitData(res.data);
......@@ -246,7 +261,7 @@
handleInitData(data) {
var newDate = null;
if (this.schedulingType != 3) {
newDate = [].concat(data.acceptList, data.noAcceptList);
newDate = [].concat(data.noAcceptList);
} else {
var acceptList = [];
data.acceptList.forEach((item) => {
......@@ -399,7 +414,7 @@
const objParms = {};
objParms.week = this.week;
objParms.workId = this.schedulingTypeValue.id;
objParms.level = this.currentIndex + 1;
objParms.level = this.currentIndex;
objParms.list = [];
const data = this.calendarOptions.events;
data.forEach((item) => {
......@@ -413,7 +428,8 @@
saveDutyRoster(objParms).then((res) => {
if (res.code === '000000') {
// this.$toast(res.message);
this.$emit('goBack', true);
// this.handleInitSearch(true);
this.$router.go(0);
} else {
this.$toast(res.message);
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册