提交 abfe4436 编写于 作者: xiaoping.di's avatar xiaoping.di

Merge branch 'feature/dxp' into 'develop'

Feature/dxp

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