index-v2.vue 86 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884
  1. <template>
  2. <div>
  3. <el-row :gutter="10">
  4. <el-col :span="6">
  5. <el-card shadow="always" style="height:280px">
  6. <div ref="rtuInfoCountPieChart" style="width: 100%;height: 280px;">
  7. </div>
  8. </el-card>
  9. </el-col>
  10. <el-col :span="6">
  11. <el-card shadow="always" style="height:280px">
  12. <div ref="rtuDataUpCountChart" style="width: 100%;height: 280px;">
  13. </div>
  14. </el-card>
  15. </el-col>
  16. <el-col :span="6">
  17. <el-card shadow="always" style="height:280px">
  18. <div ref="checkOrderChart" style="width: 100%;height: 280px;">
  19. </div>
  20. </el-card>
  21. </el-col>
  22. <el-col :span="6">
  23. <el-card shadow="always" style="height:280px">
  24. <div ref="equipmentInspectionCountChart" style="width: 100%;height: 280px;">
  25. </div>
  26. </el-card>
  27. </el-col>
  28. </el-row>
  29. <el-row v-if="adminPageStyle" :gutter="10">
  30. <el-col :span="12">
  31. <el-card shadow="always" style="height: 500px;">
  32. <div slot="header" class="clearfix">
  33. <span>测站异常分布统计信息</span>
  34. </div>
  35. <avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
  36. @on-load="onLoad" @cell-click="cellClick">
  37. </avue-crud>
  38. </el-card>
  39. </el-col>
  40. <el-col :span="6">
  41. <el-row>
  42. <el-col :span="24">
  43. <el-card class="box-small-card">
  44. <div slot="header" class="clearfix">
  45. <span>今日维修任务动态</span>
  46. <el-button style="float: right; padding: 3px 0" type="text"
  47. @click="openMoreTodayOrderProcess">更多</el-button>
  48. </div>
  49. <div v-for="(item, index) in todayOrderList" :key="index" class="list-item">
  50. <el-row type="flex">
  51. <el-col :span="19">
  52. <div style="padding-right: 5px;">
  53. <div style="display: flex; flex-direction: row;align-items: center;">
  54. <label>{{ item.rtuName }}</label>
  55. <label style="margin-left: 5px;color: gray;"> / {{ item.rtuCode }}</label>
  56. </div>
  57. <div
  58. style="display: flex; flex-direction: row;align-items: center;margin-top: 4px;">
  59. <label>维修状态:<span style="color:gray">{{
  60. item.orderStatusName }}</span></label>
  61. </div>
  62. <div
  63. style="display: flex; flex-direction: row;align-items: center;margin-top: 4px;">
  64. <label>更新时间:<span style="color:gray">{{ item.updateTime }}</span></label>
  65. </div>
  66. <div style="margin-top: 4px;margin-bottom: 5px;">
  67. <label>备注:<span style="color:gray">{{ item.processDesc }}</span></label>
  68. </div>
  69. </div>
  70. </el-col>
  71. <el-col :span="5" style="display: flex;flex-direction: column;justify-content: center;">
  72. <el-button style="font-size: 0.7rem;" size="mini" type="info" round
  73. @click="openCheckOrderReportDetail(item)">查看详情</el-button>
  74. </el-col>
  75. </el-row>
  76. </div>
  77. </el-card>
  78. </el-col>
  79. </el-row>
  80. <el-row>
  81. <el-col :span="24">
  82. <el-card class="box-card-news">
  83. <div slot="header" class="clearfix">
  84. <span>通知公告</span>
  85. <el-button style="float: right; padding: 3px 0" type="text"
  86. @click="openMoreNotice">更多</el-button>
  87. </div>
  88. <div v-for="(item, index) in noticeList" :key="index" class="notice-item">
  89. <div>
  90. <label>{{ item.title }}</label>
  91. </div>
  92. <div style="margin-top: 4px;">
  93. <label class="notice-time">发布时间: {{ item.releaseTime }}</label>
  94. </div>
  95. <div style="margin-top: 4px;margin-bottom: 2px;">
  96. <label>{{
  97. item.content
  98. }}</label>
  99. </div>
  100. </div>
  101. </el-card>
  102. </el-col>
  103. </el-row>
  104. </el-col>
  105. <el-col :span="6">
  106. <el-row>
  107. <el-col :span="24">
  108. <el-card class="box-small-card">
  109. <div slot="header" class="clearfix">
  110. <span>今日巡检动态</span>
  111. <el-button style="float: right; padding: 3px 0" type="text"
  112. @click="openMoreTodayInspectionReport">更多</el-button>
  113. </div>
  114. <div v-for="(item, index) in todayInspectionReportList" :key="index" class="list-item">
  115. <el-row type="flex">
  116. <el-col :span="19">
  117. <div style="display: flex; flex-direction: row;align-items: center;">
  118. <label>{{ item.rtuName }}</label>
  119. <label style="margin-left: 5px;color: gray;"> / {{ item.rtuCode }}</label>
  120. </div>
  121. <div
  122. style="display: flex; flex-direction: row;align-items: center;margin-top: 4px;">
  123. <label>填报人:<span style="color:gray">{{
  124. item.servicePersonName
  125. }}</span></label>
  126. </div>
  127. <div
  128. style="display: flex; flex-direction: row;align-items: center;margin-top: 4px;margin-bottom: 5px;">
  129. <label>填报时间:<span style="color:gray">{{ item.updateTime }}</span></label>
  130. </div>
  131. </el-col>
  132. <el-col :span="5" style="display: flex;flex-direction: column;justify-content: center;">
  133. <el-button style="font-size: 0.7rem;" size="mini" type="info" round
  134. @click="openInspectionReportDetail(item)">查看详情</el-button>
  135. </el-col>
  136. </el-row>
  137. </div>
  138. </el-card>
  139. </el-col>
  140. </el-row>
  141. <el-row>
  142. <el-col :span="24">
  143. <el-card class="box-card-apk">
  144. <div slot="header" class="clearfix">
  145. <span>手机客户端下载</span>
  146. </div>
  147. <div>
  148. <img style="width: 100px;height: 100px;" :src="appinfo.apkQrUrl" />
  149. </div>
  150. <div style="margin-top: 4px;">
  151. <label style="padding-left: 5px;font-size: 0.8rem;">版本号 {{ appinfo.version }}</label>
  152. </div>
  153. <div style="margin-top: 4px;">
  154. <el-button type="text" @click="downloadApk">下载安卓客户端</el-button>
  155. </div>
  156. </el-card>
  157. </el-col>
  158. </el-row>
  159. </el-col>
  160. </el-row>
  161. <el-row v-else :gutter="10">
  162. <el-col :span="6">
  163. <el-card shadow="always" style="height: 500px;">
  164. <div ref="rtuWarnCountChart" style="width: 100%;height: 500px;">
  165. </div>
  166. </el-card>
  167. </el-col>
  168. <el-col :span="6">
  169. <el-card class="box-high-card">
  170. <div slot="header" class="clearfix">
  171. <span>今日维修任务动态</span>
  172. <el-button style="float: right; padding: 3px 0" type="text"
  173. @click="openMoreTodayOrderProcess">更多</el-button>
  174. </div>
  175. <div v-for="(item, index) in todayOrderList" :key="index" class="list-item">
  176. <el-row type="flex">
  177. <el-col :span="19">
  178. <div style="padding-right: 5px;">
  179. <div style="display: flex; flex-direction: row;align-items: center;">
  180. <label>{{ item.rtuName }}</label>
  181. <label style="margin-left: 5px;color: gray;"> / {{ item.rtuCode }}</label>
  182. </div>
  183. <div style="display: flex; flex-direction: row;align-items: center;margin-top: 4px;">
  184. <label>维修状态:<span style="color:gray">{{
  185. item.orderStatusName }}</span></label>
  186. </div>
  187. <div style="display: flex; flex-direction: row;align-items: center;margin-top: 4px;">
  188. <label>更新时间:<span style="color:gray">{{ item.updateTime }}</span></label>
  189. </div>
  190. <div style="margin-top: 4px;margin-bottom: 5px;">
  191. <label>备注:<span style="color:gray">{{ item.processDesc }}</span></label>
  192. </div>
  193. </div>
  194. </el-col>
  195. <el-col :span="5" style="display: flex;flex-direction: column;justify-content: center;">
  196. <el-button style="font-size: 0.7rem;" size="mini" type="info" round
  197. @click="openCheckOrderReportDetail(item)">查看详情</el-button>
  198. </el-col>
  199. </el-row>
  200. </div>
  201. </el-card>
  202. </el-col>
  203. <el-col :span="6">
  204. <el-row>
  205. <el-col :span="24">
  206. <el-card class="box-high-card">
  207. <div slot="header" class="clearfix">
  208. <span>今日巡检动态</span>
  209. <el-button style="float: right; padding: 3px 0" type="text"
  210. @click="openMoreTodayInspectionReport">更多</el-button>
  211. </div>
  212. <div v-for="(item, index) in todayInspectionReportList" :key="index" class="list-item">
  213. <el-row type="flex">
  214. <el-col :span="19">
  215. <div style="padding-right: 5px;">
  216. <div style="display: flex; flex-direction: row;align-items: center;">
  217. <label>{{ item.rtuName }}</label>
  218. <label style="margin-left: 5px;color: gray;"> / {{ item.rtuCode }}</label>
  219. </div>
  220. <div
  221. style="display: flex; flex-direction: row;align-items: center;margin-top: 4px;">
  222. <label>填报人:<span style="color:gray">{{
  223. item.servicePersonName
  224. }}</span></label>
  225. </div>
  226. <div
  227. style="display: flex; flex-direction: row;align-items: center;margin-top: 4px;margin-bottom: 5px;">
  228. <label>填报时间:<span style="color:gray">{{ item.updateTime }}</span></label>
  229. </div>
  230. </div>
  231. </el-col>
  232. <el-col :span="5" style="display: flex;flex-direction: column;justify-content: center;">
  233. <el-button style="font-size: 0.7rem;" size="mini" type="info" round
  234. @click="openInspectionReportDetail(item)">查看详情</el-button>
  235. </el-col>
  236. </el-row>
  237. </div>
  238. </el-card>
  239. </el-col>
  240. </el-row>
  241. <el-row>
  242. <el-col :span="24">
  243. </el-col>
  244. </el-row>
  245. </el-col>
  246. <el-col :span="6">
  247. <el-row>
  248. <el-col :span="24">
  249. <el-card class="box-card-news">
  250. <div slot="header" class="clearfix">
  251. <span>通知公告</span>
  252. <el-button style="float: right; padding: 3px 0" type="text"
  253. @click="openMoreNotice">更多</el-button>
  254. </div>
  255. <div v-for="(item, index) in noticeList" :key="index" class="notice-item">
  256. <div>
  257. <label>{{ item.title }}</label>
  258. </div>
  259. <div style="margin-top: 4px;">
  260. <label class="notice-time">发布时间: {{ item.releaseTime }}</label>
  261. </div>
  262. <div style="margin-top: 4px;margin-bottom: 2px;">
  263. <label>{{
  264. item.content
  265. }}</label>
  266. </div>
  267. </div>
  268. </el-card>
  269. </el-col>
  270. </el-row>
  271. <el-row>
  272. <el-col :span="24">
  273. <el-card class="box-card-apk">
  274. <div slot="header" class="clearfix">
  275. <span>手机客户端下载</span>
  276. </div>
  277. <div>
  278. <img style="width: 100px;height: 100px;" :src="appinfo.apkQrUrl" />
  279. </div>
  280. <div style="margin-top: 4px;">
  281. <label style="padding-left: 5px;font-size: 0.8rem;">版本号 {{ appinfo.version }}</label>
  282. </div>
  283. <div style="margin-top: 4px;">
  284. <el-button type="text" @click="downloadApk">下载安卓客户端</el-button>
  285. </div>
  286. </el-card>
  287. </el-col>
  288. </el-row>
  289. </el-col>
  290. </el-row>
  291. <el-drawer title="今日维修任务动态信息" :visible.sync="moreTodayOrderProcessDig" v-if="moreTodayOrderProcessDig" size="50%"
  292. :close-on-click-modal="false" append-to-body>
  293. <todaycheckorderprocesslist ref="todaycheckorderprocesslist">
  294. </todaycheckorderprocesslist>
  295. </el-drawer>
  296. <el-drawer title="今日巡检动态信息" :visible.sync="moreTodayInspectionReportDig" v-if="moreTodayInspectionReportDig"
  297. size="50%" :close-on-click-modal="false" append-to-body>
  298. <todaynspectionrportlist ref="todaynspectionrportlist"></todaynspectionrportlist>
  299. </el-drawer>
  300. <el-drawer title="通知公告信息" :visible.sync="moreNoticeDig" v-if="moreNoticeDig" size="50%"
  301. :close-on-click-modal="false" append-to-body>
  302. <todaynoticelist ref="todaynoticelist"></todaynoticelist>
  303. </el-drawer>
  304. <el-drawer title="异常测站信息" :visible.sync="warninglistDig" v-if="warninglistDig" size="50%"
  305. :close-on-click-modal="false" append-to-body>
  306. <warninglist ref="warninglist" :deptId="deptId"></warninglist>
  307. </el-drawer>
  308. <el-drawer title="离线测站信息" :visible.sync="offlineWarnListDig" v-if="offlineWarnListDig" size="50%"
  309. :close-on-click-modal="false" append-to-body>
  310. <offlinewarnlist ref="offlinewarnlist" :deptId="deptId"></offlinewarnlist>
  311. </el-drawer>
  312. <el-drawer title="时钟异常测站信息" :visible.sync="clockWarnListDig" v-if="clockWarnListDig" size="50%"
  313. :close-on-click-modal="false" append-to-body>
  314. <clockwarnlist ref="clockwarnlist" :deptId="deptId"></clockwarnlist>
  315. </el-drawer>
  316. <el-drawer title="小时报漏报测站信息" :visible.sync="hourmissoutWarnListDig" v-if="hourmissoutWarnListDig" size="50%"
  317. :close-on-click-modal="false" append-to-body>
  318. <hourmissoutwarnlist ref="hourmissoutwarnlist" :deptId="deptId"></hourmissoutwarnlist>
  319. </el-drawer>
  320. <el-drawer title="雨量站小时报漏报测站信息" :visible.sync="rainHourmissoutWarnListDig" v-if="rainHourmissoutWarnListDig"
  321. size="50%" :close-on-click-modal="false" append-to-body>
  322. <rainHourmissoutWarnListVue ref="rainHourmissoutWarnList" :deptId="deptId"></rainHourmissoutWarnListVue>
  323. </el-drawer>
  324. <el-drawer title="水位站小时报漏报测站信息" :visible.sync="riverHourmissoutWarnListDig" v-if="riverHourmissoutWarnListDig"
  325. size="50%" :close-on-click-modal="false" append-to-body>
  326. <riverHourmissoutWarnListVue ref="riverHourmissoutWarnList" :deptId="deptId"></riverHourmissoutWarnListVue>
  327. </el-drawer>
  328. <el-drawer title="5分钟报延时测站信息" :visible.sync="minupdelayWarnListDig" v-if="minupdelayWarnListDig" size="50%"
  329. :close-on-click-modal="false" append-to-body>
  330. <minupdelaywarnlist ref="minupdelaywarnlist" :deptId="deptId"></minupdelaywarnlist>
  331. </el-drawer>
  332. <el-drawer title="小时报延时测站信息" :visible.sync="hourupdelayWarnListDig" v-if="hourupdelayWarnListDig" size="50%"
  333. :close-on-click-modal="false" append-to-body>
  334. <hourupdelaywarnlist ref="hourupdelaywarnlist" :deptId="deptId"></hourupdelaywarnlist>
  335. </el-drawer>
  336. <el-drawer title="雨量站小时报延时测站信息" :visible.sync="rainHourupdelayWarnListDig" v-if="rainHourupdelayWarnListDig"
  337. size="50%" :close-on-click-modal="false" append-to-body>
  338. <rainhourupdelaywarnlistVue ref="rainhourupdelaywarnlist" :deptId="deptId"></rainhourupdelaywarnlistVue>
  339. </el-drawer>
  340. <el-drawer title="水位站小时报延时测站信息" :visible.sync="riverHourupdelayWarnListDig" v-if="riverHourupdelayWarnListDig"
  341. size="50%" :close-on-click-modal="false" append-to-body>
  342. <riverhourupdelaywarnlistVue ref="riverhourupdelaywarnlist" :deptId="deptId"></riverhourupdelaywarnlistVue>
  343. </el-drawer>
  344. <el-drawer title="疑似异常值测站信息" :visible.sync="outlterValueWarnListDig" v-if="outlterValueWarnListDig" size="50%"
  345. :close-on-click-modal="false" append-to-body>
  346. <outlitervaluewarnlist ref="outlitervaluewarnlist" :deptId="deptId"></outlitervaluewarnlist>
  347. </el-drawer>
  348. <el-drawer title="维修中任务信息" :visible.sync="processingcheckorderlistDig" v-if="processingcheckorderlistDig" size="50%"
  349. :close-on-click-modal="false" append-to-body>
  350. <processingcheckorderlist ref="processingcheckorderlist"></processingcheckorderlist>
  351. </el-drawer>
  352. <el-drawer title="未确认维修任务信息" :visible.sync="uncomfireCheckOrderDig" v-if="uncomfireCheckOrderDig" size="50%"
  353. :close-on-click-modal="false" append-to-body>
  354. <uncomfirecheckorderlist ref="uncomfirecheckorderlist"></uncomfirecheckorderlist>
  355. </el-drawer>
  356. <el-drawer title="确认超时维修任务信息" :visible.sync="comfireDelayCheckOrderDig" v-if="comfireDelayCheckOrderDig" size="50%"
  357. :close-on-click-modal="false" append-to-body>
  358. <comfiredelaycheckorderlist ref="comfiredelaycheckorderlist"></comfiredelaycheckorderlist>
  359. </el-drawer>
  360. <el-drawer title="维修任务详情" :visible.sync="checkorderprocessdetailDig" v-if="checkorderprocessdetailDig" size="50%"
  361. :close-on-click-modal="false" append-to-body>
  362. <checkorderprocessdetail ref="checkorderprocessdetail" :orderId="checkOrderReportId"></checkorderprocessdetail>
  363. </el-drawer>
  364. <el-drawer title="设备巡检详情" :visible.sync="inspectionreportdetailDig" v-if="inspectionreportdetailDig" size="50%"
  365. :close-on-click-modal="false" append-to-body>
  366. <inspectionreportdetail ref="inspectionreportdetail" :id="inspectionReportId"></inspectionreportdetail>
  367. </el-drawer>
  368. <el-drawer :visible.sync="inspectionreportlistDig" v-if="inspectionreportlistDig" size="50%"
  369. :close-on-click-modal="false" append-to-body>
  370. <div slot="title" class="header-title">
  371. <span class="name">{{ dialogTitle }}</span>
  372. </div>
  373. <inspectionreportlistVue ref="inspectionreportlist" :rainSeasonKind="rainSeasonKind"></inspectionreportlistVue>
  374. </el-drawer>
  375. </div>
  376. </template>
  377. <script>
  378. import { getRtuStatusCountData, getRtuUpCountData, getCheckOrderCountData, getInspectionReportCountData, getWarnKindCountData, getWarnCountList } from "@/api/home/home.js";
  379. import { todayOrderProcessList } from "@/api/business/order/process.js";
  380. import { todayInspectionReportList } from "@/api/business/inspection/inspectionreport.js";
  381. import { getLastList } from "@/api/notice/notice.js";
  382. import { getStore } from '@/util/store.js';
  383. import { getAppInfo } from "@/api/versionmanage/version.js";
  384. import todaycheckorderprocesslist from "../business/order/todaycheckorderprocesslist.vue";
  385. import uncomfirecheckorderlist from "../business/order/uncomfirecheckorderlist.vue";
  386. import comfiredelaycheckorderlist from "../business/order/comfiredelaycheckorderlist.vue";
  387. import processingcheckorderlist from "../business/order/processingcheckorderlist.vue";
  388. import todaynspectionrportlist from "../business/inspection/todaynspectionrportlist.vue";
  389. import todaynoticelist from "../notice/todaynoticelist.vue";
  390. import warninglist from "../business/warning/warninglist.vue";
  391. import offlinewarnlist from "../business/warning/offlinewarnlist.vue";
  392. import clockwarnlist from "../business/warning/clockwarnlist.vue";
  393. import hourmissoutwarnlist from "../business/warning/hourmissoutwarnlist.vue";
  394. import rainHourmissoutWarnListVue from "../business/warning/rainhourmissoutwarnlist.vue";
  395. import riverHourmissoutWarnListVue from "../business/warning/riverhourmissoutwarnlist.vue";
  396. import minupdelaywarnlist from "../business/warning/minupdelaywarnlist.vue";
  397. import hourupdelaywarnlist from "../business/warning/hourupdelaywarnlist.vue";
  398. import rainhourupdelaywarnlistVue from "../business/warning/rainhourupdelaywarnlist.vue";
  399. import riverhourupdelaywarnlistVue from "../business/warning/riverhourupdelaywarnlist.vue";
  400. import outlitervaluewarnlist from "../business/warning/outlitervaluewarnlist.vue";
  401. import checkorderprocessdetail from "../business/order/checkorderprocessdetail.vue";
  402. import inspectionreportdetail from "../business/inspection/inspectionreportdetail.vue";
  403. import inspectionreportlistVue from "../business/inspection/inspectionreportlist.vue";
  404. import { mapGetters } from "vuex";
  405. export default {
  406. name: "home",
  407. components: {
  408. todaycheckorderprocesslist,
  409. todaynspectionrportlist,
  410. todaynoticelist,
  411. warninglist,
  412. offlinewarnlist,
  413. hourmissoutwarnlist,
  414. minupdelaywarnlist,
  415. hourupdelaywarnlist,
  416. uncomfirecheckorderlist,
  417. comfiredelaycheckorderlist,
  418. checkorderprocessdetail,
  419. inspectionreportdetail,
  420. inspectionreportlistVue,
  421. clockwarnlist,
  422. rainHourmissoutWarnListVue,
  423. riverHourmissoutWarnListVue,
  424. rainhourupdelaywarnlistVue,
  425. riverhourupdelaywarnlistVue,
  426. outlitervaluewarnlist,
  427. processingcheckorderlist
  428. },
  429. data() {
  430. return {
  431. adminPageStyle: false,
  432. warninglistDig: false,
  433. offlineWarnListDig: false,
  434. clockWarnListDig: false,
  435. hourmissoutWarnListDig: false,
  436. rainHourmissoutWarnListDig: false,
  437. riverHourmissoutWarnListDig: false,
  438. minupdelayWarnListDig: false,
  439. hourupdelayWarnListDig: false,
  440. rainHourupdelayWarnListDig: false,
  441. riverHourupdelayWarnListDig: false,
  442. outlterValueWarnListDig: false,
  443. uncomfireCheckOrderDig: false,
  444. comfireDelayCheckOrderDig: false,
  445. processingcheckorderlistDig: false,
  446. moreTodayOrderProcessDig: false,
  447. moreTodayInspectionReportDig: false,
  448. moreNoticeDig: false,
  449. checkorderprocessdetailDig: false,
  450. inspectionreportdetailDig: false,
  451. inspectionreportlistDig: false,
  452. dialogTitle: '',
  453. deptId: 0,
  454. form: {},
  455. selectionList: [],
  456. query: {},
  457. loading: true,
  458. data: [],
  459. option: {
  460. height: "420",
  461. align: "center",
  462. headerAlign: "center",
  463. tip: false,
  464. simplePage: true,
  465. searchShow: false,
  466. searchMenuSpan: 6,
  467. addBtn: false,
  468. tree: true,
  469. border: true,
  470. index: true,
  471. editBtn: false,
  472. delBtn: false,
  473. menu: false,
  474. dialogType: "drawer",
  475. dialogClickModal: false,
  476. columnBtn: false,
  477. refreshBtn: false,
  478. header: false,
  479. column: [
  480. {
  481. label: "盟市",
  482. prop: "adCity",
  483. span: 24,
  484. },
  485. {
  486. label: "测站数量",
  487. prop: "rtus",
  488. span: 12,
  489. },
  490. {
  491. label: "测站离线",
  492. prop: "warnOffline",
  493. span: 12,
  494. html: true,
  495. formatter: (val) => {
  496. if (val.warnOffline && val.warnOffline > 0) {
  497. let n = val.warnOffline / val.rtus * 100;
  498. let num = new Number(n);
  499. // if (val.deptId == 0) {
  500. // return '<span><b style="color:rgb(238,112,112)">' + val.warnOffline + '</b> / ' + '<b style="color:rgb(84,123,201)">' + num.toFixed(2) + '%</b></span>'
  501. // } else {
  502. return '<span style="cursor:pointer;text-decoration-line: underline;"><b style="color:rgb(238,112,112)">' + val.warnOffline + '</b> / ' + '<b style="color:rgb(84,123,201)">' + num.toFixed(2) + '%</b></span>'
  503. // }
  504. } else {
  505. return '<b></b>'
  506. }
  507. }
  508. }, {
  509. label: "小时报漏报",
  510. prop: "warnMissOut",
  511. span: 12,
  512. html: true,
  513. formatter: (val) => {
  514. if (val.warnMissOut && val.warnMissOut > 0) {
  515. let n = val.warnMissOut / val.rtus * 100;
  516. let num = new Number(n);
  517. // if (val.deptId == 0) {
  518. // return '<span><b style="color:rgb(238,112,112)">' + val.warnMissOut + '</b> / ' + '<b style="color:rgb(84,123,201)">' + num.toFixed(2) + '%</b></span>'
  519. // } else {
  520. return '<span style="cursor:pointer;text-decoration-line: underline;"><b style="color:rgb(238,112,112)">' + val.warnMissOut + '</b> / ' + '<b style="color:rgb(84,123,201)">' + num.toFixed(2) + '%</b></span>'
  521. // }
  522. } else {
  523. return '<b></b>'
  524. }
  525. }
  526. }, {
  527. label: "5分钟上报延时",
  528. prop: "warnUpMinDelay",
  529. span: 12,
  530. html: true,
  531. formatter: (val) => {
  532. if (val.warnUpMinDelay && val.warnUpMinDelay > 0) {
  533. let n = val.warnUpMinDelay / val.rtus * 100;
  534. let num = new Number(n);
  535. // if (val.deptId == 0) {
  536. // return '<span><b style="color:rgb(238,112,112)">' + val.warnUpMinDelay + '</b> / ' + '<b style="color:rgb(84,123,201)">' + num.toFixed(2) + '%</b></span>'
  537. // } else {
  538. return '<span style="cursor:pointer;text-decoration-line: underline;"><b style="color:rgb(238,112,112)">' + val.warnUpMinDelay + '</b> / ' + '<b style="color:rgb(84,123,201)">' + num.toFixed(2) + '%</b></span>'
  539. // }
  540. } else {
  541. return '<b></b>'
  542. }
  543. }
  544. }, {
  545. label: "小时上报延时",
  546. prop: "warnUpHourDelay",
  547. span: 12,
  548. html: true,
  549. formatter: (val) => {
  550. if (val.warnUpHourDelay && val.warnUpHourDelay > 0) {
  551. let n = val.warnUpHourDelay / val.rtus * 100;
  552. let num = new Number(n);
  553. // if (val.deptId == 0) {
  554. // return '<span><b style="color:rgb(238,112,112)">' + val.warnUpHourDelay + '</b> / ' + '<b style="color:rgb(84,123,201)">' + num.toFixed(2) + '%</b></span>'
  555. // } else {
  556. return '<span style="cursor:pointer;text-decoration-line: underline;"><b style="color:rgb(238,112,112)">' + val.warnUpHourDelay + '</b> / ' + '<b style="color:rgb(84,123,201)">' + num.toFixed(2) + '%</b></span>'
  557. // }
  558. } else {
  559. return '<b></b>'
  560. }
  561. }
  562. },
  563. ],
  564. },
  565. appinfo: {
  566. apkUrl: '',
  567. apkQrUrl: '',
  568. version: ''
  569. },
  570. checkOrderReportId: '',
  571. inspectionReportId: '',
  572. realData: {
  573. },
  574. stompClient: null,
  575. layout: [],
  576. cache: [],
  577. editSw: false,
  578. dialog: false,
  579. id: "",
  580. guideForm: {},
  581. second: 0,
  582. timer: null,
  583. state: 5,
  584. todayOrderList: [],
  585. todayInspectionReportList: [],
  586. noticeList: [],
  587. userInfo: getStore({ name: 'userInfo' }) || [],
  588. rtuInfoCountPieMap: null,
  589. rtuInfoCountPieOption: {
  590. title: {
  591. text: '测站状态统计信息',
  592. subtext: '测站总数量',
  593. left: 'center'
  594. },
  595. tooltip: {
  596. trigger: 'item',
  597. formatter: '{a} <br/>{b} : {c} ({d}%)',
  598. textStyle: {
  599. fontSize: 12
  600. }
  601. },
  602. legend: {
  603. bottom: 20,
  604. left: 'center',
  605. data: ['运行正常', '测站离线', '其他异常']
  606. },
  607. series: [
  608. {
  609. name: '状态信息',
  610. type: 'pie',
  611. radius: '40%',
  612. center: ['50%', '50%'],
  613. selectedMode: 'single',
  614. data: [
  615. {
  616. value: 0,
  617. name: '运行正常',
  618. label: {
  619. show: true,
  620. formatter(param) {
  621. // correct the percentage
  622. return ' (' + param.value + ' / ' + param.percent + '%)';
  623. }
  624. },
  625. itemStyle: {
  626. color: '#547bc9'
  627. }
  628. },
  629. {
  630. value: 0,
  631. name: '测站离线',
  632. label: {
  633. show: true,
  634. formatter(param) {
  635. // correct the percentage
  636. return ' (' + param.value + ' / ' + param.percent + '%)';
  637. }
  638. },
  639. itemStyle: {
  640. color: '#ff0000'
  641. }
  642. },
  643. {
  644. value: 0,
  645. name: '其他异常',
  646. label: {
  647. show: true,
  648. formatter(param) {
  649. // correct the percentage
  650. return ' (' + param.value + ' / ' + param.percent + '%)';
  651. }
  652. },
  653. itemStyle: {
  654. color: '#ee7070'
  655. }
  656. },
  657. ],
  658. emphasis: {
  659. itemStyle: {
  660. shadowBlur: 10,
  661. shadowOffsetX: 0,
  662. shadowColor: 'rgba(0, 0, 0, 0.5)'
  663. }
  664. }
  665. }
  666. ]
  667. },
  668. rtuDataUpCountMap: null,
  669. rtuDataUpCountOption: {
  670. title: {
  671. text: '测站上报率统计信息',
  672. subtext: '统计口径为上一个自然天',
  673. left: 'center'
  674. },
  675. tooltip: {
  676. trigger: 'axis',
  677. axisPointer: {
  678. type: 'shadow'
  679. },
  680. showContent: true,
  681. formatter: function (params) {
  682. console.log(JSON.stringify(params))
  683. return '<b>' + params[0].name + '数量:' + params[0].data.value + '</b><br/><b>上报数量:' + params[1].data.value + '/' + params[1].data.percent + '</b><br/><b>点击打开列表页</b>';
  684. },
  685. textStyle: {
  686. fontSize: 10,
  687. }
  688. },
  689. legend: {
  690. show: true,
  691. bottom: 20,
  692. },
  693. grid: {
  694. left: '3%',
  695. right: '4%',
  696. bottom: '18%',
  697. containLabel: true
  698. },
  699. xAxis: {
  700. type: 'value',
  701. boundaryGap: [0, 0.01]
  702. },
  703. yAxis: {
  704. type: 'category',
  705. data: ['墒情站', '水位站', '雨量站']
  706. },
  707. series: [
  708. {
  709. name: '测站数量',
  710. type: 'bar',
  711. data: [{
  712. value: 0,
  713. showpercent: false,
  714. percent: 0
  715. }, {
  716. value: 0,
  717. showpercent: false,
  718. percent: 0
  719. }, {
  720. value: 0,
  721. showpercent: false,
  722. percent: 0
  723. }],
  724. itemStyle: {
  725. color: 'rgba(84, 112, 198,1.0)'
  726. },
  727. label: {
  728. show: true,
  729. position: 'insideLeft',
  730. formatter(params) {
  731. if (params.data.showpercent) {
  732. return ' ' + params.data.value + ' / ' + params.data.percent + '%';
  733. } else {
  734. return ' ' + params.data.value;
  735. }
  736. }
  737. },
  738. },
  739. {
  740. name: '上报数量',
  741. type: 'bar',
  742. data: [{
  743. value: 0,
  744. showpercent: true,
  745. percent: 0
  746. }, {
  747. value: 0,
  748. showpercent: true,
  749. percent: 0
  750. }, {
  751. value: 0,
  752. showpercent: true,
  753. percent: 0
  754. }],
  755. itemStyle: {
  756. color: 'rgba(145, 204, 122,1.0)'
  757. },
  758. label: {
  759. show: true,
  760. position: 'insideLeft',
  761. formatter(params) {
  762. if (params.data.showpercent) {
  763. return ' ' + params.data.value + ' / ' + params.data.percent + '%';
  764. } else {
  765. return ' ' + params.data.value;
  766. }
  767. }
  768. },
  769. }
  770. ]
  771. },
  772. checkOrderMap: null,
  773. checkOrderCountOption: {
  774. tooltip: {
  775. trigger: 'axis',
  776. axisPointer: {
  777. type: 'shadow',
  778. },
  779. showContent: true,
  780. formatter: function (params) {
  781. //console.log(JSON.stringify(params))
  782. if (params[0].data.showpercent) {
  783. return '<b>' + params[0].name + ':' + params[0].data.value + '</b><br/><b>百分比:' + params[0].data.percent + '</b><br/><b>点击打开列表页</b>';
  784. } else {
  785. return "点击跳转到维修任务管理页面";
  786. }
  787. },
  788. textStyle: {
  789. fontSize: 10
  790. }
  791. },
  792. title: {
  793. text: '维修任务统计信息',
  794. left: 'center',
  795. subtext: '实时统计'
  796. // textStyle: {
  797. // fontSize: 16,
  798. // fontWeight: "bold",
  799. // color: "#464646",
  800. // }
  801. },
  802. color: ['#5470c6'],
  803. yAxis: {
  804. type: 'category',
  805. data: ['超时未确认任务', '未确认任务', '维修中', '维修任务总量']
  806. },
  807. xAxis: {
  808. type: 'value',
  809. },
  810. grid: {
  811. left: '3%',
  812. right: '4%',
  813. bottom: '18%',
  814. containLabel: true
  815. },
  816. series: [
  817. {
  818. data: [
  819. {
  820. value: 0,
  821. itemStyle: {
  822. color: 'rgba(238, 122, 122,1.0)'
  823. },
  824. showpercent: true,
  825. percent: 0
  826. },
  827. {
  828. value: 0,
  829. itemStyle: {
  830. color: 'rgba(250, 200, 88,1.0)'
  831. },
  832. showpercent: true,
  833. percent: 0
  834. },
  835. {
  836. value: 0,
  837. itemStyle: {
  838. color: 'rgba(145, 204, 122,1.0)'
  839. },
  840. showpercent: true,
  841. percent: 0
  842. },
  843. {
  844. value: 0,
  845. itemStyle: {
  846. color: 'rgba(84, 112, 198,1.0)'
  847. },
  848. showpercent: false,
  849. percent: 0
  850. },
  851. ],
  852. type: 'bar',
  853. barWidth: 20,
  854. label: {
  855. show: true,
  856. position: 'insideLeft',
  857. formatter(params) {
  858. if (params.data.showpercent) {
  859. return ' ' + params.data.value + ' / ' + params.data.percent + '%';
  860. } else {
  861. return ' ' + params.data.value;
  862. }
  863. }
  864. },
  865. }
  866. ]
  867. },
  868. equipmentInspectionChartMap: null,
  869. equipmentInspectionCountOption: {
  870. tooltip: {
  871. trigger: 'axis',
  872. axisPointer: {
  873. type: 'shadow',
  874. },
  875. showContent: true,
  876. formatter: function (params) {
  877. // console.log(JSON.stringify(params))
  878. if (params[0].data.showpercent) {
  879. // return "点击柱状图可查看详情";
  880. return '<b>已巡检:' + params[0].data.value + '</b><br/><b>百分比:' + params[0].data.percent + '</b><br/><b>点击打开列表页</b>';
  881. } else {
  882. return "点击跳转到设备巡检管理页面";
  883. }
  884. },
  885. textStyle: {
  886. fontSize: 10
  887. }
  888. },
  889. title: {
  890. text: '本年度设备巡检统计信息',
  891. left: 'center',
  892. subtext: '实时统计'
  893. // textStyle: {
  894. // fontSize: 16,
  895. // fontWeight: "bold",
  896. // color: "#464646",
  897. // }
  898. },
  899. color: ['#5470c6'],
  900. yAxis: {
  901. type: 'category',
  902. data: ['汛中(二)已巡检', '汛中(一)已巡检', '汛前已巡检', '需巡检站点数量']
  903. },
  904. xAxis: {
  905. type: 'value',
  906. },
  907. grid: {
  908. left: '3%',
  909. right: '4%',
  910. bottom: '18%',
  911. containLabel: true
  912. },
  913. series: [
  914. {
  915. data: [
  916. {
  917. value: 0,
  918. itemStyle: {
  919. color: 'rgba(145, 204, 122,1.0)'
  920. },
  921. showpercent: true,
  922. percent: 0
  923. },
  924. {
  925. value: 0,
  926. itemStyle: {
  927. color: 'rgba(145, 204, 122,1.0)'
  928. },
  929. showpercent: true,
  930. percent: 0
  931. },
  932. {
  933. value: 0,
  934. itemStyle: {
  935. color: 'rgba(145, 204, 122,1.0)'
  936. },
  937. showpercent: true,
  938. percent: 4
  939. },
  940. {
  941. value: 0,
  942. itemStyle: {
  943. color: 'rgba(84, 112, 198,1.0)'
  944. },
  945. showpercent: false,
  946. percent: 0
  947. },
  948. ],
  949. type: 'bar',
  950. barWidth: 20,
  951. label: {
  952. show: true,
  953. position: 'insideLeft',
  954. formatter(params) {
  955. if (params.data.showpercent) {
  956. return ' ' + params.data.value + ' / ' + params.data.percent + '%';
  957. } else {
  958. return ' ' + params.data.value;
  959. }
  960. }
  961. },
  962. }
  963. ]
  964. },
  965. rtuWarnCountMap: null,
  966. rtuWarnCountOption: {
  967. tooltip: {
  968. trigger: 'axis',
  969. axisPointer: {
  970. type: 'shadow',
  971. },
  972. showContent: true,
  973. formatter: function (params) {
  974. // console.log(JSON.stringify(params))
  975. if (params[0].data.showpercent) {
  976. //return "点击柱状图可查看详情";
  977. return '<b>' + params[0].name + ':' + params[0].data.value + '</b><br/><b>百分比:' + params[0].data.percent + '</b><br/><b>点击打开列表页</b>';
  978. } else {
  979. return '<b>' + params[0].name + ':' + params[0].data.value + '</b><br/><b>点击打开列表页</b>';
  980. }
  981. },
  982. textStyle: {
  983. fontSize: 10
  984. }
  985. },
  986. title: {
  987. text: '测站异常分类统计信息',
  988. left: 'center',
  989. subtext: '实时统计'
  990. // textStyle: {
  991. // fontSize: 16,
  992. // fontWeight: "bold",
  993. // color: "#464646",
  994. // }
  995. },
  996. color: ['#5470c6'],
  997. yAxis: {
  998. type: 'category',
  999. data: ['疑似异常值', '水位站小时报上报延时', '雨量站小时报上报延时', '5分钟上报延时', '水位站小时报漏报', '雨量站小时报漏报', '时钟异常', '离线', '异常测站总数']
  1000. },
  1001. xAxis: {
  1002. type: 'value',
  1003. },
  1004. grid: {
  1005. left: '3%',
  1006. right: '4%',
  1007. bottom: '10%',
  1008. containLabel: true
  1009. },
  1010. series: [
  1011. {
  1012. data: [
  1013. {
  1014. value: 0,
  1015. itemStyle: {
  1016. color: 'rgba(238, 122, 122,1.0)'
  1017. },
  1018. showpercent: true,
  1019. percent: 0
  1020. },
  1021. {
  1022. value: 0,
  1023. itemStyle: {
  1024. color: 'rgba(238, 122, 122,1.0)'
  1025. },
  1026. showpercent: true,
  1027. percent: 0
  1028. },
  1029. {
  1030. value: 0,
  1031. itemStyle: {
  1032. color: 'rgba(238, 122, 122,1.0)'
  1033. },
  1034. showpercent: true,
  1035. percent: 0
  1036. },
  1037. {
  1038. value: 0,
  1039. itemStyle: {
  1040. color: 'rgba(238, 122, 122,1.0)'
  1041. },
  1042. showpercent: true,
  1043. percent: 0
  1044. },
  1045. {
  1046. value: 0,
  1047. itemStyle: {
  1048. color: 'rgba(238, 122, 122,1.0)'
  1049. },
  1050. showpercent: true,
  1051. percent: 0
  1052. },
  1053. {
  1054. value: 0,
  1055. itemStyle: {
  1056. color: 'rgba(238, 122, 122,1.0)'
  1057. },
  1058. showpercent: true,
  1059. percent: 0
  1060. },
  1061. {
  1062. value: 0,
  1063. itemStyle: {
  1064. color: 'rgba(238, 122, 122,1.0)'
  1065. },
  1066. showpercent: true,
  1067. percent: 0
  1068. },
  1069. {
  1070. value: 0,
  1071. itemStyle: {
  1072. color: 'rgba(238, 122, 122,1.0)'
  1073. },
  1074. showpercent: true,
  1075. percent: 0
  1076. },
  1077. {
  1078. value: 0,
  1079. itemStyle: {
  1080. color: 'rgba(84, 112, 198,1.0)'
  1081. },
  1082. showpercent: false,
  1083. percent: 0
  1084. },
  1085. ],
  1086. type: 'bar',
  1087. barWidth: 20,
  1088. label: {
  1089. show: true,
  1090. position: 'insideLeft',
  1091. formatter(params) {
  1092. if (params.data.showpercent) {
  1093. return ' ' + params.data.value + ' / ' + params.data.percent + '%';
  1094. } else {
  1095. return ' ' + params.data.value;
  1096. }
  1097. }
  1098. },
  1099. }
  1100. ]
  1101. },
  1102. };
  1103. },
  1104. created() {
  1105. // let u = getStore({ name: 'userInfo' });
  1106. console.log(JSON.stringify(this.userInfo));
  1107. // this.getData();
  1108. if (this.userInfo.role_name === "sys_admin") {
  1109. this.adminPageStyle = true;
  1110. }
  1111. },
  1112. computed: {
  1113. ...mapGetters(["userInfo"]),
  1114. },
  1115. mounted() {
  1116. console.log("mounted ++++++++++++++++++++");
  1117. // this.initWebsocket();
  1118. var that = this;
  1119. let chart = this.$refs.rtuInfoCountPieChart;
  1120. if (chart) {
  1121. this.rtuInfoCountPieMap = this.$echarts.init(chart);
  1122. this.rtuInfoCountPieMap.setOption(this.rtuInfoCountPieOption);
  1123. // this.rtuInfoCountPieMap.off('click');
  1124. // this.rtuInfoCountPieMap.on('click', function (p) {
  1125. // console.log(p)
  1126. // if (p.name === '设备异常') {
  1127. // that.warninglistDig = true;
  1128. // that.$nextTick(() => {
  1129. // that.$refs['warninglist'].init();
  1130. // });
  1131. // }
  1132. // })
  1133. }
  1134. chart = this.$refs.rtuDataUpCountChart;
  1135. if (chart) {
  1136. this.rtuDataUpCountMap = this.$echarts.init(chart);
  1137. this.rtuDataUpCountMap.setOption(this.rtuDataUpCountOption);
  1138. // this.rtuDataUpCountMap.off('click');
  1139. // this.rtuDataUpCountMap.on('click', function (p) {
  1140. // console.log(p)
  1141. // })
  1142. this.rtuDataUpCountMap.getZr().off('click');
  1143. this.rtuDataUpCountMap.getZr().on('click', function (p) {
  1144. let pointInPixel = [p.offsetX, p.offsetY];
  1145. if (that.rtuDataUpCountMap.containPixel('grid', pointInPixel)) {
  1146. let yIndex = that.rtuDataUpCountMap.convertFromPixel({ seriesIndex: 0 }, [p.offsetX, p.offsetY])[1];
  1147. //let yData=that.checkOrderCountOption.yAxis.data[yIndex];//当前点击柱子的数据
  1148. // let value = that.rtuDataUpCountOption.series[0].data[yIndex].value;
  1149. if (yIndex == 2) {
  1150. that.$router.push({ path: '/business/data/rainDataCache' });
  1151. } else if (yIndex == 1) {
  1152. that.$router.push({ path: '/business/data/riverDataCache' });
  1153. } else if (yIndex == 0) {
  1154. that.$router.push({ path: '/business/data/groundDataCache' });
  1155. }
  1156. }
  1157. });
  1158. }
  1159. chart = this.$refs.checkOrderChart;
  1160. if (chart) {
  1161. this.checkOrderMap = this.$echarts.init(chart);
  1162. this.checkOrderMap.setOption(this.checkOrderCountOption);
  1163. this.checkOrderMap.getZr().off('click');
  1164. this.checkOrderMap.getZr().on('click', function (p) {
  1165. console.log("checkOrderChart zr ++++++++++++++++++++++++++++++++++++")
  1166. let pointInPixel = [p.offsetX, p.offsetY];
  1167. if (that.checkOrderMap.containPixel('grid', pointInPixel)) {
  1168. let yIndex = that.checkOrderMap.convertFromPixel({ seriesIndex: 0 }, [p.offsetX, p.offsetY])[1];
  1169. //let yData=that.checkOrderCountOption.yAxis.data[yIndex];//当前点击柱子的数据
  1170. let value = that.checkOrderCountOption.series[0].data[yIndex].value;
  1171. if (yIndex == 3) {
  1172. console.log("维修数量 index " + yIndex)
  1173. that.$router.push({ path: '/business/order/checkorderlist' });
  1174. } else if (yIndex == 2) {
  1175. if (value > 0) {
  1176. console.log("维修中 index " + yIndex)
  1177. that.processingcheckorderlistDig = true;
  1178. that.$nextTick(() => {
  1179. that.$refs["processingcheckorderlist"].init();
  1180. });
  1181. } else {
  1182. that.$message.warning("维修中暂无数据");
  1183. }
  1184. } else if (yIndex == 1) {
  1185. if (value > 0) {
  1186. console.log("未确认 index " + yIndex)
  1187. that.uncomfireCheckOrderDig = true;
  1188. that.$nextTick(() => {
  1189. that.$refs["uncomfirecheckorderlist"].init();
  1190. });
  1191. } else {
  1192. that.$message.warning("未确认维修任务暂无数据");
  1193. }
  1194. } else if (yIndex == 0) {
  1195. if (value > 0) {
  1196. console.log("超时未确认 index " + yIndex)
  1197. that.comfireDelayCheckOrderDig = true;
  1198. that.$nextTick(() => {
  1199. that.$refs["comfiredelaycheckorderlist"].init();
  1200. });
  1201. } else {
  1202. that.$message.warning("超时未确认维修任务暂无数据");
  1203. }
  1204. }
  1205. }
  1206. });
  1207. // this.checkOrderMap.off('click');
  1208. // this.checkOrderMap.on('click', function (p) {
  1209. // console.log("checkOrderChart++++++++++++++++++++++++++++++++++++")
  1210. // if (p.name === '维修任务数量') {
  1211. // that.$router.push({ name: 'checkordermanagepage' });
  1212. // } else if (p.name === '维修中') {
  1213. // } else if (p.name === '未确认任务') {
  1214. // that.uncomfireCheckOrderDig = true;
  1215. // that.$nextTick(() => {
  1216. // that.$refs["uncomfirecheckorderlist"].init();
  1217. // });
  1218. // } else if (p.name === '超时未确认任务') {
  1219. // that.comfireDelayCheckOrderDig = true;
  1220. // that.$nextTick(() => {
  1221. // that.$refs["comfiredelaycheckorderlist"].init();
  1222. // });
  1223. // }
  1224. // })
  1225. }
  1226. chart = this.$refs.equipmentInspectionCountChart;
  1227. if (chart) {
  1228. this.equipmentInspectionChartMap = this.$echarts.init(chart);
  1229. this.equipmentInspectionChartMap.setOption(this.equipmentInspectionCountOption);
  1230. this.equipmentInspectionChartMap.getZr().off('click');
  1231. this.equipmentInspectionChartMap.getZr().on('click', function (p) {
  1232. console.log("checkOrderChart zr ++++++++++++++++++++++++++++++++++++")
  1233. let pointInPixel = [p.offsetX, p.offsetY];
  1234. if (that.equipmentInspectionChartMap.containPixel('grid', pointInPixel)) {
  1235. let yIndex = that.equipmentInspectionChartMap.convertFromPixel({ seriesIndex: 0 }, [p.offsetX, p.offsetY])[1];
  1236. //let yData = that.equipmentInspectionCountOption.yAxis.data[yIndex];//当前点击柱子的数据
  1237. let value = that.equipmentInspectionCountOption.series[0].data[yIndex].value;
  1238. console.log(" yData " + value)
  1239. if (yIndex == 3) {
  1240. console.log("巡检数量 index " + yIndex)
  1241. that.$router.push({ path: '/business/inspection/index' });
  1242. } else if (yIndex == 2) {
  1243. if (value > 0) {
  1244. console.log("汛前 index " + yIndex)
  1245. that.rainSeasonKind = 1;
  1246. that.inspectionreportlistDig = true;
  1247. that.dialogTitle = '汛前已巡检信息';
  1248. that.$nextTick(() => {
  1249. that.$refs["inspectionreportlist"].init();
  1250. });
  1251. } else {
  1252. that.$message.warning("汛前巡检暂无上报数据");
  1253. }
  1254. } else if (yIndex == 1) {
  1255. if (value > 0) {
  1256. console.log("汛中一 index " + yIndex)
  1257. that.rainSeasonKind = 2;
  1258. that.inspectionreportlistDig = true;
  1259. that.dialogTitle = '汛中(一)已巡检信息';
  1260. that.$nextTick(() => {
  1261. that.$refs["inspectionreportlist"].init();
  1262. });
  1263. } else {
  1264. that.$message.warning("汛中第一次巡检暂无上报数据");
  1265. }
  1266. } else if (yIndex == 0) {
  1267. if (value > 0) {
  1268. console.log("汛中二 index " + yIndex)
  1269. that.rainSeasonKind = 3;
  1270. that.inspectionreportlistDig = true;
  1271. that.dialogTitle = '汛中(二)已巡检信息';
  1272. that.$nextTick(() => {
  1273. that.$refs["inspectionreportlist"].init();
  1274. });
  1275. } else {
  1276. that.$message.warning("汛中第二次巡检暂无上报数据");
  1277. }
  1278. }
  1279. }
  1280. });
  1281. // this.equipmentInspectionChartMap.off('click')
  1282. // this.equipmentInspectionChartMap.on('click', function (p) {
  1283. // console.log(p)
  1284. // })
  1285. }
  1286. chart = this.$refs.rtuWarnCountChart;
  1287. if (chart) {
  1288. this.rtuWarnCountMap = this.$echarts.init(chart);
  1289. this.rtuWarnCountMap.setOption(this.rtuWarnCountOption);
  1290. this.rtuWarnCountMap.getZr().off('click');
  1291. this.rtuWarnCountMap.getZr().on('click', function (p) {
  1292. console.log(p)
  1293. let pointInPixel = [p.offsetX, p.offsetY];
  1294. if (that.rtuWarnCountMap.containPixel('grid', pointInPixel)) {
  1295. let yIndex = that.rtuWarnCountMap.convertFromPixel({ seriesIndex: 0 }, [p.offsetX, p.offsetY])[1];
  1296. let name = that.rtuWarnCountOption.yAxis.data[yIndex];
  1297. let value = that.rtuWarnCountOption.series[0].data[yIndex].value;
  1298. if (name === '异常测站总数') {
  1299. if (value > 0) {
  1300. that.warninglistDig = true;
  1301. that.$nextTick(() => {
  1302. that.$refs["warninglist"].init();
  1303. });
  1304. } else {
  1305. that.$message.warning("暂无异常数据");
  1306. }
  1307. } else if (name === '离线') {
  1308. if (value > 0) {
  1309. that.offlineWarnListDig = true;
  1310. that.$nextTick(() => {
  1311. that.$refs["offlinewarnlist"].init();
  1312. });
  1313. } else {
  1314. that.$message.warning("暂无异常数据");
  1315. }
  1316. } else if (name === '时钟异常') {
  1317. if (value > 0) {
  1318. that.clockWarnListDig = true;
  1319. that.$nextTick(() => {
  1320. that.$refs["clockwarnlist"].init();
  1321. });
  1322. } else {
  1323. that.$message.warning("暂无异常数据");
  1324. }
  1325. } else if (name === '雨量站小时报漏报') {
  1326. if (value > 0) {
  1327. that.rainHourmissoutWarnListDig = true;
  1328. that.$nextTick(() => {
  1329. that.$refs["rainHourmissoutWarnList"].init();
  1330. });
  1331. } else {
  1332. that.$message.warning("暂无异常数据");
  1333. }
  1334. } else if (name === '水位站小时报漏报') {
  1335. if (value > 0) {
  1336. that.riverHourmissoutWarnListDig = true;
  1337. that.$nextTick(() => {
  1338. that.$refs["riverHourmissoutWarnList"].init();
  1339. });
  1340. } else {
  1341. that.$message.warning("暂无异常数据");
  1342. }
  1343. } else if (name === '5分钟上报延时') {
  1344. if (value > 0) {
  1345. that.minupdelayWarnListDig = true;
  1346. that.$nextTick(() => {
  1347. that.$refs["minupdelaywarnlist"].init();
  1348. });
  1349. } else {
  1350. that.$message.warning("暂无异常数据");
  1351. }
  1352. } else if (name === '雨量站小时报上报延时') {
  1353. if (value > 0) {
  1354. that.rainHourupdelayWarnListDig = true;
  1355. that.$nextTick(() => {
  1356. that.$refs["rainhourupdelaywarnlist"].init();
  1357. });
  1358. } else {
  1359. that.$message.warning("暂无异常数据");
  1360. }
  1361. } else if (name === '水位站小时报上报延时') {
  1362. if (value > 0) {
  1363. that.riverHourupdelayWarnListDig = true;
  1364. that.$nextTick(() => {
  1365. that.$refs["riverhourupdelaywarnlist"].init();
  1366. });
  1367. } else {
  1368. that.$message.warning("暂无异常数据");
  1369. }
  1370. } else if (name === '疑似异常值') {
  1371. if (value > 0) {
  1372. that.outlterValueWarnListDig = true;
  1373. that.$nextTick(() => {
  1374. that.$refs["outlitervaluewarnlist"].init();
  1375. });
  1376. } else {
  1377. that.$message.warning("暂无异常数据");
  1378. }
  1379. }
  1380. }
  1381. })
  1382. }
  1383. this.$nextTick(() => {
  1384. this.loadData();
  1385. });
  1386. },
  1387. beforeDestroy() {
  1388. console.log("beforeDestroy ++++++++++++++++++++");
  1389. // this.closeSocket();
  1390. if (this.timer != null) {
  1391. console.log("clear timer ++++++++++++++ ")
  1392. clearInterval(this.timer);
  1393. this.timer = null;
  1394. }
  1395. },
  1396. methods: {
  1397. loadData() {
  1398. this.getCountData();
  1399. if (this.timer == null) {
  1400. this.timer = setInterval(this.timeCall, 10000);
  1401. }
  1402. },
  1403. onLoad() {
  1404. this.loading = true;
  1405. getWarnCountList().then((res) => {
  1406. this.data = res.data.data;
  1407. this.loading = false;
  1408. });
  1409. },
  1410. timeCall() {
  1411. console.log("time ++++++++++++++++++++");
  1412. this.getCountData();
  1413. this.getWarnCountList().then((res) => {
  1414. this.data = res.data.data;
  1415. });
  1416. },
  1417. close() {
  1418. this.dialog = false;
  1419. },
  1420. cellClick(row, column, cell, event) {
  1421. if (event.isTrusted) {
  1422. if (column.label === '测站离线') {
  1423. if (row.warnOffline) {
  1424. this.deptId = row.deptId;
  1425. this.offlineWarnListDig = true;
  1426. console.log("warn offline " + this.deptId)
  1427. this.$nextTick(() => {
  1428. this.$refs["offlinewarnlist"].init();
  1429. });
  1430. }
  1431. } else if (column.label === '小时报漏报') {
  1432. if (row.warnMissOut) {
  1433. this.deptId = row.deptId;
  1434. this.hourmissoutWarnListDig = true;
  1435. this.$nextTick(() => {
  1436. this.$refs["hourmissoutwarnlist"].init();
  1437. });
  1438. }
  1439. } else if (column.label === '5分钟上报延时') {
  1440. if (row.warnUpMinDelay) {
  1441. this.deptId = row.deptId;
  1442. this.minupdelayWarnListDig = true;
  1443. this.$nextTick(() => {
  1444. this.$refs["minupdelaywarnlist"].init();
  1445. });
  1446. }
  1447. } else if (column.label === '小时上报延时') {
  1448. if (row.warnUpHourDelay) {
  1449. this.deptId = row.deptId;
  1450. this.hourupdelayWarnListDig = true;
  1451. this.$nextTick(() => {
  1452. this.$refs["hourupdelaywarnlist"].init();
  1453. });
  1454. }
  1455. }
  1456. }
  1457. },
  1458. openMoreTodayOrderProcess() {
  1459. this.moreTodayOrderProcessDig = true;
  1460. this.$nextTick(() => {
  1461. this.$refs["todaycheckorderprocesslist"].init();
  1462. });
  1463. },
  1464. openMoreTodayInspectionReport() {
  1465. this.moreTodayInspectionReportDig = true;
  1466. this.$nextTick(() => {
  1467. this.$refs["todaynspectionrportlist"].init();
  1468. });
  1469. },
  1470. openMoreNotice() {
  1471. this.moreNoticeDig = true;
  1472. this.$nextTick(() => {
  1473. this.$refs["todaynoticelist"].init();
  1474. });
  1475. },
  1476. openCheckOrderReportDetail(item) {
  1477. this.checkOrderReportId = item.orderId;
  1478. this.checkorderprocessdetailDig = true;
  1479. this.$nextTick(() => {
  1480. this.$refs["checkorderprocessdetail"].init();
  1481. });
  1482. },
  1483. openInspectionReportDetail(item) {
  1484. this.inspectionReportId = item.id;
  1485. this.inspectionreportdetailDig = true;
  1486. this.$nextTick(() => {
  1487. this.$refs["inspectionreportdetail"].init();
  1488. });
  1489. },
  1490. downloadApk() {
  1491. if (this.appinfo.apkUrl !== '') {
  1492. window.open(this.appinfo.apkUrl);
  1493. }
  1494. },
  1495. getCountData() {
  1496. getRtuStatusCountData().then((res) => {
  1497. console.log("status count " + JSON.stringify(res.data))
  1498. if (res.data.code === 200) {
  1499. let data = res.data.data;
  1500. let num = new Number((data.rtus - data.warningRtus) / data.rtus * 100);
  1501. this.rtuInfoCountPieOption.series[0].data[0].value = data.rtus - data.warningRtus;
  1502. this.rtuInfoCountPieOption.series[0].data[0].percent = num.toFixed(2);
  1503. num = new Number(data.offlineRtus / data.rtus * 100);
  1504. this.rtuInfoCountPieOption.series[0].data[1].value = data.offlineRtus;
  1505. this.rtuInfoCountPieOption.series[0].data[1].percent = num.toFixed(2);
  1506. num = new Number((data.warningRtus - data.offlineRtus) / data.rtus * 100);
  1507. this.rtuInfoCountPieOption.series[0].data[0].value = data.warningRtus - data.offlineRtus;
  1508. this.rtuInfoCountPieOption.series[0].data[0].percent = num.toFixed(2);
  1509. this.rtuInfoCountPieMap.setOption(this.rtuInfoCountPieOption);
  1510. }
  1511. });
  1512. getRtuUpCountData().then((res) => {
  1513. console.log("up count " + JSON.stringify(res.data))
  1514. if (res.data.code === 200) {
  1515. let data = res.data.data;
  1516. this.rtuDataUpCountOption.series[0].data[2].value = data.rainRtuCount;
  1517. this.rtuDataUpCountOption.series[0].data[1].value = data.riverRtuCount;
  1518. this.rtuDataUpCountOption.series[0].data[0].value = data.groundRtuCount;
  1519. let num = new Number(data.rainUpDataCount / data.rainRtuCount * 100);
  1520. this.rtuDataUpCountOption.series[1].data[2].value = data.rainUpDataCount;
  1521. this.rtuDataUpCountOption.series[1].data[2].percent = num.toFixed(2);
  1522. num = new Number(data.riverUpDataCount / data.riverRtuCount * 100);
  1523. this.rtuDataUpCountOption.series[1].data[1].value = data.riverUpDataCount;
  1524. this.rtuDataUpCountOption.series[1].data[1].percent = num.toFixed(2);
  1525. num = new Number(data.groundUpDataCount / data.groundRtuCount * 100);
  1526. this.rtuDataUpCountOption.series[1].data[0].value = data.groundUpDataCount;
  1527. this.rtuDataUpCountOption.series[1].data[0].percent = num.toFixed(2);
  1528. this.rtuDataUpCountMap.setOption(this.rtuDataUpCountOption);
  1529. }
  1530. });
  1531. getCheckOrderCountData().then((res) => {
  1532. console.log("CheckOrder count " + JSON.stringify(res.data))
  1533. if (res.data.code === 200) {
  1534. let data = res.data.data;
  1535. this.checkOrderCountOption.series[0].data[3].value = data.orderCount;
  1536. let num = new Number((data.orderCount - data.unconfirmOrderCount) / data.orderCount * 100);
  1537. this.checkOrderCountOption.series[0].data[2].value = data.orderCount - data.unconfirmOrderCount;
  1538. this.checkOrderCountOption.series[0].data[2].percent = num.toFixed(2);
  1539. num = new Number(data.unconfirmOrderCount / data.orderCount * 100);
  1540. this.checkOrderCountOption.series[0].data[1].value = data.unconfirmOrderCount;
  1541. this.checkOrderCountOption.series[0].data[1].percent = num.toFixed(2);
  1542. num = new Number(data.delayComfireOrders / data.orderCount * 100);
  1543. this.checkOrderCountOption.series[0].data[0].value = data.delayComfireOrders;
  1544. this.checkOrderCountOption.series[0].data[0].percent = num.toFixed(2);
  1545. this.checkOrderMap.setOption(this.checkOrderCountOption);
  1546. }
  1547. });
  1548. getInspectionReportCountData().then((res) => {
  1549. console.log("InspectionReport count " + JSON.stringify(res.data))
  1550. if (res.data.code === 200) {
  1551. let data = res.data.data;
  1552. this.equipmentInspectionCountOption.series[0].data[3].value = data.equipmentInspectionCount;
  1553. let num = new Number(data.equipmentInspectionBeforeRainReports / data.equipmentInspectionCount * 100);
  1554. this.equipmentInspectionCountOption.series[0].data[2].value = data.equipmentInspectionBeforeRainReports;
  1555. this.equipmentInspectionCountOption.series[0].data[2].percent = num.toFixed(2);
  1556. num = new Number(data.equipmentInspectionRainFirstReports / data.equipmentInspectionCount * 100);
  1557. this.equipmentInspectionCountOption.series[0].data[1].value = data.equipmentInspectionRainFirstReports;
  1558. this.equipmentInspectionCountOption.series[0].data[1].percent = num.toFixed(2);
  1559. num = new Number(data.equipmentInspectionRainSecondReports / data.equipmentInspectionCount * 100);
  1560. this.equipmentInspectionCountOption.series[0].data[0].value = data.equipmentInspectionRainSecondReports;
  1561. this.equipmentInspectionCountOption.series[0].data[0].percent = num.toFixed(2);
  1562. this.equipmentInspectionChartMap.setOption(this.equipmentInspectionCountOption);
  1563. }
  1564. });
  1565. getWarnKindCountData().then((res) => {
  1566. console.log("warn kind count " + JSON.stringify(res.data))
  1567. if (res.data.code === 200) {
  1568. let data = res.data.data;
  1569. this.rtuWarnCountOption.series[0].data[8].value = data.warnRtus;
  1570. let num = new Number(data.offlineRtus / data.warnRtus * 100);
  1571. this.rtuWarnCountOption.series[0].data[7].value = data.offlineRtus;
  1572. this.rtuWarnCountOption.series[0].data[7].percent = num.toFixed(2);
  1573. num = new Number(data.clockWarn / data.warnRtus * 100);
  1574. this.rtuWarnCountOption.series[0].data[6].value = data.clockWarn;
  1575. this.rtuWarnCountOption.series[0].data[6].percent = num.toFixed(2);
  1576. num = new Number(data.rainUpMissOut / data.warnRtus * 100);
  1577. this.rtuWarnCountOption.series[0].data[5].value = data.rainUpMissOut;
  1578. this.rtuWarnCountOption.series[0].data[5].percent = num.toFixed(2);
  1579. num = new Number(data.riverUpMissOut / data.warnRtus * 100);
  1580. this.rtuWarnCountOption.series[0].data[4].value = data.riverUpMissOut;
  1581. this.rtuWarnCountOption.series[0].data[4].percent = num.toFixed(2);
  1582. num = new Number(data.minUpDelay / data.warnRtus * 100);
  1583. this.rtuWarnCountOption.series[0].data[3].value = data.minUpDelay;
  1584. this.rtuWarnCountOption.series[0].data[3].percent = num.toFixed(2);
  1585. num = new Number(data.rainHourUpDelay / data.warnRtus * 100);
  1586. this.rtuWarnCountOption.series[0].data[2].value = data.rainHourUpDelay;
  1587. this.rtuWarnCountOption.series[0].data[2].percent = num.toFixed(2);
  1588. num = new Number(data.riverHourUpDelay / data.warnRtus * 100);
  1589. this.rtuWarnCountOption.series[0].data[1].value = data.riverHourUpDelay;
  1590. this.rtuWarnCountOption.series[0].data[1].percent = num.toFixed(2);
  1591. num = new Number(data.outlierValue / data.warnRtus * 100);
  1592. this.rtuWarnCountOption.series[0].data[0].value = data.outlierValue;
  1593. this.rtuWarnCountOption.series[0].data[0].percent = num.toFixed(2);
  1594. this.rtuWarnCountMap.setOption(this.rtuWarnCountOption);
  1595. }
  1596. });
  1597. todayOrderProcessList().then((res) => {
  1598. this.todayOrderList = [];
  1599. let showCount = 3;
  1600. if (this.adminPageStyle) {
  1601. showCount = 1;
  1602. }
  1603. for (let i = 0; i < showCount && i < res.data.data.length; i++) {
  1604. this.todayOrderList.push(res.data.data[i]);
  1605. }
  1606. });
  1607. todayInspectionReportList().then((res) => {
  1608. this.todayInspectionReportList = [];
  1609. let showCount = 3;
  1610. if (this.adminPageStyle) {
  1611. showCount = 1;
  1612. }
  1613. for (let i = 0; i < showCount && i < res.data.data.length; i++) {
  1614. this.todayInspectionReportList.push(res.data.data[i]);
  1615. }
  1616. });
  1617. getLastList(1).then((res) => {
  1618. this.noticeList = [];
  1619. this.noticeList = res.data.data;
  1620. });
  1621. getAppInfo().then((res) => {
  1622. console.log(JSON.stringify(res.data.data))
  1623. this.appinfo = res.data.data;
  1624. });
  1625. },
  1626. changeState(state) {
  1627. this.state = state;
  1628. if (state != 5) {
  1629. if (this.timer) clearInterval(this.timer);
  1630. this.timer = setInterval(() => {
  1631. this.second++;
  1632. }, 1000);
  1633. } else {
  1634. if (this.timer) {
  1635. clearInterval(this.timer);
  1636. }
  1637. this.second = 0;
  1638. }
  1639. },
  1640. confirm() {
  1641. // let arr = this.layout.map((e) => {
  1642. // return {
  1643. // x: e.x,
  1644. // y: e.y,
  1645. // width: e.w,
  1646. // height: e.h,
  1647. // isShow: e.isShow,
  1648. // moduleName: e.i,
  1649. // moduleCode: e.i,
  1650. // };
  1651. // });
  1652. // let params = {
  1653. // layoutId: "",
  1654. // homeLayoutDetailEntityList: arr,
  1655. // };
  1656. // insertCustom(params).then((res) => {});
  1657. // this.cache = [...this.layout];
  1658. // this.editSw = false;
  1659. },
  1660. /**
  1661. * 建立websocket连接
  1662. */
  1663. // initWebsocket: function () {
  1664. // console.log("WebSocket 准备建立连接");
  1665. // const socket = new SockJS("/api/galaxy-yjjcpt/ws");
  1666. // this.stompClient = Stomp.over(socket);
  1667. // this.stompClient.connect({}, this.onConnected, this.onError);
  1668. // },
  1669. /**
  1670. * 连接成功: 订阅服务器的地址。为了浏览器可以接收到消息,必须先订阅服务器的地址
  1671. */
  1672. // onConnected: function () {
  1673. // console.log("WebSocket 连接成功");
  1674. // // 设置心跳发送接受频率(ms)默认为10000ms。 heart-beating是利用window.setInterval()去规律地发送heart-beats或者检查服务端的heart-beats。
  1675. // this.stompClient.heartbeat.outgoing = 10000;
  1676. // this.stompClient.heartbeat.incoming = 0;
  1677. // // 订阅
  1678. // this.stompClient.subscribe("/topic/event", this.onMessageReceived);
  1679. // },
  1680. /**
  1681. * 连接失败
  1682. */
  1683. // onError: function (error) {
  1684. // console.log("WebSocket 连接失败", error);
  1685. // },
  1686. /**
  1687. * 接收消息
  1688. */
  1689. // onMessageReceived: function (res) {
  1690. // console.log(res.body);
  1691. // console.log("WebSocket 接收消息-----------------------------------");
  1692. // },
  1693. /**
  1694. * 发送消息
  1695. */
  1696. // sendMessage: function () {
  1697. // const chatMessage = {
  1698. // sender: "",
  1699. // content: "",
  1700. // type: "CHAT",
  1701. // };
  1702. // this.stompClient.send(
  1703. // "/app/chat.sendMessage",
  1704. // {},
  1705. // JSON.stringify(chatMessage)
  1706. // );
  1707. // },
  1708. /**
  1709. * 关闭websocket连接
  1710. */
  1711. // closeSocket: function () {
  1712. // if (this.stompClient != null) {
  1713. // // this.stompClient.disconnect();
  1714. // this.stompClient.disconnect(() => {
  1715. // console.log("连接关闭");
  1716. // });
  1717. // }
  1718. // },
  1719. },
  1720. };
  1721. </script>
  1722. <style>
  1723. .box-card {
  1724. width: 100%;
  1725. height: 220px;
  1726. overflow-y: auto;
  1727. }
  1728. .box-high-card {
  1729. width: 100%;
  1730. height: 500px;
  1731. overflow-y: auto;
  1732. }
  1733. .box-small-card {
  1734. width: 100%;
  1735. height: 235px;
  1736. overflow-y: auto;
  1737. }
  1738. .box-card-news {
  1739. width: 100%;
  1740. height: 235px;
  1741. overflow-y: auto;
  1742. }
  1743. .box-card-apk {
  1744. width: 100%;
  1745. height: 235px;
  1746. }
  1747. .el-row {
  1748. margin-bottom: 20px;
  1749. }
  1750. .el-col {
  1751. border-radius: 4px;
  1752. }
  1753. .bg-purple-dark {
  1754. background: #99a9bf;
  1755. }
  1756. .bg-purple {
  1757. background: #d3dce6;
  1758. }
  1759. .bg-purple-light {
  1760. background: #e5e9f2;
  1761. }
  1762. .grid-content {
  1763. border-radius: 4px;
  1764. min-height: 36px;
  1765. }
  1766. .row-bg {
  1767. padding: 10px 0;
  1768. background-color: #f9fafc;
  1769. }
  1770. .list-item {
  1771. padding-top: 5px;
  1772. padding-left: 2px;
  1773. border-width: thin;
  1774. border-bottom-style: solid;
  1775. border-bottom-color: lightgray;
  1776. }
  1777. .notice-item {
  1778. padding-top: 5px;
  1779. padding-left: 2px;
  1780. border-width: thin;
  1781. border-bottom-style: solid;
  1782. border-bottom-color: lightgray;
  1783. }
  1784. .notice-time {
  1785. font-size: 0.8rem;
  1786. color: gray;
  1787. }
  1788. .notice-content {
  1789. font-size: 0.9rem;
  1790. white-space: nowrap;
  1791. overflow: hidden;
  1792. text-overflow: ellipsis;
  1793. }
  1794. </style>