index.html 35 KB

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