提交 0c96000a 编写于 作者: qian.jie's avatar qian.jie

Merge branch 'develop' of...

Merge branch 'develop' of 192.168.110.53:com.pica.cloud.education.frontend/pica-admin-consultation into feature/jq_1
...@@ -271,20 +271,20 @@ ...@@ -271,20 +271,20 @@
<style lang="scss" scoped> <style lang="scss" scoped>
.table-serviceSchedule { .table-serviceSchedule {
.el-table { .el-table {
.nothing-data{ .nothing-data {
display: inline-grid; display: inline-grid;
padding-top: 100px; padding-top: 100px;
img{ img {
width: 338px; width: 338px;
height: 159px; height: 159px;
} }
.nothing-data-title{ .nothing-data-title {
padding-top: 40px; padding-top: 40px;
padding-bottom: 150px; padding-bottom: 150px;
font-size: 16px; font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400; font-weight: 400;
color: #89888B; color: #89888b;
line-height: 22px; line-height: 22px;
} }
} }
......
...@@ -68,13 +68,13 @@ const serviceSchedule = (r) => ...@@ -68,13 +68,13 @@ const serviceSchedule = (r) =>
() => r(require('@/views/IM/diagnosis-admin/serviceSchedule.vue')), () => r(require('@/views/IM/diagnosis-admin/serviceSchedule.vue')),
'serviceSchedule' 'serviceSchedule'
); );
const addEditSchedule = (r) => const addEditSchedule = (r) =>
require.ensure( require.ensure(
[], [],
() => r(require('@/views/IM/diagnosis-admin/addEditSchedule.vue')), () => r(require('@/views/IM/diagnosis-admin/addEditSchedule.vue')),
'addEditSchedule' 'addEditSchedule'
); );
const overviewScheduling = (r) => const overviewScheduling = (r) =>
require.ensure( require.ensure(
[], [],
() => r(require('@/views/IM/diagnosis-admin/overviewScheduling.vue')), () => r(require('@/views/IM/diagnosis-admin/overviewScheduling.vue')),
...@@ -171,4 +171,4 @@ if (process.env.VUE_APP_ENV == 'uat') { ...@@ -171,4 +171,4 @@ if (process.env.VUE_APP_ENV == 'uat') {
routerConfig: routerConfig, routerConfig: routerConfig,
}; };
handleAllRouter(routerInfo); handleAllRouter(routerInfo);
} }
\ No newline at end of file
...@@ -234,7 +234,6 @@ ...@@ -234,7 +234,6 @@
}, },
watch: { watch: {
week(newV, oldV) { week(newV, oldV) {
console.log(newV, oldV, 'newV, oldV');
if (this.haveWeek.indexOf(newV) == -1) { if (this.haveWeek.indexOf(newV) == -1) {
this.haveWeek.push(newV); this.haveWeek.push(newV);
this.handleInitSearch(); this.handleInitSearch();
...@@ -264,9 +263,7 @@ ...@@ -264,9 +263,7 @@
}); });
}, },
mounted() { mounted() {
console.log(this.calendarOptions.events, 'this.calendarOptions.events');
this.scrollerHeight = this.$refs.agment.clientHeight + 'px'; this.scrollerHeight = this.$refs.agment.clientHeight + 'px';
// console.log(this.$refs.agment.clientHeight, 'this.$refs.agment.offsetHeight;');
this.init(); this.init();
}, },
methods: { methods: {
...@@ -290,18 +287,14 @@ ...@@ -290,18 +287,14 @@
this.handleInitSearch(); this.handleInitSearch();
}, },
handleChange(item, index) { handleChange(item, index) {
console.log(this.getEveryDay, 'this.getEveryDay');
this.maxList.map((itemChild, indexChild) => { this.maxList.map((itemChild, indexChild) => {
console.log(indexChild, 'indexChild');
return (itemChild.weekDay = dayjs( return (itemChild.weekDay = dayjs(
dayjs(this.getEveryDay).add(indexChild, 'day') dayjs(this.getEveryDay).add(indexChild, 'day')
).format('YYYY-MM-DD HH:mm:ss')); ).format('YYYY-MM-DD HH:mm:ss'));
}); });
this.maxList[index]['preNum'] = item.preNum; this.maxList[index]['preNum'] = item.preNum;
console.log(this.maxList, 'this.maxList');
}, },
getCopyData(data) { getCopyData(data) {
this.calendarOptions.events = [];
const copyList = []; const copyList = [];
const addDay = 7; const addDay = 7;
data.noAcceptList.map((item) => { data.noAcceptList.map((item) => {
...@@ -314,11 +307,11 @@ ...@@ -314,11 +307,11 @@
.format('YYYY-MM-DD HH:mm:ss'); .format('YYYY-MM-DD HH:mm:ss');
copyList.push(obj); copyList.push(obj);
}); });
this.calendarOptions.events = [];
data.noAcceptList = copyList; data.noAcceptList = copyList;
this.isDoIt = true; this.isDoIt = true;
}, },
getWeekMax(data) { getWeekMax(data) {
console.log(this.maxList, 'this.maxList');
if (data.countList.length > 0) { if (data.countList.length > 0) {
data.countList.forEach((item) => { data.countList.forEach((item) => {
const clistDay = dayjs(item.workDay).day(); const clistDay = dayjs(item.workDay).day();
...@@ -328,22 +321,18 @@ ...@@ -328,22 +321,18 @@
} else { } else {
index = 7; index = 7;
} }
// console.log(this.maxList, this.maxList[index - 1].preNum, 'index');
this.maxList[index - 1].preNum = item.preNum; this.maxList[index - 1].preNum = item.preNum;
// debugger;
this.maxList[index - 1].weekDay = dayjs(item.workDay) this.maxList[index - 1].weekDay = dayjs(item.workDay)
.add(7, 'day') .add(7, 'day')
.format('YYYY-MM-DD HH:mm:ss'); .format('YYYY-MM-DD HH:mm:ss');
console.log(this.maxList, 'clistDay');
}); });
} }
}, },
handleInitSearch(isReset, type) { handleInitSearch(isReset, type) {
if (isReset) { if (isReset && type != 1) {
this.calendarOptions.events = this.calendarOptions.events.filter( this.calendarOptions.events = this.calendarOptions.events.filter(
(v) => v.week !== this.week (v) => v.week !== this.week
); );
console.log(this.calendarOptions.events);
} }
let copyWeek = ''; let copyWeek = '';
if (type == 1) { if (type == 1) {
...@@ -357,30 +346,46 @@ ...@@ -357,30 +346,46 @@
copyWeek = 4; copyWeek = 4;
} }
} }
console.log(this.week, 'this.week');
const objParms = {}; const objParms = {};
objParms.doctorId = this.doctorId; objParms.doctorId = this.doctorId;
objParms.week = type == 1 ? copyWeek : this.week; objParms.week = type == 1 ? copyWeek : this.week;
// type == 1 表示 copy
objParms.workId = this.id; objParms.workId = this.id;
console.log(objParms.week, 'objParms.week');
dutyRosterQuery(objParms).then((res) => { dutyRosterQuery(objParms).then((res) => {
if (res.code == '000000') { if (res.code == '000000') {
this.calendarOptions.events = []; console.log(res.data.noAcceptList, 'res.data.noAcceptList');
if (type == 1) { if (type == 1 && !res.data.noAcceptList.length) {
return this.$toast('没有上周的排班信息可以用');
} else {
this.calendarOptions.events = [];
}
if (type == 1 && res.data.noAcceptList.length) {
this.getCopyData(res.data); this.getCopyData(res.data);
this.getWeekMax(res.data); this.getWeekMax(res.data);
} }
this.handleInitData(res.data); this.handleInitData(res.data);
if (res.data.countList.length > 0 && type != 1) { if (type != 1) {
const newAR = res.data.countList.map((item, index) => { const countList = res.data.countList;
if (item.weekDay == this.maxList[index].weekDay) { if (countList.length > 0) {
return { console.log(this.maxList, 'countListcountListcountListcountList');
preNum: item.preNum, countList.forEach((item) => {
}; let keyC = dayjs(item.workDay).day();
if (keyC == 0) {
keyC = 7;
}
this.maxList[keyC - 1].preNum = item.preNum || 0;
});
} else {
for (let i = 0; i < 7; i++) {
const maxListObj = {};
maxListObj.preNum = 0;
maxListObj.weekDay = dayjs(this.getEveryDay)
.add(i, 'day')
.format('YYYY-MM-DD HH:mm:ss');
this.maxList.push(maxListObj);
} }
}); console.log(this.maxList, 'this.maxListthis.maxListthis.maxList');
this.maxList = newAR; }
console.log(newAR, 'newAR');
} }
} else { } else {
this.$toast(res.message); this.$toast(res.message);
...@@ -391,14 +396,12 @@ ...@@ -391,14 +396,12 @@
var newDate = null; var newDate = null;
if (this.schedulingType != 3) { if (this.schedulingType != 3) {
newDate = [].concat(data.noAcceptList); newDate = [].concat(data.noAcceptList);
console.log(newDate, 'newDate');
} else { } else {
var acceptList = []; var acceptList = [];
data.acceptList.forEach((item) => { data.acceptList.forEach((item) => {
item.type = 88; item.type = 88;
acceptList.push(item); acceptList.push(item);
}); });
console.log(data.acceptList, 'data.acceptList');
newDate = [].concat(acceptList, data.noAcceptList); newDate = [].concat(acceptList, data.noAcceptList);
} }
newDate.forEach((item) => { newDate.forEach((item) => {
...@@ -408,7 +411,6 @@ ...@@ -408,7 +411,6 @@
dataObj['id'] = id; dataObj['id'] = id;
dataObj['end'] = item.endTime; dataObj['end'] = item.endTime;
dataObj['start'] = item.startTime; dataObj['start'] = item.startTime;
console.log(item.type);
dataObj['type'] = item.type; dataObj['type'] = item.type;
if (item.type == 88) { if (item.type == 88) {
dataObj['color'] = '#FFEDE9'; dataObj['color'] = '#FFEDE9';
...@@ -418,17 +420,12 @@ ...@@ -418,17 +420,12 @@
}, },
handleDatesSet(dataInfo) { handleDatesSet(dataInfo) {
this.getEveryDay = dayjs(dataInfo.startStr).format('YYYY-MM-DD HH:mm:ss'); 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 currentTime = new Date().getTime();
const getTime = new Date(dataInfo.startStr).getTime(); const getTime = new Date(dataInfo.startStr).getTime();
const cz = currentTime - getTime; const cz = currentTime - getTime;
const oneHour = 1 * 60 * 60 * 1000 * 24; const oneHour = 1 * 60 * 60 * 1000 * 24;
const timeDifference = (cz / oneHour) | 0; const timeDifference = (cz / oneHour) | 0;
const headObj = this.calendarOptions.customButtons.myCustomButton; const headObj = this.calendarOptions.customButtons.myCustomButton;
console.log(timeDifference, 'timeDifference');
// debugger; // debugger;
if (timeDifference >= 0 && timeDifference < 7) { if (timeDifference >= 0 && timeDifference < 7) {
// 过去 // 过去
...@@ -481,7 +478,6 @@ ...@@ -481,7 +478,6 @@
const index = this.getIdDeleteData(event.event.id); const index = this.getIdDeleteData(event.event.id);
this.isDoIt = true; this.isDoIt = true;
this.calendarOptions.events.splice(index, 1); this.calendarOptions.events.splice(index, 1);
console.log(this.calendarOptions.events);
}) })
.catch((_) => { .catch((_) => {
console.log(_); console.log(_);
...@@ -560,11 +556,9 @@ ...@@ -560,11 +556,9 @@
}, },
copyDoctoreScheduling() { copyDoctoreScheduling() {
this.handleInitSearch(true, 1); this.handleInitSearch(true, 1);
console.log(this.copyArr, 'copyArr');
}, },
saveDoctoreScheduling(type, weekV = 0) { saveDoctoreScheduling(type, weekV = 0) {
if (this.isDoIt) { if (this.isDoIt) {
console.log(this.week, 'this.week', weekV);
this.loading = true; this.loading = true;
const objParms = {}; const objParms = {};
objParms.week = weekV ? weekV : this.week; objParms.week = weekV ? weekV : this.week;
...@@ -572,18 +566,24 @@ ...@@ -572,18 +566,24 @@
objParms.level = this.currentIndex; objParms.level = this.currentIndex;
objParms.list = []; objParms.list = [];
const data = this.calendarOptions.events; const data = this.calendarOptions.events;
console.log(data, 'data');
data.forEach((item) => { data.forEach((item) => {
console.log(item.week == (weekV ? weekV : this.week));
if (item.week == (weekV ? weekV : this.week)) { if (item.week == (weekV ? weekV : this.week)) {
console.log(item.week, this.week, weekV, 'this.week');
const obj = {}; const obj = {};
obj.startTime = this.dateFormat('YYYY-mm-dd HH:MM:SS', item.start); obj.startTime = this.dateFormat('YYYY-mm-dd HH:MM:SS', item.start);
obj.endTime = this.dateFormat('YYYY-mm-dd HH:MM:SS', item.end); obj.endTime = this.dateFormat('YYYY-mm-dd HH:MM:SS', item.end);
console.log(obj, 'obj');
objParms.list.push(obj); objParms.list.push(obj);
} }
}); });
// 对上限人数处理
this.maxList.forEach((item, index) => {
console.log(item, 'item');
if (!item.weekDay) {
item.weekDay = dayjs(this.getEveryDay)
.add(index, 'day')
.format('YYYY-MM-DD HH:mm:ss');
}
});
console.log(this.maxList, '122222maxListmaxListmaxListmaxList');
objParms.countReqList = this.maxList; objParms.countReqList = this.maxList;
saveDutyRoster(objParms).then((res) => { saveDutyRoster(objParms).then((res) => {
if (res.code === '000000') { if (res.code === '000000') {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册