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

修改业务代码

Merge branch 'develop' of 192.168.110.53:com.pica.cloud.education.frontend/pica-admin-consultation into feature/jq
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
......@@ -9,7 +9,10 @@
>
<template slot="empty">
<div class="nothing-data">
<img src="../../assets/image/nothingData.png" alt="" >
<img
src="../../assets/image/nothingData.png"
alt=""
>
<span class="nothing-data-title">暂未找到符合条件的医生</span>
</div>
</template>
......@@ -261,20 +264,20 @@
<style lang="scss" scoped>
.table-serviceSchedule {
.el-table {
.nothing-data{
.nothing-data {
display: inline-grid;
padding-top: 100px;
img{
img {
width: 338px;
height: 159px;
}
.nothing-data-title{
.nothing-data-title {
padding-top: 40px;
padding-bottom: 150px;
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #89888B;
color: #89888b;
line-height: 22px;
}
}
......
......@@ -6,20 +6,24 @@
border-radius: 6px;
flex: 3.8;
}
.w2{
/deep/.fc-prev-button{
background:#f4f4f5;
.w2 {
/deep/.fc-prev-button {
background: #f4f4f5;
cursor: not-allowed;
border:1px solid #d9d9d9;
border: 1px solid #d9d9d9;
}
}
.w3{
/deep/.fc-next-button{
background:#f4f4f5;
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;
}
.agment-box-left {
flex: 1;
height: 100%;
......@@ -87,15 +91,19 @@
color: #02120f;
margin-top: 19px;
}
.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;
......@@ -111,7 +119,14 @@
.agment-left-button {
margin-top: 34px;
display: flex;
justify-content: space-around;
justify-content: center;
}
.reset-submit {
background: #fff;
border: 1px solid #0d9078;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #0d9078;
}
/deep/.fc-timegrid-event {
border-radius: 1px !important;
......@@ -129,15 +144,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;
......@@ -147,17 +162,17 @@
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;
width: 12% !important;
right: 1% !important;
}
}
......@@ -175,4 +190,3 @@
word-wrap: break-word;
white-space: normal;
}
<template>
<div
v-loading="loading"
style="
width: 100%;
height: auto;
......@@ -11,7 +12,7 @@
<div
ref="agment"
class="agment-box"
:class="{'w2':week==2,'w3':week==3}"
:class="{ w2: week == 2, w3: week == 3 }"
>
<FullCalendar :options="calendarOptions" />
</div>
......@@ -47,13 +48,11 @@
{{ this.schedulingTypeValue.departmentName }}
</div>
</div>
<div
v-if="this.schedulingType != 3"
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="agment-head-priority">
<p
v-for="(item, index) in createList"
......@@ -66,13 +65,14 @@
</p>
</div>
</div>
</div>
<div
v-if="this.schedulingType != 3"
class="agment-left-button"
>
<el-button
type="primary"
round
class="reset-submit"
style="width: 110px"
@click="resetDoctoreScheduling"
>
......@@ -82,7 +82,7 @@
type="primary"
round
style="width: 110px"
@click="saveDoctoreScheduling"
@click="saveDoctoreScheduling(1)"
>
保存
</el-button>
......@@ -110,9 +110,9 @@
},
data() {
return {
id:'',
doctorId:'',
schedulingTypeValue:{},
id: '',
doctorId: '',
schedulingTypeValue: {},
schedulingType: 1, // 1 新增 2 编辑 3 查看
createList: [],
listDate: [],
......@@ -136,7 +136,7 @@
defaultDate: new Date(),
datesSet: this.handleDatesSet,
events: [],
slotEventOverlap: false,
slotEventOverlap: true,
header: {
center: 'month,agendaFourDay', // buttons for switching between views
},
......@@ -188,25 +188,32 @@
},
workingTicketVisible: false, // 工作表票详情页面
scrollerHeight: 0,
loading: false,
isDoIt: false,
};
},
watch: {
week(newV) {
week(newV, oldV) {
console.log(newV, oldV, 'newV, oldV');
if (this.haveWeek.indexOf(newV) == -1) {
this.haveWeek.push(newV);
this.handleInitSearch();
}
if (newV !== oldV) {
this.handleInitSearch();
this.saveDoctoreScheduling(2, oldV);
}
},
},
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);
}
});
......@@ -217,6 +224,7 @@
});
},
mounted() {
console.log(this.calendarOptions.events, 'this.calendarOptions.events');
this.scrollerHeight = this.$refs.agment.clientHeight + 'px';
// console.log(this.$refs.agment.clientHeight, 'this.$refs.agment.offsetHeight;');
this.init();
......@@ -243,7 +251,10 @@
},
handleInitSearch(isReset) {
if (isReset) {
this.calendarOptions.events = [];
this.calendarOptions.events = this.calendarOptions.events.filter(
(v) => v.week !== this.week
);
console.log(this.calendarOptions.events);
}
const objParms = {};
objParms.doctorId = this.doctorId;
......@@ -252,6 +263,7 @@
// this.currentIndex = this.schedulingTypeValue.level;
dutyRosterQuery(objParms).then((res) => {
if (res.code == '000000') {
this.calendarOptions.events = [];
this.handleInitData(res.data);
} else {
this.$toast(res.message);
......@@ -262,12 +274,14 @@
var newDate = null;
if (this.schedulingType != 3) {
newDate = [].concat(data.noAcceptList);
console.log(newDate, 'newDate');
} else {
var acceptList = [];
data.acceptList.forEach((item) => {
item.type = 88;
acceptList.push(item);
});
console.log(data.acceptList, 'data.acceptList');
newDate = [].concat(acceptList, data.noAcceptList);
}
// const keyAll = ['end', 'endStr', 'id', 'start', 'startStr'];
......@@ -334,7 +348,9 @@
.then((_) => {
console.log(_);
const index = this.getIdDeleteData(event.event.id);
return this.calendarOptions.events.splice(index, 1);
this.isDoIt = true;
this.calendarOptions.events.splice(index, 1);
console.log(this.calendarOptions.events);
})
.catch((_) => {
console.log(_);
......@@ -365,6 +381,7 @@
this.calendarOptions.events.push(dataObj);
},
selectAllow(info) {
this.isDoIt = true;
const startDay = new Date(info.start).getDay();
const endDay = new Date(info.end).getDay();
if (startDay != endDay) {
......@@ -405,23 +422,31 @@
return indexObj;
},
handlePriority(index) {
this.isDoIt = true;
this.currentIndex = index;
},
resetDoctoreScheduling() {
this.handleInitSearch(true);
},
saveDoctoreScheduling() {
saveDoctoreScheduling(type, weekV = 0) {
if (this.isDoIt) {
console.log(this.week, 'this.week', weekV);
this.loading = true;
const objParms = {};
objParms.week = this.week;
objParms.week = weekV ? weekV : this.week;
objParms.workId = this.schedulingTypeValue.id;
objParms.level = this.currentIndex;
objParms.list = [];
const data = this.calendarOptions.events;
console.log(data, 'data');
data.forEach((item) => {
if (item.week == this.week) {
console.log(item.week == (weekV ? weekV : this.week));
if (item.week == (weekV ? weekV : this.week)) {
console.log(item.week, this.week, weekV, 'this.week');
const obj = {};
obj.startTime = this.dateFormat('YYYY-mm-dd HH:MM:SS', item.start);
obj.endTime = this.dateFormat('YYYY-mm-dd HH:MM:SS', item.end);
console.log(obj, 'obj');
objParms.list.push(obj);
}
});
......@@ -429,11 +454,21 @@
if (res.code === '000000') {
// this.$toast(res.message);
// this.handleInitSearch(true);
this.$router.go(0);
// this.$router.go(0);
this.loading = false;
if (type == 1) {
this.$message({
message: '排班保存成功',
type: 'success',
});
}
this.isDoIt = false;
} else {
this.$toast(res.message);
// this.$toast(res.message);
this.$message.error(res.message || '排班保存失败');
}
});
}
},
dateFormat(fmt, date2) {
const date = new Date(date2);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册