rtudata.vue 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. <template>
  2. <view class="container">
  3. <uni-nav-bar dark :fixed="true" backgroundColor="#3F9EFF" status-bar left-icon="left" left-text="返回"
  4. @clickLeft="toBack">
  5. <view style="width: 100%;display: flex;flex-direction: row;justify-content: center;align-items: center;">
  6. <text style="color: white;font-size: 1rem;">{{title}}</text>
  7. </view>
  8. </uni-nav-bar>
  9. <!-- 头部按钮 start -->
  10. <view class="nav">
  11. <u-grid :col="4" :border="false">
  12. <u-grid-item bg-color="transparent" v-for="(item, index) in navButton" :key="index">
  13. <navigator :url="item.url" hover-class="none" class="nav-item" open-type="navigate">
  14. <image :src="item.img" mode="widthFix" class="nav-item-img"></image>
  15. <view style="font-size: 0.7rem;font-weight: bold;">{{ item.name }}</view>
  16. </navigator>
  17. </u-grid-item>
  18. </u-grid>
  19. </view>
  20. <!-- 头部按钮 end -->
  21. </view>
  22. </template>
  23. <script>
  24. import http from '@/http/api.js';
  25. import uGroup from '@/uni_modules/uni-group/uni-group.vue'
  26. import uSection from '@/uni_modules/uni-section/uni-section.vue'
  27. import uNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue'
  28. import uDataPicker from '@/uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue'
  29. import pageNav from '@/components/page-nav/page-nav.vue';
  30. import uList from '@/uni_modules/uni-list/components/uni-list/uni-list.vue'
  31. import uListItem from '@/uni_modules/uni-list/components/uni-list-item/uni-list-item.vue'
  32. export default {
  33. components: {
  34. uGroup,
  35. uSection,
  36. uNavBar,
  37. uDataPicker,
  38. pageNav,
  39. uList,
  40. uListItem,
  41. },
  42. data() {
  43. return {
  44. title: '实时数据',
  45. navButton: [],
  46. };
  47. },
  48. onLoad() {
  49. const navBtnlist = [{
  50. name: '雨情数据',
  51. img: '/static/images/manage/statistics.png',
  52. url: '/pages/rtu-manage/rturaindata'
  53. },
  54. {
  55. name: '河道数据',
  56. img: '/static/images/manage/statistics.png',
  57. url: '/pages/rtu-manage/rturiverdata'
  58. },
  59. {
  60. name: '水库数据',
  61. img: '/static/images/manage/statistics.png',
  62. url: '/pages/rtu-manage/rtursvrdata'
  63. },
  64. {
  65. name: '墒情数据',
  66. img: '/static/images/manage/statistics.png',
  67. url: '/pages/rtu-manage/rtugrounddata'
  68. }
  69. ];
  70. this.navButton = navBtnlist;
  71. },
  72. onShow() {
  73. },
  74. methods: {
  75. toBack() {
  76. uni.navigateBack({
  77. delta: 1
  78. })
  79. },
  80. }
  81. };
  82. </script>
  83. <style lang="scss">
  84. $nav-height: 75px;
  85. .nav-title {
  86. height: $nav-height;
  87. }
  88. .nav-title-left {
  89. /* #ifndef APP-PLUS-NVUE */
  90. display: flex;
  91. /* #endif */
  92. flex-direction: row;
  93. align-items: center;
  94. justify-content: flex-start;
  95. // width: 160rpx;
  96. margin-left: 4px;
  97. }
  98. .nav-title-box {
  99. /* #ifndef APP-PLUS-NVUE */
  100. display: flex;
  101. /* #endif */
  102. flex-direction: row;
  103. // width: 500rpx;
  104. flex: 1;
  105. background-color: #f8f8f8;
  106. height: $nav-height;
  107. border-radius: 15px;
  108. padding: 0 15px;
  109. flex-wrap: nowrap;
  110. margin: 7px 0;
  111. line-height: $nav-height;
  112. }
  113. .grid-item-box {
  114. flex: 1;
  115. // position: relative;
  116. /* #ifndef APP-NVUE */
  117. display: flex;
  118. /* #endif */
  119. flex-direction: column;
  120. align-items: center;
  121. justify-content: center;
  122. padding: 15px 0;
  123. }
  124. .grid-item-box-row {
  125. flex: 1;
  126. // position: relative;
  127. /* #ifndef APP-NVUE */
  128. display: flex;
  129. /* #endif */
  130. flex-direction: row;
  131. align-items: center;
  132. justify-content: center;
  133. padding: 15px 0;
  134. }
  135. .grid-dot {
  136. position: absolute;
  137. top: 5px;
  138. right: 15px;
  139. }
  140. .container {
  141. background-color: #f7f7f7;
  142. min-height: 100vh;
  143. overflow: hidden;
  144. }
  145. .head {
  146. position: relative;
  147. top: 0;
  148. left: 0;
  149. z-index: 1;
  150. }
  151. .head-bg {
  152. position: absolute;
  153. left: 0px;
  154. top: 0px;
  155. z-index: -1;
  156. width: 750rpx;
  157. height: 270rpx;
  158. background: #0bb9c8;
  159. }
  160. .nav-wrap {
  161. width: 100%;
  162. padding: 0 22rpx;
  163. display: flex;
  164. justify-content: space-between;
  165. align-items: center;
  166. .picker-box {
  167. flex: 1;
  168. display: flex;
  169. align-items: center;
  170. justify-content: flex-start;
  171. font-size: 32rpx;
  172. font-family: Microsoft YaHei;
  173. font-weight: bold;
  174. color: #ffffff;
  175. .arrow {
  176. margin-left: 10rpx;
  177. }
  178. }
  179. .logo {
  180. flex-shrink: 0;
  181. width: 100rpx;
  182. height: auto;
  183. }
  184. .search-input {
  185. width: 300rpx;
  186. height: 50rpx;
  187. }
  188. .tool {
  189. flex: 1;
  190. display: flex;
  191. align-items: center;
  192. justify-content: flex-end;
  193. .icon {
  194. height: auto;
  195. }
  196. .search-icon {
  197. width: 40rpx;
  198. margin-right: 34rpx;
  199. }
  200. .message-icon {
  201. width: 32rpx;
  202. margin-right: 27rpx;
  203. }
  204. .qr-icon {
  205. width: 37rpx;
  206. }
  207. }
  208. }
  209. .swiper-box {
  210. margin: 50rpx auto 0;
  211. width: 710rpx;
  212. height: 253rpx;
  213. .swiper-item {
  214. width: 100%;
  215. height: 100%;
  216. .banner {
  217. width: 100%;
  218. height: 100%;
  219. }
  220. }
  221. }
  222. .nav {
  223. margin: 0rpx 0;
  224. box-sizing: border-box;
  225. padding: 0 10rpx;
  226. &-item {
  227. width: 100%;
  228. box-sizing: border-box;
  229. display: flex;
  230. flex-direction: column;
  231. align-items: center;
  232. justify-content: space-between;
  233. height: 130rpx;
  234. &-img {
  235. width: 80rpx;
  236. height: 80rpx;
  237. }
  238. &-name {
  239. font-size: 26rpx;
  240. font-family: PingFang SC;
  241. font-weight: 400;
  242. color: #585b61;
  243. }
  244. }
  245. }
  246. .video-box {
  247. display: flex;
  248. justify-content: flex-start;
  249. flex-direction: column;
  250. width: 100%;
  251. .video-body {
  252. display: flex;
  253. justify-content: center;
  254. flex-direction: row;
  255. }
  256. .video-title {
  257. display: flex;
  258. justify-content: center;
  259. flex-direction: row;
  260. .text {
  261. margin-top: 10rpx;
  262. margin-bottom: 10rpx;
  263. width: 640rpx;
  264. // flex: 1;
  265. min-width: 0;
  266. overflow: hidden;
  267. text-overflow: ellipsis;
  268. display: -webkit-box;
  269. -webkit-line-clamp: 1;
  270. -webkit-box-orient: vertical;
  271. }
  272. }
  273. }
  274. .notice-box {
  275. display: flex;
  276. align-items: center;
  277. background: #ffffff;
  278. border-radius: 20px 20px 20px 20px;
  279. margin: 0 20rpx;
  280. padding: 30rpx 20rpx;
  281. .img {
  282. width: 75rpx;
  283. height: auto;
  284. margin-right: 36rpx;
  285. margin-left: 10rpx;
  286. }
  287. .notice-info {
  288. flex: 1;
  289. .notice-cell:first-of-type {
  290. margin-bottom: 15rpx;
  291. }
  292. }
  293. .notice-cell {
  294. display: flex;
  295. align-items: center;
  296. font-size: 24rpx;
  297. font-family: PingFang SC;
  298. font-weight: 500;
  299. color: #585b61;
  300. .icon {
  301. width: 63rpx;
  302. margin-right: 18rpx;
  303. }
  304. .text {
  305. flex: 1;
  306. min-width: 0;
  307. overflow: hidden;
  308. text-overflow: ellipsis;
  309. display: -webkit-box;
  310. -webkit-line-clamp: 1;
  311. -webkit-box-orient: vertical;
  312. }
  313. }
  314. }
  315. .service-box {
  316. background: #ffffff;
  317. border-radius: 20px 20px 20px 20px;
  318. margin: 30rpx 20rpx 0;
  319. padding: 0rpx 20rpx;
  320. .service-item {
  321. display: flex;
  322. flex-direction: column;
  323. justify-content: space-between;
  324. align-items: center;
  325. width: 100%;
  326. height: 120rpx;
  327. font-size: 26rpx;
  328. font-family: PingFang SC;
  329. font-weight: 500;
  330. color: #585b61;
  331. .img {
  332. width: 70rpx;
  333. height: auto;
  334. }
  335. }
  336. }
  337. .slot-image {
  338. /* #ifndef APP-NVUE */
  339. display: block;
  340. /* #endif */
  341. margin-right: 10px;
  342. width: 30px;
  343. height: 30px;
  344. }
  345. .more {
  346. display: flex;
  347. align-items: center;
  348. font-size: 26rpx;
  349. font-family: PingFang SC;
  350. font-weight: 500;
  351. color: #a6abb5;
  352. }
  353. .orders {
  354. background: #ffffff;
  355. border-radius: 20px 20px 20px 20px;
  356. margin: 30rpx 20rpx 60rpx;
  357. padding: 30rpx 20rpx;
  358. .cell {
  359. display: flex;
  360. justify-content: space-between;
  361. align-items: center;
  362. .ctitle {
  363. font-size: 32rpx;
  364. font-family: PingFang SC;
  365. font-weight: bold;
  366. color: #585b61;
  367. }
  368. .more {
  369. display: flex;
  370. align-items: center;
  371. font-size: 26rpx;
  372. font-family: PingFang SC;
  373. font-weight: 500;
  374. color: #a6abb5;
  375. }
  376. }
  377. .orders-list {
  378. margin-top: 30rpx;
  379. .orders-item {
  380. &:not(:last-of-type) {
  381. padding: 0 0 30rpx;
  382. margin-bottom: 30rpx;
  383. border-bottom: 1px solid #eeeeee;
  384. }
  385. display: flex;
  386. align-items: center;
  387. justify-content: space-between;
  388. .left {
  389. flex: 1;
  390. height: 160rpx;
  391. display: flex;
  392. flex-direction: column;
  393. justify-content: space-around;
  394. .info {
  395. min-width: 0;
  396. overflow: hidden;
  397. text-overflow: ellipsis;
  398. display: -webkit-box;
  399. -webkit-line-clamp: 2;
  400. -webkit-box-orient: vertical;
  401. font-size: 28rpx;
  402. font-family: PingFang SC;
  403. font-weight: 500;
  404. color: #585b61;
  405. line-height: 36rpx;
  406. }
  407. .date {
  408. display: flex;
  409. align-items: center;
  410. .icon {
  411. width: 21rpx;
  412. height: 21rpx;
  413. margin-right: 9rpx;
  414. }
  415. font-size: 26rpx;
  416. font-family: PingFang SC;
  417. font-weight: 500;
  418. color: #a6abb5;
  419. }
  420. }
  421. // .img {
  422. // flex-shrink: 0;
  423. // width: 252rpx;
  424. // height: 160rpx;
  425. // border-radius: 20rpx;
  426. // background-color: #82848a;
  427. // }
  428. }
  429. }
  430. }
  431. </style>