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

裁分新的页面

......@@ -68,6 +68,12 @@ const serviceSchedule = (r) =>
() => r(require('@/views/IM/diagnosis-admin/serviceSchedule.vue')),
'serviceSchedule'
);
const addEditSchedule = (r) =>
require.ensure(
[],
() => r(require('@/views/IM/diagnosis-admin/addEditSchedule.vue')),
'addEditSchedule'
);
const administrators = (r) =>
require.ensure(
[],
......@@ -134,6 +140,10 @@ const routerConfig = [
path: '/serviceSchedule',
component: serviceSchedule,
},
{
path: '/addEditSchedule',
component: addEditSchedule,
},
{
path: '/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 @@
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,20 +129,37 @@
}
/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"
class="agment-box-left"
:style="{ height: scrollerHeight }"
>
......@@ -24,10 +24,12 @@
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 }}
</p>
</div>
</div>
<div class="agment-left-button">
<div
v-if="this.schedulingType != 3"
class="agment-left-button"
>
<el-button
type="primary"
round
......@@ -100,21 +108,16 @@
components: {
FullCalendar,
},
props: {
schedulingTypeValue: {
type: Object,
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引入后才可显示月,周,日
......@@ -196,11 +199,15 @@
},
},
created() {
this.schedulingType = this.$route.query.doctorId || 1;
const id = this.$route.query.id || '77';
getDoctorInfo({ id: id }).then((res) => {
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') {
console.log(res);
this.schedulingTypeValue = res.data;
this.currentIndex = res.data.level;
}else{
this.$toast(res.message);
}
});
getLevel().then((res) => {
......@@ -239,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);
......@@ -254,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) => {
......@@ -407,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) => {
......@@ -421,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);
}
......
......@@ -131,7 +131,7 @@
</div>
</div>
</div>
<div
<!-- <div
v-else
class="newScheduling"
>
......@@ -157,7 +157,13 @@
/>
</div>
</div>
</div>
</div> -->
<a
ref="target"
class="target"
href=""
target="_blank"
/>
</div>
</template>
......@@ -171,10 +177,10 @@
getLevel,
} from '@/api/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 {
components: {
NewScheduling,
// NewScheduling,
TableServiceSchedule,
},
data() {
......@@ -231,8 +237,8 @@
tableData: [],
loading: false,
newCreateList: [],
schedulingTypeValue: {},
schedulingType: '',
// schedulingTypeValue: {},
// schedulingType: '',
};
},
watch: {},
......@@ -378,16 +384,20 @@
this.search();
},
addSchedule(value, val) {
this.ScheduleListShow = false;
this.schedulingTypeValue = value;
this.schedulingType = val;
},
goBack(flag) {
this.ScheduleListShow = true;
if (flag) {
this.search();
}
// this.ScheduleListShow = false;
// this.schedulingType = val;
const target = this.$refs.target;
const { origin } = window.location;
const u = `${origin}/consultation/pica-admin-consultation/addEditSchedule?type=${val}&doctorId=${value.doctorId}&id=${value.id}`;
target.setAttribute('href', u);
target.click();
},
// goBack(flag) {
// this.ScheduleListShow = true;
// if (flag) {
// this.search();
// }
// },
},
};
</script>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册