dataUser.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. <template>
  2. <view>
  3. <u-navbar title="用户详情"></u-navbar>
  4. <view class="gradient-header">
  5. <view class="jpback">
  6. </view>
  7. </view>
  8. <view class="main">
  9. <view class="statistics ">
  10. <view class="data1">
  11. <view class="imgclass">
  12. <img class="img" src="@/assets/img/默认头像.png" mode=""></img>
  13. </view>
  14. <view class="item">
  15. <view class="name">
  16. <view>软件园</view>
  17. <view class="tag">停车用户</view>
  18. </view>
  19. <view class="value">
  20. <image class="img img1" src="@/assets/img/userTab/index1-2.svg" mode=""></image>
  21. 123111
  22. </view>
  23. <view class="value">
  24. <image class="img img2" src="@/assets/img/userTab/index1-1.svg" mode=""></image>
  25. 123111
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. <!--end-->
  31. <view class="statistics ">
  32. <view class="data2">
  33. <view class="line line1">
  34. <view class="item1">
  35. 累计停车时长
  36. </view>
  37. <view class="item">
  38. 使用次数
  39. </view>
  40. <view class="item">
  41. 异常次数
  42. </view>
  43. </view>
  44. <view class="line line2">
  45. <view class="item1">
  46. 205h13m
  47. </view>
  48. <view class="item">
  49. 22
  50. </view>
  51. <view class="item">
  52. 2
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. <!--end-->
  58. <view class="statistics ">
  59. <view class="title">
  60. <view class="icon">
  61. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  62. </view>
  63. <view class="text">
  64. <view>常用时段雷达图</view>
  65. </view>
  66. </view>
  67. <view class="contentBody">
  68. <jpContent :status="jpContentMap.body3">
  69. <view class="body3">
  70. <view id="body3echart" class="body3echart">
  71. </view>
  72. </view>
  73. </jpContent>
  74. </view>
  75. </view>
  76. <!--end-->
  77. <view class="statistics ">
  78. <view class="title">
  79. <view class="icon">
  80. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  81. </view>
  82. <view class="text">
  83. <view>停留时长次数统计</view>
  84. </view>
  85. </view>
  86. <view class="contentBody">
  87. <jpContent :status="jpContentMap.body4">
  88. <view class="body4">
  89. <view id="body4echart" class="body4echart">
  90. </view>
  91. </view>
  92. </jpContent>
  93. </view>
  94. </view>
  95. <!--end-->
  96. <view class="statistics ">
  97. <view class="title">
  98. <view class="icon">
  99. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  100. </view>
  101. <view class="text">
  102. <view>常用停车场</view>
  103. </view>
  104. </view>
  105. <view class="contentBody">
  106. <jpContent :status="jpContentMap.body5">
  107. <view class="body5data">
  108. <view class="line">
  109. <view class="value value1">
  110. 停车场
  111. </view>
  112. <view class="value value2">
  113. 车主身份
  114. </view>
  115. <view class="value value3">
  116. 使用次数
  117. </view>
  118. <view class="value value4">
  119. 操作
  120. </view>
  121. </view>
  122. <view class="line line2">
  123. <view class="value value1">
  124. 荆鹏软件园荆鹏软件园荆鹏软件园
  125. </view>
  126. <view class="value value2">
  127. 地锁所有人
  128. </view>
  129. <view class="value value3">
  130. 22
  131. </view>
  132. <view class="value value4">
  133. 查看
  134. </view>
  135. </view>
  136. <view class="line line2">
  137. <view class="value value1">
  138. 荆州院子
  139. </view>
  140. <view class="value value2">
  141. 白名单用户
  142. </view>
  143. <view class="value value3">
  144. 11
  145. </view>
  146. <view class="value value4">
  147. 查看
  148. </view>
  149. </view>
  150. </view>
  151. </jpContent>
  152. </view>
  153. </view>
  154. <!--end-->
  155. <u-divider border-color="#CFD2D5">已经到底了</u-divider>
  156. </view>
  157. </view>
  158. </template>
  159. <script>
  160. import jpContent from '@/components/JPcontent.vue'
  161. import * as echarts from 'echarts';
  162. export default {
  163. components: {
  164. jpContent
  165. },
  166. data() {
  167. return {
  168. echartsList: {},
  169. jpContentMap: {
  170. body1: 2,
  171. body2: 2,
  172. body3: 2,
  173. body4: 2,
  174. body5: 2,
  175. body6: 2,
  176. body7: 2,
  177. body8: 2,
  178. body9: 2,
  179. body10: 2,
  180. },
  181. };
  182. },
  183. onLoad() {
  184. },
  185. onReady() {
  186. this.init();
  187. },methods: {
  188. init() {
  189. this.getbody3()
  190. this.getbody4()
  191. },
  192. getbody4(){
  193. var key = "body4echart"
  194. var myChart = this.echartsList[key];
  195. if (!myChart) {
  196. myChart = echarts.init(document.getElementById(key), null, {
  197. width: uni.upx2px(300 * 2),
  198. height: uni.upx2px(170 * 2)
  199. })
  200. }
  201. myChart.clear()
  202. var data1 = ['0.5小时', '2小时', '2-6小时','6小时以上']
  203. var option = {
  204. xAxis: {
  205. type: 'category',
  206. data: data1,
  207. },
  208. tooltip: {
  209. trigger: 'axis',
  210. axisPointer: {
  211. type: 'shadow'
  212. }
  213. },
  214. yAxis: {
  215. type: 'value',
  216. },
  217. grid: {
  218. top: 20,
  219. left: 0,
  220. right: 20,
  221. bottom: 0,
  222. containLabel: true
  223. },
  224. series: [{
  225. label: {
  226. show: true,
  227. position: 'top',
  228. color: "#307AF6"
  229. },
  230. itemStyle: {
  231. color: "#5A88E5"
  232. },
  233. data: [120, 200, 150,22],
  234. type: 'bar'
  235. }]
  236. };
  237. myChart.setOption(option);
  238. this.echartsList[key] = myChart;
  239. },
  240. getbody3() {
  241. var key = "body3echart"
  242. var myChart = this.echartsList[key];
  243. if (!myChart) {
  244. myChart = echarts.init(document.getElementById(key), null, {
  245. width: uni.upx2px(300 * 2),
  246. height: uni.upx2px(170 * 2)
  247. })
  248. }
  249. myChart.clear()
  250. var data1 = ['0-7点', '7-14点', '14-24点']
  251. var option = {
  252. xAxis: {
  253. type: 'value',
  254. boundaryGap: [0, 0.01]
  255. },
  256. tooltip: {
  257. trigger: 'axis',
  258. axisPointer: {
  259. type: 'shadow'
  260. }
  261. },
  262. yAxis: {
  263. type: 'category',
  264. data: data1,
  265. },
  266. grid: {
  267. top: 20,
  268. left: 0,
  269. right: 20,
  270. bottom: 0,
  271. containLabel: true
  272. },
  273. series: [{
  274. label: {
  275. show: true,
  276. position:'right' ,
  277. color: "#307AF6"
  278. },
  279. itemStyle: {
  280. color: "#5A88E5"
  281. },
  282. data: [120, 200, 150],
  283. type: 'bar'
  284. }]
  285. };
  286. myChart.setOption(option);
  287. this.echartsList[key] = myChart;
  288. },
  289. }
  290. }
  291. </script>
  292. <style lang="scss">
  293. .gradient-header {
  294. height: 0px;
  295. }
  296. .jpback {
  297. height: 268rpx;
  298. background: linear-gradient(180deg, rgba(203, 234, 255, 1) 0%, rgba(203, 234, 255, 0) 100%);
  299. }
  300. .main {
  301. padding: 32rpx;
  302. .no_statistics {
  303. margin-bottom: 24rpx;
  304. }
  305. .statistics {
  306. border-radius: 8px;
  307. background-color: rgba(255, 255, 255, 1);
  308. box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
  309. margin-bottom: 24rpx;
  310. padding: 40rpx;
  311. .title {
  312. display: flex;
  313. align-items: center;
  314. margin-bottom: 32rpx;
  315. font-weight: bold;
  316. .img {
  317. width: 36rpx;
  318. height: 36rpx;
  319. vertical-align: middle;
  320. border-radius: 999px;
  321. }
  322. .change {
  323. display: flex;
  324. align-items: center;
  325. .change-img {
  326. width: 32rpx;
  327. height: 32rpx;
  328. vertical-align: middle;
  329. }
  330. text {
  331. margin-left: 8rpx;
  332. }
  333. }
  334. .text {
  335. color: rgba(16, 16, 16, 1);
  336. font-size: 36rpx;
  337. margin-left: 16rpx;
  338. display: flex;
  339. justify-content: space-between;
  340. align-items: center;
  341. width: 100%;
  342. .tag {
  343. border-radius: 4px;
  344. border: 1px solid rgba(187, 187, 187, 1);
  345. color: rgba(51, 51, 51, 1);
  346. font-size: 24rpx;
  347. padding: 1px 8rpx;
  348. margin-left: 8rpx;
  349. }
  350. }
  351. .change {
  352. margin-left: 16rpx;
  353. font-size: 24rpx;
  354. color: #838383;
  355. }
  356. .check-all {
  357. margin-left: auto;
  358. color: rgba(131, 131, 131, 1);
  359. font-size: 24rpx;
  360. }
  361. }
  362. }
  363. }
  364. .data1 {
  365. display: flex;
  366. .imgclass {
  367. display: flex;
  368. align-items: center;
  369. justify-content: center;
  370. width: 160rpx;
  371. height: 160rpx;
  372. .img {
  373. width: 160rpx;
  374. height: 160rpx;
  375. }
  376. border-radius: 4px;
  377. background-color: #E5E5E5;
  378. }
  379. .item {
  380. margin-left: 16rpx;
  381. display: flex;
  382. flex-direction: column;
  383. justify-content: space-around;
  384. .name {
  385. font-size: 40rpx;
  386. color: rgba(16, 16, 16, 1);
  387. display: flex;
  388. align-items: center;
  389. .tag {
  390. border-radius: 4px;
  391. background-color: rgba(255, 255, 255, 1);
  392. color: rgba(22, 119, 255, 1);
  393. font-size: 12px;
  394. border: 1px solid rgba(22, 119, 255, 1);
  395. padding: 1px 2px;
  396. margin-left: 8rpx;
  397. }
  398. }
  399. .value {
  400. display: flex;
  401. align-items: center;
  402. color: rgba(119, 119, 119, 1);
  403. font-size: 28rpx;
  404. .img {
  405. width: 32rpx;
  406. height: 32rpx;
  407. margin-right: 8rpx;
  408. }
  409. .img1 {}
  410. .img2 {}
  411. }
  412. }
  413. }
  414. .data2 {
  415. .line {
  416. display: flex;
  417. .item1 {
  418. width: 50%;
  419. }
  420. .item {
  421. width: 25%;
  422. }
  423. }
  424. .line1 {
  425. color: rgba(51, 51, 51, 1);
  426. font-size: 16px;
  427. }
  428. .line2 {
  429. color: rgba(16, 16, 16, 1);
  430. font-weight: bold;
  431. font-size: 24px;
  432. }
  433. }
  434. .body5data {
  435. .line {
  436. display: flex;
  437. align-items: center;
  438. justify-content: space-between;
  439. .value {
  440. padding: 16rpx 4rpx;
  441. color: rgba(51, 51, 51, 1);
  442. }
  443. .value1{
  444. overflow: hidden;
  445. white-space: nowrap;
  446. text-overflow: ellipsis;
  447. }
  448. .value1{
  449. width: 120px;
  450. padding-left: 16rpx;
  451. }
  452. .value2{
  453. width: 75px;
  454. }
  455. .value3{
  456. width: 60px;
  457. text-align: center;
  458. }
  459. .value4{
  460. width: 40px;
  461. }
  462. }
  463. .line2{
  464. .value4{
  465. color: #1677FF;
  466. }
  467. }
  468. /* 隔行变色: 偶数行设置背景色 */
  469. .line:nth-child(odd) {
  470. background-color: #F2F2F2;
  471. /* 偶数行 */
  472. }
  473. .line:nth-child(even) {
  474. background-color: #FFFFFF
  475. /* 奇数行 */
  476. }
  477. }
  478. </style>