checkIn.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. <template>
  2. <view class="attendance-page">
  3. <view class="header">
  4. <text class="title">我的考勤记录</text>
  5. <picker mode="selector" :range="timeRanges" @change="onTimeRangeChange">
  6. <view class="picker">
  7. {{ selectedTimeRange }}/切换
  8. </view>
  9. </picker>
  10. </view>
  11. <!-- 今日签到信息区域 -->
  12. <!-- <view class="todayCheckIn" :class="{ 'show': shouldShow }"> -->
  13. <view class="todayCheckIn" v-if="todayInfoShow">
  14. <view class="check-in-container">
  15. <text class="todayAttTitle">今日签到信息</text>
  16. <view class="info-row">
  17. <view>
  18. <text class="ygoa-icon icon-date"></text>
  19. <text class="value">日期:</text>
  20. </view>
  21. <text class="label">{{ todayData.day }}</text>
  22. </view>
  23. <view class="info-row">
  24. <view>
  25. <text class="ygoa-icon icon-day"></text>
  26. <text class="value">晨签时间:</text>
  27. </view>
  28. <text class="label">{{ todayData.startTime || '未打卡' }} </text>
  29. </view>
  30. <view class="info-row">
  31. <view>
  32. <text class="ygoa-icon icon-night"></text>
  33. <text class="value">晚签时间:</text>
  34. </view>
  35. <text class="label">{{ todayData.endTime || '未打卡' }} </text>
  36. </view>
  37. </view>
  38. <!-- 分界线 -->
  39. <view class="divider"></view>
  40. <!-- 打卡记录 -->
  41. <view class="container">
  42. <view class="header">
  43. <text class="clockRecordTitle">打卡记录</text>
  44. </view>
  45. <view class="content" style="height: 41vh;">
  46. <z-paging :fixed="false" :default-page-size="pSize" default-page-no="1" @query="queryData"
  47. ref="paging">
  48. <view class="clockRecord" v-for="clockRecord in clockRecords" :key="clockRecord.date">
  49. <text class="date">{{ clockRecord.date }}</text>
  50. <view class="shifts">
  51. <view class="shift">
  52. <text class="shift-label">晨签:</text>
  53. <text class="shift-time">{{ clockRecord.morning||'没有该记录'}}</text>
  54. </view>
  55. <view class="shift">
  56. <text class="shift-label">晚签:</text>
  57. <text class="shift-time">{{ clockRecord.evening ||'没有该记录'}}</text>
  58. </view>
  59. </view>
  60. </view>
  61. </z-paging>
  62. </view>
  63. </view>
  64. <!-- 日历板块 -->
  65. <!-- <template>
  66. <view class="calendar-content" >
  67. <view>
  68. <uni-calendar class="uni-calendar--hook" :selected="selected" :showMonth="true" @change="change"
  69. @monthSwitch="monthSwitch" />
  70. </view>
  71. </view>
  72. </template> -->
  73. </view>
  74. <!-- 周,月数据统计区域 -->
  75. <view class="statistics" v-if="chartShow">
  76. <view class="statistic-card">
  77. <view class="statistic-title">{{ selectedTimeRange }}考勤统计</view>
  78. <view class="statistic-item">
  79. <view>
  80. <text class="ygoa-icon icon-attendance"></text>
  81. <text class="label">出勤:</text>
  82. </view>
  83. <text class="value">{{ attendanceCount }}</text>
  84. </view>
  85. <view class="statistic-item">
  86. <view>
  87. <text class="ygoa-icon icon-goOut"></text>
  88. <text class="label">外出:</text>
  89. </view>
  90. <text class="value">{{ goOutCount }}</text>
  91. </view>
  92. <view class="statistic-item">
  93. <view>
  94. <text class="ygoa-icon icon-late"></text>
  95. <text class="label">迟到:</text>
  96. </view>
  97. <text class="value">{{ lateCount }}</text>
  98. </view>
  99. <view class="statistic-item">
  100. <view>
  101. <text class="ygoa-icon icon-leaveEarly"></text>
  102. <text class="label">早退:</text>
  103. </view>
  104. <text class="value">{{ leaveEarlyCount }}</text>
  105. </view>
  106. <view class="statistic-item">
  107. <view>
  108. <text class="ygoa-icon icon-absenteeism"></text>
  109. <text class="label">缺勤:</text>
  110. </view>
  111. <text class="value">{{ absenteeismCount }}</text>
  112. </view>
  113. </view>
  114. </view>
  115. <!-- 图表区域 -->
  116. <view class="chart-container" v-if="chartShow">
  117. <view class="">
  118. <text class="chart-title">考勤趋势图</text>
  119. <view class="charts-box">
  120. <qiun-data-charts :type="chartsType" :opts="opts" :chartData="chartData" />
  121. </view>
  122. </view>
  123. </view>
  124. </view>
  125. </template>
  126. <script setup lang="ts">
  127. import {
  128. ref,
  129. onMounted,
  130. reactive
  131. } from 'vue';
  132. import {
  133. checkAttendance,
  134. getMyTotalCount,
  135. getMyQDQtAttendance
  136. } from '@/api/mine.js'
  137. import {
  138. useUserStore
  139. } from '@/store/user.js';
  140. const userStore = useUserStore();
  141. // 创建一个响应式对象记录今天的考勤数据
  142. const todayData = reactive({
  143. day: '', // 当前日期
  144. startTime: '', // 晨签到时间
  145. endTime: '', // 晚签到时间
  146. })
  147. //日历表数据
  148. // const showCalendar = ref(true)
  149. // const selected = ref([{
  150. // date: getDate(new Date(), -3).fullDate,
  151. // info: '打卡'
  152. // },
  153. // {
  154. // date: getDate(new Date(), -2).fullDate,
  155. // info: '签到',
  156. // data: {
  157. // custom: '自定义信息',
  158. // name: '自定义消息头'
  159. // }
  160. // },
  161. // {
  162. // date: '2024-12-09',
  163. // info: '已打卡'
  164. // }
  165. // ])
  166. // function getDate(date, AddDayCount = 0) {
  167. // if (!date) {
  168. // date = new Date()
  169. // }
  170. // if (typeof date !== 'object') {
  171. // date = date.replace(/-/g, '/')
  172. // }
  173. // const dd = new Date(date)
  174. // dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
  175. // const y = dd.getFullYear()
  176. // const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
  177. // const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
  178. // return {
  179. // fullDate: y + '-' + m + '-' + d,
  180. // year: y,
  181. // month: m,
  182. // date: d,
  183. // day: dd.getDay()
  184. // }
  185. // }
  186. // 控制今日签到信息和图表显示的状态
  187. const todayInfoShow = ref(true) // 今日签到信息是否显示
  188. const chartShow = ref(false) // 图表是否显示
  189. // 图表类型的响应式引用
  190. const chartsType = ref('')
  191. // 图表要填充的数据
  192. const chartData = ref({})
  193. // 图表配置选项
  194. const opts = ref({
  195. color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
  196. "#ea7ccc"
  197. ], // 设定图表颜色
  198. padding: [15, 15, 0, 5],
  199. enableScroll: false, // 禁用滚动
  200. legend: {}, // 图例设置
  201. xAxis: {
  202. disableGrid: true // 禁用网格线
  203. },
  204. yAxis: {
  205. data: [{
  206. min: 0 // y轴最小值
  207. }]
  208. },
  209. extra: {
  210. column: {
  211. type: "group",
  212. width: 30,
  213. activeBgColor: "#000000",
  214. activeBgOpacity: 0.08
  215. }
  216. }
  217. });
  218. // 时间范围选择数组
  219. const timeRanges = ref(['日', '周', '月']);
  220. const selectedTimeRange = ref('日'); // 初始化选择的时间范围为“日”
  221. // 考勤相关统计数据
  222. const attendanceCount = ref(0); // 出勤次数
  223. const goOutCount = ref(0); // 外出次数
  224. const lateCount = ref(0); // 迟到次数
  225. const leaveEarlyCount = ref(0); // 早退次数
  226. const absenteeismCount = ref(0); // 缺勤次数
  227. //用户id
  228. const userId = userStore.user.useId; //拿到用户id
  229. //当前周的周一日期
  230. const thisMondayDate = ref('');
  231. onMounted(() => {
  232. initAttData(); //初始化日考勤数据
  233. });
  234. //初始化考勤数据
  235. function initAttData() {
  236. const nowDate = new Date();
  237. todayData.day = formatDate(nowDate);
  238. getthisMondayDate(nowDate);
  239. getDayAttData();
  240. }
  241. //格式化日期
  242. function formatDate(date) {
  243. const year = date.getFullYear(); // 获取年份
  244. const month = date.getMonth() + 1; // 获取月份
  245. const day = date.getDate(); // 获取日期
  246. // 格式化月份和日期为两位数
  247. const formattedMonth = month < 10 ? '0' + month : month;
  248. const formattedDay = day < 10 ? '0' + day : day;
  249. return `${year}-${formattedMonth}-${formattedDay}`;
  250. }
  251. //获取日考勤数据
  252. function getDayAttData() {
  253. const params = {
  254. universalid: userId,
  255. rizi: todayData.day
  256. }
  257. checkAttendance(params).then(res => {
  258. if ("success" == res.returnMsg) {
  259. const attList = res.returnParams.list;
  260. const time1 = attList.find(item => item.att_type_id === '1');
  261. const time2 = attList.filter(item => item.att_type_id === '2').pop();
  262. if (time1 !== undefined) {
  263. todayData.startTime = time1.att_time.split(' ')[1];
  264. // todayData.status = '早签完成'
  265. }
  266. if (time2 !== undefined) {
  267. todayData.endTime = time2.att_time.split(' ')[1];
  268. // todayData.status = '晚签完成'
  269. }
  270. }
  271. })
  272. }
  273. const paging = ref(null)
  274. const pSize = ref(5)
  275. function complete(list, total, pageNo) {
  276. if (pageNo == 1) {
  277. paging.value.complete(list);
  278. return
  279. }
  280. // 防止重复获取最后一次信息
  281. if (pSize.value * pageNo < total) {
  282. paging.value.complete(list)
  283. } else {
  284. paging.value.complete([])
  285. }
  286. }
  287. //日考勤历史记录
  288. const clockRecords = ref([])
  289. const totalPage = ref(0)
  290. //获取日考勤历史(下拉刷新)
  291. function getDayAttHistory() {
  292. const params = {
  293. type: 1, //不设时间区间
  294. universalid: userId,
  295. ks_att_time: '',
  296. js_att_time: '',
  297. pSize: pSize.value,
  298. p: 1
  299. }
  300. getMyQDQtAttendance(params).then(({ returnParams }) => {
  301. totalPage.value = Math.ceil(returnParams.total / pSize.value)
  302. const list = returnParams.list.map(item => {
  303. return {
  304. date: item.att_date.substring(0, 10),
  305. morning: item.time.split(',')[item.type.split(',').indexOf("1")],
  306. evening: item.time.split(',')[item.type.split(',').indexOf("2")],
  307. }
  308. });
  309. clockRecords.value = list;
  310. complete(clockRecords.value, returnParams.total, returnParams.current)
  311. })
  312. }
  313. // 刷新
  314. function queryData(pageNo, pSize, queryType) {
  315. switch (queryType) {
  316. case 0: // 下拉刷新
  317. case 1: // 初始加载
  318. getDayAttHistory()
  319. break
  320. case 3: // 上拉加载
  321. scrollQuery(pageNo, pSize)
  322. break
  323. default: // 默认刷新
  324. getDayAttHistory()
  325. break
  326. }
  327. }
  328. //上拉加载事件
  329. function scrollQuery(pageNo, pSize) {
  330. const params = {
  331. type: 1, //不设时间区间
  332. universalid: userId,
  333. ks_att_time: '',
  334. js_att_time: '',
  335. pSize: pSize,
  336. p: pageNo
  337. }
  338. getMyQDQtAttendance(params).then(({ returnParams }) => {
  339. const list = returnParams.list.map(item => {
  340. return {
  341. date: item.att_date.substring(0, 10),
  342. morning: item.time.split(',')[item.type.split(',').indexOf("1")],
  343. evening: item.time.split(',')[item.type.split(',').indexOf("2")],
  344. }
  345. });
  346. // clockRecords.value.push(...list);
  347. // complete(list,returnParams.total,pageNo)
  348. if (pageNo <= totalPage.value) {
  349. clockRecords.value.push(...list);
  350. }
  351. complete(list, returnParams.total, pageNo)
  352. })
  353. }
  354. // 时间范围切换事件
  355. function onTimeRangeChange(event) {
  356. const selectedIndex = event.detail.value;
  357. selectedTimeRange.value = timeRanges.value[selectedIndex]; // 设置选择的时间范围(日周月)
  358. // fetchAttendanceData(); // 获取考勤数据
  359. // 根据选择的时间范围更新展示内容
  360. switch (selectedTimeRange.value) {
  361. case '日':
  362. getDayAttData();
  363. showDay(); // 显示今日考勤
  364. break;
  365. case '周':
  366. chartsType.value = 'pie'; // 设置图表类型为饼图
  367. fetchWeekAttData().then(message => {
  368. console.log(message);
  369. showWeekAndMonth();
  370. updateChart(message);
  371. })
  372. .catch(error => {
  373. console.error(error); // 如果失败,打印错误消息
  374. });
  375. break;
  376. case '月':
  377. chartsType.value = 'column'; // 设置图表类型为柱状图
  378. fetchMonthAttData().then(message => {
  379. console.log('message', message);
  380. showWeekAndMonth();
  381. updateChart(message);
  382. })
  383. .catch(error => {
  384. console.error(error); // 如果失败,打印错误消息
  385. });
  386. break;
  387. }
  388. };
  389. // 显示今日考勤数据
  390. function showDay() {
  391. todayInfoShow.value = true; // 显示今日签到信息
  392. chartShow.value = false; // 隐藏图表
  393. }
  394. // 显示周或者月考勤
  395. function showWeekAndMonth() {
  396. todayInfoShow.value = false; // 隐藏今日签到信息
  397. chartShow.value = true; // 显示图表
  398. }
  399. //计算本周周一日期
  400. function getthisMondayDate(today) {
  401. const dayOfWeek = today.getDay(); // 0 (周日) 到 6 (周六)
  402. const dayOfMonth = today.getDate();
  403. // 计算本周周一的日期
  404. const offset = dayOfWeek === 0 ? -6 : 1; // 如果今天是周日,则偏移量为-6,否则为1
  405. const thisMonday = new Date(today);
  406. thisMonday.setDate(dayOfMonth - dayOfWeek + offset);
  407. thisMondayDate.value = formatDate(thisMonday);
  408. }
  409. //获取周考勤记录
  410. function fetchWeekAttData() {
  411. return new Promise((resolve, reject) => {
  412. const params = {
  413. staffId: userId,
  414. start_date: thisMondayDate.value,
  415. end_date: todayData.day
  416. }
  417. getMyTotalCount(params).then(res => {
  418. const myWeekAttData = res.returnParams;
  419. const mockData = {
  420. series: [{
  421. data: [{
  422. "name": "出勤",
  423. "value": myWeekAttData.type0,
  424. "labelText": "出勤:" + myWeekAttData.type0 + "次"
  425. },
  426. {
  427. "name": "外出",
  428. "value": myWeekAttData.type1
  429. },
  430. {
  431. "name": "公休",
  432. "value": myWeekAttData.type2
  433. },
  434. {
  435. "name": "未排班",
  436. "value": myWeekAttData.type3,
  437. },
  438. {
  439. "name": "迟到",
  440. "value": myWeekAttData.type4
  441. },
  442. {
  443. "name": "早退",
  444. "value": myWeekAttData.type5
  445. },
  446. {
  447. "name": "缺勤",
  448. "value": myWeekAttData.type6
  449. }
  450. ]
  451. }],
  452. };
  453. const weekData = mockData.series[0].data;
  454. attendanceCount.value = weekData[0].value;
  455. goOutCount.value = weekData[2].value;
  456. lateCount.value = weekData[4].value;
  457. leaveEarlyCount.value = weekData[5].value;
  458. absenteeismCount.value = weekData[6].value;
  459. resolve(mockData)
  460. }).catch(error => {
  461. reject(error)
  462. })
  463. })
  464. }
  465. // 获取月考勤记录
  466. function fetchMonthAttData() {
  467. return new Promise((resolve, reject) => {
  468. const weekNodeList = [];
  469. weekNodeList.unshift(thisMondayDate.value, todayData.day);
  470. while (weekNodeList.length !== 8) {
  471. const weekNode = getOneDaysAgo(weekNodeList[0]);
  472. weekNodeList.unshift(weekNode);
  473. weekNodeList.unshift(getSixDaysAgo(weekNode));
  474. }
  475. const data1 = [];
  476. const data2 = [];
  477. const data3 = [];
  478. const dataFetchPromises = []; // 存储所有数据请求的promise
  479. for (let i = 0; i < weekNodeList.length - 1; i += 2) {
  480. const params = {
  481. staffId: userId,
  482. start_date: weekNodeList[i],
  483. end_date: weekNodeList[i + 1]
  484. };
  485. const fetchPromise = getMyTotalCount(params).then(res => {
  486. // for (const type in res.returnParams) {
  487. // console.log('type', type);
  488. // }
  489. console.log('res.returnParams', res.returnParams);
  490. data1.push(res.returnParams.type0);
  491. data2.push(res.returnParams.type1);
  492. data3.push(res.returnParams.type4);
  493. });
  494. dataFetchPromises.push(fetchPromise);
  495. }
  496. // 等待所有数据请求完成
  497. Promise.all(dataFetchPromises).then(() => {
  498. const params = {
  499. staffId: userId,
  500. start_date: weekNodeList[0],
  501. end_date: weekNodeList[weekNodeList.length - 1]
  502. };
  503. return getMyTotalCount(params);
  504. }).then(res => {
  505. const myMonthAttData = res.returnParams;
  506. attendanceCount.value = myMonthAttData.type0;
  507. goOutCount.value = myMonthAttData.type2;
  508. lateCount.value = myMonthAttData.type4;
  509. leaveEarlyCount.value = myMonthAttData.type5;
  510. absenteeismCount.value = myMonthAttData.type6;
  511. const mockData = {
  512. categories: ["第1周", "第2周", "第3周", "第4周"],
  513. series: [{
  514. name: "出勤",
  515. data: data1
  516. }, {
  517. name: "出差",
  518. data: data2
  519. }, {
  520. name: "迟到",
  521. data: data3
  522. }]
  523. };
  524. // console.log(data1); // 打印data1检查内容
  525. resolve(mockData);
  526. }).catch(error => {
  527. reject(error);
  528. });
  529. });
  530. }
  531. //获取六天前的日期
  532. function getSixDaysAgo(dateStr) {
  533. const date = new Date(dateStr);
  534. date.setDate(date.getDate() - 6);
  535. return date.toISOString().split('T')[0]; // 返回格式为'YYYY-MM-DD'的字符串
  536. }
  537. //获取一天前的日期
  538. function getOneDaysAgo(dateStr) {
  539. const date = new Date(dateStr);
  540. date.setDate(date.getDate() - 1);
  541. return date.toISOString().split('T')[0]; // 返回格式为'YYYY-MM-DD'的字符串
  542. }
  543. // 更新图表数据
  544. function updateChart(res) {
  545. chartData.value = JSON.parse(JSON.stringify(res)); // 更新图表数据
  546. }
  547. </script>
  548. <style lang="scss" scoped>
  549. @import "@/static/font/ygoa/iconfont.css";
  550. .ygoa-icon {
  551. margin-right: 0.5rem;
  552. font-size: 2.1rem;
  553. vertical-align: middle;
  554. /* 确保图标与文本竖直居中 */
  555. }
  556. .attendance-page {
  557. padding: 20px;
  558. background-color: #f9f9f9;
  559. .calendar-content{
  560. margin: -20px;
  561. margin-top: 20px;
  562. }
  563. }
  564. .header {
  565. display: flex;
  566. justify-content: space-between;
  567. align-items: center;
  568. margin-bottom: 20px;
  569. .clockRecordTitle {
  570. font-size: 1.25rem;
  571. margin: auto;
  572. }
  573. }
  574. .title {
  575. font-size: 24px;
  576. font-weight: bold;
  577. color: #333;
  578. }
  579. .picker {
  580. border: 1px solid #3498db;
  581. border-radius: 5px;
  582. padding: 10px;
  583. background-color: #ecf6fc;
  584. color: #3498db;
  585. }
  586. .statistics {
  587. // display: flex;
  588. justify-content: center;
  589. }
  590. .statistic-card {
  591. background: white;
  592. border-radius: 10px;
  593. padding: 20px;
  594. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  595. /* width: 100%; */
  596. max-width: 600px;
  597. }
  598. .statistic-title {
  599. text-align: center;
  600. font-size: 20px;
  601. font-weight: bold;
  602. color: #333;
  603. }
  604. .statistic-item {
  605. display: flex;
  606. justify-content: space-between;
  607. border-bottom: 1px solid #eee;
  608. padding: 10px 0;
  609. }
  610. .label {
  611. color: #666;
  612. }
  613. .value {
  614. font-size: 18px;
  615. font-weight: bold;
  616. color: #333;
  617. }
  618. .value,
  619. .label {
  620. line-height: 50rpx;
  621. /* 与图标高度一致,确保垂直对齐 */
  622. }
  623. .chart-container {
  624. margin-top: 20px;
  625. }
  626. .chart-title {
  627. font-size: 20px;
  628. font-weight: bold;
  629. text-align: center;
  630. margin-bottom: 10px;
  631. color: #333;
  632. }
  633. .charts-box {
  634. width: 100%;
  635. height: 300px;
  636. }
  637. .todayCheckIn {
  638. background-color: #ffffff;
  639. padding: 20px;
  640. margin: auto -20px;//抵消父级padding
  641. box-sizing: border-box;
  642. border-radius: 10px;
  643. box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  644. }
  645. .check-in-container {
  646. width: 100%;
  647. height: 100%;
  648. display: flex;
  649. flex-direction: column;
  650. align-items: center;
  651. justify-content: center;
  652. }
  653. .todayAttTitle {
  654. font-size: 22px;
  655. font-weight: bold;
  656. margin-bottom: 20px;
  657. }
  658. .info-row {
  659. width: 100%;
  660. display: flex;
  661. align-items: center;
  662. justify-content: space-between;
  663. margin-bottom: 10px;
  664. }
  665. .icon {
  666. width: 50rpx;
  667. height: 50rpx;
  668. margin-right: 20rpx;
  669. vertical-align: middle;
  670. /* 确保图标与文本竖直居中 */
  671. }
  672. .clockRecord {
  673. margin-bottom: 20px;
  674. padding: 10px;
  675. border: 1px solid #ccc;
  676. border-radius: 8px;
  677. }
  678. .date {
  679. font-size: 16px;
  680. font-weight: bold;
  681. margin-bottom: 5px;
  682. }
  683. .name {
  684. font-size: 14px;
  685. color: #666;
  686. margin-bottom: 10px;
  687. }
  688. .divider {
  689. border-bottom: 5px dashed #ccc; //虚线
  690. margin: 10px 0;
  691. }
  692. .shift-label {
  693. font-size: 14px;
  694. color: #333;
  695. }
  696. .shift-time {
  697. font-size: 14px;
  698. color: #333;
  699. }
  700. </style>