|
@@ -111,7 +111,14 @@ export default defineComponent({
|
|
|
type: any = 1
|
|
|
) {
|
|
|
let data: any = proxyData.workkArr;
|
|
|
- return formateTimeContinuous(index, startTime, endTime, type, data,proxyData);
|
|
|
+ return formateTimeContinuous(
|
|
|
+ index,
|
|
|
+ startTime,
|
|
|
+ endTime,
|
|
|
+ type,
|
|
|
+ data,
|
|
|
+ proxyData
|
|
|
+ );
|
|
|
},
|
|
|
// 判断当前时间在不在加班时间里面
|
|
|
beforeWorkTime(data: any, nowTime: any) {
|
|
@@ -200,8 +207,23 @@ export default defineComponent({
|
|
|
let startTime: any = "";
|
|
|
let endTime: any = "";
|
|
|
if ((!cusStartTime || !cusEndTime) && !customSceneList.length) {
|
|
|
- proxyData.timerText.text = "请选择工作时间段";
|
|
|
- proxyData.timerText.timer = "将自动开启办公服务";
|
|
|
+ // 查找最近的一段预约数据
|
|
|
+ let btnObj: any = proxyData.formateTimeContinuous(
|
|
|
+ 1,
|
|
|
+ startTime,
|
|
|
+ endTime,
|
|
|
+ 2
|
|
|
+ );
|
|
|
+ if (btnObj && btnObj.text) {
|
|
|
+ proxyData.timerText.text = `已预约~(${btnObj.text})`;
|
|
|
+ proxyData.timerText.timer =
|
|
|
+ formatTimerStr(btnObj.startTime) +
|
|
|
+ "~" +
|
|
|
+ formatTimerStr(btnObj.endTime);
|
|
|
+ } else {
|
|
|
+ proxyData.timerText.text = "请选择工作时间段";
|
|
|
+ proxyData.timerText.timer = "将自动开启办公服务";
|
|
|
+ }
|
|
|
proxyData.timerText.classColor = "grey";
|
|
|
proxyData.timerText.btnText = "预约时间";
|
|
|
proxyData.timerText.showDel = false;
|
|
@@ -218,8 +240,22 @@ export default defineComponent({
|
|
|
proxyData.timerText.showDel = false;
|
|
|
proxyData.forcedOverTimeFlag = false;
|
|
|
} else {
|
|
|
- proxyData.timerText.text = "请选择工作时间段";
|
|
|
- proxyData.timerText.timer = "将自动开启办公服务";
|
|
|
+ let btnObj: any = proxyData.formateTimeContinuous(
|
|
|
+ 1,
|
|
|
+ startTime,
|
|
|
+ endTime,
|
|
|
+ 2
|
|
|
+ );
|
|
|
+ if (btnObj && btnObj.text) {
|
|
|
+ proxyData.timerText.text = `已预约~(${btnObj.text})`;
|
|
|
+ proxyData.timerText.timer =
|
|
|
+ formatTimerStr(btnObj.startTime) +
|
|
|
+ "~" +
|
|
|
+ formatTimerStr(btnObj.endTime);
|
|
|
+ } else {
|
|
|
+ proxyData.timerText.text = "请选择工作时间段";
|
|
|
+ proxyData.timerText.timer = "将自动开启办公服务";
|
|
|
+ }
|
|
|
proxyData.timerText.classColor = "grey";
|
|
|
proxyData.timerText.btnText = "预约时间";
|
|
|
proxyData.timerText.showDel = false;
|
|
@@ -243,17 +279,22 @@ export default defineComponent({
|
|
|
/**
|
|
|
* 需要补加上和未来时间连续的问题
|
|
|
*/
|
|
|
- let obj: any = proxyData.formateTimeContinuous(
|
|
|
- 0,
|
|
|
+ let btnObj: any = proxyData.formateTimeContinuous(
|
|
|
+ 1,
|
|
|
startTime,
|
|
|
endTime,
|
|
|
1
|
|
|
);
|
|
|
- console.log("工作时间=====");
|
|
|
- console.log(obj);
|
|
|
- proxyData.timerText.text = "工作时间";
|
|
|
+ proxyData.timerText.text = `工作时间`;
|
|
|
proxyData.timerText.timer =
|
|
|
formatTimerStr(startTime) + "~" + formatTimerStr(endTime);
|
|
|
+ if (btnObj && btnObj.text) {
|
|
|
+ proxyData.timerText.text = `工作时间(今日~${btnObj.text})`;
|
|
|
+ proxyData.timerText.timer =
|
|
|
+ formatTimerStr(btnObj.startTime) +
|
|
|
+ "~" +
|
|
|
+ formatTimerStr(btnObj.endTime);
|
|
|
+ }
|
|
|
proxyData.timerText.classColor = "yellow";
|
|
|
proxyData.timerText.btnText = "预约延时";
|
|
|
proxyData.timerText.showDel = false;
|
|
@@ -301,10 +342,6 @@ export default defineComponent({
|
|
|
endTime,
|
|
|
1
|
|
|
);
|
|
|
- console.log("预约加班的记录---");
|
|
|
- // debugger
|
|
|
- console.log(btnObj);
|
|
|
-
|
|
|
proxyData.timerText.text = `工作时间`;
|
|
|
proxyData.timerText.timer =
|
|
|
formatTimerStr(startTime) + "~" + formatTimerStr(endTime);
|
|
@@ -337,7 +374,7 @@ export default defineComponent({
|
|
|
*需要补加上和未来时间连续的问题
|
|
|
*/
|
|
|
if (startTime && endTime) {
|
|
|
- proxyData.timerText.text = "已预约~(今日)";
|
|
|
+ proxyData.timerText.text = "已预约~今日";
|
|
|
proxyData.timerText.timer =
|
|
|
formatTimerStr(startTime) + "~" + formatTimerStr(endTime);
|
|
|
proxyData.timerText.classColor = "grey";
|
|
@@ -345,8 +382,29 @@ export default defineComponent({
|
|
|
proxyData.timerText.showDel = false;
|
|
|
proxyData.forcedOverTimeFlag = true;
|
|
|
} else {
|
|
|
- proxyData.timerText.text = "请选择工作时间段";
|
|
|
- proxyData.timerText.timer = "将自动开启办公服务";
|
|
|
+ // 查找最近的一段预约数据
|
|
|
+ // debuggers
|
|
|
+ let btnObj: any = proxyData.formateTimeContinuous(
|
|
|
+ 1,
|
|
|
+ startTime,
|
|
|
+ endTime,
|
|
|
+ 2
|
|
|
+ );
|
|
|
+ if (
|
|
|
+ btnObj &&
|
|
|
+ btnObj.text &&
|
|
|
+ btnObj.startTime &&
|
|
|
+ btnObj.endTime
|
|
|
+ ) {
|
|
|
+ proxyData.timerText.text = `已预约~${btnObj.text}`;
|
|
|
+ proxyData.timerText.timer =
|
|
|
+ formatTimerStr(btnObj.startTime) +
|
|
|
+ "~" +
|
|
|
+ formatTimerStr(btnObj.endTime);
|
|
|
+ } else {
|
|
|
+ proxyData.timerText.text = "请选择工作时间段";
|
|
|
+ proxyData.timerText.timer = "将自动开启办公服务";
|
|
|
+ }
|
|
|
proxyData.timerText.classColor = "grey";
|
|
|
proxyData.timerText.btnText = "预约时间";
|
|
|
proxyData.timerText.showDel = false;
|