dashboard.vue 100 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088
  1. <template>
  2. <div class="dashboard_template">
  3. <div class="nav_top">
  4. <div class="left_title">
  5. <img src="../img/iconfont/notice.png"><span class="span">Please pay attention to the updated content at any time.</span>
  6. </div>
  7. <div class="right_operation">
  8. <el-dropdown @command="commandDropdown" trigger="click" @visible-change="commandHide('dropdown_dashboard_provinceId')">
  9. <span class="el-dropdown-link">
  10. <span>{{provinceIdName}}</span><i class="el-icon-caret-bottom el-icon--right"></i>
  11. </span>
  12. <el-dropdown-menu slot="dropdown" class="scrollbar_style dropdown_dashboard_provinceId">
  13. <el-dropdown-item :class="{'select':null==provinceId}" :command="{'key':'provinceId','id':null}" :key="null">{{'All'}}</el-dropdown-item>
  14. <el-dropdown-item v-for="item in provinceList" :class="{'select':item.id==provinceId}" :command="{'key':'provinceId','id':item.id,item:item}" :key="item.id">{{item.name}}</el-dropdown-item>
  15. </el-dropdown-menu>
  16. </el-dropdown>
  17. <el-dropdown @command="commandDropdown" trigger="click" @visible-change="commandHide('dropdown_dashboard_cityId')">
  18. <span class="el-dropdown-link">
  19. <span>{{cityIdName}}</span><i class="el-icon-caret-bottom el-icon--right"></i>
  20. </span>
  21. <el-dropdown-menu slot="dropdown" class="scrollbar_style dropdown_dashboard_cityId">
  22. <el-dropdown-item :class="{'select':null==cityId}" :command="{'key':'cityId','id':null}" :key="null">{{'All'}}</el-dropdown-item>
  23. <el-dropdown-item v-for="item in cityList" :class="{'select':item.id==cityId}" :command="{'key':'cityId','id':item.id,item:item}" :key="item.id">{{item.name}}</el-dropdown-item>
  24. </el-dropdown-menu>
  25. </el-dropdown>
  26. </div>
  27. </div>
  28. <div class="dashboard_main">
  29. <div class="left_box">
  30. <div class="time_box">
  31. <div class="top_box">
  32. <div class="flex_box">
  33. <div class="left">
  34. {{(currentTime.format('HH:MM'))}}
  35. </div>
  36. <div class="right">
  37. <p class="p1">Good morning,{{username}} ({{roleArr[role]}})</p>
  38. <p class="p2">{{(currentTime.format('YY-mm-dd'))}}</p>
  39. </div>
  40. </div>
  41. <p class="p3">Today is the {{infoData.logCount}}th day you log in to the system. We will work with you to maintain all street lights. :)</p>
  42. </div>
  43. <div class="bottom_box">
  44. <div class="btn">
  45. <i class="iconfont icon-ludeng"></i>
  46. <span>Today</span>
  47. </div>
  48. <div class="span_box1">
  49. <span class="span1">New equipment</span>
  50. <span class="span2">{{infoData.day_new_count}}</span>
  51. </div>
  52. <i class="line"></i>
  53. <div class="span_box2">
  54. <span class="span1">Faulty equipment</span>
  55. <span class="span2">{{infoData.day_faulty_count}}</span>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="echarts_map_box">
  60. <div class="echarts_title"><img src="../img/iconfont/map.png"><span>Bangladesh Map</span></div>
  61. <div class="echarts_map"></div>
  62. <div class="map_return" @click="mapReturn()" v-if="provinceId"><i class="el-icon-back"></i><span>{{mapType}}</span></div>
  63. </div>
  64. </div>
  65. <div class="right_box">
  66. <div class="right_top">
  67. <div class="light_information">
  68. <div class="light_information_left">
  69. <div class="title">Light Information</div>
  70. <p class="p1">{{infoData.total_light_count}}</p>
  71. <p class="p2"><span class="span1">Total-light</span><i class="iconfont icon-shangsheng"></i><span class="span2">{{Number(infoData.day_new_count_percent).toFixed(1)}}%</span></p>
  72. </div>
  73. <div class="light_information_right">
  74. <div class="data_ul">
  75. <div class="li li1">
  76. <p class="p1">{{infoData.light_up_count}}</p>
  77. <p class="p2">{{Number(infoData.light_up_count_percent).toFixed(1)}}%</p>
  78. </div>
  79. <div class="li li2">
  80. <p class="p1">{{infoData.online_count}}</p>
  81. <p class="p2">{{Number(infoData.online_count_percent).toFixed(1)}}%</p>
  82. </div>
  83. <div class="li li3">
  84. <p class="p1">{{infoData.faulty_count}}</p>
  85. <p class="p2">{{Number(infoData.faulty_count_percent).toFixed(1)}}%</p>
  86. </div>
  87. </div>
  88. <div class="tab_box">
  89. <div class="tab tab1">Light-up</div>
  90. <div class="tab tab2">On-line</div>
  91. <div class="tab tab3">Fault</div>
  92. </div>
  93. </div>
  94. </div>
  95. <div class="usage_information">
  96. <div class="title">
  97. <span>Usage Information</span>
  98. <el-dropdown @command="commandDropdown" trigger="click" @visible-change="commandHide('dropdown_dashboard_rightDate')">
  99. <span class="el-dropdown-link">
  100. <span>{{rightDateName}}</span><i class="el-icon-caret-bottom el-icon--right"></i>
  101. </span>
  102. <el-dropdown-menu slot="dropdown" class="scrollbar_style dropdown_dashboard_rightDate">
  103. <el-dropdown-item v-for="item in rightDateNav" :class="{'select':item.id==rightDate}" :command="{'key':'rightDate','id':item.id}" :key="item.id">{{item.name}}</el-dropdown-item>
  104. </el-dropdown-menu>
  105. </el-dropdown>
  106. </div>
  107. <div class="ul_box">
  108. <!-- <div class="li">
  109. <p class="p1">{{statisticInfo.electricity}}</p>
  110. <p class="p2">Power</p>
  111. </div> -->
  112. <div class="li">
  113. <p class="p1" :title="statisticInfo.electricity">{{statisticInfo.electricity?statisticInfo.electricity:0}}</p>
  114. <p class="p2">Electricity(kWh)</p>
  115. </div>
  116. <div class="li">
  117. <p class="p1" :title="statisticInfo.CO2_reduction">{{statisticInfo.CO2_reduction?statisticInfo.CO2_reduction:0}}</p>
  118. <p class="p2">CO2 reduction(Kg)</p>
  119. </div>
  120. <div class="li">
  121. <p class="p1" :title="statisticInfo.SO2_reduction">{{statisticInfo.SO2_reduction?statisticInfo.SO2_reduction:0}}</p>
  122. <p class="p2">SO2 reduction(Kg)</p>
  123. </div>
  124. <div class="li">
  125. <p class="p1" :title="statisticInfo.TCE_reduction">{{statisticInfo.TCE_reduction?statisticInfo.TCE_reduction:0}}</p>
  126. <p class="p2">Tce reduction(Kg)</p>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. <div class="proportion_lights">
  132. <div class="title">
  133. <div class="text">Proportion of lights</div>
  134. <div class="right_btn">
  135. <div class="nav_box">
  136. <div class="li" :class="{'select':chartType == '0'}" @click="chartTypeFun(0)"><span>Total</span></div>
  137. <div class="li" :class="{'select':chartType == '1'}" @click="chartTypeFun(1)"><span>On-line</span></div>
  138. <div class="li" :class="{'select':chartType == '2'}" @click="chartTypeFun(2)"><span>Light-up</span></div>
  139. <div class="li" :class="{'select':chartType == '3'}" @click="chartTypeFun(3)"><span>Fault</span></div>
  140. </div>
  141. <div class="nav_box">
  142. <el-dropdown @command="commandDropdown" trigger="click" @visible-change="commandHide('dropdown_dashboard_companyType')">
  143. <span class="el-dropdown-link">
  144. <span>{{companyTypeName}}</span><i class="el-icon-caret-bottom el-icon--right"></i>
  145. </span>
  146. <el-dropdown-menu slot="dropdown" class="scrollbar_style dropdown_dashboard_companyType">
  147. <el-dropdown-item v-for="item in companyTypeNav" :class="{'select':item.id==companyType}" :command="{'key':'companyType','id':item.id}" :key="item.id">{{item.name}}</el-dropdown-item>
  148. </el-dropdown-menu>
  149. </el-dropdown>
  150. <!-- <div class="li"><span>Upa-City</span> <i class="iconfont icon-xialajiantou"></i></div> -->
  151. </div>
  152. <div class="nav_box">
  153. <div class="li" @click="linkToFun('/projectManagement')"><span>More</span> <i class="iconfont icon-youjiantou"></i></div>
  154. </div>
  155. </div>
  156. </div>
  157. <div class="proportion_lights_main">
  158. <div class="left_echarts">
  159. <div class="device_pie"></div>
  160. <div class="device_pie_cover"></div>
  161. </div>
  162. <div class="right_table">
  163. <el-table
  164. ref="deviceList"
  165. v-loading="loading.deviceList"
  166. highlight-current-row
  167. element-loading-background="rgba(0, 0, 0, 0.5)"
  168. height="calc(100% - 0rem)"
  169. @cell-mouse-enter="tableEnter"
  170. @cell-mouse-leave="tableLeave"
  171. :data="deviceList">
  172. <el-table-column
  173. v-for="(item) in deviceArr"
  174. :key="'table_'+item.prop"
  175. :prop="item.prop"
  176. :label="item.label"
  177. :align="item.align?item.align:'center'"
  178. :width="item.width"
  179. :show-overflow-tooltip="true"
  180. :min-width="item.minWidth">
  181. <template slot-scope="scope">
  182. <span v-if="item.type != 1">{{scope.row[item.prop]}}{{item.unit?item.unit:''}}</span>
  183. <span v-if="item.prop == 'name'" class="city">
  184. <i></i><span>{{scope.row[item.prop]}}{{item.unit?item.unit:''}}</span>
  185. </span>
  186. <span v-if="item.prop == 'total'" class="total">
  187. <span class="span1">{{scope.row[item.prop]}}{{item.unit?item.unit:''}}</span>
  188. <i></i>
  189. <span class="span2">{{scope.row['totalPer']}}{{item.unit?item.unit:''}}</span>
  190. </span>
  191. </template>
  192. </el-table-column>
  193. <!--
  194. <el-table-column
  195. align="center"
  196. :width="40"
  197. :label="''">
  198. <template slot-scope="scope">
  199. <span class="btn" @click="seeFun(scope.row)" title="Edit" v-show="tableShowId == scope.row.id">
  200. <i class="iconfont icon-youjiantou"></i>
  201. </span>
  202. </template>
  203. </el-table-column> -->
  204. </el-table>
  205. </div>
  206. </div>
  207. </div>
  208. <div class="real_time_fault_information">
  209. <div class="title">
  210. <div class="text">Real time fault information</div>
  211. <div class="right_btn">
  212. <div class="btn" @click="linkToFun('/alarmMaintenance')">
  213. <span>More</span> <i class="iconfont icon-youjiantou"></i>
  214. </div>
  215. </div>
  216. </div>
  217. <div class="real_time_fault_information_main">
  218. <el-table
  219. ref="alarmList"
  220. v-loading="loading.alarmList"
  221. element-loading-background="rgba(0, 0, 0, 0.5)"
  222. height="calc(100% - 3.5rem)"
  223. :data="alarmList">
  224. <el-table-column
  225. label="Num"
  226. prop="webIndex"
  227. align="center"
  228. header-align="center"
  229. width="60">
  230. </el-table-column>
  231. <el-table-column
  232. v-for="(item) in faultInformationArr"
  233. :key="'table_'+item.prop"
  234. :prop="item.prop"
  235. :label="item.label"
  236. :align="item.align?item.align:'center'"
  237. :width="item.width"
  238. :show-overflow-tooltip="true"
  239. :min-width="item.minWidth">
  240. <template slot-scope="scope">
  241. <span v-if="item.type != 1">{{scope.row[item.prop]}}{{item.unit?item.unit:''}}</span>
  242. </template>
  243. </el-table-column>
  244. <el-table-column
  245. align="center"
  246. :width="100"
  247. :label="'Operation'">
  248. <template slot-scope="scope">
  249. <span class="btn" @click="seeFun(scope.row)" title="See">
  250. <i class="iconfont icon-chakanxiangqing"></i>
  251. </span>
  252. <span class="btn" @click="alarmTz(scope.row)" title="fault">
  253. <i class="iconfont icon-weixiu"></i>
  254. </span>
  255. </template>
  256. </el-table-column>
  257. </el-table>
  258. </div>
  259. </div>
  260. </div>
  261. </div>
  262. <!-- 表格详情弹框 -->
  263. <el-dialog
  264. title="Lamp Details"
  265. :visible.sync="detailsDialog"
  266. :close-on-click-modal="false"
  267. class="solar_dialig details_box"
  268. width="95%">
  269. <div class="wrap">
  270. <div class="nav clearfix" style="width: 550px;margin-left: -275px;">
  271. <div class="nav_list"
  272. :class="{'details_nav_select':detailsNavSelect==item.model}"
  273. v-for="item in detailsNavListEN"
  274. :key="item.label"
  275. @click="detailsNavSelectFun(item)"><span>{{item.label}}</span></div>
  276. </div>
  277. <div class="details_list_box clearfix" :class="{'details_list_box_EN':version == 1}" v-loading="loading.detailsFieldList">
  278. <div class="details_list" :class="{'details_list_min':(windowWidth < 1600 && version == 1)}" v-for="item in detailsFieldList" :key="item.key">
  279. <template v-if="!(lampcontrolListHC['devicetype'] == '1')&&!(item.model =='lighteness'&&lampLoadtype=='1')">
  280. <span v-if="item.unit">{{item.key+'('+item.unit+'):'}}</span>
  281. <span v-if="!item.unit">{{item.key+':'}}</span>
  282. <span v-if="item.value && item.model!='lampstatus'&&item.model !='status'&&item.model !='devicetype'&&item.model !='battstatus'&&item.model !='chargestage'" :title="item.value">{{item.value}}</span>
  283. <span v-if="item.model && item.model=='lampstatus' && item.value == '0'" :title="'Off'">{{'Off'}}</span>
  284. <span v-if="item.model && item.model=='lampstatus' && item.value == '1'" :title="'On'">{{'On'}}</span>
  285. <span v-if="item.model && item.model=='status' && item.value == '0'" :title="'Not online'">{{'Not online'}}</span>
  286. <span v-if="item.model && item.model=='status' && item.value == '1'" :title="'Online'">{{'Online'}}</span>
  287. <span v-if="item.model && item.model=='battstatus' && item.value == '0'" :title="'idle'">{{'idle'}}</span>
  288. <span v-if="item.model && item.model=='battstatus' && item.value == '1'" :title="'Discharging'">{{'Discharging'}}</span>
  289. <span v-if="item.model && item.model=='battstatus' && item.value == '2'" :title="'Charging'">{{'Charging'}}</span>
  290. <span v-if="item.model && item.model=='battstatus' && item.value == '3'" :title="'Discharge while charging'">{{'Discharge while charging'}}</span>
  291. <span v-if="item.model && item.model=='chargestage' && (item.value == ''||item.value == null)" :title="'Unknown state'">{{'Unknown state'}}</span>
  292. <span v-if="item.model && item.model=='chargestage' && item.value == '0'" :title="'Uncharged'">{{'Uncharged'}}</span>
  293. <span v-if="item.model && item.model=='chargestage' && item.value == '1'" :title="'Start charging'">{{'Uncharged'}}</span>
  294. <span v-if="item.model && item.model=='chargestage' && item.value == '6'" :title="'Current limiting'">{{'Uncharged'}}</span>
  295. <span v-if="item.model && item.model=='chargestage' && item.value == '7'" :title="'Full'">{{'Uncharged'}}</span>
  296. <span v-if="item.model && item.model=='chargestage' && item.value == '16'" :title="'MPPT charging'">{{'MPPT charging'}}</span>
  297. <span v-if="item.model && item.model=='chargestage' && item.value == '32'" :title="'Balanced charge'">{{'Balanced charge'}}</span>
  298. <span v-if="item.model && item.model=='chargestage' && item.value == '48'" :title="'Increase charging'">{{'Increase charging'}}</span>
  299. <span v-if="item.model && item.model=='chargestage' && item.value == '64'" :title="'Floating charge'">{{'Floating charge'}}</span>
  300. <span v-if="!(item.value)">{{item.value}}</span>
  301. </template>
  302. </div>
  303. <div v-if="detailsFieldList.length == 0 && !loading.detailsFieldList" style="text-align:center;">
  304. {{'No relevant data was queried'}}
  305. </div>
  306. </div>
  307. </div>
  308. </el-dialog>
  309. </div>
  310. </template>
  311. <script type="text/javascript">
  312. import allUel from '../api/allUel.js'
  313. import base from '../api/base.js'
  314. import { mapGetters } from 'vuex'
  315. // import bangladesh from '../store/Bangladesh.json'
  316. // import bangladesh from '../store/bangladesh_.json'
  317. // import bangladesh from '../store/bangladesh__.json'
  318. // import Barisal from '../store/Barisal.json'
  319. // // import bangladesh from '../store/Barisal_.json'
  320. // import Chittagong from '../store/Chittagong.json'
  321. // // import bangladesh from '../store/Chittagong_.json'
  322. // import Rajshahi from '../store/Rajshahi.json'
  323. // // import bangladesh from '../store/Rajshahi_.json'
  324. // import Rangpur from '../store/Rangpur.json'
  325. // // import bangladesh from '../store/Rangpur_.json'
  326. // import Dhaka from '../store/Dhaka.json'
  327. // // import bangladesh from '../store/Dhaka_.json'
  328. // import Sylhet from '../store/Sylhet.json'
  329. // // import bangladesh from '../store/Sylhet_.json'
  330. // import Mymensingh from '../store/Mymensingh.json'
  331. // // import bangladesh from '../store/Mymensingh_.json'
  332. // import Khulna from '../store/Khulna.json'
  333. // import bangladesh from '../store/Khulna_.json'
  334. // import bangladesh from '../store/map_bf.json'
  335. // import bangladesh from '../store/person.json'
  336. // import world from '../store/world.json'
  337. export default {
  338. name:'dashboard',
  339. data(){
  340. return{
  341. infoData:{
  342. logCount:0,
  343. },
  344. statisticInfo:{},
  345. roleArr:['','Admin','Manufacturer','Supplier','PO','Upazilla','Monitoring','Controlling'],
  346. keywords:'',
  347. provinceId: null,
  348. provinceList:[],
  349. cityId:null,
  350. cityList:[],
  351. district:'',
  352. companyType:'',
  353. companyTypeNav:[{id:2,name:'Manufacturer'},{id:3,name:'Supplier'},{id:4,name:'PO'},{id:5,name:'Upazilla'}],
  354. rightDate:'',
  355. rightDateNav:[{id:'0',name:'Today'},{id:'1',name:'Week'},{id:'2',name:'Month'},{id:'3',name:'Total'}],
  356. myChart1:'',
  357. chartType:0,
  358. chartTypeArr:['Total','Online','Offline','Fault'],
  359. tableShowId:'-1',
  360. deviceList:[],
  361. deviceArr:[],
  362. alarmList:[],
  363. faultInformationArr:[],
  364. lampId:null,
  365. windowWidth:0,
  366. myChart2:'',
  367. currentTime:new Date(),
  368. pro_dev_count:[],
  369. city_dev_count:[],
  370. area_dev_count:[],
  371. mapType:'',
  372. /*参数弹框*/
  373. companyNavPO:[],
  374. companyNavSupplier:[],
  375. detailsDialog:false,
  376. detailsNavSelect:'lamp_info_log',
  377. detailsNavList:[{model:'lamp_info_log',label:'路灯'},{model:'lampinfo',label:'配置'},{model:'system_info_log',label:'系统'},{model:'solar_info_log',label:'太阳能板'},{model:'battery_info_log',label:'蓄电池'}],
  378. detailsNavListEN:[
  379. {model:'lamp_info_log',label:'Lamp'},
  380. {model:'lampinfo',label:'Configuration'},
  381. // {model:'system_info_log',label:'System'},
  382. {model:'solar_info_log',label:'Solar panels'},
  383. {model:'battery_info_log',label:'Battery'}
  384. ],
  385. detailsFieldList:[],
  386. streetlightDetails:[{model:'lighteness',label:'路灯亮度',unit:'%'},{model:'lampstatus',label:'路灯状态'},{model:'lampvoltage',label:'路灯电压',unit:'V'},{model:'lampcurrent',label:'路灯电流',unit:'A'},{model:'lamppower',label:'路灯功率',unit:'W'},{model:'temper',label:'灯头温度',unit:'°C'},{model:'updatetime',label:'最新更新时间'},{model:'status',label:'网络状态'},{model:'isfaulted',label:'是否故障'},{model:'lamp_no',label:'路灯编号'},{model:'network_no',label:'网络编号'},{model:'project_name',label:'项目名称'},{model:'address',label:'无线模块地址'},{model:'longitude',label:'经度'},{model:'latitude',label:'纬度'},{model:'section',label:'路段'},{model:'boardpower',label:'太阳能板功率',unit:'W'},{model:'poleheight',label:'灯杆高度',unit:'m'},{model:'polediameter',label:'灯杆直径',unit:'mm'},{model:'polematerial',label:'灯杆材质'},{model:'lighttype',label:'灯具类型'},{model:'lamptype',label:'路灯类型'},{model:'boardtype',label:'太阳能板类型'},{model:'batteryah',label:'蓄电池AH数'},{model:'loadpower',label:'负载功率',unit:'W'},{model:'solarvoltage',label:'太阳能板电压',unit:'V'},{model:'solarcurrent',label:'太阳能板电流',unit:'A'},{model:'solarpower',label:'太阳能板功率',unit:'W'},{model:'battstatus',label:'电池状态'},{model:'chargestage',label:'蓄电池充电阶段'},{model:'battvoltage',label:'蓄电池电压',unit:'V'},{model:'chargecurrent',label:'蓄电池充电电流',unit:'A'},{model:'discharcurrent',label:'蓄电池放电电流',unit:'A'},{model:'chargepower',label:'蓄电池充电功率',unit:'W'},{model:'dischargepower',label:'蓄电池放电功率',unit:'W'},{model:'batttemper',label:'蓄电池表面温度',unit:'°C'},{model:'electrictotal',label:'蓄电池总电量',unit:'AH'},{model:'electricleft',label:'蓄电池剩余电量',unit:'AH'},{model:'electricSOC',label:'蓄电池电量SOC',unit:'%'},{model:'voltagedaymin',label:'当天最低电压',unit:'V'},{model:'daychargeah',label:'当天充电安时数',unit:'AH'},{model:'daydischarah',label:'当天放电安时数',unit:'AH'},{model:'daychargemaxpow',label:'当天充电最大功率',unit:'V'},{model:'daydischarmaxpow',label:'当天放电最大功率',unit:'V'},{model:'daychargemincurrent',label:'当天充电最小电流',unit:'A'},{model:'daycharmaxcurrent',label:'当天充电最大电流',unit:'A'},{model:'daydischargemincurrent',label:'当天放电最小电流',unit:'A'},{model:'daydischarmaxcurrent',label:'当天放电最大电流',unit:'A'},{model:'daybattmintemper',label:'当天蓄电池最低温度',unit:'°C'},{model:'daybattmaxtemper',label:'当天蓄电池最高温度',unit:'°C'},{model:'devicetype',label:'设备类型'},{model:'simid',label:'SIM卡号'},{model:'packageSurplus',label:'套餐剩余'},{model:'monthly_can_usage',label:'套餐总量',unit:'M'},{model:'monthly_already_usage',label:'套餐使用量',unit:'M'},{model:'iccid',label:'ICCID',unit:''},{model:'softwareVersion',label:'Version information',unit:''}],
  387. updateRemRatioShakeProof:null,
  388. loading:{
  389. deviceList:false,
  390. alarmList:false,
  391. }
  392. }
  393. },
  394. computed:{
  395. ...mapGetters({
  396. token:'token',
  397. client_key:'client_key',
  398. username:'username',
  399. role:'role',
  400. version:'version',
  401. remRatio:'remRatio',
  402. updateRemRatio:'updateRemRatio',
  403. }),
  404. provinceIdName(){
  405. let name;
  406. if(this.provinceId == null){
  407. return 'All'
  408. }
  409. for(let d of this.provinceList){
  410. if(d.id == this.provinceId){
  411. name = d.name;
  412. }
  413. }
  414. return name;
  415. },
  416. cityIdName(){
  417. let name;
  418. if(this.cityId == null){
  419. return 'All'
  420. }
  421. for(let d of this.cityList){
  422. if(d.id == this.cityId){
  423. name = d.name;
  424. }
  425. }
  426. return name;
  427. },
  428. rightDateName(){
  429. let name;
  430. for(let d of this.rightDateNav){
  431. if(d.id == this.rightDate){
  432. name = d.name;
  433. }
  434. }
  435. return name;
  436. },
  437. companyTypeName(){
  438. let name;
  439. for(let d of this.companyTypeNav){
  440. if(d.id == this.companyType){
  441. name = d.name;
  442. }
  443. }
  444. return name;
  445. },
  446. },
  447. mounted(){
  448. let this_ = this;
  449. this.rightDate = '0';
  450. this.cityId = '0';
  451. this.companyType = 2;
  452. this.windowWidth = $(window).width();
  453. setInterval(function(){
  454. this_.currentTime = new Date();
  455. },1000)
  456. this.deviceArr = [
  457. {prop:'name',label:'Company',align:'left',minWidth:this.remRatio*10,type:1},
  458. {prop:'total',label:'Total',minWidth:this.remRatio*4,type:1},
  459. {prop:'onlineCount',label:'On-line',minWidth:this.remRatio*3},
  460. {prop:'lightCount',label:'Light up',minWidth:this.remRatio*3},
  461. {prop:'faultCount',label:'Fault',minWidth:this.remRatio*3},
  462. ];
  463. this.faultInformationArr = [
  464. {prop:'project',label:'Project',minWidth:this.remRatio*6,align:'left'},
  465. {prop:'location',label:'Upazilla',minWidth:this.remRatio*8},
  466. {prop:'address',label:'Light ID',minWidth:this.remRatio*8},
  467. {prop:'fault_type',label:'Fault type',minWidth:this.remRatio*8},
  468. {prop:'fault_time',label:'Fault time',width:this.remRatio*12},
  469. ];
  470. this.home_get_province(()=>{
  471. if(this.provinceList.length){
  472. // this.provinceId = this.provinceList[0].id
  473. this.provinceId = null;
  474. this.home_get_city(()=>{
  475. if(this.cityList.length){
  476. // this.cityId = this.cityList[0].id
  477. this.cityId = null;
  478. this.getData();
  479. this.getSta_info();
  480. this.getDev_list();
  481. this.getAlarm_list();
  482. }else{
  483. this.cityId = null;
  484. }
  485. })
  486. }else{
  487. this.provinceId = null;
  488. }
  489. });
  490. this.home_pro_dev_count('bangladesh');
  491. this.getFields();
  492. },
  493. methods:{
  494. linkToFun(val){
  495. if(val != this.routerStr){
  496. if(val == '/alarmMaintenance'&&this.alarmList.length>0){
  497. let storage = window.localStorage;
  498. storage.setItem('projectId',this.alarmList[0].projectid);
  499. }
  500. this.$router.push({path:val});
  501. this.$store.commit('ROUTERSTRFUN',{
  502. routerStr:val,
  503. })
  504. document.title = 'IDCOL-'+val.split('/')[1]
  505. }
  506. },
  507. alarmTz(data){
  508. var storage = window.localStorage;
  509. storage.setItem('projectId',data.projectid);
  510. this.$router.push({path:'/alarmMaintenance'});
  511. this.$store.commit('ROUTERSTRFUN',{
  512. routerStr:'/alarmMaintenance',
  513. })
  514. document.title = 'IDCOL-alarmMaintenance'
  515. },
  516. commandHide(val){
  517. this.$nextTick(function(){
  518. if($('.'+val)&&$('.'+val+' >.select').offset()){
  519. $('.'+val).animate({scrollTop: $('.'+val).scrollTop() + $('.'+val+' >.select').offset().top - $('.'+val).offset().top - 100})
  520. }
  521. })
  522. },
  523. commandDropdown(obj){
  524. this.$set(this,obj.key,obj.id)
  525. if(obj.key == 'companyType'){
  526. this.getDev_list();
  527. if(obj.id == 2||obj.id == 3||obj.id == 4){
  528. this.deviceArr = [
  529. {prop:'name',label:'Company',align:'left',minWidth:this.remRatio*10,type:1},
  530. {prop:'total',label:'Total',minWidth:this.remRatio*3,type:1},
  531. {prop:'onlineCount',label:'On-line',minWidth:this.remRatio*3},
  532. {prop:'lightCount',label:'Light up',minWidth:this.remRatio*3},
  533. {prop:'faultCount',label:'Fault',minWidth:this.remRatio*3},
  534. ];
  535. }else{
  536. this.deviceArr = [
  537. {prop:'name',label:'Upazila',align:'left',minWidth:this.remRatio*10,type:1},
  538. {prop:'total',label:'Total',minWidth:this.remRatio*3,type:1},
  539. {prop:'onlineCount',label:'On-line',minWidth:this.remRatio*3},
  540. {prop:'lightCount',label:'Light up',minWidth:this.remRatio*3},
  541. {prop:'faultCount',label:'Fault',minWidth:this.remRatio*3},
  542. ];
  543. }
  544. this.$nextTick(function(){
  545. this.$refs.deviceList.doLayout();
  546. })
  547. }
  548. if(obj.key == 'rightDate'){
  549. this.getSta_info();
  550. }
  551. if(obj.key == 'provinceId'){
  552. console.log(obj.item)
  553. if(obj.id == null){
  554. this.home_pro_dev_count('bangladesh');
  555. }else{
  556. this.home_city_dev_count(obj.item.name,obj.id);
  557. }
  558. this.home_get_city(()=>{
  559. if(this.cityList.length){
  560. // this.cityId = this.cityList[0].id
  561. this.cityId = null
  562. this.getData();
  563. this.getSta_info();
  564. this.getDev_list();
  565. this.getAlarm_list();
  566. }else{
  567. this.cityId = null;
  568. }
  569. })
  570. }
  571. if(obj.key == 'cityId'){
  572. this.home_area_dev_count(obj.item.name,obj.id,true)
  573. this.getData();
  574. this.getSta_info();
  575. this.getDev_list();
  576. this.getAlarm_list();
  577. }
  578. },
  579. /*灯控数据详情*/
  580. /*获取表格字段*/
  581. getFields(){
  582. base.ajax_post(
  583. allUel.project.homeFields,
  584. {
  585. username:this.username,
  586. client_key:this.client_key,
  587. token:this.token,
  588. },
  589. {},
  590. data =>{
  591. // console.log(data,'字段列表')
  592. this.fieldList = data.data.list;
  593. },
  594. this)
  595. },
  596. seeFun(data){
  597. this.detailsDialog = true;
  598. this.detailsFieldList = [];
  599. this.lampId = data.lampid;
  600. this.lampLoadtype = data.loadtype;
  601. if(data.loadtype == '1'){
  602. this.detailsNavList[0].label ='Insect trap';
  603. }else{
  604. this.detailsNavList[0].label ='lamp';
  605. }
  606. this.detailsNavSelect = 'lamp_info_log';
  607. this.lampcontrolViewloglist('lamp_info_log',data => {
  608. // console.log(data,this.streetlightDetails)
  609. let fieldList = Object.assign([],this.fieldList)
  610. for(var key in data.data){
  611. for(var d of this.streetlightDetails){
  612. let obj = {};
  613. for(let dd of fieldList){
  614. // console.log(dd.fields1,d.model)
  615. if(dd.fields1 == 'number'){
  616. dd.fields1 = 'lamp_no'
  617. }
  618. if(dd.fields1 == 'networkname'){
  619. dd.fields1 = 'network_no'
  620. }
  621. if(dd.fields1 == 'projectname'){
  622. dd.fields1 = 'project_name'
  623. }
  624. if(dd.fields1 == d.model){
  625. obj.key = dd.enname
  626. }
  627. }
  628. if(this.lampLoadtype == '1'){
  629. if(d.model == 'lampstatus'){
  630. obj.key = 'Insect trap status'
  631. }
  632. if(d.model == 'lampvoltage'){
  633. obj.key = 'Insect trap voltage'
  634. }
  635. if(d.model == 'lampcurrent'){
  636. obj.key = 'Insect trap current'
  637. }
  638. if(d.model == 'lamppower'){
  639. obj.key = 'Insect trap power'
  640. }
  641. }
  642. if(d.model == 'monthly_can_usage'){
  643. obj.key = '套餐总量'
  644. }
  645. if(d.model == 'monthly_already_usage'){
  646. obj.key = '套餐使用量'
  647. }
  648. if(d.model == 'iccid'){
  649. obj.key = 'ICCID'
  650. }
  651. if(d.model == 'softwareVersion'){
  652. obj.key = 'Version information'
  653. }
  654. if(d.model == 'lampstatus'){
  655. obj.key = 'Lamp status'
  656. }
  657. if(d.model == 'lamppower'){
  658. obj.key = 'Lamp power'
  659. }
  660. if(d.model == 'temper'){
  661. obj.key = 'Temperature'
  662. }
  663. if(d.model == 'boardpower'){
  664. obj.key = 'Solar panel power'
  665. }
  666. if(d.model == 'electricleft'){
  667. obj.key = 'Remaining battery'
  668. }
  669. if(d.model == 'daychargeah'){
  670. obj.key = 'Charging hours per day'
  671. }
  672. if(d.model == 'daydischarah'){
  673. obj.key = 'Discharge ampere hours day'
  674. }
  675. if(d.model == 'chargestage'){
  676. obj.key = 'Battery charging stage'
  677. }
  678. if(d.model == key){
  679. if(d.model != 'devicetype'){
  680. obj.value = data.data[key];
  681. obj.model = d.model;
  682. obj.unit = '';
  683. console.log(obj.key,obj)
  684. this.detailsFieldList.push(obj)
  685. }
  686. }
  687. }
  688. }
  689. })
  690. },
  691. detailsNavSelectFun(data){
  692. this.detailsNavSelect = data.model;
  693. this.detailsFieldList = [];
  694. this.lampcontrolViewloglist(data.model,data => {
  695. // console.log(data,this.streetlightDetails)
  696. let fieldList = Object.assign([],this.fieldList)
  697. for(var key in data.data){
  698. for(var d of this.streetlightDetails){
  699. let obj = {};
  700. for(let dd of fieldList){
  701. if(dd.fields1 == 'number'){
  702. dd.fields1 = 'lamp_no'
  703. }
  704. if(dd.fields1 == 'networkname'){
  705. dd.fields1 = 'network_no'
  706. }
  707. if(dd.fields1 == 'projectname'){
  708. dd.fields1 = 'project_name'
  709. }
  710. if(dd.fields1 == d.model){
  711. obj.key = dd.enname
  712. }
  713. }
  714. if(this.lampLoadtype == '1'){
  715. if(d.model == 'lampstatus'){
  716. obj.key = 'Insect trap status'
  717. }
  718. if(d.model == 'lampvoltage'){
  719. obj.key = 'Insect trap voltage'
  720. }
  721. if(d.model == 'lampcurrent'){
  722. obj.key = 'Insect trap current'
  723. }
  724. if(d.model == 'lamppower'){
  725. obj.key = 'Insect trap power'
  726. }
  727. if(d.model == 'lamp_no'){
  728. obj.key = 'Insect trap number'
  729. }
  730. }
  731. if(d.model == 'monthly_can_usage'){
  732. obj.key = '套餐总量'
  733. }
  734. if(d.model == 'monthly_already_usage'){
  735. obj.key = '套餐使用量'
  736. }
  737. if(d.model == 'iccid'){
  738. obj.key = 'ICCID'
  739. }
  740. if(d.model == 'softwareVersion'){
  741. obj.key = 'Version information'
  742. }
  743. if(d.model == 'lampstatus'){
  744. obj.key = 'Lamp status'
  745. }
  746. if(d.model == 'lamppower'){
  747. obj.key = 'Lamp power'
  748. }
  749. if(d.model == 'temper'){
  750. obj.key = 'Temperature'
  751. }
  752. if(d.model == 'boardpower'){
  753. obj.key = 'Solar panel power'
  754. }
  755. if(d.model == 'electricleft'){
  756. obj.key = 'Remaining battery'
  757. }
  758. if(d.model == 'daychargeah'){
  759. obj.key = 'Charging hours per day'
  760. }
  761. if(d.model == 'daydischarah'){
  762. obj.key = 'Discharge ampere hours day'
  763. }
  764. if(d.model == 'chargestage'){
  765. obj.key = 'Battery charging stage'
  766. }
  767. if(d.model == key){
  768. if(d.model != 'devicetype'){
  769. obj.value = data.data[key];
  770. obj.model = d.model;
  771. obj.unit = '';
  772. console.log(obj.key,obj)
  773. this.detailsFieldList.push(obj)
  774. }
  775. }
  776. }
  777. }
  778. })
  779. },
  780. lampcontrolViewloglist(value,callback){
  781. this.loading.detailsFieldList = true;
  782. base.ajax_post(
  783. allUel.project.lampcontrolViewloglist,
  784. {
  785. username:this.username,
  786. client_key:this.client_key,
  787. token:this.token,
  788. lamp_id:this.lampId,
  789. datatype:value,
  790. },
  791. {},
  792. data =>{
  793. this.loading.detailsFieldList = false;
  794. if(callback){
  795. callback(data)
  796. }
  797. this.lampcontrolListHC = data.data;
  798. },
  799. this,()=>{
  800. this.loading.detailsFieldList = false;
  801. })
  802. },
  803. /*橄榄信息*/
  804. getData(){
  805. base.ajax_post(
  806. allUel.dashboard.data,
  807. {
  808. username:this.username,
  809. token:this.token,
  810. client_key:this.client_key,
  811. proId:this.provinceId,
  812. cityId:this.cityId,
  813. },
  814. {},
  815. data => {
  816. this.infoData = data.data;
  817. this.infoData.light_up_count_percent = this.infoData.total_light_count==0?0:this.infoData.light_up_count/this.infoData.total_light_count*100
  818. this.infoData.online_count_percent = this.infoData.total_light_count==0?0:this.infoData.online_count/this.infoData.total_light_count*100
  819. this.infoData.faulty_count_percent = this.infoData.total_light_count==0?0:this.infoData.faulty_count/this.infoData.total_light_count*100
  820. this.infoData.day_new_count_percent = this.infoData.total_light_count==0?0:this.infoData.day_new_count/this.infoData.total_light_count*100
  821. },
  822. this
  823. )
  824. },
  825. /*统计信息*/
  826. getSta_info(){
  827. base.ajax_post(
  828. allUel.dashboard.sta_info,
  829. {
  830. username:this.username,
  831. token:this.token,
  832. client_key:this.client_key,
  833. proId:this.provinceId,
  834. cityId:this.cityId,
  835. type:this.rightDate,
  836. },
  837. {},
  838. data => {
  839. this.statisticInfo = data.data;
  840. },
  841. this
  842. )
  843. },
  844. /*省份设备分布*/
  845. home_pro_dev_count(mapName){
  846. base.ajax_post(
  847. allUel.common.home_pro_dev_count,
  848. {
  849. username:this.username,
  850. token:this.token,
  851. client_key:this.client_key,
  852. },
  853. {},
  854. data => {
  855. this.pro_dev_count = data.data.list;
  856. this.echartsMapInit(mapName,this.pro_dev_count,'')
  857. },
  858. this
  859. )
  860. },
  861. /*城市设备分布*/
  862. home_city_dev_count(mapName,id){
  863. base.ajax_post(
  864. allUel.common.home_city_dev_count,
  865. {
  866. username:this.username,
  867. token:this.token,
  868. client_key:this.client_key,
  869. proId:id,
  870. },
  871. {},
  872. data => {
  873. this.city_dev_count = data.data.list;
  874. this.echartsMapInit(mapName,this.city_dev_count,'')
  875. },
  876. this
  877. )
  878. },
  879. /*区域设备分布*/
  880. home_area_dev_count(mapName,id,isTrue){
  881. base.ajax_post(
  882. allUel.common.home_area_dev_count,
  883. {
  884. username:this.username,
  885. token:this.token,
  886. client_key:this.client_key,
  887. cityId:id,
  888. },
  889. {},
  890. data => {
  891. this.area_dev_count = data.data.list;
  892. this.echartsMapInit(mapName,this.area_dev_count,isTrue)
  893. },
  894. this
  895. )
  896. },
  897. /*省份下拉列表*/
  898. home_get_province(callback){
  899. base.ajax_post(
  900. allUel.common.home_get_province,
  901. {
  902. username:this.username,
  903. token:this.token,
  904. client_key:this.client_key,
  905. },
  906. {},
  907. data => {
  908. this.provinceList = data.data.list;
  909. if(callback){
  910. callback()
  911. }
  912. },
  913. this
  914. )
  915. },
  916. /*城市下拉*/
  917. home_get_city(callback){
  918. base.ajax_post(
  919. allUel.common.home_get_city,
  920. {
  921. username:this.username,
  922. token:this.token,
  923. client_key:this.client_key,
  924. proId:this.provinceId,
  925. },
  926. {},
  927. data => {
  928. this.cityList = data.data.list;
  929. if(callback){
  930. callback()
  931. }
  932. },
  933. this
  934. )
  935. },
  936. /*设备列表*/
  937. getDev_list(){
  938. base.ajax_post(
  939. allUel.dashboard.dev_list,
  940. {
  941. username:this.username,
  942. token:this.token,
  943. client_key:this.client_key,
  944. proId:this.provinceId,
  945. cityId:this.cityId,
  946. type:this.companyType
  947. },
  948. {},
  949. data => {
  950. this.deviceList = data.data.list;
  951. this.deviceBarInit(this.deviceList,this.chartType);
  952. },
  953. this
  954. )
  955. },
  956. /*故障列表*/
  957. getAlarm_list(){
  958. base.ajax_post(
  959. allUel.dashboard.alarm_list,
  960. {
  961. username:this.username,
  962. token:this.token,
  963. client_key:this.client_key,
  964. proId:this.provinceId,
  965. cityId:this.cityId,
  966. },
  967. {},
  968. data => {
  969. this.alarmList = data.data.list;
  970. let i = 1;
  971. for(let d of this.alarmList){
  972. d.webIndex = i;
  973. i++;
  974. }
  975. },
  976. this
  977. )
  978. },
  979. tableEnter(data){
  980. this.tableShowId = data.id;
  981. this.myChart2.dispatchAction({
  982. type: 'downplay',
  983. })
  984. this.myChart2.dispatchAction({
  985. type: 'highlight',
  986. // 可选,系列 index,可以是一个数组指定多个系列
  987. // seriesIndex?: number|Array,
  988. // // 可选,系列名称,可以是一个数组指定多个系列
  989. // seriesName?: string|Array,
  990. // // 可选,数据的 index
  991. // dataIndex?: number,
  992. // 可选,数据的 名称
  993. name: data.name
  994. })
  995. },
  996. tableLeave(){
  997. this.tableShowId = '-1';
  998. },
  999. chartTypeFun(val){
  1000. if(val != this.chartType){
  1001. this.chartType = val;
  1002. this.deviceBarInit(this.deviceList,this.chartType);
  1003. }
  1004. },
  1005. mapReturn(){
  1006. this.home_get_province(()=>{
  1007. if(this.provinceList.length){
  1008. // this.provinceId = this.provinceList[0].id
  1009. this.provinceId = null;
  1010. this.home_get_city(()=>{
  1011. if(this.cityList.length){
  1012. // this.cityId = this.cityList[0].id
  1013. this.cityId = null;
  1014. this.getData();
  1015. this.getSta_info();
  1016. this.getDev_list();
  1017. this.getAlarm_list();
  1018. }else{
  1019. this.cityId = null;
  1020. }
  1021. })
  1022. }else{
  1023. this.provinceId = null;
  1024. }
  1025. });
  1026. this.home_pro_dev_count('bangladesh');
  1027. },
  1028. echartsMapInit(mapName,list,cityName){
  1029. console.log(list)
  1030. let this_ = this;
  1031. let nameSuffix = '';
  1032. if(!list||list.length==0){
  1033. return
  1034. }
  1035. nameSuffix = 'District';
  1036. this.mapType = 'Bangladesh'
  1037. if(mapName == 'bangladesh'){
  1038. nameSuffix = 'Division';
  1039. }
  1040. console.log(cityName)
  1041. if(cityName){
  1042. nameSuffix = '';
  1043. cityName = 'area/'
  1044. mapName = mapName+'_3'
  1045. // this.mapType = mapName+' Division';
  1046. // this.mapType = mapName+' District';
  1047. }else{
  1048. cityName = ''
  1049. }
  1050. this.$nextTick(function(){
  1051. console.log([mapName],mapName)
  1052. if(document.getElementsByClassName('echarts_map')[0]){
  1053. $(".echarts_map").removeAttr("_echarts_instance_").empty()
  1054. this.myChart1 = echarts.init(document.getElementsByClassName('echarts_map')[0]);
  1055. // let provincesObj = {'bangladesh':bangladesh,'Barisal':Barisal,'Chittagong':Chittagong,'Dhaka':Dhaka,'Rajshahi':Rajshahi,'Khulna':Khulna,'Rangpur':Rangpur,'Sylhet':Sylhet,'Mymensingh':Mymensingh};
  1056. this.myChart1.showLoading()
  1057. $.getJSON('./js/json/'+cityName+mapName+'.json',function(mapJson){
  1058. echarts.registerMap(mapName, mapJson);
  1059. for(let d of list){
  1060. d.name = nameSuffix?d.name + ' ' + nameSuffix:d.name;
  1061. d.value = d.lampcount;
  1062. }
  1063. this_.myChart1.setOption({
  1064. tooltip: {
  1065. trigger: 'item',
  1066. formatter: '{b}<br/>{c}'
  1067. // formatter: function (params) {
  1068. // console.log(params)
  1069. // var tls = `<div class="history_echarts_tooltip"><p class="p1"><i style="background-color:${params[0].color}"></i><span class="span1">${params[0].value}</span><span class="span1">℃</span></p><p class="p2">${params[0].name}</p></div>`;
  1070. // return tls;
  1071. // },
  1072. },
  1073. visualMap: {
  1074. color: ['rgba(166, 65, 7, 1)','rgba(255, 255, 255, 1)'],
  1075. pieces: [
  1076. {gte: 10000, label: '≥10000 Light'},
  1077. {gte: 2000, lte: 10000, label: '2000-10000 Lights'},
  1078. {gte: 500, lte: 1999, label: '500-1999 Lights'},
  1079. {gte: 100, lte: 499, label: '100-499 Lights'},
  1080. {gte: 1, lte: 99, label: '1-99 Lights'},
  1081. {value: 0, label: '0 Lights'},
  1082. ]
  1083. },
  1084. series: [
  1085. {
  1086. type:'map',
  1087. name: mapName,
  1088. map: mapName,
  1089. zoom:1.2,
  1090. roam: true,
  1091. data: list
  1092. }
  1093. ]
  1094. })
  1095. this_.myChart1.on('click', function (param) {
  1096. if(param.data.name.split(' ')[1] == 'Division'&&param.data.value>0){
  1097. console.log(param);
  1098. this_.home_city_dev_count(param.data.name.split(' ')[0],param.data.id)
  1099. this_.provinceId = param.data.id;
  1100. this_.home_get_city(()=>{
  1101. if(this_.cityList.length){
  1102. // this_.cityId = null;
  1103. this_.getData();
  1104. this_.getSta_info();
  1105. this_.getDev_list();
  1106. this_.getAlarm_list();
  1107. }else{
  1108. // this_.cityId = null;
  1109. }
  1110. })
  1111. }
  1112. if(param.data.name.split(' ')[1] == 'District'&&param.data.value>0){
  1113. console.log(param);
  1114. this_.home_area_dev_count(param.data.name.split(' ')[0],param.data.id,true)
  1115. this_.cityId = param.data.id;
  1116. }
  1117. });
  1118. this_.myChart1.hideLoading()
  1119. });
  1120. }
  1121. })
  1122. },
  1123. deviceBarInit(data,type){
  1124. console.log(data,type)
  1125. if(this.myChart2){
  1126. this.myChart2.dispose()
  1127. }
  1128. if(document.getElementsByClassName('device_pie')[0]){
  1129. let colorArr = ['#FF6474','#FC8440','#FFA8B1','#FFCFD4','#FFD86F','#FFC936','#ADC6FF','#1D7DFD'];
  1130. let seriesData = [];
  1131. let i = 0;
  1132. if(data.length>0){
  1133. for(let d of data){
  1134. if(type == 0){
  1135. seriesData.push({name: d.name,value: d.total,itemStyle:{color:colorArr[i]}})
  1136. }
  1137. if(type == 1){
  1138. seriesData.push({name: d.name,value: d.onlineCount,itemStyle:{color:colorArr[i]}})
  1139. }
  1140. if(type == 2){
  1141. seriesData.push({name: d.name,value: d.lightCount,itemStyle:{color:colorArr[i]}})
  1142. }
  1143. if(type == 3){
  1144. seriesData.push({name: d.name,value: d.faultCount,itemStyle:{color:colorArr[i]}})
  1145. }
  1146. i++;
  1147. }
  1148. }
  1149. this.myChart2 = echarts.init(document.getElementsByClassName('device_pie')[0]);
  1150. this.myChart2.setOption({
  1151. tooltip: {
  1152. trigger: 'item',
  1153. formatter: '{b} : {c} ({d}%)'
  1154. },
  1155. series: [
  1156. {
  1157. name: 'device',
  1158. type: 'pie',
  1159. radius: ['20%','70%'],
  1160. center: ['50%', '50%'],
  1161. data: seriesData,
  1162. emphasis: {
  1163. itemStyle: {
  1164. shadowBlur: 10,
  1165. shadowOffsetX: 0,
  1166. shadowColor: 'rgba(0, 0, 0, 0.5)'
  1167. }
  1168. },
  1169. label: {
  1170. show: false
  1171. },
  1172. labelLine: {
  1173. show: false
  1174. },
  1175. }
  1176. ]
  1177. })
  1178. this.myChart2.on('mouseover', params=>{
  1179. for(let d of this.deviceList){
  1180. if(params.name == d.name){
  1181. this.$refs.deviceList.setCurrentRow(d);
  1182. }
  1183. }
  1184. })
  1185. this.myChart2.on('mouseout', ()=>{
  1186. this.$refs.deviceList.setCurrentRow();
  1187. // for(let d of this.deviceList){
  1188. // if(params.name == d.name){
  1189. // }
  1190. // }
  1191. })
  1192. }
  1193. },
  1194. },
  1195. watch:{
  1196. updateRemRatio(){
  1197. clearTimeout(this.updateRemRatioShakeProof)
  1198. this.updateRemRatioShakeProof = setTimeout(()=>{
  1199. if(this.myChart1){
  1200. this.myChart1.resize();
  1201. }
  1202. if(this.myChart2){
  1203. this.myChart2.resize();
  1204. }
  1205. },1000)
  1206. },
  1207. }
  1208. }
  1209. </script>
  1210. <style type="text/css" lang="less">
  1211. .dashboard_template{
  1212. .nav_top{
  1213. display: flex;
  1214. justify-content: space-between;
  1215. width:100%;
  1216. height:3.3rem;line-height: 3.3rem;
  1217. background:rgba(255,255,255,1);
  1218. border:0.1rem solid rgba(240,240,240,1);
  1219. .left_title{
  1220. display: flex;
  1221. align-items: center;
  1222. img{
  1223. display: inline-block;
  1224. // width: 1.2rem;
  1225. height: 1rem;
  1226. margin: 0 0.6rem;
  1227. }
  1228. .span{
  1229. font-size:1rem;
  1230. font-family:HiraginoSansGB-W3,HiraginoSansGB;
  1231. font-weight:normal;
  1232. color:rgba(101,112,133,1);
  1233. }
  1234. }
  1235. .right_operation{
  1236. display: flex;
  1237. align-items: center;
  1238. padding-right: 2.2rem;
  1239. .el-dropdown{
  1240. width: 10rem;
  1241. height: 2rem;line-height: 2rem;
  1242. background:rgba(246,248,250,1);
  1243. border-radius: 0.2rem;
  1244. margin-right: 0.8rem;
  1245. .el-dropdown-link{
  1246. cursor: pointer;
  1247. height: 100%;
  1248. display: flex;
  1249. align-items: center;
  1250. justify-content: space-between;
  1251. padding: 0 0.8rem;
  1252. font-size:1rem;
  1253. font-family:PingFang-SC-Medium,PingFang-SC;
  1254. font-weight:500;
  1255. color:rgba(101,112,133,1);
  1256. }
  1257. }
  1258. .el-input{
  1259. width: 16.5rem;
  1260. height: 2rem;line-height: 2rem;
  1261. .el-input__inner{
  1262. height: 2rem;line-height: 2rem;
  1263. background:rgba(246,248,250,1);
  1264. border: none;
  1265. }
  1266. .el-input__icon{
  1267. width: 1.8rem;
  1268. height: 2rem;line-height: 2rem;
  1269. border-top-right-radius: 0.2rem;
  1270. border-bottom-right-radius: 0.2rem;
  1271. background:#FC8440;
  1272. color: #fff;
  1273. font-size: 1rem;
  1274. cursor: pointer;
  1275. }
  1276. }
  1277. }
  1278. }
  1279. .dashboard_main{
  1280. background:rgba(246,248,250,1);
  1281. padding: 0.8rem 1.5rem 1.5rem;
  1282. display: flex;
  1283. .left_box{
  1284. flex: 1;
  1285. .time_box{
  1286. padding: 0.8rem;
  1287. height:15.83rem;
  1288. background:rgba(255,255,255,1);
  1289. border-radius:0.17rem;
  1290. border:0.08rem solid rgba(240,240,240,1);
  1291. background: #fff;
  1292. .top_box{
  1293. height:11rem;
  1294. // background:linear-gradient(134deg,rgba(252,169,64,1) 0%,rgba(252,132,64,1) 100%);
  1295. background-image: url('../img/dashboard/time_box_bg.png');
  1296. background-size: 100% 100%;
  1297. background-position: center;
  1298. border-radius:0.17rem;
  1299. border:0.08rem solid rgba(240,240,240,1);
  1300. padding: 1.5rem 1rem 0 2rem;
  1301. .flex_box{
  1302. display: flex;
  1303. .left{
  1304. font-size:4.33rem;
  1305. font-family:DINAlternate-Bold,DINAlternate;
  1306. font-weight:bold;
  1307. color:rgba(255,255,255,1);
  1308. }
  1309. .right{
  1310. margin-left: 0.5rem;
  1311. .p1{
  1312. margin-top: 1.3rem;
  1313. font-size:1.17rem;
  1314. font-family:PingFang-SC-Bold,PingFang-SC;
  1315. font-weight:bold;
  1316. color:rgba(255,255,255,1);
  1317. }
  1318. .p2{
  1319. margin-top: 0.2rem;
  1320. display: inline-block;;
  1321. padding: 0 1rem;
  1322. height:1.25rem;line-height:1.25rem;
  1323. background:rgba(255,255,255,0.6);
  1324. border-radius:0.63rem;
  1325. font-size:1rem;
  1326. font-family:PingFang-SC-Medium,PingFang-SC;
  1327. font-weight:500;
  1328. color:rgba(252,134,64,1);
  1329. }
  1330. }
  1331. }
  1332. .p3{
  1333. margin-left: 0.5rem;
  1334. font-size:1rem;
  1335. font-family:HiraginoSansGB-W3,HiraginoSansGB;
  1336. font-weight:normal;
  1337. color:rgba(255,255,255,1);
  1338. }
  1339. }
  1340. .bottom_box{
  1341. display: flex;
  1342. align-items: center;
  1343. margin-top: 0.6rem;
  1344. .btn{
  1345. display: flex;
  1346. align-items: center;
  1347. justify-content: center;
  1348. width:5.75rem;
  1349. height:2.33rem;
  1350. background:linear-gradient(134deg,rgba(252,169,64,1) 0%,rgba(252,132,64,1) 100%);
  1351. border-radius:0.33rem;
  1352. border:0.08rem solid rgba(240,240,240,1);
  1353. font-size:1rem;
  1354. font-family:PingFang-SC-Bold,PingFang-SC;
  1355. font-weight:bold;
  1356. color:rgba(255,255,255,1);
  1357. i{
  1358. font-size: 1.2rem;
  1359. }
  1360. span{
  1361. margin-left: 0.2rem;
  1362. }
  1363. }
  1364. .span_box1{
  1365. margin-left: 1.5rem;
  1366. display: flex;
  1367. align-items: center;
  1368. }
  1369. .span_box2{
  1370. // margin-left: 1.6rem;
  1371. display: flex;
  1372. align-items: center;
  1373. }
  1374. .span1{
  1375. font-size:1.17rem;
  1376. font-family:PingFang-SC-Bold,PingFang-SC;
  1377. font-weight:bold;
  1378. color:rgba(101,112,133,1);
  1379. }
  1380. .span2{
  1381. margin-left: 1rem;
  1382. font-size:1.5rem;
  1383. font-family:PingFang-SC-Bold,PingFang-SC;
  1384. font-weight:bold;
  1385. color:rgba(51,51,51,1);
  1386. }
  1387. .line{
  1388. display: inline-block;
  1389. width: 0.1rem;
  1390. height: 2.1rem;
  1391. background: #EBEFF2;
  1392. margin: 0 1rem;
  1393. }
  1394. }
  1395. }
  1396. .echarts_map_box{
  1397. margin-top: 0.8rem;
  1398. border:0.08rem solid rgba(240,240,240,1);
  1399. position: relative;
  1400. .echarts_title{
  1401. display: flex;
  1402. align-items: center;
  1403. height:3.5rem;line-height:3.5rem;
  1404. background:rgba(255,255,255,0.8);
  1405. font-size:1.17rem;
  1406. font-family:PingFangSC-Semibold,PingFang SC;
  1407. font-weight:600;
  1408. color:rgba(51,51,51,1);
  1409. img{
  1410. margin: 0 0.5rem 0 0.8rem;
  1411. height: 1.8rem;
  1412. }
  1413. }
  1414. .echarts_map{
  1415. width: 100%;
  1416. height: 38rem;
  1417. }
  1418. .map_return{
  1419. display: flex;
  1420. align-items: center;
  1421. position: absolute;
  1422. top: 4rem;left: 1rem;
  1423. height: 2rem;line-height: 2rem;
  1424. background-color: #fc8940;
  1425. cursor: pointer;
  1426. padding: 0 0.5rem;
  1427. color:#fff;
  1428. i{
  1429. margin: 0 0.5rem 0 0.5rem;
  1430. }
  1431. }
  1432. }
  1433. }
  1434. .right_box{
  1435. width:76.3rem;
  1436. margin-left: 0.8rem;
  1437. .right_top{
  1438. display: flex;
  1439. .light_information{
  1440. width:30rem;
  1441. height:11.8rem;
  1442. background:rgba(255,255,255,1);
  1443. border-radius:0.2rem;
  1444. border:0.1rem solid rgba(240,240,240,1);
  1445. display: flex;
  1446. .light_information_left{
  1447. padding-left: 1.3rem;
  1448. .title{
  1449. margin-top: 1.3rem;
  1450. font-size:1rem;
  1451. font-family:PingFangSC-Medium,PingFang SC;
  1452. font-weight:600;
  1453. color:rgba(51,51,51,1);
  1454. position: relative;
  1455. &::after{
  1456. content: "";
  1457. position: absolute;
  1458. bottom: -0.2rem;left:0;
  1459. width:1.6rem;
  1460. height:0.15rem;
  1461. background-color: #FF7C23;
  1462. }
  1463. }
  1464. .p1{
  1465. margin-top: 2rem;
  1466. font-size:2.5rem;
  1467. font-family:PingFang-SC-Heavy,PingFang-SC;
  1468. font-weight:800;
  1469. color:rgba(51,51,51,1);
  1470. }
  1471. .p2{
  1472. display: flex;
  1473. align-items: center;
  1474. .span1{
  1475. font-size:1rem;
  1476. font-family:PingFang-SC-Medium,PingFang-SC;
  1477. font-weight:500;
  1478. color:rgba(51,51,51,1);
  1479. }
  1480. .iconfont{
  1481. margin-left: 0.5rem;
  1482. font-size: 1.2rem;
  1483. color:rgba(252,132,64,1);
  1484. }
  1485. .span2{
  1486. font-size:1.2rem;
  1487. font-family:PingFangSC-Semibold,PingFang SC;
  1488. font-weight:600;
  1489. color:rgba(252,132,64,1);
  1490. line-height:1.6rem;
  1491. }
  1492. }
  1493. }
  1494. .light_information_right{
  1495. position: relative;
  1496. flex: 1;
  1497. .data_ul{
  1498. position: absolute;
  1499. right: 1.2rem;
  1500. top: 1.5rem;
  1501. display: flex;
  1502. align-items: center;
  1503. width: 17rem;
  1504. .li{
  1505. flex: 1;
  1506. text-align: center;
  1507. &.li1{
  1508. height: 5.6rem;
  1509. // background: rgba(252, 137, 64, 1);
  1510. background-image: url('../img/dashboard/light_Information_bg1.png');
  1511. background-size: 100% 100%;
  1512. background-position: center;
  1513. .p1{
  1514. margin-top: 1rem;
  1515. }
  1516. }
  1517. &.li2{
  1518. height: 5.6rem;
  1519. // background: rgba(0, 222, 156, 1);
  1520. background-image: url('../img/dashboard/light_Information_bg2.png');
  1521. background-size: 100% 100%;
  1522. background-position: center;
  1523. .p1{
  1524. margin-top: 1rem;
  1525. }
  1526. }
  1527. &.li3{
  1528. height: 6.8rem;
  1529. // background: rgba(255, 100, 116, 1);
  1530. background-image: url('../img/dashboard/light_Information_bg3.png');
  1531. background-size: 100% 100%;
  1532. background-position: center;
  1533. .p1{
  1534. margin-top: 1.5rem;
  1535. }
  1536. }
  1537. .p1{
  1538. display: inline-block;
  1539. padding: 0.2rem 0;
  1540. font-size:1.33rem;
  1541. font-family:PingFangSC-Semibold,PingFang SC;
  1542. font-weight:600;
  1543. color:rgba(255,255,255,1);
  1544. border-bottom: 0.1rem solid rgba(255, 255, 255, 0.2);
  1545. }
  1546. .p2{
  1547. font-size:0.83rem;
  1548. font-family:PingFangSC-Regular,PingFang SC;
  1549. font-weight:400;
  1550. color:rgba(255,255,255,1);
  1551. }
  1552. }
  1553. }
  1554. .tab_box{
  1555. position: absolute;
  1556. right: 1.2rem;bottom: 1.2rem;
  1557. display: flex;
  1558. .tab{
  1559. font-size:0.83rem;
  1560. font-family:PingFang-SC-Medium,PingFang-SC;
  1561. font-weight:500;
  1562. margin-left: 0.8rem;
  1563. padding: 0 0.5rem;
  1564. height: 1.3rem;line-height: 1.3rem;
  1565. &.tab1{
  1566. color:rgba(252,137,64,1);
  1567. background: rgba(252, 137, 64, 0.1);
  1568. }
  1569. &.tab2{
  1570. color: rgba(0, 222, 156, 1);
  1571. background: rgba(0, 222, 156, 0.1);
  1572. }
  1573. &.tab3{
  1574. color: rgba(255, 101, 116, 1);
  1575. background: rgba(255, 100, 116, 0.1);
  1576. }
  1577. }
  1578. }
  1579. }
  1580. }
  1581. .usage_information{
  1582. margin-left: 0.8rem;
  1583. width:45.5rem;
  1584. height:11.8rem;
  1585. background:rgba(255,255,255,1);
  1586. border-radius:0.2rem;
  1587. border:0.1rem solid rgba(240,240,240,1);
  1588. padding: 0 1.3rem;
  1589. .title{
  1590. margin-top: 1.3rem;
  1591. font-size:1rem;
  1592. font-family:PingFangSC-Medium,PingFang SC;
  1593. font-weight:600;
  1594. color:rgba(51,51,51,1);
  1595. position: relative;
  1596. display: flex;
  1597. align-items: center;
  1598. justify-content: space-between;
  1599. &::after{
  1600. content: "";
  1601. position: absolute;
  1602. bottom: -0.2rem;left:0;
  1603. width:1.6rem;
  1604. height:0.15rem;
  1605. background-color: #FF7C23;
  1606. }
  1607. .el-dropdown{
  1608. height:1.8rem;
  1609. background:rgba(246,248,250,1);
  1610. border-radius:0.2rem;
  1611. display: flex;
  1612. align-items: center;
  1613. .el-dropdown-link{
  1614. font-size:1rem;
  1615. font-family:PingFang-SC-Medium,PingFang-SC;
  1616. font-weight:500;
  1617. color:rgba(101,112,133,1);
  1618. padding: 0 0.5rem;
  1619. cursor: pointer;
  1620. }
  1621. }
  1622. }
  1623. .ul_box{
  1624. display: flex;
  1625. border:0.1rem solid rgba(240,240,240,1);
  1626. height: 6rem;
  1627. margin-top: 1.5rem;
  1628. .li{
  1629. border-right:0.1rem solid rgba(240,240,240,1);
  1630. width: 25%;
  1631. text-align:center;
  1632. &:last-child{
  1633. border:none;
  1634. }
  1635. .p1{
  1636. margin-top: 0.3rem;
  1637. font-size:2.17rem;
  1638. font-family:PingFang-SC-Heavy,PingFang-SC;
  1639. font-weight:800;
  1640. color:rgba(51,51,51,1);
  1641. line-height:2.5rem;
  1642. overflow: hidden;
  1643. text-overflow:ellipsis;
  1644. white-space: nowrap;
  1645. }
  1646. .p2{
  1647. font-size:1rem;
  1648. font-family:PingFang-SC-Medium,PingFang-SC;
  1649. font-weight:500;
  1650. color:rgba(101,112,133,1);
  1651. }
  1652. }
  1653. }
  1654. }
  1655. }
  1656. .proportion_lights{
  1657. margin-top: 0.8rem;
  1658. height:22.5rem;
  1659. background:rgba(255,255,255,1);
  1660. border-radius:0.17rem 0.17rem 0rem 0rem;
  1661. border:0.08rem solid rgba(240,240,240,1);
  1662. padding: 0 0.8rem 0 1.6rem;
  1663. .title{
  1664. margin-top: 1.3rem;
  1665. font-size:1rem;
  1666. font-family:PingFangSC-Medium,PingFang SC;
  1667. font-weight:600;
  1668. color:rgba(51,51,51,1);
  1669. position: relative;
  1670. display: flex;
  1671. align-items: center;
  1672. justify-content: space-between;
  1673. &::after{
  1674. content: "";
  1675. position: absolute;
  1676. bottom: -0.2rem;left:0;
  1677. width:1.6rem;
  1678. height:0.15rem;
  1679. background-color: #FF7C23;
  1680. }
  1681. .right_btn{
  1682. display: flex
  1683. }
  1684. .nav_box{
  1685. margin-left: 0.8rem;
  1686. display: flex;
  1687. height:1.8rem;line-height: 1.8rem;
  1688. align-items: center;
  1689. background:rgba(246,248,250,1);
  1690. .li{
  1691. padding: 0 1rem;
  1692. height:1.8rem;line-height: 1.8rem;
  1693. border-radius:0.17rem 0rem 0rem 0.17rem;
  1694. font-size:1rem;
  1695. font-family:PingFang-SC-Medium,PingFang-SC;
  1696. font-weight:500;
  1697. color:rgba(101,112,133,1);
  1698. cursor: pointer;
  1699. display: flex;
  1700. align-items:center;
  1701. i{
  1702. color: rgba(163, 175, 187, 1);
  1703. font-size: 1rem;
  1704. margin-left: 0.8rem;
  1705. }
  1706. .icon-xialajiantou{
  1707. font-size: 0.5rem;
  1708. }
  1709. &.select{
  1710. background:rgba(252,132,64,1);
  1711. color:rgba(255,255,255,1);
  1712. }
  1713. }
  1714. .el-dropdown-link{
  1715. font-size:1rem;
  1716. font-family:PingFang-SC-Medium,PingFang-SC;
  1717. font-weight:500;
  1718. color:rgba(101,112,133,1);
  1719. cursor: pointer;
  1720. }
  1721. }
  1722. }
  1723. .proportion_lights_main{
  1724. display: flex;
  1725. height: 19.9rem;
  1726. .left_echarts{
  1727. width: 19.9rem;
  1728. .device_pie{
  1729. width: 100%;height: 100%;
  1730. }
  1731. .device_pie_cover{
  1732. }
  1733. }
  1734. .right_table{
  1735. width: calc(100% - 19.9rem);
  1736. height: calc(100% - 2.1rem);
  1737. margin-top: 1.5rem;
  1738. .el-table{
  1739. width: 100%;
  1740. th,td{
  1741. padding: 0.5rem 0;
  1742. }
  1743. th,td{
  1744. >.cell{
  1745. font-size:1rem;
  1746. font-family:PingFangSC-Medium,PingFang SC;
  1747. font-weight:500;
  1748. color:rgba(51,51,51,1);
  1749. }
  1750. }
  1751. tr{
  1752. &:hover>td{
  1753. background: rgba(246, 248, 250, 1);
  1754. >.cell{
  1755. font-family:PingFangSC-Semibold,PingFang SC;
  1756. font-weight:600;
  1757. }
  1758. }
  1759. &.current-row>td{
  1760. background: rgba(246, 248, 250, 1);
  1761. >.cell{
  1762. font-family:PingFangSC-Semibold,PingFang SC;
  1763. font-weight:600;
  1764. }
  1765. }
  1766. }
  1767. .city{
  1768. i{
  1769. position: relative;
  1770. top: -0.15rem;
  1771. margin: 0 0.5rem;
  1772. display: inline-block;
  1773. width:0.3rem;
  1774. height:0.3rem;
  1775. background:rgba(252,132,64,1);
  1776. border-radius: 50%;
  1777. }
  1778. }
  1779. .total{
  1780. display: flex;
  1781. align-items: center;
  1782. justify-content: space-between;
  1783. span{
  1784. flex: 1;
  1785. }
  1786. .span1{
  1787. text-align: right;
  1788. }
  1789. .span2{
  1790. text-align: left;
  1791. }
  1792. i{
  1793. margin: 0 0.5rem;
  1794. display: inline-block;
  1795. width: 0.1rem;
  1796. height: 1.4rem;
  1797. background: rgba(198, 205, 213, 1);
  1798. }
  1799. }
  1800. .icon-youjiantou{
  1801. font-size: 1rem;
  1802. color:rgba(163, 175, 187, 1);
  1803. }
  1804. }
  1805. }
  1806. }
  1807. }
  1808. .real_time_fault_information{
  1809. padding: 0 0.8rem 0 1.6rem;
  1810. margin-top: 0.8rem;
  1811. height:22.6rem;
  1812. background:rgba(255,255,255,1);
  1813. border-radius:0.17rem 0.2rem 0rem 0rem;
  1814. border:0.1rem solid rgba(240,240,240,1);
  1815. .title{
  1816. margin-top: 1.3rem;
  1817. font-size:1rem;
  1818. font-family:PingFangSC-Medium,PingFang SC;
  1819. font-weight:600;
  1820. color:rgba(51,51,51,1);
  1821. position: relative;
  1822. display: flex;
  1823. align-items: center;
  1824. justify-content: space-between;
  1825. &::after{
  1826. content: "";
  1827. position: absolute;
  1828. bottom: -0.2rem;left:0;
  1829. width:1.6rem;
  1830. height:0.15rem;
  1831. background-color: #FF7C23;
  1832. }
  1833. .right_btn{
  1834. margin-left: 0.8rem;
  1835. padding: 0 1rem;
  1836. display: flex;
  1837. align-items: center;
  1838. height:1.8rem;line-height: 1.8rem;
  1839. background:rgba(246,248,250,1);
  1840. cursor: pointer;
  1841. font-size:1rem;
  1842. font-family:PingFang-SC-Medium,PingFang-SC;
  1843. font-weight:500;
  1844. color:rgba(101,112,133,1);
  1845. i{
  1846. font-size: 1rem;
  1847. margin-left: 0.8rem;
  1848. }
  1849. }
  1850. }
  1851. .real_time_fault_information_main{
  1852. height: calc(100% - 4.6rem);
  1853. .el-table{
  1854. margin-top: 1.5rem;
  1855. width: 100%;
  1856. th,td{
  1857. padding: 0.5rem 0;
  1858. }
  1859. th,td{
  1860. >.cell{
  1861. font-size:1rem;
  1862. font-family:PingFangSC-Medium,PingFang SC;
  1863. font-weight:500;
  1864. color:rgba(51,51,51,1);
  1865. padding: 0 0.5rem;
  1866. }
  1867. }
  1868. tr:hover>td{
  1869. background: rgba(246, 248, 250, 1);
  1870. >.cell{
  1871. font-family:PingFangSC-Semibold,PingFang SC;
  1872. font-weight:600;
  1873. }
  1874. }
  1875. .btn{
  1876. cursor: pointer;
  1877. padding: 0 0.5rem;
  1878. .iconfont{
  1879. font-weight:500;
  1880. color: rgba(252, 132, 64, 1);
  1881. }
  1882. }
  1883. .city{
  1884. display: flex;
  1885. align-items: center;
  1886. i{
  1887. margin: 0 0.5rem;
  1888. display: inline-block;
  1889. width:0.3rem;
  1890. height:0.3rem;
  1891. background:rgba(252,132,64,1);
  1892. border-radius: 50%;
  1893. }
  1894. }
  1895. .total{
  1896. display: flex;
  1897. align-items: center;
  1898. justify-content: space-between;
  1899. span{
  1900. flex: 1;
  1901. }
  1902. .span1{
  1903. text-align: right;
  1904. }
  1905. .span2{
  1906. text-align: left;
  1907. }
  1908. i{
  1909. margin: 0 0.5rem;
  1910. display: inline-block;
  1911. width: 0.1rem;
  1912. height: 1.4rem;
  1913. background: rgba(198, 205, 213, 1);
  1914. }
  1915. }
  1916. }
  1917. }
  1918. }
  1919. }
  1920. }
  1921. /*灯控详情*/
  1922. .details_box{
  1923. .wrap{
  1924. .table_box{
  1925. text-align: center;
  1926. th{
  1927. text-align: center;
  1928. color: #444444;
  1929. }
  1930. }
  1931. .el-table--enable-row-hover .el-table__body tr:hover>td{
  1932. // background: inherit;
  1933. }
  1934. .row_bg{
  1935. background: #F6F6F9;
  1936. }
  1937. position: relative;
  1938. // height: 50px;
  1939. .nav{
  1940. position: absolute;
  1941. width:428px;
  1942. height:50px;
  1943. line-height: 50px;
  1944. left: 50%;
  1945. margin-left: -214px;
  1946. background:rgba(255,255,255,1);
  1947. border-radius: 100px;
  1948. border:1px solid #E8E8E8;
  1949. .nav_list{
  1950. float: left;
  1951. width: 19%;
  1952. text-align: center;
  1953. cursor: pointer;
  1954. span{
  1955. font-size:14px;
  1956. font-family:PingFangSC-Medium;
  1957. color:#888888;
  1958. }
  1959. }
  1960. .details_nav_select{
  1961. background:linear-gradient(-90deg,rgba(54,130,251,1),rgba(56,161,246,1));
  1962. border-radius: 100px;
  1963. width: 24%;
  1964. span{
  1965. color: #ffffff;
  1966. }
  1967. }
  1968. }
  1969. .historicalnav{
  1970. position: absolute;
  1971. width:428px;
  1972. height:50px;
  1973. line-height: 50px;
  1974. left: 50%;
  1975. margin-left: -214px;
  1976. background:rgba(255,255,255,1);
  1977. border-radius: 100px;
  1978. border:1px solid #E8E8E8;
  1979. .nav_list{
  1980. float: left;
  1981. width: 24%;
  1982. text-align: center;
  1983. cursor: pointer;
  1984. span{
  1985. font-size:14px;
  1986. font-family:PingFangSC-Medium;
  1987. color:#888888;
  1988. }
  1989. }
  1990. .details_nav_select{
  1991. background:linear-gradient(-90deg,rgba(54,130,251,1),rgba(56,161,246,1));
  1992. border-radius: 100px;
  1993. width: 28%;
  1994. span{
  1995. color: #ffffff;
  1996. }
  1997. }
  1998. }
  1999. .details_list_box{
  2000. padding-top: 126px;
  2001. display: flex;
  2002. // justify-content: space-between;
  2003. flex-direction: row;
  2004. flex-wrap: wrap;
  2005. .details_list{
  2006. // float: left;
  2007. width: 25%;
  2008. position: relative;
  2009. margin-bottom: 30px;
  2010. span{
  2011. display: inline-block;
  2012. font-size:16px;
  2013. font-family:PingFangSC-Medium;
  2014. color:#222222;
  2015. line-height:16px;
  2016. height:44px;
  2017. line-height: 44px;
  2018. // white-space: nowrap;
  2019. // overflow: hidden;
  2020. // text-overflow: ellipsis;
  2021. }
  2022. span:first-child{
  2023. position: absolute;
  2024. width: 180px;
  2025. padding-right:20px;
  2026. text-align: right;
  2027. }
  2028. span:last-child{
  2029. padding: 0 20px;
  2030. margin-left: 190px;
  2031. width:calc(100% - 242px);
  2032. background:#F8F9FC;
  2033. border-radius: 2px ;
  2034. border: 1px solid #E8E8E8;
  2035. white-space: nowrap;
  2036. overflow: hidden;
  2037. text-overflow: ellipsis;
  2038. }
  2039. }
  2040. }
  2041. .details_list_box_EN{
  2042. .details_list_min{
  2043. width: 33.3%;
  2044. }
  2045. .details_list{
  2046. span:first-child{
  2047. width: 255px;
  2048. // line-height: 22px;
  2049. }
  2050. span:last-child{
  2051. margin-left: 260px;
  2052. width:calc(100% - 300px);
  2053. }
  2054. }
  2055. }
  2056. }
  2057. }
  2058. }
  2059. </style>