index.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. <template>
  2. <view>
  3. <car-common ref="common" ></car-common>
  4. <u-modal v-model="caritemBl" v-if="stationList.length" >
  5. <view class="slot-content">
  6. <h4>{{stationList[0].name}} → {{stationList[stationList.length-1].name}}</h4>
  7. </view>
  8. <view class="slot-content">
  9. {{caritem.licensePlateNumber}}{{caritem.driverInfo.name}}{{caritem.driverInfo.phone}}
  10. </view>
  11. </u-modal>
  12. <u-navbar :title="title" >
  13. <view class="slot-wrap"></view>
  14. <view class="navbar-right" @click="mapopenBtn" >
  15. <u-icon name="plus-circle" v-if="!mapopen" color="#999" size="28"></u-icon>
  16. <span v-if="!mapopen">放大地图</span>
  17. <u-icon name="minus-circle" v-if="mapopen" color="#999" size="28"></u-icon>
  18. <span v-if="mapopen">缩小地图</span>
  19. </view>
  20. </u-navbar>
  21. <carmap ref="amap" @onload="mapdown"></carmap>
  22. <view class="map-info">
  23. <view class="map-text" v-if="stationList.length">
  24. <h4>{{stationList[0].name}} → {{stationList[stationList.length-1].name}}</h4>
  25. <p>首班:{{routeInfo.startTime}} 末班:{{routeInfo.endTime}}</p>
  26. </view>
  27. <view class="map-btn" @click="reverse">
  28. <u-icon name="swap" custom-prefix="custom-icon" color="#2979ff"></u-icon>
  29. <span>换向</span>
  30. </view>
  31. </view>
  32. <view class="map-route">
  33. <view class="map-route-head" >
  34. <view >上车提醒</view>
  35. <view >
  36. <u-radio-group v-model="downItem.isRemind" @change="radioGroupChange" >
  37. <u-radio
  38. v-for="(dio, index) in radiolist" :key="index"
  39. :name="dio.isRemind"
  40. >
  41. {{dio.name}}
  42. </u-radio>
  43. </u-radio-group>
  44. </view>
  45. </view>
  46. <view class="map-route-main" id="map-route-main">
  47. <template v-for="item,i in stationList">
  48. <view class="scroll-view-item"
  49. :class="{'map-route-origin map-geton ':i==0,'map-route-item':i!=0,'map-geton':downid==item.id,'map-down':downid==item.id}"
  50. >
  51. <view class="map-route-car" v-if="showCar(item)">
  52. <img src="static/img/car.png" alt="" @click="carShow(item)">
  53. </view>
  54. <view class="map-route-circle" @click="downBtn(item)" :style="i==0&&downid!=item.id?'border: 3px solid #1e8abd;':''">
  55. <img src="static/img/plate.png" style=" width: 12px; margin-top: 3px;" v-if="downid==item.id" alt="">
  56. </view>
  57. <view class="map-route-line" @click="downBtn(item)"></view>
  58. <view class="map-route-name" @click="downBtn(item)">
  59. {{item.name}}
  60. </view>
  61. </view>
  62. </template>
  63. </view>
  64. </view>
  65. </view>
  66. </template>
  67. <script>
  68. import api from './index.js'
  69. export default api
  70. </script>
  71. <style scoped lang="scss">
  72. .map-route {
  73. border-top: 10px solid #f7f7f7;
  74. background-color: #fff;
  75. padding-bottom: 60px;
  76. .map-route-head {
  77. font-size: 16px;
  78. color: #007AFF;
  79. text-align: center;
  80. line-height: 40px;
  81. border-bottom: 1px solid #eee;
  82. }
  83. .map-route-main {
  84. padding: 10px;
  85. position: relative;
  86. overflow-x: scroll !important;
  87. display: -webkit-box;
  88. }
  89. }
  90. .map-info{
  91. display: flex;
  92. justify-content: space-between;
  93. align-items: center;
  94. background-color: #fff;
  95. padding: 20rpx;
  96. }
  97. .map-text{
  98. h4{
  99. font-size: 16px;
  100. }
  101. p{
  102. margin-top: 10rpx;
  103. color:#999;
  104. }
  105. }
  106. .map-btn{
  107. border: 1px solid #007AFF;
  108. color:#007AFF;
  109. padding: 5px 15px;
  110. border-radius:30px ;
  111. span{
  112. margin-left: 6rpx;
  113. }
  114. }
  115. .map-route-origin {
  116. position: relative;
  117. height: 200px;
  118. width: 15px;
  119. .map-route-circle {
  120. position: absolute;
  121. left: 0;
  122. top: 30px;
  123. height: 15px;
  124. width: 15px;
  125. border-radius: 50%;
  126. background-color: #999;
  127. border: 3px solid #fff;
  128. box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
  129. z-index: 99;
  130. }
  131. .map-route-name {
  132. position: absolute;
  133. top: 50px;
  134. width: 16px;
  135. line-height: 16px;
  136. z-index: 999;
  137. left: 3px;
  138. }
  139. &.map-geton{
  140. .map-route-circle {
  141. width: 24px;
  142. background-color: #fff;
  143. height: 24px;
  144. border: 3px solid #25ad3b;
  145. color:#25ad3b;
  146. text-align: center;
  147. line-height: 18px;
  148. font-size:10px;
  149. top:25px;
  150. left: -3px;
  151. }
  152. .map-route-car {
  153. height: 30px;
  154. width: 30px;
  155. position: absolute;
  156. right: -10px;
  157. top: 2px;
  158. img {
  159. height: 100%;
  160. width: 100%;
  161. }
  162. }
  163. }
  164. }
  165. .map-route-item {
  166. position: relative;
  167. height: 200px;
  168. width: 60px;
  169. .map-route-car {
  170. height: 30px;
  171. width: 30px;
  172. position: absolute;
  173. right: -10px;
  174. top: 2px;
  175. img {
  176. height: 100%;
  177. width: 100%;
  178. }
  179. }
  180. .map-route-circle {
  181. position: absolute;
  182. right: -2px;
  183. top: 30px;
  184. height: 15px;
  185. width: 15px;
  186. border-radius: 50%;
  187. background-color: #fff;
  188. border: 3px solid #1677ff;
  189. z-index: 99;
  190. }
  191. .map-route-line {
  192. height: 6px;
  193. background-color: #1677ff;
  194. width: 55px;
  195. position: absolute;
  196. left: 0px;
  197. top: 35px;
  198. z-index: 9;
  199. }
  200. .map-route-name {
  201. position: absolute;
  202. top: 50px;
  203. width: 16px;
  204. line-height: 16px;
  205. z-index: 999;
  206. right: -3px;
  207. text-align: center;
  208. }
  209. }
  210. .map-route-item.map-now {
  211. .map-route-car {
  212. height: 30px;
  213. width: 30px;
  214. position: absolute;
  215. left: 10px;
  216. top: 2px;
  217. img {
  218. height: 100%;
  219. width: 100%;
  220. }
  221. }
  222. }
  223. .map-route-item.map-color{
  224. .map-route-circle {
  225. border: 3px solid #ff6200;
  226. }
  227. .map-route-line {
  228. background-color: #ff6200;
  229. }
  230. }
  231. .map-route-item.map-after {
  232. .map-route-circle {
  233. border: 3px solid #999;
  234. }
  235. .map-route-line {
  236. background-color: #999;
  237. }
  238. }
  239. .map-route-item.map-geton {
  240. .map-geton-mark {
  241. width:20px;
  242. height: 20px;
  243. right: 0;
  244. position: absolute;
  245. right: -4px;
  246. top: 5px;
  247. img {
  248. height: 100%;
  249. width: 100%;
  250. }
  251. }
  252. .map-route-circle {
  253. width: 24px;
  254. height: 24px;
  255. border: 3px solid #25ad3b;
  256. color:#25ad3b;
  257. text-align: center;
  258. line-height: 18px;
  259. font-size:10px;
  260. top:25px;
  261. right: -8px;
  262. }
  263. .map-route-name {
  264. color: #25ad3b
  265. }
  266. }
  267. .map-route-item.map-geton1 {
  268. .map-geton-mark {
  269. width: 20px;
  270. height: 20px;
  271. right: 0;
  272. position: absolute;
  273. right: -4px;
  274. top: 5px;
  275. img {
  276. height: 100%;
  277. width: 100%;
  278. }
  279. }
  280. .map-route-circle {
  281. border: 3px solid #25ad3b;
  282. }
  283. .map-route-name {
  284. color: #25ad3b
  285. }
  286. }
  287. .add-foot {
  288. position: fixed;
  289. background-color: #fff;
  290. border-top: 1px solid #eee;
  291. z-index: 999;
  292. bottom: 0;
  293. left: 0;
  294. right: 0;
  295. height: 90rpx;
  296. display: flex;
  297. justify-content: space-between;
  298. .add-foot-price {
  299. display: flex;
  300. align-items: center;
  301. padding-left: 20rpx;
  302. font-size: 32rpx;
  303. span {
  304. color: #1677ff;
  305. }
  306. }
  307. .add-foot-btn {
  308. width: 240rpx;
  309. background-color: #1677ff;
  310. color: #fff;
  311. font-size: 32rpx;
  312. text-align: center;
  313. line-height: 90rpx;
  314. }
  315. }
  316. .navbar-right {
  317. display: flex;
  318. margin-right: 20rpx;
  319. span{
  320. color:rgb(96, 98, 102);
  321. margin-left: 3px;
  322. }
  323. }
  324. .slot-wrap {
  325. display: flex;
  326. align-items: center;
  327. flex: 1;
  328. }
  329. </style>