0
0

ph_screen.html 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <meta http-equiv="refresh" content="3600">
  8. <title>{$orgInfo.name}陪护平台</title>
  9. <!-- <link rel="Shortcut Icon" href="/img/logo.png" type="image/x-icon" />-->
  10. <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.min.css">
  11. <link rel="stylesheet" href="/screen/css/style.css">
  12. <style>
  13. .fullscreen{
  14. width: 100px;
  15. height: 100px;
  16. font-size: 60px;
  17. position: fixed;
  18. z-index: 100000000000000000000;
  19. right: 50px;
  20. top: 50px;
  21. color: #ffffff;
  22. cursor: pointer;
  23. }
  24. </style>
  25. </head>
  26. <body>
  27. <div class="nav-header">
  28. <div class="nav-title">
  29. <!-- {notempty name="logo"}-->
  30. <!-- <img class="nav-title-logo" src="{$logo}" alt="">-->
  31. <!-- {/notempty}-->
  32. <text>智能陪护平台-{$orgInfo.name}</text>
  33. </div>
  34. <div class="nav-date">
  35. <div class="fgx1"></div>
  36. <text id="his"></text>
  37. <div class="fgx2"></div>
  38. <text id="ymd"></text>
  39. <div class="fgx3"></div>
  40. <text id="weekDate"></text>
  41. </div>
  42. </div>
  43. <div class="main">
  44. <div class="main1">
  45. <div class="main1-one">
  46. <div class="title-all">
  47. <div class="title-left">
  48. <img src="/screen/images/project/title-zsys.png" alt="">
  49. <text>护工数据分析</text>
  50. </div>
  51. </div>
  52. <div class="main1-bottom">
  53. <div class="main1-bottom-left" id="workersStatusEcharts"></div>
  54. <div class="underway-workers">
  55. <div class="title">服务中护工</div>
  56. <div class="nums" id="fwzWorker"></div>
  57. </div>
  58. <div class="main1-bottom-right">
  59. <div class="leisure-workers">
  60. <div class="title">空闲中护工</div>
  61. <div class="nums" id="kxzWorker"></div>
  62. </div>
  63. <div class="workers-count-nums">
  64. <div class="title">护工总数</div>
  65. <div class="nums" id="workerCount"></div>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="main1-two">
  71. <div class="title-all">
  72. <div class="title-left">
  73. <img src="/screen/images/project/title-zsys.png" alt="">
  74. <text>护工工作量统计</text>
  75. </div>
  76. </div>
  77. <div class="worker-comment-order">
  78. <table class="table2" style="margin: 10px 0;" border="0">
  79. <thead>
  80. <tr>
  81. <th>姓名</th>
  82. <th>进行中</th>
  83. <th>已完成</th>
  84. </tr>
  85. </thead>
  86. <tbody id="commentOrder">
  87. </tbody>
  88. </table>
  89. </div>
  90. </div>
  91. </div>
  92. <div class="main2">
  93. <div class="main2-one">
  94. <div class="title-all">
  95. <div class="title-left">
  96. <img src="/screen/images/project/title-zsys.png" alt="">
  97. <text>订单数据分析</text>
  98. </div>
  99. </div>
  100. <div class="main2-order-all">
  101. <div class="main2-order-left">
  102. <div class="underway-order">
  103. <div class="title">服务中订单</div>
  104. <div class="nums" id="fwzOrder"></div>
  105. </div>
  106. <div class="add-order">
  107. <div class="title">今日新增订单</div>
  108. <div class="nums" id="addOrder"></div>
  109. </div>
  110. <div class="accomplish-order">
  111. <div class="title">今日结算订单</div>
  112. <div class="nums" id="jsOrder"></div>
  113. </div>
  114. </div>
  115. <div class="main2-order-right">
  116. <div class="main2-order-title">订单总数</div>
  117. <div class="main2-order-nums">
  118. <text id="orderCount"></text>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <div class="main2-two">
  124. <div class="title-all">
  125. <div class="title-left">
  126. <img src="/screen/images/project/title-zsys.png" alt="">
  127. <text>订单数据分析</text>
  128. </div>
  129. </div>
  130. <div class="order-data" id="orderDataEcharts"></div>
  131. </div>
  132. </div>
  133. <div class="main3">
  134. <div class="main3-top">
  135. <div class="title-all">
  136. <div class="title-left">
  137. <img src="/screen/images/project/title-zsys.png" alt="">
  138. <text>护工数据分析</text>
  139. </div>
  140. </div>
  141. <div class="main3-top-table">
  142. <table class="table2" style="margin: 10px 0;" border="0">
  143. <tr>
  144. <th>姓名</th>
  145. <th>服务病人数</th>
  146. <th>服务天数</th>
  147. </tr>
  148. <tbody id="workerInfo">
  149. </tbody>
  150. </table>
  151. </div>
  152. </div>
  153. <div class="main3-bottom">
  154. <div class="title-all">
  155. <div class="title-left">
  156. <img src="/screen/images/project/title-zsys.png" alt="">
  157. <text>订单实时数据</text>
  158. </div>
  159. </div>
  160. <div class="main3-bottom-table">
  161. <table class="table2" style="margin: 10px 0;" border="0">
  162. <tbody id="orderMessageLists">
  163. </tbody>
  164. </table>
  165. </div>
  166. </div>
  167. </div>
  168. </div>
  169. <div class="fullscreen">
  170. <i class="glyphicon glyphicon-fullscreen" id="fullscreenbtn" onclick="fullScreen(this)"></i>
  171. </div>
  172. <script src="/static/jquery-1.11.3.min.js"></script>
  173. <script type="text/javascript" src="/static/echarts.js"></script>
  174. <script>
  175. $(window).resize(function(){
  176. // location.reload()
  177. $('#fullscreenbtn').show();
  178. changeZoom();
  179. });
  180. $(function () {
  181. $('.fullscreen').hover(function () {
  182. $('#fullscreenbtn').show();
  183. },function () {
  184. setTimeout(function () {
  185. $('#fullscreenbtn').hide();
  186. },5000);
  187. });
  188. changeZoom();
  189. });
  190. var orgid = '{$orgInfo.id}';
  191. var text = document.title;
  192. var timer;
  193. function loadingTitle() {
  194. clearTimeout(timer);
  195. document.title = text.substring(1,text.length) + text.substring(0,1);
  196. text = document.title.substring(0,text.length);
  197. timer = setTimeout("loadingTitle()", 500)
  198. }
  199. loadingTitle();
  200. getWorkerCount();
  201. getWorkerNums();
  202. getOrderNums();
  203. getWorkerInfo();
  204. // getCommentCount();
  205. getCommentOrder();
  206. getSevenDayOrder();
  207. getOrderMessageList();
  208. // setTimeout(function () {
  209. // getPatrolTask();
  210. // getPatrolImg();
  211. // }, 10000);
  212. //
  213. setInterval(function () {
  214. getWorkerCount();
  215. getWorkerNums();
  216. getOrderNums();
  217. getWorkerInfo();
  218. getCommentOrder();
  219. getSevenDayOrder();
  220. getOrderMessageList();
  221. }, 1*30000);
  222. function fullScreen(_self){
  223. var el = document.documentElement;
  224. var rfs = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullScreen;
  225. //typeof rfs != "undefined" && rfs
  226. if (rfs) {
  227. rfs.call(el);
  228. } else if (typeof window.ActiveXObject !== "undefined") {
  229. //for IE,这里其实就是模拟了按下键盘的F11,使浏览器全屏
  230. var wscript = new ActiveXObject("WScript.Shell");
  231. if (wscript != null) {
  232. wscript.SendKeys("{F11}");
  233. }
  234. }
  235. }
  236. function changeZoom() {
  237. var wb = $(window).width()/1920;
  238. var hb = $(window).height()/1080;
  239. if(wb >= hb){
  240. $('body').css({
  241. 'zoom': hb,
  242. });
  243. }else{
  244. $('body').css({
  245. 'zoom': wb,
  246. });
  247. }
  248. }
  249. function getWorkerCount(){
  250. var url = '/h5/project/workerCount';
  251. $.post(url,{orgid:orgid},function (res) {
  252. if(res.code == 0) {
  253. var lists = res.data;
  254. option = {
  255. legend: {
  256. data: ['服务中', '空闲中'],
  257. textStyle: {
  258. color: "#ffffff"
  259. },
  260. orient: 'right',
  261. y: 'bottom',
  262. x: 'right',
  263. },
  264. color:['#0263FF', '#42E2FF'],
  265. series: [
  266. {
  267. type: 'pie',
  268. radius: ['15%', '30%'],
  269. center: ['40%', '50%'],
  270. avoidLabelOverlap: false,
  271. // minAngle: 1, // 设置每块扇形的最小占比
  272. hoverAnimation: false,
  273. label: {
  274. normal: {
  275. show : true,
  276. formatter: "{b}:{d}%",
  277. textStyle: {
  278. fontSize: 12,
  279. color: "#fff",
  280. },
  281. }
  282. },
  283. labelLine:{
  284. show: true,
  285. normal:{
  286. length:1
  287. }
  288. },
  289. data:lists
  290. }
  291. ]
  292. };
  293. var myChart = echarts.init(document.getElementById('workersStatusEcharts'));
  294. myChart.setOption(option);
  295. }
  296. })
  297. }
  298. function getWorkerNums(){
  299. var url = '/h5/project/workerNums';
  300. $.post(url,{orgid:orgid},function (res) {
  301. if(res.code == 0) {
  302. var lists = res.data;
  303. $('#fwzWorker').html(lists.fwz);
  304. $('#kxzWorker').html(lists.kxz);
  305. $('#workerCount').html(lists.count);
  306. }
  307. })
  308. }
  309. function getOrderNums(){
  310. var url = '/h5/project/orderNums';
  311. $.post(url,{orgid:orgid},function (res) {
  312. if(res.code == 0) {
  313. var lists = res.data;
  314. $('#fwzOrder').html(lists.serverCount);
  315. $('#addOrder').html(lists.count);
  316. $('#jsOrder').html(lists.jsCount);
  317. $('#orderCount').html(lists.orderCount);
  318. }
  319. })
  320. }
  321. //workerInfo
  322. function getWorkerInfo(){
  323. var url = '/h5/project/worderList';
  324. $.post(url,{orgid:orgid},function (res) {
  325. if(res.code == 0) {
  326. var lists = res.data;
  327. var str = '';
  328. for (let o in lists){
  329. str += '<tr>';
  330. str += '<td>'+lists[o].realName+'</td>';
  331. str += '<td>'+lists[o].servicesNum+'</td>';
  332. str += '<td>'+lists[o].servicesDay+'</td>';
  333. str += '</tr>';
  334. }
  335. $('#workerInfo').html(str);
  336. }
  337. if (res.data.length > 8) {
  338. $(function(){
  339. var text=$("#workerInfo:first");
  340. var clear;
  341. text.hover(function(){
  342. clearInterval(clear);
  343. },function(){
  344. clear=setInterval(function(){
  345. var field=text.find("tr:first");
  346. var high=field.height();
  347. text.animate({ marginTop:-high+"px"},600,function(){
  348. field.css("marginTop",0).appendTo(text);
  349. text.css("marginTop",0);
  350. })
  351. },3000)//滚动间隔时间
  352. }).trigger("mouseleave");//自动滚动
  353. });
  354. }
  355. })
  356. }
  357. function getCommentCount(){
  358. var url = '/h5/project/commentCount';
  359. $.post(url,{orgid:orgid},function (res) {
  360. if(res.code == 0) {
  361. var lists = res.data;
  362. option = {
  363. // legend: {
  364. // left: 'center',
  365. // top: 'bottom',
  366. // data: ['一星评价', '二星评价', '三星评价', '四星评价', '五星评价']
  367. // },
  368. color:['#0263FF', '#FF7723', '#F0BC2E', '#CF23A4','#7C2AF4'],
  369. series: [
  370. {
  371. type: 'pie',
  372. radius: [20, 60],
  373. center: ['50%', '50%'],
  374. roseType: 'radius',
  375. // minAngle: 1,
  376. itemStyle: {
  377. borderRadius: 5
  378. },
  379. label: {
  380. normal: {
  381. show : true,
  382. formatter: "{b}:{d}%",
  383. textStyle: {
  384. fontSize: 12,
  385. color: "#fff",
  386. },
  387. }
  388. },
  389. emphasis: {
  390. label: {
  391. show: true
  392. }
  393. },
  394. data: lists
  395. },
  396. ]
  397. };
  398. var myChart = echarts.init(document.getElementById('commentEcharts'));
  399. myChart.setOption(option);
  400. }
  401. })
  402. }
  403. function getCommentOrder(){
  404. var url = '/h5/project/commentList';
  405. $.post(url,{orgid:orgid,size:5},function (res) {
  406. if(res.code == 0) {
  407. var lists = res.data;
  408. var str = '';
  409. for (let o in lists){
  410. if(o <=8){
  411. str += '<tr>';
  412. // str += '<td><div style="width: 140px!important; display: inline-block">'+lists[o].createTime+'</div></td>';
  413. // str += '<td><div style="width: 300px!important;">'+lists[o].commentInfo+'</div></td>';
  414. str += '<td>'+lists[o].realName+'</td>';
  415. str += '<td>'+lists[o].jxz+'</td>';
  416. str += '<td>'+lists[o].ywc+'</td>';
  417. str += '</tr>';
  418. }
  419. }
  420. $('#commentOrder').html(str);
  421. }
  422. // if (res.data.length > 9) {
  423. // $(function(){
  424. // var text=$("#commentOrder:first");
  425. // var clear;
  426. // text.hover(function(){
  427. // clearInterval(clear);
  428. // },function(){
  429. // clear=setInterval(function(){
  430. // var field=text.find("tr:first");
  431. // var high=field.height();
  432. // text.animate({ marginTop:-high+"px"},600,function(){
  433. // field.css("marginTop",0).appendTo(text);
  434. // text.css("marginTop",0);
  435. // })
  436. // },3000)//滚动间隔时间
  437. // }).trigger("mouseleave");//自动滚动
  438. // });
  439. // }
  440. })
  441. }
  442. function getSevenDayOrder(){
  443. var url = '/h5/project/sevenDayOrder';
  444. $.post(url,{orgid:orgid},function (res) {
  445. if(res.code == 0) {
  446. var lists = res.data;
  447. option = {
  448. legend: {
  449. right:'5',
  450. data: ['服务中订单数', '新增订单数'],
  451. textStyle: {
  452. color: "#ffffff"
  453. },
  454. },
  455. color: ['#2C7EDE','#F0652E'],
  456. dataZoom: {
  457. show: false,
  458. start: 0,
  459. end: 100
  460. },
  461. xAxis: {
  462. type: 'category',
  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. data: lists.xdata
  476. },
  477. yAxis: {
  478. type: 'value',
  479. splitLine:{
  480. show:false // 去掉背景的网格线
  481. },
  482. axisLabel: {
  483. show: true,
  484. textStyle: {
  485. color:'#ffffff' //这里用参数代替了
  486. }
  487. },
  488. axisLine:{
  489. lineStyle:{
  490. color:'#FFFFFF',
  491. width:1,//这里是为了突出显示加上的
  492. }
  493. }
  494. },
  495. series: [
  496. {
  497. name: '服务中订单数',
  498. type: 'line',
  499. data: lists.count2
  500. },
  501. {
  502. name: '新增订单数',
  503. type: 'line',
  504. data: lists.count3
  505. },
  506. ]
  507. };
  508. var myChart = echarts.init(document.getElementById('orderDataEcharts'));
  509. myChart.setOption(option);
  510. }
  511. })
  512. }
  513. function getOrderMessageList(){
  514. var url = '/h5/project/orderMessageList';
  515. $.post(url,{orgid:orgid},function (res) {
  516. if(res.code == 0) {
  517. var lists = res.data;
  518. var str = '';
  519. for (let o in lists){
  520. str += '<tr>';
  521. // str += '<td><div style="width: 140px!important; display: inline-block">'+lists[o].createTime+'</div></td>';
  522. // str += '<td><div style="width: 300px!important;">'+lists[o].commentInfo+'</div></td>';
  523. str += '<td>'+lists[o].createTime+'</td>';
  524. str += '<td>'+lists[o].content+'</td>';
  525. str += '</tr>';
  526. }
  527. $('#orderMessageLists').html(str);
  528. }
  529. if (res.data.length > 5) {
  530. $(function(){
  531. var text=$("#orderMessageLists:first");
  532. var clear;
  533. text.hover(function(){
  534. clearInterval(clear);
  535. },function(){
  536. clear=setInterval(function(){
  537. var field=text.find("tr:first");
  538. var high=field.height();
  539. text.animate({ marginTop:-high+"px"},600,function(){
  540. field.css("marginTop",0).appendTo(text);
  541. text.css("marginTop",0);
  542. })
  543. },3000)//滚动间隔时间
  544. }).trigger("mouseleave");//自动滚动
  545. });
  546. }
  547. })
  548. }
  549. function ymdTime(ymd){
  550. var now = new Date();
  551. var year = now.getFullYear(); //获取年份
  552. var month = now.getMonth(); //获取月份
  553. var date = now.getDate(); //获取日期
  554. month = month + 1;
  555. if (month<10) {
  556. month = '0'+month
  557. }
  558. if (date<10) {
  559. date = '0'+date
  560. }
  561. var time = year + "." + month + "." + date;
  562. ymd.innerHTML = time;
  563. }
  564. function hisTime(his) {
  565. var now = new Date();
  566. var hour = now.getHours(); //获取小时
  567. var minute = now.getMinutes(); //获取分钟
  568. var seconds = now.getSeconds(); //获取秒month = month + 1;
  569. if (hour<10) {
  570. hour = '0'+hour
  571. }
  572. if (minute<10) {
  573. minute = '0'+minute
  574. }
  575. if (seconds<10) {
  576. seconds = '0'+seconds
  577. }
  578. var time = hour + ":" + minute + ":" + seconds;
  579. his.innerHTML = time;
  580. }
  581. function weekTime(week) {
  582. var now = new Date();
  583. var day = now.getDay(); //获取星期
  584. var arr_week = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");
  585. var week = arr_week[day];
  586. var time = week;
  587. weekDate.innerHTML = time;
  588. console.log(time);
  589. }
  590. function show() {
  591. window.setInterval("ymdTime(ymd)", 1000);
  592. window.setInterval("hisTime(his)", 1000);
  593. window.setInterval("weekTime(weekDate)", 1000);
  594. }
  595. window.onload=show();
  596. function logout() {
  597. window.location.href = '/Account/logout';
  598. }
  599. </script>
  600. </body>
  601. </html>