f6e38c5f7377bdb4ff60a110a012a25e22128f1e.svn-base 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085
  1. <template>
  2. <div class="mainBox">
  3. <div class="leftContent">
  4. <div class="headerContent">
  5. <el-date-picker
  6. v-model="selectTime"
  7. type="daterange"
  8. @clear="clear"
  9. align="right"
  10. value-format="yyyy-MM-dd"
  11. unlink-panels
  12. range-separator="至"
  13. start-placeholder="开始日期"
  14. end-placeholder="结束日期"
  15. :picker-options="pickerOptions">
  16. </el-date-picker>
  17. <!-- <el-date-picker-->
  18. <!-- v-model="selectTime"-->
  19. <!-- type="datetimerange"-->
  20. <!-- @clear="clear"-->
  21. <!-- format="yyyy-MM-dd HH:mm:ss"-->
  22. <!-- value-format="yyyy-MM-dd HH:mm:ss"-->
  23. <!-- :picker-options="pickerOptions"-->
  24. <!-- range-separator="至"-->
  25. <!-- start-placeholder="开始日期"-->
  26. <!-- end-placeholder="结束日期"-->
  27. <!-- align="right">-->
  28. <!-- </el-date-picker>-->
  29. <el-select v-model="selectOrgNm" multiple collapse-tags @clear="clear" placeholder="请选择部门">
  30. <el-option
  31. v-for="item in optionsOrgNm"
  32. :key="item.value"
  33. :label="item.label"
  34. :value="item.value">
  35. </el-option>
  36. </el-select>
  37. </div>
  38. <div class="contentTop">
  39. <div class="contentTitle">
  40. <span class="iconTitle"></span>工作情况
  41. </div>
  42. <div class="contentData">
  43. <el-table
  44. :data="tableData1"
  45. @cell-click="cellClick_1"
  46. border
  47. :stripe="true"
  48. :cell-style="{'font-size':'10px','cursor':'pointer'}"
  49. :header-cell-style="{'font-size':'12px',background:'#606266'}"
  50. style="width: 100%;cursor:pointer;">
  51. <el-table-column
  52. prop="inspName"
  53. show-overflow-tooltip
  54. align="center"
  55. label="分类">
  56. </el-table-column>
  57. <el-table-column
  58. prop="PERSIZE"
  59. align="center"
  60. label="人次">
  61. </el-table-column>
  62. <el-table-column
  63. prop="GROUPSIZE"
  64. align="center"
  65. label="组次">
  66. </el-table-column>
  67. <el-table-column
  68. prop="OBJSIZE"
  69. align="center"
  70. label="对象">
  71. </el-table-column>
  72. <el-table-column
  73. prop="PBLMSIZE"
  74. align="center"
  75. label="问题">
  76. </el-table-column>
  77. <el-table-column
  78. prop="MENDSIZE"
  79. align="center"
  80. label="整改">
  81. </el-table-column>
  82. <el-table-column
  83. prop="PDSIZE"
  84. align="center"
  85. label="销号">
  86. </el-table-column>
  87. </el-table>
  88. </div>
  89. </div>
  90. <div class="contentBottom">
  91. <div class="contentTitle">
  92. <span class="iconTitle"></span>问题分类统计
  93. </div>
  94. <div class="contentData" id="chart1"></div>
  95. </div>
  96. </div>
  97. <div class="centerContent">
  98. <div class="headerContent">
  99. <p>青海省水利监督</p>
  100. </div>
  101. <div class="contentTopCenter">
  102. <div class="contentData" id="chart2"></div>
  103. </div>
  104. <div class="contentBottomCenter">
  105. <div class="contentTitle">
  106. <span class="iconTitle"></span>工作统计
  107. </div>
  108. <div class="contentData">
  109. <el-table
  110. :data="tableData2"
  111. border
  112. :stripe="true"
  113. @cell-click="cellClick_1"
  114. :cell-style="{'font-size':'10px'}"
  115. :header-cell-style="{'font-size':'12px',background:'#606266'}"
  116. style="width: 100%">
  117. <el-table-column
  118. prop="inspName"
  119. show-overflow-tooltip
  120. align="center"
  121. label="地区">
  122. </el-table-column>
  123. <el-table-column
  124. prop="PERSIZE"
  125. align="center"
  126. label="人次">
  127. </el-table-column>
  128. <el-table-column
  129. prop="GROUPSIZE"
  130. align="center"
  131. label="组次">
  132. </el-table-column>
  133. <el-table-column
  134. prop="OBJSIZE"
  135. align="center"
  136. label="对象">
  137. </el-table-column>
  138. <el-table-column
  139. prop="PBLMSIZE"
  140. align="center"
  141. label="问题">
  142. </el-table-column>
  143. <el-table-column
  144. prop="MENDSIZE"
  145. align="center"
  146. label="整改">
  147. </el-table-column>
  148. <el-table-column
  149. prop="PDSIZE"
  150. align="center"
  151. label="销号">
  152. </el-table-column>
  153. </el-table>
  154. </div>
  155. </div>
  156. </div>
  157. <div class="rightContent">
  158. <div class="headerContent">
  159. <div class="headDateP">{{currentTime}}</div>
  160. </div>
  161. <div class="contentTop">
  162. <div class="contentTitle">
  163. <span class="iconTitle"></span>督查统计
  164. </div>
  165. <div class="contentData" id="chart3"></div>
  166. </div>
  167. <div class="contentBottom">
  168. <div class="contentTitle">
  169. <span class="iconTitle"></span>问题等级统计
  170. </div>
  171. <div class="contentData" id="chart4"></div>
  172. </div>
  173. </div>
  174. <pblmList v-if="isShowPblmList" :param="pblmParam" @closeDialogPblm="closeDialogPblm"></pblmList>
  175. <pblmLogList v-if="isShowPblmLogList" :param="pblmLogParam" @closeDialogPblmLog="closeDialogPblmLog"></pblmLogList>
  176. <objList v-if="isShowObjList" :param="objParam" @closeDialogObj="closeDialogObj"></objList>
  177. <personList v-if="isShowPersonList" :param="personParam" @closeDialogPerson="closeDialogPerson"></personList>
  178. <groupList v-if="isShowGroupList" :param="groupParam" @closeDialogGroup="closeDialogGroup"></groupList>
  179. <mendList v-if="isShowMendList" :param="mendParam" @closeDialogMend="closeDialogMend"></mendList>
  180. </div>
  181. </template>
  182. <script>
  183. import echarts from "echarts";
  184. import '@util/echarts-gl.min.js';
  185. import axios from 'axios'
  186. import request from "@util/gw_ajax_request.js";
  187. import {formatDate} from "@util/gw_date.js"
  188. import { hostUrl } from "@util/global_variable.js";
  189. import pblmList from "./pblmList";
  190. import objList from "./objList";
  191. import personList from "./personList";
  192. import groupList from "./groupList";
  193. import mendList from "./mendList";
  194. import pblmLogList from "./pblmLogList";
  195. export default {
  196. components: {
  197. pblmList,
  198. objList,
  199. personList,
  200. groupList,
  201. mendList,
  202. pblmLogList
  203. },
  204. props: [],
  205. data() {
  206. //这里存放数据
  207. return {
  208. selectTime:[new Date().getFullYear()+"-01-01",new Date().getFullYear()+"-"+((new Date().getMonth()+1)<10?"0"+(new Date().getMonth()+1):(new Date().getMonth()+1))+"-"+(new Date().getDate()<10?"0"+new Date().getDate():new Date().getDate())],
  209. selectOrgNm:[],
  210. optionsOrgNm:[
  211. {
  212. label:'水资源处',
  213. value:'水资源处'
  214. },
  215. {
  216. label:'河湖处',
  217. value:'河湖处'
  218. },
  219. {
  220. label:'农水处',
  221. value:'农水处'
  222. },
  223. {
  224. label:'运管处',
  225. value:'运管处'
  226. },
  227. {
  228. label:'节水办',
  229. value:'节水办'
  230. },
  231. {
  232. label:'防御处',
  233. value:'防御处'
  234. },
  235. {
  236. label:'水保中心',
  237. value:'水保中心'
  238. },
  239. {
  240. label:'监督处',
  241. value:'监督处'
  242. }
  243. ],
  244. currentTime:"",
  245. pickerOptions: {
  246. shortcuts: [{
  247. text: '最近一周',
  248. onClick(picker) {
  249. const end = new Date();
  250. const start = new Date();
  251. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  252. picker.$emit('pick', [start, end]);
  253. }
  254. }, {
  255. text: '最近一个月',
  256. onClick(picker) {
  257. const end = new Date();
  258. const start = new Date();
  259. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  260. picker.$emit('pick', [start, end]);
  261. }
  262. }, {
  263. text: '最近三个月',
  264. onClick(picker) {
  265. const end = new Date();
  266. const start = new Date();
  267. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  268. picker.$emit('pick', [start, end]);
  269. }
  270. }]
  271. },
  272. tableData1: [],
  273. tableData2: [],
  274. chartData1:[],
  275. chartDataCate:{
  276. ERRORPBLMSIZE: 0,
  277. ERRORSPBLMSIZE: 0,
  278. INFOPBLMSIZE: 0,
  279. WARMPBLMSIZE: 0
  280. },
  281. chartMapData:{
  282. geoCoordMap:{},
  283. geoCoordMapList:[],
  284. },
  285. chartAdType:{
  286. xData:{},
  287. yData:[],
  288. },
  289. chart1:null,
  290. chart2:null,
  291. chart3:null,
  292. chart4:null,
  293. isShowPblmList:false,
  294. isShowPblmLogList:false,
  295. isShowObjList:false,
  296. isShowPersonList:false,
  297. isShowGroupList:false,
  298. isShowMendList:false,
  299. pblmParam:{},
  300. pblmLogParam:{},
  301. objParam:{},
  302. personParam:{},
  303. groupParam:{},
  304. mendParam:{}
  305. }
  306. },
  307. //监听属性 类似于data概念
  308. computed: {
  309. formatDateTime() {
  310. return formatDate
  311. },
  312. hostUrl(){
  313. return hostUrl
  314. },
  315. organNm() {
  316. return localStorage.getItem('currentOrgNm') ? localStorage.getItem('currentOrgNm') : ''
  317. },
  318. organCode() {
  319. return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
  320. },
  321. currentOrgId() {
  322. return localStorage.getItem('currentOrgId') ? localStorage.getItem('currentOrgId') : ''
  323. },
  324. },
  325. //监控data中的数据变化
  326. watch: {
  327. selectTime(val){
  328. if(!val){
  329. this.selectTime = [];
  330. }
  331. this.initTable_1();
  332. this.initTable_2();
  333. this.initData_1();
  334. this.initData_3();
  335. this.initData_4();
  336. },
  337. selectOrgNm(val){
  338. if(!val){
  339. this.selectOrgNm = [];
  340. }
  341. this.initTable_1();
  342. this.initTable_2();
  343. this.initData_1();
  344. this.initData_3();
  345. this.initData_4();
  346. }
  347. },
  348. //生命周期 - 创建完成(可以访问当前this实例)
  349. created() {
  350. },
  351. //生命周期 - 挂载完成(可以访问DOM元素)
  352. mounted() {
  353. var _self = this;
  354. setInterval(function(){ _self.myTimer() }, 1000);
  355. this.initTable_1();
  356. this.initTable_2();
  357. this.initData_1();
  358. this.initData_3();
  359. this.initData_4();
  360. },
  361. //方法集合
  362. methods: {
  363. clear(){
  364. this.selectTime = [];
  365. this.selectOrgNm = [];
  366. this.initTable_1();
  367. this.initTable_2();
  368. this.initData_1();
  369. this.initData_3();
  370. this.initData_4();
  371. },
  372. closeDialogPblm(){
  373. this.isShowPblmList = false;
  374. this.pblmParam = {};
  375. },
  376. closeDialogPblmLog(){
  377. this.isShowPblmLogList = false;
  378. this.pblmLogParam = {};
  379. },
  380. closeDialogObj(){
  381. this.isShowObjList = false;
  382. this.objParam = {};
  383. },
  384. closeDialogPerson(){
  385. this.isShowPersonList = false;
  386. this.personParam = {};
  387. },
  388. closeDialogGroup(){
  389. this.isShowGroupList = false;
  390. this.groupParam = {};
  391. },
  392. closeDialogMend(){
  393. this.isShowMendList = false;
  394. this.mendParam = {};
  395. },
  396. cellClick_1(row, column, cell, event){
  397. if(column.property=="PERSIZE"){
  398. if(row.CODE && row.CODE.length==12){
  399. this.personParam["adCode"] = row.CODE;
  400. }else{
  401. this.personParam["objType"] = row.CODE==undefined?"":row.CODE;
  402. this.personParam["objTypeName"] = row.inspName;
  403. }
  404. this.personParam["selectTime"] = this.selectTime;
  405. this.personParam["depm"] = this.selectOrgNm.length>0?this.selectOrgNm:[];
  406. this.isShowPersonList = true;
  407. }
  408. if(column.property=="GROUPSIZE"){
  409. if(row.CODE && row.CODE.length==12){
  410. this.groupParam["adCode"] = row.CODE;
  411. }else{
  412. this.groupParam["objType"] = row.CODE==undefined?"":row.CODE;
  413. this.groupParam["objTypeName"] = row.inspName;
  414. }
  415. this.groupParam["selectTime"] = this.selectTime;
  416. this.groupParam["depm"] = this.selectOrgNm.length>0?this.selectOrgNm:[];
  417. this.isShowGroupList = true;
  418. }
  419. if(column.property=="OBJSIZE"){
  420. if(row.CODE && row.CODE.length==12){
  421. this.objParam["adCode"] = row.CODE;
  422. }else{
  423. this.objParam["objType"] = row.CODE==undefined?"":row.CODE;
  424. this.objParam["objTypeName"] = row.inspName;
  425. }
  426. this.objParam["selectTime"] = this.selectTime;
  427. this.objParam["depm"] = this.selectOrgNm.length>0?this.selectOrgNm:[];
  428. this.isShowObjList = true;
  429. }
  430. if(column.property=="PBLMSIZE"){
  431. if(row.CODE && row.CODE.length==12){
  432. this.pblmParam["adCode"] = row.CODE;
  433. }else{
  434. this.pblmParam["objType"] = row.CODE==undefined?"":row.CODE;
  435. this.pblmParam["objTypeName"] = row.inspName;
  436. }
  437. this.pblmParam["selectTime"] = this.selectTime;
  438. this.pblmParam["depm"] = this.selectOrgNm.length>0?this.selectOrgNm:[];
  439. this.isShowPblmList = true;
  440. }
  441. if(column.property=="MENDSIZE"){
  442. if(row.CODE && row.CODE.length==12){
  443. this.mendParam["adCode"] = row.CODE;
  444. }else{
  445. this.mendParam["objType"] = row.CODE==undefined?"":row.CODE;
  446. this.mendParam["objTypeName"] = row.inspName;
  447. }
  448. this.mendParam["selectTime"] = this.selectTime;
  449. this.mendParam["depm"] = this.selectOrgNm.length>0?this.selectOrgNm:[];
  450. this.isShowMendList = true;
  451. }
  452. if(column.property=="PDSIZE"){
  453. if(row.CODE && row.CODE.length==12){
  454. this.pblmLogParam["adCode"] = row.CODE;
  455. }else{
  456. this.pblmLogParam["objType"] = row.CODE==undefined?"":row.CODE;
  457. this.pblmLogParam["objTypeName"] = row.inspName;
  458. }
  459. this.pblmLogParam["selectTime"] = this.selectTime;
  460. this.pblmLogParam["depm"] = this.selectOrgNm.length>0?this.selectOrgNm:[];
  461. this.isShowPblmLogList = true;
  462. }
  463. },
  464. initTable_1(){
  465. var _self = this;
  466. var params = {
  467. sttm:this.selectTime.length==2?this.selectTime[0]:"",
  468. entm:this.selectTime.length==2?this.selectTime[1]:"",
  469. depm:this.selectOrgNm.length>0?this.selectOrgNm:[],
  470. adCode:this.organCode
  471. }
  472. this.tableData1 = [];
  473. request.post('/index/total/qhdc',params).then((res)=>{
  474. if (res.success) {
  475. _self.tableData1 = res.data;
  476. }
  477. });
  478. },
  479. initTable_2(){
  480. var _self = this;
  481. var params = {
  482. sttm:this.selectTime.length==2?this.selectTime[0]:"",
  483. entm:this.selectTime.length==2?this.selectTime[1]:"",
  484. depm:this.selectOrgNm.length>0?this.selectOrgNm:[],
  485. adCode:this.organCode
  486. }
  487. this.tableData2 = [];
  488. this.chartMapData={
  489. geoCoordMap:{},
  490. geoCoordMapList:[]
  491. }
  492. request.post('/index/total/qhdc/totalByAdCode',params).then((res)=>{
  493. if (res.success) {
  494. if(res.data){
  495. _self.tableData2 = res.data;
  496. for(var i = 0;i<res.data.length;i++){
  497. if(res.data[i].inspName!='青海省'){
  498. _self.chartMapData.geoCoordMap[res.data[i].inspName] = [res.data[i].LONG,res.data[i].LAT];
  499. _self.chartMapData.geoCoordMapList.push({
  500. name:res.data[i].inspName,
  501. value:res.data[i].PBLMSIZE
  502. });
  503. }
  504. }
  505. _self.initChart2();
  506. }
  507. }
  508. });
  509. },
  510. initData_1(){
  511. var _self = this;
  512. var params = {
  513. sttm:this.selectTime.length==2?this.selectTime[0]:"",
  514. entm:this.selectTime.length==2?this.selectTime[1]:"",
  515. depm:this.selectOrgNm.length>0?this.selectOrgNm:[],
  516. adCode:this.organCode
  517. }
  518. this.chartData1 = [];
  519. request.post('/index/total/qhdc/totalByPtype',params).then((res)=>{
  520. if (res.success) {
  521. if(res.data){
  522. for(var i = 0;i<res.data.length;i++){
  523. _self.chartData1.push({
  524. name:res.data[i].inspName,
  525. value:res.data[i].PBLMSIZE
  526. })
  527. }
  528. _self.initChart1();
  529. }
  530. }
  531. });
  532. },
  533. initData_3(){
  534. var _self = this;
  535. var params = {
  536. sttm:this.selectTime.length==2?this.selectTime[0]:"",
  537. entm:this.selectTime.length==2?this.selectTime[1]:"",
  538. depm:this.selectOrgNm.length>0?this.selectOrgNm:[],
  539. adCode:this.organCode
  540. }
  541. this.chartAdType = {
  542. xData:[],
  543. yData:[]
  544. };
  545. request.post('/index/total/qhdc/pblmByAdCode',params).then((res)=>{
  546. if (res.success) {
  547. if(res.data){
  548. for(var i = 0;i<res.data.length;i++){
  549. _self.chartAdType.xData.push(res.data[i].inspName);
  550. for(var j = 0;j<res.data[i].PBLMSIZE.length;j++){
  551. if(i==0){
  552. _self.chartAdType.yData[j] = {
  553. name: res.data[i].PBLMSIZE[j].inspName,
  554. type: 'bar',
  555. stack: 'total',
  556. barWidth:15,
  557. label: {
  558. show: true
  559. },
  560. emphasis: {
  561. focus: 'series'
  562. },
  563. data: []
  564. }
  565. _self.chartAdType.yData[j].data.push(res.data[i].PBLMSIZE[j].PBLMSIZE);
  566. }else{
  567. _self.chartAdType.yData[j].data.push(res.data[i].PBLMSIZE[j].PBLMSIZE);
  568. }
  569. }
  570. }
  571. _self.initChart3();
  572. }
  573. }
  574. });
  575. },
  576. initData_4(){
  577. var _self = this;
  578. var params = {
  579. sttm:this.selectTime.length==2?this.selectTime[0]:"",
  580. entm:this.selectTime.length==2?this.selectTime[1]:"",
  581. depm:this.selectOrgNm.length>0?this.selectOrgNm:[],
  582. adCode:this.organCode
  583. }
  584. this.chartDataCate = {
  585. ERRORPBLMSIZE: 0,
  586. ERRORSPBLMSIZE: 0,
  587. INFOPBLMSIZE: 0,
  588. WARMPBLMSIZE: 0
  589. };
  590. request.post('/index/total/qhdc/pblmByCate',params).then((res)=>{
  591. if (res.success) {
  592. if(res.data){
  593. _self.chartDataCate = res.data;
  594. _self.initChart4();
  595. }
  596. }
  597. });
  598. },
  599. initAddVcdFeatures(){
  600. let geoJsonName = this.organCode.substr(0, 6) + "DATA.json";
  601. return axios.get('/src/assets/addvGeoData/' + geoJsonName);
  602. },
  603. initChart1(){
  604. this.chart1 = echarts.init(document.getElementById('chart1'));
  605. var colorList = ['#73DDFF', '#73ACFF', '#FDD56A', '#FDB36A', '#FD866A', '#9E87FF', '#58D5FF']
  606. var option = {
  607. tooltip: {
  608. trigger: 'item'
  609. },
  610. legend:{
  611. orient: 'horizontal',
  612. x:'center', //可设定图例在左、右、居中
  613. y:'bottom', //可设定图例在上、下、居中
  614. icon: "circle",
  615. type: 'scroll',
  616. pageIconColor: '#6495ed', //翻页下一页的三角按钮颜色
  617. pageIconInactiveColor: '#aaa', //翻页(即翻页到头时)
  618. pageIconSize: 11, //翻页按钮大小
  619. pageFormatter: '',//隐藏翻页的数字
  620. pageButtonItemGap: -6,//翻页按钮的两个之间的间距
  621. itemWidth: 10, // 图例标记的图形宽度。
  622. itemHeight: 60, // 图例标记的图形高度。
  623. padding: 15, // 图例内边距
  624. textStyle: {
  625. color: "#626675", // 文字的颜色。
  626. fontSize: 12, // 文字的字体大小。
  627. }
  628. },
  629. series: [{
  630. type: 'pie',
  631. radius: ['0%', '55%'],
  632. color:colorList,
  633. label: {
  634. show: true,
  635. position: 'outside',
  636. formatter: '{b}:{c}({d}%)',
  637. textStyle:{
  638. fontSize:12,
  639. color:'#626675'
  640. }
  641. },
  642. labelLine: {
  643. normal: {
  644. length: 10,
  645. length2: 10,
  646. lineStyle: {
  647. width: 0.5
  648. }
  649. }
  650. },
  651. data: this.chartData1,
  652. }]
  653. };
  654. this.chart1.clear();
  655. this.chart1.setOption(option);
  656. },
  657. async initChart2() {
  658. var _self = this;
  659. var convertData = function () {
  660. var res = [];
  661. for (var i = 0; i < _self.chartMapData.geoCoordMapList.length; i++) {
  662. var geoCoord = _self.chartMapData.geoCoordMap[_self.chartMapData.geoCoordMapList[i].name];
  663. if (geoCoord) {
  664. res.push({
  665. name: _self.chartMapData.geoCoordMapList[i].name,
  666. value: geoCoord.concat(_self.chartMapData.geoCoordMapList[i].value)
  667. });
  668. }
  669. }
  670. return res;
  671. };
  672. this.chart2 = echarts.init(document.getElementById('chart2'));
  673. var jsonFeatures = await this.initAddVcdFeatures();
  674. echarts.registerMap(this.organNm, jsonFeatures.data);
  675. var option = {
  676. geo: {
  677. map: this.organNm,
  678. show: true,
  679. roam: false,
  680. zoom:1.2,
  681. label: {
  682. normal: {
  683. show: true,
  684. color:'#fff'
  685. },
  686. emphasis: {
  687. show: true,
  688. color:'#fff'
  689. },
  690. },
  691. itemStyle: {
  692. normal: {
  693. label: { show: true },
  694. color: '#F4F4F4',
  695. borderWidth: 2, //区域边框宽度
  696. borderColor: '#6fc4f0', //区域边框颜色
  697. areaColor: {
  698. type: 'radial',
  699. x: 0.5,
  700. y: 0.5,
  701. r: 0.9,
  702. colorStops: [{
  703. offset: 0, color: '#3384da'
  704. }, {
  705. offset: 1, color: '#5aaef1'
  706. }],
  707. global: false
  708. }
  709. },
  710. emphasis: {
  711. areaColor: '#3476d0',
  712. color: "#fff",
  713. },
  714. },
  715. },
  716. series: [
  717. {
  718. type: 'scatter',
  719. coordinateSystem: 'geo',
  720. symbol: 'pin',
  721. legendHoverLink: true,
  722. symbolSize: [50, 50],
  723. label: {
  724. show: true,
  725. formatter(value) {
  726. return value.data.value[2];
  727. },
  728. color: 'white',
  729. },
  730. itemStyle: {
  731. normal: {
  732. color: '#3476d0',
  733. },
  734. },
  735. data: convertData(),
  736. showEffectOn: 'render',
  737. rippleEffect: {
  738. brushType: 'stroke',
  739. },
  740. hoverAnimation: true,
  741. zlevel: 1,
  742. },
  743. ],
  744. };
  745. this.chart2.clear();
  746. this.chart2.setOption(option);
  747. },
  748. initChart3(){
  749. this.chart3 = echarts.init(document.getElementById('chart3'));
  750. var colorList = ['#37bacb', '#ffbf47', '#5971fb', '#3aa1ff']
  751. var option = {
  752. tooltip: {
  753. trigger: 'axis'
  754. },
  755. color:colorList,
  756. legend:{
  757. orient: 'horizontal',
  758. x:'center', //可设定图例在左、右、居中
  759. y:'bottom', //可设定图例在上、下、居中
  760. icon: "circle",
  761. type: 'scroll',
  762. pageIconColor: '#6495ed', //翻页下一页的三角按钮颜色
  763. pageIconInactiveColor: '#aaa', //翻页(即翻页到头时)
  764. pageIconSize: 11, //翻页按钮大小
  765. pageFormatter: '',//隐藏翻页的数字
  766. pageButtonItemGap: -6,//翻页按钮的两个之间的间距
  767. itemWidth: 10, // 图例标记的图形宽度。
  768. itemHeight: 60, // 图例标记的图形高度。
  769. padding: 15, // 图例内边距
  770. textStyle: {
  771. color: "#626675", // 文字的颜色。
  772. fontSize: 12, // 文字的字体大小。
  773. }
  774. },
  775. grid: {
  776. left: '3%',
  777. right: '4%',
  778. bottom: '10%',
  779. containLabel: true
  780. },
  781. xAxis: {
  782. type: 'value',
  783. axisLabel: {
  784. show: true,
  785. textStyle: {
  786. fontSize:12,
  787. color:"#626675"
  788. }
  789. },
  790. axisLine:{
  791. lineStyle:{
  792. color:'#cccccc'
  793. }
  794. }
  795. },
  796. yAxis: {
  797. type: 'category',
  798. data: this.chartAdType.xData,
  799. axisLabel : {
  800. formatter: '{value}',
  801. textStyle: {
  802. fontSize:12,
  803. color:'#626675'
  804. }
  805. },
  806. axisLine:{
  807. lineStyle:{
  808. color:'#cccccc',
  809. }
  810. }
  811. },
  812. series: this.chartAdType.yData,
  813. };
  814. this.chart3.clear();
  815. this.chart3.setOption(option);
  816. },
  817. initChart4(){
  818. this.chart4 = echarts.init(document.getElementById('chart4'));
  819. var colorList = ['#36cbcb', '#4ecb73', '#fbd437', '#3aa1ff']
  820. var option = {
  821. tooltip: {
  822. trigger: 'item'
  823. },
  824. legend:{
  825. orient: 'horizontal',
  826. x:'center', //可设定图例在左、右、居中
  827. y:'bottom', //可设定图例在上、下、居中
  828. icon: "circle",
  829. type: 'scroll',
  830. pageIconColor: '#6495ed', //翻页下一页的三角按钮颜色
  831. pageIconInactiveColor: '#aaa', //翻页(即翻页到头时)
  832. pageIconSize: 11, //翻页按钮大小
  833. pageFormatter: '',//隐藏翻页的数字
  834. pageButtonItemGap: -6,//翻页按钮的两个之间的间距
  835. itemWidth: 10, // 图例标记的图形宽度。
  836. itemHeight: 50, // 图例标记的图形高度。
  837. padding: 15, // 图例内边距
  838. textStyle: {
  839. color: "#626675", // 文字的颜色。
  840. fontSize: 12, // 文字的字体大小。
  841. }
  842. },
  843. series: [{
  844. type: 'pie',
  845. radius: ['0%', '60%'],
  846. color:colorList,
  847. label: {
  848. show: true,
  849. position: 'outside',
  850. formatter: '{b}:{c}({d}%)',
  851. textStyle:{
  852. fontSize:12,
  853. color:'#626675'
  854. }
  855. },
  856. labelLine: {
  857. normal: {
  858. length: 20,
  859. length2: 30,
  860. lineStyle: {
  861. width: 0.5
  862. }
  863. }
  864. },
  865. data: [{
  866. 'name': '一般',
  867. 'value': this.chartDataCate.INFOPBLMSIZE
  868. }, {
  869. 'name': '较重',
  870. 'value': this.chartDataCate.WARMPBLMSIZE
  871. }, {
  872. 'name': '严重',
  873. 'value': this.chartDataCate.ERRORPBLMSIZE
  874. }, {
  875. 'name': '特别严重',
  876. 'value': this.chartDataCate.ERRORSPBLMSIZE
  877. }
  878. ],
  879. }]
  880. };
  881. this.chart4.clear();
  882. this.chart4.setOption(option);
  883. },
  884. myTimer(){
  885. var d = new Date();
  886. var currentTimestap = (d.getHours()<=9?'0'+d.getHours():d.getHours())+":"+(d.getMinutes()<=9?'0'+d.getMinutes():d.getMinutes())+":"+(d.getSeconds()<=9?'0'+d.getSeconds():d.getSeconds());
  887. var currentDate = d.getFullYear()+"年"+(d.getMonth()+1)+"月"+d.getDate()+"日";
  888. var weeks = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
  889. var currentWeek = weeks[d.getDay()];
  890. this.currentTime = currentDate+" "+currentTimestap+" "+currentWeek;
  891. },
  892. },
  893. beforeCreate() {
  894. }, //生命周期 - 创建之前
  895. beforeMount() {
  896. }, //生命周期 - 挂载之前
  897. beforeUpdate() {
  898. }, //生命周期 - 更新之前
  899. updated() {
  900. }, //生命周期 - 更新之后
  901. beforeDestroy() {
  902. }, //生命周期 - 销毁之前
  903. destroyed() {
  904. }, //生命周期 - 销毁完成
  905. activated() {
  906. } //如果页面有keep-alive缓存功能,这个函数会触发
  907. };
  908. </script>
  909. <style scoped>
  910. .mainBox .contentData /deep/ .el-table{
  911. height:100%;
  912. }
  913. .mainBox .contentData /deep/ .el-table .el-table__header-wrapper{
  914. height:36px;
  915. }
  916. /*.mainBox .contentData /deep/ .el-table .el-table__header-wrapper table{*/
  917. /* width: 100% !important;*/
  918. /* table-layout:auto !important;*/
  919. /*}*/
  920. .mainBox .contentData /deep/ .el-table .el-table__body-wrapper{
  921. height:calc(100% - 36px);
  922. overflow: auto;
  923. }
  924. .mainBox .contentData /deep/ .el-table--border td, .el-table--border th, .el-table__body-wrapper .el-table--border.is-scrolling-left~.el-table__fixed{
  925. border-right: 0px;
  926. }
  927. .headerContent /deep/ .el-range-editor--mini .el-range-separator{
  928. line-height: 26px;
  929. }
  930. /*.mainBox .contentData /deep/ .el-table .el-table__body-wrapper table{*/
  931. /* width: 100% !important;*/
  932. /* table-layout:auto !important;*/
  933. /*}*/
  934. /*.mainBox .contentData /deep/ .el-table .cell.el-tooltip{*/
  935. /* padding-left: 0px !important;*/
  936. /* min-width: 0px !important;*/
  937. /* width: 100% !important;*/
  938. /* text-overflow: ellipsis;*/
  939. /* -o-text-overflow: ellipsis;*/
  940. /* white-space:nowrap;*/
  941. /*}*/
  942. .mainBox{
  943. width: 100%;
  944. height:100%;
  945. margin: 0;
  946. padding: 0;
  947. display: flex;
  948. background: #f2f2f2;
  949. }
  950. .leftContent{
  951. width: calc(25% - 15px);
  952. height:calc(100% - 10px);
  953. margin-left: 10px;
  954. margin-right: 5px;
  955. }
  956. .centerContent{
  957. width: calc(50% - 20px);
  958. height:calc(100% - 10px);
  959. margin-left: 10px;
  960. margin-right: 10px;
  961. }
  962. .rightContent{
  963. width: calc(25% - 15px);
  964. height:calc(100% - 10px);
  965. margin-left: 5px;
  966. margin-right: 10px;
  967. }
  968. .headerContent{
  969. width: 100%;
  970. height:68px;
  971. display: flex;
  972. justify-content: center;
  973. }
  974. .headerContent /deep/ .el-range-editor--mini.el-input__inner{
  975. height:35px !important;
  976. width: calc(50% - 2.5px) !important;
  977. margin-right: 2.5px !important;
  978. margin-top: 23px;
  979. }
  980. .headerContent /deep/ .el-select{
  981. height:35px !important;
  982. width: calc(50% - 2.5px) !important;
  983. margin-left: 2.5px !important;
  984. margin-top: 23px;
  985. }
  986. .headerContent /deep/ .el-input--mini .el-input__inner{
  987. height:35px !important;
  988. }
  989. .headerContent p{
  990. padding: 0;
  991. margin-top: 1px;
  992. height:57px;
  993. background: #09a4f1;
  994. font-family: "微软雅黑 Bold", 微软雅黑, sans-serif;
  995. font-weight: 700;
  996. font-style: normal;
  997. font-size: 36px;
  998. color: rgb(255, 255, 255);
  999. width: calc(100% - 200px);
  1000. text-align: center;
  1001. line-height: 57px;
  1002. border-radius: 0px 0px 100px 100px;
  1003. }
  1004. .headDateP{
  1005. width: 100%;
  1006. height:48px;
  1007. margin-top: 10px;
  1008. background: #ffffff;
  1009. line-height: 48px;
  1010. font-family: 微软雅黑, sans-serif;
  1011. font-weight: 400;
  1012. font-style: normal;
  1013. font-size: 25px;
  1014. text-align: center;
  1015. color:#09a4f1;
  1016. }
  1017. .contentTop{
  1018. width: calc(100% - 2px);
  1019. height:calc(55% - 41px);
  1020. border-width: 1px;
  1021. border-style: solid;
  1022. border-color: #3ebdf4;
  1023. }
  1024. .contentTopCenter{
  1025. width: calc(100% - 2px);
  1026. height:calc(65% - 41px);
  1027. border-width: 1px;
  1028. border-style: solid;
  1029. border-color: #3ebdf4;
  1030. background: white;
  1031. }
  1032. .contentBottom{
  1033. width: calc(100% - 2px);
  1034. height:calc(45% - 41px);
  1035. margin-top: 10px;
  1036. border-width: 1px;
  1037. border-style: solid;
  1038. border-color: #3ebdf4;
  1039. }
  1040. .contentBottomCenter{
  1041. width: calc(100% - 2px);
  1042. height:calc(35% - 41px);
  1043. margin-top: 10px;
  1044. border-width: 1px;
  1045. border-style: solid;
  1046. border-color: #3ebdf4;
  1047. background: white;
  1048. }
  1049. .contentTitle{
  1050. width:100%;
  1051. height:35px;
  1052. font-family: "微软雅黑 Bold", 微软雅黑, sans-serif;
  1053. font-weight: 700;
  1054. font-style: normal;
  1055. font-size: 17px;
  1056. color: rgb(255, 255, 255);
  1057. text-align: left;
  1058. line-height: 35px;
  1059. background: #14adf5;
  1060. display: flex;
  1061. align-items: center;
  1062. }
  1063. .iconTitle{
  1064. width: 5px;
  1065. height: 20px;
  1066. background: white;
  1067. margin-left: 10px;
  1068. margin-right: 10px;
  1069. }
  1070. .contentData{
  1071. width: 100%;
  1072. height:calc(100% - 35px);
  1073. background: white;
  1074. }
  1075. </style>