records.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165
  1. <template>
  2. <view class="page">
  3. <NavBar title="签到记录" :showBack="true">
  4. <template #right>
  5. <view class="nav-action" @click="handleExport">
  6. <view class="export-icon"></view>
  7. </view>
  8. </template>
  9. </NavBar>
  10. <view class="content">
  11. <view class="filter-section">
  12. <view class="filter-row">
  13. <picker
  14. mode="selector"
  15. :range="typeOptions"
  16. range-key="label"
  17. @change="onTypeChange"
  18. >
  19. <view class="filter-item">
  20. <text class="filter-label">{{ currentTypeLabel }}</text>
  21. <view class="filter-arrow"></view>
  22. </view>
  23. </picker>
  24. <picker
  25. mode="date"
  26. :value="filterStartDate"
  27. @change="onStartDateChange"
  28. >
  29. <view class="filter-item">
  30. <text class="filter-label">{{ filterStartDate || '开始日期' }}</text>
  31. <view class="filter-arrow"></view>
  32. </view>
  33. </picker>
  34. <picker
  35. mode="date"
  36. :value="filterEndDate"
  37. @change="onEndDateChange"
  38. >
  39. <view class="filter-item">
  40. <text class="filter-label">{{ filterEndDate || '结束日期' }}</text>
  41. <view class="filter-arrow"></view>
  42. </view>
  43. </picker>
  44. </view>
  45. </view>
  46. <view class="stats-row">
  47. <view class="stats-item">
  48. <text class="stats-value">{{ stats.todayCount }}</text>
  49. <text class="stats-label">今日签到</text>
  50. </view>
  51. <view class="stats-item">
  52. <text class="stats-value">{{ stats.weekCount }}</text>
  53. <text class="stats-label">本周签到</text>
  54. </view>
  55. <view class="stats-item">
  56. <text class="stats-value">{{ stats.monthCount }}</text>
  57. <text class="stats-label">本月签到</text>
  58. </view>
  59. <view class="stats-item warning" v-if="stats.pendingSyncCount > 0">
  60. <text class="stats-value">{{ stats.pendingSyncCount }}</text>
  61. <text class="stats-label">待同步</text>
  62. </view>
  63. </view>
  64. <view class="list-section">
  65. <view class="list-header">
  66. <text class="list-title">签到记录</text>
  67. <text class="list-count">共 {{ total }} 条</text>
  68. </view>
  69. <scroll-view
  70. class="list-scroll"
  71. scroll-y
  72. @scrolltolower="loadMore"
  73. :refresher-enabled="true"
  74. :refresher-triggered="isRefreshing"
  75. @refresherrefresh="onRefresh"
  76. >
  77. <view class="record-list">
  78. <view
  79. class="record-item"
  80. v-for="record in records"
  81. :key="record.id"
  82. @click="viewDetail(record)"
  83. >
  84. <view class="record-left">
  85. <view class="record-type" :class="record.type">
  86. <view class="type-icon"></view>
  87. </view>
  88. </view>
  89. <view class="record-content">
  90. <view class="record-header">
  91. <text class="record-type-name">{{ record.typeName }}</text>
  92. <view class="record-status" :class="record.status">
  93. <text>{{ getStatusText(record.status) }}</text>
  94. </view>
  95. </view>
  96. <view class="record-info">
  97. <view class="info-row">
  98. <view class="info-icon user"></view>
  99. <text class="info-text">{{ record.userName }} ({{ record.userNo }})</text>
  100. </view>
  101. <view class="info-row">
  102. <view class="info-icon location"></view>
  103. <text class="info-text">{{ record.location.address }}</text>
  104. </view>
  105. <view class="info-row">
  106. <view class="info-icon time"></view>
  107. <text class="info-text">{{ formatTime(record.createdAt) }}</text>
  108. </view>
  109. </view>
  110. <view class="record-photos" v-if="record.photos.length > 0">
  111. <image
  112. class="photo-thumb"
  113. v-for="(photo, index) in record.photos.slice(0, 3)"
  114. :key="photo.id"
  115. :src="photo.path"
  116. mode="aspectFill"
  117. />
  118. <view class="photo-more" v-if="record.photos.length > 3">
  119. <text>+{{ record.photos.length - 3 }}</text>
  120. </view>
  121. </view>
  122. <view class="record-remark" v-if="record.remark">
  123. <text>{{ record.remark }}</text>
  124. </view>
  125. </view>
  126. <view class="record-arrow">
  127. <view class="arrow-icon"></view>
  128. </view>
  129. </view>
  130. <view class="empty-state" v-if="!isLoading && records.length === 0">
  131. <view class="empty-icon"></view>
  132. <text class="empty-text">暂无签到记录</text>
  133. </view>
  134. <view class="loading-more" v-if="isLoadingMore">
  135. <view class="loading-spinner"></view>
  136. <text class="loading-text">加载中...</text>
  137. </view>
  138. <view class="no-more" v-if="!hasMore && records.length > 0">
  139. <text>没有更多了</text>
  140. </view>
  141. </view>
  142. </scroll-view>
  143. </view>
  144. </view>
  145. <view class="detail-modal" v-if="showDetail && currentRecord">
  146. <view class="detail-mask" @click="closeDetail"></view>
  147. <view class="detail-content">
  148. <view class="detail-header">
  149. <text class="detail-title">签到详情</text>
  150. <view class="detail-close" @click="closeDetail">
  151. <view class="close-icon"></view>
  152. </view>
  153. </view>
  154. <scroll-view class="detail-body" scroll-y>
  155. <view class="detail-section">
  156. <view class="detail-row">
  157. <text class="detail-label">签到类型</text>
  158. <text class="detail-value">{{ currentRecord.typeName }}</text>
  159. </view>
  160. <view class="detail-row">
  161. <text class="detail-label">签到人员</text>
  162. <text class="detail-value">{{ currentRecord.userName }} ({{ currentRecord.userNo }})</text>
  163. </view>
  164. <view class="detail-row">
  165. <text class="detail-label">签到时间</text>
  166. <text class="detail-value">{{ currentRecord.createdAt }}</text>
  167. </view>
  168. <view class="detail-row" v-if="currentRecord.shopName">
  169. <text class="detail-label">关联门店</text>
  170. <text class="detail-value">{{ currentRecord.shopName }}</text>
  171. </view>
  172. <view class="detail-row" v-if="currentRecord.deviceName">
  173. <text class="detail-label">关联设备</text>
  174. <text class="detail-value">{{ currentRecord.deviceName }}</text>
  175. </view>
  176. </view>
  177. <view class="detail-section">
  178. <view class="section-title">位置信息</view>
  179. <view class="location-map">
  180. <view class="map-placeholder">
  181. <view class="map-icon"></view>
  182. <text class="map-text">{{ currentRecord.location.address }}</text>
  183. <text class="map-coords">{{ currentRecord.location.latitude.toFixed(6) }}, {{ currentRecord.location.longitude.toFixed(6) }}</text>
  184. </view>
  185. </view>
  186. </view>
  187. <view class="detail-section" v-if="currentRecord.photos.length > 0">
  188. <view class="section-title">签到照片</view>
  189. <view class="photo-grid">
  190. <image
  191. class="detail-photo"
  192. v-for="photo in currentRecord.photos"
  193. :key="photo.id"
  194. :src="photo.path"
  195. mode="aspectFill"
  196. @click="previewPhotos(photo.path)"
  197. />
  198. </view>
  199. </view>
  200. <view class="detail-section" v-if="currentRecord.remark">
  201. <view class="section-title">备注信息</view>
  202. <view class="remark-box">
  203. <text>{{ currentRecord.remark }}</text>
  204. </view>
  205. </view>
  206. <view class="detail-section">
  207. <view class="section-title">同步状态</view>
  208. <view class="sync-info">
  209. <view class="sync-status" :class="currentRecord.status">
  210. <view class="status-dot"></view>
  211. <text>{{ getStatusText(currentRecord.status) }}</text>
  212. </view>
  213. <text class="sync-time" v-if="currentRecord.syncedAt">
  214. 同步时间: {{ currentRecord.syncedAt }}
  215. </text>
  216. </view>
  217. </view>
  218. </scroll-view>
  219. </view>
  220. </view>
  221. </view>
  222. </template>
  223. <script setup lang="ts">
  224. import { ref, computed, onMounted } from 'vue';
  225. import { logger } from '@/utils/logger';
  226. import NavBar from '@/components/NavBar.vue';
  227. import { CheckinType, getCheckinList, getCheckinStats, exportCheckinRecords } from '@/api/checkin';
  228. import type { CheckinRecord, CheckinStats } from '@/api/checkin';
  229. const typeOptions = [
  230. { value: '', label: '全部类型' },
  231. { value: CheckinType.INVENTORY_TALLY, label: '理货盘点' },
  232. { value: CheckinType.DELIVERY_REPLENISH, label: '补货确认' }
  233. ];
  234. const filterType = ref('');
  235. const filterStartDate = ref('');
  236. const filterEndDate = ref('');
  237. const records = ref<CheckinRecord[]>([]);
  238. const total = ref(0);
  239. const page = ref(1);
  240. const pageSize = 10;
  241. const isLoading = ref(false);
  242. const isLoadingMore = ref(false);
  243. const isRefreshing = ref(false);
  244. const hasMore = ref(true);
  245. const showDetail = ref(false);
  246. const currentRecord = ref<CheckinRecord | null>(null);
  247. const stats = ref<CheckinStats>({
  248. todayCount: 0,
  249. weekCount: 0,
  250. monthCount: 0,
  251. inventoryTallyCount: 0,
  252. deliveryReplenishCount: 0,
  253. pendingSyncCount: 0
  254. });
  255. const currentTypeLabel = computed(() => {
  256. const option = typeOptions.find(o => o.value === filterType.value);
  257. return option ? option.label : '全部类型';
  258. });
  259. onMounted(() => {
  260. loadData();
  261. loadStats();
  262. });
  263. const loadData = async (reset = false) => {
  264. if (reset) {
  265. page.value = 1;
  266. hasMore.value = true;
  267. }
  268. if (isLoading.value) return;
  269. isLoading.value = true;
  270. try {
  271. const result = await getCheckinList({
  272. page: page.value,
  273. pageSize,
  274. type: filterType.value as CheckinType || undefined,
  275. startDate: filterStartDate.value || undefined,
  276. endDate: filterEndDate.value || undefined
  277. });
  278. if (reset) {
  279. records.value = result.list;
  280. } else {
  281. records.value = [...records.value, ...result.list];
  282. }
  283. total.value = result.total;
  284. hasMore.value = records.value.length < result.total;
  285. } catch (error) {
  286. logger.warn('加载签到记录失败', error);
  287. } finally {
  288. isLoading.value = false;
  289. isRefreshing.value = false;
  290. isLoadingMore.value = false;
  291. }
  292. };
  293. const loadStats = async () => {
  294. try {
  295. stats.value = await getCheckinStats();
  296. } catch (error) {
  297. logger.warn('加载统计数据失败', error);
  298. }
  299. };
  300. const loadMore = () => {
  301. if (!hasMore.value || isLoadingMore.value) return;
  302. isLoadingMore.value = true;
  303. page.value++;
  304. loadData();
  305. };
  306. const onRefresh = () => {
  307. isRefreshing.value = true;
  308. loadData(true);
  309. loadStats();
  310. };
  311. const onTypeChange = (e: any) => {
  312. filterType.value = typeOptions[e.detail.value].value;
  313. loadData(true);
  314. };
  315. const onStartDateChange = (e: any) => {
  316. filterStartDate.value = e.detail.value;
  317. loadData(true);
  318. };
  319. const onEndDateChange = (e: any) => {
  320. filterEndDate.value = e.detail.value;
  321. loadData(true);
  322. };
  323. const getStatusText = (status: string) => {
  324. const statusMap: Record<string, string> = {
  325. pending: '待同步',
  326. synced: '已同步',
  327. failed: '同步失败'
  328. };
  329. return statusMap[status] || status;
  330. };
  331. const formatTime = (timeStr: string) => {
  332. return timeStr.replace('T', ' ').substring(0, 19);
  333. };
  334. const viewDetail = (record: CheckinRecord) => {
  335. currentRecord.value = record;
  336. showDetail.value = true;
  337. };
  338. const closeDetail = () => {
  339. showDetail.value = false;
  340. currentRecord.value = null;
  341. };
  342. const previewPhotos = (current: string) => {
  343. if (!currentRecord.value) return;
  344. uni.previewImage({
  345. urls: currentRecord.value.photos.map(p => p.path),
  346. current
  347. });
  348. };
  349. const handleExport = async () => {
  350. uni.showLoading({ title: '导出中...' });
  351. try {
  352. const url = await exportCheckinRecords({
  353. type: filterType.value as CheckinType || undefined,
  354. startDate: filterStartDate.value || undefined,
  355. endDate: filterEndDate.value || undefined
  356. });
  357. uni.hideLoading();
  358. // #ifdef H5
  359. window.open(url, '_blank');
  360. // #endif
  361. // #ifndef H5
  362. uni.showToast({
  363. title: '导出成功',
  364. icon: 'success'
  365. });
  366. // #endif
  367. } catch (error) {
  368. uni.hideLoading();
  369. uni.showToast({
  370. title: '导出失败',
  371. icon: 'none'
  372. });
  373. }
  374. };
  375. </script>
  376. <style lang="scss" scoped>
  377. .page {
  378. min-height: 100vh;
  379. background: $bg-color-page;
  380. display: flex;
  381. flex-direction: column;
  382. }
  383. .nav-action {
  384. width: 64rpx;
  385. height: 64rpx;
  386. display: flex;
  387. align-items: center;
  388. justify-content: center;
  389. }
  390. .export-icon {
  391. width: 36rpx;
  392. height: 36rpx;
  393. border: 3rpx solid $text-color-primary;
  394. border-radius: 6rpx;
  395. position: relative;
  396. &::before {
  397. content: '';
  398. position: absolute;
  399. top: 50%;
  400. left: 50%;
  401. transform: translate(-50%, -30%);
  402. width: 0;
  403. height: 0;
  404. border-left: 6rpx solid transparent;
  405. border-right: 6rpx solid transparent;
  406. border-bottom: 8rpx solid $text-color-primary;
  407. }
  408. &::after {
  409. content: '';
  410. position: absolute;
  411. bottom: 4rpx;
  412. left: 50%;
  413. transform: translateX(-50%);
  414. width: 12rpx;
  415. height: 3rpx;
  416. background: $text-color-primary;
  417. }
  418. }
  419. .content {
  420. flex: 1;
  421. display: flex;
  422. flex-direction: column;
  423. overflow: hidden;
  424. }
  425. .filter-section {
  426. padding: 16rpx 24rpx;
  427. background: $bg-color-card;
  428. border-bottom: 1rpx solid $border-color;
  429. }
  430. .filter-row {
  431. display: flex;
  432. gap: 16rpx;
  433. }
  434. .filter-item {
  435. flex: 1;
  436. display: flex;
  437. align-items: center;
  438. justify-content: center;
  439. height: 64rpx;
  440. background: $bg-color-page;
  441. border-radius: 12rpx;
  442. padding: 0 16rpx;
  443. &:active {
  444. background: $bg-color-secondary;
  445. }
  446. }
  447. .filter-label {
  448. font-size: 24rpx;
  449. color: $text-color-secondary;
  450. margin-right: 8rpx;
  451. }
  452. .filter-arrow {
  453. width: 0;
  454. height: 0;
  455. border-left: 8rpx solid transparent;
  456. border-right: 8rpx solid transparent;
  457. border-top: 8rpx solid $text-color-muted;
  458. }
  459. .stats-row {
  460. display: flex;
  461. padding: 20rpx 24rpx;
  462. background: $bg-color-card;
  463. border-bottom: 1rpx solid $border-color;
  464. }
  465. .stats-item {
  466. flex: 1;
  467. display: flex;
  468. flex-direction: column;
  469. align-items: center;
  470. &.warning {
  471. .stats-value {
  472. color: $warning-color;
  473. }
  474. }
  475. }
  476. .stats-value {
  477. font-size: 40rpx;
  478. font-weight: 700;
  479. color: $text-color-primary;
  480. margin-bottom: 4rpx;
  481. }
  482. .stats-label {
  483. font-size: 22rpx;
  484. color: $text-color-tertiary;
  485. }
  486. .list-section {
  487. flex: 1;
  488. display: flex;
  489. flex-direction: column;
  490. overflow: hidden;
  491. }
  492. .list-header {
  493. display: flex;
  494. justify-content: space-between;
  495. align-items: center;
  496. padding: 20rpx 24rpx;
  497. }
  498. .list-title {
  499. font-size: 28rpx;
  500. font-weight: 600;
  501. color: $text-color-primary;
  502. }
  503. .list-count {
  504. font-size: 24rpx;
  505. color: $text-color-muted;
  506. }
  507. .list-scroll {
  508. flex: 1;
  509. height: 0;
  510. }
  511. .record-list {
  512. padding: 0 24rpx;
  513. padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
  514. }
  515. .record-item {
  516. display: flex;
  517. align-items: flex-start;
  518. background: $bg-color-card;
  519. border-radius: 16rpx;
  520. padding: 24rpx;
  521. margin-bottom: 16rpx;
  522. border: 1rpx solid $border-color;
  523. &:active {
  524. background: $bg-color-page;
  525. }
  526. }
  527. .record-left {
  528. margin-right: 20rpx;
  529. }
  530. .record-type {
  531. width: 72rpx;
  532. height: 72rpx;
  533. border-radius: 16rpx;
  534. display: flex;
  535. align-items: center;
  536. justify-content: center;
  537. &.inventory_tally {
  538. background: $success-color-bg;
  539. .type-icon {
  540. width: 28rpx;
  541. height: 36rpx;
  542. border: 3rpx solid $primary-color;
  543. border-radius: 4rpx;
  544. }
  545. }
  546. &.delivery_replenish {
  547. background: $accent-color-bg;
  548. .type-icon {
  549. width: 32rpx;
  550. height: 24rpx;
  551. border: 3rpx solid $accent-color;
  552. border-radius: 4rpx;
  553. }
  554. }
  555. }
  556. .record-content {
  557. flex: 1;
  558. min-width: 0;
  559. }
  560. .record-header {
  561. display: flex;
  562. justify-content: space-between;
  563. align-items: center;
  564. margin-bottom: 12rpx;
  565. }
  566. .record-type-name {
  567. font-size: 28rpx;
  568. font-weight: 600;
  569. color: $text-color-primary;
  570. }
  571. .record-status {
  572. padding: 4rpx 12rpx;
  573. border-radius: 8rpx;
  574. font-size: 22rpx;
  575. &.synced {
  576. background: $success-color-bg;
  577. color: $primary-color;
  578. }
  579. &.pending {
  580. background: $warning-color-bg;
  581. color: $warning-color;
  582. }
  583. &.failed {
  584. background: $error-color-bg;
  585. color: $error-color;
  586. }
  587. }
  588. .record-info {
  589. margin-bottom: 12rpx;
  590. }
  591. .info-row {
  592. display: flex;
  593. align-items: center;
  594. margin-bottom: 8rpx;
  595. &:last-child {
  596. margin-bottom: 0;
  597. }
  598. }
  599. .info-icon {
  600. width: 28rpx;
  601. height: 28rpx;
  602. margin-right: 8rpx;
  603. border-radius: 50%;
  604. &.user {
  605. background: $info-color-bg;
  606. position: relative;
  607. &::before {
  608. content: '';
  609. position: absolute;
  610. top: 6rpx;
  611. left: 50%;
  612. transform: translateX(-50%);
  613. width: 8rpx;
  614. height: 8rpx;
  615. background: $info-color;
  616. border-radius: 50%;
  617. }
  618. &::after {
  619. content: '';
  620. position: absolute;
  621. bottom: 6rpx;
  622. left: 50%;
  623. transform: translateX(-50%);
  624. width: 14rpx;
  625. height: 6rpx;
  626. background: $info-color;
  627. border-radius: 6rpx 6rpx 0 0;
  628. }
  629. }
  630. &.location {
  631. background: $success-color-bg;
  632. position: relative;
  633. &::before {
  634. content: '';
  635. position: absolute;
  636. top: 50%;
  637. left: 50%;
  638. transform: translate(-50%, -50%);
  639. width: 8rpx;
  640. height: 8rpx;
  641. background: $primary-color;
  642. border-radius: 50%;
  643. }
  644. &::after {
  645. content: '';
  646. position: absolute;
  647. top: 50%;
  648. left: 50%;
  649. transform: translate(-50%, -50%);
  650. width: 14rpx;
  651. height: 14rpx;
  652. border: 2rpx solid $primary-color;
  653. border-radius: 50%;
  654. }
  655. }
  656. &.time {
  657. background: $primary-color-bg;
  658. position: relative;
  659. &::before {
  660. content: '';
  661. position: absolute;
  662. top: 50%;
  663. left: 50%;
  664. transform: translate(-50%, -50%);
  665. width: 12rpx;
  666. height: 12rpx;
  667. border: 2rpx solid $primary-color;
  668. border-radius: 50%;
  669. }
  670. &::after {
  671. content: '';
  672. position: absolute;
  673. top: 8rpx;
  674. left: 50%;
  675. transform: translateX(-50%);
  676. width: 2rpx;
  677. height: 6rpx;
  678. background: $primary-color;
  679. }
  680. }
  681. }
  682. .info-text {
  683. font-size: 24rpx;
  684. color: $text-color-tertiary;
  685. flex: 1;
  686. overflow: hidden;
  687. text-overflow: ellipsis;
  688. white-space: nowrap;
  689. }
  690. .record-photos {
  691. display: flex;
  692. gap: 8rpx;
  693. margin-bottom: 12rpx;
  694. }
  695. .photo-thumb {
  696. width: 80rpx;
  697. height: 80rpx;
  698. border-radius: 8rpx;
  699. background: $bg-color-secondary;
  700. }
  701. .photo-more {
  702. width: 80rpx;
  703. height: 80rpx;
  704. border-radius: 8rpx;
  705. background: rgba(0, 0, 0, 0.5);
  706. display: flex;
  707. align-items: center;
  708. justify-content: center;
  709. text {
  710. font-size: 24rpx;
  711. color: $bg-color-card;
  712. }
  713. }
  714. .record-remark {
  715. padding: 12rpx;
  716. background: $bg-color-page;
  717. border-radius: 8rpx;
  718. text {
  719. font-size: 24rpx;
  720. color: $text-color-tertiary;
  721. }
  722. }
  723. .record-arrow {
  724. display: flex;
  725. align-items: center;
  726. padding-left: 16rpx;
  727. }
  728. .arrow-icon {
  729. width: 12rpx;
  730. height: 12rpx;
  731. border-top: 3rpx solid $text-color-placeholder;
  732. border-right: 3rpx solid $text-color-placeholder;
  733. transform: rotate(45deg);
  734. }
  735. .empty-state {
  736. display: flex;
  737. flex-direction: column;
  738. align-items: center;
  739. padding: 100rpx 0;
  740. }
  741. .empty-icon {
  742. width: 120rpx;
  743. height: 120rpx;
  744. background: $bg-color-secondary;
  745. border-radius: 50%;
  746. margin-bottom: 24rpx;
  747. position: relative;
  748. &::before {
  749. content: '';
  750. position: absolute;
  751. top: 50%;
  752. left: 50%;
  753. transform: translate(-50%, -50%);
  754. width: 40rpx;
  755. height: 40rpx;
  756. border: 4rpx solid $text-color-placeholder;
  757. border-radius: 8rpx;
  758. }
  759. }
  760. .empty-text {
  761. font-size: 28rpx;
  762. color: $text-color-muted;
  763. }
  764. .loading-more {
  765. display: flex;
  766. align-items: center;
  767. justify-content: center;
  768. padding: 24rpx;
  769. }
  770. .loading-spinner {
  771. width: 32rpx;
  772. height: 32rpx;
  773. border: 3rpx solid $border-color;
  774. border-top-color: $primary-color;
  775. border-radius: 50%;
  776. animation: rotate 0.8s linear infinite;
  777. @keyframes rotate {
  778. from { transform: rotate(0deg); }
  779. to { transform: rotate(360deg); }
  780. }
  781. }
  782. .loading-text {
  783. font-size: 24rpx;
  784. color: $text-color-muted;
  785. margin-left: 12rpx;
  786. }
  787. .no-more {
  788. text-align: center;
  789. padding: 24rpx;
  790. text {
  791. font-size: 24rpx;
  792. color: $text-color-muted;
  793. }
  794. }
  795. .detail-modal {
  796. position: fixed;
  797. top: 0;
  798. left: 0;
  799. right: 0;
  800. bottom: 0;
  801. z-index: 1000;
  802. }
  803. .detail-mask {
  804. position: absolute;
  805. top: 0;
  806. left: 0;
  807. right: 0;
  808. bottom: 0;
  809. background: rgba(0, 0, 0, 0.5);
  810. }
  811. .detail-content {
  812. position: absolute;
  813. bottom: 0;
  814. left: 0;
  815. right: 0;
  816. max-height: 80vh;
  817. background: $bg-color-card;
  818. border-radius: 32rpx 32rpx 0 0;
  819. display: flex;
  820. flex-direction: column;
  821. }
  822. .detail-header {
  823. display: flex;
  824. justify-content: space-between;
  825. align-items: center;
  826. padding: 32rpx;
  827. border-bottom: 1rpx solid $border-color;
  828. }
  829. .detail-title {
  830. font-size: 32rpx;
  831. font-weight: 600;
  832. color: $text-color-primary;
  833. }
  834. .detail-close {
  835. width: 56rpx;
  836. height: 56rpx;
  837. display: flex;
  838. align-items: center;
  839. justify-content: center;
  840. background: $bg-color-secondary;
  841. border-radius: 50%;
  842. }
  843. .close-icon {
  844. width: 20rpx;
  845. height: 20rpx;
  846. position: relative;
  847. &::before, &::after {
  848. content: '';
  849. position: absolute;
  850. top: 50%;
  851. left: 50%;
  852. width: 24rpx;
  853. height: 3rpx;
  854. background: $text-color-tertiary;
  855. border-radius: 2rpx;
  856. }
  857. &::before {
  858. transform: translate(-50%, -50%) rotate(45deg);
  859. }
  860. &::after {
  861. transform: translate(-50%, -50%) rotate(-45deg);
  862. }
  863. }
  864. .detail-body {
  865. flex: 1;
  866. padding: 24rpx 32rpx;
  867. padding-bottom: calc(24rpx + env(safe-area-inset-bottom));
  868. }
  869. .detail-section {
  870. margin-bottom: 32rpx;
  871. }
  872. .detail-row {
  873. display: flex;
  874. justify-content: space-between;
  875. align-items: center;
  876. padding: 16rpx 0;
  877. border-bottom: 1rpx solid $bg-color-secondary;
  878. &:last-child {
  879. border-bottom: none;
  880. }
  881. }
  882. .detail-label {
  883. font-size: 26rpx;
  884. color: $text-color-tertiary;
  885. }
  886. .detail-value {
  887. font-size: 26rpx;
  888. color: $text-color-primary;
  889. font-weight: 500;
  890. }
  891. .section-title {
  892. font-size: 28rpx;
  893. font-weight: 600;
  894. color: $text-color-primary;
  895. margin-bottom: 16rpx;
  896. }
  897. .location-map {
  898. background: $bg-color-page;
  899. border-radius: 16rpx;
  900. overflow: hidden;
  901. }
  902. .map-placeholder {
  903. padding: 32rpx;
  904. display: flex;
  905. flex-direction: column;
  906. align-items: center;
  907. }
  908. .map-icon {
  909. width: 48rpx;
  910. height: 48rpx;
  911. background: $primary-color;
  912. border-radius: 50%;
  913. margin-bottom: 16rpx;
  914. position: relative;
  915. &::before {
  916. content: '';
  917. position: absolute;
  918. top: 50%;
  919. left: 50%;
  920. transform: translate(-50%, -50%);
  921. width: 16rpx;
  922. height: 16rpx;
  923. background: $bg-color-card;
  924. border-radius: 50%;
  925. }
  926. }
  927. .map-text {
  928. font-size: 26rpx;
  929. color: $text-color-primary;
  930. text-align: center;
  931. margin-bottom: 8rpx;
  932. }
  933. .map-coords {
  934. font-size: 22rpx;
  935. color: $text-color-muted;
  936. }
  937. .photo-grid {
  938. display: flex;
  939. flex-wrap: wrap;
  940. gap: 12rpx;
  941. }
  942. .detail-photo {
  943. width: calc(33.33% - 8rpx);
  944. aspect-ratio: 1;
  945. border-radius: 12rpx;
  946. background: $bg-color-secondary;
  947. }
  948. .remark-box {
  949. padding: 20rpx;
  950. background: $bg-color-page;
  951. border-radius: 12rpx;
  952. text {
  953. font-size: 26rpx;
  954. color: $text-color-secondary;
  955. line-height: 1.6;
  956. }
  957. }
  958. .sync-info {
  959. display: flex;
  960. align-items: center;
  961. }
  962. .sync-status {
  963. display: flex;
  964. align-items: center;
  965. padding: 8rpx 16rpx;
  966. border-radius: 12rpx;
  967. &.synced {
  968. background: $success-color-bg;
  969. .status-dot {
  970. background: $primary-color;
  971. }
  972. text {
  973. color: $primary-color;
  974. }
  975. }
  976. &.pending {
  977. background: $warning-color-bg;
  978. .status-dot {
  979. background: $warning-color;
  980. }
  981. text {
  982. color: $warning-color;
  983. }
  984. }
  985. &.failed {
  986. background: $error-color-bg;
  987. .status-dot {
  988. background: $error-color;
  989. }
  990. text {
  991. color: $error-color;
  992. }
  993. }
  994. }
  995. .status-dot {
  996. width: 12rpx;
  997. height: 12rpx;
  998. border-radius: 50%;
  999. margin-right: 8rpx;
  1000. }
  1001. .sync-time {
  1002. font-size: 24rpx;
  1003. color: $text-color-muted;
  1004. margin-left: 16rpx;
  1005. }
  1006. </style>