9b61606964e525de043ef57c5a053a19983af231.svn-base 46 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367
  1. <!-- -->
  2. <template>
  3. <div class="mainDiv">
  4. <div class="dc-title">水利监管</div>
  5. <div class="dc-left">
  6. <div class="dc-left-box">
  7. <div class="box-title">监管动态</div>
  8. <div class="box-charts">
  9. <ul id="box-ul">
  10. <li v-if="messageList!=null && messageList.length>0" v-for="(item,index) in messageList">
  11. <div class="dot-img"><span></span></div>
  12. <div class="dot-content">
  13. <p>{{item.title}}</p>
  14. <p>{{formatDateTime(item.intm)}}</p>
  15. </div>
  16. </li>
  17. </ul>
  18. <el-pagination
  19. class="pager-new"
  20. background
  21. layout="prev, pager, next"
  22. :pager-count="5"
  23. :current-page="pageNum"
  24. :page-size="pageSize"
  25. :total="total"
  26. @current-change="pageIndexChange">
  27. </el-pagination>
  28. </div>
  29. </div>
  30. <div class="dc-left-box">
  31. <div class="box-title">问题类别</div>
  32. <div class="box-charts">
  33. <div class="chart-tj" id="chart1"></div>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="dc-center">
  38. <ul>
  39. <li>
  40. <div class="center-title">批次</div>
  41. <div class="center-content">
  42. <p>{{statiscsData.BISINSPALLSIZE}}</p>
  43. <p>本月+{{statiscsData.BISINSPALLSIZEMONTH}}</p>
  44. </div>
  45. </li>
  46. <li>
  47. <div class="center-title">人员</div>
  48. <div class="center-content">
  49. <p>{{statiscsData.PERSIZE}}</p>
  50. <p>本月</p>
  51. </div>
  52. </li>
  53. <li>
  54. <div class="center-title">类别</div>
  55. <div class="center-content">
  56. <p>{{statiscsData.OBJTYPESIZE}}</p>
  57. <p>本月+{{statiscsData.OBJTYPESIZEMONTH}}</p>
  58. </div>
  59. </li>
  60. <li>
  61. <div class="center-title">问题数</div>
  62. <div class="center-content">
  63. <p>{{statiscsData.PBLMSIZE}}</p>
  64. <p>本月+{{statiscsData.PBLMSIZEMONTH}}</p>
  65. </div>
  66. </li>
  67. <li>
  68. <div class="center-title">整改数</div>
  69. <div class="center-content">
  70. <p>{{statiscsData.MENDSIZE}}</p>
  71. <p>本月+{{statiscsData.MENDSIZEMONTH}}</p>
  72. </div>
  73. </li>
  74. <li>
  75. <div class="center-title">销号数</div>
  76. <div class="center-content">
  77. <p>{{statiscsData.PBLMLOGSIZE}}</p>
  78. <p>本月+{{statiscsData.PBLMLOGSIZEMONTH}}</p>
  79. </div>
  80. </li>
  81. </ul>
  82. <div class="mapNode">
  83. <el-select v-model="dateSelect" @change="changeDate" placeholder="请选择" class="dataContent">
  84. <el-option
  85. v-for="item in options"
  86. :key="item.value"
  87. :label="item.label"
  88. :value="item.value">
  89. </el-option>
  90. </el-select>
  91. <el-select v-model="objType" @change="changeDcType" placeholder="请选择" class="dcTypeContent">
  92. <el-option
  93. v-for="item in dcTypeList"
  94. :key="item.inspType"
  95. :label="item.inspName"
  96. :value="item.inspType">
  97. </el-option>
  98. </el-select>
  99. <div id="mapChart"></div>
  100. </div>
  101. </div>
  102. <div class="dc-right">
  103. <div class="dc-right1-box">
  104. <div class="box-title1">监管成果</div>
  105. <div class="box-charts">
  106. <div class="chart-tj" id="chart2"></div>
  107. </div>
  108. </div>
  109. <div class="dc-right2-box">
  110. <div class="box-title1">问题分布</div>
  111. <div class="box-charts">
  112. <div class="chart-tj" id="chart3" v-if="!isShow"></div>
  113. <div class="chart-single" id="chart5" v-if="isShow"></div>
  114. </div>
  115. </div>
  116. <div class="dc-right3-box">
  117. <div class="box-title2">问题严重程度</div>
  118. <div class="box-charts">
  119. <div class="chart-tj" id="chart4"></div>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. </template>
  125. <script>
  126. import echarts from "echarts";
  127. import axios from 'axios' //引入axios
  128. import request from "@util/gw_ajax_request.js";
  129. import {formatDate} from "@util/gw_date.js"
  130. import {
  131. getMessage,
  132. getDcPblmCount,
  133. getDcANCount,
  134. getDcType,
  135. getPblmPro,
  136. getStatiscsData,
  137. getDcTbItem
  138. } from "../../api/homeMainView.js";
  139. export default {
  140. components: {
  141. },
  142. props: [],
  143. data() {
  144. //这里存放数据
  145. return {
  146. chart1:null,
  147. chart2:null,
  148. chart3:null,
  149. chart4:null,
  150. chart5:null,
  151. chart6:null,
  152. isShow:false,
  153. pageNum:1,
  154. pageSize:5,
  155. total:0,
  156. dateSelect:'1',
  157. objType:'',
  158. options:[
  159. {
  160. label:"近一个月",
  161. value:"1"
  162. },
  163. {
  164. label:"近三个月",
  165. value:"2"
  166. },
  167. {
  168. label:"近半年",
  169. value:"3"
  170. },
  171. {
  172. label:"近一年",
  173. value:"4"
  174. },
  175. {
  176. name:"有记录至今",
  177. value:""
  178. }
  179. ],
  180. messageList:[],
  181. dcTypeList:[],
  182. chart1Data:{
  183. chart1Count:0,
  184. nameList:[],
  185. dataList:[]
  186. },
  187. chart2Data:{
  188. dcF:0,
  189. dcN:0,
  190. },
  191. chart3Data:{
  192. xData:[],
  193. questionList:[],
  194. changeList:[],
  195. },
  196. chart4Data:{
  197. qustionTotal:0,
  198. list:[]
  199. },
  200. statiscsData:{
  201. BISINSPALLSIZE: 0,
  202. BISINSPALLSIZEMONTH: 0,
  203. HASOBJSIZE: 0,
  204. MENDSIZE: 0,
  205. MENDSIZEMONTH: 0,
  206. OBJSIZE: 0,
  207. OBJTYPESIZE: 0,
  208. OBJTYPESIZEMONTH: 0,
  209. PBLMLOGSIZE: 0,
  210. PBLMLOGSIZEMONTH: 0,
  211. PBLMSIZE: 0,
  212. PBLMSIZEMONTH: 0,
  213. PERSIZE: 0
  214. },
  215. chart5Data:{
  216. mapPercent:[],
  217. geoCoordMap:{},
  218. geoCoordMapList:[],
  219. },
  220. chart6Data:{
  221. legend:[],
  222. xAxis:[],
  223. list:[]
  224. }
  225. }
  226. },
  227. //监听属性 类似于data概念
  228. computed: {
  229. formatDateTime() {
  230. return formatDate
  231. },
  232. organNm() {
  233. return localStorage.getItem('currentOrgNm') ? localStorage.getItem('currentOrgNm') : ''
  234. },
  235. organCode() {
  236. return localStorage.getItem('currentRlcode') ? localStorage.getItem('currentRlcode') : ''
  237. },
  238. currentOrgId() {
  239. return localStorage.getItem('currentOrgId') ? localStorage.getItem('currentOrgId') : ''
  240. },
  241. },
  242. //监控data中的数据变化
  243. watch: {
  244. },
  245. //生命周期 - 挂载完成(可以访问DOM元素)
  246. mounted() {
  247. this.initStatiscsData();
  248. this.initDcType();
  249. this.initMessage();
  250. this.initChart1Data();
  251. this.initChart2Data();
  252. this.initChart3Data();
  253. this.$nextTick(function () {
  254. let _self = this;
  255. window.onresize = function() {
  256. _self.resizeChart();
  257. }
  258. })
  259. },
  260. //方法集合
  261. methods: {
  262. resizeChart(){
  263. this.chart1.resize();
  264. this.chart2.resize();
  265. this.chart3.resize();
  266. this.chart4.resize();
  267. this.chart5.resize();
  268. this.chart6.resize();
  269. },
  270. toVal(val){
  271. if(val!=null && val!=""){
  272. return val.toFixed(2)
  273. }
  274. return 0;
  275. },
  276. changeDate(){
  277. this.initChart1Data();
  278. this.initChart2Data();
  279. this.initChart3Data();
  280. this.isShow = false;
  281. if(this.objType!=null && this.objType!=""){
  282. this.initChart4Data();
  283. this.isShow = true;
  284. }
  285. this.resizeChart();
  286. },
  287. changeDcType(){
  288. this.initChart1Data();
  289. this.initChart2Data();
  290. this.initChart3Data();
  291. this.isShow = false;
  292. if(this.objType!=null && this.objType!=""){
  293. this.initChart4Data();
  294. this.isShow = true;
  295. }
  296. this.resizeChart();
  297. },
  298. pageIndexChange(val){
  299. this.pageNum = val;
  300. this.initMessage();
  301. },
  302. initStatiscsData(){
  303. var _self = this;
  304. _self.statiscsData = {
  305. BISINSPALLSIZE: 0,
  306. BISINSPALLSIZEMONTH: 0,
  307. HASOBJSIZE: 0,
  308. MENDSIZE: 0,
  309. MENDSIZEMONTH: 0,
  310. OBJSIZE: 0,
  311. OBJTYPESIZE: 0,
  312. OBJTYPESIZEMONTH: 0,
  313. PBLMLOGSIZE: 0,
  314. PBLMLOGSIZEMONTH: 0,
  315. PBLMSIZE: 0,
  316. PBLMSIZEMONTH: 0,
  317. PERSIZE: 0
  318. }
  319. getStatiscsData().then((res) => {
  320. if(res.data!=null){
  321. _self.statiscsData.BISINSPALLSIZE = res.data.BISINSPALLSIZE;
  322. _self.statiscsData.BISINSPALLSIZEMONTH = res.data.BISINSPALLSIZEMONTH;
  323. _self.statiscsData.HASOBJSIZE = res.data.HASOBJSIZE;
  324. _self.statiscsData.MENDSIZE = res.data.MENDSIZE;
  325. _self.statiscsData.MENDSIZEMONTH = res.data.MENDSIZEMONTH;
  326. _self.statiscsData.OBJSIZE = res.data.OBJSIZE;
  327. _self.statiscsData.OBJTYPESIZE = res.data.OBJTYPESIZE;
  328. _self.statiscsData.OBJTYPESIZEMONTH = res.data.OBJTYPESIZEMONTH;
  329. _self.statiscsData.PBLMLOGSIZE = res.data.PBLMLOGSIZE;
  330. _self.statiscsData.PBLMLOGSIZEMONTH = res.data.PBLMLOGSIZEMONTH;
  331. _self.statiscsData.PBLMSIZE = res.data.PBLMSIZE;
  332. _self.statiscsData.PBLMSIZEMONTH = res.data.PBLMSIZEMONTH;
  333. _self.statiscsData.PERSIZE = res.data.PERSIZE;
  334. }
  335. });
  336. },
  337. initDcType(){
  338. var _self = this;
  339. _self.dcTypeList = [];
  340. getDcType(_self.currentOrgId).then((res) => {
  341. if(res!=null && res.data.length>0){
  342. _self.dcTypeList = res.data;
  343. _self.dcTypeList.push({inspName:"全部",inspType:""})
  344. }
  345. });
  346. },
  347. initMessage(){
  348. var _self = this;
  349. getMessage({pageNum:_self.pageNum,pageSize:_self.pageSize}).then((res) => {
  350. _self.messageList = res.data.list;
  351. _self.total = res.data.total;
  352. });
  353. },
  354. initChart1Data(){
  355. var _self = this;
  356. _self.chart1Data.nameList = [];
  357. _self.chart1Data.dataList = [];
  358. _self.chart1Data.chart1Count = 0;
  359. getDcPblmCount(_self.dateSelect).then((res) => {
  360. if(res!=null && res.data.length>0){
  361. for(var i = 0;i<res.data.length;i++){
  362. _self.chart1Data.nameList.push(res.data[i].NAME);
  363. _self.chart1Data.dataList.push(res.data[i].VALUE);
  364. _self.chart1Data.chart1Count+=res.data[i].VALUE;
  365. }
  366. }
  367. _self.initChart1();
  368. });
  369. },
  370. initChart2Data(){
  371. var _self = this;
  372. _self.chart2Data.dcF = 0;
  373. _self.chart2Data.dcN = 0;
  374. getDcANCount({timeType:_self.dateSelect,objType:_self.objType}).then((res) => {
  375. if(res.data!=null){
  376. _self.chart2Data.dcF = res.data.HASOBJSIZE;
  377. _self.chart2Data.dcN = res.data.objSize - res.data.HASOBJSIZE;
  378. }
  379. _self.initChart2();
  380. });
  381. },
  382. initChart3Data(){
  383. var _self = this;
  384. _self.chart3Data.xData = [];
  385. _self.chart3Data.questionList = [];
  386. _self.chart3Data.changeList = [];
  387. _self.chart4Data.qustionTotal = 0;
  388. _self.chart4Data.list = [];
  389. _self.chart5Data.mapPercent = [];
  390. _self.chart5Data.geoCoordMap = [];
  391. _self.chart5Data.geoCoordMapList = [];
  392. getPblmPro({timeType:_self.dateSelect,objType:_self.objType}).then((res) => {
  393. if(res!=null && res.data.length>0){
  394. for(var i = 0;i<res.data.length;i++){
  395. if(res.data[i].adName!="合计"){
  396. _self.chart3Data.xData.push(res.data[i].adName);
  397. _self.chart3Data.questionList.push(res.data[i].pblmSize);
  398. _self.chart3Data.changeList.push(res.data[i].mendSize);
  399. var obj = {
  400. name:res.data[i].adName,
  401. value:_self.toVal(res.data[i].mendSizeRant)
  402. }
  403. _self.chart5Data.mapPercent.push(obj);
  404. _self.chart5Data.geoCoordMap[res.data[i].adName] = [res.data[i].lgtd,res.data[i].lttd];
  405. _self.chart5Data.geoCoordMapList.push({
  406. name:res.data[i].adName,
  407. value:res.data[i].pblmSize
  408. });
  409. }else{
  410. _self.chart4Data.qustionTotal = res.data[i].infoPlbm+res.data[i].errorPlbm+res.data[i].warmPlbm;
  411. _self.chart4Data.list = [{
  412. name: '一般',
  413. value: res.data[i].infoPlbm
  414. }, {
  415. name: '严重',
  416. value: res.data[i].errorPlbm
  417. }, {
  418. name: '较重',
  419. value: res.data[i].warmPlbm
  420. }];
  421. }
  422. }
  423. }
  424. _self.initChart3();
  425. _self.initChart4();
  426. _self.initMapChart();
  427. });
  428. },
  429. initChart4Data(){
  430. var _self = this;
  431. _self.chart6Data.legend = [];
  432. _self.chart6Data.xAxis = [];
  433. _self.chart6Data.list = [];
  434. getDcTbItem({timeType:_self.dateSelect,objType:_self.objType}).then((res) => {
  435. if(res!=null && res.data.length>0){
  436. var dataList = res.data;
  437. for(var i = 0;i<res.data.length;i++){
  438. if(res.data[i].itemName!=null && res.data[i].itemName!="" && _self.chart6Data.legend.indexOf(res.data[i].itemName) < 0){
  439. _self.chart6Data.legend.push(res.data[i].itemName);
  440. }
  441. if(res.data[i].adName!=null && res.data[i].adName!="" && _self.chart6Data.xAxis.indexOf(res.data[i].adName) < 0){
  442. _self.chart6Data.xAxis.push(res.data[i].adName);
  443. }
  444. }
  445. for(var i = 0;i<_self.chart6Data.legend.length;i++){
  446. var obj = {
  447. name: _self.chart6Data.legend[i],
  448. type: 'bar',
  449. stack: "总量",
  450. data: [],
  451. barWidth: 8,
  452. barGap:1,//柱间距离
  453. }
  454. for(var j = 0;j< _self.chart6Data.xAxis.length;j++){
  455. var val = 0;
  456. for(var k = 0;k<dataList.length;k++){
  457. if((_self.chart6Data.legend[i] == dataList[k].itemName) && (_self.chart6Data.xAxis[j] == dataList[k].adName)){
  458. val = (dataList[k].pblmSize==null?0:dataList[k].pblmSize);
  459. break;
  460. }else{
  461. val = 0;
  462. }
  463. }
  464. obj.data.push(val);
  465. }
  466. _self.chart6Data.list.push(obj);
  467. }
  468. _self.initChart5();
  469. }
  470. });
  471. },
  472. initChart1(){
  473. this.chart1 = echarts.init(document.getElementById('chart1'));
  474. var option = {
  475. title:{
  476. padding: 0,
  477. text:"全省合计"+this.chart1Data.chart1Count+"个问题",
  478. left:'center',
  479. },
  480. tooltip: {
  481. trigger: 'axis',
  482. },
  483. dataZoom: [
  484. {
  485. type: 'slider',
  486. show: true,
  487. yAxisIndex: [0],
  488. width: 12,
  489. left: '93%',
  490. start: 0, //数据窗口范围的起始百分比
  491. end: 100
  492. }
  493. ],
  494. // backgroundColor: '#fff',
  495. yAxis: {
  496. type: 'category',
  497. axisLine: {
  498. show: false //坐标线
  499. },
  500. axisTick: {
  501. show: false //小横线
  502. },
  503. axisLabel: {
  504. textStyle:{
  505. color:"grey", //刻度颜色
  506. fontSize:12 //刻度大小
  507. },
  508. },
  509. data:this.chart1Data.nameList
  510. },
  511. xAxis: {
  512. show: false,
  513. },
  514. grid: {
  515. top: '20',
  516. right: '40',
  517. left: '120',
  518. bottom: '10' //图表尺寸大小
  519. },
  520. animationDuration: 9000,
  521. series: [{
  522. type: 'bar',
  523. barWidth: '10px',
  524. showBackground: true,
  525. backgroundStyle: {
  526. color: 'rgba(60,131,222,0.4)',
  527. barBorderRadius: [30, 30, 30, 30] //圆角大小
  528. },
  529. label: {
  530. show: true,
  531. position: 'right' //每一条的数据位置
  532. },
  533. itemStyle: {
  534. normal: {
  535. color: (params) => {
  536. let colors = [
  537. '#ff7f50', '#87cefa', '#da70d6', '#32cd32', '#6495ed',
  538. '#ff69b4', '#ba55d3', '#cd5c5c', '#ffa500', '#40e0d0',
  539. '#1e90ff', '#ff6347', '#7b68ee', '#d0648a', '#ffd700',
  540. '#6b8e23', '#4ea397', '#3cb371', '#b8860b', '#7bd9a5',
  541. '#929fff', '#9de0ff', '#ffa897', '#af87fe', '#7dc3fe',
  542. '#bb60b2', '#433e7c', '#f47a75', '#009db2', '#024b51',
  543. '#0780cf', '#765005', '#e75840', '#26ccd8', '#3685fe',
  544. '#9977ef', '#f5616f', '#f7b13f', '#f9e264', '#50c48f'
  545. ]
  546. return colors[params.dataIndex]
  547. }, //每个数据的颜色
  548. // barBorderRadius: [30, 30, 30, 30], //圆角大小
  549. // shadowBlur: 10,
  550. // shadowColor: 'rgba(0, 103, 255, 0.2)',
  551. // shadowOffsetX: -5,
  552. // shadowOffsetY: 5,
  553. },
  554. },
  555. data: this.chart1Data.dataList
  556. }]
  557. };
  558. this.chart1.clear();
  559. this.chart1.setOption(option);
  560. },
  561. initChart2(){
  562. this.chart2 = echarts.init(document.getElementById('chart2'));
  563. var option = {
  564. color: ['#4e8cfb','#3dedc9'],
  565. tooltip : {
  566. trigger: 'item',
  567. formatter: "{a} {b} : {c} (个)"
  568. },
  569. toolbox: {
  570. show : true,
  571. },
  572. series : [
  573. {
  574. name:'督查',
  575. type:'pie',
  576. radius : [0, 65],
  577. labelLine:{
  578. normal: {
  579. length:20,
  580. }
  581. },
  582. label: {
  583. formatter: '{b}{c}个-{d}%',
  584. },
  585. data:[
  586. {value:this.chart2Data.dcN, name:'未督察'},
  587. {value:this.chart2Data.dcF, name:'已督察'},
  588. ]
  589. }
  590. ]
  591. };
  592. this.chart2.clear();
  593. this.chart2.setOption(option);
  594. },
  595. initChart3(){
  596. this.chart3 = echarts.init(document.getElementById('chart3'));
  597. var option = {
  598. grid: {
  599. left: '5%',
  600. right: '5%',
  601. bottom: '10%',
  602. top:'20%',
  603. containLabel: true,
  604. },
  605. tooltip: {
  606. trigger: 'axis',
  607. },
  608. legend: {//图例组件,颜色和名字
  609. left:'center',
  610. top:'0%',
  611. data:[{
  612. name:'问题数',
  613. },
  614. {
  615. name:'整改数',
  616. },
  617. {
  618. name:'整改率',
  619. }],
  620. textStyle: {
  621. color: 'grey',
  622. fontStyle: 'normal',
  623. fontFamily: '微软雅黑',
  624. fontSize: 12,
  625. }
  626. },
  627. xAxis: [
  628. {
  629. type: 'category',
  630. data: this.chart3Data.xData,
  631. axisLabel: { //坐标轴刻度标签的相关设置。
  632. textStyle: {
  633. color: 'grey',
  634. fontStyle: 'normal',
  635. fontFamily: '微软雅黑',
  636. fontSize: 10,
  637. },
  638. rotate:0,
  639. },
  640. axisTick:{//坐标轴刻度相关设置。
  641. show: false,
  642. },
  643. axisLine:{//坐标轴轴线相关设置
  644. lineStyle:{
  645. color:'grey',
  646. opacity:0.2
  647. }
  648. },
  649. splitLine: { //坐标轴在 grid 区域中的分隔线。
  650. show: false,
  651. }
  652. }
  653. ],
  654. yAxis: [
  655. {
  656. type: 'value',
  657. splitNumber: 10,
  658. axisLabel: {
  659. textStyle: {
  660. color: 'grey',
  661. fontStyle: 'normal',
  662. fontFamily: '微软雅黑',
  663. fontSize: 12,
  664. }
  665. },
  666. axisLine:{
  667. show: false
  668. },
  669. axisTick:{
  670. show: false
  671. },
  672. splitLine: {
  673. show: true,
  674. lineStyle: {
  675. color: ['grey'],
  676. opacity:0.06
  677. }
  678. }
  679. }
  680. ],
  681. yAxis: [
  682. {
  683. name:'(个)',
  684. type: 'value',
  685. splitNumber: 10,
  686. axisLabel: {
  687. textStyle: {
  688. color: 'grey',
  689. fontStyle: 'normal',
  690. fontFamily: '微软雅黑',
  691. fontSize: 12,
  692. }
  693. },
  694. axisLine:{
  695. show: false
  696. },
  697. axisTick:{
  698. show: false
  699. },
  700. splitLine: {
  701. show: true,
  702. lineStyle: {
  703. color: ['grey'],
  704. opacity:0.06
  705. }
  706. }
  707. }
  708. ],
  709. dataZoom: [{
  710. type: 'slider', //图表下方的伸缩条
  711. show: true, //是否显示
  712. height: 10,//这里可以设置dataZoom的尺寸
  713. realtime: true, //拖动时,是否实时更新系列的视图
  714. start: 0, //伸缩条开始位置(1-100),可以随时更改
  715. end: 100, //伸缩条结束位置(1-100),可以随时更改
  716. bottom:"0",
  717. textStyle:{
  718. color:'grey'
  719. }
  720. }],
  721. series : [
  722. {
  723. name:'问题数',
  724. type:'bar',
  725. data:this.chart3Data.questionList,
  726. barWidth: 8,
  727. barGap:1,//柱间距离
  728. itemStyle: {
  729. normal: {
  730. show: true,
  731. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  732. offset: 0,
  733. color: '#4e8cfb',
  734. }, {
  735. offset: 1,
  736. color: '#4e8cfb',
  737. }]),
  738. barBorderRadius: 50,
  739. borderWidth: 0,
  740. }
  741. }
  742. },
  743. {
  744. name:'整改数',
  745. type:'bar',
  746. data:this.chart3Data.changeList,
  747. barWidth: 8,
  748. barGap:1,//柱间距离
  749. itemStyle: {
  750. normal: {
  751. show: true,
  752. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  753. offset: 0,
  754. color: '#3dedc9',
  755. }, {
  756. offset: 1,
  757. color: '#3dedc9',
  758. }]),
  759. barBorderRadius: 50,
  760. borderWidth: 0,
  761. }
  762. }
  763. }
  764. ]
  765. };
  766. this.chart3.clear();
  767. this.chart3.setOption(option);
  768. },
  769. initChart4() {
  770. this.chart4 = echarts.init(document.getElementById('chart4'));
  771. var data = [];
  772. var color = ['#3e69fe', '#89bafe', '#9cf3e5']
  773. for (var i = 0; i < this.chart4Data.list.length; i++) {
  774. data.push({
  775. value: this.chart4Data.list[i].value,
  776. name: this.chart4Data.list[i].name,
  777. itemStyle: {
  778. normal: {
  779. borderWidth: 0,
  780. // shadowBlur: 20,
  781. borderColor: color[i],
  782. shadowColor: color[i]
  783. }
  784. }
  785. });
  786. }
  787. var seriesOption = [{
  788. name: '',
  789. type: 'pie',
  790. clockWise: false,
  791. radius: [50, 65],
  792. hoverAnimation: false,
  793. itemStyle: {
  794. normal: {
  795. label: {
  796. show: true,
  797. position: 'outside',
  798. color: 'grey',
  799. formatter: function (params) {
  800. if (params.name !== '') {
  801. return params.name + ' :' + params.value + '个';
  802. } else {
  803. return '';
  804. }
  805. },
  806. },
  807. labelLine: {
  808. length: 10,
  809. show: true,
  810. color: 'grey',
  811. }
  812. }
  813. },
  814. data: data
  815. }];
  816. var option = {
  817. color: color,
  818. title: {
  819. text: this.chart4Data.qustionTotal+'个\n问题',
  820. top: '40%',
  821. textAlign: "center",
  822. left: "49%",
  823. textStyle: {
  824. color: 'grey',
  825. fontSize: 14,
  826. fontWeight: '400'
  827. }
  828. },
  829. tooltip: {
  830. trigger: 'item',
  831. },
  832. grid: {
  833. left: '0%',
  834. right: '0%',
  835. bottom: '0%',
  836. top: '10%',
  837. containLabel: true,
  838. },
  839. series: seriesOption
  840. }
  841. this.chart4.clear();
  842. this.chart4.setOption(option);
  843. },
  844. initChart5() {
  845. this.chart6 = echarts.init(document.getElementById('chart5'));
  846. var option = {
  847. tooltip: {
  848. trigger: 'axis',
  849. },
  850. color:[
  851. '#bb60b2', '#433e7c', '#f47a75', '#009db2', '#024b51',
  852. '#0780cf', '#765005', '#e75840', '#26ccd8', '#3685fe',
  853. '#9977ef', '#f5616f', '#f7b13f', '#f9e264', '#50c48f'
  854. ],
  855. legend: {
  856. type: 'scroll',
  857. orient: 'horizontal',
  858. data: this.chart6Data.legend
  859. },
  860. grid: {
  861. left: '3%',
  862. right: '4%',
  863. bottom: '3%',
  864. containLabel: true
  865. },
  866. xAxis: [
  867. {
  868. type: 'category',
  869. data: this.chart6Data.xAxis,
  870. axisLabel: { //坐标轴刻度标签的相关设置。
  871. textStyle: {
  872. color: 'grey',
  873. fontStyle: 'normal',
  874. fontFamily: '微软雅黑',
  875. fontSize: 10,
  876. },
  877. rotate:0,
  878. },
  879. axisTick:{//坐标轴刻度相关设置。
  880. show: false,
  881. },
  882. axisLine:{//坐标轴轴线相关设置
  883. lineStyle:{
  884. color:'grey',
  885. opacity:0.2
  886. }
  887. },
  888. splitLine: { //坐标轴在 grid 区域中的分隔线。
  889. show: false,
  890. }
  891. }
  892. ],
  893. yAxis: [
  894. {
  895. name:'(个)',
  896. type: 'value',
  897. splitNumber: 10,
  898. axisLabel: {
  899. textStyle: {
  900. color: 'grey',
  901. fontStyle: 'normal',
  902. fontFamily: '微软雅黑',
  903. fontSize: 12,
  904. }
  905. },
  906. axisLine:{
  907. show: false
  908. },
  909. axisTick:{
  910. show: false
  911. },
  912. splitLine: {
  913. show: true,
  914. lineStyle: {
  915. color: ['grey'],
  916. opacity:0.06
  917. }
  918. }
  919. }
  920. ],
  921. dataZoom: [{
  922. type: 'slider', //图表下方的伸缩条
  923. show: true, //是否显示
  924. height: 10,//这里可以设置dataZoom的尺寸
  925. realtime: true, //拖动时,是否实时更新系列的视图
  926. start: 0, //伸缩条开始位置(1-100),可以随时更改
  927. end: 100, //伸缩条结束位置(1-100),可以随时更改
  928. bottom:"0",
  929. textStyle:{
  930. color:'grey'
  931. }
  932. }],
  933. series: this.chart6Data.list
  934. };
  935. this.chart6.clear();
  936. this.chart6.setOption(option);
  937. },
  938. initAddVcdFeatures(){
  939. let geoJsonName = this.organCode.substr(0, 6) + "DATA.json";
  940. return axios.get('/src/assets/addvGeoData/' + geoJsonName);
  941. },
  942. initMapChart:async function() {
  943. var _self = this;
  944. var convertData = function () {
  945. var res = [];
  946. for (var i = 0; i < _self.chart5Data.geoCoordMapList.length; i++) {
  947. var geoCoord = _self.chart5Data.geoCoordMap[_self.chart5Data.geoCoordMapList[i].name];
  948. if (geoCoord) {
  949. res.push({
  950. name: _self.chart5Data.geoCoordMapList[i].name,
  951. value: geoCoord.concat(_self.chart5Data.geoCoordMapList[i].value)
  952. });
  953. }
  954. }
  955. return res;
  956. };
  957. this.chart5 = echarts.init(document.getElementById('mapChart'));
  958. var jsonFeatures = await this.initAddVcdFeatures();
  959. echarts.registerMap(this.organNm, jsonFeatures.data);
  960. let option = {
  961. title: {
  962. text: this.mapTitleFocusName + '数量分布情况',
  963. left: 'center',
  964. textStyle: {
  965. color: this.themeColor
  966. }
  967. },
  968. tooltip: {
  969. trigger: 'item',
  970. formatter(params){
  971. if(params.seriesType=="map"){
  972. return params.data.name+":整改率"+params.data.value+"%";
  973. }else{
  974. return params.data.name+":问题数"+params.data.value[2]+"个";
  975. }
  976. }
  977. },
  978. geo: {
  979. itemStyle: {
  980. normal: {
  981. borderColor: 'white',
  982. borderWidth: 1,
  983. },
  984. },
  985. show: true,
  986. map: this.organNm,
  987. top: "80",
  988. bottom: "30",
  989. roam: true,
  990. zoom: .9,
  991. // regions: this.customSettings,
  992. selectedMode: false, //选中模式:single | multiple
  993. left: 0,
  994. right: 0,
  995. layoutCenter: ["50%", "50%"], //设置后left/right/top/bottom等属性无效
  996. layoutSize: "100%",
  997. label: {
  998. normal: { //静态的时候展示样式
  999. show: true, //是否显示地图省份得名称
  1000. textStyle: {
  1001. color: "#000",
  1002. fontSize: 12,
  1003. fontFamily: "Arial"
  1004. }
  1005. },
  1006. emphasis: { //动态展示的样式
  1007. color: '#6e6e6e',
  1008. }
  1009. },
  1010. },
  1011. visualMap: {
  1012. show: true,
  1013. min: 1,
  1014. max: 20,
  1015. left: 'right',
  1016. top: 'bottom',
  1017. orient:'horizontal',
  1018. text: ['高(整改率%)', '低'],
  1019. textStyle: {
  1020. color: '#ccc'
  1021. },
  1022. calculable: true,
  1023. seriesIndex: [1],
  1024. inRange: {
  1025. color: ['#eeeeee', '#ffa150']
  1026. }
  1027. },
  1028. legend: {
  1029. orient: 'vertical',
  1030. y: 'bottom',
  1031. x: 'right',
  1032. right:'0',
  1033. itemWidth: 15,
  1034. padding: 50,
  1035. data: [
  1036. {
  1037. name: '问题数',
  1038. }
  1039. ],
  1040. textStyle: {
  1041. color: 'grey'
  1042. }
  1043. },
  1044. series: [
  1045. {
  1046. name: '问题数',
  1047. type: 'scatter',
  1048. coordinateSystem: 'geo',
  1049. symbol: 'pin',
  1050. symbolSize: [50,50],
  1051. label: {
  1052. normal: {
  1053. show: true,
  1054. textStyle: {
  1055. color: '#fff',
  1056. fontSize: 9,
  1057. },
  1058. formatter (value){
  1059. return value.data.value[2]
  1060. }
  1061. }
  1062. },
  1063. itemStyle: {
  1064. normal: {
  1065. color: '#007dfe', //标志颜色
  1066. }
  1067. },
  1068. data:convertData(),
  1069. },
  1070. {
  1071. name: '整改率',
  1072. type: 'map',
  1073. map: this.mapName,
  1074. geoIndex: 0,
  1075. aspectScale: 0.75, //长宽比
  1076. showLegendSymbol: false, // 存在legend时显示
  1077. animation: false,
  1078. roam: true,
  1079. data:this.chart5Data.mapPercent
  1080. },
  1081. ]
  1082. };
  1083. this.chart5.clear();
  1084. this.chart5.setOption(option);
  1085. }
  1086. },
  1087. //生命周期 - 创建完成(可以访问当前this实例)
  1088. created() {
  1089. },
  1090. beforeCreate() {
  1091. }, //生命周期 - 创建之前
  1092. beforeMount() {
  1093. }, //生命周期 - 挂载之前
  1094. beforeUpdate() {
  1095. }, //生命周期 - 更新之前
  1096. updated() {
  1097. }, //生命周期 - 更新之后
  1098. beforeDestroy() {
  1099. }, //生命周期 - 销毁之前
  1100. destroyed() {
  1101. }, //生命周期 - 销毁完成
  1102. activated() {
  1103. } //如果页面有keep-alive缓存功能,这个函数会触发
  1104. };
  1105. </script>
  1106. <style>
  1107. .mainDiv{
  1108. width: 100%;
  1109. height:100%;
  1110. margin: 0;
  1111. padding: 0;
  1112. position: relative;
  1113. }
  1114. .dc-title{
  1115. width: 100%;
  1116. height:90px;
  1117. background: url(../../assets/titleBG.png) no-repeat;
  1118. background-size: 100% 100%;
  1119. font-family: 'Arial Negreta', 'Arial Normal', 'Arial', sans-serif;
  1120. text-align: center;
  1121. line-height: 75px;
  1122. font-weight: 700;
  1123. font-style: normal;
  1124. font-size: 25px;
  1125. }
  1126. .dc-left{
  1127. position: absolute;
  1128. z-index: 10;
  1129. width: 31.33%;
  1130. height:100%;
  1131. top:40px;
  1132. left:0;
  1133. }
  1134. .dc-center{
  1135. position: absolute;
  1136. z-index: 10;
  1137. width: 37%;
  1138. height:calc(100% - 50px);
  1139. top:90px;
  1140. left:31.33%; :0;
  1141. }
  1142. .dc-right{
  1143. position: absolute;
  1144. z-index: 10;
  1145. width: 31.33%;
  1146. height:100%;
  1147. top:40px;
  1148. right:0;
  1149. }
  1150. .dc-left-box{
  1151. position: relative;
  1152. width: calc(100% - 60px);
  1153. height:calc(50% - 50px);
  1154. margin-top: 20px;
  1155. margin: 0 auto;
  1156. margin-top: 20px;
  1157. background: url(../../assets/box1.png) no-repeat ;
  1158. background-size: 100% 100%;
  1159. }
  1160. .dc-right1-box{
  1161. position: relative;
  1162. width: calc(100% - 60px);
  1163. height:calc(30% - 40px);
  1164. margin-top: 20px;
  1165. margin: 0 auto;
  1166. margin-top: 20px;
  1167. background: url(../../assets/box2.png) no-repeat ;
  1168. background-size: 100% 100%;
  1169. }
  1170. .dc-right2-box{
  1171. position: relative;
  1172. width: calc(100% - 60px);
  1173. height:calc(40% - 40px);
  1174. margin-top: 20px;
  1175. margin: 0 auto;
  1176. margin-top: 20px;
  1177. background: url(../../assets/box2.png) no-repeat ;
  1178. background-size: 100% 100%;
  1179. }
  1180. .dc-right3-box{
  1181. position: relative;
  1182. width: calc(100% - 60px);
  1183. height:calc(30% - 40px);
  1184. margin-top: 20px;
  1185. margin: 0 auto;
  1186. margin-top: 20px;
  1187. background: url(../../assets/box2.png) no-repeat ;
  1188. background-size: 100% 100%;
  1189. }
  1190. .box-title{
  1191. position: absolute;
  1192. z-index: 20;
  1193. top: -15px;
  1194. font-weight: 700;
  1195. font-style: normal;
  1196. font-size: 24px;
  1197. color: #5B9FFF;
  1198. left: 30px;
  1199. }
  1200. .box-title1{
  1201. position: absolute;
  1202. z-index: 20;
  1203. top: -15px;
  1204. font-weight: 700;
  1205. font-style: normal;
  1206. font-size: 24px;
  1207. color: #5B9FFF;
  1208. right: 30px;
  1209. }
  1210. .box-title2{
  1211. position: absolute;
  1212. z-index: 20;
  1213. top: -15px;
  1214. font-weight: 700;
  1215. font-style: normal;
  1216. font-size: 24px;
  1217. color: #5B9FFF;
  1218. right: 10px;
  1219. }
  1220. .box-charts{
  1221. width: 100%;
  1222. height:100%;
  1223. }
  1224. .box-charts p{
  1225. text-indent: 10px;
  1226. font-size: 10px;
  1227. height:20px;
  1228. line-height: 20px;
  1229. overflow: hidden;
  1230. text-overflow: ellipsis;
  1231. white-space: nowrap;
  1232. display: block;
  1233. }
  1234. .box-charts p:nth-child(2){
  1235. color:#AAAAAA;
  1236. }
  1237. #box-ul{
  1238. list-style: none;
  1239. width: calc(100% - 20px);
  1240. height:calc(100% - 60px);
  1241. margin: 0 auto;
  1242. padding-top: 10px;
  1243. }
  1244. #box-ul li{
  1245. width: 100%;
  1246. height:40px;
  1247. display: flex;
  1248. margin-top: 10px;
  1249. }
  1250. .dot-content{
  1251. width: calc(100% - 20px);
  1252. }
  1253. .dot-img{
  1254. display: flex;
  1255. align-items: center;
  1256. }
  1257. .dot-img span{
  1258. background: #2d8cf0;
  1259. width: 15px;
  1260. height: 15px;
  1261. display: block;
  1262. border-radius: 10px;
  1263. }
  1264. .pager-new{
  1265. text-align: center;
  1266. }
  1267. .chart-tj{
  1268. width: calc(100% - 10px);
  1269. height:calc(100% - 60px);
  1270. margin: 0 auto;
  1271. padding-top: 30px;
  1272. }
  1273. .chart-single{
  1274. width: calc(100% - 10px);
  1275. height:calc(100% - 60px);
  1276. margin: 0 auto;
  1277. padding-top: 30px;
  1278. }
  1279. .dc-center ul{
  1280. width: 100%;
  1281. list-style: none;
  1282. }
  1283. .dc-center ul li{
  1284. width: 100%;
  1285. list-style: none;
  1286. display: inline-block;
  1287. width: calc(33.33% - 10px);
  1288. height:90px;
  1289. margin-left: 5px;
  1290. }
  1291. .center-title{
  1292. width: 100%;
  1293. height:30px;
  1294. text-align: center;
  1295. line-height: 30px;
  1296. font-family: 'Arial Negreta', 'Arial Normal', 'Arial', sans-serif;
  1297. font-weight: 700;
  1298. font-style: normal;
  1299. font-size: 18px;
  1300. color: #330006;
  1301. }
  1302. .center-content{
  1303. width: 100%;
  1304. height:60px;
  1305. background: url("../../assets/images/countBg.png") no-repeat;
  1306. background-size: 100% 100%;
  1307. }
  1308. .center-content p{
  1309. padding:0;
  1310. margin:0;
  1311. height:30px;
  1312. text-align: center;
  1313. line-height:30px;
  1314. }
  1315. .center-content p:first-child{
  1316. padding:0;
  1317. margin:0;
  1318. height:30px;
  1319. line-height: 30px;
  1320. font-family: 'Arial Negreta', 'Arial Normal', 'Arial', sans-serif;
  1321. font-weight: 700;
  1322. color: #D9001B;
  1323. font-size: 20px;
  1324. }
  1325. .center-content p:nth-child(2){
  1326. padding:0;
  1327. margin:0;
  1328. height:30px;
  1329. line-height: 30px;
  1330. font-family: 'Arial Negreta', 'Arial Normal', 'Arial', sans-serif;
  1331. font-weight: 700;
  1332. font-size: 14px;
  1333. }
  1334. .mapNode{
  1335. width: 100%;
  1336. height:calc(100% - 240px);
  1337. position: relative;
  1338. }
  1339. #mapChart{
  1340. width: 100%;
  1341. height:100%;
  1342. }
  1343. .dataContent{
  1344. position: absolute;
  1345. z-index: 100;
  1346. top:10px;
  1347. left:10px;
  1348. }
  1349. .dcTypeContent{
  1350. position: absolute;
  1351. z-index: 100;
  1352. top:10px;
  1353. right:10px;
  1354. display: inline-grid;
  1355. }
  1356. </style>