index.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462
  1. <template>
  2. <view class="indexpage" style="width: 100%">
  3. <div class="indextop">
  4. <div class="topbox">
  5. <div class="pagetitle">阿斯利康码头预约</div>
  6. <div
  7. @click="
  8. jumpPage(
  9. userType == 'USER'
  10. ? '/pages/subPackages/noticeList/sj'
  11. : '/pages/subPackages/noticeList/qy'
  12. )
  13. "
  14. >
  15. <div class="sub" v-if="noticeNum != 0">{{ noticeNum }}</div>
  16. <img src="./image.png" style="width: 40rpx; height: 39rpx" alt="" />
  17. </div>
  18. </div>
  19. <image src="../../static/index/banner.png" class="banner"></image>
  20. <div class="bz">
  21. <div>
  22. <img
  23. src="https://www.idea-sf.com/dockPic/image/1.png"
  24. class="yyicon"
  25. alt=""
  26. />
  27. <div>预约</div>
  28. </div>
  29. <div class="jiantou">---></div>
  30. <div>
  31. <img
  32. src="https://www.idea-sf.com/dockPic/image/2.png"
  33. class="yyicon"
  34. alt=""
  35. />
  36. <div>签到</div>
  37. </div>
  38. <div class="jiantou">---></div>
  39. <div>
  40. <img
  41. src="https://www.idea-sf.com/dockPic/image/3.png"
  42. class="yyicon"
  43. alt=""
  44. />
  45. <div>装卸</div>
  46. </div>
  47. <div class="jiantou">---></div>
  48. <div>
  49. <img
  50. src="https://www.idea-sf.com/dockPic/image/4.png"
  51. class="yyicon"
  52. alt=""
  53. />
  54. <div>签收</div>
  55. </div>
  56. <div class="jiantou">---></div>
  57. <div>
  58. <img
  59. src="https://www.idea-sf.com/dockPic/image/5.png"
  60. class="yyicon"
  61. alt=""
  62. />
  63. <div>离场</div>
  64. </div>
  65. </div>
  66. </div>
  67. <div class="report">
  68. <div class="left">
  69. <img src="https://www.idea-sf.com/dockPic/image/6.png" alt="" />
  70. <div class="line"></div>
  71. </div>
  72. <div class="right">
  73. <div>
  74. <!-- <div class="info">-->
  75. <!-- <div class="label chaochuyincang">-->
  76. <!-- 受暴雨天气影响,2024-07-13 8:00...-->
  77. <!-- </div>-->
  78. <!-- <div class="day">1天前</div>-->
  79. <!-- </div>-->
  80. <div class="info">
  81. <div class="label chaochuyincang">
  82. {{ noticeText }}
  83. </div>
  84. <div class="day">{{ timeText }}</div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="menu-list" v-if="userType == 'USER'">
  90. <div
  91. class="menu-row"
  92. @click="jumpPage('/pages/subPackages/choosecar/index?zxtype=送货预约')"
  93. >
  94. <div class="text">送货预约</div>
  95. <img
  96. src="https://www.idea-sf.com/dockPic/image/7.png"
  97. class="back"
  98. alt=""
  99. />
  100. <img
  101. src="https://www.idea-sf.com/dockPic/image/7-1.png"
  102. class="icon"
  103. alt=""
  104. />
  105. </div>
  106. <div
  107. class="menu-row"
  108. @click="jumpPage('/pages/subPackages/choosecar/index?zxtype=取货预约')"
  109. >
  110. <div class="text">取货预约</div>
  111. <img
  112. src="https://www.idea-sf.com/dockPic/image/8.png"
  113. class="back"
  114. alt=""
  115. />
  116. <img
  117. src="https://www.idea-sf.com/dockPic/image/8-1.png"
  118. class="icon"
  119. alt=""
  120. />
  121. </div>
  122. <!-- sj_yy/index -->
  123. <div
  124. class="menu-row"
  125. @click="jumpPage('/pages/subPackages/sj_history/index')"
  126. >
  127. <div class="text">预约历史</div>
  128. <img
  129. src="https://www.idea-sf.com/dockPic/image/9.png"
  130. class="back"
  131. alt=""
  132. />
  133. <img
  134. src="https://www.idea-sf.com/dockPic/image/9-1.png"
  135. class="icon"
  136. alt=""
  137. />
  138. </div>
  139. </div>
  140. <div class="menu-list" v-else-if="userType == 'FRAME'">
  141. <div
  142. class="menu-row"
  143. @click="jumpPage('/pages/subPackages/scanCode/index')"
  144. >
  145. <div class="text">扫码核验</div>
  146. <img
  147. src="https://www.idea-sf.com/dockPic/image/7.png"
  148. class="back"
  149. alt=""
  150. />
  151. <img
  152. src="https://www.idea-sf.com/dockPic/image/7-1.png"
  153. class="icon"
  154. alt=""
  155. />
  156. </div>
  157. </div>
  158. <div class="menu-list" v-else>
  159. <div
  160. class="menu-row"
  161. @click="jumpPage('/pages/subPackages/choosecar/index?zxtype=取货预约')"
  162. >
  163. <div class="text">取货预约</div>
  164. <img
  165. src="https://www.idea-sf.com/dockPic/image/7.png"
  166. class="back"
  167. alt=""
  168. />
  169. <img
  170. src="https://www.idea-sf.com/dockPic/image/7-1.png"
  171. class="icon"
  172. alt=""
  173. />
  174. </div>
  175. <div
  176. class="menu-row"
  177. @click="jumpPage('/pages/subPackages/choosecar/index?zxtype=送货预约')"
  178. >
  179. <div class="text">送货预约</div>
  180. <img
  181. src="https://www.idea-sf.com/dockPic/image/8.png"
  182. class="back"
  183. alt=""
  184. />
  185. <img
  186. src="https://www.idea-sf.com/dockPic/image/8-1.png"
  187. class="icon"
  188. alt=""
  189. />
  190. </div>
  191. <div
  192. class="menu-row"
  193. @click="jumpPage('/pages/subPackages/yy_history/index')"
  194. >
  195. <div class="text">预约历史</div>
  196. <img
  197. src="https://www.idea-sf.com/dockPic/image/9.png"
  198. class="back"
  199. alt=""
  200. />
  201. <img
  202. src="https://www.idea-sf.com/dockPic/image/9-1.png"
  203. class="icon"
  204. alt=""
  205. />
  206. </div>
  207. <div
  208. class="menu-row"
  209. @click="jumpPage('/pages/subPackages/carmange/index')"
  210. >
  211. <div class="text">车辆管理</div>
  212. <img
  213. src="https://www.idea-sf.com/dockPic/image/10.png"
  214. class="back"
  215. alt=""
  216. />
  217. <img
  218. src="https://www.idea-sf.com/dockPic/image/10-1.png"
  219. class="icon"
  220. alt=""
  221. />
  222. </div>
  223. </div>
  224. </view>
  225. </template>
  226. <script>
  227. // import {demo} from "@/js_sdk/http"
  228. import { driverMessageCount, bizMessageCount,getNotice } from "@/js_sdk/noticeList.js";
  229. import { getUserLocalStorageInfo } from "@/js_sdk/localUserInfo.js";
  230. export default {
  231. data() {
  232. return {
  233. mapList: [],
  234. MeetingNum: 0,
  235. VenueNum: 0,
  236. userType: "",
  237. noticeNum: 0,
  238. noticeText:'',
  239. timeText:''
  240. };
  241. },
  242. onShareAppMessage() {},
  243. mounted() {
  244. // demo();
  245. },
  246. onShow() {
  247. this.userType = getUserLocalStorageInfo().userType;
  248. if (this.userType == "USER") {
  249. this.driverMessageCount();
  250. } else {
  251. this.bizMessageCount();
  252. }
  253. this.getNotice()
  254. },
  255. methods: {
  256. async getNotice(){
  257. let data = await getNotice()
  258. console.log(data)
  259. this.noticeText=data.data.content
  260. this.timeText = data.data.time
  261. },
  262. // /wx/dock/driverMessageCount
  263. async bizMessageCount() {
  264. let { data } = await bizMessageCount({
  265. bizId: getUserLocalStorageInfo().biz.id,
  266. });
  267. this.noticeNum = data;
  268. console.log(data);
  269. },
  270. async driverMessageCount() {
  271. let { data } = await driverMessageCount({
  272. userId: getUserLocalStorageInfo().user.id,
  273. });
  274. this.noticeNum = data;
  275. console.log(data);
  276. },
  277. jumpPage(path) {
  278. console.log(path);
  279. uni.navigateTo({
  280. url: path,
  281. fail: (fail) => {},
  282. });
  283. },
  284. },
  285. };
  286. </script>
  287. <style lang="scss">
  288. .indexpage {
  289. .pagetitle {
  290. font-weight: 400;
  291. font-size: 32rpx;
  292. color: #333333;
  293. }
  294. .sub {
  295. width: 28rpx;
  296. height: 28rpx;
  297. background: #f21912;
  298. border-radius: 50%;
  299. display: flex;
  300. font-size: 26rpx;
  301. align-items: center;
  302. justify-content: center;
  303. color: white;
  304. position: absolute;
  305. top: 0rpx;
  306. right: 25rpx;
  307. }
  308. .topbox {
  309. display: flex;
  310. padding: 8rpx 32rpx 18rpx 32rpx;
  311. justify-content: space-between;
  312. font-size: 32rpx;
  313. color: #333333;
  314. }
  315. .menu-list {
  316. margin-top: 24rpx;
  317. display: flex;
  318. flex-wrap: wrap;
  319. justify-content: space-between;
  320. background: #ffffff;
  321. width: 100%;
  322. padding: 30rpx 32rpx 6rpx 32rpx;
  323. box-sizing: border-box;
  324. .menu-row {
  325. width: 330rpx;
  326. height: 128rpx;
  327. position: relative;
  328. margin-bottom: 24rpx;
  329. .text {
  330. position: absolute;
  331. left: 32rpx;
  332. top: 38rpx;
  333. font-weight: bold;
  334. font-size: 36rpx;
  335. color: #333333;
  336. z-index: 2;
  337. }
  338. .back {
  339. width: 330rpx;
  340. height: 128rpx;
  341. position: absolute;
  342. z-index: 1;
  343. }
  344. .icon {
  345. position: absolute;
  346. left: 230rpx;
  347. top: 32rpx;
  348. width: 68rpx;
  349. height: 68rpx;
  350. z-index: 2;
  351. }
  352. }
  353. }
  354. .report {
  355. margin-top: 24rpx;
  356. display: flex;
  357. padding: 24rpx 28rpx;
  358. background: #ffffff;
  359. .right {
  360. display: flex;
  361. align-items: center;
  362. margin-left: 16rpx;
  363. }
  364. .info {
  365. display: flex;
  366. align-items: center;
  367. margin-top: 12rpx;
  368. margin-bottom: 12rpx;
  369. display: flex;
  370. color: rgba(24, 23, 42, 1);
  371. .label {
  372. width: 345rpx;
  373. }
  374. }
  375. .left {
  376. display: flex;
  377. align-items: center;
  378. }
  379. .line {
  380. width: 2rpx;
  381. height: 80rpx;
  382. background: #e7eaf0;
  383. }
  384. image {
  385. height: 96rpx;
  386. width: 86rpx;
  387. margin-right: 16rpx;
  388. }
  389. .day {
  390. font-size: 24rpx;
  391. color: rgba(102, 102, 102, 1);
  392. }
  393. }
  394. .indextop {
  395. background: #ffffff;
  396. border-radius: 0rpx 0rpx 0rpx 0rpx;
  397. padding-bottom: 24rpx;
  398. }
  399. .bz {
  400. display: flex;
  401. align-items: center;
  402. justify-content: center;
  403. margin-top: 24rpx;
  404. .yyicon {
  405. height: 60rpx;
  406. width: 60rpx;
  407. }
  408. .jiantou {
  409. color: rgb(122, 134, 154);
  410. margin-left: 12rpx;
  411. margin-right: 12rpx;
  412. font-size: 30rpx;
  413. font-weight: bold;
  414. }
  415. }
  416. .jiaobiao {
  417. position: absolute;
  418. top: 10rpx;
  419. right: 30rpx;
  420. border-radius: 50%;
  421. background: red;
  422. font-size: 24rpx;
  423. height: 30rpx;
  424. width: 30rpx;
  425. text-align: center;
  426. line-height: 24rpx;
  427. color: white;
  428. line-height: 30rpx;
  429. }
  430. .banner {
  431. width: 686rpx;
  432. height: 300rpx;
  433. display: block;
  434. margin: auto;
  435. z-index: 1;
  436. }
  437. }
  438. page {
  439. background: rgba(245, 247, 250, 1);
  440. }
  441. </style>