index.vue 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171
  1. <template>
  2. <view>
  3. <u-navbar v-show="false" title="首页" title-color="#101010"></u-navbar>
  4. <u-picker v-model="body2data.vue.show" :params="body2data.vue.params" :default-time="body2data.query.startTime"
  5. @confirm="body2dataconfirm" mode="time"></u-picker>
  6. <!-- <u-picker v-model="body5data.vue.show" :default-time="body5data.query.queryDate" :params="body5data.vue.params"
  7. @confirm="body5dataconfirm" mode="time"></u-picker> -->
  8. <u-calendar v-model="body5data.vue.show" mode="date" @change="body5dataconfirm"></u-calendar>
  9. <view class="navbar">
  10. 智泊e家 运管端
  11. </view>
  12. <view class="tabs-box">
  13. <u-picker-jp v-model="showselect1" range-key="name" :num="3" @confirm="showselect1confirm"
  14. :range="companyList"></u-picker-jp>
  15. <template v-if="companyListTabs.length>2">
  16. <u-tabs ref="tabs" :list="companyListTabs" bg-color="#1677ff" :current="current1" inactive-color="#fff"
  17. @change="utabsChange1" item-width="180" height="70" gutter="10" active-color="#fff"></u-tabs>
  18. <view class="tabs-box-other" v-if="companyList.length>3" @click="utabsChange1other">
  19. 更多
  20. </view>
  21. </template>
  22. </view>
  23. <view class="main">
  24. <u-picker-jp v-model="showselect2" range-key="name" :num='3' @confirm="showselect2confirm"
  25. :range="parkingList"></u-picker-jp>
  26. <view class="tabs-box2" v-show="parkingListTabs.length>2">
  27. <u-tabs ref="tabs2" gutter="10" :list="parkingListTabs" :current="current2" @change="utabsChange2"
  28. item-width="180" bg-color="#f2f4f6" height="70"></u-tabs>
  29. <view v-if="parkingList.length>3" class="tabs-box-other" @click="utabsChange2other">
  30. 更多
  31. </view>
  32. </view>
  33. <view class="statistics ">
  34. <view class="title">
  35. <view class="icon">
  36. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  37. </view>
  38. <view class="text">
  39. 综合统计
  40. </view>
  41. </view>
  42. <view class="contentBody">
  43. <jpContent :status="jpContentMap.body1">
  44. <view class="body1pie-table">
  45. <view class="tr">
  46. <view class="td td1">
  47. <view id="body1pie1" class="body1pie">
  48. </view>
  49. </view>
  50. <view class="td td2">
  51. <view class="td td3">
  52. <view class="td td4">空闲<span
  53. class="body1pie-num color53B56B">{{body1data.data.idleNum}}</span>台
  54. </view>
  55. <view class="td td4">占用<span
  56. class="body1pie-num colorAAAAAA">{{body1data.data.useNum}}</span>台
  57. </view>
  58. </view>
  59. <view class="td td3">
  60. <view class="td td4">公共车位<span
  61. class="body1pie-num colorEF8132">{{body1data.data.publicNum}}</span>台
  62. </view>
  63. <view class="td td4">私家车位<span
  64. class="body1pie-num colorDC4441">{{body1data.data.privateNum}}</span>台
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="tr">
  70. <view class="td td1">
  71. <view id="body1pie2" class="body1pie">
  72. </view>
  73. </view>
  74. <view class="td td2">
  75. <view class="td td3">
  76. <view class="td td4">正常<span
  77. class="body1pie-num color53B56B">{{body1data.data.normalNum}}</span>台
  78. </view>
  79. <view class="td td4">离线<span
  80. class="body1pie-num colorAAAAAA">{{body1data.data.loseNum}}</span>台
  81. </view>
  82. </view>
  83. <view class="td td3">
  84. <view class="td td4">故障<span
  85. class="body1pie-num colorEF8132">{{body1data.data.errorNum}}</span>台
  86. </view>
  87. <view class="td td4" v-if="0">低电量<span
  88. class="body1pie-num colorDC4441">5</span>台</view>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="tr" v-if="0">
  93. <view class="td td1">
  94. <view id="body1pie3" class="body1pie">
  95. </view>
  96. </view>
  97. <view class="td td2">
  98. <view class="td td3">
  99. <view class="td td4">管理员<span class="body1pie-num color307AF6">5</span>人</view>
  100. <view class="td td4">白名单<span class="body1pie-num color53B56B">5</span>人</view>
  101. </view>
  102. <view class="td td3">
  103. <view class="td td4">游客<span class="body1pie-num colorEF8375">5</span>人次</view>
  104. <view class="td td4"></view>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. </jpContent>
  110. </view>
  111. </view>
  112. <view class="statistics " v-show="1||companyId">
  113. <view class="title">
  114. <view class="icon">
  115. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  116. </view>
  117. <view class="text">
  118. <view>设备列表</view>
  119. <view class="check-all" @click="gotoDeviceList()">查看全部<u-icon name="arrow-right"></u-icon>
  120. </view>
  121. </view>
  122. </view>
  123. <view class="contentBody">
  124. <jpContent :status="jpContentMap.body7">
  125. <view class="body7main">
  126. <view class="line" v-for="(item,index) in equipmentList"
  127. @click="gotoUrl('/pages/deviceTab/dataLock?id='+item.id)" :key="index">
  128. <view class="item">
  129. <!--
  130. -->
  131. <view class="item-title">
  132. <view class="item-name">
  133. {{item.name}}
  134. </view>
  135. <view class="item-tags">
  136. <view class="tag " :class="'tag'+item.type">
  137. {{item.typeN}}
  138. </view>
  139. <view class="tag" :class="'lockStatus lockStatus'+item.lockStatus">
  140. {{item.lockStatusN}}
  141. </view>
  142. </view>
  143. </view>
  144. <view class="item-body">
  145. 编号:{{item.lockNo}}
  146. </view>
  147. </view>
  148. <view class="goto">
  149. <view :class="'statusN statusN'+item.status">
  150. {{item.statusN}}
  151. </view>
  152. <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
  153. </view>
  154. </view>
  155. <u-divider border-color="#CFD2D5" @click="gotoDeviceList()"
  156. v-if="equipmentList.length==10">最多显示10条,点击查看更多</u-divider>
  157. </view>
  158. </jpContent>
  159. </view>
  160. </view>
  161. <view class="statistics " v-show="1||companyId">
  162. <view class="title">
  163. <view class="icon">
  164. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  165. </view>
  166. <view class="text">
  167. <view>停车记录</view>
  168. <view class="check-all" @click="gotoUrl('/pages/record/parkingRecord?compamyId='+companyId+'&parkingId='+parkingId)">查看全部<u-icon name="arrow-right"></u-icon>
  169. </view>
  170. </view>
  171. </view>
  172. <view class="contentBody">
  173. <jpContent :status="jpContentMap.body8">
  174. <view class="body8main">
  175. <view class="line" v-for="(item,index) in parkingRecord"
  176. @click="gotoUrl('/pages/record/parkingInfo?id='+item.id)" :key="index">
  177. <view class="data">
  178. <view class="view3">
  179. <u-icon name="clock"></u-icon>
  180. {{showTime(item.startTime)}}
  181. <template v-if="item.status!=0">
  182. {{item.endTime?'-'+showTime(item.endTime):'-当前'}}
  183. </template>
  184. </view>
  185. <view class="view1">
  186. {{item.parkingName}} {{item.lockName}}
  187. </view>
  188. </view>
  189. <view class="goto " :class="'status'+item.status">
  190. {{item.status==2?getTime(item):''}}
  191. {{item.status==1?'使用中':''}}
  192. {{item.status==0?'启动中':''}}
  193. <u-icon name="arrow-right" size="24" style="margin-left: 8rpx;" color="#BBBBBB"></u-icon>
  194. </view>
  195. </view>
  196. <u-divider border-color="#CFD2D5" @click="gotoUrl('/pages/record/parkingRecord?compamyId='+companyId+'&parkingId='+parkingId)"
  197. v-if="parkingRecord.length==5">最多显示5条,点击查看更多</u-divider>
  198. </view>
  199. </jpContent>
  200. </view>
  201. </view>
  202. <view class="statistics ">
  203. <view class="title">
  204. <view class="icon">
  205. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  206. </view>
  207. <view class="text">
  208. <view>时空矩阵图</view>
  209. <view class="tag" @click="body5data.vue.show=true">{{body5data.vue.queryN}}<u-icon
  210. name="arrow-down"></u-icon></view>
  211. </view>
  212. </view>
  213. <view class="contentBody">
  214. <jpContent :status="jpContentMap.body5">
  215. <view class="body5main">
  216. <view id="body5echart" class="body5class">
  217. </view>
  218. </view>
  219. </jpContent>
  220. </view>
  221. </view>
  222. <view class="statistics " v-show="companyId">
  223. <view class="title">
  224. <view class="icon">
  225. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  226. </view>
  227. <view class="text">
  228. <view>车位异常记录</view>
  229. <view class="check-all" @click="gotoUrl('/pages/myTab/abnormalList?companyId='+companyId)">
  230. 查看全部<u-icon name="arrow-right"></u-icon></view>
  231. </view>
  232. </view>
  233. <view class="contentBody">
  234. <jpContent :status="jpContentMap.body6">
  235. <view class="body6main">
  236. <view class="line" v-for="(item,index) in abnormalRecordsList" :key="index">
  237. <view class="abnormal-item">
  238. <!-- @click="gotoUrl('/pages/abnormal/abnormalAlarmDetails?id='+item.id)"
  239. -->
  240. <view class="item-title">
  241. <view class="name">
  242. <span v-if="item.level==1" class="level level1 ">一级</span>
  243. <span v-if="item.level==2" class="level level2">二级</span>
  244. {{item.content}}
  245. </view>
  246. <view class="date"
  247. style="display: flex; justify-content: space-between;margin-top: 4rpx;">
  248. <view>{{item.title}}</view>
  249. <view>{{item.createTime}}</view>
  250. </view>
  251. </view>
  252. </view>
  253. <u-icon name="arrow-right" size="24" color="#BBBBBB"></u-icon>
  254. </view>
  255. </view>
  256. </jpContent>
  257. </view>
  258. </view>
  259. <view class="statistics ">
  260. <view class="title">
  261. <view class="icon">
  262. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  263. </view>
  264. <view class="text">
  265. <view>车位平均占用率(%)</view>
  266. <view class="tag" @click="body2data.vue.show=true">{{body2data.vue.queryN}}<u-icon
  267. name="arrow-down"></u-icon></view>
  268. </view>
  269. </view>
  270. <view class="contentBody">
  271. <jpContent :status="jpContentMap.body2">
  272. <view class="body2lineChart">
  273. <view id="body2line1" class="body2line">
  274. </view>
  275. </view>
  276. </jpContent>
  277. </view>
  278. </view>
  279. <view class="statistics ">
  280. <view class="title">
  281. <view class="icon">
  282. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  283. </view>
  284. <view class="text">
  285. <view>高频使用时段分布</view>
  286. </view>
  287. </view>
  288. <view class="contentBody">
  289. <jpContent :status="jpContentMap.body3">
  290. <view class="body3barChart">
  291. <view id="body3bar1" class="body3bar">
  292. </view>
  293. </view>
  294. </jpContent>
  295. </view>
  296. </view>
  297. <view class="statistics ">
  298. <view class="title">
  299. <view class="icon">
  300. <image class="img" src="@/assets/img/circleCopy1@1x.png" mode=""></image>
  301. </view>
  302. <view class="text">
  303. <view>用户停留时长分群特征</view>
  304. </view>
  305. </view>
  306. <view class="contentBody">
  307. <jpContent :status="jpContentMap.body4">
  308. <view class="body4pieChart">
  309. <view id="body4pie1" class="body4pie">
  310. </view>
  311. </view>
  312. </jpContent>
  313. </view>
  314. </view>
  315. <u-divider border-color="#CFD2D5">已经到底了</u-divider>
  316. </view>
  317. <tabbar :current="0"></tabbar>
  318. </view>
  319. </template>
  320. <script>
  321. import Tabbar from '@/components/Tabbar.vue'
  322. import jpContent from '@/components/JPcontent.vue'
  323. import * as echarts from 'echarts';
  324. import * as API from '@/apis/pagejs/index.js'
  325. import {
  326. parseUnixTime,
  327. beforeTimeStamp,
  328. newDate
  329. } from '@/apis/utils'
  330. export default {
  331. components: {
  332. Tabbar,
  333. jpContent
  334. },
  335. data() {
  336. return {
  337. current1: 0,
  338. showselect1: false,
  339. current2: 0,
  340. showselect2: false,
  341. isReady: false,
  342. companyList: [],
  343. parkingList: [],
  344. //companyListIndex:0,
  345. companyId: "",
  346. parkingId: "",
  347. echartsList: {},
  348. parkingRecord:[],
  349. equipmentList: [],
  350. abnormalRecordsList: [{
  351. level: 1,
  352. content: "1111111",
  353. title: "11",
  354. createTime: "123:123"
  355. },
  356. {
  357. level: 2,
  358. content: "1111111",
  359. title: "11",
  360. createTime: "123:123"
  361. }
  362. ],
  363. body2data: {
  364. query: {},
  365. vue: {
  366. queryN: "",
  367. show: false,
  368. params: {
  369. year: true,
  370. month: true,
  371. day: false,
  372. hour: false,
  373. minute: false,
  374. second: false
  375. }
  376. },
  377. data: {}
  378. },
  379. body1data: {
  380. query: {},
  381. data: {},
  382. data1: {}
  383. },
  384. body4data: {
  385. query: {},
  386. data: {}
  387. },
  388. body3data: {
  389. query: {},
  390. data: {}
  391. },
  392. body5data: {
  393. query: {},
  394. data: {},
  395. vue: {
  396. queryN: "",
  397. show: false,
  398. params: {
  399. year: true,
  400. month: true,
  401. day: true,
  402. hour: false,
  403. minute: false,
  404. second: false
  405. }
  406. },
  407. },
  408. jpContentMap: {
  409. body1: 0,
  410. body2: 0,
  411. body3: 0,
  412. body4: 0,
  413. body5: 0,
  414. body6: 1,
  415. body7: 0,
  416. body8: 0,
  417. body9: 0,
  418. body10: 0,
  419. }
  420. }
  421. },
  422. onLoad() {
  423. },
  424. onReady() {
  425. this.getfindByOpenId();
  426. },
  427. computed: {
  428. companyListTabs() {
  429. var sz = []
  430. if (this.companyList.length > 3) {
  431. sz = [{
  432. id: "",
  433. name: '全部'
  434. }]
  435. sz.push(this.companyList[0])
  436. sz.push(this.companyList[1])
  437. } else {
  438. sz = [{
  439. id: "",
  440. name: '全部'
  441. },
  442. ...this.companyList
  443. ]
  444. }
  445. return sz
  446. },
  447. parkingListTabs() {
  448. var sz = []
  449. if (this.parkingList.length > 3) {
  450. sz = [{
  451. id: "",
  452. name: '综合查询'
  453. }]
  454. sz.push(this.parkingList[0])
  455. sz.push(this.parkingList[1])
  456. } else {
  457. sz = [{
  458. id: "",
  459. name: '综合查询'
  460. },
  461. ...this.parkingList
  462. ]
  463. }
  464. return sz
  465. },
  466. },
  467. methods: {
  468. showTime(time){
  469. if(time){
  470. return time.substr(5).replace('-','.')
  471. }else{
  472. return ''
  473. }
  474. },
  475. getTime(item){
  476. if(item.startTime&&item.endTime){
  477. var stime=newDate(item.startTime)
  478. var etime=newDate(item.endTime)
  479. //etime=new Date()
  480. var k=(etime.getTime()-stime.getTime())/1000/60
  481. var H=k/60
  482. var fen=k%(60)
  483. var str="";
  484. if(k>60){
  485. str+=parseInt(H)+'小时'
  486. }
  487. if(fen==0&&str!=''){
  488. }else{
  489. str+=parseInt(fen)+'分钟'
  490. }
  491. return str
  492. }else{
  493. return '已完成'
  494. }
  495. },
  496. gotoDeviceList() {
  497. if (this.companyId) {
  498. this.gotoUrl('/pages/deviceTab/deviceList?companyId=' + this.companyId)
  499. } else {
  500. this.gotoUrl('/pages/deviceTab/index')
  501. }
  502. },
  503. getfloorStatus() {
  504. this.jpContentMap.body1 = 0
  505. API.floorStatus({
  506. companyId: this.companyId,
  507. parkingId: this.parkingId
  508. }).then((response) => {
  509. this.body1data.data = response.data
  510. uni.hideLoading();
  511. this.jpContentMap.body1 = 2
  512. this.getbody1pie1()
  513. this.getbody1pie2()
  514. this.getbody1pie3()
  515. }).catch(error => {
  516. uni.showToast({
  517. title: error,
  518. icon: "none"
  519. })
  520. })
  521. },
  522. getParkingRecordList() {
  523. this.jpContentMap.body8 = 0
  524. API.parkingRecordList({
  525. companyId: this.companyId,
  526. parkingId: this.parkingId,
  527. pageSize: 5
  528. }).then((response) => {
  529. uni.hideLoading();
  530. if (response.data.totalPage) {
  531. this.jpContentMap.body8 = 2
  532. this.parkingRecord = response.data.data
  533. } else {
  534. this.jpContentMap.body8 = 1
  535. }
  536. }).catch(error => {
  537. uni.showToast({
  538. title: error,
  539. icon: "none"
  540. })
  541. })
  542. },
  543. getfloorlockList() {
  544. this.jpContentMap.body7 = 0
  545. API.floorlockList({
  546. companyId: this.companyId,
  547. parkingId: this.parkingId,
  548. pageSize: 10
  549. }).then((response) => {
  550. uni.hideLoading();
  551. if (response.data.totalPage) {
  552. this.jpContentMap.body7 = 2
  553. this.equipmentList = response.data.data
  554. } else {
  555. this.jpContentMap.body7 = 1
  556. }
  557. }).catch(error => {
  558. uni.showToast({
  559. title: error,
  560. icon: "none"
  561. })
  562. })
  563. },
  564. getApi1() {
  565. if (this.companyId == "") {
  566. this.getApi2()
  567. } else {
  568. this.parkingInfoList()
  569. }
  570. },
  571. getApi2() {
  572. this.getfloorStatus()
  573. this.getfloorlockList()
  574. this.occupancyByTime(1);
  575. this.occupancyByTimeBar(1);
  576. this.occupancyByDay(1);
  577. this.durationDistribution();
  578. this.getParkingRecordList()
  579. if (this.parkingId == "") {
  580. } else {
  581. }
  582. },
  583. change1companyList(i) {
  584. //this.companyListIndex=i
  585. var companyId = ""
  586. if (i == -1) {
  587. if (this.companyId == companyId) {
  588. } else {
  589. this.companyId = ""
  590. this.parkingList = [];
  591. this.getApi1()
  592. }
  593. } else {
  594. var item = this.companyList[i]
  595. companyId = item.id
  596. if (this.companyId == companyId) {
  597. } else {
  598. this.companyId = companyId
  599. this.parkingId = "";
  600. this.current2 = 0;
  601. this.$refs.tabs2.showBar = true
  602. this.getApi1()
  603. }
  604. }
  605. },
  606. change2parkingList(i) {
  607. var parkingId = ""
  608. if (i == -1) {
  609. if (this.parkingId == parkingId) {
  610. } else {
  611. this.parkingId = "";
  612. this.getApi2()
  613. }
  614. } else {
  615. var item = this.parkingList[i]
  616. parkingId = item.id
  617. if (this.parkingId == parkingId) {
  618. } else {
  619. this.parkingId = parkingId;
  620. this.getApi2()
  621. }
  622. }
  623. },
  624. showselect2confirm(e) {
  625. this.change2parkingList(e[0])
  626. },
  627. utabsChange2other() {
  628. this.$refs.tabs2.showBar = false
  629. this.current2 = -1;
  630. this.showselect2 = true;
  631. },
  632. utabsChange2(index) {
  633. this.current2 = index;
  634. this.change2parkingList(index - 1)
  635. this.$refs.tabs2.showBar = true
  636. },
  637. showselect1confirm(e) {
  638. this.change1companyList(e[0])
  639. },
  640. utabsChange1other() {
  641. this.$refs.tabs.showBar = false
  642. this.current1 = -1;
  643. this.showselect1 = true;
  644. },
  645. utabsChange1(index) {
  646. this.current1 = index;
  647. this.change1companyList(index - 1)
  648. this.$refs.tabs.showBar = true
  649. },
  650. parkingInfoList() {
  651. uni.showLoading({
  652. title: "加载中",
  653. mask: true,
  654. })
  655. this.parkingList = [];
  656. API.parkingList({
  657. companyId: this.companyId,
  658. pageSize: 999
  659. }).then((response) => {
  660. uni.hideLoading();
  661. var parkingInfoList = response.data.parkingInfoList
  662. this.parkingList = [
  663. ...parkingInfoList,
  664. ];
  665. if (this.parkingList.length == 1) {
  666. this.change2parkingList(0)
  667. } else {
  668. this.change2parkingList(-1)
  669. this.getApi2()
  670. }
  671. this.getfloorlockList()
  672. }).catch(error => {
  673. uni.showToast({
  674. title: error,
  675. icon: "none"
  676. })
  677. })
  678. },
  679. companyInfoList() {
  680. uni.showLoading({
  681. title: "加载中",
  682. mask: true,
  683. })
  684. this.companyList = [];
  685. API.companyInfoList({
  686. }).then((response) => {
  687. uni.hideLoading();
  688. var companyInfoList = response.data.companyInfoList
  689. this.companyList = [
  690. ...companyInfoList,
  691. ];
  692. if (this.companyList.length == 1) {
  693. this.change1companyList(0)
  694. } else {
  695. this.change1companyList(-1)
  696. this.getApi1()
  697. }
  698. }).catch(error => {
  699. uni.showToast({
  700. title: error,
  701. icon: "none"
  702. })
  703. })
  704. },
  705. init() {
  706. this.companyInfoList()
  707. //this.occupancyByTime();
  708. //this.getbody3()
  709. //this.getbody4()
  710. //this.getbody5()
  711. },
  712. body2dataconfirm(e) {
  713. var date = new Date(e.year + "-" + e.month + "-1");
  714. this.body2data.vue.queryN = date.getFullYear() + "年" + (date.getMonth() + 1) + '月';
  715. this.body2data.query.startTime = date.getFullYear() + "-" + (date.getMonth() + 1) + "-1"
  716. var endOfMonth = new Date(date.getFullYear(), date.getMonth() + 1, 0)
  717. this.body2data.query.endTime = parseUnixTime(endOfMonth, '{y}-{m}-{d}')
  718. this.occupancyByTime()
  719. },
  720. body5dataconfirm(e) {
  721. console.log(e)
  722. var date = new Date(e.year + "-" + e.month + "-" + e.day);
  723. this.body5data.query.queryDate = parseUnixTime(date, '{y}-{m}-{d}')
  724. this.body5data.vue.queryN = parseUnixTime(date, '{y}年{m}月{d}日');
  725. this.occupancyByDay()
  726. },
  727. occupancyByTimeBar(init) {
  728. if (init) {
  729. var date = new Date();
  730. //test
  731. this.body3data.query.startTime = date.getFullYear() + "-" + (date.getMonth() + 1) + "-1"
  732. var endOfMonth = new Date(date.getFullYear(), date.getMonth() + 1, 0)
  733. this.body3data.query.endTime = parseUnixTime(endOfMonth, '{y}-{m}-{d}')
  734. }
  735. this.jpContentMap.body3 = 0
  736. this.body3data.query.companyId = this.companyId
  737. this.body3data.query.parkingId = this.parkingId
  738. API.occupancyByTimeBar(
  739. this.body3data.query
  740. ).then((response) => {
  741. this.body3data.data = [
  742. ...response.data.locksTimeList,
  743. // ...response.data.locksTimeList,
  744. ];
  745. if (this.body3data.data.length == 0) {
  746. this.jpContentMap.body3 = 1
  747. } else {
  748. this.jpContentMap.body3 = 2
  749. this.getbody3()
  750. }
  751. }).catch(error => {
  752. uni.showToast({
  753. title: error,
  754. icon: "none"
  755. })
  756. })
  757. },
  758. durationDistribution() {
  759. this.jpContentMap.body4 = 0
  760. var date = new Date();
  761. //test
  762. this.body4data.query.startTime = date.getFullYear() + "-" + (date.getMonth() + 1) + "-1"
  763. var endOfMonth = new Date(date.getFullYear(), date.getMonth() + 1, 0)
  764. this.body4data.query.endTime = parseUnixTime(endOfMonth, '{y}-{m}-{d}')
  765. this.body4data.query.companyId = this.companyId
  766. this.body4data.query.parkingId = this.parkingId
  767. API.durationDistribution(
  768. this.body4data.query
  769. ).then((response) => {
  770. this.body4data.data = response.data.distribution;
  771. if (this.body4data.data.length == 0) {
  772. this.jpContentMap.body4 = 1
  773. } else {
  774. this.jpContentMap.body4 = 2
  775. //this.getbody3()
  776. this.getbody4()
  777. }
  778. }).catch(error => {
  779. uni.showToast({
  780. title: error,
  781. icon: "none"
  782. })
  783. })
  784. },
  785. occupancyByDay(init) {
  786. if (init) {
  787. var date = new Date();
  788. this.body5data.query.queryDate = parseUnixTime(date, '{y}-{m}-{d}')
  789. this.body5data.vue.queryN = parseUnixTime(date, '{y}年{m}月{d}日');
  790. }
  791. this.jpContentMap.body5 = 0
  792. this.body5data.query.companyId = this.companyId
  793. this.body5data.query.parkingId = this.parkingId
  794. API.occupancyByDay(
  795. this.body5data.query
  796. ).then((response) => {
  797. this.body5data.data = [
  798. ...response.data.locksTimeList,
  799. ];
  800. if (this.body5data.data.length == 0) {
  801. this.jpContentMap.body5 = 1
  802. } else {
  803. this.jpContentMap.body5 = 2
  804. //this.getbody3()
  805. this.getbody5()
  806. }
  807. }).catch(error => {
  808. uni.showToast({
  809. title: error,
  810. icon: "none"
  811. })
  812. })
  813. },
  814. occupancyByTime(init) {
  815. if (init) {
  816. var date = new Date();
  817. this.body2data.vue.queryN = date.getFullYear() + "年" + (date.getMonth() + 1) + '月';
  818. this.body2data.query.startTime = date.getFullYear() + "-" + (date.getMonth() + 1) + "-1"
  819. var endOfMonth = new Date(date.getFullYear(), date.getMonth() + 1, 0)
  820. this.body2data.query.endTime = parseUnixTime(endOfMonth, '{y}-{m}-{d}')
  821. }
  822. this.jpContentMap.body2 = 0
  823. this.body2data.query.companyId = this.companyId
  824. this.body2data.query.parkingId = this.parkingId
  825. API.occupancyByTime(
  826. this.body2data.query
  827. ).then((response) => {
  828. this.body2data.data = [
  829. ...response.data.locksTimeList,
  830. // ...response.data.locksTimeList,
  831. ];
  832. if (this.body2data.data.length == 0) {
  833. this.jpContentMap.body2 = 1
  834. } else {
  835. this.jpContentMap.body2 = 2
  836. this.getbody2()
  837. }
  838. }).catch(error => {
  839. uni.showToast({
  840. title: error,
  841. icon: "none"
  842. })
  843. })
  844. },
  845. getbody5() {
  846. // 颜色映射
  847. var colorMap = [
  848. '#FFA500',
  849. '#00FF00',
  850. '#F44336',
  851. '#E91E63',
  852. '#9C27B0',
  853. '#673AB7',
  854. '#3F51B5',
  855. '#2196F3',
  856. '#03A9F4',
  857. '#00BCD4',
  858. '#009688',
  859. '#CDDC39',
  860. '#FFEB3B',
  861. '#FFC107',
  862. '#FF9800',
  863. '#FF5722',
  864. '#795548',
  865. '#607D8B'
  866. ];
  867. var key = "body5echart"
  868. var dataApi = this.body5data.data;
  869. var head = 40 * (parseInt(dataApi.length / 4)) + 20
  870. var body = 20 * (parseInt(dataApi.length))
  871. var myChart = this.echartsList[key];
  872. if (!myChart) {
  873. myChart = echarts.init(document.getElementById(key), null, {
  874. width: uni.upx2px(300 * 2),
  875. height: uni.upx2px((170 + head) * 2 + body)
  876. })
  877. }
  878. myChart.clear()
  879. var dataName = []
  880. var dataTime = []
  881. var series = []
  882. var i = 0;
  883. var isPush=false
  884. dataApi.forEach(item => {
  885. dataName.push(item.lockName)
  886. var itemList = []
  887. var j = 0
  888. item.timeUseList.forEach(item2 => {
  889. Object.keys(item2).forEach(key1 => {
  890. console.log(item2[key1])
  891. if (item2[key1]) {
  892. var ob = [j, i, i]
  893. itemList.push(ob)
  894. isPush=true
  895. } else {
  896. // var ob=[j,i,i]
  897. // itemList.push(ob)
  898. }
  899. });
  900. j += 1;
  901. })
  902. var obj = {
  903. tooltip: {
  904. trigger: 'item',
  905. axisPointer: {
  906. type: 'shadow'
  907. },
  908. formatter: function(params) {
  909. console.log(params)
  910. var result = params.marker+params.name +'点<br/>' + params.seriesName + ' 占用 ';
  911. return result;
  912. }
  913. },
  914. //silent: true,
  915. type: 'custom',
  916. "name": item.lockName,
  917. // tooltip: {
  918. // //trigger: 'none',
  919. // show: false
  920. // },
  921. itemStyle: {
  922. color: colorMap[i % colorMap.length]
  923. },
  924. renderItem: function(params, api) {
  925. var xIndex = api.value(0); // x轴索引
  926. var yIndex = api.value(1); // y轴索引
  927. var value = api.value(2); // 值
  928. // 获取颜色
  929. var color = colorMap[value % colorMap.length] || '#ffffff';
  930. // 计算矩形的位置和大小
  931. var x = api.coord([xIndex, yIndex])[0];
  932. var y = api.coord([xIndex, yIndex])[1];
  933. var width = api.size([1, 0])[0];
  934. var height = api.size([0, 1])[1];
  935. return {
  936. type: 'rect',
  937. shape: {
  938. x: x - uni.upx2px(25),
  939. y: y - uni.upx2px(20),
  940. width: width,
  941. height: 20,
  942. },
  943. style: {
  944. fill: color
  945. }
  946. };
  947. },
  948. }
  949. obj.data = itemList
  950. series.push(obj)
  951. i += 1;
  952. })
  953. dataApi[0].timeUseList.forEach(item => {
  954. Object.keys(item).forEach(key1 => {
  955. dataTime.push(key1)
  956. });
  957. })
  958. var option = {
  959. tooltip: {
  960. trigger: 'axis',
  961. axisPointer: {
  962. type: 'shadow'
  963. }
  964. },
  965. grid: {
  966. top: 30 + head,
  967. left: -10+(isPush?0:20),
  968. right: 0,
  969. bottom: 0,
  970. containLabel: true
  971. },
  972. legend: {
  973. data: dataName
  974. },
  975. xAxis: {
  976. type: 'category',
  977. data: dataTime
  978. },
  979. yAxis: {
  980. type: 'category',
  981. },
  982. series: series
  983. };
  984. myChart.setOption(option);
  985. this.echartsList[key] = myChart;
  986. },
  987. getbody4() {
  988. var key = "body4pie1"
  989. var myChart = this.echartsList[key];
  990. if (!myChart) {
  991. myChart = echarts.init(document.getElementById(key), null, {
  992. width: uni.upx2px(300 * 2),
  993. height: uni.upx2px(170 * 2)
  994. })
  995. }
  996. myChart.clear()
  997. var dataApi = this.body4data.data;
  998. var data = []
  999. var num = 0
  1000. var sum = 0
  1001. Object.keys(dataApi).forEach(key1 => {
  1002. num += dataApi[key1]
  1003. });
  1004. var i = 0
  1005. Object.keys(dataApi).forEach(key1 => {
  1006. var value = dataApi[key1]
  1007. var obj = {
  1008. value: value,
  1009. name: key1
  1010. }
  1011. if (num != 0) {
  1012. var valueInt = parseInt(value / num * 100)
  1013. if (valueInt == 0 && value != 0) {
  1014. valueInt = 1
  1015. }
  1016. sum += valueInt;
  1017. if (i == Object.keys(dataApi).length - 1) {
  1018. if (sum != 100) {
  1019. valueInt += (100 - sum)
  1020. }
  1021. }
  1022. obj.name += '\n' + (valueInt) + '%'
  1023. }
  1024. data.push(obj)
  1025. i++;
  1026. });
  1027. var option = {
  1028. grid: {
  1029. top: 20,
  1030. left: 0,
  1031. right: 0,
  1032. bottom: 0,
  1033. containLabel: true
  1034. },
  1035. series: [{
  1036. type: 'pie',
  1037. radius: ['80%', '50%'],
  1038. radius: [45, 60],
  1039. data: data
  1040. }]
  1041. };
  1042. console.log(option)
  1043. myChart.setOption(option);
  1044. this.echartsList[key] = myChart;
  1045. },
  1046. getbody3() {
  1047. var key = "body3bar1"
  1048. var myChart = this.echartsList[key];
  1049. if (!myChart) {
  1050. myChart = echarts.init(document.getElementById(key), null, {
  1051. width: uni.upx2px(300 * 2),
  1052. height: uni.upx2px(170 * 2)
  1053. })
  1054. }
  1055. var dataApi = this.body3data.data;
  1056. myChart.clear()
  1057. var data1 = []
  1058. var data2 = [] //useDays
  1059. var i = 0
  1060. dataApi[0].timeUseList.forEach(item => {
  1061. Object.keys(item).forEach(key1 => {
  1062. data1.push(key1 + '点')
  1063. var num = 0
  1064. dataApi.forEach(item2 => {
  1065. num += item2.timeUseList[i][key1].useDays
  1066. })
  1067. data2.push(num)
  1068. });
  1069. i += 1
  1070. })
  1071. var axisLabel = {
  1072. rotate: 40,
  1073. interval: 0,
  1074. textStyle: {
  1075. color: "#333"
  1076. }
  1077. }
  1078. if (data1.length < 7) {
  1079. axisLabel = {
  1080. interval: 0,
  1081. textStyle: {
  1082. color: "#333"
  1083. },
  1084. }
  1085. } else {
  1086. axisLabel.interval = 0;
  1087. }
  1088. var option = {
  1089. xAxis: {
  1090. type: 'category',
  1091. data: data1,
  1092. axisLabel: axisLabel,
  1093. },
  1094. tooltip: {
  1095. trigger: 'axis',
  1096. axisPointer: {
  1097. type: 'shadow'
  1098. },
  1099. formatter: function(params) {
  1100. var result = params[0].name + '<br/>';
  1101. for (var i = 0; i < params.length; i++) {
  1102. result += params[i].marker+ ' ' + params[i].value + '次<br/>';
  1103. }
  1104. return result;
  1105. }
  1106. },
  1107. yAxis: {
  1108. type: 'value'
  1109. },
  1110. grid: {
  1111. top: 20,
  1112. left: 0,
  1113. right: 0,
  1114. bottom: 0,
  1115. containLabel: true
  1116. },
  1117. series: [{
  1118. itemStyle: {
  1119. color: "#5A88E5"
  1120. },
  1121. data: data2,
  1122. type: 'bar'
  1123. }]
  1124. };
  1125. myChart.setOption(option);
  1126. this.echartsList[key] = myChart;
  1127. },
  1128. getbody2() {
  1129. var key = "body2line1"
  1130. var myChart = this.echartsList[key];
  1131. var dataApi = this.body2data.data;
  1132. var head = 20 * (parseInt(dataApi.length / 4)) + 20
  1133. if (!myChart) {
  1134. myChart = echarts.init(document.getElementById(key), null, {
  1135. width: uni.upx2px(300 * 2),
  1136. height: uni.upx2px((170 + head) * 2)
  1137. })
  1138. }
  1139. myChart.clear()
  1140. var data1 = []
  1141. var series = [];
  1142. dataApi.forEach(item => {
  1143. var obj = {
  1144. name: item.lockName,
  1145. //areaStyle: {},
  1146. // itemStyle: {
  1147. // color: "#BBD4FB"
  1148. // },
  1149. label: {
  1150. show: true,
  1151. position: 'top',
  1152. // color: "#307AF6"
  1153. },
  1154. data: [],
  1155. type: 'line'
  1156. }
  1157. if (dataApi.length == 1) {
  1158. obj.label.color = "#307AF6"
  1159. obj.areaStyle = {}
  1160. obj.itemStyle = {
  1161. color: "#BBD4FB"
  1162. }
  1163. }
  1164. item.timeUseList.forEach(item2 => {
  1165. Object.keys(item2).forEach(key1 => {
  1166. obj.data.push(item2[key1].useRate)
  1167. });
  1168. })
  1169. series.push(obj)
  1170. })
  1171. dataApi[0].timeUseList.forEach(item => {
  1172. Object.keys(item).forEach(key1 => {
  1173. data1.push(key1)
  1174. });
  1175. })
  1176. var axisLabel = {
  1177. rotate: 40,
  1178. interval: 0,
  1179. textStyle: {
  1180. color: "#333"
  1181. }
  1182. }
  1183. if (data1.length < 7) {
  1184. axisLabel = {
  1185. interval: 0,
  1186. textStyle: {
  1187. color: "#333"
  1188. },
  1189. }
  1190. } else {
  1191. axisLabel.interval = 0;
  1192. }
  1193. var option = {
  1194. legend: {},
  1195. xAxis: {
  1196. type: 'category',
  1197. data: data1,
  1198. axisLabel: axisLabel,
  1199. },
  1200. tooltip: {
  1201. trigger: 'axis',
  1202. axisPointer: {
  1203. type: 'shadow'
  1204. },
  1205. formatter: function(params) {
  1206. var result = params[0].name + '点<br/>';
  1207. for (var i = 0; i < params.length; i++) {
  1208. result += params[i].marker+params[i].seriesName + ': ' + params[i].value + '%<br/>';
  1209. }
  1210. return result;
  1211. }
  1212. },
  1213. yAxis: {
  1214. type: 'value'
  1215. },
  1216. grid: {
  1217. top: (20 + head),
  1218. left: 0,
  1219. right: 0,
  1220. bottom: 0,
  1221. containLabel: true
  1222. },
  1223. series: series
  1224. };
  1225. myChart.setOption(option);
  1226. this.echartsList[key] = myChart;
  1227. },
  1228. getbody1pie1() {
  1229. var img = require("@/assets/img/index/pie1-1.svg")
  1230. var key = "body1pie1"
  1231. var myChart = this.echartsList[key];
  1232. if (!myChart) {
  1233. myChart = echarts.init(document.getElementById(key), null, {
  1234. width: uni.upx2px(88),
  1235. height: uni.upx2px(88)
  1236. })
  1237. }
  1238. myChart.clear()
  1239. var option = {
  1240. series: [{
  1241. silent: true,
  1242. type: 'pie',
  1243. radius: ['70%', '100%'],
  1244. label: {
  1245. show: false,
  1246. },
  1247. data: [{
  1248. value: this.body1data.data.useNum,
  1249. itemStyle: {
  1250. color: '#AAAAAA'
  1251. }
  1252. },
  1253. {
  1254. value: this.body1data.data.idleNum,
  1255. itemStyle: {
  1256. color: '#53B56B'
  1257. }
  1258. }
  1259. ]
  1260. }],
  1261. grid: {
  1262. top: 0,
  1263. left: 0,
  1264. right: 0,
  1265. bottom: 0,
  1266. containLabel: true
  1267. },
  1268. graphic: [{
  1269. type: 'image',
  1270. id: 'logo',
  1271. left: 'center',
  1272. top: 'center',
  1273. style: {
  1274. image: img, // 图片路径
  1275. width: uni.upx2px(40),
  1276. height: uni.upx2px(40)
  1277. }
  1278. }]
  1279. }
  1280. myChart.setOption(option);
  1281. this.echartsList[key] = myChart;
  1282. },
  1283. getbody1pie2() {
  1284. var img = require("@/assets/img/index/pie1-2.svg")
  1285. var key = "body1pie2"
  1286. var myChart = this.echartsList[key];
  1287. if (!myChart) {
  1288. myChart = echarts.init(document.getElementById(key), null, {
  1289. width: uni.upx2px(88),
  1290. height: uni.upx2px(88)
  1291. })
  1292. }
  1293. myChart.clear()
  1294. var option = {
  1295. series: [{
  1296. silent: true,
  1297. type: 'pie',
  1298. radius: ['70%', '100%'],
  1299. label: {
  1300. show: false,
  1301. },
  1302. data: [{
  1303. value: this.body1data.data.loseNum,
  1304. itemStyle: {
  1305. color: '#AAAAAA'
  1306. }
  1307. },
  1308. {
  1309. value: this.body1data.data.normalNum,
  1310. itemStyle: {
  1311. color: '#53B56B'
  1312. }
  1313. },
  1314. {
  1315. value: this.body1data.data.errorNum,
  1316. itemStyle: {
  1317. color: '#EF8132'
  1318. }
  1319. }
  1320. //, {
  1321. // value: 735,
  1322. // itemStyle: {
  1323. // color: '#DC4441'
  1324. // }
  1325. // }
  1326. ]
  1327. }],
  1328. grid: {
  1329. top: 0,
  1330. left: 0,
  1331. right: 0,
  1332. bottom: 0,
  1333. containLabel: true
  1334. },
  1335. graphic: [{
  1336. type: 'image',
  1337. id: 'logo',
  1338. left: 'center',
  1339. top: 'center',
  1340. style: {
  1341. image: img, // 图片路径
  1342. width: uni.upx2px(40),
  1343. height: uni.upx2px(40)
  1344. }
  1345. }]
  1346. }
  1347. myChart.setOption(option);
  1348. this.echartsList[key] = myChart;
  1349. },
  1350. getbody1pie3() {
  1351. var img = require("@/assets/img/index/pie1-3.svg")
  1352. var key = "body1pie3"
  1353. var myChart = this.echartsList[key];
  1354. if (!myChart) {
  1355. myChart = echarts.init(document.getElementById(key), null, {
  1356. width: uni.upx2px(88),
  1357. height: uni.upx2px(88)
  1358. })
  1359. }
  1360. myChart.clear()
  1361. var option = {
  1362. series: [{
  1363. type: 'pie',
  1364. silent: true, // 禁用交互效果
  1365. radius: ['70%', '100%'],
  1366. label: {
  1367. show: false,
  1368. },
  1369. data: [{
  1370. value: 735,
  1371. itemStyle: {
  1372. color: '#53B56B'
  1373. }
  1374. },
  1375. {
  1376. value: 735,
  1377. itemStyle: {
  1378. color: '#EF8375'
  1379. }
  1380. },
  1381. {
  1382. value: 735,
  1383. itemStyle: {
  1384. color: '#307AF6'
  1385. }
  1386. }
  1387. ]
  1388. }],
  1389. grid: {
  1390. top: 0,
  1391. left: 0,
  1392. right: 0,
  1393. bottom: 0,
  1394. containLabel: true
  1395. },
  1396. graphic: [{
  1397. type: 'image',
  1398. id: 'logo',
  1399. left: 'center',
  1400. top: 'center',
  1401. style: {
  1402. image: img, // 图片路径
  1403. width: uni.upx2px(40),
  1404. height: uni.upx2px(40)
  1405. }
  1406. }]
  1407. }
  1408. myChart.setOption(option);
  1409. this.echartsList[key] = myChart;
  1410. },
  1411. getfindByOpenId() {
  1412. uni.showLoading({
  1413. title: "加载中",
  1414. mask: true,
  1415. })
  1416. API.findByOpenId({
  1417. openId: this.jphelp.getOpenId(),
  1418. }).then((response) => {
  1419. uni.hideLoading();
  1420. this.isReady = true;
  1421. this.loginset(response)
  1422. try {
  1423. this.init()
  1424. } catch (e) {
  1425. uni.showToast({
  1426. title: e,
  1427. icon: "none"
  1428. })
  1429. }
  1430. }).catch(error => {
  1431. uni.showToast({
  1432. title: error,
  1433. icon: "none"
  1434. })
  1435. uni.redirectTo({
  1436. url: '/pages/login/login'
  1437. })
  1438. })
  1439. }
  1440. }
  1441. }
  1442. </script>
  1443. <style scoped lang="scss">
  1444. .color307AF6 {
  1445. color: #307AF6
  1446. }
  1447. .color53B56B {
  1448. color: #53B56B
  1449. }
  1450. .colorAAAAAA {
  1451. color: #AAAAAA
  1452. }
  1453. .colorEF8132 {
  1454. color: #EF8132
  1455. }
  1456. .colorDC4441 {
  1457. color: #DC4441
  1458. }
  1459. .colorEF8375 {
  1460. color: #EF8375
  1461. }
  1462. .body1pie-table {
  1463. color: rgba(51, 51, 51, 1);
  1464. font-size: 32rpx;
  1465. font-weight: bold;
  1466. .tr {
  1467. .td1 {
  1468. padding-right: 24rpx;
  1469. }
  1470. display: flex;
  1471. margin-bottom: 40rpx;
  1472. .td2 {
  1473. width: 100%;
  1474. .td3 {
  1475. display: flex;
  1476. .td4 {
  1477. width: 120px;
  1478. }
  1479. }
  1480. }
  1481. }
  1482. // td{
  1483. // padding-right: 24rpx;
  1484. // }
  1485. .body1pie {}
  1486. .body1pie-num {
  1487. margin: 0 8rpx;
  1488. }
  1489. }
  1490. // 导航栏
  1491. .navbar {
  1492. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
  1493. background-color: rgba(22, 119, 255, 1);
  1494. color: #fff;
  1495. line-height: 88rpx;
  1496. display: flex;
  1497. justify-content: space-between;
  1498. align-items: center;
  1499. padding: 0 32rpx;
  1500. color: rgba(255, 255, 255, 1);
  1501. font-size: 36rpx;
  1502. position: fixed;
  1503. left: 0;
  1504. right: 0;
  1505. top: 0;
  1506. z-index: 999999;
  1507. font-weight: bold;
  1508. }
  1509. .main {
  1510. border-radius: 16px 16px 0px 0px;
  1511. background: linear-gradient(180deg, rgba(242, 244, 246, 1) 61%, rgba(255, 255, 255, 0) 100%);
  1512. margin-top: -24rpx;
  1513. padding: 32rpx;
  1514. .statistics {
  1515. border-radius: 8px;
  1516. background-color: rgba(255, 255, 255, 1);
  1517. box-shadow: 0px 1px 6px 0px rgba(0, 59, 142, 0.05);
  1518. margin-bottom: 24rpx;
  1519. padding: 40rpx;
  1520. .title {
  1521. display: flex;
  1522. align-items: center;
  1523. margin-bottom: 32rpx;
  1524. font-weight: bold;
  1525. .img {
  1526. width: 36rpx;
  1527. height: 36rpx;
  1528. vertical-align: middle;
  1529. border-radius: 999px;
  1530. }
  1531. .change {
  1532. display: flex;
  1533. align-items: center;
  1534. .change-img {
  1535. width: 32rpx;
  1536. height: 32rpx;
  1537. vertical-align: middle;
  1538. }
  1539. text {
  1540. margin-left: 8rpx;
  1541. }
  1542. }
  1543. .text {
  1544. color: rgba(16, 16, 16, 1);
  1545. font-size: 36rpx;
  1546. margin-left: 16rpx;
  1547. display: flex;
  1548. justify-content: space-between;
  1549. align-items: center;
  1550. width: 100%;
  1551. .tag {
  1552. border-radius: 4px;
  1553. border: 1px solid rgba(187, 187, 187, 1);
  1554. color: rgba(51, 51, 51, 1);
  1555. font-size: 24rpx;
  1556. padding: 1px 8rpx;
  1557. margin-left: 8rpx;
  1558. }
  1559. }
  1560. .change {
  1561. margin-left: 16rpx;
  1562. font-size: 24rpx;
  1563. color: #838383;
  1564. }
  1565. .check-all {
  1566. margin-left: auto;
  1567. color: rgba(131, 131, 131, 1);
  1568. font-size: 24rpx;
  1569. font-weight: 400;
  1570. }
  1571. }
  1572. }
  1573. .statistics-end {
  1574. padding-bottom: 0;
  1575. }
  1576. }
  1577. .tabs-box2 {
  1578. margin-bottom: 8rpx;
  1579. padding-right: 16rpx;
  1580. display: flex;
  1581. align-items: center;
  1582. justify-content: space-between;
  1583. .tabs-box-other {
  1584. padding-bottom: 12rpx;
  1585. }
  1586. }
  1587. .tabs-box {
  1588. padding: 42rpx 0;
  1589. margin-top: 66rpx;
  1590. padding-right: 32rpx;
  1591. background-color: rgba(22, 119, 255, 1);
  1592. display: flex;
  1593. align-items: center;
  1594. justify-content: space-between;
  1595. .tabs {
  1596. width: 97%;
  1597. }
  1598. .more {
  1599. padding-right: 12rpx;
  1600. }
  1601. .tabs-box-other {
  1602. padding-bottom: 12rpx;
  1603. height: 80rpx;
  1604. line-height: 70rpx;
  1605. font-size: 30rpx;
  1606. color: rgb(255, 255, 255);
  1607. }
  1608. }
  1609. .body6main {
  1610. .line {
  1611. display: flex;
  1612. justify-content: space-between;
  1613. }
  1614. .abnormal-item:last-of-type {
  1615. border-bottom: none !important;
  1616. padding-bottom: 0;
  1617. }
  1618. .abnormal-item {
  1619. width: 100%;
  1620. display: flex;
  1621. justify-content: space-between;
  1622. align-items: center;
  1623. padding: 16rpx;
  1624. border-bottom: 1px solid rgba(245, 245, 245, 1);
  1625. .item-title {
  1626. .level {
  1627. color: #fff;
  1628. border-radius: 8rpx;
  1629. font-weight: 400;
  1630. padding: 4rpx 8rpx;
  1631. font-size: 22rpx;
  1632. margin-right: 2px;
  1633. }
  1634. .level1 {
  1635. background: red;
  1636. }
  1637. .level2 {
  1638. background-color: rgba(255, 123, 0, 1);
  1639. }
  1640. color: rgba(51, 51, 51, 1);
  1641. width: 100%;
  1642. .img {
  1643. width: 32rpx;
  1644. height: 32rpx;
  1645. margin-right: 8rpx;
  1646. }
  1647. .name {
  1648. color: rgba(51, 51, 51, 1);
  1649. font-weight: bold;
  1650. overflow: hidden;
  1651. white-space: nowrap;
  1652. text-overflow: ellipsis;
  1653. }
  1654. .date {
  1655. color: rgba(119, 119, 119, 1);
  1656. font-size: 24rpx;
  1657. }
  1658. }
  1659. .item-value {
  1660. text-align: right;
  1661. display: flex;
  1662. align-items: center;
  1663. .more {
  1664. margin-left: 8rpx;
  1665. }
  1666. .value1 {
  1667. font-weight: bold;
  1668. color: rgba(51, 51, 51, 1);
  1669. }
  1670. .value2 {
  1671. color: rgba(119, 119, 119, 1);
  1672. font-size: 24rpx;
  1673. }
  1674. }
  1675. }
  1676. }
  1677. .body7main {
  1678. border-radius: 4px;
  1679. background-color: rgba(245, 245, 245, 1);
  1680. padding: 32rpx;
  1681. .line {
  1682. display: flex;
  1683. display: flex;
  1684. justify-content: space-between;
  1685. margin-bottom: 24rpx;
  1686. .goto{
  1687. display: flex;
  1688. align-items: center;
  1689. }
  1690. .item-body{
  1691. font-size: 24rpx;
  1692. }
  1693. .item-title {
  1694. color: rgba(51, 51, 51, 1);
  1695. font-size: 28rpx;
  1696. display: flex;
  1697. align-items: center;
  1698. .item-name{
  1699. margin-right: 8rpx;
  1700. font-size: 32rpx;
  1701. font-weight: bold;
  1702. }
  1703. }
  1704. .statusN{
  1705. border-radius: 4px;
  1706. font-size: 24rpx;
  1707. padding: 2rpx 8rpx;
  1708. margin-right: 8rpx;
  1709. }
  1710. .statusN1 {
  1711. color: rgba(0,185,98,1);
  1712. border: 1px solid rgba(0,185,98,1);
  1713. }
  1714. .statusN0 {
  1715. color: rgba(51,51,51,1);
  1716. border: 1px solid rgba(119,119,119,1);
  1717. }
  1718. .item-tags {
  1719. display: flex;
  1720. .tag {
  1721. border-radius: 4px;
  1722. white-space: pre;
  1723. background-color: rgba(39, 177, 72, 1);
  1724. color: rgba(255, 255, 255, 1);
  1725. font-size: 20rpx;
  1726. padding: 2rpx 8rpx;
  1727. margin-right: 8rpx;
  1728. }
  1729. .tag1 {
  1730. background-color: rgba(22, 119, 255, 1);
  1731. }
  1732. .tag2 {
  1733. background-color: rgba(129, 97, 255, 1);
  1734. }
  1735. .lockStatus {
  1736. background-color: rgba(153, 153, 153, 1);
  1737. }
  1738. .lockStatus2 {
  1739. background-color: #03A9F4
  1740. }
  1741. }
  1742. }
  1743. }
  1744. .body8main{
  1745. .line{
  1746. display: flex;
  1747. justify-content: space-between;
  1748. align-items: center;
  1749. background: #fff;
  1750. padding:16rpx 0rpx;
  1751. border-top: 1px solid rgba(232,232,232,1);
  1752. .data{
  1753. .view1{
  1754. color: rgba(16,16,16,1);
  1755. font-size: 32rpx;
  1756. font-weight: bold;
  1757. }
  1758. .view3{
  1759. color: rgba(119,119,119,1);
  1760. font-size: 28rpx;
  1761. }
  1762. }
  1763. .goto{
  1764. display: flex;
  1765. font-size: 32rpx;
  1766. }
  1767. .status1{
  1768. color:#FF5100
  1769. }
  1770. .status2{
  1771. color: rgba(22,119,255,1);
  1772. }
  1773. }
  1774. .line:first-child{
  1775. border-top: 0px ;
  1776. padding-top: 0px;
  1777. }
  1778. }
  1779. </style>