vehList.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <template>
  2. <u-popup :show="isShow" @close="close" mode="bottom" :closeOnClickOverlay="false" round="10"
  3. :customStyle="{
  4. overflow: 'hidden'
  5. }"
  6. >
  7. <view class="page-container">
  8. <scroll-view
  9. scroll-y style="height: 90vh;" enable-back-to-top
  10. >
  11. <view v-for="(item,index) in vehList" :key="index"
  12. class="box"
  13. >
  14. <view class="item">
  15. <view class="label">车牌:</view>
  16. <view class="value">{{renderItem(item,'plate','--')}}</view>
  17. </view>
  18. <view class="item">
  19. <view class="label">等待时间:</view>
  20. <view class="value">{{renderItem(item,'waitTime','--')}}</view>
  21. </view>
  22. <view class="item-btn">
  23. <view class="u-button" @click="handleTask(item)" v-if="!intercomState">
  24. <image class="icon" src="@/static/icon/voice.png" mode=""></image>
  25. 对讲
  26. </view>
  27. <view class="u-button intercom" @click="handleTask(item)" v-if="intercomState">
  28. <image class="icon" src="@/static/icon/voice-close.png" mode=""></image>
  29. 挂断
  30. </view>
  31. </view>
  32. </view>
  33. <view
  34. v-if="vehList.length==0"
  35. style="display: flex;align-items: center;justify-content: center;height: 100%;"
  36. >
  37. <u-empty
  38. mode="data"
  39. >
  40. </u-empty>
  41. </view>
  42. </scroll-view>
  43. <view class="page-footer">
  44. <u-row style="">
  45. <u-col :span="12">
  46. <u-button type="info" shape="" :hairline="false"
  47. :custom-style="{
  48. width: '100%',
  49. borderRadius: '0',
  50. background: '#FFF',
  51. height: '100rpx',
  52. fontSize: '32rpx',
  53. fontWeight: '500',
  54. }" @click="close">取消
  55. </u-button>
  56. </u-col>
  57. </u-row>
  58. </view>
  59. </view>
  60. <intercom ref="intercom" @oNstate="(e)=>intercomState=e"></intercom>
  61. </u-popup>
  62. </template>
  63. <script>
  64. import {copyProps,clearProps} from '@/utils/gdtq.js'
  65. import {isArray,isEmpty} from 'lodash'
  66. import Intercom from '@/components/Intercom'
  67. export default {
  68. components: {
  69. Intercom
  70. },
  71. data() {
  72. return {
  73. intercomState:false,//对接状态
  74. isShow: false,
  75. vehList: [
  76. // {plate: 'test', waitTime: '1小时30分钟', driverName: '黎曼',deviceId: 12232332},
  77. ],
  78. }
  79. },
  80. mounted() {
  81. },
  82. onReady() {
  83. },
  84. methods: {
  85. show(e) {
  86. // console.log(e,'eeeee')
  87. let {vehList} = e
  88. this.vehList = vehList
  89. this.isShow= true;
  90. },
  91. close() {
  92. this.isShow = false
  93. },
  94. handleTask(item) {
  95. this.$refs.intercom.toIntercom(item.deviceId);
  96. },
  97. }
  98. }
  99. </script>
  100. <style lang="scss" scoped>
  101. .blue {
  102. color: #0075F7 !important;
  103. }
  104. .page-container {
  105. min-width: 600rpx;
  106. font-size: 28rpx;
  107. min-height: 100%;
  108. .box {
  109. margin: 24rpx 24rpx 0;
  110. border-radius: 20rpx;
  111. padding: 16rpx 20rpx;
  112. background: rgba(0,117,247,0.03);
  113. // 展示
  114. .item {
  115. display: flex;
  116. font-family: PingFangSC, PingFang SC;
  117. font-weight: 500;
  118. font-size: 30rpx;
  119. color: #666666;
  120. margin: 20rpx;
  121. .label {
  122. font-size: 14px;
  123. font-weight: 700;
  124. color: #303133;
  125. }
  126. .value {
  127. flex: 1;
  128. }
  129. }
  130. .item-btn {
  131. display: flex;
  132. .u-button {
  133. display: flex;
  134. align-items: center;
  135. justify-content: center;
  136. width: 100%;
  137. height: 60rpx;
  138. background: #4573FC;
  139. border-radius: 34rpx;
  140. color: #fff;
  141. &:not(:last-child) {
  142. margin-right: 20rpx;
  143. }
  144. .icon{
  145. width: 48rpx;
  146. height: 48rpx;
  147. margin-right: 2rpx;
  148. }
  149. }
  150. .intercom{
  151. background: #EB4141;
  152. }
  153. }
  154. }
  155. .page-head {
  156. display: flex;
  157. flex-direction: column;
  158. justify-content: center;
  159. align-items: center;
  160. padding: 14rpx 0 28rpx;
  161. }
  162. .page-body {
  163. padding-bottom: 120rpx;
  164. }
  165. .page-footer {
  166. position: absolute;
  167. width: 100%;
  168. left: 0;
  169. bottom: 0;
  170. }
  171. }
  172. ::v-deep {
  173. .u-cell-group {
  174. .u-radio+.u-radio {
  175. margin-left: 30rpx;
  176. }
  177. .u-cell__title-text {
  178. font-family: PingFangSC, PingFang SC;
  179. font-weight: 400;
  180. font-size: 28rpx;
  181. color: #333333;
  182. }
  183. .u-form-item__body__right__content__slot {
  184. font-family: PingFangSC, PingFang SC;
  185. font-weight: 400;
  186. font-size: 28rpx;
  187. color: #333333;
  188. .u-input__content__field-wrapper__field {
  189. font-family: PingFangSC, PingFang SC !important;
  190. font-weight: 400 !important;
  191. font-size: 26rpx !important;
  192. color: #333333 !important;
  193. }
  194. }
  195. }
  196. .u-textarea {
  197. background: none;
  198. }
  199. .u-form-item__body {
  200. padding: 0;
  201. }
  202. .hidde-cell-title {
  203. .u-cell__body__content {
  204. width: auto;
  205. flex: none;
  206. }
  207. .u-cell__body {
  208. .value {
  209. flex: 1;
  210. }
  211. }
  212. }
  213. }
  214. </style>