index.vue 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261
  1. <template>
  2. <view>
  3. <u-navbar v-show="false" title="首页" title-color="#101010"></u-navbar>
  4. <view class="navbar">
  5. 智泊e家 运管端
  6. </view>
  7. <view class="tabs-box">
  8. </view>
  9. <view class="main">
  10. <view class="statistics ">
  11. <view class="title">
  12. <view class="icon">
  13. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  14. </view>
  15. <view class="text">
  16. 综合统计
  17. </view>
  18. </view>
  19. <view class="contentBody">
  20. <jpContent :status="jpContentMap.body1">
  21. <view class="body1pie-table">
  22. <view class="tr">
  23. <view class="td td1">
  24. <view id="body1pie1" class="body1pie">
  25. </view>
  26. </view>
  27. <view class="td td2">
  28. <view class="td td3">
  29. <view class="td td4">空闲<span class="body1pie-num color53B56B">5</span>台</view>
  30. <view class="td td4">占用<span class="body1pie-num colorAAAAAA">5</span>台</view>
  31. </view>
  32. <view class="td td3">
  33. <view class="td td4">公共车位<span class="body1pie-num colorEF8132">5</span>台</view>
  34. <view class="td td4">私家车位<span class="body1pie-num colorDC4441">5</span>台</view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="tr">
  39. <view class="td td1">
  40. <view id="body1pie2" class="body1pie">
  41. </view>
  42. </view>
  43. <view class="td td2">
  44. <view class="td td3">
  45. <view class="td td4">正常<span class="body1pie-num color53B56B">5</span>台</view>
  46. <view class="td td4">离线<span class="body1pie-num colorAAAAAA">5</span>台</view>
  47. </view>
  48. <view class="td td3">
  49. <view class="td td4">故障<span class="body1pie-num colorEF8132">5</span>台</view>
  50. <view class="td td4">低电量<span class="body1pie-num colorDC4441">5</span>台</view>
  51. </view>
  52. </view>
  53. </view>
  54. <view class="tr">
  55. <view class="td td1">
  56. <view id="body1pie3" class="body1pie">
  57. </view>
  58. </view>
  59. <view class="td td2">
  60. <view class="td td3">
  61. <view class="td td4">管理员<span class="body1pie-num color307AF6">5</span>人</view>
  62. <view class="td td4">白名单<span class="body1pie-num color53B56B">5</span>人</view>
  63. </view>
  64. <view class="td td3">
  65. <view class="td td4">游客<span class="body1pie-num colorEF8375">5</span>人次</view>
  66. <view class="td td4"></view>
  67. </view>
  68. </view>
  69. </view>
  70. </view>
  71. </jpContent>
  72. </view>
  73. </view>
  74. <view class="statistics ">
  75. <view class="title">
  76. <view class="icon">
  77. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  78. </view>
  79. <view class="text">
  80. <view>时空矩阵图</view>
  81. <view class="tag">2025年1月1日<u-icon name="arrow-down"></u-icon></view>
  82. </view>
  83. </view>
  84. <view class="contentBody">
  85. <jpContent :status="jpContentMap.body5">
  86. <view class="body5main">
  87. <view id="body5echart" class="body5class">
  88. </view>
  89. </view>
  90. </jpContent>
  91. </view>
  92. </view>
  93. <view class="statistics ">
  94. <view class="title">
  95. <view class="icon">
  96. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  97. </view>
  98. <view class="text">
  99. <view>车位异常记录</view>
  100. <view class="check-all" >查看全部<u-icon name="arrow-right"></u-icon></view>
  101. </view>
  102. </view>
  103. <view class="contentBody">
  104. <jpContent :status="jpContentMap.body6">
  105. <view class="body6main">
  106. <view class="line" v-for="(item,index) in abnormalRecordsList" :key="index">
  107. <view class="abnormal-item">
  108. <!-- @click="gotoUrl('/pages/abnormal/abnormalAlarmDetails?id='+item.id)"
  109. -->
  110. <view class="item-title">
  111. <view class="name">
  112. <span v-if="item.level==1" class="level level1 ">一级</span>
  113. <span v-if="item.level==2" class="level level2">二级</span>
  114. {{item.content}}
  115. </view>
  116. <view class="date" style="display: flex; justify-content: space-between;margin-top: 4rpx;">
  117. <view>{{item.title}}</view>
  118. <view>{{item.createTime}}</view>
  119. </view>
  120. </view>
  121. </view>
  122. <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
  123. </view>
  124. </view>
  125. </jpContent>
  126. </view>
  127. </view>
  128. <view class="statistics ">
  129. <view class="title">
  130. <view class="icon">
  131. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  132. </view>
  133. <view class="text">
  134. <view>车位平均占用率(%)</view>
  135. <view class="tag">2025年1月<u-icon name="arrow-down"></u-icon></view>
  136. </view>
  137. </view>
  138. <view class="contentBody">
  139. <jpContent :status="jpContentMap.body2">
  140. <view class="body2lineChart">
  141. <view id="body2line1" class="body2line">
  142. </view>
  143. </view>
  144. </jpContent>
  145. </view>
  146. </view>
  147. <view class="statistics ">
  148. <view class="title">
  149. <view class="icon">
  150. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  151. </view>
  152. <view class="text">
  153. <view>高频使用时段分布</view>
  154. </view>
  155. </view>
  156. <view class="contentBody">
  157. <jpContent :status="jpContentMap.body3">
  158. <view class="body3barChart">
  159. <view id="body3bar1" class="body3bar">
  160. </view>
  161. </view>
  162. </jpContent>
  163. </view>
  164. </view>
  165. <view class="statistics ">
  166. <view class="title">
  167. <view class="icon">
  168. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  169. </view>
  170. <view class="text">
  171. <view>用户停留时长分群特征</view>
  172. </view>
  173. </view>
  174. <view class="contentBody">
  175. <jpContent :status="jpContentMap.body4">
  176. <view class="body4pieChart">
  177. <view id="body4pie1" class="body4pie">
  178. </view>
  179. </view>
  180. </jpContent>
  181. </view>
  182. </view>
  183. <view class="statistics ">
  184. <view class="title">
  185. <view class="icon">
  186. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  187. </view>
  188. <view class="text">
  189. <view>设备列表</view>
  190. <view class="check-all" @click="gotoUrl('/pages/deviceTab/index')"
  191. >查看全部<u-icon name="arrow-right"></u-icon></view>
  192. </view>
  193. </view>
  194. <view class="contentBody">
  195. <jpContent :status="jpContentMap.body7">
  196. <view class="body7main">
  197. <view class="line" v-for="(item,index) in equipmentList"
  198. @click="gotoUrl('/pages/deviceTab/dataLock?id='+item.id)"
  199. :key="index">
  200. <view class="item" >
  201. <!--
  202. -->
  203. <view class="item-title">
  204. A01
  205. </view>
  206. <view class="item-tags">
  207. <view class="tag tag1">
  208. 公共车位
  209. </view>
  210. <view class="tag">
  211. 在线
  212. </view>
  213. <view class="tag">
  214. 空闲
  215. </view>
  216. </view>
  217. </view>
  218. <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
  219. </view>
  220. </view>
  221. </jpContent>
  222. </view>
  223. </view>
  224. </view>
  225. <tabbar :current="0"></tabbar>
  226. </view>
  227. </template>
  228. <script>
  229. import Tabbar from '@/components/Tabbar.vue'
  230. import jpContent from '@/components/JPcontent.vue'
  231. import * as echarts from 'echarts';
  232. import * as API from '@/apis/pagejs/index.js'
  233. export default {
  234. components: {
  235. Tabbar,
  236. jpContent
  237. },
  238. data() {
  239. return {
  240. isReady: false,
  241. echartsList: {},
  242. equipmentList:[{}],
  243. abnormalRecordsList:[
  244. {
  245. level:1,
  246. content:"1111111",
  247. title:"11",
  248. createTime:"123:123"
  249. },
  250. {
  251. level:2,
  252. content:"1111111",
  253. title:"11",
  254. createTime:"123:123"
  255. }
  256. ],
  257. jpContentMap: {
  258. body1: 2,
  259. body2: 2,
  260. body3: 2,
  261. body4: 2,
  262. body5: 2,
  263. body6: 2,
  264. body7: 2,
  265. body8: 2,
  266. body9: 2,
  267. body10: 2,
  268. }
  269. }
  270. },
  271. onLoad() {
  272. },
  273. onReady() {
  274. this.getfindByOpenId();
  275. },
  276. methods: {
  277. init() {
  278. // this.getbody2()
  279. // this.getbody3()
  280. // this.getbody4()
  281. this.getbody5()
  282. // this.getbody1pie1()
  283. // this.getbody1pie2()
  284. // this.getbody1pie3()
  285. },
  286. getbody5() {
  287. var key = "body5echart"
  288. var myChart = this.echartsList[key];
  289. if (!myChart) {
  290. myChart = echarts.init(document.getElementById(key), null, {
  291. width: uni.upx2px(300 * 2),
  292. height: uni.upx2px(170 * 2)
  293. })
  294. }
  295. myChart.clear()
  296. // 数据
  297. var data1 = [
  298. [0, 0, 1], // 1点
  299. [1, 0, 1], // 2点
  300. [2, 0, 1], // 3点
  301. [6, 0, 1], // 7点
  302. [7, 0, 1], // 8点
  303. ];
  304. var data2 = [
  305. [2, 1, 2], // 3点
  306. [3, 1, 2], // 4点
  307. [4, 1, 2], // 5点
  308. [5, 1, 2], // 6点
  309. [6, 1, 2], // 7点
  310. [7, 1, 2], // 8点
  311. [8, 1, 2], // 9点
  312. [9, 1, 2], // 10点
  313. [10, 1, 2], // 11点
  314. [11, 1, 2] // 12点
  315. ];
  316. // 颜色映射
  317. var colorMap = [
  318. '#ffffff',
  319. '#FFA500',
  320. '#00FF00',
  321. '#F44336',
  322. '#E91E63' ,
  323. '#9C27B0',
  324. '#673AB7' ,
  325. '#3F51B5',
  326. '#2196F3' ,
  327. '#03A9F4',
  328. '#00BCD4' ,
  329. '#009688',
  330. '#CDDC39' ,
  331. '#FFEB3B' ,
  332. '#FFC107' ,
  333. '#FF9800' ,
  334. '#FF5722' ,
  335. '#795548' ,
  336. '#607D8B'
  337. ];
  338. var option = {
  339. tooltip: {
  340. trigger: 'axis',
  341. axisPointer: {
  342. type: 'shadow'
  343. }
  344. },
  345. grid: {
  346. top: 30,
  347. left: -10,
  348. right: 0,
  349. bottom: 0,
  350. containLabel: true
  351. },
  352. legend: {
  353. data: ['A停车场', 'B停车场']
  354. },
  355. xAxis: {
  356. type: 'category',
  357. data: ['1点', '2点', '3点', '4点', '5点', '6点', '7点', '8点', '9点', '10点', '11点', '12点']
  358. },
  359. yAxis: {
  360. type: 'category',
  361. },
  362. series: [{
  363. type: 'custom',
  364. "name": "A停车场",
  365. itemStyle: {
  366. color: colorMap[1]
  367. },
  368. renderItem: function(params, api) {
  369. var xIndex = api.value(0); // x轴索引
  370. var yIndex = api.value(1); // y轴索引
  371. var value = api.value(2); // 值
  372. // 获取颜色
  373. var color = colorMap[value] || '#ffffff';
  374. // 计算矩形的位置和大小
  375. var x = api.coord([xIndex, yIndex])[0];
  376. var y = api.coord([xIndex, yIndex])[1];
  377. var width = api.size([1, 0])[0];
  378. var height = api.size([0, 1])[1];
  379. return {
  380. type: 'rect',
  381. shape: {
  382. x: x,
  383. y: y - uni.upx2px(40),
  384. width: width,
  385. height: height - uni.upx2px(30),
  386. },
  387. style: {
  388. fill: color
  389. }
  390. };
  391. },
  392. data: data1
  393. }, {
  394. type: 'custom',
  395. "name": "B停车场",
  396. itemStyle: {
  397. color: colorMap[2]
  398. },
  399. renderItem: function(params, api) {
  400. var xIndex = api.value(0); // x轴索引
  401. var yIndex = api.value(1); // y轴索引
  402. var value = api.value(2); // 值
  403. // 获取颜色
  404. var color = colorMap[value] || '#ffffff';
  405. // 计算矩形的位置和大小
  406. var x = api.coord([xIndex, yIndex])[0];
  407. var y = api.coord([xIndex, yIndex])[1];
  408. var width = api.size([1, 0])[0];
  409. var height = api.size([0, 1])[1];
  410. return {
  411. type: 'rect',
  412. shape: {
  413. x: x,
  414. y: y - uni.upx2px(40),
  415. width: width,
  416. height: height - uni.upx2px(30),
  417. },
  418. style: {
  419. fill: color
  420. }
  421. };
  422. },
  423. data: data2
  424. }]
  425. };
  426. //console.log(option)
  427. myChart.setOption(option);
  428. this.echartsList[key] = myChart;
  429. },
  430. getbody4() {
  431. var key = "body4pie1"
  432. var myChart = this.echartsList[key];
  433. if (!myChart) {
  434. myChart = echarts.init(document.getElementById(key), null, {
  435. width: uni.upx2px(300 * 2),
  436. height: uni.upx2px(170 * 2)
  437. })
  438. }
  439. myChart.clear()
  440. var option = {
  441. grid: {
  442. top: 20,
  443. left: 0,
  444. right: 0,
  445. bottom: 0,
  446. containLabel: true
  447. },
  448. series: [{
  449. type: 'pie',
  450. radius: ['80%', '50%'],
  451. radius: [45, 60],
  452. data: [{
  453. value: 1048,
  454. name: '0.5小时\n20%'
  455. },
  456. {
  457. value: 735,
  458. name: '2小时\n10%'
  459. },
  460. {
  461. value: 580,
  462. name: '2-6小时\n30%'
  463. },
  464. {
  465. value: 484,
  466. name: '6小时以上\n40%'
  467. },
  468. ]
  469. }]
  470. };
  471. myChart.setOption(option);
  472. this.echartsList[key] = myChart;
  473. },
  474. getbody3() {
  475. var key = "body3bar1"
  476. var myChart = this.echartsList[key];
  477. if (!myChart) {
  478. myChart = echarts.init(document.getElementById(key), null, {
  479. width: uni.upx2px(300 * 2),
  480. height: uni.upx2px(170 * 2)
  481. })
  482. }
  483. myChart.clear()
  484. var data1 = ['0-7点', '7-14点', '14-24点']
  485. var axisLabel = {
  486. rotate: 40,
  487. interval: 0,
  488. textStyle: {
  489. color: "#333"
  490. }
  491. }
  492. if (data1.length < 7) {
  493. axisLabel = {
  494. interval: 0,
  495. textStyle: {
  496. color: "#333"
  497. },
  498. }
  499. } else {
  500. axisLabel.interval = 0;
  501. }
  502. var option = {
  503. xAxis: {
  504. type: 'category',
  505. data: data1,
  506. axisLabel: axisLabel,
  507. },
  508. tooltip: {
  509. trigger: 'axis',
  510. axisPointer: {
  511. type: 'shadow'
  512. }
  513. },
  514. yAxis: {
  515. type: 'value'
  516. },
  517. grid: {
  518. top: 20,
  519. left: 0,
  520. right: 0,
  521. bottom: 0,
  522. containLabel: true
  523. },
  524. series: [{
  525. itemStyle: {
  526. color: "#5A88E5"
  527. },
  528. data: [120, 200, 150],
  529. type: 'bar'
  530. }]
  531. };
  532. myChart.setOption(option);
  533. this.echartsList[key] = myChart;
  534. },
  535. getbody2() {
  536. var key = "body2line1"
  537. var myChart = this.echartsList[key];
  538. if (!myChart) {
  539. myChart = echarts.init(document.getElementById(key), null, {
  540. width: uni.upx2px(300 * 2),
  541. height: uni.upx2px(170 * 2)
  542. })
  543. }
  544. myChart.clear()
  545. var data1 = ['0-2点', '2-4点', '4-6点', '6-8点', '8-10点', '10-12点', '12-14点', '14-16点', '16-18点', '18-20点',
  546. '20-22点', '22-24点'
  547. ]
  548. var axisLabel = {
  549. rotate: 40,
  550. interval: 0,
  551. textStyle: {
  552. color: "#333"
  553. }
  554. }
  555. if (data1.length < 7) {
  556. axisLabel = {
  557. interval: 0,
  558. textStyle: {
  559. color: "#333"
  560. },
  561. }
  562. } else {
  563. axisLabel.interval = 0;
  564. }
  565. var option = {
  566. xAxis: {
  567. type: 'category',
  568. data: data1,
  569. axisLabel: axisLabel,
  570. },
  571. tooltip: {
  572. trigger: 'axis',
  573. axisPointer: {
  574. type: 'shadow'
  575. }
  576. },
  577. yAxis: {
  578. type: 'value'
  579. },
  580. grid: {
  581. top: 20,
  582. left: 0,
  583. right: 0,
  584. bottom: 0,
  585. containLabel: true
  586. },
  587. series: [{
  588. areaStyle: {},
  589. itemStyle: {
  590. color: "#BBD4FB"
  591. },
  592. label: {
  593. show: true,
  594. position: 'top',
  595. color: "#307AF6"
  596. },
  597. data: [50, 30, 24, 18, 35, 47, 50, 30, 24, 28, 35, 47],
  598. type: 'line'
  599. }]
  600. };
  601. myChart.setOption(option);
  602. this.echartsList[key] = myChart;
  603. },
  604. getbody1pie1() {
  605. var img = require("@/assets/img/index/pie1-1.svg")
  606. var key = "body1pie1"
  607. var myChart = this.echartsList[key];
  608. if (!myChart) {
  609. myChart = echarts.init(document.getElementById(key), null, {
  610. width: uni.upx2px(88),
  611. height: uni.upx2px(88)
  612. })
  613. }
  614. myChart.clear()
  615. var option = {
  616. series: [{
  617. silent: true,
  618. type: 'pie',
  619. radius: ['70%', '100%'],
  620. label: {
  621. show: false,
  622. },
  623. data: [{
  624. value: 1048,
  625. itemStyle: {
  626. color: '#AAAAAA'
  627. }
  628. },
  629. {
  630. value: 735,
  631. itemStyle: {
  632. color: '#53B56B'
  633. }
  634. }
  635. ]
  636. }],
  637. grid: {
  638. top: 0,
  639. left: 0,
  640. right: 0,
  641. bottom: 0,
  642. containLabel: true
  643. },
  644. graphic: [{
  645. type: 'image',
  646. id: 'logo',
  647. left: 'center',
  648. top: 'center',
  649. style: {
  650. image: img, // 图片路径
  651. width: uni.upx2px(40),
  652. height: uni.upx2px(40)
  653. }
  654. }]
  655. }
  656. myChart.setOption(option);
  657. this.echartsList[key] = myChart;
  658. },
  659. getbody1pie2() {
  660. var img = require("@/assets/img/index/pie1-2.svg")
  661. var key = "body1pie2"
  662. var myChart = this.echartsList[key];
  663. if (!myChart) {
  664. myChart = echarts.init(document.getElementById(key), null, {
  665. width: uni.upx2px(88),
  666. height: uni.upx2px(88)
  667. })
  668. }
  669. myChart.clear()
  670. var option = {
  671. series: [{
  672. silent: true,
  673. type: 'pie',
  674. radius: ['70%', '100%'],
  675. label: {
  676. show: false,
  677. },
  678. data: [{
  679. value: 1048,
  680. itemStyle: {
  681. color: '#AAAAAA'
  682. }
  683. },
  684. {
  685. value: 735,
  686. itemStyle: {
  687. color: '#53B56B'
  688. }
  689. },
  690. {
  691. value: 1048,
  692. itemStyle: {
  693. color: '#EF8132'
  694. }
  695. },
  696. {
  697. value: 735,
  698. itemStyle: {
  699. color: '#DC4441'
  700. }
  701. }
  702. ]
  703. }],
  704. grid: {
  705. top: 0,
  706. left: 0,
  707. right: 0,
  708. bottom: 0,
  709. containLabel: true
  710. },
  711. graphic: [{
  712. type: 'image',
  713. id: 'logo',
  714. left: 'center',
  715. top: 'center',
  716. style: {
  717. image: img, // 图片路径
  718. width: uni.upx2px(40),
  719. height: uni.upx2px(40)
  720. }
  721. }]
  722. }
  723. myChart.setOption(option);
  724. this.echartsList[key] = myChart;
  725. },
  726. getbody1pie3() {
  727. var img = require("@/assets/img/index/pie1-3.svg")
  728. var key = "body1pie3"
  729. var myChart = this.echartsList[key];
  730. if (!myChart) {
  731. myChart = echarts.init(document.getElementById(key), null, {
  732. width: uni.upx2px(88),
  733. height: uni.upx2px(88)
  734. })
  735. }
  736. myChart.clear()
  737. var option = {
  738. series: [{
  739. type: 'pie',
  740. silent: true, // 禁用交互效果
  741. radius: ['70%', '100%'],
  742. label: {
  743. show: false,
  744. },
  745. data: [{
  746. value: 735,
  747. itemStyle: {
  748. color: '#53B56B'
  749. }
  750. },
  751. {
  752. value: 735,
  753. itemStyle: {
  754. color: '#EF8375'
  755. }
  756. },
  757. {
  758. value: 735,
  759. itemStyle: {
  760. color: '#307AF6'
  761. }
  762. }
  763. ]
  764. }],
  765. grid: {
  766. top: 0,
  767. left: 0,
  768. right: 0,
  769. bottom: 0,
  770. containLabel: true
  771. },
  772. graphic: [{
  773. type: 'image',
  774. id: 'logo',
  775. left: 'center',
  776. top: 'center',
  777. style: {
  778. image: img, // 图片路径
  779. width: uni.upx2px(40),
  780. height: uni.upx2px(40)
  781. }
  782. }]
  783. }
  784. myChart.setOption(option);
  785. this.echartsList[key] = myChart;
  786. },
  787. getfindByOpenId() {
  788. uni.showLoading({
  789. title: "加载中",
  790. mask: true,
  791. })
  792. API.findByOpenId({
  793. openId: this.jphelp.getOpenId(),
  794. }).then((response) => {
  795. uni.hideLoading();
  796. this.isReady = true;
  797. this.loginset(response)
  798. try {
  799. this.init()
  800. } catch (e) {
  801. console.log(e)
  802. uni.showToast({
  803. title: e,
  804. icon: "none"
  805. })
  806. }
  807. }).catch(error => {
  808. uni.showToast({
  809. title: error,
  810. icon: "none"
  811. })
  812. uni.redirectTo({
  813. url: '/pages/login/login'
  814. })
  815. })
  816. }
  817. }
  818. }
  819. </script>
  820. <style scoped lang="scss">
  821. .color307AF6 {
  822. color: #307AF6
  823. }
  824. .color53B56B {
  825. color: #53B56B
  826. }
  827. .colorAAAAAA {
  828. color: #AAAAAA
  829. }
  830. .colorEF8132 {
  831. color: #EF8132
  832. }
  833. .colorDC4441 {
  834. color: #DC4441
  835. }
  836. .colorEF8375 {
  837. color: #EF8375
  838. }
  839. .body1pie-table {
  840. color: rgba(51, 51, 51, 1);
  841. font-size: 32rpx;
  842. font-weight: bold;
  843. .tr {
  844. .td1 {
  845. padding-right: 24rpx;
  846. }
  847. display: flex;
  848. margin-bottom: 40rpx;
  849. .td2 {
  850. width: 100%;
  851. .td3 {
  852. display: flex;
  853. .td4 {
  854. width: 120px;
  855. }
  856. }
  857. }
  858. }
  859. // td{
  860. // padding-right: 24rpx;
  861. // }
  862. .body1pie {}
  863. .body1pie-num {
  864. margin: 0 8rpx;
  865. }
  866. }
  867. // 导航栏
  868. .navbar {
  869. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
  870. background-color: rgba(22, 119, 255, 1);
  871. color: #fff;
  872. line-height: 88rpx;
  873. display: flex;
  874. justify-content: space-between;
  875. align-items: center;
  876. padding: 0 32rpx;
  877. color: rgba(255, 255, 255, 1);
  878. font-size: 36rpx;
  879. position: fixed;
  880. left: 0;
  881. right: 0;
  882. top: 0;
  883. z-index: 999999;
  884. font-weight: bold;
  885. }
  886. .main {
  887. border-radius: 16px 16px 0px 0px;
  888. background: linear-gradient(180deg, rgba(242, 244, 246, 1) 61%, rgba(255, 255, 255, 0) 100%);
  889. margin-top: -24rpx;
  890. padding: 32rpx;
  891. .statistics {
  892. border-radius: 8px;
  893. background-color: rgba(255, 255, 255, 1);
  894. box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
  895. margin-bottom: 24rpx;
  896. padding: 40rpx;
  897. .title {
  898. display: flex;
  899. align-items: center;
  900. margin-bottom: 32rpx;
  901. .img {
  902. width: 36rpx;
  903. height: 36rpx;
  904. vertical-align: middle;
  905. border-radius: 999px;
  906. }
  907. .change {
  908. display: flex;
  909. align-items: center;
  910. .change-img {
  911. width: 32rpx;
  912. height: 32rpx;
  913. vertical-align: middle;
  914. }
  915. text {
  916. margin-left: 8rpx;
  917. }
  918. }
  919. .text {
  920. color: rgba(16, 16, 16, 1);
  921. font-size: 36rpx;
  922. margin-left: 16rpx;
  923. display: flex;
  924. justify-content: space-between;
  925. align-items: center;
  926. width: 100%;
  927. .tag {
  928. border-radius: 4px;
  929. border: 1px solid rgba(187, 187, 187, 1);
  930. color: rgba(51, 51, 51, 1);
  931. font-size: 24rpx;
  932. padding: 1px 8rpx;
  933. margin-left: 8rpx;
  934. }
  935. }
  936. .change {
  937. margin-left: 16rpx;
  938. font-size: 24rpx;
  939. color: #838383;
  940. }
  941. .check-all {
  942. margin-left: auto;
  943. color: rgba(131, 131, 131, 1);
  944. font-size: 24rpx;
  945. }
  946. }
  947. }
  948. .statistics-end {
  949. padding-bottom: 0;
  950. }
  951. }
  952. .tabs-box {
  953. padding: 32rpx 0;
  954. margin-top: 66rpx;
  955. padding-right: 32rpx;
  956. background-color: rgba(22, 119, 255, 1);
  957. display: flex;
  958. align-items: center;
  959. justify-content: space-between;
  960. .tabs {
  961. width: 97%;
  962. }
  963. .more {
  964. padding-right: 12rpx;
  965. }
  966. }
  967. .body6main{
  968. .line{
  969. display: flex;
  970. justify-content: space-between;
  971. }
  972. .abnormal-item:last-of-type {
  973. border-bottom: none !important;
  974. padding-bottom: 0;
  975. }
  976. .abnormal-item {
  977. width: 100%;
  978. display: flex;
  979. justify-content: space-between;
  980. align-items: center;
  981. padding: 16rpx;
  982. border-bottom: 1px solid rgba(245, 245, 245, 1);
  983. .item-title {
  984. .level{
  985. color:#fff;
  986. border-radius: 8rpx;
  987. font-weight: 400;
  988. padding: 4rpx 8rpx;
  989. font-size: 22rpx;
  990. margin-right: 2px;
  991. }
  992. .level1{
  993. background: red;
  994. }
  995. .level2{
  996. background-color: rgba(255,123,0,1);
  997. }
  998. color: rgba(51, 51, 51, 1);
  999. width: 100%;
  1000. .img {
  1001. width: 32rpx;
  1002. height: 32rpx;
  1003. margin-right: 8rpx;
  1004. }
  1005. .name {
  1006. color: rgba(51, 51, 51, 1);
  1007. font-weight: bold;
  1008. overflow: hidden;
  1009. white-space: nowrap;
  1010. text-overflow: ellipsis;
  1011. }
  1012. .date {
  1013. color: rgba(119, 119, 119, 1);
  1014. font-size: 24rpx;
  1015. }
  1016. }
  1017. .item-value {
  1018. text-align: right;
  1019. display: flex;
  1020. align-items: center;
  1021. .more {
  1022. margin-left: 8rpx;
  1023. }
  1024. .value1 {
  1025. font-weight: bold;
  1026. color: rgba(51, 51, 51, 1);
  1027. }
  1028. .value2 {
  1029. color: rgba(119, 119, 119, 1);
  1030. font-size: 24rpx;
  1031. }
  1032. }
  1033. }
  1034. }
  1035. .body7main{
  1036. border-radius: 4px;
  1037. background-color: rgba(245,245,245,1);
  1038. padding:32rpx;
  1039. .line{
  1040. display: flex;
  1041. display: flex;
  1042. justify-content: space-between;
  1043. .item-title{
  1044. color: rgba(51,51,51,1);
  1045. font-size: 28rpx;
  1046. }
  1047. .item-tags{
  1048. display: flex;
  1049. .tag{
  1050. border-radius: 4px;
  1051. background-color: rgba(39,177,72,1);
  1052. color: rgba(255,255,255,1);
  1053. font-size: 20rpx;
  1054. padding:2rpx 8rpx;
  1055. margin-right: 8rpx;
  1056. }
  1057. .tag1{
  1058. background-color: rgba(22,119,255,1);
  1059. }
  1060. }
  1061. }
  1062. }
  1063. </style>