index.vue 83 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380
  1. <template>
  2. <view>
  3. <view class="top-cover">
  4. <view>
  5. <view class="navbar-tit" :class="{
  6. 'navbar-tit-box':flag
  7. }">
  8. <!--<span class="navbar-tit1">
  9. <img style="height: 40rpx ;width: 40rpx; margin-right: 4rpx;" src="@/assets/img/titleIcon.svg" alt="">
  10. 51充电联盟
  11. </span> -->
  12. <img src="@/assets/img/logo5Ud.png" style="height: 40rpx ;width: 192rpx;" alt="">
  13. <span class="navbar-tit2">运管中心</span>
  14. </view>
  15. <uni-view class="u-navbar-placeholder" style="width: 100%; height: 88rpx;"></uni-view>
  16. </view>
  17. <view class="income">
  18. <!-- 今日收入 -->
  19. <view class="today-queryHeadTime">{{queryHeadTime}}</view>
  20. <view class="today-income">
  21. <view class="number" @click="changesub(1)">
  22. {{showTopobj.todayAmount}}<text><img src="@/assets/img/riLine-refresh-line.svg" alt=""></text>
  23. </view>
  24. <view class="text">
  25. 今日收入 (元)
  26. </view>
  27. </view>
  28. <!-- 其他 -->
  29. <view class="else">
  30. <view class="item">
  31. <view class="item-number">
  32. {{showTopobj.todayProfit}}
  33. </view>
  34. <view class="item-text">
  35. 利润(元)
  36. </view>
  37. </view>
  38. <view class="item">
  39. <view class="item-number">
  40. {{showTopobj.todayEQAmount2?showTopobj.todayEQAmount2.toFixed(2):0}}
  41. </view>
  42. <view class="item-text">
  43. 今日电量 (度)
  44. </view>
  45. </view>
  46. <view class="item" v-if="showMonthlyCard">
  47. <view class="item-number">
  48. {{showTopobj.discountCardBuyNum}} / {{showTopobj.monthCardBuyNum}}
  49. </view>
  50. <view class="item-text">
  51. 6折卡/月卡 (张)
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <view class="statisticsData">
  57. <view class="statisticsChart" style="padding-top:20rpx;margin-bottom: 0px">
  58. <view class="statisticsChart-head ">
  59. <h4 class="h4-1"><img src="@/assets/img/riFill-numbers-fill.svg" alt="">充电统计</h4>
  60. <view class="navbar-screen " v-if="info.accountType==1">
  61. <!-- 个人 -->
  62. <u-button text="月落" size="mini" class="headbotton1" style="border-radius: 10px 0 0 10px;"
  63. :type="current==1?'success':'info'" @click="changesub(1)">天报</u-button>
  64. <u-button text="月落" size="mini" class="headbotton2" style="border-radius: 0 0 0 0;"
  65. :type="current==2?'success':'info'" @click="changesub(2)">月报</u-button>
  66. <u-button text="月落" size="mini" class="headbotton3" style="border-radius: 0 10px 10px 0;"
  67. :type="current==3?'success':'info'" @click="changesub(3)">年报</u-button>
  68. </view>
  69. <view class="navbar-screen " v-else>
  70. <!-- 个人 -->
  71. <u-button text="月落" size="mini" class="headbotton1" style="border-radius: 10px 0 0 10px;"
  72. :type="current==1?'success':'info'" @click="changesub(1)">天报</u-button>
  73. <u-button text="月落" size="mini" class="headbotton3" style="border-radius: 0 10px 10px 0;"
  74. :type="current==2?'success':'info'" @click="changesub(2)">月报</u-button>
  75. </view>
  76. </view>
  77. </view>
  78. <view class="detailstableHead" style="
  79. padding-top: 1px;
  80. ">
  81. <view id="pieEcharts" style="min-height:240px;margin-top: 40rpx">
  82. </view>
  83. <view v-if="type_head==3&&indexData3"
  84. style=" color: #777777; font-size: 24rpx;" >去年同期数据查询:{{indexData3?indexData3.graphMap.lastSamePeriodTime:''}}</view>
  85. </view>
  86. <view class="detailstableHead" v-if="indexData&&false">
  87. <view class="detailsline">
  88. <view class="details-row details-row-head-1 ">
  89. <view class="span1">今日收入</view>
  90. <view class="span2">
  91. {{indexData.todayAmount?indexData.todayAmount.toFixed(2):0}}<span>元</span>
  92. </view>
  93. </view>
  94. <view class="details-row details-row-head-2">
  95. <view class="span1">今日利润</view>
  96. <view class="span2">
  97. {{indexData.todayProfit?indexData.todayProfit.toFixed(2):0}}<span>元</span>
  98. </view>
  99. </view>
  100. <view class="details-row details-row-head-3">
  101. <view class="span1">今日笔数</view>
  102. <view class="span2">{{indexData.todayEQNum?indexData.todayEQNum:0}}<span>笔</span></view>
  103. </view>
  104. </view>
  105. <view class="detailsline">
  106. <view class="details-row details-row-head-1 ">
  107. <view class="span1">昨日收入</view>
  108. <view class="span2">
  109. {{indexData.yesterdayAmount?indexData.yesterdayAmount.toFixed(2):0}}<span>元</span>
  110. </view>
  111. </view>
  112. <view class="details-row details-row-head-2">
  113. <view class="span1">昨日利润</view>
  114. <view class="span2">
  115. {{indexData.yesterdayProfit?indexData.yesterdayProfit.toFixed(2):0}}<span>元</span>
  116. </view>
  117. </view>
  118. <view class="details-row details-row-head-3">
  119. <view class="span1">昨日笔数</view>
  120. <view class="span2">{{indexData.yesterdayEQNum?indexData.yesterdayEQNum:0}}<span>笔</span>
  121. </view>
  122. </view>
  123. </view>
  124. <view class="detailsline—bottom">
  125. <view class="details-row details-row-head-1">
  126. <view class="span1">本月收入</view>
  127. <view class="span2">
  128. {{indexData.thisMonthAmount?indexData.thisMonthAmount.toFixed(2):0}}<span>元</span>
  129. </view>
  130. </view>
  131. <view class="details-row details-row-head-2">
  132. <view class="span1">本月利润</view>
  133. <view class="span2">
  134. {{indexData.thisMonthProfit?indexData.thisMonthProfit.toFixed(2):0}}<span>元</span>
  135. </view>
  136. </view>
  137. <view class="details-row details-row-head-3">
  138. <view class="span1">本月笔数</view>
  139. <view class="span2">{{indexData.thisMonthEQNum?indexData.thisMonthEQNum:0}}<span>笔</span>
  140. </view>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. <u-picker mode="time" v-model="popupShow" @confirm="changedate" :default-time="queryTime" :params="params">
  147. </u-picker>
  148. <u-picker mode="time" v-model="popupShow2" @confirm="changedate2" :default-time="queryTime2+'-01'"
  149. :params="params"></u-picker>
  150. <u-popup border-radius="30" v-model="popupShow3" mode="bottom" height="80%">
  151. <view class="popup-screen">
  152. <view class="screen">
  153. <view class="screen-item">
  154. <view class="screen-head">站点</view>
  155. <view class="screen-main">
  156. <view class="screen-entry " :class="{
  157. active:selectstationId==''&&selectstationNo==''
  158. }" @click="selectstationId='',selectdeviceNo='',selectstationNo='',selectstationNameTemp='全部站点'">全部</view>
  159. <template v-for="(item,i) in stationList">
  160. <view class="screen-entry" :class="{
  161. active:selectstationNo==item.stationNo.substring(0,1)
  162. }" @click="selectstationId='',selectdeviceNo='',selectstationNo=item.stationNo.substring(0,1)"
  163. v-if="getStationNo(i)" :key="i">
  164. {{item.stationNo.substring(0,1)}}类
  165. </view>
  166. </template>
  167. <template v-for="(item,i) in stationList">
  168. <view class="screen-head" style="width: 100%;"
  169. v-if="getStationNo(i)&&selectstationNo==item.stationNo.substring(0,1)" :key="i">
  170. <span style="color: red;">*</span>{{item.stationNo.substring(0,1)}}类
  171. </view>
  172. <view :key="i" v-show="selectstationNo==item.stationNo.substring(0,1)" :class="{
  173. active:selectstationId==item.id
  174. }" @click="selectstationId=item.id,selectdeviceNo='',selectstationNameTemp=item.name" class="screen-entry">
  175. {{item.name}}</view>
  176. </template>
  177. </view>
  178. </view>
  179. </view>
  180. <view class="screen-foot">
  181. <view class="screen-btn-l" @click="resetBtn3">重置</view>
  182. <view class="screen-btn-r" @click="okbtn3">确定</view>
  183. </view>
  184. </view>
  185. </u-popup>
  186. <u-popup border-radius="30" v-model="popupShow7" mode="bottom" height="80%">
  187. <h2 style="padding: 40rpx 40rpx 0 40rpx;">充电枪使用情况统计</h2>
  188. <view class="popup-screen">
  189. <view class="screen">
  190. <view class="screen-item" v-if="false">
  191. <view class="screen-head">显示图表类型</view>
  192. <view class="screen-main">
  193. <view class="screen-entry" :class="{
  194. active:selectShowNumTypeTemp==1
  195. }" @click="selectShowNumTypeTemp=1">
  196. 百分比
  197. </view>
  198. <view class="screen-entry" :class="{
  199. active:selectShowNumTypeTemp==2
  200. }" @click="selectShowNumTypeTemp=2">
  201. 次数
  202. </view>
  203. </view>
  204. </view>
  205. <view class="screen-item" v-if="false">
  206. <view class="screen-head">充电桩类型<span style="color: red;">*</span><span
  207. style="color:rgb(136, 136, 136)">(可多选)</span></view>
  208. <view class="screen-main">
  209. <view class="screen-entry" :class="{
  210. active:selectShowNumTypeTemp1==1
  211. }" @click="selectShowNumTypeTemp1Btn">
  212. 快充桩
  213. </view>
  214. <view class="screen-entry" :class="{
  215. active:selectShowNumTypeTemp2==1
  216. }" @click="selectShowNumTypeTemp2Btn">
  217. 慢充桩
  218. </view>
  219. </view>
  220. </view>
  221. <view class="screen-item">
  222. <view class="screen-head">查询日期</view>
  223. <view class="screen-main2">
  224. <u-calendar v-model="showdate" mode="range" @change="changedate7"></u-calendar>
  225. <view @click="showdate = true" style="
  226. border: 1px solid;
  227. padding: 5px;
  228. ">{{startTime3Temp+'至'+endTime3Temp}}</view>
  229. <!--
  230. <u-action-sheet :list="actionSheetList" v-model="show" @click="actionSheetCallback"></u-action-sheet>
  231. -->
  232. </view>
  233. </view>
  234. <view class="screen-item">
  235. <view class="screen-head">站点类型<span style="color: red;">*</span></view>
  236. <view class="screen-main">
  237. <view class="screen-entry " :class="{
  238. active:selectstationNo7==''&&selectstationId7==''
  239. }" @click="selectstationId7='',selectstationNo7='',selectOneTemp={name:'全部站点'}">全部</view>
  240. <template v-for="(item,i) in stationList">
  241. <view class="screen-entry" :class="{
  242. active:selectstationNo7==item.stationNo.substring(0,1)
  243. }" @click="selectstationId7='',selectstationNo7=item.stationNo.substring(0,1)"
  244. v-if="getStationNo(i)&&item.stationNo.substring(0,1)!='D'&&item.stationNo.substring(0,1)!='E'"
  245. :key="i">
  246. {{item.stationNo.substring(0,1)}}类
  247. </view>
  248. </template>
  249. <template v-for="(item,i) in stationList">
  250. <view class="screen-head" style="width: 100%;"
  251. v-if="getStationNo(i)&&selectstationNo7==item.stationNo.substring(0,1)" :key="i">
  252. {{item.stationNo.substring(0,1)}}类<span style="color: red;">*</span>
  253. </view>
  254. <view :key="i" v-show="selectstationNo7==item.stationNo.substring(0,1)" :class="{
  255. active:selectstationId7==item.id
  256. }" @click="selectstationId7=item.id,selectOneTemp=item" class="screen-entry">{{item.name}}</view>
  257. </template>
  258. </view>
  259. </view>
  260. <view class="screen-item" style="margin-bottom: 40rpx; ">
  261. <view class="screen-head">时间段查询<span style="color:rgb(136, 136, 136);margin-left: 20rpx;">
  262. (勾选启用)</span></view>
  263. <view class="screen-main" style=" align-items: center;">
  264. <view>
  265. <checkbox-group @change="checkboxChange1">
  266. <checkbox value="cb" :checked="sliderNumTemp1.ck"></checkbox>
  267. {{sliderNumTemp1.ck?'开启':'关闭'}}
  268. </checkbox-group>
  269. </view>
  270. <view style="
  271. width: 50%;margin-bottom: 8rpx;margin-left: 20rpx;
  272. ">
  273. <u-select v-model="sliderNum1Show" :default-value="sliderDefaultValue1"
  274. mode="mutil-column-auto" @confirm="handlerDoubleSlider1"
  275. :list="sliderNumList"></u-select>
  276. <view @click="sliderNum1Show = true" style="
  277. border: 1px solid;
  278. padding: 5px;
  279. ">{{sliderNumTemp1.minValue+'点至'+(sliderNumTemp1.minValue>sliderNumTemp1.maxValue?'次日':'')+sliderNumTemp1.maxValue+'点'}}
  280. </view>
  281. </view>
  282. </view>
  283. <view class="screen-main" style=" align-items: center;">
  284. <view>
  285. <checkbox-group @change="checkboxChange2">
  286. <checkbox value="cb" :checked="sliderNumTemp2.ck"></checkbox>
  287. {{sliderNumTemp2.ck?'开启':'关闭'}}
  288. </checkbox-group>
  289. </view>
  290. <view style="
  291. width: 50%;margin-bottom: 8rpx;margin-left: 20rpx;
  292. ">
  293. <u-select v-model="sliderNum2Show" :default-value="sliderDefaultValue2 "
  294. mode="mutil-column-auto" @confirm="handlerDoubleSlider2"
  295. :list="sliderNumList"></u-select>
  296. <view @click="sliderNum2Show = true" style="
  297. border: 1px solid;
  298. padding: 5px;
  299. ">{{sliderNumTemp2.minValue+'点至'+(sliderNumTemp2.minValue>sliderNumTemp2.maxValue?'次日':'')+sliderNumTemp2.maxValue+'点'}}
  300. </view>
  301. </view>
  302. </view>
  303. </view>
  304. </view>
  305. <view class="screen-foot">
  306. <view class="screen-btn-l" @click="popupShow7=false">关闭</view>
  307. <view class="screen-btn-r" @click="okbtn7">确定</view>
  308. </view>
  309. </view>
  310. </u-popup>
  311. <view class="statisticsChart chargingpile" v-if="indexData4">
  312. <view class="statisticsChart-head" style="margin-top: 40rpx;">
  313. <h4>充电枪运行情况</h4>
  314. </view>
  315. <view class="details detailstablepile" style="padding: 12px 0 12px 12px ;">
  316. <p>
  317. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="20" height="20"
  318. style=" vertical-align: bottom;border-color: rgba(0,0,0,0);border-width: bpx;border-style: undefined"
  319. filter="none">
  320. <g>
  321. <path fill="rgba(23.97,90.015,197.88,1)"
  322. d="M4 25.333v-20c0-0.736 0.597-1.333 1.333-1.333v0h12c0.736 0 1.333 0.597 1.333 1.333v0 10.667h2.667c1.473 0 2.667 1.194 2.667 2.667v0 5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v0-9.333h-2.667c-0.736 0-1.333-0.597-1.333-1.333v0-4.781l-2.209-2.209 1.885-1.885 6.6 6.6c0.241 0.241 0.391 0.574 0.391 0.941 0 0 0 0.001 0 0.001v-0 12c0 2.209-1.791 4-4 4s-4-1.791-4-4v0-5.333h-2.667v6.667h1.333v2.667h-17.333v-2.667h1.333zM12 14.667v-5.333l-5.333 8h4v5.333l5.333-8h-4z">
  323. </path>
  324. </g>
  325. </svg>
  326. <!-- <img style=" vertical-align: bottom;" src="@/assets/img/riFill-charging-pile-fill.svg"></img>
  327. --> 快(超)充枪<span>共</span>
  328. <span
  329. style="color:#000">{{indexData4.fastGunFaultNum+indexData4.fastGunFreeNum+indexData4.fastGunWorkNum}}</span>
  330. <span>支</span>
  331. </p>
  332. <view class="detailsline">
  333. <view class="details-row details-row-1" @click="indexDate4Ck(1,1)">
  334. <view class="span1"><span class="bot bot1"></span>在用<span
  335. class="bot1span">{{indexData4.fastGunWorkNum}}</span>支
  336. <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#b0b8c8" size="28" />
  337. </view>
  338. </view>
  339. <view class="details-row details-row-1" @click="indexDate4Ck(1,0)">
  340. <view class="span1"><span class="bot bot2"></span>空闲<span
  341. class="bot2span">{{indexData4.fastGunFreeNum}}</span>支
  342. <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#b0b8c8" size="28" />
  343. </view>
  344. </view>
  345. <view class="details-row details-row-1" @click="indexDate4Ck(1,99)">
  346. <view class="span1"><span class="bot bot3"></span>故障<span
  347. class="bot3span">{{indexData4.fastGunFaultNum}}</span>支
  348. <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#b0b8c8" size="28" />
  349. </view>
  350. </view>
  351. </view>
  352. <p style="margin-top: 16rpx;color:#00B962">
  353. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="20" height="20"
  354. style=" vertical-align: bottom;border-color: rgba(0,0,0,0);border-width: bpx;border-style: undefined"
  355. filter="none">
  356. <g>
  357. <path fill="#00B962"
  358. d="M4 25.333v-20c0-0.736 0.597-1.333 1.333-1.333v0h12c0.736 0 1.333 0.597 1.333 1.333v0 10.667h2.667c1.473 0 2.667 1.194 2.667 2.667v0 5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v0-9.333h-2.667c-0.736 0-1.333-0.597-1.333-1.333v0-4.781l-2.209-2.209 1.885-1.885 6.6 6.6c0.241 0.241 0.391 0.574 0.391 0.941 0 0 0 0.001 0 0.001v-0 12c0 2.209-1.791 4-4 4s-4-1.791-4-4v0-5.333h-2.667v6.667h1.333v2.667h-17.333v-2.667h1.333zM12 14.667v-5.333l-5.333 8h4v5.333l5.333-8h-4z">
  359. </path>
  360. </g>
  361. </svg>
  362. 慢充枪<span>共</span>
  363. <span
  364. style="color:#000">{{indexData4.slowGunFaultNum+indexData4.slowGunFreeNum+indexData4.slowGunWorkNum}}</span>
  365. <span>支</span>
  366. </p>
  367. <view class="detailsline—bottom">
  368. <view class="details-row details-row-1" @click="indexDate4Ck(2,1)">
  369. <view class="span1"><span class="bot bot1"></span>在用<span
  370. class="bot1span">{{indexData4.slowGunWorkNum}}</span>支
  371. <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#b0b8c8" size="28" />
  372. </view>
  373. </view>
  374. <view class="details-row details-row-1" @click="indexDate4Ck(2,0)">
  375. <view class="span1"><span class="bot bot2"></span>空闲<span
  376. class="bot2span">{{indexData4.slowGunFreeNum}}</span>支
  377. <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#b0b8c8" size="28" />
  378. </view>
  379. </view>
  380. <view class="details-row details-row-1" @click="indexDate4Ck(2,99)">
  381. <view class="span1"><span class="bot bot3"></span>故障<span
  382. class="bot3span">{{indexData4.slowGunFaultNum}}</span>支
  383. <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#b0b8c8" size="28" />
  384. </view>
  385. </view>
  386. </view>
  387. </view>
  388. </view>
  389. <view class="statisticsChart chargingpile" v-if="indexData4">
  390. <view class="statisticsChart-head" style="margin-top: 20rpx;">
  391. <h4>电单车充电桩运行情况</h4>
  392. </view>
  393. <view class="details detailstablepile" style="padding: 12px 0 12px 12px ;">
  394. <p style="color:#1677FF">
  395. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="20" height="20"
  396. style=" vertical-align: bottom;border-color: rgba(0,0,0,0);border-width: bpx;border-style: undefined"
  397. filter="none">
  398. <g>
  399. <path fill="#1677FF"
  400. d="M4 25.333v-20c0-0.736 0.597-1.333 1.333-1.333v0h12c0.736 0 1.333 0.597 1.333 1.333v0 10.667h2.667c1.473 0 2.667 1.194 2.667 2.667v0 5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v0-9.333h-2.667c-0.736 0-1.333-0.597-1.333-1.333v0-4.781l-2.209-2.209 1.885-1.885 6.6 6.6c0.241 0.241 0.391 0.574 0.391 0.941 0 0 0 0.001 0 0.001v-0 12c0 2.209-1.791 4-4 4s-4-1.791-4-4v0-5.333h-2.667v6.667h1.333v2.667h-17.333v-2.667h1.333zM12 14.667v-5.333l-5.333 8h4v5.333l5.333-8h-4z">
  401. </path>
  402. </g>
  403. </svg>
  404. 电单车充电桩<span>共</span>
  405. <span style="color:#000">{{indexData4.singleCarOnlineNum+indexData4.singleCarNotOnlineNum}}</span>
  406. <span>台</span>
  407. </p>
  408. <view class="detailsline">
  409. <view class="details-row details-row-1" @click="indexDate5Ck(1,1)">
  410. <view class="span1"><span class="bot bot1"></span>正常<span
  411. class="bot1span">{{indexData4.singleCarOnlineNum}}</span>台
  412. <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#b0b8c8" size="28" />
  413. </view>
  414. </view>
  415. <view class="details-row details-row-1" @click="indexDate5Ck(0,99)">
  416. <view class="span1"><span class="bot bot3"></span>故障<span
  417. class="bot3span">{{indexData4.singleCarNotOnlineNum}}</span>台
  418. <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#b0b8c8" size="28" />
  419. </view>
  420. </view>
  421. </view>
  422. </view>
  423. </view>
  424. <u-popup v-model="popupShow6" mode="bottom" border-radius="30">
  425. <view class="indexData5content">
  426. <view class="contentTitle">
  427. 电单车充电桩{{indexData5Obj.type?'正常':'故障'}}明细
  428. </view>
  429. <scroll-view scroll-y="true" style="height: 520rpx;">
  430. <u-collapse style="padding-bottom: 30rpx;">
  431. <u-collapse-item v-for="(item,index) in indexData5List" class="contentItem"
  432. v-show="item.deviceNum" :key="index">
  433. <svg slot="title" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="20"
  434. height="20"
  435. style=" vertical-align: bottom;border-color: rgba(0,0,0,0);border-width: bpx;border-style: undefined"
  436. filter="none">
  437. <g>
  438. <path fill="#1677FF"
  439. d="M4 25.333v-20c0-0.736 0.597-1.333 1.333-1.333v0h12c0.736 0 1.333 0.597 1.333 1.333v0 10.667h2.667c1.473 0 2.667 1.194 2.667 2.667v0 5.333c0 0.736 0.597 1.333 1.333 1.333s1.333-0.597 1.333-1.333v0-9.333h-2.667c-0.736 0-1.333-0.597-1.333-1.333v0-4.781l-2.209-2.209 1.885-1.885 6.6 6.6c0.241 0.241 0.391 0.574 0.391 0.941 0 0 0 0.001 0 0.001v-0 12c0 2.209-1.791 4-4 4s-4-1.791-4-4v0-5.333h-2.667v6.667h1.333v2.667h-17.333v-2.667h1.333zM12 14.667v-5.333l-5.333 8h4v5.333l5.333-8h-4z">
  440. </path>
  441. </g>
  442. </svg>
  443. <view slot="title" class="span1">
  444. {{item.stationName}}
  445. </view>
  446. <view slot="title">
  447. <span class="span2 color777">
  448. 共<span class="color333">{{item.deviceNum}}</span>台
  449. </span>
  450. <span class="span3 color777">
  451. 通道数<span class="color333">{{item.channelNum}}</span>
  452. </span>
  453. </view>
  454. <view style="padding-bottom: 30rpx;">
  455. <view class="contentBodyName">
  456. {{item.stationName}}
  457. </view>
  458. <view class="contentBody" v-for="(gun,i) in item.device" :key="i">
  459. <view class="body1">{{gun.deviceName}}</view>
  460. <view class="body2" v-if="indexData5Obj.type">
  461. <view class="body2-0">在用<span class="body2-1">{{gun.useNum}}</span> </view>
  462. <view class="body2-2">| 空闲 {{gun.freeNum}}</view>
  463. </view>
  464. <view class="body3" v-else>故障</view>
  465. </view>
  466. </view>
  467. </u-collapse-item>
  468. </u-collapse>
  469. </scroll-view>
  470. <view class="confrim-btn">
  471. <u-button shape="square" type="primary" @click="popupShow6 = false;">关闭</u-button>
  472. </view>
  473. </view>
  474. </u-popup>
  475. <u-popup v-model="popupShow5" mode="bottom" border-radius="30">
  476. <view class="indexData4content">
  477. <view class="contentTitle">
  478. {{indexData4Obj.typeName}}枪{{indexData4Obj.text}}明细
  479. <!-- <view v-show='indexData4Obj.value=="bot3span"' style="color:#777777;font-size: 12px;font-weight: normal;">
  480. 点击站点查看故障枪
  481. </view> -->
  482. </view>
  483. <scroll-view scroll-y="true" style="height: 520rpx;">
  484. <u-collapse class="u-collapse-bot3span"
  485. v-if='indexData4Obj.value=="bot3span"||indexData4Obj.value=="bot1span"'
  486. style="padding-bottom: 30rpx;">
  487. <u-collapse-item class="contentItem" v-for="(item,index) in indexData4List"
  488. v-show="item.queryNum" :key="index">
  489. <span class="span1" slot="title">
  490. <img v-show="indexData4Obj.type==1&&item.category!='超充'"
  491. src="@/assets/img/riFill-charging-pile-fill.svg">
  492. <img v-show="indexData4Obj.type==1&&item.category=='超充'"
  493. src="@/assets/img/riFill-charging-pile-fill3.svg">
  494. <img v-show="indexData4Obj.type==2" src="@/assets/img/riFill-charging-pile-fill2.svg">
  495. </img>
  496. {{item.stationName}}</span>
  497. <span class="span2 color777" slot="title">
  498. 共<span class="color333">{{item.gunNum}}</span>支
  499. </span>
  500. <span class="span3 color333" slot="title">
  501. {{indexData4Obj.text}}<span class="color777"
  502. :class="indexData4Obj.value">{{item.queryNum}}</span>支
  503. </span>
  504. <view style="padding-bottom: 30rpx;">
  505. <view class="contentBodyName">
  506. {{item.stationName}}
  507. </view>
  508. <view class="contentBody" v-for="(gun,i) in item.gunList" :key="i">
  509. <view class="body1">
  510. <span
  511. v-if="gun.sortNo">{{gun.sortNo}}号<text>/</text></span>{{gun.deviceName}}{{'枪'+gun.channelNo}}
  512. </view>
  513. <view class="body3" v-if='indexData4Obj.value=="bot1span"'>
  514. {{gun.soc?gun.soc+'%':'充电中'}}
  515. </view>
  516. <view class="body3" v-if='indexData4Obj.value=="bot3span"'>{{gun.workStatusText}}
  517. </view>
  518. </view>
  519. </view>
  520. </u-collapse-item>
  521. </u-collapse>
  522. <view class="u-collapse-bot0span" style="padding-bottom: 30rpx;" v-else>
  523. <view class="contentItem" v-for="(item,index) in indexData4List" v-show="item.queryNum"
  524. :key="index">
  525. <span class="span1">
  526. <img v-show="indexData4Obj.type==1&&item.category!='超充'"
  527. src="@/assets/img/riFill-charging-pile-fill.svg">
  528. <img v-show="indexData4Obj.type==1&&item.category=='超充'"
  529. src="@/assets/img/riFill-charging-pile-fill3.svg">
  530. <img v-show="indexData4Obj.type==2" src="@/assets/img/riFill-charging-pile-fill2.svg">
  531. </img>
  532. {{item.stationName}}</span>
  533. <span class="span2 color777">
  534. 共<span class="color333">{{item.gunNum}}</span>支
  535. </span>
  536. <span class="span3 color333">
  537. {{indexData4Obj.text}}<span class="color777"
  538. :class="indexData4Obj.value">{{item.queryNum}}</span>支
  539. </span>
  540. </view>
  541. </view>
  542. </scroll-view>
  543. <view class="confrim-btn">
  544. <u-button shape="square" type="primary" @click="popupShow5 = false;">关闭</u-button>
  545. </view>
  546. </view>
  547. </u-popup>
  548. <view class="statisticsChart">
  549. <view class="statisticsChart-head" style="margin-top: 40rpx;">
  550. <h4>流水统计</h4>
  551. <!-- <view class="navbar-screen" >
  552. {{startTime}}至{{endTime}}
  553. </view> -->
  554. <view class="navbar-screen" @click="popupShow = true" v-if="false">
  555. <span>{{showTime(queryTime)}}</span>
  556. <u-icon name="arrow-down" color="#b0b8c8" size="32" v-show="!popupShow"></u-icon>
  557. <u-icon name="arrow-up" color="#b0b8c8" size="32" v-show="popupShow"></u-icon>
  558. </view>
  559. </view>
  560. <u-calendar v-model="popupShow4" mode="range" @change="changedate4"></u-calendar>
  561. <view class="details detailstable">
  562. <p style="text-align: center; margin-bottom: 5px;" @click="popupShow4 = true">
  563. <img src="@/assets/img/riLine-calendar-todo-line.svg" align="absmiddle"
  564. style="height:40rpx;width: 40rpx ;">
  565. {{startTime}}至{{endTime}}
  566. <u-icon name="arrow-down" color="#b0b8c8" size="32" v-show="!popupShow4"></u-icon>
  567. <u-icon name="arrow-up" color="#b0b8c8" size="32" v-show="popupShow4"></u-icon>
  568. </p>
  569. <view class="detailsline detailslineHead" v-if="stationFlowList.length>1">
  570. <view class="details-row ">
  571. <view class="span1">总收入</view>
  572. <view class="span2">{{(allMoneySum).toFixed(2)}}<span>元</span></view>
  573. </view>
  574. <view class="details-row">
  575. <view class="span1">总利润<span>(服务费+折扣卡)</span></view>
  576. <view class="span2">{{(serviceMoneySum).toFixed(2)}}<span>元</span></view>
  577. </view>
  578. </view>
  579. <view v-if="stationFlowList.length==0"
  580. style="color: rgba(153, 153, 153, 1);font-size: 28rpx;text-align: center;margin-top: 16rpx;">
  581. 站点列表为空
  582. </view>
  583. <view v-if="stationFlowList.length" @click="gotoUrl('pagesFinance/statistics/list')"
  584. style="color: rgba(153, 153, 153, 1);font-size: 28rpx;text-align: center;margin-top: 16rpx;">
  585. 查看站点流水统计 <u-icon name="arrow-right-s-line" custom-prefix="custom-icon" color="#b0b8c8" size="28">
  586. </u-icon>
  587. </view>
  588. </view>
  589. <view class="statisticsChart-head" style="margin-top: 40rpx;">
  590. <h4>站主/桩主收益统计</h4>
  591. <!-- <view class="navbar-screen" >
  592. {{startTime}}至{{endTime}}
  593. </view> -->
  594. <!-- <view class="navbar-screen" @click="popupShow2 = true"><span>筛选</span>
  595. <u-icon name="filter-2-fill" custom-prefix="custom-icon" color="#b0b8c8" size="32"></u-icon>
  596. </view> -->
  597. </view>
  598. <view class="details" v-if="indexData2&&indexData2.incomeMap">
  599. <view class="details-row2">
  600. <p @click="popupShow3 = true">{{selectstationName}}
  601. <u-icon name="arrow-down" color="#b0b8c8" size="32" v-show="!popupShow3"></u-icon>
  602. <u-icon name="arrow-up" color="#b0b8c8" size="32" v-show="popupShow3"></u-icon>
  603. </p>
  604. <p @click="popupShow2 = true">
  605. {{showTime(queryTime2)}}
  606. <u-icon name="arrow-down" color="#b0b8c8" size="32" v-show="!popupShow2"></u-icon>
  607. <u-icon name="arrow-up" color="#b0b8c8" size="32" v-show="popupShow2"></u-icon>
  608. </p>
  609. </view>
  610. <view class="details-row">
  611. <p>充电总收入</p>
  612. <span>{{(indexData2.incomeMap.chargingAmount).toFixed(2)}}元</span>
  613. </view>
  614. <view class="details-row">
  615. <p>站主/桩主收入</p>
  616. <span>{{indexData2.incomeMap.incomeAmount.toFixed(2)}}元</span>
  617. </view>
  618. <view class="details-row">
  619. <p>预估用电度数</p>
  620. <span>{{(indexData2.incomeMap.electricQuantity/10000).toFixed(1)}}度</span>
  621. </view>
  622. <view class="details-row">
  623. <p>预估电费</p>
  624. <span>{{indexData2.incomeMap.costAmount.toFixed(2)}}元</span>
  625. </view>
  626. <view class="details-row">
  627. <p>服务费预估收益</p>
  628. <span>{{indexData2.incomeMap.serviceAmount.toFixed(2)}}元</span>
  629. </view>
  630. <view class="details-row">
  631. <p>折扣卡收益</p>
  632. <span>{{indexData2.incomeMap.cardIncomeAmount.toFixed(2)}}元</span>
  633. </view>
  634. <view class="details-row">
  635. <p>预估总利润</p>
  636. <span>{{(indexData2.incomeMap.serviceAmount+indexData2.incomeMap.cardIncomeAmount).toFixed(2)}}元</span>
  637. </view>
  638. </view>
  639. <view class="statisticsChart-head" style="margin-top: 40rpx;">
  640. <h4>充电枪使用情况统计</h4>
  641. <!-- <view class="navbar-screen" >
  642. {{startTime}}至{{endTime}}
  643. </view> -->
  644. <view class="navbar-screen" @click="resetBtn7()"><span>筛选</span>
  645. <u-icon name="filter-2-fill" custom-prefix="custom-icon" color="#b0b8c8" size="32"></u-icon>
  646. </view>
  647. </view>
  648. <view style="
  649. color: #888888;
  650. ">
  651. <view v-if="selectOne"><!-- [ {{selectShowNumType==1?'百分比':'次数'}} ] --> {{selectOne.name}}</view>
  652. <view>{{startTime3}}至{{endTime3}};</view>
  653. <view>
  654. <span
  655. v-if="sliderNum1.ck">{{sliderNum1.minValue}}点-{{(sliderNumTemp1.minValue>sliderNumTemp1.maxValue?'次日':'')}}{{sliderNum1.maxValue}}点;</span>
  656. <span
  657. v-if="sliderNum2.ck">{{sliderNum2.minValue}}点-{{(sliderNumTemp2.minValue>sliderNumTemp2.maxValue?'次日':'')}}{{sliderNum2.maxValue}}点;</span>
  658. </view>
  659. </view>
  660. <view class="detailstableHead" style="
  661. padding-top: 1px;
  662. ">
  663. <view id="pieEcharts2" style="margin-top: 40rpx">
  664. </view>
  665. </view>
  666. </view>
  667. <u-divider nonetext="没有找到相关内容" style="margin-top: 20rpx;" border-color="#CFD2D5">已经到底了</u-divider>
  668. <Tabbar :current="0" ref="tabbarMain"></Tabbar>
  669. <!-- <u-tabbar v-model="current" :list="tabbarList" active-color="#185ac6"></u-tabbar>
  670. -->
  671. </view>
  672. </template>
  673. <script>
  674. import Tabbar from '@/components/TabbarFinance.vue'
  675. import * as API from '@/apis/finance.js'
  676. import * as echarts from "echarts";
  677. import DoubleSlider from '@/components/double-slider/DoubleSlider.vue';
  678. //require("@/apis/echarts-5-3.min.js")
  679. //import * as echarts from "@/apis/echarts-5-3.min.js";
  680. import {
  681. daysDistance,
  682. beforeTimeStamp,
  683. currentTimeStamp,
  684. parseUnixTime,
  685. newDate
  686. } from '@/utils'
  687. export default {
  688. data() {
  689. return {
  690. popupShow3: false,
  691. params: {
  692. year: true,
  693. month: true,
  694. day: false,
  695. hour: false,
  696. minute: false,
  697. second: false
  698. },
  699. indexData4List: [],
  700. indexData4Obj: {},
  701. indexData5List: [],
  702. indexData5Obj: {},
  703. headitemby: "",
  704. isinit: true,
  705. form: {},
  706. form2: {},
  707. form3: {},
  708. selecttype: "",
  709. selectstationId: "",
  710. selectdeviceNo: "",
  711. selectstationNo: "",
  712. selectstationId7: "",
  713. selectstationNo7: "",
  714. popupShow2: false,
  715. popupShow: false,
  716. popupShow4: false,
  717. popupShow5: false,
  718. popupShow6: false,
  719. popupShow7: false,
  720. nowTime: 0,
  721. queryHeadTime: "",
  722. selectstationId2: "",
  723. selectstationIndex: 0,
  724. selectstationName: "",
  725. selectstationNameTemp: "",
  726. info: {},
  727. title: "",
  728. showdate: false,
  729. showdate2: false,
  730. queryTime: "",
  731. queryTime2: "",
  732. indexData: {},
  733. indexData3: null,
  734. indexData2: null,
  735. indexData4: null,
  736. indexData5: null,
  737. indexData6: null,
  738. type_head: '1',
  739. startDate_head: '',
  740. changeitemBl: false,
  741. myChart2: null,
  742. myChart: null,
  743. myChartReady: true,
  744. myChartTime: false,
  745. subsection: [{
  746. name: '金额'
  747. },
  748. {
  749. name: '笔数'
  750. }
  751. ],
  752. stationFlowList: [],
  753. serviceMoneySum: 0,
  754. allMoneySum: 0,
  755. stationList: [],
  756. stationListSon: [],
  757. tabbarList: [{
  758. iconPath: "bar-chart-box-fill",
  759. selectedIconPath: "bar-chart-box-fill",
  760. text: '统计',
  761. count: 0,
  762. isDot: true,
  763. customIcon: true,
  764. },
  765. {
  766. iconPath: "article-fill",
  767. selectedIconPath: "article-fill",
  768. text: '明细',
  769. midButton: true,
  770. customIcon: true,
  771. },
  772. {
  773. iconPath: "account-pin-box-fill",
  774. selectedIconPath: "account-pin-box-fill",
  775. text: '我的',
  776. count: 0,
  777. isDot: false,
  778. customIcon: true,
  779. },
  780. ],
  781. endTime: '',
  782. endTime2: '',
  783. endTime3: '',
  784. endTime3Temp: '',
  785. stationId3: "",
  786. current: 1,
  787. background: {
  788. background: 'none'
  789. },
  790. value: '',
  791. type: 'select',
  792. show: false,
  793. border: true,
  794. step: 0,
  795. stepname: '',
  796. startTime: '',
  797. startTime3: '',
  798. startTime3Temp: '',
  799. stepid: 0,
  800. windowWidth: 0,
  801. windowHeight: 300,
  802. showTopobj: {},
  803. showMonthlyCard: false,
  804. flag: false,
  805. //selectstationId: "",
  806. selectOne: {
  807. name: '全部站点'
  808. },
  809. selectOneTemp: {},
  810. selectShowNumType: 1,
  811. selectShowNumTypeTemp: 1,
  812. selectShowNumType1: 1,
  813. selectShowNumTypeTemp1: 1,
  814. selectShowNumType2: 1,
  815. selectShowNumTypeTemp2: 1,
  816. sliderNum1: {
  817. ck: 0,
  818. minValue: 0,
  819. maxValue: 8
  820. },
  821. sliderNum2: {
  822. ck: 0,
  823. minValue: 18,
  824. maxValue: 24
  825. },
  826. sliderNumTemp1: {
  827. ck: 0,
  828. minValue: 0,
  829. maxValue: 5
  830. },
  831. sliderNumTemp2: {
  832. ck: 0,
  833. minValue: 0,
  834. maxValue: 5
  835. },
  836. sliderNum1Show: false,
  837. sliderNum2Show: false,
  838. sliderNumList: [
  839. ],
  840. }
  841. },
  842. onShow() {
  843. if (this.$refs.tabbarMain) {
  844. this.$refs.tabbarMain.setcount(0);
  845. }
  846. API.homeChargingGunStatus().then((res) => {
  847. this.indexData4 = res.data;
  848. }).catch(error => {
  849. uni.showToast({
  850. title: error
  851. })
  852. })
  853. },
  854. onLoad() {
  855. this.info = this.carhelp.getPersonInfo()
  856. this.info = this.carhelp.getPersonInfo()
  857. if (this.info && this.info.showMonthlyCard) {
  858. this.showMonthlyCard = this.info.showMonthlyCard;
  859. }
  860. this.title = this.info.merchantAccountName
  861. uni.getSystemInfo().then(e => {
  862. this.windowWidth = e[1].windowWidth
  863. this.windowHeight = e[1].windowHeight
  864. })
  865. this.sliderNumList = []
  866. var sz = []
  867. for (var i = 0; i < 24; i++) {
  868. var sz2 = []
  869. // for(var j =i+1;j<=24;j++){
  870. // sz2.push({
  871. // value: j,
  872. // label: j+'点'
  873. // })
  874. // }
  875. for (var j = i + 1; j < i + 24; j++) {
  876. if (j <= 24) {
  877. sz2.push({
  878. value: j,
  879. label: j + '点'
  880. })
  881. } else {
  882. sz2.push({
  883. value: j - 24,
  884. label: '次日' + (j - 24) + '点'
  885. })
  886. }
  887. }
  888. sz.push({
  889. value: i,
  890. label: i + '点',
  891. children: sz2
  892. })
  893. }
  894. this.sliderNumList = sz
  895. },
  896. components: {
  897. Tabbar,
  898. DoubleSlider
  899. },
  900. onReady() {
  901. var date = new Date();
  902. this.nowTime = 7
  903. this.queryTime = parseUnixTime(currentTimeStamp(), '{y}-{m}');
  904. this.queryTime2 = parseUnixTime(currentTimeStamp(), '{y}-{m}'),
  905. this.startDate_head = parseUnixTime(beforeTimeStamp(30), '{y}-{m}-{d}')
  906. this.startTime = parseUnixTime(beforeTimeStamp(6), '{y}-{m}-{d}')
  907. this.endTime = parseUnixTime(beforeTimeStamp(0), '{y}-{m}-{d}')
  908. //this.startTime2 = parseUnixTime(beforeTimeStamp(6), '{y}-{m}-{d}')
  909. this.endTime2 = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
  910. this.startTime3 = parseUnixTime(beforeTimeStamp(31), '{y}-{m}-{d}')
  911. this.endTime3 = parseUnixTime(beforeTimeStamp(1), '{y}-{m}-{d}')
  912. this.getStation()
  913. },
  914. computed: {
  915. // startTime(){
  916. // return this.queryTime+'-1'
  917. // },
  918. sliderDefaultValue1() {
  919. var min = this.sliderNumTemp1.minValue
  920. var max = this.sliderNumTemp1.maxValue
  921. var a = min
  922. var b = 0
  923. if (max > min) {
  924. b = max - min - 1
  925. } else {
  926. b = 23 - min + max
  927. }
  928. return [a, b]
  929. },
  930. sliderDefaultValue2() {
  931. var min = this.sliderNumTemp2.minValue
  932. var max = this.sliderNumTemp2.maxValue
  933. var a = min
  934. var b = 0
  935. if (max > min) {
  936. b = max - min - 1
  937. } else {
  938. b = 23 - min + max
  939. }
  940. return [a, b]
  941. },
  942. startTime2() {
  943. return this.queryTime2 + '-01'
  944. },
  945. },
  946. onPageScroll(e) {
  947. this.onPageScrollMethod()
  948. },
  949. updated() {
  950. this.onPageScrollMethod()
  951. },
  952. methods: {
  953. checkboxChange1(e) {
  954. this.sliderNumTemp1.ck = e.detail.value.length
  955. },
  956. checkboxChange2(e) {
  957. this.sliderNumTemp2.ck = e.detail.value.length
  958. },
  959. handlerDoubleSlider1(e) {
  960. // var a=e.minValue.toFixed(0)
  961. // var b=e.maxValue.toFixed(0)
  962. this.sliderNumTemp1.minValue = e[0].value
  963. this.sliderNumTemp1.maxValue = e[1].value
  964. },
  965. handlerDoubleSlider2(e) {
  966. // var a=e.minValue.toFixed(0)
  967. // var b=e.maxValue.toFixed(0)
  968. // this.sliderNumTemp2.minValue=a
  969. // this.sliderNumTemp2.maxValue=b
  970. this.sliderNumTemp2.minValue = e[0].value
  971. this.sliderNumTemp2.maxValue = e[1].value
  972. //this.preference.obc_power = e;
  973. //this.preference.obc_power.minValue = e.minValue;
  974. //this.preference.obc_power.maxValue = e.maxValue;
  975. },
  976. selectShowNumTypeTemp1Btn() {
  977. if (this.selectShowNumTypeTemp1 == 1) {
  978. this.selectShowNumTypeTemp1 = 0
  979. } else {
  980. this.selectShowNumTypeTemp1 = 1
  981. }
  982. },
  983. selectShowNumTypeTemp2Btn() {
  984. if (this.selectShowNumTypeTemp2 == 1) {
  985. this.selectShowNumTypeTemp2 = 0
  986. } else {
  987. this.selectShowNumTypeTemp2 = 1
  988. }
  989. },
  990. getStationNo(i) {
  991. var no = this.stationList[i].stationNo
  992. if (no) {
  993. if (i == 0) {
  994. return true
  995. } else {
  996. var no2 = this.stationList[i - 1].stationNo
  997. if (no2) {
  998. return no2.substring(0, 1) != no.substring(0, 1)
  999. } else {
  1000. return false
  1001. }
  1002. }
  1003. } else {
  1004. return false
  1005. }
  1006. },
  1007. onPageScrollMethod() {
  1008. const query = uni.createSelectorQuery().in(this);
  1009. query.select('.income').boundingClientRect(data => {
  1010. if (data) {
  1011. var c = uni.upx2px(32);
  1012. if (data.top > c) {
  1013. this.flag = false;
  1014. } else {
  1015. this.flag = true;
  1016. }
  1017. }
  1018. }).exec();
  1019. },
  1020. indexDate5Ck(t, status) {
  1021. //单车充电
  1022. API.homeChargingGunStatus().then((res) => {
  1023. this.indexData4 = res.data;
  1024. }).catch(error => {
  1025. uni.showToast({
  1026. title: error
  1027. })
  1028. })
  1029. this.indexData5Obj.type = t
  1030. API.homeChargingSingleCarStatusDetail({
  1031. status: status
  1032. }).then((res) => {
  1033. this.popupShow6 = true;
  1034. this.indexData5List = res.data.stationList;
  1035. for (var i in this.indexData5List) {
  1036. var item = this.indexData5List[i];
  1037. if (item.deviceNum) {
  1038. this.popupShow6 = true
  1039. break
  1040. }
  1041. this.popupShow6 = false;
  1042. }
  1043. if (!this.popupShow6) {
  1044. uni.showToast({
  1045. title: "电单车充电桩" + (t ? "正常" : "故障") + "0支"
  1046. })
  1047. }
  1048. }).catch(error => {
  1049. uni.showToast({
  1050. title: error
  1051. })
  1052. })
  1053. },
  1054. indexDate4Ck(c, t) {
  1055. //汽车充电
  1056. API.homeChargingGunStatus().then((res) => {
  1057. this.indexData4 = res.data;
  1058. }).catch(error => {
  1059. uni.showToast({
  1060. title: error
  1061. })
  1062. })
  1063. this.indexData4Obj.type = c
  1064. if (c == 1) {
  1065. this.indexData4Obj.typeName = "快(超)充"
  1066. }
  1067. if (c == 2) {
  1068. this.indexData4Obj.typeName = "慢充"
  1069. }
  1070. if (t == 1) {
  1071. this.indexData4Obj.text = "在用"
  1072. this.indexData4Obj.value = "bot1span"
  1073. }
  1074. if (t == 0) {
  1075. this.indexData4Obj.text = "空闲"
  1076. this.indexData4Obj.value = "bot2span"
  1077. }
  1078. if (t == 99) {
  1079. this.indexData4Obj.text = "故障"
  1080. this.indexData4Obj.value = "bot3span"
  1081. }
  1082. API.homeChargingGunStatusDetail({
  1083. type: c,
  1084. status: t
  1085. }).then((res) => {
  1086. this.indexData4List = res.data.stationList;
  1087. for (var i in this.indexData4List) {
  1088. var item = this.indexData4List[i];
  1089. if (item.queryNum) {
  1090. this.popupShow5 = true
  1091. break
  1092. }
  1093. this.popupShow5 = false;
  1094. }
  1095. if (!this.popupShow5) {
  1096. uni.showToast({
  1097. title: this.indexData4Obj.typeName + "枪" + this.indexData4Obj.text + "0支"
  1098. })
  1099. }
  1100. }).catch(error => {
  1101. uni.showToast({
  1102. title: error
  1103. })
  1104. })
  1105. },
  1106. changeitem(e) {
  1107. if (this.stationFlowList.length > 1 && e.index == this.stationFlowList.length - 1 && e.show) {
  1108. this.changeitemBl = true;
  1109. } else {
  1110. this.changeitemBl = false;
  1111. }
  1112. },
  1113. showTime(name) {
  1114. if (!name) {
  1115. return ''
  1116. }
  1117. return name.replace('-', '年') + '月';
  1118. },
  1119. getStation(bl) {
  1120. API.stationList().then((res) => {
  1121. var list = res.data.stationList
  1122. var list2 = list.sort(function(item1, item2) {
  1123. return (item1.stationNo > item2.stationNo) ? 1 : -1
  1124. })
  1125. this.stationList = list2
  1126. if (list2.length) {
  1127. this.getData()
  1128. }
  1129. //
  1130. this.getData3()
  1131. // this.stationList.unshift({
  1132. // id: '',
  1133. // name: "全部站点"
  1134. // })
  1135. this.selectstationName = "全部站点"
  1136. //this.stationListSon = res.data.deviceList
  1137. this.getDataHome2()
  1138. this.getData2()
  1139. }).catch(error => {
  1140. uni.showToast({
  1141. title: error
  1142. })
  1143. })
  1144. },
  1145. resetBtn() {
  1146. this.nowTime = 7
  1147. this.startTime = parseUnixTime(beforeTimeStamp(6), '{y}-{m}-{d}')
  1148. this.endTime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
  1149. this.selecttype = ""
  1150. this.selectstationId = ""
  1151. this.selectdeviceNo = ""
  1152. this.form = {
  1153. type: this.selecttype,
  1154. stationId: this.selectstationId,
  1155. deviceNo: this.selectdeviceNo,
  1156. };
  1157. this.popupShow = false;
  1158. this.list = [];
  1159. this.getData()
  1160. },
  1161. okbtn() {
  1162. this.popupShow = false;
  1163. this.form = {
  1164. type: this.selecttype,
  1165. stationId: this.selectstationId,
  1166. deviceNo: this.selectdeviceNo,
  1167. };
  1168. this.list = [];
  1169. this.getData()
  1170. },
  1171. resetBtn2() {
  1172. this.startTime2 = parseUnixTime(beforeTimeStamp(6), '{y}-{m}-{d}')
  1173. this.endTime2 = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
  1174. this.selectstationId2 = ""
  1175. this.form2 = {
  1176. stationId: this.selectstationId2,
  1177. };
  1178. this.popupShow2 = false;
  1179. this.getData2()
  1180. },
  1181. okbtn2() {
  1182. this.popupShow2 = false;
  1183. this.form2 = {
  1184. stationId: this.selectstationId2,
  1185. };
  1186. this.getData2()
  1187. },
  1188. getDataHome2() {
  1189. var endtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}')
  1190. API.homeHeadChargingStatistics({
  1191. type: this.type_head,
  1192. startDate: this.startDate_head,
  1193. endDate: endtime
  1194. }).then((res) => {
  1195. this.indexData3 = res.data;
  1196. uni.hideLoading()
  1197. if (this.type_head == 3) {
  1198. this.getBar(this.info.accountType)
  1199. } else {
  1200. if (this.type_head == 1) {
  1201. var weeks = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
  1202. var day = new Date().getDay();
  1203. var week = weeks[day];
  1204. var sz = new Date().toLocaleString().split(" ");
  1205. this.queryHeadTime = sz[0] + " " + week + " " + sz[1]
  1206. }
  1207. this.getPie(this.info.accountType)
  1208. }
  1209. }).catch(error => {
  1210. uni.showToast({
  1211. title: error
  1212. })
  1213. })
  1214. },
  1215. // getDataHome() {
  1216. // API.homeHeadStatistics().then((res) => {
  1217. // this.indexData = res.data;
  1218. // }).catch(error => {
  1219. // uni.showToast({
  1220. // title: error
  1221. // })
  1222. // })
  1223. // },
  1224. getData() {
  1225. this.form.startDate = this.startTime,
  1226. this.form.endDate = this.endTime
  1227. API.homeFlowStatistics(this.form).then((res) => {
  1228. this.stationFlowList = res.data.stationFlowList;
  1229. this.nowTime = daysDistance(this.startTime, this.endTime) + 1;
  1230. this.serviceMoneySum = 0;
  1231. this.allMoneySum = 0;
  1232. this.serviceMoneySum = res.data.allProfit;
  1233. this.allMoneySum = res.data.allAmount;
  1234. for (var i in this.stationFlowList) {
  1235. var item = this.stationFlowList[i];
  1236. // this.allMoneySum += item.actualMoney
  1237. // this.serviceMoneySum += item.serviceMoney
  1238. // this.serviceMoneySum += item.cardMoney
  1239. }
  1240. }).catch(error => {
  1241. uni.showToast({
  1242. title: error
  1243. })
  1244. })
  1245. },
  1246. getData2() {
  1247. uni.showLoading({
  1248. title: "加载中",
  1249. mask: true,
  1250. })
  1251. this.form2.startDate = this.startTime2,
  1252. this.form2.endDate = this.endTime2
  1253. API.homeIncomeStatistics(this.form2).then((res) => {
  1254. this.indexData2 = res.data
  1255. uni.hideLoading()
  1256. }).catch(error => {
  1257. uni.showToast({
  1258. title: error
  1259. })
  1260. })
  1261. },
  1262. changedate7(e) {
  1263. // this.queryDate = e.result
  1264. this.startTime3Temp = e.startDate
  1265. this.endTime3Temp = e.endDate
  1266. },
  1267. getData3(bl) {
  1268. this.indexData6 = null
  1269. if (bl) {
  1270. uni.showLoading({
  1271. title: "加载中",
  1272. mask: true,
  1273. })
  1274. this.myChartReady = false
  1275. }
  1276. this.form3.startDate = this.startTime3
  1277. this.form3.endDate = this.endTime3
  1278. this.form3.stationId = this.stationId3;
  1279. //var str="";
  1280. if (this.sliderNum1.ck == 1 || this.sliderNum2.ck == 1) {
  1281. var str = "";
  1282. if (this.sliderNum1.ck == 1) {
  1283. str += this.sliderNum1.minValue + "-" + this.sliderNum1.maxValue
  1284. if (this.sliderNum2.ck == 1) {
  1285. str += ","
  1286. }
  1287. }
  1288. if (this.sliderNum2.ck == 1) {
  1289. str += this.sliderNum2.minValue + "-" + this.sliderNum2.maxValue
  1290. }
  1291. this.form3.timeArray = str
  1292. } else {
  1293. delete this.form3.timeArray
  1294. }
  1295. API.usageStatistics(this.form3).then((res) => {
  1296. this.indexData6 = res.data
  1297. if (bl) {
  1298. this.myChartReady = true
  1299. uni.hideLoading()
  1300. }
  1301. this.getPie2(this.indexData6)
  1302. }).catch(error => {
  1303. uni.showToast({
  1304. title: error
  1305. })
  1306. })
  1307. },
  1308. changesub(e) {
  1309. this.current = e
  1310. this.type_head = e;
  1311. uni.showLoading({
  1312. title: "加载中",
  1313. mask: true,
  1314. })
  1315. if (e == 1) {
  1316. this.startDate_head = parseUnixTime(beforeTimeStamp(30), '{y}-{m}-{d}')
  1317. } else if (e == 2) {
  1318. this.startDate_head = parseUnixTime(beforeTimeStamp(365), '{y}-{m}-01')
  1319. } else if (e == 3) {
  1320. this.startDate_head = parseUnixTime(new Date(), '{y}-01-01')
  1321. }
  1322. // this.getPie()
  1323. this.getDataHome2()
  1324. },
  1325. changedate4(e) {
  1326. this.startTime = e.startDate
  1327. this.endTime = e.endDate
  1328. this.okbtn()
  1329. },
  1330. resetBtn7() {
  1331. //this.myChart2.dispatchAction({ type: 'hideTip' });
  1332. this.popupShow7 = true;
  1333. this.startTime3Temp = this.startTime3;
  1334. this.endTime3Temp = this.endTime3;
  1335. this.selectShowNumTypeTemp = this.selectShowNumType;
  1336. this.sliderNumTemp1 = this.sliderNum1
  1337. this.sliderNumTemp2 = this.sliderNum2
  1338. this.selectShowNumTypeTemp2 = this.selectShowNumType2
  1339. this.selectShowNumTypeTemp1 = this.selectShowNumType1
  1340. this.selectOneTemp = this.selectOne;
  1341. },
  1342. okbtn7() {
  1343. // if(this.selectstationId7==''){
  1344. // uni.showToast({
  1345. // icon:"none",
  1346. // title:"请选择站点"
  1347. // })
  1348. // return
  1349. // }
  1350. if (this.selectShowNumTypeTemp2 == 0 && this.selectShowNumTypeTemp1 == 0) {
  1351. uni.showToast({
  1352. icon: "none",
  1353. title: "充电桩类型至少选择一个"
  1354. })
  1355. return
  1356. }
  1357. this.selectShowNumType2 = this.selectShowNumTypeTemp2
  1358. this.selectShowNumType1 = this.selectShowNumTypeTemp1
  1359. this.sliderNum1 = this.sliderNumTemp1
  1360. this.sliderNum2 = this.sliderNumTemp2
  1361. this.selectShowNumType = this.selectShowNumTypeTemp
  1362. this.selectOne = this.selectOneTemp;
  1363. this.stationId3 = this.selectstationId7
  1364. this.startTime3 = this.startTime3Temp
  1365. this.endTime3 = this.endTime3Temp
  1366. this.popupShow7 = false
  1367. this.getData3(true);
  1368. },
  1369. resetBtn3() {
  1370. this.selectstationId = ""
  1371. this.selectstationId2 = "";
  1372. this.selectstationNo = ""
  1373. //this.selectstationIndex = index;
  1374. this.selectstationNameTemp = "全部站点"
  1375. this.selectstationName = "全部站点";
  1376. //this.okbtn2()
  1377. this.popupShow3 = false
  1378. this.okbtn2()
  1379. },
  1380. okbtn3() {
  1381. if (this.selectstationNo && this.selectstationId == '') {
  1382. uni.showToast({
  1383. icon: "none",
  1384. title: "请选择站点"
  1385. })
  1386. return
  1387. }
  1388. this.popupShow3 = false
  1389. this.selectstationId2 = this.selectstationId;
  1390. //this.selectstationIndex = index;
  1391. this.selectstationName = this.selectstationNameTemp;
  1392. //this.okbtn2()
  1393. this.okbtn2()
  1394. },
  1395. changedate3(e) {
  1396. this.selectstationId2 = this.selectstationId;
  1397. //this.selectstationIndex = index;
  1398. this.selectstationName = this.selectstationNameTemp;
  1399. this.okbtn2()
  1400. },
  1401. changedate(e) {
  1402. this.queryTime = e.year + '-' + e.month;
  1403. this.startTime = e.year + '-' + e.month + '-01';
  1404. if (e.month == '12') {
  1405. this.endTime = (e.year) + "-12-31"
  1406. } else {
  1407. var b = e.year + '/' + (parseInt(e.month) + 1) + '/1';
  1408. var a = beforeTimeStamp(1, b);
  1409. this.endTime = parseUnixTime(a, '{y}-{m}-{d}')
  1410. }
  1411. this.okbtn()
  1412. },
  1413. changedate2(e) {
  1414. this.queryTime2 = e.year + '-' + e.month;
  1415. if (e.month == '12') {
  1416. this.endTime2 = (e.year) + "-12-31"
  1417. } else {
  1418. var b = e.year + '/' + (parseInt(e.month) + 1) + '/1';
  1419. var a = beforeTimeStamp(1, b);
  1420. this.endTime2 = parseUnixTime(a, '{y}-{m}-{d}')
  1421. }
  1422. this.okbtn2()
  1423. },
  1424. getPie2(obj, str) {
  1425. var data = []
  1426. //var dataAll=[]
  1427. var data1 = []
  1428. var data2 = []
  1429. var usageFastMap = obj.usageFastMap;
  1430. for (var i in usageFastMap) {
  1431. // var str1=parseInt( i.split('-')[0])
  1432. // var str2=parseInt(i.split('-')[1])
  1433. // //dataAll.push(i)
  1434. // if(this.sliderNum1.ck==1||this.sliderNum2.ck==1){
  1435. // // str+=this.sliderNum1.minValue+"-"+this.sliderNum1.maxValue
  1436. // // if(this.sliderNum2.ck==1){
  1437. // // str+=","
  1438. // // }
  1439. // if(this.sliderNum2.ck==1){
  1440. // //str+=this.sliderNum2.minValue+"-"+this.sliderNum2.maxValue
  1441. // if(this.sliderNum2.minValue<=str1&&this.sliderNum2.maxValue>str1){
  1442. // data.push(i)
  1443. // continue
  1444. // }
  1445. // }
  1446. // if(this.sliderNum1.ck==1){
  1447. // //str+=this.sliderNum2.minValue+"-"+this.sliderNum2.maxValue
  1448. // if(this.sliderNum1.minValue<=str1&&this.sliderNum1.maxValue>str1){
  1449. // data.push(i)
  1450. // continue
  1451. // }
  1452. // }
  1453. // }else{
  1454. // }
  1455. data.push(i)
  1456. }
  1457. var height = 1680;
  1458. if (!this.myChart2) {
  1459. this.myChart2 = echarts.init(document.getElementById('pieEcharts2'), null, {
  1460. width: uni.upx2px(700),
  1461. height: uni.upx2px(height)
  1462. });
  1463. } else {
  1464. if (data.length != 24) {
  1465. height = 1680 * data.length / 24 + 200
  1466. if (data.length <= 10) {
  1467. //top='12%'
  1468. }
  1469. //top=(30-data.length*2)+'%'
  1470. }
  1471. this.myChart2.resize({
  1472. height: uni.upx2px(height),
  1473. width: uni.upx2px(700)
  1474. })
  1475. }
  1476. this.myChart2.clear();
  1477. var usageSlowMap = obj.usageSlowMap;
  1478. data.reverse()
  1479. var num1 = 0;
  1480. var num2 = 0;
  1481. for (var i in data) {
  1482. num1 += usageFastMap[data[i]]
  1483. num2 += usageSlowMap[data[i]]
  1484. }
  1485. for (var i in data) {
  1486. if (this.selectShowNumType == 1) {
  1487. if (num1 == 0) {
  1488. data1.push(0)
  1489. } else {
  1490. data1.push((usageFastMap[data[i]] / num1 * 100).toFixed(2))
  1491. }
  1492. if (num2 == 0) {
  1493. data2.push(0)
  1494. } else {
  1495. data2.push((usageSlowMap[data[i]] / num2 * 100).toFixed(2))
  1496. }
  1497. } else {
  1498. data1.push((usageFastMap[data[i]]))
  1499. data2.push((usageSlowMap[data[i]]))
  1500. }
  1501. }
  1502. var series = []
  1503. if (this.selectShowNumType1 == 1) {
  1504. series.push({
  1505. name: '快充桩',
  1506. type: 'bar',
  1507. data: data1,
  1508. barWidth: 10,
  1509. label: {
  1510. show: true, // 开启数据标签显示
  1511. position: 'right', // 数据标签位置,这里设置为顶部
  1512. color: 'black', // 数据标签颜色
  1513. fontSize: uni.upx2px(24), // 数据标签字体大小
  1514. formatter: '{c}' + (this.selectShowNumType == 1 ? '%' : '次')
  1515. }
  1516. })
  1517. }
  1518. if (this.selectShowNumType2 == 1) {
  1519. series.push({
  1520. name: '慢充桩',
  1521. type: 'bar',
  1522. data: data2,
  1523. barWidth: 10,
  1524. label: {
  1525. show: true, // 开启数据标签显示
  1526. position: 'right', // 数据标签位置,这里设置为顶部
  1527. color: 'black', // 数据标签颜色
  1528. fontSize: uni.upx2px(24), // 数据标签字体大小
  1529. formatter: '{c}' + (this.selectShowNumType == 1 ? '%' : '次')
  1530. }
  1531. })
  1532. }
  1533. var option = {
  1534. tooltip: {
  1535. // formatter: '{b}点<br />{a0}: {c0}%<br />{a1}: {c1}%',
  1536. formatter: (value) => {
  1537. var name = value[0].axisValueLabel;
  1538. var text1 = ""
  1539. var style = "float: right;margin-left: 3px;"
  1540. for (var i in value) {
  1541. text1 += "<p>" + value[i].marker + value[i].seriesName +
  1542. '<span style="' + style +
  1543. '">' + value[i].data + (this.selectShowNumType == 1 ? '%' : '次') +
  1544. '</span></p>';
  1545. }
  1546. return `<p>${name}时</p>` + text1
  1547. },
  1548. trigger: 'axis',
  1549. axisPointer: {
  1550. type: 'shadow'
  1551. }
  1552. },
  1553. legend: {},
  1554. grid: {
  1555. top: 30,
  1556. left: 2,
  1557. right: 30,
  1558. bottom: 20,
  1559. containLabel: true
  1560. },
  1561. xAxis: {
  1562. name: this.selectShowNumType == 1 ? '%' : '次',
  1563. type: 'value',
  1564. boundaryGap: [0, 0.01]
  1565. },
  1566. yAxis: {
  1567. type: 'category',
  1568. data: data,
  1569. axisLabel: {
  1570. interval: 0,
  1571. },
  1572. },
  1573. series: series
  1574. }
  1575. this.myChart2.setOption(option);
  1576. console.log(option)
  1577. },
  1578. getBar(type) {
  1579. var getData = this.indexData3.graphMap;
  1580. if (!this.myChart) {
  1581. this.myChart = echarts.init(document.getElementById('pieEcharts'));
  1582. this.myChart.on("dataZoom", (res) => {
  1583. showkey = "";
  1584. this.headitemby = "";
  1585. });
  1586. }
  1587. this.myChart.clear();
  1588. var key = ["AmountCard", "ProfitCard", "EQAmount", "DiscountCardBuyNum", "MonthCardBuyNum"]
  1589. var keyStr = ['收入\n(含卡)', '利润\n(含卡)', '充电量', '6折卡', '月卡']
  1590. var keyStrN = ['收入(含卡)', '利润(含卡)', '充电量', '6折卡', '月卡']
  1591. var keyStrT = ['收入', '利润', '充电量', '6折卡', '月卡']
  1592. var sz1 = []
  1593. var sz2 = []
  1594. key.forEach(item => {
  1595. var i1 = getData['nowYear' + item]
  1596. var i2 = getData['lastSamePeriod' + item]
  1597. if (i1 + i2 == 0) {
  1598. sz1.push(0)
  1599. sz2.push(0)
  1600. }else if (i1 &&i2 == 0) {
  1601. sz1.push(100)
  1602. sz2.push(0)
  1603. } else {
  1604. sz1.push((i1 / (i2) * 100.00).toFixed(2))
  1605. if (i1 < i2) {
  1606. sz2.push(((i2 - i1) / (i2) * 100.00).toFixed(2))
  1607. } else {
  1608. sz2.push(0)
  1609. }
  1610. }
  1611. })
  1612. var option = {
  1613. tooltip: {
  1614. trigger: 'axis',
  1615. axisPointer: {
  1616. type: 'shadow'
  1617. },
  1618. position: (e) => {
  1619. var x = e[0]
  1620. var y = e[1]
  1621. if (this.windowWidth) {
  1622. if (x < this.windowWidth / 2) {
  1623. return ['30%', '-20%']
  1624. } else {
  1625. return ['10%', '-20%']
  1626. }
  1627. }
  1628. },
  1629. formatter: (value) => {
  1630. //console.log(value)
  1631. var dataIndex = value[0].dataIndex;
  1632. var name =keyStrN[dataIndex];
  1633. var style = "float: right;margin-left: 20px;"
  1634. var prefix = ["lastYear", "lastSamePeriod", "nowYear"]
  1635. var prefixStr = ["去年全年", "去年同期", "今年同期"]
  1636. var u = ['元', '元', '度', '张', '张']
  1637. var keytool = ["AmountCard", "ProfitCard", "EQAmount", "DiscountCardBuyNum",
  1638. "MonthCardBuyNum"
  1639. ]
  1640. var text1 = ""
  1641. //去年全年数据、去年同期数据、今年当前数据和同期完成比。
  1642. var k = null;
  1643. for (var j in prefix) {
  1644. var pre = prefix[j]
  1645. var item = keytool[dataIndex]
  1646. var num = getData[pre + item]
  1647. if(item=='EQAmount'){
  1648. num=num/10000
  1649. }
  1650. var uu = this.getNum(num, j)
  1651. //去年今年 用一个单位
  1652. if (j == 1) {
  1653. k = uu
  1654. } else if (j == 2) {
  1655. uu = k
  1656. }
  1657. var showNum=(num / uu.num).toFixed(uu.num>100?2:0)
  1658. text1 += "<p>" + prefixStr[j] +keyStrT[dataIndex]+
  1659. '<span style="' + style +
  1660. '">' + (u[dataIndex]=='张'?num:showNum) + uu.u + u[dataIndex] + '</span></p>';
  1661. }
  1662. text1 += "<p>今年同期完成比" +
  1663. '<span style="' + style +
  1664. '">' + value[0].data + '%</span></p>';
  1665. return `<p>` + value[0].marker + `${name}</p>` + text1
  1666. // console.log(value)
  1667. }
  1668. },
  1669. legend: {
  1670. data: ['去年同期数据', '今年同期完成比']
  1671. },
  1672. grid: {
  1673. top: 30,
  1674. left: 2,
  1675. right: 5,
  1676. bottom: 20,
  1677. containLabel: true
  1678. },
  1679. xAxis: {
  1680. type: 'category',
  1681. data: keyStr
  1682. },
  1683. yAxis: {
  1684. type: 'value'
  1685. },
  1686. series: [{
  1687. name: '今年同期完成比',
  1688. type: 'bar',
  1689. stack: '总量', // 指定堆叠的组名
  1690. label: {
  1691. show: true,
  1692. formatter: (params) => {
  1693. if(params.value==0){
  1694. return ""
  1695. }else{
  1696. return params.value + '%'
  1697. }
  1698. }
  1699. },
  1700. data: sz1
  1701. },
  1702. {
  1703. name: '去年同期数据',
  1704. type: 'bar',
  1705. label: {
  1706. show: true,
  1707. formatter: (params) => {
  1708. if(params.value==0){
  1709. return ""
  1710. }else{
  1711. return params.value + '%'
  1712. }
  1713. }
  1714. },
  1715. stack: '总量', // 与产品A堆叠
  1716. data: sz2
  1717. },
  1718. ]
  1719. };
  1720. this.myChart.setOption(option);
  1721. },
  1722. getNum(num, j) {
  1723. var str = {
  1724. num: 1,
  1725. u: ""
  1726. }
  1727. if (num > 10000) {
  1728. str = {
  1729. num: 10000,
  1730. u: "万"
  1731. }
  1732. }
  1733. if (num > 10000 * 10000) {
  1734. str = {
  1735. num: 10000 * 10000,
  1736. u: "亿"
  1737. }
  1738. }
  1739. if (j == 0) {
  1740. if (num > 10000 * 10000 * 10000) {
  1741. str = {
  1742. num: 10000 * 10000 * 10000,
  1743. u: "万亿"
  1744. }
  1745. }
  1746. }
  1747. return str
  1748. },
  1749. getPie(type) {
  1750. //true 正常版本 false 个人版本
  1751. var typebl = !(this.info.accountType == 3);
  1752. var dataInterval = null;
  1753. if (typebl) {
  1754. if (this.type_head == 1) {
  1755. dataInterval = [0, 75, 100,
  1756. 125, 150, 200, 400, 500,
  1757. 600, 1200, 1400, 1600, 1800,
  1758. 2600, 2800,
  1759. 3000, 4200,
  1760. 4800, 5200, 6500, 7000, 7500, 8000, 12000, 14000, 16000, 18000, 20000, 23000,
  1761. 25000, 30000, 35000, 40000, 999999
  1762. ];
  1763. } else {
  1764. dataInterval = [0, 500, 1000, 2000, 5000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000,
  1765. 90000, 100000, 120000, 140000, 160000, 180000, 200000, 220000, 240000, 280000, 3200000,
  1766. 3500000, 400000, 500000,
  1767. 999999
  1768. ];
  1769. }
  1770. }
  1771. this.headitemby = "";
  1772. var showkey = "";
  1773. var getData = this.indexData3.graphMap;
  1774. for (var i in getData) {
  1775. var item = getData[i]
  1776. item.todayEQAmount2 = (item.todayEQAmount / 10000)
  1777. if (this.type_head == 1) {
  1778. this.showTopobj = item;
  1779. }
  1780. }
  1781. this.indexData3.graphMap = getData
  1782. //var unit = this.current ? '笔' : '元'
  1783. var colorName = "#333"
  1784. // this.showlist1 = ['收入', '利润', '次数','新电途'];
  1785. var showlistColor = ['#5872c0', '#de6e6a', '#f3c96b', '#69be8d', '#c661b4'];
  1786. // this.showlist1 = ['收入', '利润', '电量', '新电途'];
  1787. // var sz2 = ['todayAmount', 'todayProfit', 'todayEQAmount2', 'todayXDTAmount'];
  1788. this.showlist1 = ['收入', '利润', '电量', '新电途', '快电'];
  1789. var sz2 = ['todayAmount', 'todayProfit', 'todayEQAmount2', 'todayXDTAmount', 'todayKDAmount'];
  1790. if (this.showMonthlyCard && this.type_head == 2) {
  1791. var sz2 = ['todayAmountC', 'todayProfitC', 'todayEQAmount2', 'todayXDTAmount', 'todayKDAmount'];
  1792. }
  1793. var zLevel = [20, 40, 10, 30, 9];
  1794. //var sz2 = ['todayAmount', 'todayProfit', 'todayEQNum','todayXDTAmount'];
  1795. if (!this.myChart) {
  1796. this.myChart = echarts.init(document.getElementById('pieEcharts'));
  1797. this.myChart.on("dataZoom", (res) => {
  1798. showkey = "";
  1799. this.headitemby = "";
  1800. });
  1801. }
  1802. this.myChart.clear();
  1803. //
  1804. var timelist = []
  1805. for (var i in getData) {
  1806. if (this.type_head == 1) {
  1807. timelist.push(i.substring(5))
  1808. } else {
  1809. timelist.push(i)
  1810. }
  1811. }
  1812. var list = [];
  1813. for (var j in this.showlist1) {
  1814. var ap = {
  1815. name: this.showlist1[j],
  1816. type: 'line',
  1817. lineStyle: {
  1818. color: showlistColor[j]
  1819. },
  1820. itemStyle: {
  1821. color: showlistColor[j]
  1822. },
  1823. z: zLevel[j],
  1824. // label: {
  1825. // show: true,
  1826. // position: 'top'
  1827. // },
  1828. data: []
  1829. }
  1830. if (this.type_head == 1) {
  1831. ap.symbolSize = 3;
  1832. }
  1833. var bl = true;
  1834. for (var i in getData) {
  1835. //var time=this.queryDate.replace("-","/").replace("-","/")
  1836. //time+' '+i
  1837. var obj = getData[i][sz2[j]];
  1838. //**********
  1839. if (typebl) {
  1840. const min_v = Math.max(...dataInterval.filter((v) => v <= obj));
  1841. // 2.寻找在数据间隔里大于amount的最小值
  1842. const max_v = Math.min(...dataInterval.filter((v) => v > obj));
  1843. // 3.寻找 min_v 所在的下标
  1844. const index = dataInterval.findIndex((v) => v === min_v);
  1845. // 4.计算该amount在y轴上应该展示的位置
  1846. const y_value = ((obj - min_v) / (max_v - min_v)) * 10 + index * 10;
  1847. obj = y_value;
  1848. }
  1849. //**********
  1850. //'todayAmount', 'todayProfit', 'todayEQNum'
  1851. // if (bl&&getData[i].todayAmount == 0 && getData[i].todayProfit == 0 &&getData[i].todayEQNum == 0) {
  1852. // //&& &&getData[i].todayEQNum == 0
  1853. // continue;
  1854. // }
  1855. bl = false;
  1856. var time = i
  1857. if (this.type_head == 1) {
  1858. //time = i.substring(5)
  1859. } else {
  1860. }
  1861. ap.data.push([time, obj]);
  1862. }
  1863. if (bl) {
  1864. ap.data = [];
  1865. for (var i in getData) {
  1866. //var time=this.queryDate.replace("-","/").replace("-","/")
  1867. //time+' '+i
  1868. var obj = getData[i][sz2[j]];
  1869. var time = i
  1870. if (this.type_head == 1) {
  1871. time = i.substring(5)
  1872. } else {
  1873. }
  1874. // if(j!=2){
  1875. // obj=obj.toFixed(2)
  1876. // }
  1877. ap.data.push([time, obj]);
  1878. }
  1879. }
  1880. list.push(ap)
  1881. }
  1882. var yshow = 0;
  1883. // 指定图表的配置项和数据
  1884. var option = {
  1885. tooltip: {
  1886. position: (e) => {
  1887. var x = e[0]
  1888. var y = e[1]
  1889. if (this.windowWidth) {
  1890. if (y < 100) {
  1891. if (x < this.windowWidth / 2) {
  1892. return ['30%', '60%']
  1893. } else {
  1894. return ['10%', '60%']
  1895. }
  1896. } else {
  1897. if (x < this.windowWidth / 2) {
  1898. return ['30%', '-45%']
  1899. } else {
  1900. return ['10%', '-45%']
  1901. }
  1902. }
  1903. }
  1904. },
  1905. formatter: (value) => {
  1906. //getPie
  1907. var name = value[0].data[0];
  1908. var info = getData[name];
  1909. var style = "float: right;margin-left: 3px;"
  1910. var text1 = ""
  1911. for (var i in value) {
  1912. var u = "元"
  1913. var num = info[sz2[value[i].seriesIndex]];
  1914. if (!num) {
  1915. num = 0;
  1916. }
  1917. if (value[i].seriesName == '电量') {
  1918. u = '度'
  1919. num = num.toFixed(2)
  1920. } else if (value[i].seriesName == '次数') {
  1921. u = '次'
  1922. } else {
  1923. num = num.toFixed(2)
  1924. }
  1925. var markerU = "";
  1926. if (this.type_head == 2) {
  1927. if (!num) {
  1928. num = 0;
  1929. }
  1930. if (value[i].seriesName == "电量") {
  1931. u = "万度"
  1932. num = (num / 10000).toFixed(2)
  1933. }
  1934. if (value[i].seriesName == "利润") {
  1935. //u = "万元"
  1936. if (this.showMonthlyCard) {
  1937. markerU = "(含卡)"
  1938. //num = info.todayProfitC
  1939. }
  1940. }
  1941. if (value[i].seriesName == "收入") {
  1942. u = "万元"
  1943. num = info.todayAmountW
  1944. if (this.showMonthlyCard) {
  1945. markerU = "(含卡)"
  1946. num = info.todayAmountCW
  1947. }
  1948. }
  1949. if (!num) {
  1950. num = 0;
  1951. }
  1952. num = parseFloat(num)
  1953. num = num.toFixed(2)
  1954. }
  1955. text1 += "<p>" + value[i].marker + value[i].seriesName + markerU +
  1956. '<span style="' + style +
  1957. '">' + num + u + '</span></p>';
  1958. if (this.type_head == 2) {
  1959. if (value[i].seriesName == "收入") {
  1960. if (this.showMonthlyCard) {
  1961. markerU = "(含卡)"
  1962. info.yoyNum = info.yoyNumC
  1963. info.qoqNum = info.qoqNumC
  1964. }
  1965. if (name != this.queryTime2) {
  1966. if (info.yoyNum != null) {
  1967. text1 += "<p>" + value[i].marker + "收入同比" + (info.yoyNum < 0 ?
  1968. '减少' : '增长') + '<span style="' + style +
  1969. '">' + (info.yoyNum < 0 ? info.yoyNum * -1 : info.yoyNum) +
  1970. '%' + '</span></p>';
  1971. } else {
  1972. text1 += "<p>" + value[i].marker + "收入同比" + '<span style="' +
  1973. style +
  1974. '">' + '无数据' + '</span></p>';
  1975. }
  1976. if (info.qoqNum != null) {
  1977. text1 += "<p>" + value[i].marker + "收入环比" + (info.qoqNum < 0 ?
  1978. '减少' : '增长') + '<span style="' + style +
  1979. '">' + (info.qoqNum < 0 ? info.qoqNum * -1 : info.qoqNum) +
  1980. '%' + '</span></p>';
  1981. } else {
  1982. text1 += "<p>" + value[i].marker + "收入环比" + '<span style="' +
  1983. style +
  1984. '">' + '无数据' + '</span></p>';
  1985. }
  1986. }
  1987. }
  1988. }
  1989. if (i == value.length - 1 && this.showMonthlyCard) {
  1990. text1 +=
  1991. "<p><span style='display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:#FF3D00;'></span>6折卡数量" +
  1992. '<span style="' + style +
  1993. '">' + (info.discountCardBuyNum ? info.discountCardBuyNum : 0) +
  1994. '张</span></p>';
  1995. text1 +=
  1996. "<p><span style='display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:#FF3D00;'></span>月卡数量" +
  1997. '<span style="' + style +
  1998. '">' + (info.monthCardBuyNum ? info.monthCardBuyNum : 0) + '张</span></p>';
  1999. text1 +=
  2000. "<p><span style='display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:#FF3D00;'></span>折扣卡金额" +
  2001. '<span style="' + style +
  2002. '">' + (info.cardBuyFee ? info.cardBuyFee : 0).toFixed(2) + '元</span></p>';
  2003. }
  2004. }
  2005. if (this.type_head == 2) {
  2006. text1 +=
  2007. "<p><span style='display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:#19be6b;'></span>设备完好率" +
  2008. '<span style="' + style +
  2009. '">' + (info.operatingRate ? info.operatingRate : 100) + '%</span></p>';
  2010. }
  2011. if (this.type_head == 1) {
  2012. //time = i.substring(5)
  2013. var weeks = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
  2014. var now = newDate(name);
  2015. var day = now.getDay();
  2016. var week = weeks[day];
  2017. return `<p>${name} ${week}</p>` + text1
  2018. } else {
  2019. return `<p>${name}</p>` + text1
  2020. }
  2021. },
  2022. trigger: 'axis',
  2023. borderColor: "#F0F0F0",
  2024. borderWidth: 1,
  2025. backgroundColor: "#ffffff",
  2026. textStyle: {
  2027. color: "#333"
  2028. }
  2029. },
  2030. legend: {
  2031. itemGap: 1,
  2032. data: this.showlist1,
  2033. textStyle: {
  2034. color: "#333"
  2035. }
  2036. },
  2037. grid: {
  2038. top: 45,
  2039. left: 0,
  2040. right: 20,
  2041. bottom: 20,
  2042. containLabel: true
  2043. },
  2044. xAxis: {
  2045. //type: 'value',
  2046. type: 'category',
  2047. splitNumber: 4,
  2048. boundaryGap: false,
  2049. axisLabel: {
  2050. formatter: (value) => {
  2051. if (this.headitemby == "") {
  2052. this.headitemby = value
  2053. }
  2054. var i = 0
  2055. if (this.type_head == 1) {
  2056. i = 0;
  2057. } else {
  2058. i = 3;
  2059. }
  2060. var showvalue = "";
  2061. var key = value.substring(0, 8 - i);
  2062. if (showkey == "" || value == this.headitemby) {
  2063. showkey = key
  2064. showvalue = value
  2065. showvalue = value.substring(5 - i)
  2066. } else {
  2067. if (key != showkey) {
  2068. showkey = key
  2069. showvalue = value
  2070. showvalue = value.substring(5 - i)
  2071. } else {
  2072. showvalue = value.substring(8 - i)
  2073. }
  2074. }
  2075. return showvalue.replace("-", ".");
  2076. },
  2077. textStyle: {
  2078. color: "#333"
  2079. }
  2080. },
  2081. axisLine: {
  2082. show: true,
  2083. lineStyle: {
  2084. color: "#333"
  2085. }
  2086. },
  2087. },
  2088. yAxis: {
  2089. type: 'value',
  2090. // name: '单位('+this.typeN+')',
  2091. axisLabel: {
  2092. formatter: (v, i) => {
  2093. if (dataInterval == null) {
  2094. return v
  2095. }
  2096. if (i == 0) {
  2097. yshow = 0
  2098. return 0
  2099. }
  2100. if (yshow != parseInt(v / 10)) {
  2101. yshow = parseInt(v / 10);
  2102. return dataInterval[parseInt(v / 10)]
  2103. } else {
  2104. return ''
  2105. }
  2106. },
  2107. textStyle: {
  2108. color: "#333"
  2109. }
  2110. },
  2111. axisLine: {
  2112. show: true,
  2113. lineStyle: {
  2114. color: "#333"
  2115. }
  2116. },
  2117. },
  2118. series: list
  2119. };
  2120. // option.dataZoom = [{
  2121. // type: 'inside',
  2122. // start: 0,
  2123. // end: 100
  2124. // },
  2125. // {
  2126. // start: 0,
  2127. // end: 100
  2128. // }
  2129. // ]
  2130. if (this.type_head == 1) {
  2131. } else {
  2132. //timelist.push(i)
  2133. }
  2134. // 使用刚指定的配置项和数据显示图表。
  2135. this.myChart.setOption(option);
  2136. }
  2137. }
  2138. }
  2139. </script>
  2140. <style>
  2141. page {
  2142. /* background: url(@/assets/img/index_header_bg.png) no-repeat top center #f7f7f7;
  2143. background-size: 100%; */
  2144. }
  2145. </style>
  2146. <style lang="scss" scoped>
  2147. /deep/.u-drawer {
  2148. z-index: 99999999 !important;
  2149. }
  2150. .contentBodyName {
  2151. padding: 0 36rpx 12rpx 36rpx;
  2152. }
  2153. .contentBody {
  2154. color: #777777;
  2155. font-size: 28rpx;
  2156. display: flex;
  2157. justify-content: space-between;
  2158. flex-direction: row;
  2159. padding: 0 16rpx;
  2160. margin-bottom: 16rpx;
  2161. .body1 {
  2162. color: #333333;
  2163. margin-left: 20rpx;
  2164. }
  2165. .body2 {
  2166. display: flex;
  2167. .body2-0 {
  2168. width: 110rpx;
  2169. }
  2170. .body2-1 {
  2171. padding: 0 8rpx;
  2172. color: #00B962;
  2173. }
  2174. .body2-2 {
  2175. width: 120rpx;
  2176. }
  2177. }
  2178. .body3 {
  2179. padding: 0 8rpx;
  2180. color: #FF3D00;
  2181. }
  2182. }
  2183. .indexData5content {
  2184. padding: 40rpx 20rpx;
  2185. .contentTitle {
  2186. color: #333333;
  2187. font-size: 40rpx;
  2188. text-align: center;
  2189. font-weight: bold;
  2190. margin-bottom: 8px;
  2191. }
  2192. .contentItem {
  2193. border-bottom: 1px solid #ededed;
  2194. // margin: 16rpx;
  2195. // padding:12rpx;
  2196. img,
  2197. svg {
  2198. vertical-align: bottom;
  2199. height: 44rpx;
  2200. //margin-right: 8rpx;
  2201. }
  2202. .span1 {
  2203. text-align: left;
  2204. font-weight: bold;
  2205. font-size: 36rpx;
  2206. width: 310rpx;
  2207. overflow: hidden;
  2208. text-overflow: ellipsis;
  2209. white-space: nowrap;
  2210. }
  2211. .color777 {
  2212. color: #777777;
  2213. }
  2214. .color333 {
  2215. color: #333333;
  2216. }
  2217. .span2 {
  2218. border-right: 1px solid #ededed;
  2219. width: 120rpx;
  2220. padding: 0 8rpx;
  2221. span {
  2222. padding: 0 8rpx;
  2223. }
  2224. }
  2225. .span3 {
  2226. padding: 0 0 0 12rpx;
  2227. span {
  2228. padding: 0 8rpx;
  2229. }
  2230. width: 154rpx;
  2231. .bot1span {
  2232. color: #00B962;
  2233. }
  2234. .bot2span {
  2235. color: #AAAAAA;
  2236. }
  2237. .bot3span {
  2238. color: #FF3D00;
  2239. }
  2240. }
  2241. }
  2242. }
  2243. .indexData4content {
  2244. padding: 40rpx 20rpx;
  2245. .contentTitle {
  2246. color: #333333;
  2247. font-size: 40rpx;
  2248. text-align: center;
  2249. font-weight: bold;
  2250. margin-bottom: 8px;
  2251. }
  2252. .contentItem {
  2253. border-bottom: 1px solid #ededed;
  2254. justify-content: space-between;
  2255. flex-direction: row;
  2256. margin: 16rpx;
  2257. padding: 12rpx;
  2258. .span1 {
  2259. img {
  2260. vertical-align: bottom;
  2261. height: 44rpx;
  2262. margin-right: 8rpx;
  2263. }
  2264. font-weight: bold;
  2265. font-size: 36rpx;
  2266. width: 400rpx;
  2267. overflow: hidden;
  2268. text-overflow: ellipsis;
  2269. white-space: nowrap;
  2270. }
  2271. .color777 {
  2272. color: #777777;
  2273. }
  2274. .color333 {
  2275. color: #333333;
  2276. }
  2277. .span2 {
  2278. border-right: 1px solid #ededed;
  2279. width: 120rpx;
  2280. padding: 0 16rpx;
  2281. span {
  2282. padding: 0 8rpx;
  2283. }
  2284. }
  2285. .span3 {
  2286. padding: 0 0 0 16rpx;
  2287. span {
  2288. padding: 0 8rpx;
  2289. }
  2290. width: 154rpx;
  2291. color: #333;
  2292. .bot1span {
  2293. color: #00B962;
  2294. }
  2295. .bot2span {
  2296. color: #AAAAAA;
  2297. }
  2298. .bot3span {
  2299. color: #FF3D00;
  2300. }
  2301. }
  2302. }
  2303. .u-collapse-bot0span {
  2304. .contentItem {
  2305. display: flex;
  2306. }
  2307. }
  2308. .u-collapse-bot3span {
  2309. .contentItem {
  2310. margin: 0;
  2311. padding: 0;
  2312. .span1 {
  2313. width: 310rpx;
  2314. }
  2315. }
  2316. }
  2317. }
  2318. .chargingpile {
  2319. img {
  2320. vertical-align: bottom;
  2321. height: 44rpx;
  2322. margin-right: 8rpx;
  2323. }
  2324. p {
  2325. color: #185AC6;
  2326. font-size: 36rpx;
  2327. font-weight: bold;
  2328. span {
  2329. color: #777777;
  2330. margin-left: 8rpx;
  2331. font-size: 32rpx;
  2332. font-weight: normal;
  2333. }
  2334. }
  2335. .detailstablepile {
  2336. .details-row-main {
  2337. border-bottom: 1px solid #ededed;
  2338. padding: 10px 0;
  2339. }
  2340. span {
  2341. margin: 0 8rpx;
  2342. }
  2343. .bot {
  2344. display: inline-block;
  2345. width: 24rpx;
  2346. height: 24rpx;
  2347. margin-left: 4rpx;
  2348. border-radius: 999px;
  2349. }
  2350. .bot1 {
  2351. background-color: #00B962;
  2352. }
  2353. .bot2 {
  2354. //margin-left: 16rpx;
  2355. background-color: #AAAAAA;
  2356. }
  2357. .bot3 {
  2358. //margin-left: 16rpx;
  2359. background-color: #FF3D00;
  2360. }
  2361. .bot1span {
  2362. color: #00B962;
  2363. }
  2364. .bot2span {
  2365. color: #AAAAAA;
  2366. }
  2367. .bot3span {
  2368. color: #FF3D00;
  2369. }
  2370. .detailsline {
  2371. border-bottom: 1px solid #ededed;
  2372. }
  2373. .detailsline,
  2374. .detailsline—bottom {
  2375. display: flex;
  2376. .details-row {
  2377. width: 33%;
  2378. // display: flex;
  2379. // justify-content: space-between;
  2380. // flex-direction: column;
  2381. padding-left: 16rpx;
  2382. margin-bottom: 16rpx;
  2383. margin-top: 16rpx;
  2384. .span1 {
  2385. color: rgba(136, 136, 136, 100);
  2386. font-size: 28rpx;
  2387. width: 100%;
  2388. color: #333333;
  2389. }
  2390. }
  2391. }
  2392. .details-row-1 {
  2393. width: 47%;
  2394. padding-left: 0px !important;
  2395. //border-right: 1px solid #ededed;
  2396. }
  2397. }
  2398. }
  2399. .viewgun {
  2400. position: relative;
  2401. top: 200px;
  2402. text-align: center;
  2403. .viewspan {
  2404. width: 30%;
  2405. margin-left: 16rpx;
  2406. display: inline;
  2407. }
  2408. }
  2409. .headbotton1:after {
  2410. border-radius: 15px 0 0 15px;
  2411. }
  2412. .headbotton2:after {
  2413. border-radius: 0;
  2414. }
  2415. .headbotton3:after {
  2416. border-radius: 0 15px 15px 0;
  2417. }
  2418. .detailstable {
  2419. padding: 30rpx 30rpx !important;
  2420. }
  2421. .detailstableHead {
  2422. .span1 {
  2423. font-size: 32rpx !important;
  2424. }
  2425. .details-row-head-1 {}
  2426. .details-row-head-2 {}
  2427. .details-row-head-3 {
  2428. width: 30% !important;
  2429. max-width: 150rpx;
  2430. .span {}
  2431. }
  2432. .span2 {
  2433. font-size: 44rpx !important;
  2434. font-weight: bold;
  2435. width: 100%;
  2436. color: #101010;
  2437. span {
  2438. font-size: 24rpx !important;
  2439. }
  2440. }
  2441. }
  2442. .detailslineHead {
  2443. border-top: 1px solid #ededed;
  2444. ;
  2445. .details-row {
  2446. padding-left: 8rpx !important;
  2447. }
  2448. font-size: 30rpx !important;
  2449. .span1 span {
  2450. font-size: 28rpx;
  2451. }
  2452. }
  2453. .detailstable,
  2454. .detailstableHead {
  2455. font-size: 16px;
  2456. p {
  2457. font-size: 14px;
  2458. }
  2459. .details-row-main {
  2460. border-bottom: 1px solid #ededed;
  2461. padding: 10px 0;
  2462. }
  2463. .detailsline {
  2464. border-bottom: 1px solid #ededed;
  2465. }
  2466. .detailsline,
  2467. .detailsline—bottom {
  2468. display: flex;
  2469. .details-row {
  2470. width: 50%;
  2471. display: flex;
  2472. justify-content: space-between;
  2473. flex-direction: column;
  2474. padding-left: 16rpx;
  2475. margin-bottom: 20rpx;
  2476. .span1 {
  2477. color: rgba(136, 136, 136, 100);
  2478. font-size: 28rpx;
  2479. width: 100%;
  2480. }
  2481. .span2 {
  2482. font-size: 36rpx;
  2483. width: 100%;
  2484. color: #101010;
  2485. span {
  2486. font-size: 24rpx;
  2487. }
  2488. }
  2489. }
  2490. }
  2491. .details-row-1 {
  2492. width: 47%;
  2493. padding-left: 0px !important;
  2494. border-right: 1px solid #ededed;
  2495. }
  2496. }
  2497. .details {
  2498. padding: 32rpx;
  2499. background-color: #fff;
  2500. border-radius: 8px;
  2501. }
  2502. .details-title {
  2503. margin-bottom: 16px;
  2504. h4 {
  2505. font-weight: normal;
  2506. font-size: 16px;
  2507. position: relative;
  2508. padding-left: 10px;
  2509. &::after {
  2510. content: '';
  2511. position: absolute;
  2512. height: 12px;
  2513. width: 4px;
  2514. background-color: #27B148;
  2515. left: 0;
  2516. top: 5px;
  2517. }
  2518. }
  2519. }
  2520. .details-row {
  2521. display: flex;
  2522. justify-content: space-between;
  2523. align-items: center;
  2524. margin-top: 30rpx;
  2525. p {
  2526. color: #37393c;
  2527. font-weight: bold;
  2528. }
  2529. }
  2530. .details-row2 {
  2531. display: flex;
  2532. justify-content: space-between;
  2533. align-items: center;
  2534. // margin-top: 15px;
  2535. p {
  2536. // color: #37393c;
  2537. // font-weight: bold;
  2538. }
  2539. }
  2540. .popup-screen {
  2541. padding: 40rpx;
  2542. position: relative;
  2543. .screen {
  2544. padding-bottom: 30px;
  2545. }
  2546. .screen-item {
  2547. margin-bottom: 40rpx;
  2548. .screen-head {
  2549. margin-bottom: 8px;
  2550. font-size: 16px;
  2551. }
  2552. .screen-main {
  2553. display: flex;
  2554. // display: -webkit-box;
  2555. flex-wrap: wrap;
  2556. }
  2557. .screen-entry {
  2558. width: 29%;
  2559. padding: 6px 0;
  2560. display: flex;
  2561. align-items: center;
  2562. justify-content: center;
  2563. background-color: #F2F5FA;
  2564. text-align: center;
  2565. margin-bottom: 10px;
  2566. border-radius: 3px;
  2567. margin-right: 6px;
  2568. }
  2569. .screen-entry.active {
  2570. background-color: #185AC6;
  2571. color: #fff;
  2572. }
  2573. }
  2574. .screen-foot {
  2575. position: fixed;
  2576. left: 0;
  2577. right: 0;
  2578. bottom: 0;
  2579. display: flex;
  2580. height: 50px;
  2581. border-top: 1px solid #ededed;
  2582. .screen-btn-l {
  2583. background-color: #fff;
  2584. flex: 0.2;
  2585. text-align: center;
  2586. line-height: 50px;
  2587. }
  2588. .screen-btn-r {
  2589. flex: 0.8;
  2590. text-align: center;
  2591. line-height: 50px;
  2592. background-color: #185AC6;
  2593. color: #fff;
  2594. }
  2595. }
  2596. }
  2597. .navbar-tit {
  2598. display: flex;
  2599. align-items: center;
  2600. justify-content: space-between;
  2601. color: #fff;
  2602. line-height: 40rpx;
  2603. padding: 24rpx;
  2604. position: fixed;
  2605. // border-bottom: 1px solid #fff;
  2606. left: 0;
  2607. right: 0;
  2608. top: 0;
  2609. z-index: 99999991;
  2610. background-color: #00b962;
  2611. .navbar-tit1 {
  2612. font-weight: bold;
  2613. font-size: 40rpx;
  2614. display: flex;
  2615. }
  2616. .navbar-tit2 {
  2617. font-size: 36rpx;
  2618. }
  2619. }
  2620. .navbar-tit-box {
  2621. box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
  2622. }
  2623. .statisticsData {
  2624. background-color: #fff;
  2625. margin: 0px 24rpx 24rpx;
  2626. //padding:0px 24rpx 24rpx;
  2627. border-radius: 8px;
  2628. }
  2629. .statisticsDataMain {
  2630. flex-wrap: wrap;
  2631. display: flex;
  2632. }
  2633. .statisticsData-item {
  2634. flex: 1;
  2635. width: 40%;
  2636. .statisticsData-head {
  2637. display: flex;
  2638. align-items: center;
  2639. p {
  2640. color: #637AA2;
  2641. font-size: 12px;
  2642. }
  2643. }
  2644. .statisticsData-main {
  2645. margin-top: 4px;
  2646. font-size: 18px;
  2647. }
  2648. .statisticsData-foot {
  2649. display: flex;
  2650. align-items: center;
  2651. margin-top: 16px;
  2652. p {
  2653. color: #637AA2;
  2654. }
  2655. h4 {
  2656. margin-left: 8px;
  2657. }
  2658. }
  2659. }
  2660. .statisticsChart {
  2661. margin: 32rpx;
  2662. .statisticsChart-head {
  2663. margin-bottom: 10rpx;
  2664. display: flex;
  2665. justify-content: space-between;
  2666. align-items: center;
  2667. h4 {
  2668. font-weight: normal;
  2669. font-size: 16px;
  2670. position: relative;
  2671. padding-left: 10px;
  2672. &::after {
  2673. content: '';
  2674. position: absolute;
  2675. height: 12px;
  2676. width: 4px;
  2677. background-color: #4E8DF6;
  2678. left: 0;
  2679. top: 5px;
  2680. }
  2681. }
  2682. .h4-1 {
  2683. display: flex;
  2684. align-items: center;
  2685. padding-left: 0;
  2686. color: rgba(16, 16, 16, 1);
  2687. img {
  2688. margin-right: 8rpx;
  2689. }
  2690. &::after {
  2691. content: none;
  2692. }
  2693. }
  2694. .statisticsChart-time {
  2695. display: flex;
  2696. align-items: center;
  2697. p {
  2698. color: #666;
  2699. }
  2700. }
  2701. }
  2702. .statisticsChart-main {
  2703. background-color: #fff;
  2704. padding: 10px 16px 16px 16px;
  2705. border-radius: 8px;
  2706. }
  2707. }
  2708. .top-cover {
  2709. // height: 470px;
  2710. // margin-bottom: 70px;
  2711. background: linear-gradient(179.94deg, rgba(0, 185, 98, 1) 71.55%, rgba(0, 196, 104, 0) 99.35%);
  2712. .income {
  2713. padding: 44rpx 32rpx 24rpx 32rpx;
  2714. color: rgba(255, 255, 255, 1);
  2715. .today-queryHeadTime {
  2716. text-align: center;
  2717. //font-size: 12px;
  2718. }
  2719. .today-income {
  2720. margin-top: 4rpx;
  2721. text-align: center;
  2722. .number {
  2723. font-weight: bold;
  2724. font-size: 36px;
  2725. text {
  2726. margin-left: 8rpx;
  2727. }
  2728. }
  2729. .text {
  2730. font-size: 16px;
  2731. }
  2732. }
  2733. .else {
  2734. margin-top: 32rpx;
  2735. display: flex;
  2736. justify-content: space-between;
  2737. .item {
  2738. text-align: center;
  2739. .item-number {
  2740. font-weight: bold;
  2741. font-size: 48rpx;
  2742. margin-bottom: 8rpx;
  2743. }
  2744. }
  2745. }
  2746. }
  2747. }
  2748. </style>