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

修改页面逻辑

......@@ -265,3 +265,18 @@ export const opAck = async (data) => {
method: 'post',
});
};
export const acceptsCeiling = async (data) => {
return request({
url: '/diagnose/admin/diagnose/accepts/ceiling',
params: data,
method: 'get',
});
};
export const getLeisureTime = async (data) => {
return request({
url: '/diagnose/doctor/work/getLeisureTime',
data: data,
method: 'post',
});
};
......@@ -65,3 +65,16 @@ export const previewWork = async (data) => {
data: data,
});
};
export const setPlatformUpper = async (data) => {
return request({
url: `/diagnose/doctor/work/setPlatformUpper/${data.num}`,
data: data,
method: 'post',
});
};
export const getPlatformUpper = async () => {
return request({
url: '/diagnose/doctor/work/getPlatformUpper',
method: 'post',
});
};
......@@ -91,6 +91,13 @@
align="center"
sortable
/>
<el-table-column
prop="createdId"
label="修改人ID"
width="170"
align="center"
sortable
/>
<el-table-column
prop="mobilePhone"
label="联系电话"
......
......@@ -441,6 +441,7 @@
:diagnose-type="diagnoseType"
:doctor-id="doctorId"
:range-time-data="rangeTimeData"
:doctor-info="doctorInfo"
@search="search"
@changeStartTime="changeStartTime"
/>
......@@ -621,6 +622,7 @@
},
timer: null,
fromType: 0, // 1或不传为为预约单列表 2为运营预约单列表 3为分诊台 4为接诊台
doctorInfo: {},
};
},
watch: {
......@@ -1106,11 +1108,13 @@
},
// 设为待确认时间
waitMatchTime(row) {
// debugger;
console.log(row, 'row');
this.doctorInfo = row;
this.rangeTimeData = row.assistantBeginTime;
this.diagnoseFlag = true;
this.diagnosisDoctorVisible = true;
// this.acceptsCeilings(row.doctorId);
this.diagnoseLogId = row.diagnoseLogId;
this.diagnoseType = row.diagnoseType;
if (row.doctorId == 0) {
......
......@@ -62,6 +62,10 @@
overflow: hidden;
border-radius: 8px;
}
.agment-left-copy {
margin-top: 34px;
text-align: center;
}
.agment-head {
border-radius: 5px;
display: flex;
......
......@@ -15,6 +15,20 @@
:class="{ w2: week == 2, w3: week == 3 }"
>
<FullCalendar :options="calendarOptions" />
<span>上限</span>
<div class="setMaxNum">
<div
v-for="(item, index) in maxList"
:key="index"
>
<el-input-number
v-model="item.preNum"
:min="0"
class="input-value"
@change="handleChange(item, index)"
/>
</div>
</div>
</div>
<div
class="agment-box-left"
......@@ -27,7 +41,7 @@
/>
<!-- v-if="week == 2" -->
<div
v-if="week == 3"
v-if="week == 5"
class="ag-left2"
/>
<!-- -->
......@@ -66,6 +80,19 @@
</div>
</div>
</div>
<div
v-if="this.schedulingType != 3"
class="agment-left-copy"
>
<el-button
round
class="copy-submit"
style="width: 210px"
@click="copyDoctoreScheduling"
>
重复制上周排班
</el-button>
</div>
<div
v-if="this.schedulingType != 3"
class="agment-left-button"
......@@ -93,6 +120,7 @@
<script>
// import '@fullcalendar/core/vdom'
// import moment from 'moment';
import dayjs from 'dayjs';
import FullCalendar from '@fullcalendar/vue';
import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
......@@ -110,6 +138,16 @@
},
data() {
return {
maxList: [
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
{ preNum: 0 },
],
chooseList: true,
id: '',
doctorId: '',
schedulingTypeValue: {},
......@@ -164,7 +202,7 @@
},
expandRows: true,
slotMinWidth: 50,
slotDuration: '00:30:00',
slotDuration: '01:00:00',
slotMinTime: '09:00',
slotMaxTime: '21:00',
slotLabelInterval: '',
......@@ -190,6 +228,8 @@
scrollerHeight: 0,
loading: false,
isDoIt: false,
getEveryDay: '',
copyArr: [],
};
},
watch: {
......@@ -249,22 +289,99 @@
}
this.handleInitSearch();
},
handleInitSearch(isReset) {
handleChange(item, index) {
console.log(this.getEveryDay, 'this.getEveryDay');
this.maxList.map((itemChild, indexChild) => {
console.log(indexChild, 'indexChild');
return (itemChild.weekDay = dayjs(
dayjs(this.getEveryDay).add(indexChild, 'day')
).format('YYYY-MM-DD HH:mm:ss'));
});
this.maxList[index]['preNum'] = item.preNum;
console.log(this.maxList, 'this.maxList');
},
getCopyData(data) {
this.calendarOptions.events = [];
const copyList = [];
const addDay = 7;
data.noAcceptList.map((item) => {
const obj = {};
obj['startTime'] = dayjs(item.startTime)
.add(addDay, 'day')
.format('YYYY-MM-DD HH:mm:ss');
obj['endTime'] = dayjs(item.endTime)
.add(addDay, 'day')
.format('YYYY-MM-DD HH:mm:ss');
copyList.push(obj);
});
data.noAcceptList = copyList;
this.isDoIt = true;
},
getWeekMax(data) {
console.log(this.maxList, 'this.maxList');
if (data.countList.length > 0) {
data.countList.forEach((item) => {
const clistDay = dayjs(item.workDay).day();
let index = 1;
if (clistDay) {
index = clistDay;
} else {
index = 7;
}
// console.log(this.maxList, this.maxList[index - 1].preNum, 'index');
this.maxList[index - 1].preNum = item.preNum;
// debugger;
this.maxList[index - 1].weekDay = dayjs(item.workDay)
.add(7, 'day')
.format('YYYY-MM-DD HH:mm:ss');
console.log(this.maxList, 'clistDay');
});
}
},
handleInitSearch(isReset, type) {
if (isReset) {
this.calendarOptions.events = this.calendarOptions.events.filter(
(v) => v.week !== this.week
);
console.log(this.calendarOptions.events);
}
let copyWeek = '';
if (type == 1) {
if (this.week == 1) {
copyWeek = 2;
} else if (this.week == 3) {
copyWeek = 1;
} else if (this.week == 4) {
copyWeek = 3;
} else if (this.week == 5) {
copyWeek = 4;
}
}
console.log(this.week, 'this.week');
const objParms = {};
objParms.doctorId = this.doctorId;
objParms.week = this.week;
objParms.week = type == 1 ? copyWeek : this.week;
objParms.workId = this.id;
// this.currentIndex = this.schedulingTypeValue.level;
console.log(objParms.week, 'objParms.week');
dutyRosterQuery(objParms).then((res) => {
if (res.code == '000000') {
this.calendarOptions.events = [];
if (type == 1) {
this.getCopyData(res.data);
this.getWeekMax(res.data);
}
this.handleInitData(res.data);
if (res.data.countList.length > 0 && type != 1) {
const newAR = res.data.countList.map((item, index) => {
if (item.weekDay == this.maxList[index].weekDay) {
return {
preNum: item.preNum,
};
}
});
this.maxList = newAR;
console.log(newAR, 'newAR');
}
} else {
this.$toast(res.message);
}
......@@ -284,7 +401,6 @@
console.log(data.acceptList, 'data.acceptList');
newDate = [].concat(acceptList, data.noAcceptList);
}
// const keyAll = ['end', 'endStr', 'id', 'start', 'startStr'];
newDate.forEach((item) => {
const dataObj = {};
const id = (this.calendarOptions.events.length + 1) * 10;
......@@ -301,21 +417,36 @@
});
},
handleDatesSet(dataInfo) {
this.getEveryDay = dayjs(dataInfo.startStr).format('YYYY-MM-DD HH:mm:ss');
console.log(
this.getEveryDay,
'dataInfo.startStrdataInfo.startStrdataInfo.startStr'
);
const currentTime = new Date().getTime();
const getTime = new Date(dataInfo.startStr).getTime();
const cz = currentTime - getTime;
const oneHour = 1 * 60 * 60 * 1000 * 24;
const timeDifference = (cz / oneHour) | 0;
const headObj = this.calendarOptions.customButtons.myCustomButton;
console.log(timeDifference, 'timeDifference');
// debugger;
if (timeDifference >= 0 && timeDifference < 7) {
// 过去
this.week = 1;
headObj.text = '本周';
} else if (timeDifference < 0) {
} else if (timeDifference >= -6 && timeDifference <= -1) {
// 未来
this.week = 3;
headObj.text = '下周';
} else {
} else if (timeDifference >= -13 && timeDifference <= -7) {
// 未来
this.week = 4;
headObj.text = '下二周';
} else if (timeDifference >= -20 && timeDifference <= -14) {
// 未来
this.week = 5;
headObj.text = '下三周';
} else if (timeDifference > 7) {
// 现在
headObj.text = '上周';
this.week = 2;
......@@ -355,7 +486,6 @@
.catch((_) => {
console.log(_);
});
// alert("你要取消日期吗");
},
eventDrop(event) {
event.revert();
......@@ -428,6 +558,10 @@
resetDoctoreScheduling() {
this.handleInitSearch(true);
},
copyDoctoreScheduling() {
this.handleInitSearch(true, 1);
console.log(this.copyArr, 'copyArr');
},
saveDoctoreScheduling(type, weekV = 0) {
if (this.isDoIt) {
console.log(this.week, 'this.week', weekV);
......@@ -450,11 +584,9 @@
objParms.list.push(obj);
}
});
objParms.countReqList = this.maxList;
saveDutyRoster(objParms).then((res) => {
if (res.code === '000000') {
// this.$toast(res.message);
// this.handleInitSearch(true);
// this.$router.go(0);
this.loading = false;
if (type == 1) {
this.$message({
......@@ -464,7 +596,6 @@
}
this.isDoIt = false;
} else {
// this.$toast(res.message);
this.$message.error(res.message || '排班保存失败');
}
});
......
......@@ -14,33 +14,53 @@
ref="agmentSelect"
class="serviceSchedule_select"
>
<el-cascader
v-model="innerform"
class="serviceSchedule-cascader"
filterable
clearable
:options="interfaceOptions"
:props="props"
placeholder="选择科室"
:show-all-levels="false"
@expand-change="handleItemChange"
@change="selectApi($event, innerform)"
/>
<el-date-picker
v-model="dateTime"
class="serviceSchedule_dateTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期时间"
@change="getNowDate"
/>
<el-button
type="primary"
class="submit-btn"
@click="search"
>
查询
</el-button>
<div class="agmentSelect-select-left">
<el-cascader
v-model="innerform"
class="serviceSchedule-cascader"
filterable
clearable
:options="interfaceOptions"
:props="props"
placeholder="选择科室"
:show-all-levels="false"
@expand-change="handleItemChange"
@change="selectApi($event, innerform)"
/>
<el-date-picker
v-model="dateTime"
class="serviceSchedule_dateTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期时间"
@change="getNowDate"
/>
<el-button
type="primary"
class="submit-btn"
@click="search"
>
查询
</el-button>
</div>
<div class="agmentSelect-select-right">
设置系统单日接诊总上限
<el-input-number
v-model="maxDiaNum"
:step="1"
:min="10"
:max="1000000"
step-strictly
@change="getInputNumber"
/>
<el-button
type="primary"
class="submit-btn"
@click="setPlatformUpper"
>
保存
</el-button>
</div>
</div>
<div
class="fullCalendar-show"
......@@ -48,7 +68,7 @@
>
<div
class="fullCalendar-show-out"
:style="{ width: getWidth }"
:style="{ minWidth: getWidth, maxWidth: getMaxWidth }"
>
<FullCalendar
ref="fullCalendar"
......@@ -70,6 +90,8 @@
getFirstLevelLable,
childLabelList,
previewWork,
setPlatformUpper,
getPlatformUpper,
} from '@/api/serviceSchedule';
export default {
name: 'Index',
......@@ -78,6 +100,7 @@
},
data() {
return {
maxDiaNum: 100,
dateTime: '',
interfaceOptions: [],
innerform: [],
......@@ -135,14 +158,37 @@
doctorList: [],
index: 0,
getWidth: '100%',
getMaxWidth: '100%',
};
},
watch: {},
created() {
this.getFirstLevelLable();
this.getPlatformUpper();
},
mounted() {},
methods: {
getPlatformUpper() {
getPlatformUpper().then((res) => {
if (res.code === '000000') {
console.log(res);
this.maxDiaNum = res.data;
}
});
},
setPlatformUpper() {
const params = {
num: this.maxDiaNum,
};
setPlatformUpper(params).then((res) => {
if (res.code === '000000') {
this.getPlatformUpper();
}
});
},
getInputNumber(value) {
console.log(value, 'getInputNumbergetInputNumber');
},
// 通过监听expand-change事件(当展开节点发生变化时触发)获取第二层数据,组装interfaceOptions数据
handleItemChange(val) {
const value = val[0];
......@@ -233,7 +279,42 @@
dutyRosterPreList,
dutyWorkList
);
// this.calendarOptions.resources.push(
// {id: 1000105468, title: '吴明豪1'},
// {id: 1000205468, title: '吴明豪2'},
// {id: 1000305468, title: '吴明豪3'},
// {id: 1000405468, title: '吴明豪4'},
// {id: 1000505468, title: '吴明豪5'},
// {id: 1000605468, title: '吴明豪5'},
// {id: 1000705468, title: '吴明豪5'},
// {id: 1000805468, title: '吴明豪5'},
// {id: 1000905468, title: '吴明豪5'},
// {id: 1001505468, title: '吴明豪5'},
// {id: 1002505468, title: '吴明豪5'},
// {id: 1003505468, title: '吴明豪5'},
// {id: 1004505468, title: '吴明豪5'},
// {id: 1005505468, title: '吴明豪5'},
// {id: 1006505468, title: '吴明豪5'},
// {id: 1007505468, title: '吴明豪5'},
// {id: 1008505468, title: '吴明豪5'},
// {id: 1009505468, title: '吴明豪5'},
// {id: 1017505468, title: '吴明豪5'},
// {id: 1027505468, title: '吴明豪5'},
// {id: 1037505468, title: '吴明豪5'},
// {id: 1047505468, title: '吴明豪5'},
// {id: 1057505468, title: '吴明豪5'},
// {id: 1067505468, title: '吴明豪5'},
// {id: 1077505468, title: '吴明豪5'},
// {id: 1087505468, title: '吴明豪5'},
// {id: 1097505468, title: '吴明豪5'},
// {id: 1018505468, title: '吴明豪5'},
// {id: 1009505468, title: '吴明豪5'},);
// this.calendarOptions.resources = [{id: 1000105468, title: '吴明豪1'}, {id: 1000205468, title: '吴明豪2'}, {id: 1008505468, title: '吴明豪5'}, {id: 1008505461, title: '吴明豪5'}];
const calendarApi = this.$refs.fullCalendar.getApi();
this.getWidth = `${this.calendarOptions.resources.length * 150}px`;
this.getMaxWidth = `${
this.calendarOptions.resources.length * 150 + 100
}px`;
calendarApi.gotoDate(this.dateTime);
console.log(this.calendarOptions.resources);
......@@ -262,21 +343,42 @@
background: #fff;
display: flex;
align-items: center;
padding: 20px 0 0px 20px;
.serviceSchedule-cascader {
// height: 100%;
background: #fff;
margin-right: 15px;
}
.serviceSchedule_dateTime {
margin-right: 15px;
padding: 20px 0 10px 20px;
justify-content: space-between;
.agmentSelect-select-left {
display: flex;
align-items: center;
justify-content: flex-start;
.serviceSchedule-cascader {
background: #fff;
margin-right: 15px;
}
.serviceSchedule_dateTime {
margin-right: 15px;
}
.submit-btn {
height: 32px;
background: #0d9078;
border-radius: 16px;
display: flex;
align-items: center;
}
}
.submit-btn {
height: 32px;
background: #0d9078;
border-radius: 16px;
.agmentSelect-select-right {
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 30px;
.el-input-number {
margin: 0 10px;
}
.submit-btn {
height: 32px;
background: #0d9078;
border-radius: 16px;
display: flex;
align-items: center;
}
}
}
.fullCalendar-show {
......@@ -332,6 +434,9 @@
// position: absolute !important;
left: 0 !important;
}
/deep/.fc-resource {
width: 150px;
}
.agment-box-left {
flex: 1;
height: 100%;
......
......@@ -4663,7 +4663,7 @@ dateformat@^2.0.0:
resolved "http://192.168.110.93:4873/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062"
integrity sha1-QGXiATz5+5Ft39gu+1Bq1MZ2kGI=
dayjs@^1.8.30, dayjs@^1.8.31:
dayjs@^1.10.7, dayjs@^1.8.31:
version "1.10.7"
resolved "http://192.168.110.93:4873/dayjs/-/dayjs-1.10.7.tgz#2cf5f91add28116748440866a0a1d26f3a6ce468"
integrity sha1-LPX5Gt0oEWdIRAhmoKHSbzps5Gg=
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册