index.vue 68 KB

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