vdetail.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view class="warrbox flexdc" :style="'padding-top:'+nvaHeight+'px;'">
  3. <view class="navbox">
  4. <uni-nav-bar title="访客信息" left-icon="left" @clickLeft="getBackFn" color="#FFFFFF" :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
  5. </uni-nav-bar>
  6. </view>
  7. <!-- <image :src="mbg" class="navbg"></image> -->
  8. <view class="vdmain flexdc">
  9. <view class="flex1">
  10. <view class="flexcc mb26">
  11. <view class="line lia"></view>
  12. <view class="vdtop">邀请详情</view>
  13. <view class="line lib"></view>
  14. </view>
  15. <view class="vdlist mb26">
  16. <view class="list"><text>访客姓名:</text>王女士</view>
  17. <view class="list"><text>来访时间:</text>2024-11-20 10:00</view>
  18. <view class="flexc">
  19. <view class="list mw50"><text>来访人数:</text>1人</view>
  20. <view class="list mw50"><text>来访事由:</text>亲友</view>
  21. </view>
  22. <view class="flexc">
  23. <view class="list mw50"><text>车牌号码:</text>皖A B8888</view>
  24. <view class="list mw50"><text>手机号码:</text>1870566558</view>
  25. </view>
  26. </view>
  27. <!-- 地图 -->
  28. <view class="mb22">
  29. <map
  30. id="container"
  31. class="map"
  32. :latitude="center.lat"
  33. :longitude="center.lng"
  34. @poitap="onClcikImgMap"
  35. @tap="onClcikImgMap"
  36. :markers="covers"
  37. scale="17"
  38. :style="'width: 638rpx;height:280rpx;'"
  39. ></map>
  40. </view>
  41. <view class="adrbox mb16">
  42. <view class="tit mb10">房屋地址</view>
  43. <view class="txt">安徽省合肥市蜀山区高新技术产业开发区幸福大街88号
  44. 幸福小区5#1304</view>
  45. </view>
  46. <view class="adrbox">
  47. <view class="flexc mb6">
  48. <view class="tit flex1">共享位置</view>
  49. <view class="flexc" @click="checkflag=!checkflag">
  50. <view class="flex1"></view>
  51. <image :src="check" v-if="checkflag" class="checkimg"></image>
  52. <image :src="ncheck" v-else class="checkimg"></image>
  53. </view>
  54. </view>
  55. <view class="txts">打开即确认将位置共享于被分享者</view>
  56. </view>
  57. </view>
  58. <view class="rhbtn mt30" @click="getShareFn">分享</view>
  59. </view>
  60. <loading></loading>
  61. </view>
  62. </template>
  63. <script>
  64. import config from '@/config'
  65. const baseUrl = config.baseUrl
  66. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  67. export default{
  68. components:{},
  69. data(){
  70. return{
  71. check: require('@/mine/static/check.png'),
  72. ncheck: require('@/mine/static/ncheck.png'),
  73. nvaHeight:44,
  74. checkflag:false,
  75. backgroundColor: "transparent",
  76. baseUrl:config.baseUrl,
  77. type:'',
  78. finshtype:3,
  79. center:{
  80. lng:'117.211954',
  81. lat:'31.839676',
  82. },
  83. covers: [{
  84. id:0,
  85. latitude: '31.839676',
  86. longitude: '117.211954',
  87. width:18, //宽
  88. height:19, //高
  89. iconPath: require("@/work/static/visitor/adr.png"),
  90. anchor:{x: 0.5, y: 0.5}
  91. }],
  92. }
  93. },
  94. onLoad: function() {
  95. uni.getSystemInfo({
  96. success: (e) => {
  97. this.nvaHeight = Number(e.statusBarHeight)+44;
  98. }
  99. })
  100. },
  101. onReady() {
  102. this.getcreateMap()
  103. },
  104. onPageScroll(e) {
  105. var scrollTop = Number(e.scrollTop);
  106. if (scrollTop > 0) {
  107. this.backgroundColor = '#0256FD'
  108. } else {
  109. this.backgroundColor = 'transparent'
  110. }
  111. },
  112. methods:{
  113. checkPermi, checkRole,
  114. getcreateMap(){
  115. //mapId 就是你在 map 标签中定义的 id
  116. this.mapContext = uni.createMapContext('container', this);
  117. },
  118. getShareFn(){
  119. this.$tab.navigateTo("/work/pages/visitor/vshare")
  120. },
  121. getAssignFn(){
  122. this.type='assign'
  123. },
  124. getCheckFn(){
  125. this.type='assigncheck'
  126. },
  127. getOpenFn(){
  128. },
  129. getBackFn(){
  130. uni.navigateBack({
  131. delta:1
  132. })
  133. },
  134. getClose(){
  135. this.type='';
  136. },
  137. getSure(){
  138. this.type='';
  139. },
  140. getPhoneFn(){
  141. uni.makePhoneCall({
  142. phoneNumber: '114' //仅为示例
  143. });
  144. },
  145. getPreviewImage(arr,idx){
  146. var newArr=[];
  147. arr.forEach(ite=>{
  148. var ds=this.baseUrl+ite
  149. newArr.push(ds)
  150. })
  151. uni.previewImage({
  152. urls: newArr,
  153. current:idx,
  154. success: function(data) {
  155. },
  156. fail: function(err) {
  157. }
  158. });
  159. },
  160. }
  161. }
  162. </script>
  163. <style>
  164. page{background: #F3F3F0;}
  165. </style>
  166. <style lang="scss" scoped>
  167. .warrbox{min-height: 100vh;background: linear-gradient(180deg, #0256FD 0%,#528AF9 60%, rgba(255,255,255,0) 100%) no-repeat;background-size: 100% 722rpx;padding:0 30rpx 26rpx;}
  168. .rfbga{background: #2ACA8E !important;}
  169. .navbg{width: 100%;height: 722rpx;z-index: 0;}
  170. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4; }
  171. .vdmain{z-index: 2;position: relative;background: #FFFFFF;border-radius: 20rpx;flex: 1;padding: 60rpx 26rpx 98rpx;
  172. .line{width: 168rpx;height: 2rpx;
  173. &.lia{background: linear-gradient(270deg, #0256FD 0%, rgba(2,86,253,0) 100%);}
  174. &.lib{background: linear-gradient(90deg, #0256FD 0%, rgba(2,86,253,0) 100%);}
  175. }
  176. .vdtop{font-weight: bold;font-size: 26rpx;color: #272727;margin: 0 32rpx;}
  177. .vdlist{
  178. .list{font-weight: 500;font-size: 26rpx;color: #272727;margin-bottom: 24rpx;}
  179. }
  180. .adrbox{
  181. .tit{font-weight: bold;font-size: 26rpx;color: #272727;}
  182. .txt{font-weight: 500;font-size: 26rpx;color: #666666;line-height: 36rpx;}
  183. .txts{font-weight: 500;font-size: 22rpx;color: #AAAAAA;}
  184. .checkimg{width: 80rpx;height: 40rpx;margin-left: 8rpx;}
  185. }
  186. }
  187. </style>