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

修改yuans

上级 07474a0e
...@@ -139,8 +139,7 @@ ...@@ -139,8 +139,7 @@
border: 1px solid #0d9078; border: 1px solid #0d9078;
} }
/deep/.fc-event-time { /deep/.fc-event-time {
padding: 5px; font-size: 14px;
font-size: 18px;
color: #0d9078; color: #0d9078;
word-wrap: break-word; word-wrap: break-word;
white-space: normal; white-space: normal;
......
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
type="primary" type="primary"
round round
style="width: 110px" style="width: 110px"
@click="resetDoctoreScheduling"
> >
重置 重置
</el-button> </el-button>
...@@ -124,21 +125,12 @@ ...@@ -124,21 +125,12 @@
select: this.selectInfo, select: this.selectInfo,
selectMinDistance: 0, selectMinDistance: 0,
eventResize: this.eventResize, eventResize: this.eventResize,
eventDragStop: this.eventDrop, eventDrop: this.eventDrop,
editable: true, editable: true,
overlap: false, overlap: false,
defaultDate: new Date(), defaultDate: new Date(),
datesSet: this.handleDatesSet, datesSet: this.handleDatesSet,
// unselect:this.unSelectInfo, events: [],
events: [
// {
// title: '黄娇变电站3020开关综合检修',
// start: '2021-10-18 09:30:00',
// end: '2021-10-18 12:30:00',
// color: '#FFEDE9',
// editable: false,
// }, // 可以拖动但不能缩放,但在周、日视图中是可以进行缩放的
],
header: { header: {
center: 'month,agendaFourDay', // buttons for switching between views center: 'month,agendaFourDay', // buttons for switching between views
}, },
...@@ -164,15 +156,6 @@ ...@@ -164,15 +156,6 @@
center: 'prev myCustomButton next', center: 'prev myCustomButton next',
right: '', right: '',
}, },
footerToolbar: {
start: 'nni',
},
buttonText: {
// today: '今天',
// month: '月',
// week: '周',
// day: '日'
},
expandRows: true, expandRows: true,
slotMinWidth: 50, slotMinWidth: 50,
slotDuration: '00:30:00', slotDuration: '00:30:00',
...@@ -200,8 +183,13 @@ ...@@ -200,8 +183,13 @@
workingTicketVisible: false, // 工作表票详情页面 workingTicketVisible: false, // 工作表票详情页面
}; };
}, },
watch: {
week(newV) {
console.log(newV);
// this.handleInitSearch(true);
},
},
mounted() { mounted() {
console.log(123, this.schedulingType, this.schedulingTypeValue);
this.init(); this.init();
}, },
methods: { methods: {
...@@ -217,12 +205,17 @@ ...@@ -217,12 +205,17 @@
if (this.schedulingType == 1 || this.schedulingType == 2) { if (this.schedulingType == 1 || this.schedulingType == 2) {
this.calendarOptions.editable = true; this.calendarOptions.editable = true;
} else { } else {
// 查看
this.calendarOptions.slotDuration = '00:05:00';
this.calendarOptions.selectable = false; this.calendarOptions.selectable = false;
this.calendarOptions.editable = false; this.calendarOptions.editable = false;
} }
this.handleInitSearch(); this.handleInitSearch();
}, },
handleInitSearch() { handleInitSearch(isReset) {
if (isReset) {
this.calendarOptions.events = [];
}
const objParms = {}; const objParms = {};
objParms.doctorId = this.schedulingTypeValue.doctorId; objParms.doctorId = this.schedulingTypeValue.doctorId;
objParms.week = this.week; objParms.week = this.week;
...@@ -257,18 +250,20 @@ ...@@ -257,18 +250,20 @@
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;
if (timeDifference > 0) { if (timeDifference > 0) {
// 过去 // 过去
this.week = 2; this.week = 2;
headObj.text = '上周';
} else if (timeDifference < 0) { } else if (timeDifference < 0) {
// 未来 // 未来
this.week = 3; this.week = 3;
this.handleInitSearch(); headObj.text = '下周';
} else { } else {
// 现在 // 现在
headObj.text = '本周';
this.week = 1; this.week = 1;
} }
// this.handleInitSearch();
}, },
eventResize(event) { eventResize(event) {
const index = this.getIdDeleteData(event.event.id); const index = this.getIdDeleteData(event.event.id);
...@@ -276,7 +271,11 @@ ...@@ -276,7 +271,11 @@
const keyAll = Object.keys(oldData[index]); const keyAll = Object.keys(oldData[index]);
const dataObj = {}; const dataObj = {};
keyAll.forEach((item) => { keyAll.forEach((item) => {
dataObj[item] = event.event[item]; if (item === 'week' || item === 'type') {
dataObj[item] = oldData[index][item];
} else {
dataObj[item] = event.event[item];
}
}); });
oldData.splice(index, 1, dataObj); oldData.splice(index, 1, dataObj);
this.getHandleTime(dataObj); this.getHandleTime(dataObj);
...@@ -289,6 +288,10 @@ ...@@ -289,6 +288,10 @@
return this.calendarOptions.events.splice(index, 1); return this.calendarOptions.events.splice(index, 1);
// alert("你要取消日期吗"); // alert("你要取消日期吗");
}, },
eventDrop(event) {
event.revert();
return;
},
selectInfo(info) { selectInfo(info) {
const id = (this.calendarOptions.events.length + 1) * 10; const id = (this.calendarOptions.events.length + 1) * 10;
info.id = id; info.id = id;
...@@ -301,7 +304,6 @@ ...@@ -301,7 +304,6 @@
dataObj[item] = info[item]; dataObj[item] = info[item];
} }
}); });
console.log(dataObj, 'dataObjdkdkdkdk');
this.calendarOptions.events.push(dataObj); this.calendarOptions.events.push(dataObj);
}, },
selectAllow(info) { selectAllow(info) {
...@@ -336,12 +338,15 @@ ...@@ -336,12 +338,15 @@
newDate.push(item); newDate.push(item);
} }
}); });
console.log(indexObj);
this.calendarOptions.events = newDate; this.calendarOptions.events = newDate;
return indexObj;
}, },
handlePriority(index) { handlePriority(index) {
this.currentIndex = index; this.currentIndex = index;
}, },
resetDoctoreScheduling() {
this.handleInitSearch(true);
},
saveDoctoreScheduling() { saveDoctoreScheduling() {
const objParms = {}; const objParms = {};
objParms.week = this.week; objParms.week = this.week;
...@@ -364,11 +369,9 @@ ...@@ -364,11 +369,9 @@
} else { } else {
this.$toast(res.message); this.$toast(res.message);
} }
console.log(res, '保存结果');
}); });
}, },
dateFormat(fmt, date2) { dateFormat(fmt, date2) {
console.log(date, 'datedate');
const date = new Date(date2); const date = new Date(date2);
let ret; let ret;
const opt = { const opt = {
......
...@@ -377,7 +377,6 @@ ...@@ -377,7 +377,6 @@
}, },
goBack(flag) { goBack(flag) {
console.log(flag); console.log(flag);
this.ScheduleListShow = true; this.ScheduleListShow = true;
}, },
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册