# 會議室行事曆管理系統 這是一個基於 Angular 開發的會議室預約和管理系統,提供直觀的行事曆介面來管理會議室預約。 ## 功能特點 - 📅 多視圖行事曆顯示(月、週、日視圖) - 🏢 多會議室管理 - 🔄 重複會議支援 - 🎨 Outlook 風格的事件顯示 - 🌏 繁體中文本地化支援 - 👥 會議詳細資訊查看 - 🔒 權限控制 - ⚡ 即時狀態更新 ## 技術需求 - Angular 17+ - Node.js 18+ ## 安裝說明 1. 克隆專案: ```bash git clone http://www.origtek.com:2999/juro.hsu/CalendarManager.git ``` 2. 執行檔案:`00_run_all.bat` 3. 開啟瀏覽器訪問:`http://localhost:4200/calendar/{UserId}` ## API 端點 系統使用以下 API 端點: - `GET /api/calendar/getAuth` - 驗證使用者權限 - `GET /api/calendar/getMeetingRoom` - 獲取所有會議室 - `GET /api/calendar/getMeetingApply` - 獲取會議申請列表 - `GET /api/calendar/getMeetingApplyById` - 獲取特定會議詳情 - `PUT /api/calendar/closeMeeting` - 關閉單一會議 - `PUT /api/calendar/closeAllRepeatMeeting` - 關閉所有重複會議 ### API 詳細說明 #### 1. 驗證使用者權限 - **方法**:GET - **路徑**:`/api/calendar/getAuth` - **查詢參數**: - `id`:使用者ID(string) - **回傳格式**: ```json { "success": true } // 有權限 { "success": false } // 無權限 ``` - **用途**:判斷指定使用者是否為櫃檯人員。 #### 2. 取得所有會議室 - **方法**:GET - **路徑**:`/api/calendar/getMeetingRoom` - **查詢參數**:無 - **回傳格式**: ```json [ { "id": 1, "name": "會議室A" }, { "id": 2, "name": "會議室B" } ] ``` - **用途**:取得所有會議室清單。 #### 3. 取得會議申請列表(依月份) - **方法**:GET - **路徑**:`/api/calendar/getMeetingApply` - **查詢參數**: - `Date`:查詢月份(格式:YYYYMM,必填) - `roomId`:會議室ID(可選,預設查全部) - `old`:是否查詢已結束/刪除(可選,'true'查全部,預設僅查未結束且未刪除) - **回傳格式**: ```json [ { "id": 1, "roomId": 2, "subject": "會議主題", "remark": "備註", "beginTime": "2024-06-01 09:00:00", "endTime": "2024-06-01 10:00:00", "status": "已批准", "parentId": null, "falseDelete": 0, "isRepeat": false, "createdBy": "王小明", "createdAt": "2024-05-20 08:00:00", "updatedAt": "2024-05-20 08:00:00" } ] ``` - **用途**:依月份查詢所有(或指定會議室)會議申請。 #### 4. 取得特定會議詳情 - **方法**:GET - **路徑**:`/api/calendar/getMeetingApplyById` - **查詢參數**: - `meetingId`:會議申請ID(必填) - **回傳格式**: ```json { "id": 1, "roomId": 2, "subject": "會議主題", "applyUser": "user01", "applyUserName": "王小明", "otherJoinMember": "user02,user03", "type": "一般會議", "beginTime": "2024-06-01 09:00:00", "endTime": "2024-06-01 10:00:00", "remark": "備註", "status": "已批准", "approvalOpinion": "同意", "beginRemark": "準時開始", "endRemark": "準時結束", "conflict": 0, "falseDelete": 0, "applyTime": "2024-05-20 08:00:00", "deletedAt": null, "createdAt": "2024-05-20 08:00:00", "updatedAt": "2024-05-20 08:00:00", "reminderTiming": null, "signType": null, "signWifi": null, "externalUser": null, "reminderTime": null, "signUser": null, "externalReminderType": null, "sign": null, "response": null, "approvalUser": null, "createTime": null, "attenceType": null, "interfaceId": null, "videoInfo": null, "isRepeat": false, "repeatInterval": null, "repeatType": null, "repeatEndType": null, "repeatEndNumber": null, "repeatRemove": null, "parentId": null, "repeatEndDate": null, "cycleBeginTime": null, "cycleEndTime": null, "createFrom": null } ``` - **用途**:查詢單一會議申請的完整詳細資訊。 #### 5. 關閉單一會議 - **方法**:PUT - **路徑**:`/api/calendar/closeMeeting` - **Body**: ```json { "meetingId": 1 } ``` - **回傳格式**: ```json { "affectedRows": 1, ... } ``` - **用途**:將指定會議申請狀態設為結束並標記為刪除。 #### 6. 關閉所有重複會議 - **方法**:PUT - **路徑**:`/api/calendar/closeAllRepeatMeeting` - **Body**: ```json { "parentId": 1 } ``` - **回傳格式**: ```json { "affectedRows": 3, ... } ``` - **用途**:將同一重複會議(parentId相同)全部設為結束並標記為刪除。 --- ## 主要元件 ### CalendarComponent 主要的行事曆顯示元件,功能包括: - 多視圖切換 - 會議室篩選 - 事件顯示和管理 - 日期導航 ### DetailComponent 會議詳情顯示元件,用於: - 顯示會議詳細資訊 - 處理會議狀態更新 ### CalendarService 提供所有與後端 API 的通訊服務,包括: - 會議室資料獲取 - 會議申請管理 - 權限驗證 ## 使用說明 1. 選擇會議室:使用下拉選單選擇特定會議室 2. 切換視圖:點擊工具列上的按鈕切換月/週/日視圖 3. 查看會議:點擊行事曆上的事件查看詳情 4. 關閉會議:具有權限的使用者可以關閉會議 ## 注意事項 - 所有時間都基於本地時區 - 會議關閉操作需要適當的權限 - 重複會議可以選擇關閉單次或全部 ## 授權 [授權說明] ## 貢獻指南 歡迎提交 Pull Request 或建立 Issue。 ## 聯絡方式 [聯絡資訊]