charteredBus.vue 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. <template>
  2. <view class="highwayPost">
  3. <!-- 导航栏 -->
  4. <navigationBar title="旅游包车">
  5. </navigationBar>
  6. <view class="main">
  7. <!-- <view class="search">
  8. <view class="pullDown" @click="locationShow = true">
  9. {{location}}
  10. </view>
  11. <u--input placeholder="搜索店铺" :adjustPosition="false" fontSize="29.47" color="#61696F" shape="circle"
  12. border="none" v-model="searchText">
  13. <template slot="suffix">
  14. <u-icon name="search" @click="search" color="#4F4F4F" size="50"></u-icon>
  15. </template>
  16. </u--input>
  17. </view> -->
  18. <scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltolower="lower">
  19. <view class="scroll-view-item" v-for="(v,i) in ListData" :key="i">
  20. <view class="serveImg">
  21. <image :src="v.imgUrl" v-if="v.imgUrl" mode="aspectFill" class="img"></image>
  22. <view class="iconBox" v-else>
  23. <image src="../../static/images/imgFailed.png" mode="aspectFit" class="icon">
  24. </image>
  25. </view>
  26. </view>
  27. <view class="serveDetails">
  28. <view class="list topList">
  29. <view class="name">
  30. {{v.name}}
  31. </view>
  32. <view class="btn" @click="errorCorrection(v)">
  33. 纠错
  34. </view>
  35. </view>
  36. <view class="list distance">
  37. <view class="name">
  38. 服务时间:{{v.serveTime}}
  39. </view>
  40. <view class="distanceText">
  41. 0.12Km
  42. </view>
  43. </view>
  44. <view class="list">
  45. <text class="direction">包车服务:{{v.serveContent}}</text>
  46. </view>
  47. <view class="list siteList">
  48. <view class="name">
  49. <view class="user">
  50. <view class="userName">
  51. <u-icon name="account-fill" color="#4C81CF" size="32"></u-icon>
  52. <text>{{v.contactsName}}</text>
  53. </view>
  54. <view class="userPhone">
  55. <u-icon name="phone-fill" color="#4C81CF" size="32"></u-icon>
  56. <text>{{v.contactsMobile}}</text>
  57. </view>
  58. </view>
  59. <view class="place">
  60. <u-icon name="map-fill" color="#4C81CF" size="32"></u-icon>
  61. <text>{{v.address}}</text>
  62. </view>
  63. </view>
  64. <view class="operate">
  65. <u-icon class="icon" size="45" name="../../static/images/location.png"></u-icon>
  66. <text class="text">去这里</text>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. <u-loadmore :status="status" v-if="total != 0" fontSize="30" iconSize="30" />
  72. </scroll-view>
  73. </view>
  74. <!-- 搜索下拉框 -->
  75. <u-picker :show="locationShow" :columns="locationColumns" @cancel="locationShow = false" itemHeight="120"
  76. @confirm="locationAffirm"></u-picker>
  77. <!-- 纠错 -->
  78. <u-popup :show="errorShow" mode="center" round="14" :customStyle="{width: '90%'}">
  79. <view class="errorBox">
  80. <view class="headline">我要反馈问题</view>
  81. <view class="title">请选择问题</view>
  82. <view class="fast">
  83. <view class="li" :class="{active : active == i}" v-for="(v,i) in errorHintData" :key="i"
  84. @click="(active = i),(errorData.feedbackType = v.dictValue)">
  85. {{v.dictLabel}}
  86. </view>
  87. </view>
  88. <view class="title">问题描述:</view>
  89. <u--textarea v-model="feedbackContent" placeholder="请输入" height="100"></u--textarea>
  90. <view class="btn">
  91. <span class="sBtn" @click="submitFeedback">提交</span>
  92. <span class="qBtn" @click="errorShow = false">关闭</span>
  93. </view>
  94. </view>
  95. </u-popup>
  96. <u-toast ref="uToast"></u-toast>
  97. </view>
  98. </template>
  99. <script>
  100. import {
  101. getList,
  102. errorHint,
  103. setErrorCorrection
  104. } from "@/api/list.js"
  105. export default {
  106. data() {
  107. return {
  108. // 竖向滚动条位置
  109. scrollTop: 0,
  110. old: {
  111. scrollTop: 0
  112. },
  113. // 地点
  114. location: '龙观乡',
  115. // 下拉框
  116. locationShow: false,
  117. locationColumns: [
  118. ['龙观乡', '龙观乡', '龙观乡', '龙观乡', '龙观乡', '龙观乡']
  119. ],
  120. // 搜索
  121. searchText: "",
  122. // 查询参数
  123. queryParams: {
  124. pageNum: 1,
  125. pageSize: 10,
  126. serveType: 4,
  127. address: null,
  128. name: null,
  129. },
  130. // 列表数据
  131. ListData: [],
  132. // 总数
  133. total: 0,
  134. // 加载更多
  135. status: 'loadmore',
  136. // 纠错
  137. errorShow: false,
  138. errorData: {
  139. serveModule: 1,
  140. serveId: null,
  141. feedbackType: null,
  142. feedbackContent: "",
  143. feedbackBy: null,
  144. },
  145. feedbackContent: '',
  146. // 激活
  147. active: null,
  148. // 纠错提示
  149. errorHintData: []
  150. };
  151. },
  152. onLoad() {
  153. this.getListData()
  154. },
  155. methods: {
  156. // 地点选择确认
  157. locationAffirm(data) {
  158. this.location = data.value[0]
  159. this.locationShow = false
  160. },
  161. // 搜索
  162. search() {
  163. this.queryParams.pageSize = 10
  164. this.queryParams.address = this.queryParams.name = this.searchText
  165. this.getListData()
  166. },
  167. // 触底事件
  168. lower(e) {
  169. console.log(1111);
  170. if (this.ListData.length < this.total) {
  171. this.status = 'loading'
  172. this.queryParams.pageSize += 10
  173. this.getListData()
  174. } else {
  175. this.status = 'nomore'
  176. }
  177. },
  178. // 获取列表数据
  179. async getListData() {
  180. let res = await getList(this.queryParams)
  181. if (res.code == 200) {
  182. this.total = res.total
  183. this.ListData = res.rows
  184. this.status = 'loadmore'
  185. // console.log(this.ListData);
  186. }
  187. },
  188. // 纠错
  189. errorCorrection(data) {
  190. this.active = null
  191. this.errorData.feedbackType = null
  192. this.errorData.feedbackContent = null
  193. this.feedbackContent = null
  194. this.errorData.serveId = data.id
  195. errorHint("feedback_type").then(res => {
  196. this.errorHintData = res.data
  197. // this.errorData = data
  198. this.errorShow = true
  199. })
  200. },
  201. // 提交反馈
  202. submitFeedback() {
  203. this.errorData.feedbackContent = this.feedbackContent
  204. setErrorCorrection(this.errorData).then(res => {
  205. this.errorShow = false
  206. this.$refs.uToast.show({
  207. icon: false,
  208. type: 'success',
  209. message: '反馈成功'
  210. })
  211. })
  212. }
  213. }
  214. }
  215. </script>
  216. <style lang="scss" scoped>
  217. .highwayPost {
  218. height: 100%;
  219. .main {
  220. position: relative;
  221. .scroll-Y {
  222. height: 100%;
  223. // height: calc(100% - 80rpx);
  224. }
  225. .search {
  226. height: 68rpx;
  227. border: 1px solid #75BFFF;
  228. border-radius: 105.26rpx;
  229. display: flex;
  230. padding: 0 20rpx;
  231. margin-bottom: 34rpx;
  232. .pullDown {
  233. width: 126.32rpx;
  234. height: 100%;
  235. line-height: 67.37rpx;
  236. font-size: 29.47rpx;
  237. text-align: center;
  238. font-weight: 600;
  239. margin-right: 21.05rpx;
  240. padding-right: 20rpx;
  241. position: relative;
  242. &::after {
  243. content: "◢";
  244. display: inline-block;
  245. position: absolute;
  246. right: 0;
  247. bottom: -10rpx;
  248. }
  249. }
  250. }
  251. .scroll-view-item {
  252. display: flex;
  253. .serveImg {
  254. flex: none;
  255. width: 220rpx;
  256. height: 269.47rpx;
  257. .img {
  258. width: 100%;
  259. height: 100%;
  260. border-radius: 16.84rpx;
  261. }
  262. .iconBox {
  263. width: 100%;
  264. height: 100%;
  265. border-radius: 16.84rpx;
  266. position: relative;
  267. border: 1px solid #dfdfdf;
  268. .icon {
  269. width: 30%;
  270. height: 50%;
  271. position: absolute;
  272. top: 50%;
  273. left: 50%;
  274. transform: translate(-50%, -50%);
  275. }
  276. }
  277. }
  278. .serveDetails {
  279. flex: 1;
  280. padding-left: 18rpx;
  281. position: relative;
  282. .list {
  283. display: flex;
  284. align-items: center;
  285. justify-content: space-between;
  286. margin-bottom: 10.53rpx;
  287. &:last-child {
  288. margin-bottom: 0;
  289. }
  290. .name {
  291. width: 336.84rpx;
  292. // overflow: hidden;
  293. // white-space: nowrap;
  294. // text-overflow: ellipsis;
  295. // -o-text-overflow: ellipsis;
  296. }
  297. .direction {
  298. font-size: 25.26rpx;
  299. color: #516789;
  300. overflow: hidden;
  301. text-overflow: ellipsis;
  302. -webkit-line-clamp: 2;
  303. display: -webkit-box;
  304. -webkit-box-orient: vertical;
  305. }
  306. }
  307. .topList {
  308. .name {
  309. font-weight: 600;
  310. font-size: 29.47rpx;
  311. }
  312. .btn {
  313. width: 75.79rpx;
  314. height: 31.58rpx;
  315. line-height: 25rpx;
  316. font-size: 21.05rpx;
  317. text-align: center;
  318. color: #4C81CF;
  319. border: 1px solid #4C81CF;
  320. border-radius: 105.26rpx;
  321. }
  322. }
  323. .distance {
  324. font-size: 21.05rpx;
  325. .distanceText {
  326. flex: 1;
  327. width: 33.68rpx;
  328. }
  329. }
  330. .serveList {
  331. .name {
  332. color: #516789;
  333. font-size: 25.26rpx;
  334. }
  335. }
  336. .siteList {
  337. align-items: flex-end;
  338. font-size: 25.26rpx;
  339. color: #516789;
  340. position: absolute;
  341. bottom: 0;
  342. .name {
  343. .user {
  344. display: flex;
  345. .userName,
  346. .userPhone {
  347. display: flex;
  348. }
  349. }
  350. .place {
  351. display: flex;
  352. align-items: flex-start;
  353. }
  354. }
  355. .operate {
  356. display: flex;
  357. flex-direction: column;
  358. align-items: center;
  359. .text {
  360. font-size: 21.05rpx;
  361. }
  362. }
  363. }
  364. }
  365. }
  366. }
  367. .errorBox {
  368. padding: 33.68rpx 25.26rpx;
  369. .headline {
  370. color: #000A15;
  371. text-align: center;
  372. font-weight: 600;
  373. }
  374. .title {
  375. color: #000A15;
  376. font-weight: 600;
  377. font-size: 29.47rpx;
  378. margin: 42.11rpx 0 21.05rpx 0;
  379. }
  380. .fast {
  381. display: flex;
  382. flex-wrap: wrap;
  383. justify-content: space-between;
  384. .li {
  385. width: 48%;
  386. height: 80rpx;
  387. line-height: 80rpx;
  388. font-size: 29.47rpx;
  389. border-radius: 50px;
  390. color: #798C9B;
  391. text-align: center;
  392. margin-bottom: 20rpx;
  393. background-color: rgba(222, 238, 252, 0.3);
  394. }
  395. .active {
  396. background-color: #D7ECFF;
  397. color: #000A15;
  398. }
  399. }
  400. .btn {
  401. margin-top: 21.05rpx;
  402. display: flex;
  403. justify-content: center;
  404. .sBtn {
  405. padding: 10rpx 50rpx;
  406. font-size: 29.47rpx;
  407. border-radius: 105.26rpx;
  408. background-color: #D7ECFF;
  409. margin-right: 50rpx;
  410. }
  411. .qBtn {
  412. padding: 10rpx 50rpx;
  413. font-size: 29.47rpx;
  414. border-radius: 105.26rpx;
  415. border: 1px solid #D7ECFF;
  416. }
  417. }
  418. }
  419. }
  420. </style>