bjzshz.vue 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326
  1. <template>
  2. <div>
  3. <!-- 阴影背景
  4. <div class="bj_left"><img src="@/assets/images/sprhbj-left.png"/></div>
  5. <div class="bj_right"><img src="@/assets/images/sprhbj-right.png"/></div>-->
  6. <div class="bj_bottom"><img src="@/assets/images/sprhbj-bottom.png"/></div>
  7. <!--头部开始-->
  8. <div class="header">
  9. <h1>城市运行一网统管指挥中心</h1>
  10. </div>
  11. <!--头部结束-->
  12. <!-- 小头部 开始 -->
  13. <div class="nav_min">
  14. <div class="top_txt">
  15. <b>汽开区</b>
  16. <!-- <span>小雨</span>-->
  17. <!-- <span>9~16℃</span>-->
  18. </div>
  19. <div class="top_txt top_txt2">
  20. <span>{{ currentTime }}</span>
  21. <!-- <span>星期六</span>
  22. <b>11:16:58</b> -->
  23. </div>
  24. </div>
  25. <!-- 小头部 结束 -->
  26. <!-- 中间内容 开始 -->
  27. <div class="qkq_con">
  28. <!--左侧开始-->
  29. <div class="con_left_e">
  30. <div class="con_div">
  31. <div class="qkq_tit txt_t">办结率统计</div>
  32. <div class="qkq_qkq_div clearfix">
  33. <div class="qkq_hz qkq_hz2 fl">
  34. <p>自然人办件数:<b>{{ CompletionRate.numberOfProcessedItems }}</b></p>
  35. <p>自然人办结数:<b>{{ CompletionRate.completedQuantity }}</b></p>
  36. </div>
  37. <div id="qkq_bj5" class="fr"></div>
  38. </div>
  39. </div>
  40. <div class="con_div">
  41. <div class="qkq_tit txt_t">即办件统计数</div>
  42. <div class="qkq_qkq_div clearfix">
  43. <div class="qkq_hz fl">
  44. <p>即办件数:<b>{{ HandlingDocuments.instantProcessingQuantity }}</b></p>
  45. <p>承诺件数:<b>{{ HandlingDocuments.promisedQuantity }}</b></p>
  46. </div>
  47. <div id="qkq_bj2" class="fr"></div>
  48. </div>
  49. </div>
  50. <div class="con_div">
  51. <div class="qkq_tit txt_t">好差评统计</div>
  52. <div id="qkq_bj4"></div>
  53. </div>
  54. </div>
  55. <div class="con_left_f">
  56. <div class="con_div qkq_bjzs">
  57. <div class="qkq_bjzs_con">
  58. <h4>{{ HallHandling.hallTotal }}</h4>
  59. <p>大厅办件总数</p>
  60. <div class="qkq_bjzs_bg"></div>
  61. <div class="qkq_bjzs_txt clearfix">
  62. <div class="qkq_bjzs_txt_fl fl">
  63. <div class="bjzs_txt">
  64. <p>建设用地(含临时建设</br>用地)规划许可证</p>
  65. <p style="margin-top: 15px"><b>{{ HallHandling.buildLandUse }}</b>件</p>
  66. </div>
  67. <div class="bjzs_txt">
  68. <p>建设工程(含临时建设</br>工程)规划许可证</p>
  69. <p style="margin-top: 15px"><b>{{ HallHandling.architecturalEngineering }}</b>件</p>
  70. </div>
  71. <div class="bjzs_txt">
  72. <p>建筑工程施工许可证</p>
  73. <p><b>{{ HallHandling.architecturalLicence }}</b>件</p>
  74. </div>
  75. <div class="bjzs_txt">
  76. <p>年度平均审批用时</br>项目用时</p>
  77. <p style="margin-top: 15px"><b>{{ HallHandling.projectTime }}</b>件</p>
  78. </div>
  79. </div>
  80. <div class="qkq_bjzs_txt_fr fr">
  81. <div class="bjzs_txt">
  82. <p>年度平均审批用时</br>立项用地阶段</p>
  83. <p style="margin-top: 15px"><b>{{ HallHandling.projectApprovalStage }}</b>件</p>
  84. </div>
  85. <div class="bjzs_txt">
  86. <p>年度平均审批用时</br>工程规划阶段</p>
  87. <p style="margin-top: 15px"><b>{{ HallHandling.planStage }}</b>件</p>
  88. </div>
  89. <div class="bjzs_txt">
  90. <p>年度平均审批用时</br>施工许可阶段</p>
  91. <p style="margin-top: 15px"><b>{{ HallHandling.permitStage }}</b>件</p>
  92. </div>
  93. <div class="bjzs_txt">
  94. <p>年度平均审批用时</br>竣工验收阶段</p>
  95. <p style="margin-top: 15px"><b>{{ HallHandling.acceptancePhase }}</b>件</p>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. <div class="con_div">
  102. <div class="qkq_tit txt_t">办理渠道统计</div>
  103. <div class="qkq_bjs_con">
  104. <div class="qkq_bjs" v-for="(item, index) in channel" :key="index">
  105. <img src="../../assets/images/qkq_icon19.png"/>
  106. <div class="qkq_bjs_txt">
  107. <p>{{ item.channelName }}</p>
  108. <p><b>{{ item.handleNumber }}</b>件</p>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. <div class="con_left_g">
  115. <div class="con_div">
  116. <div class="qkq_tit txt_t">新办企业数</div>
  117. <div id="qkq_bj1"></div>
  118. </div>
  119. <div class="con_div">
  120. <div class="qkq_tit txt_t">公安办件统计</div>
  121. <div id="qkq_bj3"></div>
  122. </div>
  123. <div class="con_div">
  124. <div class="qkq_tit txt_t">高频事项Top10</div>
  125. <div class="qkq_sxtop">
  126. <p v-for="(item, index) in HighFrequencyMatters" :key="index">
  127. <a><i>{{ index + 1 }}</i>{{ item.eventName }}</a><span>{{ item.eventCount }}件</span>
  128. </p>
  129. </div>
  130. </div>
  131. </div>
  132. <!--左侧结束-->
  133. </div>
  134. <!-- 中间内容 结束 -->
  135. <!--底部开始-->
  136. <div class="footer">
  137. <div class="nav-bottom">
  138. <div class="nav-bottom-left">
  139. <div class="nav-li-left" @click="handleNavigation('jjyx')">
  140. <span>经济运行</span>
  141. </div>
  142. <div class="nav-li-left" @click="handleNavigation('csgl')">
  143. <span>城市管理</span>
  144. </div>
  145. <div class="nav-li-left" @click="handleNavigation('jtzl')">
  146. <span>交通治理</span>
  147. </div>
  148. <div class="nav-li-left" @click="handleNavigation('jczl')">
  149. <span>基层治理</span>
  150. </div>
  151. </div>
  152. <div class="nav-home-middle" @click="homePage('weather')">
  153. <img src="@/assets/images/home-btn.png"/>
  154. <a>返回首页</a>
  155. </div>
  156. <div class="nav-bottom-right">
  157. <div class="nav-li-right" @click="handleNavigation('yshj_new')">
  158. <span>营商环境</span>
  159. </div>
  160. <div class="nav-li-right on" @click="handleNavigation('bjzshz')">
  161. <span>政务运行</span>
  162. </div>
  163. <div class="nav-li-right" @click="handleNavigation('aqyj')">
  164. <span>安全应急</span>
  165. </div>
  166. <div class="nav-li-right" @click="handleNavigation('fwyq')">
  167. <span>服务一汽</span>
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. <!--底部开始-->
  173. </div>
  174. </template>
  175. <script>
  176. import * as echarts from 'echarts'
  177. import $ from 'jquery'
  178. import jQuery from 'jquery'
  179. import "@/assets/images/qkq_body.css";
  180. import "@/assets/images/qkq_index.css";
  181. import "@/assets/images/qkq_sprh.css";
  182. import {
  183. getCameraList
  184. } from "@/api/system/camera";
  185. import supermap from "@/views/supermap/supermap";
  186. import {
  187. lastOneBadList,
  188. lastOneBusinessList,
  189. lastOneRateList,
  190. lastOneHandlingList,
  191. lastOneDocumentsList, lastOneMattersList, lastOnePdocumentsList, visualizationChannelList
  192. } from "@/api/system/zwyx";
  193. export default {
  194. name: "bjzshz",
  195. components: {
  196. supermap
  197. },
  198. data() {
  199. return {
  200. dropdownVisible: false,
  201. HandlingDocuments:{},
  202. BadReview:{},
  203. Business:{},
  204. CompletionRate:{},
  205. HallHandling:{},
  206. HighFrequencyMatters:{},
  207. PublicSecurityDocuments:{},
  208. channel: [],
  209. sltProps: null,
  210. currentTime: '',
  211. btnOne: true,
  212. btnTwo: false,
  213. };
  214. // 可根据实际情况添加更多设备列表
  215. },
  216. created() {
  217. this.lastOneBadList();
  218. this.lastOneBusinessList();
  219. this.lastOneRateList();
  220. this.lastOneHandlingList();
  221. this.lastOneDocumentsList();
  222. this.lastOneMattersList();
  223. this.lastOnePdocumentsList();
  224. this.visualizationChannelList();
  225. },
  226. mounted() {
  227. // this.qkq_bj1();
  228. // this.qkq_bj2();
  229. //
  230. // this.qkq_bj3();
  231. // this.qkq_bj4();
  232. // this.qkq_bj5();
  233. this.getCurrentTime();
  234. // 每秒刷新时间
  235. setInterval(() => {
  236. this.getCurrentTime();
  237. }, 1000);
  238. },
  239. methods: {
  240. sltHandle() {
  241. this.btnOne = true
  242. this.btnTwo = false
  243. this.$refs.supermap.getSupermap(null, null, null, "slt", null, null)
  244. },
  245. yxtHandle() {
  246. this.btnTwo = true
  247. this.btnOne = false
  248. this.$refs.supermap.getSupermap(null, null, null, "yxt", null, null)
  249. },
  250. handleNavigation(route) {
  251. this.$router.push({
  252. path: route
  253. });
  254. },
  255. homePage(route) {
  256. this.$router.push({
  257. path: route
  258. });
  259. },
  260. visualizationChannelList() {
  261. visualizationChannelList().then(response => {
  262. this.channel = response.data;
  263. })
  264. },
  265. //查询新办企业可视化
  266. lastOneBusinessList() {
  267. lastOneBusinessList().then(response => {
  268. this.Business = response.data;
  269. this.qkq_bj1(this.Business)
  270. })
  271. },
  272. //查询好差评可视化
  273. lastOneBadList() {
  274. lastOneBadList().then(response => {
  275. this.BadReview = response.data;
  276. this.qkq_bj4(this.BadReview)
  277. })
  278. },
  279. //查询办结率可视化
  280. lastOneRateList() {
  281. lastOneRateList().then(response => {
  282. this.CompletionRate = response.data;
  283. this.qkq_bj5(this.CompletionRate)
  284. })
  285. },
  286. //查询大厅办件可视化
  287. lastOneHandlingList() {
  288. lastOneHandlingList().then(response => {
  289. this.HallHandling = response.data;
  290. })
  291. },
  292. //查询即办件可视化
  293. lastOneDocumentsList() {
  294. lastOneDocumentsList().then(response => {
  295. this.HandlingDocuments = response.data;
  296. this.qkq_bj2(this.HandlingDocuments)
  297. })
  298. },
  299. //查询高频事项可视化
  300. lastOneMattersList() {
  301. lastOneMattersList().then(response => {
  302. this.HighFrequencyMatters = response.data;
  303. })
  304. },
  305. //查询公安办件可视化
  306. lastOnePdocumentsList() {
  307. lastOnePdocumentsList().then(response => {
  308. this.PublicSecurityDocuments = response.data;
  309. this.qkq_bj3(this.PublicSecurityDocuments)
  310. })
  311. },
  312. toggleDropdown(event) {
  313. this.dropdownVisible = !this.dropdownVisible;
  314. },
  315. qkq_bj1(val) {
  316. //新办企业数
  317. var myChart = echarts.init(document.getElementById('qkq_bj1'));
  318. let labelData = val.labelData;
  319. let data = val.valueNewEnterprises;
  320. var json = {
  321. chart0: {
  322. xcategory: labelData,
  323. low: data,
  324. lowLine: [],
  325. }
  326. };
  327. var zrUtil = echarts.util;
  328. zrUtil.each(json.chart0.xcategory, function (item, index) {
  329. json.chart0.lowLine.push([{
  330. coord: [index, json.chart0.low[index]]
  331. }, {
  332. coord: [index + 1, json.chart0.low[index + 1]]
  333. }]);
  334. });
  335. var option = {
  336. grid: {
  337. top: 30,
  338. left: 10,
  339. right: 10,
  340. bottom: 0,
  341. containLabel: true,
  342. },
  343. tooltip: {
  344. trigger: 'axis',
  345. axisPointer: {
  346. lineStyle: {
  347. color: {
  348. type: 'linear',
  349. x: 0,
  350. y: 0,
  351. x2: 0,
  352. y2: 1,
  353. colorStops: [
  354. {
  355. offset: 0,
  356. color: 'rgba(255,255,255,0)', // 0% 处的颜色
  357. },
  358. {
  359. offset: 0.5,
  360. color: 'rgba(255,255,255,1)', // 100% 处的颜色
  361. },
  362. {
  363. offset: 1,
  364. color: 'rgba(255,255,255,0)', // 100% 处的颜色
  365. },
  366. ],
  367. global: false, // 缺省为 false
  368. },
  369. },
  370. },
  371. },
  372. xAxis: [
  373. {
  374. type: 'category',
  375. boundaryGap: false,
  376. axisLabel: {
  377. formatter: '{value}',
  378. fontSize: 14,
  379. margin: 20,
  380. textStyle: {
  381. color: '#7ec7ff',
  382. },
  383. },
  384. axisLine: {
  385. lineStyle: {
  386. color: '#243753',
  387. },
  388. },
  389. splitLine: {
  390. show: false,
  391. lineStyle: {
  392. color: '#243753',
  393. },
  394. },
  395. axisTick: {
  396. show: false,
  397. },
  398. data: labelData,
  399. },
  400. ],
  401. yAxis: [
  402. {
  403. boundaryGap: false,
  404. type: 'value',
  405. axisLabel: {
  406. textStyle: {
  407. color: '#7ec7ff',
  408. },
  409. },
  410. nameTextStyle: {
  411. color: '#fff',
  412. fontSize: 12,
  413. lineHeight: 40,
  414. },
  415. splitLine: {
  416. lineStyle: {
  417. color: '#243753',
  418. },
  419. },
  420. axisLine: {
  421. show: true,
  422. lineStyle: {
  423. color: '#283352',
  424. },
  425. },
  426. axisTick: {
  427. show: false,
  428. },
  429. },
  430. ],
  431. series: [
  432. {
  433. name: '报名',
  434. type: 'line',
  435. smooth: true,
  436. showSymbol: true,
  437. symbolSize: 8,
  438. zlevel: 3,
  439. itemStyle: {
  440. color: '#19a3df',
  441. borderColor: '#a3c8d8',
  442. },
  443. areaStyle: {
  444. normal: {
  445. color: new echarts.graphic.LinearGradient(
  446. 0,
  447. 0,
  448. 0,
  449. 1,
  450. [
  451. {
  452. offset: 0,
  453. color: 'rgba(88,255,255,0.2)',
  454. },
  455. {
  456. offset: 0.8,
  457. color: 'rgba(88,255,255,0)',
  458. },
  459. ],
  460. false
  461. ),
  462. },
  463. },
  464. data: data,
  465. },
  466. {
  467. name: '实施计划',
  468. type: 'lines',
  469. coordinateSystem: 'cartesian2d',
  470. zlevel: 1,
  471. smooth: true,
  472. symbol: 'circle',
  473. effect: {
  474. show: true,
  475. smooth: true,
  476. period: 2,
  477. symbolSize: 8
  478. },
  479. lineStyle: {
  480. normal: {
  481. color: '#19a3df',
  482. width: 0,
  483. opacity: 0,
  484. curveness: 0,
  485. }
  486. },
  487. data: json.chart0.lowLine
  488. }
  489. ],
  490. };
  491. if (option) {
  492. myChart.setOption(option);
  493. }
  494. },
  495. qkq_bj2(val) {
  496. var myChart = echarts.init(document.getElementById('qkq_bj2'));
  497. var getmax = 100;
  498. //要改变的数据
  499. var getvalue = val.immediateRate;
  500. var option = {
  501. grid: {
  502. top: 0,
  503. bottom: 0,
  504. left: 0
  505. },
  506. angleAxis: {
  507. show: false,
  508. max: (getmax * 360) / 270, //-45度到225度,二者偏移值是270度除360度
  509. type: 'value',
  510. startAngle: 225, //极坐标初始角度
  511. splitLine: {
  512. show: false,
  513. },
  514. },
  515. barMaxWidth: 20, //圆环宽度
  516. radiusAxis: {
  517. show: false,
  518. type: 'category',
  519. },
  520. //圆环位置和大小
  521. polar: {
  522. center: ['50%', '50%'],
  523. radius: '170%',
  524. },
  525. series: [
  526. {
  527. type: 'bar',
  528. data: [
  529. {
  530. //上层圆环,显示数据
  531. value: getvalue,
  532. itemStyle: {
  533. color: '#2AD2FB',
  534. },
  535. },
  536. ],
  537. barGap: '-100%', //柱间距离,上下两层圆环重合
  538. coordinateSystem: 'polar',
  539. roundCap: true, //顶端圆角
  540. z: 3, //圆环层级,同zindex
  541. },
  542. {
  543. //下层圆环,显示最大值
  544. type: 'bar',
  545. data: [
  546. {
  547. value: getmax,
  548. itemStyle: {
  549. color: '#164B9F',
  550. opacity: 1,
  551. borderWidth: 0,
  552. },
  553. },
  554. ],
  555. barGap: '-100%',
  556. coordinateSystem: 'polar',
  557. roundCap: true,
  558. z: 1,
  559. },
  560. //仪表盘
  561. {
  562. type: 'gauge',
  563. startAngle: 225, //起始角度,同极坐标
  564. endAngle: -45, //终止角度,同极坐标
  565. axisLine: {
  566. show: false,
  567. },
  568. splitLine: {
  569. show: false,
  570. },
  571. axisTick: {
  572. show: false,
  573. },
  574. axisLabel: {
  575. show: false,
  576. },
  577. splitLabel: {
  578. show: false,
  579. },
  580. pointer: {
  581. // 分隔线
  582. shadowColor: 'auto', //默认透明
  583. shadowBlur: 5,
  584. length: '50%',
  585. width: '2',
  586. show: false,
  587. },
  588. itemStyle: {
  589. color: '#1598FF',
  590. borderColor: '#1598FF',
  591. borderWidth: 6,
  592. },
  593. detail: {
  594. formatter: function (params) {
  595. // return '完成率\n'+getvalue + '%';
  596. return `{wcl|即办率\n}{number|${getvalue + '%'}}`;
  597. },
  598. rich: {
  599. number: {
  600. fontSize: 25,
  601. textAlign: 'center',
  602. },
  603. wcl: {
  604. fontSize: 16,
  605. textAlign: 'center',
  606. },
  607. },
  608. color: '#fff',
  609. lineHeight: 30,
  610. offsetCenter: ['0', '0'],
  611. },
  612. title: {
  613. show: false,
  614. },
  615. data: [
  616. {
  617. value: getvalue,
  618. },
  619. ],
  620. },
  621. {
  622. name: '外部刻度',
  623. type: 'gauge',
  624. // center: ['20%', '50%'],
  625. radius: '70%',
  626. min: 0, //最小刻度
  627. max: 100, //最大刻度
  628. splitNumber: 10, //刻度数量
  629. startAngle: 225,
  630. endAngle: -45,
  631. axisLine: {
  632. show: true,
  633. lineStyle: {
  634. width: 1,
  635. color: [[1, 'rgba(0,0,0,0)']],
  636. },
  637. }, //仪表盘轴线
  638. axisLabel: {
  639. show: false,
  640. color: '#4d5bd1',
  641. distance: 25,
  642. }, //刻度标签。
  643. axisTick: {
  644. show: true,
  645. splitNumber: 7,
  646. lineStyle: {
  647. color: '#086CAF', //用颜色渐变函数不起作用
  648. width: 2,
  649. },
  650. length: -8,
  651. }, //刻度样式
  652. splitLine: {
  653. show: false,
  654. length: -20,
  655. lineStyle: {
  656. color: '#C7CBCF', //用颜色渐变函数不起作用
  657. },
  658. }, //分隔线样式
  659. detail: {
  660. show: false,
  661. },
  662. pointer: {
  663. show: false,
  664. },
  665. },
  666. ],
  667. };
  668. myChart.setOption(option);
  669. if (option) {
  670. myChart.setOption(option);
  671. }
  672. },
  673. qkq_bj3(val) {
  674. var myChart = echarts.init(document.getElementById('qkq_bj3'));
  675. var labelData = val.labelData;
  676. var data1 = val.valueForeigners;
  677. var data2 = val.valuePassport;
  678. var data3 = val.valueHongKong;
  679. var data4 = val.valueTaiwan;
  680. var json1 = {
  681. chart0: {
  682. xcategory: labelData,
  683. low: data1,
  684. lowLine: [],
  685. }
  686. };
  687. var zrUtil = echarts.util;
  688. zrUtil.each(json1.chart0.xcategory, function (item, index) {
  689. json1.chart0.lowLine.push([{
  690. coord: [index, json1.chart0.low[index]]
  691. }, {
  692. coord: [index + 1, json1.chart0.low[index + 1]]
  693. }]);
  694. });
  695. var option = {
  696. title: {
  697. text: '',
  698. textStyle: {
  699. align: 'center',
  700. color: '#fff',
  701. fontSize: 20,
  702. },
  703. top: '5%',
  704. left: 'center',
  705. },
  706. tooltip: {
  707. trigger: 'axis',
  708. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  709. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  710. }
  711. },
  712. grid: {
  713. left: '2%',
  714. right: '4%',
  715. bottom: '14%',
  716. top: '16%',
  717. containLabel: true
  718. },
  719. legend: {
  720. data: ['护', '港', '台', "外国人"],
  721. right: 10,
  722. top: 12,
  723. textStyle: {
  724. color: "#fff"
  725. },
  726. itemWidth: 12,
  727. itemHeight: 10,
  728. // itemGap: 35
  729. },
  730. xAxis: {
  731. type: 'category',
  732. data: labelData,
  733. axisLine: {
  734. lineStyle: {
  735. color: 'white'
  736. }
  737. },
  738. axisLabel: {
  739. // interval: 0,
  740. // rotate: 40,
  741. textStyle: {
  742. fontFamily: 'Microsoft YaHei'
  743. }
  744. },
  745. },
  746. yAxis: {
  747. type: 'value',
  748. max: '1200',
  749. axisLine: {
  750. show: false,
  751. lineStyle: {
  752. color: 'white'
  753. }
  754. },
  755. splitLine: {
  756. show: true,
  757. lineStyle: {
  758. color: 'rgba(255,255,255,0.3)'
  759. }
  760. },
  761. axisLabel: {}
  762. },
  763. "dataZoom": [{
  764. "show": true,
  765. "height": 8,
  766. "xAxisIndex": [
  767. 0
  768. ],
  769. bottom: '8%',
  770. "start": 10,
  771. "end": 90,
  772. handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
  773. handleSize: '110%',
  774. handleStyle: {
  775. color: "#d3dee5",
  776. },
  777. textStyle: {
  778. color: "#fff"
  779. },
  780. borderColor: "#90979c"
  781. }, {
  782. "type": "inside",
  783. "show": true,
  784. "height": 15,
  785. "start": 1,
  786. "end": 35
  787. }],
  788. series: [{
  789. name: '护',
  790. type: 'bar',
  791. barWidth: '15%',
  792. itemStyle: {
  793. normal: {
  794. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  795. offset: 0,
  796. color: '#fccb05'
  797. }, {
  798. offset: 1,
  799. color: '#f5804d'
  800. }]),
  801. barBorderRadius: 12,
  802. },
  803. emphasis: {
  804. barBlur: 20, // 流光效果宽度
  805. barShadowBlur: 20, // 阴影的宽度
  806. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  807. offset: 0,
  808. color: '#fccb05'
  809. }, {
  810. offset: 1,
  811. color: '#f5804d'
  812. }]) // 流光效果的颜色
  813. }
  814. },
  815. data: data2
  816. },
  817. {
  818. name: '港',
  819. type: 'bar',
  820. barWidth: '15%',
  821. itemStyle: {
  822. normal: {
  823. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  824. offset: 0,
  825. color: '#8bd46e'
  826. }, {
  827. offset: 1,
  828. color: '#09bcb7'
  829. }]),
  830. barBorderRadius: 11,
  831. },
  832. emphasis: {
  833. barBlur: 20,
  834. barShadowBlur: 20,
  835. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  836. offset: 0,
  837. color: '#8bd46e'
  838. }, {
  839. offset: 1,
  840. color: '#09bcb7'
  841. }])
  842. }
  843. },
  844. data: data3
  845. },
  846. {
  847. name: '台',
  848. type: 'bar',
  849. barWidth: '15%',
  850. itemStyle: {
  851. normal: {
  852. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  853. offset: 0,
  854. color: '#248ff7'
  855. }, {
  856. offset: 1,
  857. color: '#6851f1'
  858. }]),
  859. barBorderRadius: 11,
  860. },
  861. emphasis: {
  862. barBlur: 20,
  863. barShadowBlur: 20,
  864. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  865. offset: 0,
  866. color: '#248ff7'
  867. }, {
  868. offset: 1,
  869. color: '#6851f1'
  870. }])
  871. }
  872. },
  873. data: data4
  874. }, {
  875. name: "外国人",
  876. type: "line",
  877. symbolSize: 10,
  878. symbol: 'circle',
  879. itemStyle: {
  880. normal: {
  881. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  882. offset: 0,
  883. color: '#0000ff'
  884. }, {
  885. offset: 1,
  886. color: '#00ffff'
  887. }]),
  888. barBorderRadius: 0,
  889. label: {
  890. show: true,
  891. position: "top",
  892. formatter: function (p) {
  893. return p.value > 0 ? (p.value) : '';
  894. }
  895. }
  896. }
  897. },
  898. data: data1
  899. }, {
  900. name: '外国人',
  901. type: 'lines',
  902. coordinateSystem: 'cartesian2d',
  903. zlevel: 1,
  904. smooth: true,
  905. symbol: 'circle',
  906. effect: {
  907. show: true,
  908. smooth: true,
  909. period: 4,
  910. symbolSize: 8
  911. },
  912. lineStyle: {
  913. normal: {
  914. color: '#00ffff',
  915. width: 0,
  916. opacity: 0,
  917. curveness: 0,
  918. }
  919. },
  920. data: json1.chart0.lowLine,
  921. },]
  922. };
  923. if (option) {
  924. myChart.setOption(option);
  925. }
  926. },
  927. qkq_bj4(val) {
  928. var myChart = echarts.init(document.getElementById('qkq_bj4'));
  929. var zdslColorList = ['#D0A00E', '#34DA62', '#00C0E9', '#0096F3', '#33CCFF'];
  930. // 假设这是满意度数据的最大值,用于流光效果的终点
  931. var maxSatisfaction = Math.max(...[100, 100, 100, 100, 100]);
  932. let valueData = val.valueData;
  933. let labelData = val.labelData;
  934. var option = {
  935. grid: {
  936. top: '5%',
  937. left: '3%',
  938. right: '3%',
  939. bottom: '0',
  940. containLabel: true
  941. },
  942. tooltip: {
  943. backgroundColor: 'rgba(65,114,231,0.8)',
  944. show: false,
  945. },
  946. xAxis: {
  947. show: false,
  948. type: 'value'
  949. },
  950. yAxis: [{
  951. type: 'category',
  952. data: labelData,
  953. axisLabel: {
  954. show: true,
  955. textStyle: {
  956. color: '#ADD6FF',
  957. fontSize: '12'
  958. }
  959. },
  960. splitLine: {
  961. show: false
  962. },
  963. axisTick: {
  964. show: false
  965. },
  966. axisLine: {
  967. show: false
  968. },
  969. },
  970. {
  971. splitLine: {
  972. show: false
  973. },
  974. axisTick: {
  975. show: false
  976. },
  977. axisLine: {
  978. show: false
  979. },
  980. axisLabel: {
  981. show: true,
  982. textStyle: {
  983. color: '#ADD6FF',
  984. fontSize: '12'
  985. }
  986. },
  987. data: valueData
  988. }
  989. ],
  990. series: [{
  991. name: "满意度", // bar图的外边框
  992. type: "bar",
  993. barWidth: "40%",
  994. yAxisIndex: 0,
  995. data: valueData.map((item, i) => {
  996. return {
  997. value: item,
  998. itemStyle: {
  999. color: "rgba(0,0,0,0)",
  1000. barBorderColor: zdslColorList[i],
  1001. borderWidth: 1,
  1002. shadowColor: "#17209c",
  1003. shadowBlur: 4
  1004. }
  1005. }
  1006. }),
  1007. },
  1008. {
  1009. name: "满意度", //这个是Bar图
  1010. type: 'bar',
  1011. yAxisIndex: 1,
  1012. barWidth: "40%",
  1013. data: valueData
  1014. },
  1015. {
  1016. name: '流光效果',
  1017. type: 'lines',
  1018. zlevel: 1, // 确保流光在条形图之上
  1019. coordinateSystem: 'cartesian2d',
  1020. data: valueData.map((item, index) => {
  1021. return {
  1022. coords: [
  1023. [0, index],
  1024. [item / maxSatisfaction * 100, index] // 将满意度数据转换为百分比形式,以适应x轴的范围
  1025. ]
  1026. };
  1027. }),
  1028. effect: {
  1029. show: true,
  1030. period: 5,
  1031. trailLength: 0.5, //控制拖尾长度
  1032. symbolSize: [15, 2],
  1033. symbol: this.$store.state.common.echarts_baseStreamer,
  1034. loop: true,
  1035. color: '#fff' //流光颜色
  1036. },
  1037. lineStyle: {
  1038. width: 0,
  1039. opacity: 0.6,
  1040. curveness: 0
  1041. },
  1042. }
  1043. ],
  1044. itemStyle: {
  1045. color: function (params) {
  1046. return zdslColorList[params.dataIndex]
  1047. }
  1048. }
  1049. }
  1050. if (option) {
  1051. myChart.setOption(option);
  1052. }
  1053. },
  1054. qkq_bj5(val) {
  1055. var myChart = echarts.init(document.getElementById('qkq_bj5'));
  1056. var getmax = 100;
  1057. //要改变的数据
  1058. var getvalue = val.completionRate;
  1059. var option = {
  1060. grid: {
  1061. top: 0,
  1062. bottom: 0,
  1063. left: 0
  1064. },
  1065. angleAxis: {
  1066. show: false,
  1067. max: (getmax * 360) / 270, //-45度到225度,二者偏移值是270度除360度
  1068. type: 'value',
  1069. startAngle: 225, //极坐标初始角度
  1070. splitLine: {
  1071. show: false,
  1072. },
  1073. },
  1074. barMaxWidth: 20, //圆环宽度
  1075. radiusAxis: {
  1076. show: false,
  1077. type: 'category',
  1078. },
  1079. //圆环位置和大小
  1080. polar: {
  1081. center: ['50%', '50%'],
  1082. radius: '170%',
  1083. },
  1084. series: [
  1085. {
  1086. type: 'bar',
  1087. data: [
  1088. {
  1089. //上层圆环,显示数据
  1090. value: getvalue,
  1091. itemStyle: {
  1092. color: '#2AD2FB',
  1093. },
  1094. },
  1095. ],
  1096. barGap: '-100%', //柱间距离,上下两层圆环重合
  1097. coordinateSystem: 'polar',
  1098. roundCap: true, //顶端圆角
  1099. z: 3, //圆环层级,同zindex
  1100. },
  1101. {
  1102. //下层圆环,显示最大值
  1103. type: 'bar',
  1104. data: [
  1105. {
  1106. value: getmax,
  1107. itemStyle: {
  1108. color: '#164B9F',
  1109. opacity: 1,
  1110. borderWidth: 0,
  1111. },
  1112. },
  1113. ],
  1114. barGap: '-100%',
  1115. coordinateSystem: 'polar',
  1116. roundCap: true,
  1117. z: 1,
  1118. },
  1119. //仪表盘
  1120. {
  1121. type: 'gauge',
  1122. startAngle: 225, //起始角度,同极坐标
  1123. endAngle: -45, //终止角度,同极坐标
  1124. axisLine: {
  1125. show: false,
  1126. },
  1127. splitLine: {
  1128. show: false,
  1129. },
  1130. axisTick: {
  1131. show: false,
  1132. },
  1133. axisLabel: {
  1134. show: false,
  1135. },
  1136. splitLabel: {
  1137. show: false,
  1138. },
  1139. pointer: {
  1140. // 分隔线
  1141. shadowColor: 'auto', //默认透明
  1142. shadowBlur: 5,
  1143. length: '50%',
  1144. width: '2',
  1145. show: false,
  1146. },
  1147. itemStyle: {
  1148. color: '#1598FF',
  1149. borderColor: '#1598FF',
  1150. borderWidth: 6,
  1151. },
  1152. detail: {
  1153. formatter: function (params) {
  1154. // return '完成率\n'+getvalue + '%';
  1155. return `{wcl|办结率\n}{number|${getvalue + '%'}}`;
  1156. },
  1157. rich: {
  1158. number: {
  1159. fontSize: 25,
  1160. textAlign: 'center',
  1161. },
  1162. wcl: {
  1163. fontSize: 16,
  1164. textAlign: 'center',
  1165. },
  1166. },
  1167. color: '#fff',
  1168. lineHeight: 30,
  1169. offsetCenter: ['0', '0'],
  1170. },
  1171. title: {
  1172. show: false,
  1173. },
  1174. data: [
  1175. {
  1176. value: getvalue,
  1177. },
  1178. ],
  1179. },
  1180. {
  1181. name: '外部刻度',
  1182. type: 'gauge',
  1183. // center: ['20%', '50%'],
  1184. radius: '70%',
  1185. min: 0, //最小刻度
  1186. max: 100, //最大刻度
  1187. splitNumber: 10, //刻度数量
  1188. startAngle: 225,
  1189. endAngle: -45,
  1190. axisLine: {
  1191. show: true,
  1192. lineStyle: {
  1193. width: 1,
  1194. color: [[1, 'rgba(0,0,0,0)']],
  1195. },
  1196. }, //仪表盘轴线
  1197. axisLabel: {
  1198. show: false,
  1199. color: '#4d5bd1',
  1200. distance: 25,
  1201. }, //刻度标签。
  1202. axisTick: {
  1203. show: true,
  1204. splitNumber: 7,
  1205. lineStyle: {
  1206. color: '#086CAF', //用颜色渐变函数不起作用
  1207. width: 2,
  1208. },
  1209. length: -8,
  1210. }, //刻度样式
  1211. splitLine: {
  1212. show: false,
  1213. length: -20,
  1214. lineStyle: {
  1215. color: '#C7CBCF', //用颜色渐变函数不起作用
  1216. },
  1217. }, //分隔线样式
  1218. detail: {
  1219. show: false,
  1220. },
  1221. pointer: {
  1222. show: false,
  1223. },
  1224. },
  1225. ],
  1226. };
  1227. myChart.setOption(option);
  1228. if (option) {
  1229. myChart.setOption(option);
  1230. }
  1231. },
  1232. getCurrentTime() {
  1233. const now = new Date();
  1234. const year = now.getFullYear();
  1235. const month = now.getMonth() + 1;
  1236. const date = now.getDate();
  1237. const day = now.getDay();
  1238. const weekDays = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
  1239. const hour = now.getHours();
  1240. const minute = now.getMinutes();
  1241. const second = now.getSeconds();
  1242. const formattedMonth = month < 10 ? `0${month}` : month;
  1243. const formattedDate = date < 10 ? `0${date}` : date;
  1244. const formattedHour = hour < 10 ? `0${hour}` : hour;
  1245. const formattedMinute = minute < 10 ? `0${minute}` : minute;
  1246. const formattedSecond = second < 10 ? `0${second}` : second;
  1247. this.currentTime =
  1248. `${year}年${formattedMonth}月${formattedDate}日 ${weekDays[day]} ${formattedHour}:${formattedMinute}:${formattedSecond}`;
  1249. },
  1250. }
  1251. };
  1252. // import '@/assets/images/leftnav.js';
  1253. $(function () {
  1254. var Accordion = function (el, multiple) {
  1255. this.el = el || {};
  1256. this.multiple = multiple || false;
  1257. // Variables privadas
  1258. var links = this.el.find('.link');
  1259. // Evento
  1260. links.on('click', {
  1261. el: this.el,
  1262. multiple: this.multiple
  1263. }, this.dropdown)
  1264. };
  1265. Accordion.prototype.dropdown = function (e) {
  1266. var $el = e.data.el;
  1267. let $this = $(this);
  1268. let $next = $this.next();
  1269. $next.slideToggle();
  1270. $this.parent().toggleClass('open');
  1271. if (!e.data.multiple) {
  1272. $el.find('.submenu').not($next).slideUp().parent().removeClass('open');
  1273. }
  1274. };
  1275. var accordion = new Accordion($('#accordion'), false);
  1276. $('.submenu li').click(function () {
  1277. $(this).addClass('current').siblings('li').removeClass('current');
  1278. });
  1279. });
  1280. </script>
  1281. <style>
  1282. /* 添加你的CSS样式 */
  1283. </style>