index.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport"
  6. content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  7. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  8. <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="/static/head_office/head_office.css">
  10. <title>{$sys_info['value']}&nbsp;&nbsp;</title>
  11. </head>
  12. <body>
  13. <div class="nav-header">
  14. <div class="nav-left" id="clock"></div>
  15. <div class="nav-title">{$sys_info['value']}总公司大屏</div>
  16. <div class="nav-right">系统已正常运行{$day}天</div>
  17. </div>
  18. <div class="main">
  19. <div class="main1">
  20. <div class="main1-left">
  21. <div class="main1-left1">
  22. <div class="left1-one">
  23. <text class="left1-num" id="todoCount"></text>
  24. <text class="left1-title">今日工单总数</text>
  25. </div>
  26. <div class="left1-two" id="todoCompletion">
  27. </div>
  28. <div class="box-chart-text">
  29. <div class="box-chart-text-title">今日工单完成率</div>
  30. <div class="box-chart-text-count" id="article-chart-count"></div>
  31. </div>
  32. <div class="left1-there">
  33. <text class="left1-num" id="orgUserCount"></text>
  34. <text class="left1-title">项目总人数</text>
  35. </div>
  36. <div class="left1-four">
  37. <text class="left1-num" id="orgCount"></text>
  38. <text class="left1-title">总项目数</text>
  39. </div>
  40. <div class="left1-five">
  41. <text class="left1-num" id="escortCount"></text>
  42. <text class="left1-title">护工数</text>
  43. </div>
  44. </div>
  45. <div class="main1-left2">
  46. <div class="title">用户数据统计</div>
  47. <div class="userData" id="userDataEcharts"></div>
  48. </div>
  49. </div>
  50. <div class="main1-center" id="gdmap">
  51. <div class="title">项目分布及数据分析</div>
  52. <div class="orgRanking">
  53. <div class="org-title">本月满意度排名</div>
  54. <div class="org-name" >
  55. <div class="org-name-one" id="orgFirst">1.</div>
  56. <div class="org-name-one" id="orgSecond">2.</div>
  57. <div class="org-name-one" id="orgThird">3.</div>
  58. </div>
  59. </div>
  60. </div>
  61. <div class="main1-right">
  62. <div class="main1-right1">
  63. <div class="waste-all">
  64. <div class="waste-title">各项目医废数据统计</div>
  65. <div class="waste-date">
  66. <text class="month" id="thisMonth">本月</text>
  67. <text class="year" id="thisYear">本年</text>
  68. </div>
  69. </div>
  70. <div class="waste-data" id="wasteData"></div>
  71. </div>
  72. <div class="main1-right2">
  73. <div class="escort-all">
  74. <div class="escort-title">各项目陪护单数据统计</div>
  75. <div class="escort-date">
  76. <text class="month" id="thisMonthOne">本月</text>
  77. <text class="year" id="thisYearOne">本年</text>
  78. </div>
  79. </div>
  80. <div class="escort-data" id="escortData"></div>
  81. </div>
  82. </div>
  83. </div>
  84. <div class="main2">
  85. <div class="main2-left">
  86. <div class="todo-count-title">各项目本月工单统计</div>
  87. <div class="main-body">
  88. <div class="tablebox" id="todotable">
  89. <!-- 表头容器 -->
  90. <div class="tbl-header">
  91. <table border="0" cellspacing="0" cellpadding="0">
  92. <thead>
  93. <tr>
  94. <th style="text-align: left;padding-left: 30px">项目名称</th>
  95. <th style="text-align: right;padding-right: 30px">工单数量</th>
  96. </tr>
  97. </thead>
  98. <tbody style="opacity:0;"></tbody>
  99. </table>
  100. </div>
  101. <!-- 表格内容容器-->
  102. <div class="tbl-body">
  103. <table border="0" cellspacing="0" cellpadding="0">
  104. <thead>
  105. <tr>
  106. <th style="text-align: left;padding-left: 30px">项目名称</th>
  107. <th style="text-align: right;padding-right: 30px">工单数量</th>
  108. </tr>
  109. </thead>
  110. <tbody id="todoNumsCount">
  111. </tbody>
  112. </table>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="main2-center">
  118. <div class="center-title">各项目工单指数数据统计</div>
  119. <div class="org-todo-data-count" id="orgTodoCount"></div>
  120. </div>
  121. <div class="main2-right">
  122. <div class="todo-count-title">可视化管理巡查数据分析</div>
  123. <div class="xc-img" id="patrolImg">
  124. </div>
  125. <div class="patrol" id="patrolData"></div>
  126. </div>
  127. </div>
  128. </div>
  129. </body>
  130. </html>
  131. <script src="/static/jquery-1.11.3.min.js"></script>
  132. <script src="https://webapi.amap.com/maps?v=1.4.15&key=8964cd514e753504076df304f1395aa7"></script>
  133. <script type="text/javascript" src="/static/echarts.js"></script>
  134. <script src="/static/head_office/js/china.js"></script>
  135. <script src="/static/head_office/js/mymap.js"></script>
  136. <script src="/static/head_office/swiper/swiper-bundle.min.js"></script>
  137. <script>
  138. var map;
  139. var todocate = 1;
  140. var scorecate = 1;
  141. var modecate = 1;
  142. var patrols = [];
  143. var patrolindex = 1;
  144. var text = document.title;
  145. var timer;
  146. var partoltimer;
  147. var MyMarhq;
  148. var MyMarhq2;
  149. var neworgs;
  150. var markers;
  151. var newidx = 0;
  152. var type = 1;
  153. var type2 = 1;
  154. $(window).resize(function(){
  155. location.reload()
  156. });
  157. $(function () {
  158. changeZoom();
  159. // 地图
  160. map = new AMap.Map('gdmap', {
  161. resizeEnable: true, //是否监控地图容器尺寸变化
  162. mapStyle: "amap://styles/darkblue",
  163. zoom: 12, //初始化地图层级
  164. center: [116.39, 39.9] //初始化地图中心点
  165. });
  166. setInterval(function () {
  167. let marker = markers[newidx];
  168. createWindowInfo(marker);
  169. if(newidx >= markers.length - 1){
  170. newidx = 0
  171. }else{
  172. newidx++
  173. }
  174. },6*1000);
  175. window.setInterval("realSysTime(clock)", 1000);
  176. });
  177. function changeZoom() {
  178. var wb = $(window).width()/1920;
  179. var hb = $(window).height()/1080;
  180. if(wb >= hb){
  181. $('body').css({
  182. 'zoom': hb,
  183. });
  184. }else{
  185. $('body').css({
  186. 'zoom': wb,
  187. });
  188. }
  189. }
  190. var text = document.title;
  191. var timer;
  192. function loadingTitle() {
  193. clearTimeout(timer);
  194. document.title = text.substring(1,text.length) + text.substring(0,1);
  195. text = document.title.substring(0,text.length);
  196. timer = setTimeout("loadingTitle()", 500)
  197. }
  198. loadingTitle();
  199. getCountNum();
  200. getTodoCompletion();
  201. getOrgUserCount();
  202. getOrgRanking();
  203. getOrgList();
  204. qiehuan();
  205. getTodoNumsCount();
  206. getTodoTimeLength();
  207. getPatrolImg();
  208. getPatrolRecord();
  209. getEscortCount();
  210. setInterval(function () {
  211. getCountNum();
  212. getTodoCompletion();
  213. getOrgUserCount();
  214. getOrgRanking();
  215. getOrgList();
  216. getTodoNumsCount();
  217. getTodoTimeLength();
  218. getPatrolImg();
  219. getPatrolRecord();
  220. getEscortCount();
  221. }, 1*60000);
  222. setInterval(function (){
  223. qiehuan();
  224. },6000)
  225. function qiehuan(){
  226. if(type == 1){
  227. $('#thisMonth').css('background-color','#002D89');
  228. $('#thisYear').css('background-color','');
  229. getWaste();
  230. type = 0;
  231. }else{
  232. $('#thisMonth').css('background-color','')
  233. $('#thisYear').css('background-color','#002D89')
  234. getWaste1();
  235. type = 1;
  236. }
  237. if(type2 == 1){
  238. $('#thisMonthOne').css('background-color','#002D89');
  239. $('#thisYearOne').css('background-color','');
  240. getEscortCount();
  241. type2 = 0;
  242. }else{
  243. $('#thisMonthOne').css('background-color','')
  244. $('#thisYearOne').css('background-color','#002D89')
  245. getEscortCount1();
  246. type2 = 1;
  247. }
  248. }
  249. function getCountNum(){
  250. var url = '/api/Headoffice/orgCount';
  251. $.post(url,{},function (res) {
  252. $('#todoCount').html(res.data.todoCount);
  253. $('#orgUserCount').html(res.data.userCount);
  254. $('#orgCount').html(res.data.orgCount);
  255. $('#escortCount').html(res.data.escortCount);
  256. $('#article-chart-count').html(res.data.todoCompletion);
  257. })
  258. }
  259. function getTodoCompletion(){
  260. var url = '/api/Headoffice/todoCompletion';
  261. $.post(url,{},function (res) {
  262. if(res.code == 0) {
  263. var lists = res.data;
  264. option = {
  265. color:['#FF7531','#6F7377'],
  266. series: [
  267. {
  268. type: 'pie',
  269. radius: ['85%', '100%'],
  270. avoidLabelOverlap: false,
  271. label: {
  272. show: false,
  273. position: 'center'
  274. },
  275. emphasis: {
  276. label: {
  277. show: true,
  278. fontSize: '40',
  279. fontWeight: 'bold'
  280. }
  281. },
  282. labelLine: {
  283. show: false
  284. },
  285. data: lists
  286. }
  287. ]
  288. };
  289. var myChart = echarts.init(document.getElementById('todoCompletion'));
  290. myChart.setOption(option);
  291. }
  292. })
  293. }
  294. function getOrgUserCount(){
  295. var url = '/api/Headoffice/userCount';
  296. $.post(url,{},function (res) {
  297. if(res.code == 0) {
  298. var lists = res.data;
  299. option = {
  300. color:['#995BE5','#F55699','#FFF265','#FF7723','#588AF0'],
  301. series: [
  302. {
  303. type: 'pie',
  304. radius: ['40%', '70%'],
  305. avoidLabelOverlap: false,
  306. minAngle: 1, // 设置每块扇形的最小占比
  307. hoverAnimation: false,
  308. label: {
  309. normal: {
  310. show : true,
  311. formatter: "{b}:{c}",
  312. textStyle: {
  313. fontSize: 12,
  314. color: "#fff",
  315. },
  316. }
  317. },
  318. data: lists,
  319. }
  320. ]
  321. };
  322. var myChart = echarts.init(document.getElementById('userDataEcharts'));
  323. myChart.setOption(option);
  324. }
  325. })
  326. }
  327. function getOrgRanking(){
  328. var url = '/api/Headoffice/orgRanking';
  329. $.post(url,{},function (res) {
  330. if(res.data.length > 0){
  331. $('#orgFirst').html('1.'+res.data[0].name);
  332. $('#orgSecond').html('2.'+res.data[1].name);
  333. $('#orgThird').html('3.'+res.data[2].name);
  334. }
  335. })
  336. }
  337. function getOrgList(){
  338. var url = '/api/Headoffice/orgList';
  339. $.post(url,{},function (res) {
  340. if(res.code == 0) {
  341. let orgs = res.data;
  342. let idx = 0;
  343. markers = [];
  344. newidx = 0;
  345. for(let o in orgs){
  346. if(orgs[o].lat && orgs[o].lng){
  347. let marker = new AMap.Marker({
  348. position: new AMap.LngLat(orgs[o].lng, orgs[o].lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
  349. title: orgs[o].name
  350. });
  351. marker.orgId = orgs[o].id;
  352. marker.orgName = orgs[o].name;
  353. marker.orgLat = orgs[o].lat;
  354. marker.orgLng = orgs[o].lng;
  355. marker.on('click',function (e) {
  356. console.log(e);
  357. createWindowInfo(marker);
  358. });
  359. map.add(marker);
  360. markers.push(marker);
  361. if(idx == 0){
  362. createWindowInfo(marker);
  363. }
  364. idx++;
  365. }
  366. }
  367. if(markers.length > 1){
  368. newidx = 1;
  369. }
  370. }
  371. })
  372. }
  373. //wasteData
  374. function getWaste(){
  375. var url = '/api/Headoffice/wasteCount';
  376. $.post(url,{},function (res) {
  377. if(res.code == 0) {
  378. var lists = res.data;
  379. option = {
  380. color:['#FFF265'],
  381. xAxis: {
  382. type: 'category',
  383. data: lists.x,
  384. axisLabel: {
  385. show: true,
  386. textStyle: {
  387. color: '#ffffff' //这里用参数代替了
  388. }
  389. },
  390. axisLine:{
  391. lineStyle:{
  392. color:'#FFFFFF',
  393. width:1,//这里是为了突出显示加上的
  394. }
  395. },
  396. axisLabel:{
  397. rotate:30
  398. }
  399. },
  400. yAxis: {
  401. name:'重量/kg',
  402. splitLine:{
  403. show:false
  404. },
  405. // 去掉背景的网格线
  406. axisLabel: {
  407. show: true,
  408. textStyle: {
  409. color:'#ffffff' //这里用参数代替了
  410. }
  411. },
  412. axisLine:{
  413. lineStyle:{
  414. color:'#FFFFFF',
  415. width:1,//这里是为了突出显示加上的
  416. }
  417. }
  418. },
  419. series: [{
  420. data: lists.y,
  421. type: 'bar',
  422. barWidth:10
  423. }]
  424. };
  425. var myChart = echarts.init(document.getElementById('wasteData'));
  426. myChart.setOption(option);
  427. }
  428. })
  429. }
  430. //wasteData
  431. function getWaste1(){
  432. var url = '/api/Headoffice/wasteCount';
  433. $.post(url,{},function (res) {
  434. if(res.code == 0) {
  435. var lists = res.data;
  436. option = {
  437. color:['#FFF265'],
  438. xAxis: {
  439. type: 'category',
  440. data: lists.x,
  441. axisLabel: {
  442. show: true,
  443. textStyle: {
  444. color: '#ffffff' //这里用参数代替了
  445. }
  446. },
  447. axisLine:{
  448. lineStyle:{
  449. color:'#FFFFFF',
  450. width:1,//这里是为了突出显示加上的
  451. }
  452. },
  453. axisLabel:{
  454. rotate:30
  455. }
  456. },
  457. yAxis: {
  458. name:'重量/kg',
  459. splitLine:{
  460. show:false
  461. },
  462. // 去掉背景的网格线
  463. axisLabel: {
  464. show: true,
  465. textStyle: {
  466. color:'#ffffff' //这里用参数代替了
  467. }
  468. },
  469. axisLine:{
  470. lineStyle:{
  471. color:'#FFFFFF',
  472. width:1,//这里是为了突出显示加上的
  473. }
  474. }
  475. },
  476. series: [{
  477. data: lists.y2,
  478. type: 'bar',
  479. barWidth:10
  480. }]
  481. };
  482. var myChart = echarts.init(document.getElementById('wasteData'));
  483. myChart.setOption(option);
  484. }
  485. })
  486. }
  487. //escort-date
  488. function getEscortCount(){
  489. var url = '/api/Headoffice/phCount';
  490. $.post(url,{},function (res) {
  491. if(res.code == 0) {
  492. var lists = res.data;
  493. option = {
  494. color:['#F55699'],
  495. xAxis: {
  496. type: 'category',
  497. data: lists.x,
  498. axisLabel: {
  499. show: true,
  500. textStyle: {
  501. color: '#ffffff' //这里用参数代替了
  502. }
  503. },
  504. axisLine:{
  505. lineStyle:{
  506. color:'#FFFFFF',
  507. width:1,//这里是为了突出显示加上的
  508. }
  509. },
  510. axisLabel:{
  511. rotate:30
  512. }
  513. },
  514. yAxis: {
  515. name:'数量',
  516. splitLine:{
  517. show:false
  518. },
  519. // 去掉背景的网格线
  520. axisLabel: {
  521. show: true,
  522. textStyle: {
  523. color:'#ffffff' //这里用参数代替了
  524. }
  525. },
  526. axisLine:{
  527. lineStyle:{
  528. color:'#FFFFFF',
  529. width:1,//这里是为了突出显示加上的
  530. }
  531. }
  532. },
  533. series: [{
  534. data: lists.y,
  535. type: 'bar',
  536. barWidth:10
  537. }]
  538. };
  539. var myChart = echarts.init(document.getElementById('escortData'));
  540. myChart.setOption(option);
  541. }
  542. })
  543. }
  544. function getEscortCount1(){
  545. var url = '/api/Headoffice/phCount';
  546. $.post(url,{},function (res) {
  547. if(res.code == 0) {
  548. var lists = res.data;
  549. option = {
  550. color:['#F55699'],
  551. xAxis: {
  552. type: 'category',
  553. data: lists.x,
  554. axisLabel: {
  555. show: true,
  556. textStyle: {
  557. color: '#ffffff' //这里用参数代替了
  558. }
  559. },
  560. axisLine:{
  561. lineStyle:{
  562. color:'#FFFFFF',
  563. width:1,//这里是为了突出显示加上的
  564. }
  565. },
  566. axisLabel:{
  567. rotate:30
  568. }
  569. },
  570. yAxis: {
  571. name:'数量',
  572. splitLine:{
  573. show:false
  574. },
  575. // 去掉背景的网格线
  576. axisLabel: {
  577. show: true,
  578. textStyle: {
  579. color:'#ffffff' //这里用参数代替了
  580. }
  581. },
  582. axisLine:{
  583. lineStyle:{
  584. color:'#FFFFFF',
  585. width:1,//这里是为了突出显示加上的
  586. }
  587. }
  588. },
  589. series: [{
  590. data: lists.y2,
  591. type: 'bar',
  592. barWidth:10
  593. }]
  594. };
  595. var myChart = echarts.init(document.getElementById('escortData'));
  596. myChart.setOption(option);
  597. }
  598. })
  599. }
  600. //todoNumsCount
  601. function getTodoNumsCount(){
  602. var url = '/api/Headoffice/todoCount';
  603. $.post(url,{},function (res) {
  604. if(res.code == 0) {
  605. var str = '';
  606. var lists = res.data;
  607. for (let o in lists){
  608. str += '<tr>';
  609. str += '<td><div style="width:65%!important;height: 35px;overflow: hidden;text-align: left;margin-left: 30px">'+lists[o].name+'</div></td>';
  610. str += '<td><div style="overflow: hidden;text-align: right;margin-right: 47px">'+lists[o].count+'</div></td>';
  611. str += '</tr>';
  612. }
  613. $('#todoNumsCount').html(str);
  614. }
  615. })
  616. }
  617. function getTodoTimeLength(){
  618. var url = '/api/Headoffice/todoTimeLength';
  619. $.post(url,{},function (res) {
  620. if(res.code == 0) {
  621. var lists = res.data;
  622. option = {
  623. color: ['#7D9AFB','#FEC006'],
  624. legend: {
  625. right:'5',
  626. data:['平均响应时长','平均完成时长'],
  627. textStyle:{
  628. color:'#fff',
  629. fontSize: 12,
  630. },
  631. },
  632. dataZoom: {
  633. show: false,
  634. start: 0,
  635. end: 100
  636. },
  637. xAxis: [
  638. {
  639. axisLabel: {
  640. show: true,
  641. textStyle: {
  642. color: '#fff'
  643. },
  644. rotate:30
  645. },
  646. axisLine: {
  647. lineStyle: {
  648. color: '#7D9AFB',//左边线的颜色
  649. width:'3'//坐标线的宽度
  650. }
  651. },
  652. type: 'category',
  653. boundaryGap: true,
  654. data: lists.x,
  655. },
  656. {
  657. type: 'category',
  658. boundaryGap: true,
  659. data: []
  660. }
  661. ],
  662. yAxis: [
  663. {
  664. splitLine:{
  665. show:false, //去掉网格线
  666. },
  667. // 去掉背景的网格线
  668. axisLabel: {
  669. show: true,
  670. textStyle: {
  671. color:'#ffffff' //这里用参数代替了
  672. }
  673. },
  674. axisLine:{
  675. lineStyle:{
  676. color:'#FFFFFF',
  677. width:1,//这里是为了突出显示加上的
  678. }
  679. }
  680. },
  681. {
  682. type: 'value',
  683. name:'分钟',
  684. scale: true,
  685. // 去掉背景的网格线
  686. axisLabel: {
  687. show: true,
  688. textStyle: {
  689. color:'#ffffff' //这里用参数代替了
  690. }
  691. },
  692. axisLine:{
  693. lineStyle:{
  694. color:'#FFFFFF',
  695. width:1,//这里是为了突出显示加上的
  696. }
  697. }
  698. },
  699. {
  700. type: 'value',
  701. scale: true,
  702. main:0,
  703. // name:'分钟',
  704. // boundaryGap: [0.2, 0.2],
  705. axisLabel: {
  706. textStyle: {
  707. color: '#fff'
  708. },
  709. },
  710. },
  711. ],
  712. series: [
  713. {
  714. name: '平均响应时长',
  715. type: 'bar',
  716. xAxisIndex: 1,
  717. yAxisIndex: 1,
  718. data:lists.y,
  719. barWidth :20,
  720. },
  721. {
  722. name: '平均完成时长',
  723. type: 'line',
  724. data:lists.y2,
  725. barWidth :20,
  726. }
  727. ]
  728. };
  729. var myChart = echarts.init(document.getElementById('orgTodoCount'));
  730. myChart.setOption(option);
  731. }
  732. })
  733. }
  734. function getPatrolImg(){
  735. var url = '/api/Headoffice/patrolImg';
  736. $.post(url,{},function (res) {
  737. var lists = res.data;
  738. if(res.code == 0) {
  739. var str = '';
  740. for(let i in lists){
  741. str += '<img src="'+lists[i].images+'" >';
  742. }
  743. $('#patrolImg').html(str);
  744. }
  745. })
  746. }
  747. function getPatrolRecord(){
  748. var url = '/api/Headoffice/patrolRecordCount';
  749. $.post(url,{},function (res) {
  750. if(res.code == 0) {
  751. var lists = res.data;
  752. option = {
  753. tooltip: {
  754. trigger: 'axis',
  755. axisPointer: {
  756. type: 'cross',
  757. label: {
  758. backgroundColor: '#6a7985'
  759. }
  760. }
  761. },
  762. color: ['#9433D6','#1E8BFF','#E9179C'],
  763. legend: {
  764. data: ['巡检', '巡视', '巡查'],
  765. textStyle: {
  766. color: "#ffffff"
  767. }
  768. },
  769. toolbox: {
  770. // feature: {
  771. // saveAsImage: {}
  772. // }
  773. },
  774. grid: {
  775. left: '3%',
  776. right: '4%',
  777. bottom: '3%',
  778. containLabel: true
  779. },
  780. xAxis: [
  781. {
  782. type: 'category',
  783. boundaryGap: false,
  784. data: lists.date,
  785. axisLabel: {
  786. show: true,
  787. textStyle: {
  788. color: '#ffffff' //这里用参数代替了
  789. }
  790. },
  791. }
  792. ],
  793. yAxis: [
  794. {
  795. type: 'value',
  796. name:'数量',
  797. splitLine:{
  798. show:false
  799. },
  800. // 去掉背景的网格线
  801. axisLabel: {
  802. show: true,
  803. textStyle: {
  804. color:'#ffffff' //这里用参数代替了
  805. }
  806. },
  807. axisLine:{
  808. lineStyle:{
  809. color:'#FFFFFF',
  810. width:1,//这里是为了突出显示加上的
  811. }
  812. }
  813. }
  814. ],
  815. series: [
  816. {
  817. name: '巡检',
  818. type: 'line',
  819. stack: '总量',
  820. smooth: true,
  821. areaStyle: {
  822. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  823. offset: 0,
  824. color: '#1E8BFF'
  825. }, {
  826. offset: 1,
  827. color: '#8340F4'
  828. }])
  829. },
  830. data: lists.count1,
  831. },
  832. {
  833. name: '巡视',
  834. type: 'line',
  835. stack: '总量',
  836. smooth: true,
  837. areaStyle: {
  838. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  839. offset: 0,
  840. color: '#B745FF'
  841. }, {
  842. offset: 1,
  843. color: '#208AF7'
  844. }])
  845. },
  846. data: lists.count2,
  847. },
  848. {
  849. name: '巡查',
  850. type: 'line',
  851. stack: '总量',
  852. smooth: true,
  853. areaStyle: {
  854. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
  855. offset: 0,
  856. color: '#E9179C'
  857. }, {
  858. offset: 1,
  859. color: '#091759'
  860. }])
  861. },
  862. data: lists.count3,
  863. },
  864. ]
  865. };
  866. var myChart = echarts.init(document.getElementById('patrolData'));
  867. myChart.setOption(option);
  868. }
  869. })
  870. }
  871. function realSysTime(clock) {
  872. var now = new Date();
  873. var year = now.getFullYear(); //获取年份
  874. var month = now.getMonth(); //获取月份
  875. var date = now.getDate(); //获取日期
  876. var day = now.getDay(); //获取星期
  877. var hour = now.getHours(); //获取小时
  878. var minute = now.getMinutes(); //获取分钟
  879. var seconds = now.getSeconds(); //获取秒
  880. month = month + 1;
  881. var arr_week = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
  882. var week = arr_week[day];
  883. if (month<10) {
  884. month = '0'+month
  885. }
  886. if (date<10) {
  887. date = '0'+date
  888. }
  889. if (hour<10) {
  890. hour = '0'+hour
  891. }
  892. if (minute<10) {
  893. minute = '0'+minute
  894. }
  895. if (seconds<10) {
  896. seconds = '0'+seconds
  897. }
  898. var time = year + "年" + month + "月" + date + "日 " + week + " " + hour + ":" + minute + ":" + seconds;
  899. clock.innerHTML = time;
  900. }
  901. function createWindowInfo(marker) {
  902. let url = "/screen/Index/project?orgid="+marker.orgId;
  903. let content = [
  904. "<span style='color:#0045C6;'>"+marker.orgName+"</span>"
  905. ];
  906. // // 创建 infoWindow 实例
  907. let infoWindow = new AMap.InfoWindow({
  908. content: content.join("<br>"), //传入 dom 对象,或者 html 字符串
  909. offset: new AMap.Pixel(0, -30)
  910. });
  911. // 打开信息窗体
  912. infoWindow.open(map, marker.getPosition());
  913. map.setCenter(marker.getPosition());
  914. }
  915. </script>