Digital Office Automation System
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <div>
  3. <!-- 范围,地点提示 -->
  4. <div class="location-info">
  5. <div class="location-text">
  6. <em :class="isInRange ? 'text-success' : 'text-error'">
  7. <i :class="isInRange ? 'el-icon-success' : 'el-icon-error'" />
  8. <!-- {{ isInRange ? "已进入打卡范围" : "未进入打卡范围" }} -->
  9. {{ isInRange ? $t("checkin.area.inRange") : $t("checkin.area.outRange") }}
  10. </em>
  11. <span>{{ areaName }}</span>
  12. </div>
  13. </div>
  14. <!-- 调试信息 -->
  15. <p class="coordinate-info">{{ longitude }},{{ latitude }}</p>
  16. </div>
  17. </template>
  18. <script>
  19. export default {
  20. name: "LocationInfo",
  21. props: {
  22. isInRange: {
  23. type: Boolean,
  24. default: false,
  25. },
  26. areaName: {
  27. type: String,
  28. default: "",
  29. },
  30. longitude: {
  31. type: Number,
  32. default: null,
  33. },
  34. latitude: {
  35. type: Number,
  36. default: null,
  37. },
  38. },
  39. };
  40. </script>
  41. <style lang="scss" scoped>
  42. .location-info {
  43. background: white;
  44. margin: 10px auto;
  45. padding: 15px 20px;
  46. border-radius: 12px;
  47. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  48. display: flex;
  49. align-items: center;
  50. max-width: 280px;
  51. }
  52. .text-success {
  53. color: #4caf50;
  54. }
  55. .text-error {
  56. color: #f56c6c;
  57. }
  58. .location-text {
  59. flex: 1;
  60. font-size: 14px;
  61. color: #666;
  62. display: flex;
  63. flex-direction: column;
  64. gap: 6px;
  65. align-items: center;
  66. em {
  67. font-style: normal;
  68. display: flex;
  69. align-items: center;
  70. justify-content: center;
  71. gap: 4px;
  72. font-weight: 600;
  73. i {
  74. font-size: 20px;
  75. }
  76. }
  77. }
  78. .coordinate-info {
  79. text-align: center;
  80. font-size: 12px;
  81. color: #999;
  82. margin: 10px 0;
  83. }
  84. </style>