From 590499fb8423d27eec4f4e3c9c834fc07e7b13fc Mon Sep 17 00:00:00 2001 From: ylj20011123 Date: Mon, 18 Aug 2025 19:09:14 +0800 Subject: [PATCH] update --- components/noData.vue | 71 +++ pages.json | 16 + .../attendanceStatus/attendanceStatistics.vue | 484 ++++++++++++++++++ pages/attendanceStatus/emergencyEvents.vue | 281 ++++++---- .../emergencyEventsDetail.vue | 68 +-- pages/attendanceStatus/index.vue | 459 ++++++++++------- pages/attendanceStatus/roster.vue | 345 +++++++++++++ pages/index/index.vue | 4 +- static/images/home/lostAndFoundIcon.svg | 15 + .../uni-calendar/uni-calendar-item.vue | 304 +++++------ util/dateTime/index.js | 30 +- 11 files changed, 1592 insertions(+), 485 deletions(-) create mode 100644 components/noData.vue create mode 100644 pages/attendanceStatus/attendanceStatistics.vue create mode 100644 pages/attendanceStatus/roster.vue create mode 100644 static/images/home/lostAndFoundIcon.svg diff --git a/components/noData.vue b/components/noData.vue new file mode 100644 index 0000000..723b001 --- /dev/null +++ b/components/noData.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/pages.json b/pages.json index 9e70dc3..47bc8a9 100644 --- a/pages.json +++ b/pages.json @@ -54,6 +54,22 @@ "enablePullDownRefresh": true, "navigationBarBackgroundColor": "#F5F6F7" } + }, + { + "path": "attendanceStatistics", + "style": { + "navigationBarTitleText": "考勤统计", + "navigationBarBackgroundColor": "#F5F6F7", + "navigationStyle": "custom" + } + }, + { + "path": "roster", + "style": { + "navigationBarTitleText": "排班表", + "navigationBarBackgroundColor": "#F5F6F7", + "navigationStyle": "custom" + } } ] }, diff --git a/pages/attendanceStatus/attendanceStatistics.vue b/pages/attendanceStatus/attendanceStatistics.vue new file mode 100644 index 0000000..d69ea14 --- /dev/null +++ b/pages/attendanceStatus/attendanceStatistics.vue @@ -0,0 +1,484 @@ + + + + + + \ No newline at end of file diff --git a/pages/attendanceStatus/emergencyEvents.vue b/pages/attendanceStatus/emergencyEvents.vue index cae906a..bc01744 100644 --- a/pages/attendanceStatus/emergencyEvents.vue +++ b/pages/attendanceStatus/emergencyEvents.vue @@ -5,28 +5,27 @@ - {{ type === 1 ? item.title || "" : type === 2 ? item.service || "" : "" }} + {{ type === 1 ? item.title || "" : type === 2 ? item.type || "" : "" }} - - {{ item.status === 1 ? '已完成' : item.status === - 2 ? '处理中' : '' }} + {{ item.state }} - {{ item.desc || "" }} + {{ item.sceneOverview || "" }} - {{ item.person }} + {{ item.userName || item.createUserName }} @@ -36,12 +35,13 @@ - {{ item.time }} + {{ item.createTime }} - - + + + 事件片区: - {{ detailObj.area || "" }} + {{ detailObj.belongArea || "" }} 事件概况: - {{ detailObj.desc || "" }} + {{ detailObj.sceneOverview || "" }} 事件损失情况: - {{ detailObj.lossDesc || "" }} + {{ detailObj.lossSituation || "" }} 处理结果: - {{ detailObj.res || "" }} + {{ detailObj.handlingResult || "" }} 事件现场照片: - - - + + + @@ -93,7 +94,7 @@ 事件片区: - {{ detailObj.area || "" }} + {{ detailObj.belongArea || "" }} - - - 3 - 在岗人员 - - - - 4 - 请假人员 - - - - - @@ -92,7 +74,7 @@ 🚨 应急事件 - {{ 2 }} + @@ -103,21 +85,40 @@ ⚠️ 日常问题 - {{ 2 }} + + + + + {{ onDutyPersonList && onDutyPersonList.length > 0 ? onDutyPersonList.length : + 0 }} + + 在岗人员 + + + {{ EmployeesOnLeaveList && EmployeesOnLeaveList.length > 0 ? + EmployeesOnLeaveList.length : 0 }} + 请假人员 + + + + {{ selectTab === 1 ? "👥 当前在岗人员" : selectTab === 2 ? "📋 请假人员列表" : selectTab === 3 ? "👑 值班经理信息" : "" - }} + }} @@ -144,17 +145,16 @@ - {{ item.name ? item.name.slice(0, 1) : "" }} + {{ item.userName ? item.userName.slice(0, 1) : "" }} - {{ item.name || "" }} - {{ item.post || "" }} + {{ item.userName || "" }} + {{ item.userJob }} - 在岗 - 旷工 - 迟到 + {{ item.workType }} + @@ -169,17 +169,15 @@ - {{ item.name ? item.name.slice(0, 1) : "" }} + {{ item.userName ? item.userName.slice(0, 1) : "" }} - {{ item.name || "" }} - {{ item.post || "" }} + {{ item.userName || "" }} + {{ item.userJob || "" }} - 休息 - 调休 - 请假 + {{ item.workType }} @@ -200,7 +198,7 @@ {{ item.name || "" }} - 👑{{ item.post || "" }} + 👑{{ item.post || "-" }} 值班中 @@ -234,20 +232,20 @@ - {{ userDetail.name ? userDetail.name.slice(0, 1) : "" }} + {{ userDetail.userName ? userDetail.userName.slice(0, 1) : "" }} + - {{ userDetail.name || "" }} - {{ userDetail.status === 1 ? '在岗' : - "" }} + {{ userDetail.userName || "" }} + {{ userDetail.workType }} 岗位: - {{ userDetail.post || "" }} + {{ userDetail.userJob || "-" }} 电话: @@ -261,38 +259,37 @@ 当前排班信息: - {{ userDetail.status === 1 ? '班' : userDetail.status === 2 ? - '休' : '' }} + {{ userDetail.workType }} 上班打卡地: - {{ userDetail.dutyPlace || "" }} - + {{ userDetail.dutyClockInPlace || "" }} + 上班打卡时间: - {{ userDetail.dutyTime || "" }} - + {{ userDetail.dutyClockInTime || "" }} + 迟到时长: - {{ userDetail.toLateTime || "" }} - + {{ userDetail.lateNum || "" }} + 下班打卡地: - {{ userDetail.offWorkPlace || "" }} - + {{ userDetail.offDutyClockInPlace || "" }} + 下班打卡时间: - {{ userDetail.offWorkTime || "" }} - + {{ userDetail.offDutyClockInTime || "" }} + 早退时长: - {{ userDetail.earlyWorkTime || "" }} - + {{ userDetail.earlyNum || "" }} + @@ -302,28 +299,28 @@ 当月排班天数: - {{ userDetail.monthDay || "" }} - + {{ userDetail.scheduleTotal || "" }} + 出勤天数: - {{ userDetail.AttendanceDay || "" }} - + {{ userDetail.attendTotal || "" }} + 休息天数: - {{ userDetail.leaveDay || "" }} - + {{ userDetail.restTotal || "" }} + 迟到天数: - {{ userDetail.beLateDay || "" }} - + {{ userDetail.lateTotal || "" }} + 早退天数: - {{ userDetail.leaveEarlyDay || "" }} - + {{ userDetail.earlyTotal || "" }} + @@ -334,6 +331,7 @@ + + + diff --git a/pages/index/index.vue b/pages/index/index.vue index 3431d0a..e924fce 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -303,14 +303,14 @@ - + diff --git a/static/images/home/lostAndFoundIcon.svg b/static/images/home/lostAndFoundIcon.svg new file mode 100644 index 0000000..233002c --- /dev/null +++ b/static/images/home/lostAndFoundIcon.svg @@ -0,0 +1,15 @@ + + + 图标/失物招领_2 + + + + + + + + + + + + \ No newline at end of file diff --git a/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue b/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue index a54135e..12b1951 100644 --- a/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue +++ b/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue @@ -1,187 +1,189 @@ diff --git a/util/dateTime/index.js b/util/dateTime/index.js index 7b2ad60..c42b9ea 100644 --- a/util/dateTime/index.js +++ b/util/dateTime/index.js @@ -3,18 +3,18 @@ export function timestampToTime(timestamp) { const date = new Date(timestamp) //时间戳为10位需*1000,时间戳为13位的话不需乘1000 const Y = date.getFullYear() + '-' const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-' - const D =date.getDate()<10?'0'+date.getDate():date.getDate() + const D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() // const h = date.getHours() + ':' // const m = date.getMinutes() + ':' // const s = date.getSeconds() return Y + M + D } -export function timestampToTimeMonth(timestamp){ +export function timestampToTimeMonth(timestamp) { const date = new Date(timestamp) //时间戳为10位需*1000,时间戳为13位的话不需乘1000 const Y = date.getFullYear() + '-' const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) - const D =date.getDate()<10?'0'+date.getDate():date.getDate() + const D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() // const h = date.getHours() + ':' // const m = date.getMinutes() + ':' // const s = date.getSeconds() @@ -94,10 +94,32 @@ export function formateField(list) { }); return valueNumber.length > 0 ? valueNumber : list; } -export async function getFieldEnum(params){ +export async function getFieldEnum(params) { const data = await request.$webGet(`/EShangApiMain/FrameWork/GetFieldEnumByField`, params); if (data.Result_Code !== 100) { return []; } return data.Result_Data.List; } + + + +export function formatTime(ts) { + let n = Number(ts); + if (!Number.isFinite(n)) return ''; + + // 兼容秒级/毫秒级时间戳 + if (n < 1e12) n *= 1000; + + const d = new Date(n); + const pad = (x) => String(x).padStart(2, '0'); + + const Y = d.getFullYear(); + const M = pad(d.getMonth() + 1); + const D = pad(d.getDate()); + const h = pad(d.getHours()); + const m = pad(d.getMinutes()); + const s = pad(d.getSeconds()); + + return `${Y}-${M}-${D} ${h}:${m}:${s}`; +} \ No newline at end of file