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

裁分新的页面

...@@ -68,6 +68,12 @@ const serviceSchedule = (r) => ...@@ -68,6 +68,12 @@ const serviceSchedule = (r) =>
() => r(require('@/views/IM/diagnosis-admin/serviceSchedule.vue')), () => r(require('@/views/IM/diagnosis-admin/serviceSchedule.vue')),
'serviceSchedule' 'serviceSchedule'
); );
const addEditSchedule = (r) =>
require.ensure(
[],
() => r(require('@/views/IM/diagnosis-admin/addEditSchedule.vue')),
'addEditSchedule'
);
const administrators = (r) => const administrators = (r) =>
require.ensure( require.ensure(
[], [],
...@@ -134,6 +140,10 @@ const routerConfig = [ ...@@ -134,6 +140,10 @@ const routerConfig = [
path: '/serviceSchedule', path: '/serviceSchedule',
component: serviceSchedule, component: serviceSchedule,
}, },
{
path: '/addEditSchedule',
component: addEditSchedule,
},
{ {
path: '/administrators', path: '/administrators',
component: administrators, component: administrators,
......
<template>
<div class="newScheduling">
<div class="header">
<el-breadcrumb separator="/">
<el-breadcrumb-item>首页</el-breadcrumb-item>
<el-breadcrumb-item class="breadcrumb-serviceSchedule">
服务排班表
</el-breadcrumb-item>
<el-breadcrumb-item>新增排班</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="serviceSchedule-container">
<div class="serviceSchedule-containerInfo">
<NewScheduling />
</div>
</div>
</div>
</template>
<script>
import NewScheduling from '../diagnosis-admin/modal/newScheduling.vue';
export default {
components: {
NewScheduling,
},
data() {
return {
name: 111,
};
},
};
</script>
<style lang="scss" scoped>
.newScheduling {
height: calc(100% - 76px);
.header {
padding: 30px;
width: 100%;
.el-breadcrumb {
.breadcrumb-serviceSchedule {
/deep/ .breadcrumb-back {
font-weight: 400 !important;
color: #606266;
cursor: text;
cursor: pointer;
}
}
}
}
.serviceSchedule-container {
// height: 100%;
width: 100%;
padding: 0 14px;
.serviceSchedule-containerInfo {
border-radius: 8px;
height: 100%;
display: flex;
align-items: center;
//padding: 21px 18px 20px 18px;
}
}
}
</style>
\ No newline at end of file
...@@ -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,21 +129,38 @@ ...@@ -115,21 +129,38 @@
} }
/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 }"
> >
...@@ -23,11 +23,13 @@ ...@@ -23,11 +23,13 @@
<div <div
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 }} {{ 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
...@@ -100,21 +108,16 @@ ...@@ -100,21 +108,16 @@
components: { components: {
FullCalendar, FullCalendar,
}, },
props: {
schedulingTypeValue: {
type: Object,
default: () => {
return {};
},
},
},
data() { data() {
return { return {
id:'',
doctorId:'',
schedulingTypeValue:{},
schedulingType: 1, // 1 新增 2 编辑 3 查看 schedulingType: 1, // 1 新增 2 编辑 3 查看
createList: [], 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引入后才可显示月,周,日
...@@ -196,11 +199,15 @@ ...@@ -196,11 +199,15 @@
}, },
}, },
created() { created() {
this.schedulingType = this.$route.query.doctorId || 1; this.schedulingType = this.$route.query.type || 1;
const id = this.$route.query.id || '77'; this.id = this.$route.query.id;
getDoctorInfo({ id: id }).then((res) => { this.doctorId = this.$route.query.doctorId,
getDoctorInfo({ id: this.id }).then((res) => {
if (res.code == '000000') { if (res.code == '000000') {
console.log(res); this.schedulingTypeValue = res.data;
this.currentIndex = res.data.level;
}else{
this.$toast(res.message);
} }
}); });
getLevel().then((res) => { getLevel().then((res) => {
...@@ -239,10 +246,10 @@ ...@@ -239,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);
...@@ -254,7 +261,7 @@ ...@@ -254,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) => {
...@@ -407,7 +414,7 @@ ...@@ -407,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) => {
...@@ -421,7 +428,8 @@ ...@@ -421,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);
} }
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
</div> </div>
</div> </div>
</div> </div>
<div <!-- <div
v-else v-else
class="newScheduling" class="newScheduling"
> >
...@@ -157,7 +157,13 @@ ...@@ -157,7 +157,13 @@
/> />
</div> </div>
</div> </div>
</div> </div> -->
<a
ref="target"
class="target"
href=""
target="_blank"
/>
</div> </div>
</template> </template>
...@@ -171,10 +177,10 @@ ...@@ -171,10 +177,10 @@
getLevel, getLevel,
} from '@/api/serviceSchedule'; } from '@/api/serviceSchedule';
import TableServiceSchedule from '@/components/list/table-serviceSchedule'; import TableServiceSchedule from '@/components/list/table-serviceSchedule';
import NewScheduling from '../diagnosis-admin/modal/newScheduling.vue'; // import NewScheduling from '../diagnosis-admin/modal/newScheduling.vue';
export default { export default {
components: { components: {
NewScheduling, // NewScheduling,
TableServiceSchedule, TableServiceSchedule,
}, },
data() { data() {
...@@ -231,8 +237,8 @@ ...@@ -231,8 +237,8 @@
tableData: [], tableData: [],
loading: false, loading: false,
newCreateList: [], newCreateList: [],
schedulingTypeValue: {}, // schedulingTypeValue: {},
schedulingType: '', // schedulingType: '',
}; };
}, },
watch: {}, watch: {},
...@@ -378,16 +384,20 @@ ...@@ -378,16 +384,20 @@
this.search(); this.search();
}, },
addSchedule(value, val) { addSchedule(value, val) {
this.ScheduleListShow = false; // this.ScheduleListShow = false;
this.schedulingTypeValue = value; // this.schedulingType = val;
this.schedulingType = val; const target = this.$refs.target;
}, const { origin } = window.location;
goBack(flag) { const u = `${origin}/consultation/pica-admin-consultation/addEditSchedule?type=${val}&doctorId=${value.doctorId}&id=${value.id}`;
this.ScheduleListShow = true; target.setAttribute('href', u);
if (flag) { target.click();
this.search();
}
}, },
// goBack(flag) {
// this.ScheduleListShow = true;
// if (flag) {
// this.search();
// }
// },
}, },
}; };
</script> </script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册