WeatherProphethomepage.vue 84 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683
  1. <template>
  2. <view class="content">
  3. <cu-custom bgColor="bg-blacks" :isBack="false">
  4. <block slot="right">
  5. <image src="../../static/picture/fourLine.png" style="width: 30px;height: 30px;margin-left: 2%;" @tap="openDrawer"></image>
  6. </block>
  7. <block slot="right">
  8. <view class="icon cuIcon-notice text-white" v-if="badge != 0" style="margin-left: -70%;">
  9. <view class="cu-tag looknumber" style="margin-top: -2%;">
  10. <block v-if="badge != 1">{{ badge > 99 ? '99+' : badge }}</block>
  11. </view>
  12. </view>
  13. </block>
  14. <block slot="right">
  15. </block>
  16. <block slot="content">{{address}}</block>
  17. <block slot="right">
  18. <view class="plus" @tap="showModal" data-target="viewModal">+</view>
  19. </block>
  20. </cu-custom>
  21. <!-- 抽屉组件 -->
  22. <div>
  23. <drawer ref="drawer"></drawer>
  24. </div>
  25. <div class="plusDrawer" @tap="hideModal">
  26. <plusDrawer ref="plusDrawer"></plusDrawer>
  27. </div>
  28. <scroll-view scroll-y class="DrawerPage" :class="modalName == 'viewModal' ? 'show' : ''">
  29. <!--点击天数选项卡-->
  30. <view class="clickThedaystab">
  31. <view :class="[weatherTodaybutton?'weatherTodaywhite':'weatherToday']" @click="weatherToday()">今天</view>
  32. <view :class="[weatherSevendaybutton?'weatherSevendaywhite':'weatherSevenday']" @click="weatherSevenday()">7天</view>
  33. <view :class="[weatherFromeighttofifteendaysbutton?'weatherFromeighttofifteendayswhite':'weatherFromeighttofifteendays']"
  34. @click="weatherFromeighttofifteendays()">8~15天</view>
  35. <view :class="[weatherFortydaysbutton?'weatherFortydayswhite':'weatherFortydays']" @click="weatherFortydays()">40天</view>
  36. </view>
  37. <!--风场选项卡-->
  38. <view class="windStationNameAndChoice">
  39. <view class="windStationName">{{ windStationName }}</view>
  40. <view class="windStationChoice"><a @click="showCenterVisible = true">其他ㅤ〉</a></view>
  41. </view>
  42. <s-popup custom-class="center-popup" position="center" v-model="showCenterVisible">
  43. <view class="s-popup-wrapper" :style="{'height': spopupWrapperHeight}">
  44. <view class="s-popup-title">
  45. <view class="s-popup-word">选择您想查看的风场</view>
  46. <view class="s-popup-cha"><a @tap="showCenterVisible = false">×</a></view>
  47. </view>
  48. <view class="windStationList" :style="{ 'height': windStationListHeight}">
  49. <view class="windStationItemContainer" v-for="(item,index) in windStation" :key="index" :class="[choiceIndex==index?'windStationItemContainerBlack':'windStationItemContainer']">
  50. <view class="windStationItem" @tap="choiceWindStation(item,index)">{{item}}</view>
  51. </view>
  52. </view>
  53. </view>
  54. </s-popup>
  55. <!-- 今天气象卡片 -->
  56. <view v-if="weatherTodaybutton">
  57. <div class="ThermometerCard">
  58. <ThermometerCard ref="thermometerCard" @listenEven="weatherDayNightSwitch"></ThermometerCard>
  59. </div>
  60. <div class="weatherDetails">
  61. <div class="weatherText"><strong>气象指标</strong></div>
  62. <div class="detailsText" @tap="common.navTo('../../components/weatherProphethomepage/weatherDetail/Detail')">详情ㅤ〉</div>
  63. </div>
  64. <view class="weatherDaytimegrid" v-if="weatherSwitch==true">
  65. <scroll-view scroll-y scroll-with-animation class="scrollList" :style="{'height':heightToday}">
  66. <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']" style="background-color: #242424;">
  67. <view class="cu-item">
  68. <div class="cu-listAll" :style="{'width':widthToday}">
  69. <div class="cuIcon" :style="{'height':xianHeight}">
  70. <view class="icon1 iconfont" :class="['icon-' + cuIconList[6].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  71. class="wenZhi" :style="{'font-size':fontSize}">白气象</br>{{weatherProphetData_1[0].weather1}}</a>
  72. </div>
  73. <div class="cuIcon" :style="{'height':xianHeight}">
  74. <view class="icon1 iconfont" :class="['icon-' + cuIconList[7].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  75. class="wenZhi" :style="{'font-size':fontSize}">白气温</br>{{weatherProphetData_1[0].temperature1}}℃</a>
  76. </div>
  77. <div class="cuIcon" :style="{'height':xianHeight}">
  78. <view class="icon1 iconfont" :class="['icon-' + cuIconList[8].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  79. class="wenZhi" :style="{'font-size':fontSize}">白体感</br>{{weatherProphetData_1[0].realfeel1}}℃</a>
  80. </div>
  81. <div class="cuIcon4">
  82. <view class="icon1 iconfont" :class="['icon-' + cuIconList[9].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  83. class="wenZhi" :style="{'font-size':fontSize}">白降水</br>{{weatherProphetData_1[0].precipitation1}}m/s</a>
  84. </div>
  85. </div>
  86. <div class="cu-listAllTwo" :style="{'width':widthToday,'margin-top':margintop}">
  87. <div class="cuIcon" :style="{'margin-top':margintop,'height':xianHeight}">
  88. <view class="icon1 iconfont" :class="['icon-' + cuIconList[10].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  89. class="wenZhi" :style="{'font-size':fontSize}">白风向</br>{{weatherProphetData_1[0].winddirection1}}</a>
  90. </div>
  91. <div class="cuIcon" :style="{'margin-top':margintop,'height':xianHeight}">
  92. <view class="icon1 iconfont" :class="['icon-' + cuIconList[11].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  93. class="wenZhi" :style="{'font-size':fontSize}">白风速</br>{{weatherProphetData_1[0].speed1}}km/h</a>
  94. </div>
  95. <div class="cuIcon" :style="{'margin-top':margintop,'height':xianHeight}">
  96. <view class="icon1 iconfont" :class="['icon-' + cuIconList[12].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  97. class="wenZhi" :style="{'font-size':fontSize}">白阵风速</br>{{weatherProphetData_1[0].gust1}}km/h</a>
  98. </div>
  99. <div class="cuIcon4" :style="{'margin-top':margintop}">
  100. <view class="icon1 iconfont" :class="['icon-' + cuIconList[0].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  101. class="wenZhi" :style="{'font-size':fontSize}">天气</br>{{weatherProphetData_1[0].weather}}</a>
  102. </div>
  103. </div>
  104. <div class="cu-listAllTThree" :style="{'width':widthToday,'margin-top':margintopThree}">
  105. <div class="cuIcon" :style="{'margin-top':margintopThree,'height':xianHeight}">
  106. <view class="icon1 iconfont" :class="['icon-' + cuIconList[1].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  107. class="wenZhi" :style="{'font-size':fontSize}">最高温度</br>{{weatherProphetData_1[0].maximumtem}}℃</a>
  108. </div>
  109. <div class="cuIcon" :style="{'margin-top':margintopThree,'height':xianHeight}">
  110. <view class="icon1 iconfont" :class="['icon-' + cuIconList[2].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  111. class="wenZhi" :style="{'font-size':fontSize}">最低温度</br>{{weatherProphetData_1[0].minimumtem}}℃</a>
  112. </div>
  113. <div class="cuIcon" :style="{'margin-top':margintopThree,'height':xianHeight}">
  114. <view class="icon1 iconfont" :class="['icon-' + cuIconList[3].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  115. class="wenZhi" :style="{'font-size':fontSize}">日出</br>{{weatherProphetData_1[0].sunrise}}</a>
  116. </div>
  117. <div class="cuIcon4" :style="{'margin-top':margintopThree}">
  118. <view class="icon1 iconfont" :class="['icon-' + cuIconList[4].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  119. class="wenZhi" :style="{'font-size':fontSize}">日落</br>{{weatherProphetData_1[0].sunset}}</a>
  120. </div>
  121. </div>
  122. <div class="cu-listAllTFour" :style="{'width':widthToday,'margin-top':margintopThree}">
  123. <div class="cuIcon" :style="{'margin-top':margintopThree,'height':xianHeight}">
  124. <view class="icon1 iconfont" :class="['icon-' + cuIconList[5].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  125. class="wenZhi" :style="{'font-size':fontSize}">持续时间</br>{{weatherProphetData_1[0].sunduration}}</a>
  126. </div>
  127. <div class="cuIcon2">
  128. </div>
  129. <div class="cuIcon2">
  130. </div>
  131. <div class="cuIcon2">
  132. </div>
  133. </div>
  134. </view>
  135. </view>
  136. </scroll-view>
  137. </view>
  138. <view class="weatherNocturnalgrid" v-if="weatherSwitch==false">
  139. <scroll-view scroll-y scroll-with-animation class="scrollList" :style="{'height':heightToday}">
  140. <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']" style="background-color: #242424;">
  141. <view class="cu-item">
  142. <div class="cu-listAll" :style="{'width':widthToday}">
  143. <div class="cuIcon" :style="{'height':xianHeight}">
  144. <view class="icon1 iconfont" :class="['icon-' + cuIconList[6].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  145. class="wenZhi" :style="{'font-size':fontSize}">夜气象</br>{{weatherProphetData_1[0].weather2}}</a>
  146. </div>
  147. <div class="cuIcon" :style="{'height':xianHeight}">
  148. <view class="icon1 iconfont" :class="['icon-' + cuIconList[7].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  149. class="wenZhi" :style="{'font-size':fontSize}">夜气温</br>{{weatherProphetData_1[0].temperature2}}℃</a>
  150. </div>
  151. <div class="cuIcon" :style="{'height':xianHeight}">
  152. <view class="icon1 iconfont" :class="['icon-' + cuIconList[8].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  153. class="wenZhi" :style="{'font-size':fontSize}">夜体感</br>{{weatherProphetData_1[0].realfeel2}}℃</a>
  154. </div>
  155. <div class="cuIcon4">
  156. <view class="icon1 iconfont" :class="['icon-' + cuIconList[9].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  157. class="wenZhi" :style="{'font-size':fontSize}">夜降水</br>{{weatherProphetData_1[0].precipitation2}}m/s</a>
  158. </div>
  159. </div>
  160. <div class="cu-listAllTwo" :style="{'width':widthToday,'margin-top':margintop}">
  161. <div class="cuIcon" :style="{'margin-top':margintop,'height':xianHeight}">
  162. <view class="icon1 iconfont" :class="['icon-' + cuIconList[10].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  163. class="wenZhi" :style="{'font-size':fontSize}">夜风向</br>{{weatherProphetData_1[0].winddirection2}}</a>
  164. </div>
  165. <div class="cuIcon" :style="{'margin-top':margintop,'height':xianHeight}">
  166. <view class="icon1 iconfont" :class="['icon-' + cuIconList[11].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  167. class="wenZhi" :style="{'font-size':fontSize}">夜风速</br>{{weatherProphetData_1[0].speed2}}km/h</a>
  168. </div>
  169. <div class="cuIcon" :style="{'margin-top':margintop,'height':xianHeight}">
  170. <view class="icon1 iconfont" :class="['icon-' + cuIconList[12].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  171. class="wenZhi" :style="{'font-size':fontSize}">夜阵风速</br>{{weatherProphetData_1[0].gust2}}km/h</a>
  172. </div>
  173. <div class="cuIcon4" :style="{'margin-top':margintop}">
  174. <view class="icon1 iconfont" :class="['icon-' + cuIconList[0].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  175. class="wenZhi" :style="{'font-size':fontSize}">天气</br>{{weatherProphetData_1[0].weather}}</a>
  176. </div>
  177. </div>
  178. <div class="cu-listAllTThree" :style="{'width':widthToday,'margin-top':margintopThree}">
  179. <div class="cuIcon" :style="{'margin-top':margintopThree,'height':xianHeight}">
  180. <view class="icon1 iconfont" :class="['icon-' + cuIconList[1].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  181. class="wenZhi" :style="{'font-size':fontSize}">最高温度</br>{{weatherProphetData_1[0].maximumtem}}℃</a>
  182. </div>
  183. <div class="cuIcon" :style="{'margin-top':margintopThree,'height':xianHeight}">
  184. <view class="icon1 iconfont" :class="['icon-' + cuIconList[2].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  185. class="wenZhi" :style="{'font-size':fontSize}">最低温度</br>{{weatherProphetData_1[0].minimumtem}}℃</a>
  186. </div>
  187. <div class="cuIcon" :style="{'margin-top':margintopThree,'height':xianHeight}">
  188. <view class="icon1 iconfont" :class="['icon-' + cuIconList[3].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  189. class="wenZhi" :style="{'font-size':fontSize}">日出</br>{{weatherProphetData_1[0].sunrise}}</a>
  190. </div>
  191. <div class="cuIcon4" :style="{'margin-top':margintopThree}">
  192. <view class="icon1 iconfont" :class="['icon-' + cuIconList[4].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  193. class="wenZhi" :style="{'font-size':fontSize}">日落</br>{{weatherProphetData_1[0].sunset}}</a>
  194. </div>
  195. </div>
  196. <div class="cu-listAllTFour" :style="{'width':widthToday,'margin-top':margintopThree}">
  197. <div class="cuIcon" :style="{'margin-top':margintopThree,'height':xianHeight}">
  198. <view class="icon1 iconfont" :class="['icon-' + cuIconList[5].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  199. class="wenZhi" :style="{'font-size':fontSize}">持续时间</br>{{weatherProphetData_1[0].sunduration}}</a>
  200. </div>
  201. <div class="cuIcon2">
  202. </div>
  203. <div class="cuIcon2">
  204. </div>
  205. <div class="cuIcon2">
  206. </div>
  207. </div>
  208. </view>
  209. </view>
  210. </scroll-view>
  211. </view>
  212. </view>
  213. <!-- 7天气象卡片 -->
  214. <view v-if="weatherSevendaybutton">
  215. <div>
  216. <WeatherTemperatureWindSpeedCard_7 ref='WeatherTemperatureWindSpeedCard_7' @listenEven="changeTap"></WeatherTemperatureWindSpeedCard_7>
  217. </div>
  218. <div class="weatherDayAndNightButton7">
  219. <div :class="[weatherSwitch7==true?'dayButtonWhite7':'dayButtonBlack7']" @click="weatherDaySwitch7()">白天</div>
  220. <div :class="[weatherSwitch7==false?'nightButtonWhite7':'nightButtonBlack7']" :style="{'margin-left':nightmarginleft7}"
  221. @click="weatherNightSwitch7()">夜间</div>
  222. </div>
  223. <div v-if="weatherSwitch7">
  224. <scroll-view scroll-y scroll-with-animation class="scrollList7" :style="{'height':height7}">
  225. <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']" style="background-color: rgba(0, 0, 0, 0);">
  226. <view class="cu-item">
  227. <div class="cu-listAll7" :style="{'width':width7}">
  228. <div class="cuIcon7" :style="{'height':xianHeight7}">
  229. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[6].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  230. class="wenZhi7" :style="{'font-size':fontSize7}">白气象</br>{{weatherInformation.weather1}}</a>
  231. </div>
  232. <div class="cuIcon7" :style="{'height':xianHeight7}">
  233. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[7].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  234. class="wenZhi7" :style="{'font-size':fontSize7}">白气温</br>{{weatherInformation.temperature1}}℃</a>
  235. </div>
  236. <div class="cuIcon7" :style="{'height':xianHeight7}">
  237. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[8].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  238. class="wenZhi7" :style="{'font-size':fontSize7}">白体感</br>{{weatherInformation.realfeel1}}℃</a>
  239. </div>
  240. <div class="cuIcon4">
  241. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[9].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  242. class="wenZhi7" :style="{'font-size':fontSize7}">白降水</br>{{weatherInformation.precipitation1}}m/s</a>
  243. </div>
  244. </div>
  245. <div class="cu-listAllTwo7" :style="{'width':width7,'margin-top':margintop7}">
  246. <div class="cuIcon7" :style="{'margin-top':margintop7,'height':xianHeight7}">
  247. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[10].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  248. class="wenZhi7" :style="{'font-size':fontSize7}">白风向</br>{{weatherInformation.winddirection1}}</a>
  249. </div>
  250. <div class="cuIcon7" :style="{'margin-top':margintop7,'height':xianHeight7}">
  251. <view class="icon7 iconfont" :class="['icon-' + cuIconList[11].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  252. class="wenZhi7" :style="{'font-size':fontSize7}">白风速</br>{{weatherInformation.speed1}}km/h</a>
  253. </div>
  254. <div class="cuIcon7" :style="{'margin-top':margintop7,'height':xianHeight7}">
  255. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[12].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  256. class="wenZhi7" :style="{'font-size':fontSize7}">白阵风速</br>{{weatherInformation.gust1}}km/h</a>
  257. </div>
  258. <div class="cuIcon4" :style="{'margin-top':margintop7}">
  259. <view class="icon7 iconfont" :class="['icon-' + cuIconList[0].cuIcon,'text-'+ cuIconList[0].color]"></view><a
  260. class="wenZhi" :style="{'font-size':fontSize7}">天气</br>{{weatherInformation.weather}}</a>
  261. </div>
  262. </div>
  263. <div class="cu-listAllTThree7" :style="{'width':width7,'margin-top':margintopThree7}">
  264. <div class="cuIcon7" :style="{'margin-top':margintopThree7,'height':xianHeight7}">
  265. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[1].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  266. class="wenZhi7" :style="{'font-size':fontSize7}">最高温度</br>{{weatherInformation.maximumtem}}℃</a>
  267. </div>
  268. <div class="cuIcon7" :style="{'margin-top':margintopThree7,'height':xianHeight7}">
  269. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[2].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  270. class="wenZhi7" :style="{'font-size':fontSize7}">最低温度</br>{{weatherInformation.minimumtem}}℃</a>
  271. </div>
  272. <div class="cuIcon7" :style="{'margin-top':margintopThree7,'height':xianHeight7}">
  273. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[3].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  274. class="wenZhi7" :style="{'font-size':fontSize7}">日出</br>{{weatherInformation.sunrise}}</a>
  275. </div>
  276. <div class="cuIcon4" :style="{'margin-top':margintopThree7}">
  277. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[4].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  278. class="wenZhi7" :style="{'font-size':fontSize7}">日落</br>{{weatherInformation.sunset}}</a>
  279. </div>
  280. </div>
  281. <div class="cu-listAllTFour7" :style="{'width':width7,'margin-top':margintopThree7}">
  282. <div class="cuIcon7" :style="{'margin-top':margintopThree7,'height':xianHeight7}">
  283. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[5].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  284. class="wenZhi7" :style="{'font-size':fontSize7}">持续时间</br>{{weatherInformation.sunduration}}</a>
  285. </div>
  286. <div class="cuIcon2">
  287. </div>
  288. <div class="cuIcon2">
  289. </div>
  290. <div class="cuIcon2">
  291. </div>
  292. </div>
  293. </view>
  294. </view>
  295. </scroll-view>
  296. </div>
  297. <view v-if="weatherSwitch7==false">
  298. <scroll-view scroll-y scroll-with-animation class="scrollList7" :style="{'height':height7}">
  299. <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']" style="background-color: rgba(0, 0, 0, 0);">
  300. <view class="cu-item">
  301. <div class="cu-listAll7" :style="{'width':width7}">
  302. <div class="cuIcon7" :style="{'height':xianHeight7}">
  303. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[6].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  304. class="wenZhi7" :style="{'font-size':fontSize7}">夜气象</br>{{weatherInformation.weather2}}</a>
  305. </div>
  306. <div class="cuIcon7" :style="{'height':xianHeight7}">
  307. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[7].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  308. class="wenZhi7" :style="{'font-size':fontSize7}">夜气温</br>{{weatherInformation.temperature2}}℃</a>
  309. </div>
  310. <div class="cuIcon7" :style="{'height':xianHeight7}">
  311. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[8].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  312. class="wenZhi7" :style="{'font-size':fontSize7}">夜体感</br>{{weatherInformation.realfeel2}}℃</a>
  313. </div>
  314. <div class="cuIcon4">
  315. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[9].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  316. class="wenZhi7" :style="{'font-size':fontSize7}">夜降水</br>{{weatherInformation.precipitation2}}m/s</a>
  317. </div>
  318. </div>
  319. <div class="cu-listAllTwo7" :style="{'width':width7,'margin-top':margintop7}">
  320. <div class="cuIcon7" :style="{'margin-top':margintop7,'height':xianHeight7}">
  321. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[10].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  322. class="wenZhi7" :style="{'font-size':fontSize7}">夜风向</br>{{weatherInformation.winddirection2}}</a>
  323. </div>
  324. <div class="cuIcon7" :style="{'margin-top':margintop7,'height':xianHeight7}">
  325. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[11].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  326. class="wenZhi7" :style="{'font-size':fontSize7}">夜风速</br>{{weatherInformation.speed2}}km/h</a>
  327. </div>
  328. <div class="cuIcon7" :style="{'margin-top':margintop7,'height':xianHeight7}">
  329. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[12].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  330. class="wenZhi7" :style="{'font-size':fontSize7}">夜阵风速</br>{{weatherInformation.gust2}}km/h</a>
  331. </div>
  332. <div class="cuIcon4" :style="{'margin-top':margintop7}">
  333. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[0].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  334. class="wenZhi7" :style="{'font-size':fontSize7}">天气</br>{{weatherInformation.weather}}</a>
  335. </div>
  336. </div>
  337. <div class="cu-listAllTThree7" :style="{'width':width7,'margin-top':margintopThree7}">
  338. <div class="cuIcon7" :style="{'margin-top':margintopThree7,'height':xianHeight7}">
  339. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[1].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  340. class="wenZhi7" :style="{'font-size':fontSize7}">最高温度</br>{{weatherInformation.maximumtem}}℃</a>
  341. </div>
  342. <div class="cuIcon7" :style="{'margin-top':margintopThree7,'height':xianHeight7}">
  343. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[2].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  344. class="wenZhi7" :style="{'font-size':fontSize7}">最低温度</br>{{weatherInformation.minimumtem}}℃</a>
  345. </div>
  346. <div class="cuIcon7" :style="{'margin-top':margintopThree7,'height':xianHeight7}">
  347. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[3].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  348. class="wenZhi7" :style="{'font-size':fontSize7}">日出</br>{{weatherInformation.sunrise}}</a>
  349. </div>
  350. <div class="cuIcon4" :style="{'margin-top':margintopThree7}">
  351. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[4].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  352. class="wenZhi7" :style="{'font-size':fontSize7}">日落</br>{{weatherInformation.sunset}}</a>
  353. </div>
  354. </div>
  355. <div class="cu-listAllTFour7" :style="{'width':width7,'margin-top':margintopThree7}">
  356. <div class="cuIcon7" :style="{'margin-top':margintopThree7,'height':xianHeight7}">
  357. <view class="icon7 iconfont" :class="['icon-' + cuIconList7[5].cuIcon,'text-'+ cuIconList7[0].color]"></view><a
  358. class="wenZhi7" :style="{'font-size':fontSize7}">持续时间</br>{{weatherInformation.sunduration}}</a>
  359. </div>
  360. <div class="cuIcon2">
  361. </div>
  362. <div class="cuIcon2">
  363. </div>
  364. <div class="cuIcon2">
  365. </div>
  366. </div>
  367. </view>
  368. </view>
  369. </scroll-view>
  370. </view>
  371. </view>
  372. <!-- 8~15天气象卡片 -->
  373. <view v-if="weatherFromeighttofifteendaysbutton">
  374. <view class="cu-card case" :class="isCard?'no-card':''">
  375. <view class="cardContenter">
  376. <view class="weather8_15">
  377. <view class="weather8_15_text">{{startDate}}~{{endDate}}</view>
  378. <view class="choice">
  379. <div :class="[speedFlag==true?'speedButtonWhite':'speedButtonBlack']" :style="{'font-size':choiceFontSize,'margin-top':choiceMarginTop}"
  380. @click="speedSwitch()">风速</div>
  381. <div :class="[temperatureFlag==true?'temperatureButtonWhite':'temperatureButtonBlack']" :style="{'font-size':choiceFontSize,'margin-top':choiceMarginTop}"
  382. @click="temperatureSwitch()">温度</div>
  383. <div :class="[realFeelFlag==true?'realFeelButtonWhite':'realFeelButtonBlack']" :style="{'font-size':choiceFontSize,'margin-top':choiceMarginTop}"
  384. @click="realFeelSwitch()">体感温度</div>
  385. </view>
  386. </view>
  387. <scroll-view scroll-x scroll-with-animation :scroll-left=scrollposition class="scrollUcharts" @scroll="uChartsScrollEvent"
  388. :scroll-into-view="'uCharts-'+mainCur">
  389. <view class="qiun-charts">
  390. <canvas canvas-id="canvasLineA" id="canvasLineA" class="charts"></canvas>
  391. </view>
  392. </scroll-view>
  393. </view>
  394. </view>
  395. <div>
  396. <scroll-view scroll-y scroll-with-animation :scroll-top=scrollposition class="scrollList" :style="{'height': scrollHeight }"
  397. @scroll="listScrollEvent">
  398. <weatherCalendarCardList8_15 ref="weatherCalendarCardList8_15"></weatherCalendarCardList8_15>
  399. </scroll-view>
  400. </div>
  401. </view>
  402. <!-- 40天气象卡片 -->
  403. <view v-if="weatherFortydaysbutton">
  404. <view class="cu-card case" :class="isCard40?'no-card':''">
  405. <view class="cardContenter40">
  406. <view class="dateAndChoice">
  407. <view class="date">
  408. {{startDate40}}~{{endDate40}}
  409. </view>
  410. <view class="choice40">
  411. <div :class="[speedFlag40==true?'speedButtonWhite40':'speedButtonBlack40']" :style="{'font-size':choiceFontSize40,'margin-top':choiceMarginTop40}"
  412. @click="speedSwitch40()">风速</div>
  413. <div :class="[temperatureFlag40==true?'temperatureButtonWhite40':'temperatureButtonBlack40']" :style="{'font-size':choiceFontSize40,'margin-top':choiceMarginTop40}"
  414. @click="temperatureSwitch40()">温度</div>
  415. <div :class="[realFeelFlag40==true?'realFeelButtonWhite40':'realFeelButtonBlack40']" :style="{'font-size':choiceFontSize40,'margin-top':choiceMarginTop40}"
  416. @click="realFeelSwitch40()">体感温度</div>
  417. </view>
  418. </view>
  419. <scroll-view scroll-x scroll-with-animation :scroll-left=scrollposition_uCharts class="scrollUcharts40" @scroll="uChartsScrollEvent40"
  420. :scroll-into-view="'uCharts-'+mainCur40">
  421. <view class="qiun-charts40">
  422. <canvas canvas-id="canvasLineA40" id="canvasLineA40" class="charts40"></canvas>
  423. </view>
  424. </scroll-view>
  425. </view>
  426. </view>
  427. <scroll-view scroll-y scroll-with-animation :scroll-top=scrollposition_list class="scrollList40" :style="{'height': scrollListHeight40 }"
  428. @scroll="listScrollEvent40">
  429. <weatherCalendarCardList40 ref="weatherCalendarCardList40"></weatherCalendarCardList40>
  430. </scroll-view>
  431. </view>
  432. </scroll-view>
  433. <view class="DrawerClose" :class="modalName == 'viewModal' ? 'show' : ''" @tap="hideModal"><text class="cuIcon-pullright"></text></view>
  434. </view>
  435. </template>
  436. <script>
  437. import uCharts from '../../components/tools/u-charts/u-charts.js';
  438. import utils from '../../components/tools/shoyu-date/utils.filter.js';
  439. import res from '../../common/data.json';
  440. import drawer from '../../components/drawer/weatherThreeLineDrawer.vue';
  441. import plusDrawer from '../../components/drawer/plusDrawer.vue';
  442. import ThermometerCard from '../../components/weatherProphethomepage/weathercomponents/thermometerCard/ThermometerCard.vue';
  443. import WeatherTemperatureWindSpeedCard_7 from '../../components/weatherProphethomepage/weathercomponents/weatherTemperatureWindSpeedCard_7/WeatherTemperatureWindSpeedCard_7.vue';
  444. import weatherCalendarCardList8_15 from '../../components/weatherProphethomepage/weathercomponents/weatherCalendarCardList8_15/weatherCalendarCardList8_15.vue';
  445. import weatherCalendarCardList40 from '../../components/weatherProphethomepage/weathercomponents/weatherCalendarCardList40/weatherCalendarCardList40.vue';
  446. import sPopup from '@/s-popup';
  447. export default {
  448. components: {
  449. drawer: drawer,
  450. plusDrawer: plusDrawer,
  451. weatherCalendarCardList8_15: weatherCalendarCardList8_15,
  452. weatherCalendarCardList40: weatherCalendarCardList40,
  453. sPopup: sPopup,
  454. ThermometerCard: ThermometerCard,
  455. WeatherTemperatureWindSpeedCard_7: WeatherTemperatureWindSpeedCard_7
  456. },
  457. data() {
  458. return {
  459. userid:'',
  460. name:[],
  461. windId:[],
  462. socketTaskHourId:'',
  463. outThreeLineDrawerIsShow:false,
  464. badge: 22,
  465. modalName: null,
  466. inconList: ["form", "favor", "question", "edit"],
  467. address: '宁夏新能源公司',
  468. weatherTodaybutton: true,
  469. weatherSevendaybutton: false,
  470. weatherFromeighttofifteendaysbutton: false,
  471. weatherFortydaysbutton: false,
  472. windStationName: '',
  473. showCenterVisible: false,
  474. windStation: [],
  475. choiceIndex: -1,
  476. clickFlag: 'jieRu',
  477. cardCur: 0,
  478. spopupWrapperHeight: "",
  479. windStationListHeight: '',
  480. drawerList: [
  481. {
  482. "name": "地图监视"
  483. }
  484. ],
  485. plusDrawerList: [],
  486. utils: utils,
  487. margintop: '',
  488. margintopThree: '',
  489. messageTop: '',
  490. // 直接使用需要进行声明
  491. // 直接使用需要进行声明 End
  492. date: '2020/03/27 08:00:00',
  493. timestamp: "",
  494. option: '',
  495. cuIconList: [{
  496. cuIcon: 'weather',
  497. color: 'white',
  498. name: '天气',
  499. }, {
  500. cuIcon: 'maxTemperature',
  501. color: 'white',
  502. name: '最高温度',
  503. }, {
  504. cuIcon: 'minTemperature',
  505. color: 'white',
  506. name: '最低温度',
  507. }, {
  508. cuIcon: 'sunRise',
  509. color: 'white',
  510. name: '日出',
  511. }, {
  512. cuIcon: 'sunSet',
  513. color: 'white',
  514. name: '日落',
  515. }, {
  516. cuIcon: 'sunDuration',
  517. color: 'white',
  518. name: '持续时间',
  519. }, {
  520. cuIcon: 'dayWeather',
  521. color: 'white',
  522. name: '白气象',
  523. }, {
  524. cuIcon: 'dayTemperature',
  525. color: 'white',
  526. name: '白气温',
  527. }, {
  528. cuIcon: 'dayRealFeel',
  529. color: 'white',
  530. name: '白体感',
  531. }, {
  532. cuIcon: 'dayPrecipitation',
  533. color: 'white',
  534. name: '白降水',
  535. }, {
  536. cuIcon: 'dayWindDirection',
  537. color: 'white',
  538. name: '白风向',
  539. }, {
  540. cuIcon: 'dayWindSpeed',
  541. color: 'white',
  542. name: '白风速',
  543. }, {
  544. cuIcon: 'dayGust',
  545. color: 'white',
  546. name: '白阵风速',
  547. }, {
  548. cuIcon: 'nightWeather',
  549. color: 'white',
  550. name: '夜气象',
  551. }, {
  552. cuIcon: 'nightTemperature',
  553. color: 'white',
  554. name: '夜温度',
  555. }, {
  556. cuIcon: 'nightRealFeel',
  557. color: 'white',
  558. name: '夜体感',
  559. }, {
  560. cuIcon: 'nightPrecipitation',
  561. color: 'white',
  562. name: '夜降水',
  563. }, {
  564. cuIcon: 'nightWindDirection',
  565. color: 'white',
  566. name: '夜风向',
  567. }, {
  568. cuIcon: 'nightWindSpeed',
  569. color: 'white',
  570. name: '夜风速',
  571. }, {
  572. cuIcon: 'nightGust',
  573. color: 'white',
  574. name: '夜阵风速',
  575. }],
  576. gridCol: 4,
  577. gridBorder: false,
  578. weatherProphetDataAll_17Hour: [],
  579. weatherProphetData_17Hour: [{
  580. date: '',
  581. id: '',
  582. realfeel: '',
  583. region: '',
  584. speed: '',
  585. temperature: '',
  586. weather: '',
  587. winddirection: '',
  588. windpowerstationid: ''
  589. }],
  590. weatherProphetDataAll_1: [],
  591. weatherProphetData_1: [{
  592. weather1: '',
  593. gust1: '',
  594. gust2: '',
  595. id: '',
  596. maximumtem: '',
  597. minimumtem: '',
  598. precipitation1: "",
  599. precipitation2: '',
  600. realfeel1: '',
  601. realfeel1: '',
  602. recodedata: '',
  603. region: '',
  604. speed1: '',
  605. speed2: '',
  606. sunduration: "",
  607. sunrise: '',
  608. sunset: '',
  609. temperature1: '',
  610. temperature2: '',
  611. weather: '',
  612. weather1: '',
  613. weather2: "",
  614. winddirection1: '',
  615. winddirection2: '',
  616. windpowerstationid: '',
  617. }],
  618. weatherSwitch: true,
  619. FDC: "MHS_FDC",
  620. windPowerStations: [],
  621. widthToday: '',
  622. heightToday: '',
  623. width: '',
  624. height: '',
  625. windowWidth: "",
  626. windowHeight: "",
  627. windowWidth7: "",
  628. windowHeight7:"",
  629. windowWidth8_15: "",
  630. windowHeight8_15:"",
  631. windowWidth40: "",
  632. windowHeight40:"",
  633. ziHeight: '',
  634. fontSize: '',
  635. xianHeight: '',
  636. marginleftBiao: '',
  637. scrollHeight: '',
  638. choiceFontSize: "",
  639. choiceMarginTop: "",
  640. xAxisFontSize: "",
  641. seriesTextSize: "",
  642. cardWidth: "",
  643. cardHeight: "",
  644. isToday: false,
  645. scrollposition: 0,
  646. weatherProphetDataAll_8_15: [],
  647. weatherProphetData_8_15: [],
  648. socket: "",
  649. startDate: "",
  650. isCard: false,
  651. endDate: "",
  652. cWidth: '',
  653. cHeight: '',
  654. cWidth40: '',
  655. cHeight40: '',
  656. pixelRatio: 1,
  657. pixelRatio40: 1,
  658. realFeelFlag: true,
  659. temperatureFlag: false,
  660. speedFlag: false,
  661. tabCur: 0,
  662. mainCur: 0,
  663. scrollposition_uCharts: 0,
  664. scrollposition_list: 0,
  665. isCard40: false,
  666. weatherProphetData_40: [],
  667. weatherProphetDataAll_40: [],
  668. startDate40: "",
  669. endDate40: "",
  670. realFeelFlag40: true,
  671. temperatureFlag40: false,
  672. speedFlag40: false,
  673. tabCur40: 0,
  674. mainCur40: 0,
  675. choiceFontSize40: "",
  676. choiceMarginTop40: "",
  677. xAxisFontSize40: "",
  678. seriesTextSize40: "",
  679. cardWidth40: "",
  680. cardHeight40: "",
  681. scrollListHeight40: "",
  682. socketTask8_15: '',
  683. socketTask40: '',
  684. socketTask: '',
  685. weatherInformation: {},
  686. cuIconList7: [{
  687. cuIcon: 'weather',
  688. color: 'white',
  689. name: '天气',
  690. }, {
  691. cuIcon: 'maxTemperature',
  692. color: 'white',
  693. name: '最高温度',
  694. }, {
  695. cuIcon: 'minTemperature',
  696. color: 'white',
  697. name: '最低温度',
  698. }, {
  699. cuIcon: 'sunRise',
  700. color: 'white',
  701. name: '日出',
  702. }, {
  703. cuIcon: 'sunSet',
  704. color: 'white',
  705. name: '日落',
  706. }, {
  707. cuIcon: 'sunDuration',
  708. color: 'white',
  709. name: '持续时间',
  710. }, {
  711. cuIcon: 'dayWeather',
  712. color: 'white',
  713. name: '白气象',
  714. }, {
  715. cuIcon: 'dayTemperature',
  716. color: 'white',
  717. name: '白气温',
  718. }, {
  719. cuIcon: 'dayRealFeel',
  720. color: 'white',
  721. name: '白体感',
  722. }, {
  723. cuIcon: 'dayPrecipitation',
  724. color: 'white',
  725. name: '白降水',
  726. }, {
  727. cuIcon: 'dayWindDirection',
  728. color: 'white',
  729. name: '白风向',
  730. }, {
  731. cuIcon: 'dayWindSpeed',
  732. color: 'white',
  733. name: '白风速',
  734. }, {
  735. cuIcon: 'dayGust',
  736. color: 'white',
  737. name: '白阵风速',
  738. }, {
  739. cuIcon: 'nightWeather',
  740. color: 'white',
  741. name: '夜气象',
  742. }, {
  743. cuIcon: 'nightTemperature',
  744. color: 'white',
  745. name: '夜温度',
  746. }, {
  747. cuIcon: 'nightRealFeel',
  748. color: 'white',
  749. name: '夜体感',
  750. }, {
  751. cuIcon: 'nightPrecipitation',
  752. color: 'white',
  753. name: '夜降水',
  754. }, {
  755. cuIcon: 'nightWindDirection',
  756. color: 'white',
  757. name: '夜风向',
  758. }, {
  759. cuIcon: 'nightWindSpeed',
  760. color: 'white',
  761. name: '夜风速',
  762. }, {
  763. cuIcon: 'nightGust',
  764. color: 'white',
  765. name: '夜阵风速',
  766. }],
  767. assemblyWidth7: '',
  768. assemblyHeight7: '',
  769. weatherSwitch7: true,
  770. weatherProphetDataAll_7: [],
  771. weatherProphetData_7: [],
  772. weatherIconsDay7: [],
  773. weatherIconsNight7: [],
  774. classNameDay7: [],
  775. classNameNight7: [],
  776. height7: "",
  777. width7: "",
  778. ziHeight7: '',
  779. fontSize7: '',
  780. xianHeight7: '',
  781. nightmarginleft7: '',
  782. socketTask7: '',
  783. userCanviewthewindfarm:[]
  784. }
  785. },
  786. created: function() {
  787. // this.pushWindPowerStationNameToSessionStorage("麻黄山");
  788. this.viewUserid();
  789. this.address = this.getWindPowerStationNameToSessionStorage();
  790. this.windPowerStationId = uni.getStorageSync('windPowerStationId');
  791. this.FDC= uni.getStorageSync('windPowerStationId');
  792. if (this.address == '宁夏新能源公司') {
  793. this.FDC = 'MHS_FDC';
  794. }
  795. if (this.address == '河北能源集团') {
  796. this.FDC = 'CL_FDC';
  797. }
  798. uni.setStorageSync('windPowerStationId',this.FDC);
  799. this.$nextTick(function() {
  800. this.getWeatherDataToday();
  801. this.getWeatherData7();
  802. });
  803. this.cWidth = uni.upx2px(2000);
  804. this.cHeight = uni.upx2px(350);
  805. this.cWidth40 = uni.upx2px(5000);
  806. this.cHeight40 = uni.upx2px(350);
  807. if (this.address == '宁夏新能源公司') {
  808. this.windStation = ['麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
  809. this.windStationName = this.windStation[0].replace('风电场', '');
  810. // this.windPowerStationId = 'MHS_FDC';
  811. // this.getWeatherDataToday();
  812. }
  813. if (this.address == '麻黄山风电场') {
  814. this.windStation = ['麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
  815. this.windStationName = this.windStation[0].replace('风电场', '');
  816. // this.windPowerStationId = 'MHS_FDC';
  817. // this.getWeatherDataToday();
  818. }
  819. if (this.address == '牛首山风电场') {
  820. this.windStation = ['牛首山风电场', '麻黄山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
  821. this.windStationName = this.windStation[0].replace('风电场', '');
  822. // this.windPowerStationId = 'NSS_FDC';
  823. // this.getWeatherDataToday();
  824. }
  825. if (this.address == '石板泉风电场') {
  826. this.windStation = ['石板泉风电场', '麻黄山风电场', '牛首山风电场', '青山风电场', '香山风电场'];
  827. this.windStationName = this.windStation[0].replace('风电场', '');
  828. // this.windPowerStationId = 'SBQ_FDC';
  829. // this.getWeatherDataToday();
  830. }
  831. if (this.address == '香山风电场') {
  832. this.windStation = ['香山风电场', '麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场'];
  833. this.windStationName = this.windStation[0].replace('风电场', '');
  834. // this.windPowerStationId = 'XS_FDC';
  835. // this.getWeatherDataToday();
  836. }
  837. if (this.address == '青山风电场') {
  838. this.windStation = ['青山风电场', '麻黄山风电场', '牛首山风电场', '石板泉风电场', '香山风电场'];
  839. this.windStationName = this.windStation[0].replace('风电场', '');
  840. // this.windPowerStationId = 'QS_FDC';
  841. // this.getWeatherDataToday();
  842. }if (this.address == '河北能源集团') {
  843. this.windStation = ['崇礼风电场', '康保风电场', '代县风电场'];
  844. this.windStationName = this.windStation[0].replace('风电场', '');
  845. // this.windPowerStationId = 'QS_FDC';
  846. // this.getWeatherDataToday();
  847. }
  848. if (this.address == '崇礼风电场') {
  849. this.windStation = ['崇礼风电场', '康保风电场', '代县风电场'];
  850. this.windStationName = this.windStation[0].replace('风电场', '');
  851. // this.windPowerStationId = 'QS_FDC';
  852. // this.getWeatherDataToday();
  853. }
  854. if (this.address == '康保风电场') {
  855. this.windStation = ['康保风电场', '崇礼风电场', '代县风电场'];
  856. this.windStationName = this.windStation[0].replace('风电场', '');
  857. // this.windPowerStationId = 'QS_FDC';
  858. // this.getWeatherDataToday();
  859. }
  860. if (this.address == '代县风电场') {
  861. this.windStation = ['代县风电场', '康保风电场', '崇礼风电场'];
  862. this.windStationName = this.windStation[0].replace('风电场', '');
  863. // this.windPowerStationId = 'QS_FDC';
  864. // this.getWeatherDataToday();
  865. }
  866. this.windStationListHeight = this.windStation.length * 50 + 40 + 'px';
  867. this.spopupWrapperHeight = this.windStation.length * 50 + 90 + 'px';
  868. this.windowWidth = uni.getSystemInfoSync().windowWidth;
  869. this.windowHeight = uni.getSystemInfoSync().windowHeight;
  870. if (this.windowWidth >= 768) {
  871. this.margintop="60px";
  872. this.margintopThree="80px";
  873. this.messageTop="10px";
  874. this.fontSize="18px";
  875. this.xianHeight="168px";
  876. this.marginleftBiao="50px";
  877. } else {
  878. this.margintop="10px";
  879. this.margintopThree="10px";
  880. this.fontSize="14px";
  881. this.xianHeight="92px";
  882. this.marginleftBiao="26px";
  883. }
  884. this.heightToday = parseInt(uni.getSystemInfoSync().windowHeight - 450) + "px";
  885. this.widthToday = parseInt(uni.getSystemInfoSync().windowWidth) + "px";
  886. this.windowWidth7 = uni.getSystemInfoSync().windowWidth;
  887. this.windowHeight7 = uni.getSystemInfoSync().windowHeight;
  888. if(this.windowWidth7>=768){
  889. this.margintop7="60px";
  890. this.margintopThree7="80px";
  891. this.messageTop7="10px";
  892. this.fontSize7="18px";
  893. this.xianHeight7="168px";
  894. this.nightmarginleft7="20px";
  895. }else{
  896. this.margintop7="10px";
  897. this.margintopThree7="10px";
  898. this.fontSize7="14px";
  899. this.xianHeight7="92px";
  900. this.nightmarginleft7="20px";
  901. }
  902. this.height7 = parseInt(uni.getSystemInfoSync().windowHeight - 450) + "px";
  903. this.width7 = parseInt(uni.getSystemInfoSync().windowWidth) + "px";
  904. this.windowWidth8_15 = uni.getSystemInfoSync().windowWidth;
  905. this.windowHeight8_15 = uni.getSystemInfoSync().windowHeight;
  906. if(this.windowWidth8_15>=768){
  907. this.width="99";
  908. this.choiceFontSize="22px";
  909. this.choiceMarginTop="27.5px";
  910. this.xAxisFontSize=18;
  911. this.seriesTextSize=18;
  912. this.cardWidth=100;
  913. this.cardHeight=130;
  914. this.scrollHeight=(this.windowHeight8_15-550)+"px";
  915. }
  916. else{
  917. this.width="100";
  918. this.choiceFontSize="15px";
  919. this.choiceMarginTop="0";
  920. this.xAxisFontSize=12;
  921. this.seriesTextSize=12;
  922. this.cardWidth=100;
  923. this.cardHeight=100;
  924. this.scrollHeight=(this.windowHeight8_15-360)+"px";
  925. }
  926. this.windowWidth40 = uni.getSystemInfoSync().windowWidth;
  927. this.windowHeight40 = uni.getSystemInfoSync().windowHeight;
  928. if(this.windowWidth40>=768){
  929. this.choiceFontSize40="22px";
  930. this.choiceMarginTop40="27.5px";
  931. this.xAxisFontSize40=18;
  932. this.seriesTextSize40=18;
  933. this.cardWidth40=100;
  934. this.cardHeight40=130;
  935. this.scrollListHeight40=(this.windowHeight40-550)+"px";
  936. }else{
  937. this.choiceFontSize40="15px";
  938. this.choiceMarginTop40="0";
  939. this.xAxisFontSize40=12;
  940. this.seriesTextSize40=12;
  941. this.cardWidth40=100;
  942. this.cardHeight40=100;
  943. this.scrollListHeight40=(this.windowHeight40-360)+"px";
  944. }
  945. },
  946. onShow() {
  947. this.windPowerStationId = uni.getStorageSync('windPowerStationId');
  948. this.address = this.getWindPowerStationNameToSessionStorage();
  949. if (this.address == '宁夏新能源公司') {
  950. this.FDC = 'MHS_FDC';
  951. }
  952. if (this.address == '麻黄山风电场') {
  953. this.FDC = 'MHS_FDC';
  954. }
  955. if (this.address == '牛首山风电场') {
  956. this.FDC = 'NSS_FDC';
  957. }
  958. if (this.address == '石板泉风电场') {
  959. this.FDC = 'SBQ_FDC';
  960. }
  961. if (this.address == '青山风电场') {
  962. this.FDC = 'QS_FDC';
  963. }
  964. if (this.address == '香山风电场') {
  965. this.FDC = 'XS_FDC';
  966. }
  967. if (this.address == '河北能源集团') {
  968. this.FDC = 'CL_FDC';
  969. }
  970. if (this.address == '崇礼风电场') {
  971. this.FDC = 'CL_FDC';
  972. }
  973. if (this.address == '康保风电场') {
  974. this.FDC = 'KB_FDC';
  975. }
  976. if (this.address == '代县风电场') {
  977. this.FDC = 'DX_FDC';
  978. }
  979. this.getWeatherData();
  980. this.getWeatherDataToday();
  981. this.getWeatherData7();
  982. },
  983. onLoad: function() {
  984. this.address = this.getWindPowerStationNameToSessionStorage();
  985. this.cWidth = uni.upx2px(2000);
  986. this.cHeight = uni.upx2px(350);
  987. this.getServerData();
  988. this.cWidth40 = uni.upx2px(5000);
  989. this.cHeight40 = uni.upx2px(350);
  990. this.getServerData40();
  991. },
  992. onHide() {
  993. debugger
  994. //this.$refs.drawer.closeDrawer();
  995. this.hideModal();
  996. },
  997. computed: {
  998. backStageIp: function() {
  999. return this.$store.state.wholeSituationBackStageIp;
  1000. },
  1001. backStagePort: function() {
  1002. return this.$store.state.wholeSituationBackStagePort;
  1003. },
  1004. windpowerstationNameToId: function() {
  1005. return this.$store.state.windpowerstationNameToId;
  1006. }
  1007. },
  1008. methods: {
  1009. viewUserid:function(){
  1010. let _this = this;
  1011. _this.userid =uni.getStorageSync('userid')
  1012. //_this.userid = sessionStorage.getItem('userid');
  1013. uni.request({
  1014. url: 'http://' + this.backStageIp + ':' + this.backStagePort + '/GyeeorganController/GyeeOrganList?userid=' + _this.userid,
  1015. data: {},
  1016. method: 'GET',
  1017. success: function(res) {
  1018. for(let i=0;i<res.data.data.length;i++){
  1019. // _this.name.push(res.data.data[i].describes);
  1020. // _this.windId.push(res.data.data[i].name);
  1021. }
  1022. for(let j=0;j<res.data.data.length;j++){
  1023. var a = {};
  1024. _this.$set(a,"name",res.data.data[j].describes);
  1025. _this.$set(a,"windId",res.data.data[j].name);
  1026. _this.plusDrawerList.push(a);
  1027. }
  1028. },
  1029. })
  1030. },
  1031. openDrawer: function() {
  1032. this.outThreeLineDrawerIsShow=true;
  1033. this.$refs.drawer.openDrawer(250, this.drawerList, this.inconList);
  1034. },
  1035. closeDrawer: function() {
  1036. this.drawerIsShow = false;
  1037. },
  1038. showModal(e) {
  1039. this.modalName = e.currentTarget.dataset.target;
  1040. this.$refs.plusDrawer.showModal(this.plusDrawerList, this.modalName);
  1041. },
  1042. hideModal() {
  1043. this.modalName = null;
  1044. this.$refs.plusDrawer.hideModal(this.modalName);
  1045. this.choiceIndex = -1;
  1046. },
  1047. onHide() {
  1048. debugger
  1049. //this.$refs.drawer.closeDrawer();
  1050. this.hideModal();
  1051. },
  1052. choiceWindStation: function(item, index) {
  1053. this.choiceIndex = index;
  1054. this.windStationName = item.replace('风电场', '');
  1055. this.modalWindStationName = item.replace('风电场', '');
  1056. this.address = item;
  1057. this.pushWindPowerStationNameToSessionStorage(item);
  1058. let _this = this;
  1059. setTimeout(function() {
  1060. // _this.hideModal();
  1061. _this.showCenterVisible = false;
  1062. _this.choiceIndex = -1;
  1063. _this.cardCur = index;
  1064. }, 1000);
  1065. if (this.windStationName == '麻黄山') {
  1066. this.FDC = 'MHS_FDC';
  1067. }
  1068. if (this.windStationName == '牛首山') {
  1069. this.FDC = 'NSS_FDC';
  1070. }
  1071. if (this.windStationName == '石板泉') {
  1072. this.FDC = 'SBQ_FDC';
  1073. }
  1074. if (this.windStationName == '青山') {
  1075. this.FDC = 'QS_FDC';
  1076. }
  1077. if (this.windStationName == '香山') {
  1078. this.FDC = 'XS_FDC';
  1079. }
  1080. if (this.windStationName == '崇礼') {
  1081. this.FDC = 'CL_FDC';
  1082. }
  1083. if (this.windStationName == '康保') {
  1084. this.FDC = 'KB_FDC';
  1085. }
  1086. if (this.windStationName == '代县') {
  1087. this.FDC = 'YMG_FDC';
  1088. }
  1089. uni.setStorageSync('windPowerStationId',this.FDC);
  1090. if (this.weatherTodaybutton == true) {
  1091. this.getWeatherDataToday();
  1092. }
  1093. if (this.weatherSevendaybutton == true) {
  1094. this.getWeatherData7();
  1095. }
  1096. if (this.weatherFromeighttofifteendaysbutton == true) {
  1097. this.getWeatherData();
  1098. }
  1099. if (this.weatherFortydaysbutton == true) {
  1100. this.getWeatherData40();
  1101. }
  1102. },
  1103. cardSwiper(e) {
  1104. let _this = this;
  1105. this.cardCur = e.detail.current;
  1106. for (let i = 0; i < this.windStation.length; i++) {
  1107. if (this.cardCur == i) {
  1108. if (this.address == '宁夏新能源公司' || this.address == '河北能源集团' ) {
  1109. this.windStationName = this.windStation[i].replace('风电场', '');
  1110. this.modalWindStationName = this.windStation[i].replace('风电场', '');
  1111. }
  1112. if (this.address.search('风电场') != -1) {
  1113. if (this.windStation[i].search('风电场') != -1) {
  1114. this.windStationName = this.windStation[i].replace('风电场', '');
  1115. } else {
  1116. this.windStationName = this.windStation[i];
  1117. }
  1118. this.modalWindStationName = this.windStation[i];
  1119. }
  1120. this.windMotorMatrixDetailAll = this.windMotorMatrixDetailMaHuagShan;
  1121. this.getWindMotorStatusCard();
  1122. this.clickWindMotorStatusCard(this.clickFlag);
  1123. this.getBackgroundColor();
  1124. this.showCardModal('Modal');
  1125. setTimeout(function() {
  1126. _this.hideCardModal();
  1127. }, 1000);
  1128. }
  1129. }
  1130. },
  1131. pushWindPowerStationNameToSessionStorage(windpowerstationName) {
  1132. uni.setStorageSync('windpowerstationName', windpowerstationName);
  1133. //sessionStorage.setItem('windpowerstationName', windpowerstationName);
  1134. //alert("v"+ sessionStorage.getItem("windpowerstationName"));
  1135. //this.common.goback('/pages/index/Index');
  1136. },
  1137. getWindPowerStationNameToSessionStorage() {
  1138. uni.getStorageSync('windpowerstationName');
  1139. return uni.getStorageSync('windpowerstationName');
  1140. },
  1141. getWeatherDataToday: function() {
  1142. //得到数据
  1143. let _this = this;
  1144. // 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
  1145. // 按小时数据
  1146. this.socketTaskHour = uni.connectSocket({
  1147. // 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
  1148. url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_3/functionNumber_2',
  1149. success(data) {
  1150. console.log("websocket连接成功");
  1151. },
  1152. });
  1153. // 今天数据
  1154. this.socketTaskToday = uni.connectSocket({
  1155. // 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
  1156. url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_2/functionNumber_1',
  1157. success(data) {
  1158. console.log("websocket连接成功");
  1159. },
  1160. });
  1161. this.socketTaskToday.onOpen((res) => {
  1162. console.log("WebSocket连接正常打开中...!");
  1163. this.is_open_socket = true;
  1164. // 注:只有连接正常打开中 ,才能正常收到消息
  1165. this.socketTaskToday.onMessage((res) => {
  1166. //console.log("收到服务器内容:" + res.data);
  1167. _this.weatherProphetDataAll_1 = res.data;
  1168. _this.weatherProphetDataAll_1 = JSON.parse(res.data);
  1169. _this.weatherProphetData_1 = [];
  1170. //判断风场id 40天
  1171. //debugger
  1172. for (let i = 0; i < _this.weatherProphetDataAll_1.length; i++) {
  1173. if (_this.weatherProphetDataAll_1[i].windpowerstationid == _this.FDC) {
  1174. //debugger
  1175. _this.weatherProphetData_1.push(_this.weatherProphetDataAll_1[i]);
  1176. }
  1177. }
  1178. _this.$nextTick(function() {
  1179. if (_this.$refs.thermometerCard == undefined) {
  1180. } else {
  1181. _this.$refs.thermometerCard.getHourWeatherData("90", "260", _this.weatherProphetData_17Hour, _this.weatherProphetData_1);
  1182. }
  1183. })
  1184. });
  1185. })
  1186. // 消息的发送和接收必须在正常连接打开中,才能发送或接收【否则会失败】
  1187. this.socketTaskHour.onOpen((res) => {
  1188. console.log("WebSocket连接正常打开中...!");
  1189. this.is_open_socket = true;
  1190. // 注:只有连接正常打开中 ,才能正常收到消息
  1191. this.socketTaskHour.onMessage((res) => {
  1192. //console.log("收到服务器内容:" + res.data);
  1193. _this.weatherProphetDataAll_17Hour = res.data;
  1194. _this.weatherProphetDataAll_17Hour = JSON.parse(res.data);
  1195. if(_this.weatherProphetDataAll_17Hour.length!=0)
  1196. {
  1197. _this.weatherProphetData_17Hour = [];
  1198. //判断风场id 40天
  1199. for (let i1 = 0; i1 < _this.weatherProphetDataAll_17Hour.length; i1++) {
  1200. if (_this.weatherProphetDataAll_17Hour[i1].windpowerstationid == _this.FDC) {
  1201. //debugger
  1202. _this.weatherProphetData_17Hour.push(_this.weatherProphetDataAll_17Hour[i1]);
  1203. }
  1204. }
  1205. // console.log(_this.weatherProphetData_17Hour)
  1206. _this.$nextTick(function() {
  1207. if (_this.$refs.thermometerCard == undefined) {
  1208. } else {
  1209. _this.$refs.thermometerCard.getHourWeatherData("90", "260", _this.weatherProphetData_17Hour, _this.weatherProphetData_1);
  1210. }
  1211. })
  1212. }
  1213. });
  1214. })
  1215. // 这里仅是事件监听【如果socket关闭了会执行】
  1216. this.socketTaskHour.onClose(() => {
  1217. console.log("已经被关闭了")
  1218. })
  1219. this.socketTaskToday.onClose(() => {
  1220. console.log("已经被关闭了")
  1221. })
  1222. },
  1223. getWeatherData7: function() {
  1224. let _this = this;
  1225. // 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
  1226. this.socketTask7 = uni.connectSocket({
  1227. // 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
  1228. url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_3/functionNumber_1',
  1229. success(data) {
  1230. console.log("websocket连接成功");
  1231. },
  1232. });
  1233. // 消息的发送和接收必须在正常连接打开中,才能发送或接收【否则会失败】
  1234. this.socketTask7.onOpen((res) => {
  1235. console.log("WebSocket连接正常打开中...!");
  1236. this.is_open_socket = true;
  1237. // 注:只有连接正常打开中 ,才能正常收到消息
  1238. this.socketTask7.onMessage((res) => {
  1239. //console.log("收到服务器内容:" + res.data);
  1240. _this.weatherProphetDataAll_7 = res.data;
  1241. _this.weatherProphetDataAll_7 = JSON.parse(res.data);
  1242. _this.weatherProphetData_7 = [];
  1243. //判断风场id 40天
  1244. for (let i = 0; i < _this.weatherProphetDataAll_7.length; i++) {
  1245. if (_this.weatherProphetDataAll_7[i].windpowerstationid == _this.FDC) {
  1246. _this.weatherProphetData_7.push(_this.weatherProphetDataAll_7[i]);
  1247. }
  1248. }
  1249. // console.log(_this.weatherProphetData_7);
  1250. if (_this.$refs.WeatherTemperatureWindSpeedCard_7 == undefined) {
  1251. } else {
  1252. _this.$refs.WeatherTemperatureWindSpeedCard_7.weatherInformationCard('110', '100', _this.classNameDay7,
  1253. _this
  1254. .classNameNight7,
  1255. _this.weatherProphetData_7);
  1256. }
  1257. });
  1258. })
  1259. // 这里仅是事件监听【如果socket关闭了会执行】
  1260. this.socketTask7.onClose(() => {
  1261. console.log("已经被关闭了")
  1262. })
  1263. },
  1264. weatherDayNightSwitch: function(flag) {
  1265. if (flag == "day") {
  1266. this.weatherSwitch = true;
  1267. } else if (flag == "night") {
  1268. this.weatherSwitch = false;
  1269. }
  1270. },
  1271. getWeatherData: function() {
  1272. let _this = this;
  1273. this.socketTask8_15 = uni.connectSocket({
  1274. // 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
  1275. url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_4/functionNumber_1',
  1276. success(data) {
  1277. console.log("websocket连接成功");
  1278. },
  1279. });
  1280. this.socketTask8_15.onOpen((res) => {
  1281. console.log("WebSocket连接正常打开中...!");
  1282. this.is_open_socket = true;
  1283. // 注:只有连接正常打开中 ,才能正常收到消息
  1284. this.socketTask8_15.onMessage((res) => {
  1285. _this.weatherProphetDataAll_8_15 = JSON.parse(res.data);
  1286. _this.weatherProphetData_8_15 = [];
  1287. //判断风场id 8~15天
  1288. for (let i = 0; i < _this.weatherProphetDataAll_8_15.length; i++) {
  1289. if (_this.weatherProphetDataAll_8_15[i].windpowerstationid == _this.FDC) {
  1290. _this.weatherProphetData_8_15.push(_this.weatherProphetDataAll_8_15[i]);
  1291. }
  1292. }
  1293. if (_this.$refs.weatherCalendarCardList8_15 == undefined) {
  1294. } else {
  1295. _this.$refs.weatherCalendarCardList8_15.getWeatherData(_this.width, "400", _this.weatherProphetData_8_15);
  1296. }
  1297. _this.getWeatherDataUchart();
  1298. })
  1299. })
  1300. this.socketTask8_15.onClose(() => {
  1301. console.log("已经被关闭了")
  1302. })
  1303. },
  1304. getWeatherDataUchart: function() {
  1305. let startMonth = new Date(this.weatherProphetData_8_15[0].recodedata).getMonth() + 1;
  1306. let startDay = new Date(this.weatherProphetData_8_15[0].recodedata).getDate();
  1307. this.startDate = startMonth + "月" + startDay + "日";
  1308. let endMonth = new Date(this.weatherProphetData_8_15[this.weatherProphetData_8_15.length - 1].recodedata).getMonth() +
  1309. 1;
  1310. let endDay = new Date(this.weatherProphetData_8_15[this.weatherProphetData_8_15.length - 1].recodedata).getDate();
  1311. this.endDate = endMonth + "月" + endDay + "日";
  1312. this.getServerData();
  1313. },
  1314. getWeatherData40: function() {
  1315. let _this = this;
  1316. // 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
  1317. this.socketTask40 = uni.connectSocket({
  1318. // 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
  1319. url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_5/functionNumber_1',
  1320. success(data) {
  1321. console.log("websocket连接成功");
  1322. },
  1323. });
  1324. // 消息的发送和接收必须在正常连接打开中,才能发送或接收【否则会失败】
  1325. this.socketTask40.onOpen((res) => {
  1326. console.log("WebSocket连接正常打开中...!");
  1327. this.is_open_socket = true;
  1328. // 注:只有连接正常打开中 ,才能正常收到消息
  1329. this.socketTask40.onMessage((res) => {
  1330. //console.log("收到服务器内容:" + res.data);
  1331. _this.weatherProphetDataAll_40 = res.data;
  1332. _this.weatherProphetDataAll_40 = JSON.parse(res.data);
  1333. _this.weatherProphetData_40 = [];
  1334. //判断风场id 40天
  1335. for (let i = 0; i < _this.weatherProphetDataAll_40.length; i++) {
  1336. if (_this.weatherProphetDataAll_40[i].windpowerstationid == _this.FDC) {
  1337. _this.weatherProphetData_40.push(_this.weatherProphetDataAll_40[i]);
  1338. }
  1339. }
  1340. //console.log(_this.weatherProphetData_40);
  1341. let startMonth40 = new Date(_this.weatherProphetData_40[0].recodedata).getMonth() + 1;
  1342. let startDay40 = new Date(_this.weatherProphetData_40[0].recodedata).getDate();
  1343. _this.startDate40 = startMonth40 + "月" + startDay40 + "日";
  1344. let endMonth40 = new Date(_this.weatherProphetData_40[_this.weatherProphetData_40.length - 1].recodedata).getMonth() +
  1345. 1;
  1346. let endDay40 = new Date(_this.weatherProphetData_40[_this.weatherProphetData_40.length - 1].recodedata).getDate();
  1347. _this.endDate40 = endMonth40 + "月" + endDay40 + "日";
  1348. if (_this.$refs.weatherCalendarCardList40 == undefined) {
  1349. } else {
  1350. _this.$refs.weatherCalendarCardList40.getWeatherData40(this.cardWidth40, this.cardHeight40, _this.weatherProphetData_40);
  1351. }
  1352. _this.getServerData40();
  1353. });
  1354. })
  1355. // 这里仅是事件监听【如果socket关闭了会执行】
  1356. this.socketTask40.onClose(() => {
  1357. console.log("已经被关闭了")
  1358. })
  1359. },
  1360. realFeelSwitch() {
  1361. this.realFeelFlag = true;
  1362. this.temperatureFlag = false;
  1363. this.speedFlag = false;
  1364. this.getServerData();
  1365. },
  1366. temperatureSwitch() {
  1367. this.realFeelFlag = false;
  1368. this.temperatureFlag = true;
  1369. this.speedFlag = false;
  1370. this.getServerData();
  1371. },
  1372. speedSwitch() {
  1373. this.realFeelFlag = false;
  1374. this.temperatureFlag = false;
  1375. this.speedFlag = true;
  1376. this.getServerData();
  1377. },
  1378. realFeelSwitch40() {
  1379. this.realFeelFlag40 = true;
  1380. this.temperatureFlag40 = false;
  1381. this.speedFlag40 = false;
  1382. this.getServerData40();
  1383. },
  1384. temperatureSwitch40() {
  1385. this.realFeelFlag40 = false;
  1386. this.temperatureFlag40 = true;
  1387. this.speedFlag40 = false;
  1388. this.getServerData40();
  1389. },
  1390. speedSwitch40() {
  1391. this.realFeelFlag40 = false;
  1392. this.temperatureFlag40 = false;
  1393. this.speedFlag40 = true;
  1394. this.getServerData40();
  1395. },
  1396. getServerData() {
  1397. let LineA = {
  1398. categories: ['02/21', '02/22', '02/23', '02/24', '02/25', '02/26', '02/27'],
  1399. series: [{
  1400. name: '体感温度',
  1401. data: [12, 13, 12, 11, 16, 14, 12],
  1402. color: '#F3F3F3',
  1403. textColor: '#FFFFFF',
  1404. textSize: this.seriesTextSize,
  1405. format: (val) => {
  1406. return val + '℃'
  1407. }
  1408. }, {
  1409. name: '温度',
  1410. data: [70, 40, 65, 100, 44, 68],
  1411. color: '#FFFFFF',
  1412. textColor: "#FFFFFF",
  1413. textSize: this.seriesTextSize,
  1414. format: (val) => {
  1415. return val + '℃'
  1416. }
  1417. }, {
  1418. name: '风速',
  1419. data: [100, 80, 95, 150, 112, 132],
  1420. color: '#FFFFFF',
  1421. textColor: "#FFFFFF",
  1422. textSize: this.seriesTextSize,
  1423. format: (val) => {
  1424. return val + 'km/h'
  1425. }
  1426. }]
  1427. };
  1428. LineA.categories = [];
  1429. LineA.series[0].data = [];
  1430. LineA.series[1].data = [];
  1431. LineA.series[2].data = [];
  1432. if (this.realFeelFlag) {
  1433. for (let i = 0; i < this.weatherProphetData_8_15.length; i++) {
  1434. let xAxisMonth = new Date(this.weatherProphetData_8_15[i].recodedata).getMonth() + 1;
  1435. let xAxisData = new Date(this.weatherProphetData_8_15[i].recodedata).getDate();
  1436. if (xAxisMonth < 10) {
  1437. xAxisMonth = "0" + xAxisMonth;
  1438. }
  1439. if (xAxisData < 10) {
  1440. xAxisData = "0" + xAxisData;
  1441. }
  1442. LineA.categories.push(xAxisMonth + '/' + xAxisData);
  1443. LineA.series[0].data.push(this.weatherProphetData_8_15[i].realfeel1);
  1444. }
  1445. } else if (this.temperatureFlag) {
  1446. for (let i = 0; i < this.weatherProphetData_8_15.length; i++) {
  1447. let xAxisMonth = new Date(this.weatherProphetData_8_15[i].recodedata).getMonth() + 1;
  1448. let xAxisData = new Date(this.weatherProphetData_8_15[i].recodedata).getDate();
  1449. if (xAxisMonth < 10) {
  1450. xAxisMonth = "0" + xAxisMonth;
  1451. }
  1452. if (xAxisData < 10) {
  1453. xAxisData = "0" + xAxisData;
  1454. }
  1455. LineA.categories.push(xAxisMonth + '/' + xAxisData);
  1456. LineA.series[1].data.push(this.weatherProphetData_8_15[i].temperature1);
  1457. }
  1458. } else if (this.speedFlag) {
  1459. for (let i = 0; i < this.weatherProphetData_8_15.length; i++) {
  1460. let xAxisMonth = new Date(this.weatherProphetData_8_15[i].recodedata).getMonth() + 1;
  1461. let xAxisData = new Date(this.weatherProphetData_8_15[i].recodedata).getDate();
  1462. if (xAxisMonth < 10) {
  1463. xAxisMonth = "0" + xAxisMonth;
  1464. }
  1465. if (xAxisData < 10) {
  1466. xAxisData = "0" + xAxisData;
  1467. }
  1468. LineA.categories.push(xAxisMonth + '/' + xAxisData);
  1469. LineA.series[2].data.push(this.weatherProphetData_8_15[i].speed1);
  1470. }
  1471. }
  1472. //LineA.categories=res.data.data.LineA.categories;
  1473. // LineA.series=res.data.data.LineA.series;
  1474. this.showLineA("canvasLineA", LineA);
  1475. },
  1476. showLineA(canvasId, chartData) {
  1477. var _self = this;
  1478. var canvaLineA = new uCharts({
  1479. $this: _self,
  1480. canvasId: canvasId,
  1481. type: 'line',
  1482. fontSize: 11,
  1483. legend: {
  1484. show: false
  1485. },
  1486. dataLabel: true,
  1487. dataPointShape: true,
  1488. background: '#FFFFFF',
  1489. pixelRatio: _self.pixelRatio,
  1490. categories: chartData.categories,
  1491. series: chartData.series,
  1492. animation: true,
  1493. xAxis: {
  1494. disableGrid: true,
  1495. type: 'grid',
  1496. fontColor: '#FFFFFF',
  1497. gridColor: '#FFFFFF',
  1498. gridType: 'dash',
  1499. dashLength: 1,
  1500. fontSize: _self.xAxisFontSize
  1501. },
  1502. yAxis: {
  1503. disableGrid: true,
  1504. gridType: 'dash',
  1505. gridColor: '#CCCCCC',
  1506. dashLength: 1,
  1507. disabled: true,
  1508. splitNumber: 5,
  1509. min: -40,
  1510. max: 50,
  1511. },
  1512. width: _self.cWidth * _self.pixelRatio,
  1513. height: _self.cHeight * _self.pixelRatio,
  1514. extra: {
  1515. line: {
  1516. type: 'straight'
  1517. }
  1518. }
  1519. });
  1520. },
  1521. getServerData40() {
  1522. let LineA40 = {
  1523. categories: ['2012', '2013', '2014', '2015', '2016', '2017'],
  1524. series: [{
  1525. name: '体感温度',
  1526. data: [35, 20, 25, 37, 4, 20],
  1527. color: '#FFFFFF',
  1528. textColor: "#FFFFFF",
  1529. textSize: this.seriesTextSize40,
  1530. format: (val) => {
  1531. return val + '℃'
  1532. }
  1533. }, {
  1534. name: '温度',
  1535. data: [70, 40, 65, 100, 44, 68],
  1536. color: '#FFFFFF',
  1537. textColor: "#FFFFFF",
  1538. textSize: this.seriesTextSize40,
  1539. format: (val) => {
  1540. return val + '℃'
  1541. }
  1542. }, {
  1543. name: '风速',
  1544. data: [100, 80, 95, 150, 112, 132],
  1545. color: '#FFFFFF',
  1546. textColor: "#FFFFFF",
  1547. textSize: this.seriesTextSize40,
  1548. format: (val) => {
  1549. return val + 'km/h'
  1550. }
  1551. }]
  1552. };
  1553. LineA40.categories = [];
  1554. LineA40.series[0].data = [];
  1555. LineA40.series[1].data = [];
  1556. LineA40.series[2].data = [];
  1557. if (this.realFeelFlag40) {
  1558. for (let i = 0; i < this.weatherProphetData_40.length; i++) {
  1559. let xAxisMonth40 = new Date(this.weatherProphetData_40[i].recodedata).getMonth() + 1;
  1560. let xAxisData40 = new Date(this.weatherProphetData_40[i].recodedata).getDate();
  1561. if (xAxisMonth40 < 10) {
  1562. xAxisMonth40 = "0" + xAxisMonth40;
  1563. }
  1564. if (xAxisData40 < 10) {
  1565. xAxisData40 = "0" + xAxisData40;
  1566. }
  1567. LineA40.categories.push(xAxisMonth40 + '/' + xAxisData40);
  1568. LineA40.series[0].data.push(this.weatherProphetData_40[i].realfeel1);
  1569. }
  1570. } else if (this.temperatureFlag40) {
  1571. for (let i = 0; i < this.weatherProphetData_40.length; i++) {
  1572. let xAxisMonth40 = new Date(this.weatherProphetData_40[i].recodedata).getMonth() + 1;
  1573. let xAxisData40 = new Date(this.weatherProphetData_40[i].recodedata).getDate();
  1574. if (xAxisMonth40 < 10) {
  1575. xAxisMonth40 = "0" + xAxisMonth40;
  1576. }
  1577. if (xAxisData40 < 10) {
  1578. xAxisData40 = "0" + xAxisData40;
  1579. }
  1580. LineA40.categories.push(xAxisMonth40 + '/' + xAxisData40);
  1581. LineA40.series[1].data.push(this.weatherProphetData_40[i].temperature1);
  1582. }
  1583. } else if (this.speedFlag40) {
  1584. for (let i = 0; i < this.weatherProphetData_40.length; i++) {
  1585. let xAxisMonth40 = new Date(this.weatherProphetData_40[i].recodedata).getMonth() + 1;
  1586. let xAxisData40 = new Date(this.weatherProphetData_40[i].recodedata).getDate();
  1587. if (xAxisMonth40 < 10) {
  1588. xAxisMonth40 = "0" + xAxisMonth40;
  1589. }
  1590. if (xAxisData40 < 10) {
  1591. xAxisData40 = "0" + xAxisData40;
  1592. }
  1593. LineA40.categories.push(xAxisMonth40 + '/' + xAxisData40);
  1594. LineA40.series[2].data.push(this.weatherProphetData_40[i].speed1);
  1595. }
  1596. }
  1597. this.showLineA40("canvasLineA40", LineA40);
  1598. },
  1599. showLineA40(canvasId, chartData) {
  1600. var _self = this;
  1601. var canvaLineA40 = new uCharts({
  1602. $this: _self,
  1603. canvasId: canvasId,
  1604. type: 'line',
  1605. fontSize: 11,
  1606. legend: {
  1607. show: false
  1608. }, //图例
  1609. dataLabel: true, //数据点标签
  1610. dataPointShape: true,
  1611. background: '#FFFFFF',
  1612. pixelRatio: _self.pixelRatio40,
  1613. categories: chartData.categories,
  1614. series: chartData.series,
  1615. animation: true,
  1616. xAxis: {
  1617. type: 'grid',
  1618. gridColor: '#CCCCCC',
  1619. gridType: 'dash',
  1620. dashLength: 8,
  1621. disableGrid: true, //网格线
  1622. axisLine: true, //x轴轴线
  1623. fontColor: "#FFFFFF",
  1624. fontSize: _self.xAxisFontSize40
  1625. },
  1626. yAxis: {
  1627. data: {
  1628. disabled: false //y轴轴线
  1629. },
  1630. disableGrid: true, //网格线
  1631. gridType: 'dash',
  1632. gridColor: '#CCCCCC',
  1633. dashLength: 8,
  1634. splitNumber: 5,
  1635. min: -40,
  1636. max: 50,
  1637. format: (val) => {
  1638. return val.toFixed(0) + '元'
  1639. }
  1640. },
  1641. width: _self.cWidth40 * _self.pixelRatio40,
  1642. height: _self.cHeight40 * _self.pixelRatio40,
  1643. padding: [0, 0, 10, -30], //画布填充边距,顺序为上右下左,同css,但必须4位
  1644. extra: {
  1645. line: {
  1646. type: 'curve' //曲线
  1647. }
  1648. }
  1649. });
  1650. },
  1651. uChartsScrollEvent(e) {
  1652. this.scrollposition = e.detail.scrollLeft;
  1653. // let scrollposition2 = scrollposition*0.98;
  1654. },
  1655. listScrollEvent(e) {
  1656. this.scrollposition = e.detail.scrollTop;
  1657. },
  1658. uChartsScrollEvent40(e) {
  1659. this.scrollposition_uCharts = e.detail.scrollLeft;
  1660. if (e.detail.scrollLeft < 237) {
  1661. this.scrollposition_list = 0;
  1662. } else if (e.detail.scrollLeft < 487 && e.detail.scrollLeft > 237) {
  1663. this.scrollposition_list = 104;
  1664. } else if (e.detail.scrollLeft < 737 && e.detail.scrollLeft > 487) {
  1665. this.scrollposition_list = 208;
  1666. } else if (e.detail.scrollLeft < 987 && e.detail.scrollLeft > 737) {
  1667. this.scrollposition_list = 312;
  1668. } else if (e.detail.scrollLeft < 1237 && e.detail.scrollLeft > 987) {
  1669. this.scrollposition_list = 416;
  1670. } else if (e.detail.scrollLeft < 1487 && e.detail.scrollLeft > 1237) {
  1671. this.scrollposition_list = 520;
  1672. } else if (e.detail.scrollLeft < 1737 && e.detail.scrollLeft > 1487) {
  1673. this.scrollposition_list = 624;
  1674. } else if (e.detail.scrollLeft > 1737) {
  1675. this.scrollposition_list = 656;
  1676. }
  1677. },
  1678. listScrollEvent40(e) {
  1679. this.scrollposition_list = e.detail.scrollTop;
  1680. if (e.detail.scrollTop < 104) {
  1681. this.scrollposition_uCharts = 0;
  1682. } else if (e.detail.scrollTop < 208 && e.detail.scrollTop > 104) {
  1683. this.scrollposition_uCharts = 237;
  1684. } else if (e.detail.scrollTop < 312 && e.detail.scrollTop > 208) {
  1685. this.scrollposition_uCharts = 487;
  1686. } else if (e.detail.scrollTop < 416 && e.detail.scrollTop > 312) {
  1687. this.scrollposition_uCharts = 737;
  1688. } else if (e.detail.scrollTop < 520 && e.detail.scrollTop > 416) {
  1689. this.scrollposition_uCharts = 987;
  1690. } else if (e.detail.scrollTop < 624 && e.detail.scrollTop > 520) {
  1691. this.scrollposition_uCharts = 1237;
  1692. } else if (e.detail.scrollTop < 656 && e.detail.scrollTop > 624) {
  1693. this.scrollposition_uCharts = 1487;
  1694. }
  1695. },
  1696. changeTap: function(item) {
  1697. this.weatherInformation = JSON.parse(item); //vue json转object
  1698. },
  1699. weatherDaySwitch7: function() {
  1700. this.weatherSwitch7 = true;
  1701. },
  1702. weatherNightSwitch7: function() {
  1703. this.weatherSwitch7 = false;
  1704. },
  1705. closeSocket: function() {
  1706. this.socket.onclose;
  1707. },
  1708. openSocket: function() {
  1709. this.socket.onOpen;
  1710. },
  1711. weatherToday() {
  1712. this.weatherSevendaybutton = false;
  1713. this.weatherFromeighttofifteendaysbutton = false;
  1714. this.weatherFortydaysbutton = false;
  1715. this.$nextTick(function() {
  1716. this.weatherTodaybutton = true;
  1717. this.getWeatherDataToday();
  1718. });
  1719. },
  1720. weatherSevenday() {
  1721. this.weatherTodaybutton = false;
  1722. this.weatherFromeighttofifteendaysbutton = false;
  1723. this.weatherFortydaysbutton = false;
  1724. this.$nextTick(function() {
  1725. this.weatherSevendaybutton = true;
  1726. this.getWeatherData7();
  1727. })
  1728. },
  1729. weatherFromeighttofifteendays() {
  1730. this.weatherTodaybutton = false;
  1731. this.weatherSevendaybutton = false;
  1732. this.weatherFortydaysbutton = false;
  1733. this.$nextTick(function() {
  1734. this.weatherFromeighttofifteendaysbutton = true;
  1735. this.getWeatherData();
  1736. })
  1737. },
  1738. weatherFortydays() {
  1739. this.weatherTodaybutton = false;
  1740. this.weatherSevendaybutton = false;
  1741. this.weatherFromeighttofifteendaysbutton = false;
  1742. this.$nextTick(function() {
  1743. this.weatherFortydaysbutton = true;
  1744. this.getWeatherData40();
  1745. })
  1746. },
  1747. },
  1748. }
  1749. </script>
  1750. <style>
  1751. body {
  1752. font-family: '方正兰亭细黑_GBK';
  1753. font-size: 12px;
  1754. color: silver;
  1755. background: #000;
  1756. }
  1757. @font-face {
  1758. font-family: '方正兰亭细黑_GBK';
  1759. src: url(../../static/fzltxh.TTF);
  1760. }
  1761. page {
  1762. background-color: #1f1f1f;
  1763. font-family: '方正兰亭细黑_GBK';
  1764. overflow-x: hidden;
  1765. overflow-y: hidden;
  1766. }
  1767. .notice {
  1768. width: 50px;
  1769. height: 45px;
  1770. float: left;
  1771. }
  1772. .icon{
  1773. font-size: 40upx;
  1774. }
  1775. .plus {
  1776. width: 30px;
  1777. height: 45px;
  1778. float: right;
  1779. color: white;
  1780. font-size: 35px;
  1781. line-height: 45px;
  1782. text-align: right;
  1783. margin-right: 2.5%;
  1784. }
  1785. .DrawerPage {
  1786. position: fixed;
  1787. width: 100vw;
  1788. height: 100vh;
  1789. left: 0vw;
  1790. background-color: #1f1f1f;
  1791. transition: all 0.4s;
  1792. }
  1793. .DrawerPage.show {
  1794. transform: scale(0.9, 0.9);
  1795. left: 85vw;
  1796. box-shadow: 0 0 60upx rgba(0, 0, 0, 0.2);
  1797. transform-origin: 0;
  1798. }
  1799. .DrawerWindow {
  1800. position: absolute;
  1801. width: 85vw;
  1802. height: 100vh;
  1803. left: 0;
  1804. top: 0;
  1805. transform: scale(0.9, 0.9) translateX(-100%);
  1806. opacity: 0;
  1807. pointer-events: none;
  1808. transition: all 0.4s;
  1809. padding: 100upx 0;
  1810. }
  1811. .DrawerWindow.show {
  1812. transform: scale(1, 1) translateX(0%);
  1813. opacity: 1;
  1814. pointer-events: all;
  1815. }
  1816. .DrawerClose {
  1817. position: absolute;
  1818. width: 40vw;
  1819. height: 100vh;
  1820. right: 0;
  1821. top: 0;
  1822. color: transparent;
  1823. padding-bottom: 30upx;
  1824. display: flex;
  1825. align-items: flex-end;
  1826. justify-content: center;
  1827. background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.6));
  1828. letter-spacing: 5px;
  1829. font-size: 50upx;
  1830. opacity: 0;
  1831. pointer-events: none;
  1832. transition: all 0.4s;
  1833. }
  1834. .DrawerClose.show {
  1835. opacity: 1;
  1836. pointer-events: all;
  1837. width: 15vw;
  1838. color: #fff;
  1839. }
  1840. .DrawerPage .cu-bar.tabbar .action button.cuIcon {
  1841. width: 64upx;
  1842. height: 64upx;
  1843. line-height: 64upx;
  1844. margin: 0;
  1845. display: inline-block;
  1846. }
  1847. .DrawerPage .cu-bar.tabbar .action .cu-avatar {
  1848. margin: 0;
  1849. }
  1850. .DrawerPage .nav {
  1851. flex: 1;
  1852. }
  1853. .DrawerPage .nav .cu-item.cur {
  1854. border-bottom: 0;
  1855. position: relative;
  1856. }
  1857. .DrawerPage .nav .cu-item.cur::after {
  1858. content: '';
  1859. width: 10upx;
  1860. height: 10upx;
  1861. background-color: currentColor;
  1862. position: absolute;
  1863. bottom: 10upx;
  1864. border-radius: 10upx;
  1865. left: 0;
  1866. right: 0;
  1867. margin: auto;
  1868. }
  1869. .DrawerPage .cu-bar.tabbar .action {
  1870. flex: initial;
  1871. }
  1872. .clickThedaystab {
  1873. width: 100%;
  1874. height: 40px;
  1875. background-color: #242424;
  1876. }
  1877. .weatherToday {
  1878. width: 25%;
  1879. height: 40px;
  1880. float: left;
  1881. text-align: center;
  1882. line-height: 40px;
  1883. color: #DEDFE3;
  1884. }
  1885. .weatherTodaywhite {
  1886. width: 25%;
  1887. height: 40px;
  1888. float: left;
  1889. text-align: center;
  1890. line-height: 40px;
  1891. color: white;
  1892. background-color: #3B3B3B;
  1893. }
  1894. .weatherSevenday {
  1895. width: 25%;
  1896. height: 40px;
  1897. float: left;
  1898. text-align: center;
  1899. line-height: 40px;
  1900. color: #DEDFE3;
  1901. }
  1902. .weatherSevendaywhite {
  1903. width: 25%;
  1904. height: 40px;
  1905. float: left;
  1906. text-align: center;
  1907. line-height: 40px;
  1908. color: white;
  1909. background-color: #3B3B3B;
  1910. }
  1911. .weatherFromeighttofifteendays {
  1912. width: 25%;
  1913. height: 40px;
  1914. float: left;
  1915. text-align: center;
  1916. line-height: 40px;
  1917. color: #DEDFE3;
  1918. }
  1919. .weatherFromeighttofifteendayswhite {
  1920. width: 25%;
  1921. height: 40px;
  1922. float: left;
  1923. text-align: center;
  1924. line-height: 40px;
  1925. color: white;
  1926. background-color: #3B3B3B;
  1927. }
  1928. .weatherFortydays {
  1929. width: 25%;
  1930. height: 40px;
  1931. float: left;
  1932. text-align: center;
  1933. line-height: 40px;
  1934. color: #DEDFE3;
  1935. }
  1936. .weatherFortydayswhite {
  1937. width: 25%;
  1938. height: 40px;
  1939. float: left;
  1940. text-align: center;
  1941. line-height: 40px;
  1942. color: white;
  1943. background-color: #3B3B3B;
  1944. }
  1945. .cardContenter {
  1946. border-radius: 20px;
  1947. margin-left: 20px;
  1948. width: 90%;
  1949. height: 450upx;
  1950. background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#024F93), color-stop(1.5, #cccccc), to(#437193));
  1951. background: rgba(0, 0, 0, 0.1);
  1952. }
  1953. .weather8_15 {
  1954. width: 100%;
  1955. height: 100upx;
  1956. }
  1957. .weather8_15_text {
  1958. width: 40%;
  1959. height: 100upx;
  1960. line-height: 100upx;
  1961. color: white;
  1962. margin-left: 5px;
  1963. float: left;
  1964. }
  1965. .leftInnerMatrix {
  1966. width: 100%;
  1967. height: 100%;
  1968. }
  1969. .qiun-charts {
  1970. width: 2000upx;
  1971. height: 350upx;
  1972. }
  1973. .charts {
  1974. width: 2000upx;
  1975. height: 350upx;
  1976. }
  1977. .choice {
  1978. width: calc(60% - 5px);
  1979. height: 100upx;
  1980. float: right;
  1981. }
  1982. .realFeelButtonWhite {
  1983. height: 37px;
  1984. line-height: 44px;
  1985. color: white;
  1986. font-size: 15px;
  1987. border-style: solid;
  1988. border-top-width: 0px;
  1989. border-right-width: 0px;
  1990. border-bottom-width: 3px;
  1991. border-bottom-color: #FFEE35;
  1992. border-left-width: 0px;
  1993. font-family: "microsoft yahei";
  1994. float: right;
  1995. }
  1996. .realFeelButtonBlack {
  1997. height: 37px;
  1998. line-height: 44px;
  1999. color: #DEDEDE;
  2000. font-size: 15px;
  2001. font-family: "microsoft yahei";
  2002. float: right;
  2003. }
  2004. .temperatureButtonWhite {
  2005. height: 37px;
  2006. line-height: 44px;
  2007. margin-left: 20px;
  2008. color: white;
  2009. font-size: 15px;
  2010. border-style: solid;
  2011. border-top-width: 0px;
  2012. border-right-width: 0px;
  2013. border-bottom-width: 3px;
  2014. border-bottom-color: #FFEE35;
  2015. border-left-width: 0px;
  2016. font-family: "microsoft yahei";
  2017. float: right;
  2018. }
  2019. .temperatureButtonBlack {
  2020. height: 37px;
  2021. line-height: 44px;
  2022. margin-left: 20px;
  2023. color: #DEDEDE;
  2024. font-size: 15px;
  2025. font-family: "microsoft yahei";
  2026. float: right;
  2027. }
  2028. .speedButtonWhite {
  2029. height: 37px;
  2030. line-height: 44px;
  2031. margin-left: 20px;
  2032. margin-right: 20px;
  2033. color: white;
  2034. font-size: 15px;
  2035. border-style: solid;
  2036. border-top-width: 0px;
  2037. border-right-width: 0px;
  2038. border-bottom-width: 3px;
  2039. border-bottom-color: #FFEE35;
  2040. border-left-width: 0px;
  2041. font-family: "microsoft yahei";
  2042. float: right;
  2043. }
  2044. .speedButtonBlack {
  2045. height: 37px;
  2046. line-height: 44px;
  2047. margin-left: 20px;
  2048. margin-right: 20px;
  2049. color: #DEDEDE;
  2050. font-size: 15px;
  2051. font-family: "microsoft yahei";
  2052. float: right;
  2053. }
  2054. .scrollUcharts {
  2055. white-space: nowrap;
  2056. }
  2057. .scrollList {
  2058. height: 380px;
  2059. }
  2060. .cardContenter40 {
  2061. border-radius: 20px;
  2062. margin-left: 20px;
  2063. width: 90%;
  2064. height: 450upx;
  2065. background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#024F93), color-stop(1.5, #cccccc), to(#437193));
  2066. background: rgba(0, 0, 0, 0.1);
  2067. }
  2068. .dateAndChoice {
  2069. width: 100%;
  2070. height: 100upx;
  2071. }
  2072. .date {
  2073. width: 40%;
  2074. height: 100upx;
  2075. line-height: 100upx;
  2076. color: white;
  2077. margin-left: 5px;
  2078. float: left;
  2079. }
  2080. .choice40 {
  2081. width: calc(60% - 5px);
  2082. height: 100upx;
  2083. float: right;
  2084. }
  2085. .realFeelButtonWhite40 {
  2086. height: 37px;
  2087. line-height: 44px;
  2088. color: white;
  2089. font-size: 15px;
  2090. border-style: solid;
  2091. border-top-width: 0px;
  2092. border-right-width: 0px;
  2093. border-bottom-width: 3px;
  2094. border-bottom-color: #FFEE35;
  2095. border-left-width: 0px;
  2096. font-family: "microsoft yahei";
  2097. float: right;
  2098. }
  2099. .realFeelButtonBlack40 {
  2100. height: 37px;
  2101. // margin-top: 3px;
  2102. line-height: 44px;
  2103. /* margin-left: 20px; */
  2104. color: #DEDEDE;
  2105. font-size: 15px;
  2106. font-family: "microsoft yahei";
  2107. float: right;
  2108. }
  2109. .temperatureButtonWhite40 {
  2110. height: 37px;
  2111. // margin-top: 3px;
  2112. line-height: 44px;
  2113. margin-left: 20px;
  2114. color: white;
  2115. font-size: 15px;
  2116. border-style: solid;
  2117. border-top-width: 0px;
  2118. border-right-width: 0px;
  2119. border-bottom-width: 3px;
  2120. border-bottom-color: #FFEE35;
  2121. border-left-width: 0px;
  2122. font-family: "microsoft yahei";
  2123. float: right;
  2124. }
  2125. .temperatureButtonBlack40 {
  2126. height: 37px;
  2127. line-height: 44px;
  2128. margin-left: 20px;
  2129. color: #DEDEDE;
  2130. font-size: 15px;
  2131. font-family: "microsoft yahei";
  2132. float: right;
  2133. }
  2134. .speedButtonWhite40 {
  2135. height: 37px;
  2136. line-height: 44px;
  2137. margin-left: 20px;
  2138. margin-right: 20px;
  2139. color: white;
  2140. font-size: 15px;
  2141. border-style: solid;
  2142. border-top-width: 0px;
  2143. border-right-width: 0px;
  2144. border-bottom-width: 3px;
  2145. border-bottom-color: #FFEE35;
  2146. border-left-width: 0px;
  2147. font-family: "microsoft yahei";
  2148. float: right;
  2149. }
  2150. .speedButtonBlack40 {
  2151. height: 37px;
  2152. line-height: 44px;
  2153. margin-left: 20px;
  2154. margin-right: 20px;
  2155. color: #DEDEDE;
  2156. font-size: 15px;
  2157. font-family: "microsoft yahei";
  2158. float: right;
  2159. }
  2160. .scrollUcharts40 {
  2161. white-space: nowrap;
  2162. }
  2163. .scrollList40 {
  2164. height: 330px;
  2165. }
  2166. .qiun-charts40 {
  2167. width: 5000upx;
  2168. height: 350upx;
  2169. float: left;
  2170. }
  2171. .charts40 {
  2172. width: 5000upx;
  2173. height: 350upx;
  2174. }
  2175. .windStationNameAndChoice {
  2176. clear: both;
  2177. width: 100%;
  2178. height: 30px;
  2179. margin-top: 1%;
  2180. color: silver;
  2181. /* border: 1px solid red; */
  2182. }
  2183. .windStationName {
  2184. width: 50%;
  2185. height: 100%;
  2186. float: left;
  2187. line-height: 30px;
  2188. font-size: 14px;
  2189. margin-left: 9.5%;
  2190. }
  2191. .windStationChoice {
  2192. width: 20%;
  2193. height: 100%;
  2194. float: right;
  2195. text-align: right;
  2196. line-height: 30px;
  2197. font-size: 14px;
  2198. margin-right: 5%;
  2199. }
  2200. .s-popup-wrapper {
  2201. width: 500rpx;
  2202. background-color: #f0f0f0;
  2203. }
  2204. .s-popup-title {
  2205. width: 100%;
  2206. height: 50px;
  2207. background-color: #211E21;
  2208. }
  2209. .s-popup-word {
  2210. width: calc(100% - 65px);
  2211. height: 50px;
  2212. font-size: 14px;
  2213. color: white;
  2214. line-height: 50px;
  2215. float: left;
  2216. margin-left: 25px;
  2217. }
  2218. .s-popup-cha {
  2219. width: 40px;
  2220. height: 50px;
  2221. text-align: center;
  2222. line-height: 50px;
  2223. float: right;
  2224. font-size: 24px;
  2225. }
  2226. .windStationItemContainer {
  2227. width: 100%;
  2228. }
  2229. .windStationItemContainerBlack {
  2230. width: 100%;
  2231. background-color: grey;
  2232. color: white;
  2233. }
  2234. .windStationItem {
  2235. width: 80%;
  2236. height: 50px;
  2237. border-bottom: 1px solid #c8c8c8;
  2238. text-align: left;
  2239. line-height: 50px;
  2240. margin-left: 10%;
  2241. color: #333333;
  2242. }
  2243. .weatherDaytimegrid {
  2244. width: 100%;
  2245. height: 200px;
  2246. float: left;
  2247. margin-top: 1%;
  2248. }
  2249. .weatherNocturnalgrid {
  2250. width: 100%;
  2251. height: 130px;
  2252. float: left;
  2253. margin-top: 1%;
  2254. }
  2255. .weatherDetails {
  2256. margin-top: 0%;
  2257. width: 100%;
  2258. height: 25px;
  2259. float: left;
  2260. }
  2261. .weatherText {
  2262. width: 20%;
  2263. height: 25px;
  2264. float: left;
  2265. font-size: 14px;
  2266. color: white;
  2267. margin-left: 9.5%;
  2268. }
  2269. .detailsText {
  2270. width: 20%;
  2271. height: 25px;
  2272. float: right;
  2273. font-size: 14px;
  2274. color: white;
  2275. margin-right: 5.5%;
  2276. text-align: right;
  2277. }
  2278. .ThermometerCard {
  2279. margin-top: -10%;
  2280. height: 308px;
  2281. width: 100%;
  2282. }
  2283. .border-left {
  2284. border-style: solid;
  2285. border-top-width: 0px;
  2286. border-right-width: 1px;
  2287. border-bottom-width: 0px;
  2288. border-left-width: 0px;
  2289. border-right-color: white;
  2290. }
  2291. .border-right {
  2292. border-style: solid;
  2293. border-top-width: 0px;
  2294. border-right-width: 0px;
  2295. border-bottom-width: 0px;
  2296. border-left-width: 0px;
  2297. border-right-color: #19B5BC;
  2298. }
  2299. .scrollList {
  2300. // height:20%;
  2301. height: 130px;
  2302. width: 95%;
  2303. margin: 0px auto;
  2304. }
  2305. .dayButtonWhite {
  2306. height: 25px;
  2307. margin-top: -4px;
  2308. margin-left: 20px;
  2309. color: white;
  2310. font-size: 18px;
  2311. border-style: solid;
  2312. border-top-width: 0px;
  2313. border-right-width: 0px;
  2314. border-bottom-width: 3px;
  2315. border-bottom-color: #FFEE35;
  2316. border-left-width: 0px;
  2317. font-family: "microsoft yahei";
  2318. float: left;
  2319. }
  2320. .dayButtonBlack {
  2321. height: 25px;
  2322. margin-top: -4px;
  2323. margin-left: 20px;
  2324. color: #DEDEDE;
  2325. font-size: 18px;
  2326. font-family: "microsoft yahei";
  2327. float: left;
  2328. }
  2329. .nightButtonWhite {
  2330. height: 25px;
  2331. margin-top: -4px;
  2332. border-style: solid;
  2333. border-top-width: 0px;
  2334. border-right-width: 0px;
  2335. border-bottom-width: 3px;
  2336. border-left-width: 0px;
  2337. border-bottom-color: #FFEE35;
  2338. color: white;
  2339. margin-left: 50rpx;
  2340. font-size: 18px;
  2341. font-family: "microsoft yahei";
  2342. float: left;
  2343. }
  2344. .nightButtonBlack {
  2345. height: 25px;
  2346. margin-top: -4px;
  2347. color: #DEDEDE;
  2348. margin-left: 50rpx;
  2349. font-size: 18px;
  2350. font-family: "microsoft yahei";
  2351. float: left;
  2352. }
  2353. .cuIcon {
  2354. border-right: 1px solid white;
  2355. height: 92px;
  2356. }
  2357. .icon7 {
  2358. font-size: 50upx;
  2359. }
  2360. .cu-listAll {
  2361. // width: 100%;
  2362. height: 100px;
  2363. display: -webkit-flex;
  2364. display: flex;
  2365. justify-content: space-around;
  2366. margin-top: -20px;
  2367. float: left;
  2368. }
  2369. .cu-listAllTwo {
  2370. height: 100px;
  2371. display: -webkit-flex;
  2372. display: flex;
  2373. justify-content: space-around;
  2374. margin-top: 10px;
  2375. }
  2376. .cu-listAllTThree {
  2377. height: 100px;
  2378. display: -webkit-flex;
  2379. display: flex;
  2380. justify-content: space-around;
  2381. margin-top: 10px;
  2382. }
  2383. .cu-listAllTFour {
  2384. height: 100px;
  2385. display: -webkit-flex;
  2386. display: flex;
  2387. justify-content: space-around;
  2388. margin-top: 10px;
  2389. }
  2390. .wenZhi {
  2391. color: white;
  2392. }
  2393. .cuIcon1 {
  2394. margin-top: 20px;
  2395. }
  2396. .cu-item {
  2397. width: 100%;
  2398. margin-left: -15px;
  2399. }
  2400. .weatherDayAndNightButton7 {
  2401. margin-left: 20px;
  2402. width: 120px;
  2403. height: 20px;
  2404. }
  2405. .border-left {
  2406. border-style: solid;
  2407. border-top-width: 0px;
  2408. border-right-width: 1px;
  2409. border-bottom-width: 0px;
  2410. border-left-width: 0px;
  2411. border-right-color: white;
  2412. }
  2413. .border-right {
  2414. border-style: solid;
  2415. border-top-width: 0px;
  2416. border-right-width: 0px;
  2417. border-bottom-width: 0px;
  2418. border-left-width: 0px;
  2419. border-right-color: #19B5BC;
  2420. }
  2421. .scrollList7 {
  2422. float: left;
  2423. height: 130px;
  2424. width: 95%;
  2425. margin-left: 2.5%;
  2426. }
  2427. .dayButtonWhite7 {
  2428. height: 25px;
  2429. margin-top: -9%;
  2430. margin-left: 20px;
  2431. color: white;
  2432. font-size: 15px;
  2433. border-style: solid;
  2434. border-top-width: 0px;
  2435. border-right-width: 0px;
  2436. border-bottom-width: 3px;
  2437. border-bottom-color: #FFEE35;
  2438. border-left-width: 0px;
  2439. font-family: "microsoft yahei";
  2440. float: left;
  2441. }
  2442. .dayButtonBlack7 {
  2443. height: 25px;
  2444. margin-top: -9%;
  2445. margin-left: 20px;
  2446. color: #DEDEDE;
  2447. font-size: 15px;
  2448. font-family: "microsoft yahei";
  2449. float: left;
  2450. }
  2451. .nightButtonWhite7 {
  2452. height: 25px;
  2453. margin-top: -9%;
  2454. border-style: solid;
  2455. border-top-width: 0px;
  2456. border-right-width: 0px;
  2457. border-bottom-width: 3px;
  2458. border-left-width: 0px;
  2459. border-bottom-color: #FFEE35;
  2460. color: white;
  2461. margin-left: 50rpx;
  2462. font-size: 15px;
  2463. font-family: "microsoft yahei";
  2464. float: left;
  2465. }
  2466. .nightButtonBlack7 {
  2467. height: 25px;
  2468. margin-top: -9%;
  2469. color: #DEDEDE;
  2470. margin-left: 50rpx;
  2471. font-size: 15px;
  2472. font-family: "microsoft yahei";
  2473. float: left;
  2474. }
  2475. .cuIcon7 {
  2476. border-right: 1px solid white;
  2477. height: 92px;
  2478. }
  2479. .icon1 {
  2480. font-size: 50upx;
  2481. }
  2482. .cu-listAll7 {
  2483. height: 100px;
  2484. display: -webkit-flex;
  2485. display: flex;
  2486. justify-content: space-around;
  2487. margin-top: -20px;
  2488. float: left;
  2489. }
  2490. .cu-listAllTwo7 {
  2491. height: 100px;
  2492. display: -webkit-flex;
  2493. display: flex;
  2494. justify-content: space-around;
  2495. margin-top: 10px;
  2496. }
  2497. .cu-listAllTThree7 {
  2498. height: 100px;
  2499. display: -webkit-flex;
  2500. display: flex;
  2501. justify-content: space-around;
  2502. margin-top: 10px;
  2503. }
  2504. .cu-listAllTFour7 {
  2505. height: 100px;
  2506. display: -webkit-flex;
  2507. display: flex;
  2508. justify-content: space-around;
  2509. margin-top: 10px;
  2510. }
  2511. .wenZhi7 {
  2512. color: white;
  2513. }
  2514. .cuIcon1 {
  2515. margin-top: 20px;
  2516. }
  2517. .cu-item {
  2518. width: 100%;
  2519. margin-left: -15px;
  2520. }
  2521. </style>