siteList.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <view class="site-item" @click.stop="openSite(info)">
  3. <view class="site-name">{{info.locationName}}</view>
  4. <view class="site-info">
  5. <view class="site-left">
  6. <!-- class="one-row" -->
  7. <text class="">{{`${info.provinceName}${info.cityName}${info.areaName}${info.address}`}}</text>
  8. <text class="site-distance">距离{{getDistance(info.distance)}}</text>
  9. </view>
  10. <view class="site-right">
  11. <view class="site-btn" @click.stop="getPhoneCall(info.mapContactList)">
  12. <view class="site-icon">
  13. <svg t="1733972888261" class="icon" viewBox="0 0 1024 1024" version="1.1"
  14. xmlns="http://www.w3.org/2000/svg" p-id="4331" xmlns:xlink="http://www.w3.org/1999/xlink">
  15. <path
  16. d="M575.7 647.1l69.4-69.2 13.3 2.3c1.7 0.3 4.9 0.9 9.4 1.7 7.4 1.3 15.7 2.9 24.6 4.5 25.5 4.8 50.9 9.8 74.8 14.9 17.3 3.7 33.1 7.3 47 10.7 27.6 6.8 47.3 12.9 59.1 18.6 43 20.8 60 65.5 53.4 122-9.7 81.3-97 174.3-204.4 175.4-121 1.2-291.4-87.7-411.9-214.7C165.3 560.4 81.8 406.9 98 278.3c8.5-67.1 40.2-115.9 87.8-147.2 32.4-21.3 69.4-32.5 97.9-34.6 38.2-2.8 69.6 9.6 92.5 38 9.7 12 19.7 36.1 32.2 73.3 3.6 10.9 7.4 22.8 11.3 35.4 7 23 14.1 47.6 20.9 72.2 2.4 8.6 4.5 16.6 6.4 23.7 1.1 4.3 2 7.4 2.4 9.1l3.7 14.2-80.4 81.8c44.5 89 122.6 169.8 203 202.9z m13.5 60l-15.3-5.1c-105.4-35.6-205.4-139.4-256.3-252.3l-7.3-16.2 85-86.4c-1.5-5.6-3.1-11.6-4.9-17.9-6.6-24.1-13.5-48.2-20.4-70.7-3.8-12.3-7.4-23.7-10.9-34.2-10.2-30.5-19.1-52-23.3-57.2-11.8-14.6-26.4-20.4-48.2-18.8-20.2 1.5-48.7 10.1-73.1 26.2-35.2 23.2-58.3 58.6-64.8 110.3-13.8 108.7 63.1 250.2 198.4 392.7C459.5 794.9 617 877 721.8 876c79.2-0.8 146.4-72.5 153.2-129.4 4.3-36.6-4.3-59.4-24.4-69.1-7.5-3.6-24.7-8.9-48.9-14.9-13.4-3.3-28.6-6.8-45.4-10.4-23.3-5-48.4-10-73.5-14.7-7.2-1.3-13.9-2.6-20.1-3.7l-73.5 73.3z"
  17. p-id="4332">
  18. </path>
  19. </svg>
  20. </view>
  21. <text class="site-text">电话</text>
  22. </view>
  23. <view class="site-btn" @click.stop="openLocation(info)">
  24. <view class="site-icon">
  25. <svg t="1733972953937" class="icon" viewBox="0 0 1024 1024" version="1.1"
  26. xmlns="http://www.w3.org/2000/svg" p-id="8440" xmlns:xlink="http://www.w3.org/1999/xlink">
  27. <path
  28. d="M894.185422 128.023792 129.814578 445.743994 445.99982 577.744353 571.860343 893.929596Z"
  29. p-id="8441"></path>
  30. </svg>
  31. </view>
  32. <text class="site-text">导航</text>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="site-time">
  37. <text class="time-lable">办公时间</text>
  38. <view class="site-time-val">
  39. <view class="" v-for="item in getVal(info.workTimeRemark)">
  40. {{ item }}
  41. </view>
  42. </view>
  43. </view>
  44. <telList ref="telListRef" />
  45. </view>
  46. </template>
  47. <script>
  48. import { distanceCalculate, getMapLocation } from "@/utils/tool.js";
  49. import { openMap } from "@/utils/openApp.js"
  50. import { EventBus } from "@/utils/vueBus.js"
  51. import telList from "./telList.vue"
  52. import map from "./../map.js"
  53. export default {
  54. mixins: [map],
  55. props: {
  56. info: {
  57. type: Object,
  58. require: true,
  59. default: () => {}
  60. }
  61. },
  62. components: { telList },
  63. data() {
  64. return {
  65. // outerPhone
  66. }
  67. },
  68. mounted() {
  69. },
  70. methods: {
  71. getDistance(num) {
  72. return distanceCalculate(num)
  73. },
  74. getPhoneCall(tel) {
  75. this.$refs.telListRef.open({ tel })
  76. },
  77. openLocation(info) {
  78. const { areaCode, cityCode, provinceCode, provinceName, cityName, areaName, address } = info
  79. const name = `${provinceName}${cityName}${areaName}${address}`;
  80. const code = areaCode || cityCode || provinceCode
  81. openMap({ name, code: code, type: "baidu" })
  82. },
  83. openSite(info) {
  84. this.$emit('checkSiteDetails', info)
  85. // EventBus.$emit('TianDiTuSite', info)
  86. }
  87. }
  88. }
  89. </script>
  90. <style lang="scss" scoped>
  91. .site-item {
  92. width: 100%;
  93. padding: 20rpx;
  94. // background-color: #f7f7f7;
  95. border-bottom: 10rpx solid #f7f7f7;
  96. // box-shadow: 1px 1px 1px 1px #ccc;
  97. // background-color: #ccc;
  98. .site-name {
  99. padding-top: 30rpx;
  100. font-size: 36rpx;
  101. padding-bottom: 15rpx;
  102. background-color: #fff;
  103. }
  104. .site-info {
  105. background-color: #fff;
  106. display: flex;
  107. justify-content: space-between;
  108. align-items: center;
  109. .site-left {
  110. width: 1px;
  111. flex: 1;
  112. display: flex;
  113. flex-direction: column;
  114. font-size: 28rpx;
  115. padding-bottom: 15rpx;
  116. .site-distance {
  117. color: #7D7D7D;
  118. }
  119. }
  120. .site-right {
  121. flex-shrink: 0;
  122. display: flex;
  123. align-items: center;
  124. .site-btn {
  125. margin-left: 10rpx;
  126. display: flex;
  127. flex-direction: column;
  128. align-items: center;
  129. .site-icon {
  130. width: 50rpx;
  131. height: 50rpx;
  132. line-height: 1;
  133. border-radius: 50%;
  134. background-color: #3291F8;
  135. display: flex;
  136. align-items: center;
  137. justify-content: center;
  138. }
  139. .icon {
  140. width: 30rpx;
  141. height: 30rpx;
  142. path {
  143. fill: #fff;
  144. }
  145. }
  146. .site-text {
  147. font-size: 28rpx;
  148. }
  149. }
  150. }
  151. }
  152. .site-time {
  153. background-color: #fff;
  154. border-top: 1rpx solid #F0F0F0;
  155. padding: 15rpx 0;
  156. display: flex;
  157. justify-content: space-between;
  158. font-size: 28rpx;
  159. text {
  160. flex-shrink: 0;
  161. }
  162. .time-lable {
  163. color: #7D7D7D;
  164. }
  165. .site-time-val {
  166. width: 1rpx;
  167. flex: 1;
  168. padding-left: 30rpx;
  169. // text-align: right;
  170. }
  171. }
  172. &:first-child {
  173. .site-name {
  174. padding-top: 0;
  175. }
  176. }
  177. }
  178. </style>