econtrol-tools-calendar 1.0.11 → 1.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calendar.js +17 -46
- package/dist/calendar.js.map +1 -1
- package/dist/calendar.umd.cjs +17 -46
- package/dist/calendar.umd.cjs.map +1 -1
- package/dist/style.css +140 -140
- package/package.json +1 -1
package/dist/calendar.js
CHANGED
|
@@ -899,52 +899,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
899
899
|
ElMessage.warning("不能选择今天之前的时间进行预约");
|
|
900
900
|
return;
|
|
901
901
|
}
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
902
|
+
formData.start = startStr;
|
|
903
|
+
formData.end = endStr;
|
|
904
|
+
formData.title = props.quickAddTaskName;
|
|
905
|
+
formData.allDay = false;
|
|
906
|
+
formData.description = "";
|
|
907
|
+
formData.organizer = currentUser.value;
|
|
908
|
+
formData.username = currentUser.value;
|
|
909
|
+
formData.organizerId = currentUserId.value;
|
|
910
|
+
if (props.taskid) {
|
|
911
|
+
formData.taskid = props.taskid;
|
|
912
|
+
} else {
|
|
913
|
+
formData.taskid = "";
|
|
905
914
|
}
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
endStr,
|
|
911
|
-
void 0,
|
|
912
|
-
currentUser.value,
|
|
913
|
-
tempEventId,
|
|
914
|
-
// 传入临时ID用于颜色分配(如果taskid匹配)
|
|
915
|
-
taskId
|
|
916
|
-
// 传入 taskid 用于颜色分配
|
|
917
|
-
);
|
|
918
|
-
const startISO = formatToISO(startStr);
|
|
919
|
-
const endISO = endStr ? formatToISO(endStr) : void 0;
|
|
920
|
-
const eventUsername = currentUser.value;
|
|
921
|
-
const eventOrganizerId = currentUserId.value;
|
|
922
|
-
const editable = !currentUserId.value || eventOrganizerId === currentUserId.value;
|
|
923
|
-
const newEvent = {
|
|
924
|
-
// 不设置 id,由外部 App.vue 的事件列表提供
|
|
925
|
-
title: props.quickAddTaskName,
|
|
926
|
-
start: startISO,
|
|
927
|
-
end: endISO,
|
|
928
|
-
allDay: false,
|
|
929
|
-
backgroundColor: colorInfo.bg,
|
|
930
|
-
borderColor: colorInfo.border,
|
|
931
|
-
editable,
|
|
932
|
-
extendedProps: {
|
|
933
|
-
description: "",
|
|
934
|
-
organizer: eventUsername,
|
|
935
|
-
// 保留用于兼容
|
|
936
|
-
username: eventUsername,
|
|
937
|
-
organizerId: eventOrganizerId,
|
|
938
|
-
colorIndex: colorInfo.index,
|
|
939
|
-
deviceId: props.deviceId || "",
|
|
940
|
-
taskid: props.taskid || ""
|
|
941
|
-
// 如果存在 taskid,保存到事件数据中
|
|
942
|
-
}
|
|
943
|
-
};
|
|
944
|
-
emit("quickAddSaved", newEvent);
|
|
945
|
-
emit("eventAdded", newEvent);
|
|
946
|
-
const newEventsList = [...events.value, newEvent];
|
|
947
|
-
emit("eventsChange", newEventsList);
|
|
915
|
+
formData.deviceId = props.deviceId || "";
|
|
916
|
+
formData.userid = currentUserId.value;
|
|
917
|
+
editingEvent.value = null;
|
|
918
|
+
dialogVisible.value = true;
|
|
948
919
|
}
|
|
949
920
|
function formatFromISO(isoStr, useBeijingTime = false) {
|
|
950
921
|
if (!isoStr) return "";
|
|
@@ -1659,7 +1630,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
1659
1630
|
}
|
|
1660
1631
|
return target;
|
|
1661
1632
|
};
|
|
1662
|
-
const SCalendarComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1633
|
+
const SCalendarComponent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3dbf0c7a"]]);
|
|
1663
1634
|
function getHolidays(year) {
|
|
1664
1635
|
const holidays = {};
|
|
1665
1636
|
if (year === 2026) {
|