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

修改yuans

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