| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¡ä¾å表å详æ
|
| | | export function meetinglist(data) { |
| | | return request({ |
| | | url: '/project/meeting/list', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // èå¤ä¿®æ¹ |
| | | export function meetingedit(data) { |
| | | return request({ |
| | | url: '/project/meeting/edit', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // èå¤è¯¦æ
|
| | | export function meetingInfo(id) { |
| | | return request({ |
| | | url: '/project/meeting/getInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¡ä¾å表å详æ
|
| | | export function meetinglist(data) { |
| | | return request({ |
| | | url: '/project/meeting/list', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // ä¼è®®çºªè¦ä¿®æ¹ |
| | | export function meetingedit(data) { |
| | | return request({ |
| | | url: '/project/meeting/edit', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // ä¼è®®çºªè¦è¯¦æ
|
| | | export function meetingInfo(id) { |
| | | return request({ |
| | | url: '/project/meeting/getInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | export * from "./affirm"; |
| | | export * from "./allocation"; |
| | | export * from "./appear"; |
| | | export * from "./assess"; |
| | | export * from "./course"; |
| | | export * from "./ethicalReview"; |
| | | export * from "./decide"; |
| | | export * from "./GetWitness"; |
| | | export * from "./maintain"; |
| | | export * from "./OrganUtilization"; |
| | | export * from "./transfer"; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¡ä¾å表å详æ
|
| | | export function meetinglist(data) { |
| | | return request({ |
| | | url: '/project/meeting/list', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // è¿ä¿®ä¿®æ¹ |
| | | export function meetingedit(data) { |
| | | return request({ |
| | | url: '/project/meeting/edit', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // è¿ä¿®è¯¦æ
|
| | | export function meetingInfo(id) { |
| | | return request({ |
| | | url: '/project/meeting/getInfo/' + id, |
| | | method: 'get' |
| | | }) |
| | | } |
| | |
| | | </el-tab-pane> |
| | | |
| | | <el-tab-pane label="åºå·®è®°å½" name="businessTripList"> |
| | | <personal-business-trip-table |
| | | :data="businessTripData" |
| | | :loading="loading" |
| | | /> |
| | | <person-business :data="businessTripData" :loading="loading" /> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="æ¥åè§å¾" name="calendar"> |
| | | <attendance-calendar |
| | |
| | | |
| | | generatePersonalAttendanceData() { |
| | | const data = []; |
| | | const currentMonth = 12; // 12æ |
| | | const currentMonth = 4; // 12æ |
| | | |
| | | for (let day = 1; day <= 31; day++) { |
| | | if (Math.random() > 0.2) { |
| | | // 80%çåºå¤ç |
| | | data.push({ |
| | | id: day, |
| | | date: `2024-${currentMonth |
| | | date: `2026-${currentMonth |
| | | .toString() |
| | | .padStart(2, "0")}-${day.toString().padStart(2, "0")}`, |
| | | checkIn: `08:${String(Math.floor(Math.random() * 30)).padStart( |
| | |
| | | return [ |
| | | { |
| | | id: 1, |
| | | tripNumber: "BT202412001", |
| | | tripNumber: "BT202612001", |
| | | startCity: "å京", |
| | | endCity: "䏿µ·", |
| | | startDate: "2024-12-05", |
| | | endDate: "2024-12-08", |
| | | startDate: "2026-04-05", |
| | | endDate: "2026-04-08", |
| | | distance: 1200, |
| | | purpose: "客æ·ä¼è®®", |
| | | status: "已宿" |
| | | }, |
| | | { |
| | | id: 2, |
| | | tripNumber: "BT202412002", |
| | | tripNumber: "BT202612002", |
| | | startCity: "å京", |
| | | endCity: "广å·", |
| | | startDate: "2024-12-15", |
| | | endDate: "2024-12-18", |
| | | startDate: "2026-04-012", |
| | | endDate: "2026-04-16", |
| | | distance: 1900, |
| | | purpose: "项ç®è°ç ", |
| | | status: "已宿" |
| | |
| | | <template> |
| | | <div class="attendance-calendar"> |
| | | <el-calendar v-model="calendarValue"> |
| | | <template #date-cell="{ data }"> |
| | | <!-- <el-button @click="refreshCalendar" size="small" type="primary" |
| | | >å·æ°</el-button |
| | | > --> |
| | | |
| | | <!-- Element UI çæ¥åç»ä»¶ --> |
| | | <el-calendar v-model="value"> |
| | | <template slot="dateCell" slot-scope="{ date, data }"> |
| | | <div class="calendar-date"> |
| | | <div class="date-number">{{ data.day.split('-')[2] }}</div> |
| | | <div class="date-number"> |
| | | {{ |
| | | data.day |
| | | .split("-") |
| | | .slice(1) |
| | | .join("-") |
| | | }} |
| | | </div> |
| | | <!-- <div style="font-size: 10px; color: #666;">{{ data.day }}</div> --> |
| | | <div class="date-events"> |
| | | <!-- Element UI ä¸ä½¿ç¨ææ§½ä½ç¨å --> |
| | | <div |
| | | v-for="event in getDateEvents(data.day)" |
| | | :key="event.id" |
| | |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'AttendanceCalendar', |
| | | name: "AttendanceCalendar", |
| | | props: { |
| | | attendanceData: Array, |
| | | businessTripData: Array |
| | | }, |
| | | data() { |
| | | return { |
| | | calendarValue: new Date() |
| | | value: new Date(), // Element UI ä½¿ç¨ value |
| | | localAttendanceData: [], |
| | | localBusinessTripData: [] |
| | | }; |
| | | }, |
| | | watch: { |
| | | attendanceData: { |
| | | immediate: true, |
| | | handler(val) { |
| | | this.localAttendanceData = val || []; |
| | | console.log("è夿°æ®:", this.localAttendanceData); |
| | | this.$nextTick(() => { |
| | | this.$forceUpdate(); // Vue 2 çå¼ºå¶æ´æ° |
| | | }); |
| | | } |
| | | }, |
| | | businessTripData: { |
| | | immediate: true, |
| | | handler(val) { |
| | | this.localBusinessTripData = val || []; |
| | | console.log("åºå·®æ°æ®:", this.localBusinessTripData); |
| | | this.$nextTick(() => { |
| | | this.$forceUpdate(); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | console.log("Calendar mounted with Vue 2.6.12"); |
| | | this.testMethod(); |
| | | }, |
| | | methods: { |
| | | refreshCalendar() { |
| | | console.log("æå¨å·æ°æ¥å"); |
| | | this.$forceUpdate(); |
| | | }, |
| | | testMethod() { |
| | | console.log("æµè¯æ¹æ³æ¯å¦å¯è°ç¨"); |
| | | console.log("getDateEvents æµè¯:", this.getDateEvents("2024-01-15")); |
| | | }, |
| | | getDateEvents(date) { |
| | | const events = [] |
| | | console.log("getDateEvents 被è°ç¨, æ¥æ:", date); |
| | | console.log("å½åè夿°æ®:", this.localAttendanceData); |
| | | console.log("å½ååºå·®æ°æ®:", this.localBusinessTripData); |
| | | |
| | | // æ£æ¥åºå¤è®°å½ |
| | | const attendance = this.attendanceData.find(item => item.date === date) |
| | | const events = []; |
| | | |
| | | // è夿°æ® |
| | | const attendance = (this.localAttendanceData || []).find(item => { |
| | | return item && item.date === date; |
| | | }); |
| | | |
| | | if (attendance) { |
| | | events.push({ |
| | | id: `attendance-${date}`, |
| | | type: 'attendance', |
| | | text: `${attendance.checkIn}-${attendance.checkOut}` |
| | | }) |
| | | type: "attendance", |
| | | text: `${attendance.checkIn || "--"}-${attendance.checkOut || "--"}` |
| | | }); |
| | | } |
| | | |
| | | // æ£æ¥åºå·®è®°å½ |
| | | const businessTrip = this.businessTripData.find(item => |
| | | date >= item.startDate && date <= item.endDate |
| | | ) |
| | | // åºå·®æ°æ® |
| | | const businessTrip = (this.localBusinessTripData || []).find(item => { |
| | | return item && date >= item.startDate && date <= item.endDate; |
| | | }); |
| | | |
| | | if (businessTrip) { |
| | | events.push({ |
| | | id: `business-trip-${date}`, |
| | | type: 'business-trip', |
| | | text: `åºå·®: ${businessTrip.endCity}` |
| | | }) |
| | | type: "business-trip", |
| | | text: `åºå·®: ${businessTrip.endCity || ""}` |
| | | }); |
| | | } |
| | | |
| | | return events |
| | | console.log("æ¾å°çäºä»¶:", events); |
| | | return events; |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | |
| | | |
| | | .calendar-date { |
| | | height: 100%; |
| | | padding: 8px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | |
| | | .date-number { |
| | | font-weight: bold; |
| | | margin-bottom: 4px; |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .date-events { |
| | |
| | | align-items: center; |
| | | margin-bottom: 2px; |
| | | font-size: 12px; |
| | | padding: 2px 4px; |
| | | border-radius: 2px; |
| | | background-color: #f5f7fa; |
| | | } |
| | | |
| | | .event-item.attendance { |
| | | background-color: #f0f9eb; |
| | | color: #67c23a; |
| | | } |
| | | |
| | | .event-item.business-trip { |
| | | background-color: #ecf5ff; |
| | | color: #409eff; |
| | | } |
| | | |
| | | .event-dot { |
| | |
| | | .event-item.business-trip .event-dot { |
| | | background-color: #409eff; |
| | | } |
| | | |
| | | ::v-deep .el-calendar-table .el-calendar-day { |
| | | height: 115px; |
| | | } |
| | | .event-text { |
| | | white-space: nowrap; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | flex: 1; |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | computed: { |
| | | filteredData() { |
| | | |
| | | let data = this.data.filter(item => { |
| | | const nameMatch = !this.filters.employeeName || |
| | | item.employeeName.includes(this.filters.employeeName) |
| | |
| | | // åå·¥è夿°æ® - éè¦è¡¥å
宿´æä»½çæ°æ® |
| | | attendanceData: [ |
| | | // 12æ1-4æ¥ |
| | | { id: 1, date: '2024-12-01', checkIn: '08:30', checkOut: '18:00', status: 'present', workHours: 9.5 }, |
| | | { id: 2, date: '2024-12-02', checkIn: '09:15', checkOut: '18:00', status: 'late', workHours: 8.75 }, |
| | | { id: 3, date: '2024-12-03', checkIn: '08:45', checkOut: '17:30', status: 'present', workHours: 8.75 }, |
| | | { id: 4, date: '2024-12-04', checkIn: '08:25', checkOut: '18:10', status: 'present', workHours: 9.75 }, |
| | | { id: 1, date: '2026-04-01', checkIn: '08:30', checkOut: '18:00', status: 'present', workHours: 9.5 }, |
| | | { id: 2, date: '2026-04-02', checkIn: '09:15', checkOut: '18:00', status: 'late', workHours: 8.75 }, |
| | | { id: 3, date: '2026-04-03', checkIn: '08:45', checkOut: '17:30', status: 'present', workHours: 8.75 }, |
| | | { id: 4, date: '2026-04-04', checkIn: '08:25', checkOut: '18:10', status: 'present', workHours: 9.75 }, |
| | | |
| | | // 12æ5-8æ¥ï¼5å·ç¼ºå¤ï¼5-8å·åºå·®ï¼ |
| | | { id: 5, date: '2024-12-05', checkIn: null, checkOut: null, status: 'absent', workHours: 0 }, |
| | | { id: 6, date: '2024-12-06', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, |
| | | { id: 7, date: '2024-12-07', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, |
| | | { id: 8, date: '2024-12-08', checkIn: '08:40', checkOut: '17:45', status: 'present', workHours: 9.0 }, |
| | | { id: 5, date: '2026-04-05', checkIn: null, checkOut: null, status: 'absent', workHours: 0 }, |
| | | { id: 6, date: '2026-04-06', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, |
| | | { id: 7, date: '2026-04-07', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, |
| | | { id: 8, date: '2026-04-08', checkIn: '08:40', checkOut: '17:45', status: 'present', workHours: 9.0 }, |
| | | |
| | | // 12æ9-14æ¥ |
| | | { id: 9, date: '2024-12-09', checkIn: '08:35', checkOut: '18:05', status: 'present', workHours: 9.5 }, |
| | | { id: 10, date: '2024-12-10', checkIn: '09:05', checkOut: '17:50', status: 'late', workHours: 8.75 }, |
| | | { id: 11, date: '2024-12-11', checkIn: '08:50', checkOut: '18:15', status: 'present', workHours: 9.5 }, |
| | | { id: 12, date: '2024-12-12', checkIn: '08:30', checkOut: '17:40', status: 'present', workHours: 9.0 }, |
| | | { id: 13, date: '2024-12-13', checkIn: '08:55', checkOut: '18:00', status: 'present', workHours: 9.0 }, |
| | | { id: 14, date: '2024-12-14', checkIn: '08:45', checkOut: '17:50', status: 'present', workHours: 9.0 }, |
| | | { id: 9, date: '2026-04-09', checkIn: '08:35', checkOut: '18:05', status: 'present', workHours: 9.5 }, |
| | | { id: 10, date: '2026-04-10', checkIn: '09:05', checkOut: '17:50', status: 'late', workHours: 8.75 }, |
| | | { id: 11, date: '2026-04-11', checkIn: '08:50', checkOut: '18:15', status: 'present', workHours: 9.5 }, |
| | | { id: 12, date: '2026-04-12', checkIn: '08:30', checkOut: '17:40', status: 'present', workHours: 9.0 }, |
| | | { id: 13, date: '2026-04-13', checkIn: '08:55', checkOut: '18:00', status: 'present', workHours: 9.0 }, |
| | | { id: 14, date: '2026-04-14', checkIn: '08:45', checkOut: '17:50', status: 'present', workHours: 9.0 }, |
| | | |
| | | // 12æ15-18æ¥ï¼åºå·®ï¼ |
| | | { id: 15, date: '2024-12-15', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, |
| | | { id: 16, date: '2024-12-16', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, |
| | | { id: 17, date: '2024-12-17', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, |
| | | { id: 18, date: '2024-12-18', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, |
| | | { id: 15, date: '2026-04-15', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, |
| | | { id: 16, date: '2026-04-16', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, |
| | | { id: 17, date: '2026-04-17', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, |
| | | { id: 18, date: '2026-04-18', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, |
| | | |
| | | // 12æ19-24æ¥ |
| | | { id: 19, date: '2024-12-19', checkIn: '08:35', checkOut: '18:05', status: 'present', workHours: 9.5 }, |
| | | { id: 20, date: '2024-12-20', checkIn: '08:40', checkOut: '17:55', status: 'present', workHours: 9.25 }, |
| | | { id: 21, date: '2024-12-21', checkIn: null, checkOut: null, status: 'absent', workHours: 0 }, // å¨å
|
| | | { id: 22, date: '2024-12-22', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, // åºå·® |
| | | { id: 23, date: '2024-12-23', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, // åºå·® |
| | | { id: 24, date: '2024-12-24', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, // åºå·® |
| | | { id: 19, date: '2026-04-19', checkIn: '08:35', checkOut: '18:05', status: 'present', workHours: 9.5 }, |
| | | { id: 20, date: '2026-04-20', checkIn: '08:40', checkOut: '17:55', status: 'present', workHours: 9.25 }, |
| | | { id: 21, date: '2026-04-21', checkIn: null, checkOut: null, status: 'absent', workHours: 0 }, // å¨å
|
| | | { id: 22, date: '2026-04-22', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, // åºå·® |
| | | { id: 23, date: '2026-04-23', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, // åºå·® |
| | | { id: 24, date: '2026-04-24', checkIn: null, checkOut: null, status: 'trip', workHours: 0 }, // åºå·® |
| | | |
| | | // 12æ25-31æ¥ |
| | | { id: 25, date: '2024-12-25', checkIn: '08:50', checkOut: '17:45', status: 'present', workHours: 8.75 }, |
| | | { id: 26, date: '2024-12-26', checkIn: '09:10', checkOut: '17:40', status: 'late', workHours: 8.5 }, |
| | | { id: 27, date: '2024-12-27', checkIn: '08:35', checkOut: '18:00', status: 'present', workHours: 9.25 }, |
| | | { id: 28, date: '2024-12-28', checkIn: '08:45', checkOut: '17:50', status: 'present', workHours: 9.0 }, |
| | | { id: 29, date: '2024-12-29', checkIn: null, checkOut: null, status: 'absent', workHours: 0 }, // 卿¥ |
| | | { id: 30, date: '2024-12-30', checkIn: '08:30', checkOut: '17:30', status: 'present', workHours: 9.0 }, |
| | | { id: 31, date: '2024-12-31', checkIn: '08:40', checkOut: '16:00', status: 'present', workHours: 7.5 } |
| | | { id: 25, date: '2026-04-25', checkIn: '08:50', checkOut: '17:45', status: 'present', workHours: 8.75 }, |
| | | { id: 26, date: '2026-04-26', checkIn: '09:10', checkOut: '17:40', status: 'late', workHours: 8.5 }, |
| | | { id: 27, date: '2026-04-27', checkIn: '08:35', checkOut: '18:00', status: 'present', workHours: 9.25 }, |
| | | { id: 28, date: '2026-04-28', checkIn: '08:45', checkOut: '17:50', status: 'present', workHours: 9.0 }, |
| | | { id: 29, date: '2026-04-29', checkIn: null, checkOut: null, status: 'absent', workHours: 0 }, // 卿¥ |
| | | { id: 30, date: '2026-04-30', checkIn: '08:30', checkOut: '17:30', status: 'present', workHours: 9.0 }, |
| | | { id: 31, date: '2026-04-31', checkIn: '08:40', checkOut: '16:00', status: 'present', workHours: 7.5 } |
| | | ], |
| | | |
| | | // åºå·®æ°æ® - éè¦è°æ´æ¥æèå´å¹é
|
| | |
| | | tripNumber: 'BT202412001', |
| | | startCity: 'å京', |
| | | endCity: '䏿µ·', |
| | | startDate: '2024-12-05', |
| | | endDate: '2024-12-07', // è°æ´ä¸º7å·ç»æ |
| | | startDate: '2026-04-05', |
| | | endDate: '2026-04-07', // è°æ´ä¸º7å·ç»æ |
| | | distance: 1200, |
| | | purpose: '客æ·ä¼è®®', |
| | | status: 'completed' |
| | |
| | | tripNumber: 'BT202412002', |
| | | startCity: 'å京', |
| | | endCity: '广å·', |
| | | startDate: '2024-12-15', |
| | | endDate: '2024-12-18', |
| | | startDate: '2026-04-15', |
| | | endDate: '2026-04-18', |
| | | distance: 1900, |
| | | purpose: '项ç®è°ç ', |
| | | status: 'completed' |
| | |
| | | tripNumber: 'BT202412003', |
| | | startCity: 'å京', |
| | | endCity: 'æ·±å³', |
| | | startDate: '2024-12-22', |
| | | endDate: '2024-12-24', |
| | | startDate: '2026-04-22', |
| | | endDate: '2026-04-24', |
| | | distance: 1950, |
| | | purpose: 'ææ¯äº¤æµ', |
| | | status: 'completed' |