1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <meta http-equiv="refresh" content="3600">
- <title>{$info['name']} | {:get_config('web_site_title')} </title>
- <link rel="Shortcut Icon" href="/logo.png" type="image/x-icon" />
- <link rel="stylesheet" href="/static/bootstrap-3.3.7/css/bootstrap.min.css">
- <link rel="stylesheet" href="/static/screen/css/style.css">
- </head>
- <body>
- <style>
- </style>
- <div class="nav-header">
- <div class="nav-title">医院后勤管理系统数据大屏</div>
- </div>
- <div class="main">
- <div class="main-left1">
- <div class="box">
- <div class="box-title">
- 医废数据统计
- </div>
- <div id="waste-count">
- </div>
- <!-- <div class="user-box">-->
- <!-- <img src="/static/screen/images/project/left1.png" alt="">-->
- <!-- <div class="user-box-nums">10</div>-->
- <!-- <div class="user-box-title">保洁人员</div>-->
- <!-- <div class="user-box-header">-->
- <!-- <div class="user-box-nums">20%</div>-->
- <!-- <div class="user-box-title">保洁</div>-->
- <!-- </div>-->
- <!-- </div>-->
- </div>
- </div>
- <div class="main-left2">
- <div class="box">
- <div class="box-title">
- 项目在岗人员
- </div>
- <table class="table2" style="margin: 10px 0;" border="0">
- <thead>
- <tr>
- <th>姓名</th>
- <th>已完成任务</th>
- <th>最新位置信息</th>
- </tr>
- </thead>
- <tbody id="ys-user">
- </tbody>
- </table>
- </div>
- </div>
- <div class="main-left3">
- <div class="box">
- <div class="box-title">
- 安保数据统计
- </div>
- <div class="box-yhyj-chart" id="yhyj-chart"></div>
- </div>
- </div>
- <div class="main-left4">
- <div class="box">
- <div class="box-title">
- 报修任务数据统计
- </div>
- <div class="box-bx-chart" id="repair-chart"></div>
- </div>
- </div>
- <div class="main-middle1">
- <div class="middle-box">
- <img class="middle-box-img" src="{$info['img']}" onerror="this.src='/static/screen/images/project/zhongshan.png'" alt="">
- <div class="middle-box-title"><?=$info['name']?></div>
- <div class="order-box">
- <div class="order-box-box">
- <img src="/static/screen/images/project/middle22.png" alt="">
- <div class="order-box-pos" id="todo-count">
- <!-- <div class="order-box-list">-->
- <!-- <div>运送任务</div>-->
- <!-- <div class="order-box-list-num">1000</div>-->
- <!-- </div>-->
- <!-- <div class="order-box-list">-->
- <!-- <div>维修任务</div>-->
- <!-- <div class="order-box-list-num">1000</div>-->
- <!-- </div>-->
- <!-- <div class="order-box-list">-->
- <!-- <div>日常保洁</div>-->
- <!-- <div class="order-box-list-num">1000</div>-->
- <!-- </div>-->
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="main-middle2">
- <div class="task-box">
- <div class="task-box-title">运送任务数据总览</div>
- <div style="overflow: hidden" id="yscount-box">
- <div class="yscount-box">
- <img src="/static/screen/images/project/ybp.png" alt="">
- <div class="yscount-box-title">标准时间内送达</div>
- <div class="yscount-box-des">完成率</div>
- <div class="yscount-box-nums" id="yscount1"></div>
- </div>
- <div class="yscount-box">
- <img src="/static/screen/images/project/ybp.png" alt="">
- <div class="yscount-box-title">平均派工时间</div>
- <div class="yscount-box-des">单位:分</div>
- <div class="yscount-box-nums" id="yscount2"></div>
- </div>
- <div class="yscount-box">
- <img src="/static/screen/images/project/ybp.png" alt="">
- <div class="yscount-box-title">未派工任务数量</div>
- <div class="yscount-box-des">未派工</div>
- <div class="yscount-box-nums" id="yscount3"></div>
- </div>
- <div class="yscount-box">
- <img src="/static/screen/images/project/ybp.png" alt="">
- <div class="yscount-box-title">进行中任务数量</div>
- <div class="yscount-box-des">进行中</div>
- <div class="yscount-box-nums" id="yscount4"></div>
- </div>
- <div class="yscount-box">
- <img src="/static/screen/images/project/ybp.png" alt="">
- <div class="yscount-box-title">已完成任务数量</div>
- <div class="yscount-box-des">已完成</div>
- <div class="yscount-box-nums" id="yscount5"></div>
- </div>
- <div class="yscount-box">
- <img src="/static/screen/images/project/ybp.png" alt="">
- <div class="yscount-box-title">被驳回任务数量</div>
- <div class="yscount-box-des">被驳回</div>
- <div class="yscount-box-nums" id="yscount6"></div>
- </div>
- </div>
- </div>
- <div class="task-box">
- <div class="task-box-title" style="padding-left: 40px;">运送热点区域总览</div>
- <div class="hot-chart" id="hot-chart"></div>
- </div>
- <div class="bottom-box">
- <table class="table2" border="0">
- <thead>
- <tr>
- <th>任务状态</th>
- <th>任务内容</th>
- <th>发单时间</th>
- <th>执行人</th>
- <th>派工时间</th>
- <th>接收时间</th>
- </tr>
- </thead>
- <tbody id="yunsong-table">
- </tbody>
- </table>
- </div>
- </div>
- <div class="main-right1">
- <div class="box">
- <div class="box-title">
- 网格化管理数据
- </div>
- <table class="table2" border="0" style="margin-top: 10px">
- <thead>
- <tr>
- <th>任务大厅</th>
- <th>执行人员</th>
- <th>任务详情</th>
- <th>任务时间</th>
- </tr>
- </thead>
- <tbody id="daily-table">
- </tbody>
- </table>
- </div>
- </div>
- <div class="main-right2">
- <div class="box">
- <div class="box-title">
- 可视化轨迹展示
- </div>
- <table class="table2" border="0" style="margin-top: 10px">
- <thead>
- <tr>
- <th>巡更地点</th>
- <th>巡更时间</th>
- <th>巡更人员</th>
- <th>巡更内容</th>
- </tr>
- </thead>
- <tbody id="patrol-table">
- </tbody>
- </table>
- </div>
- </div>
- <div class="main-right3" id="patrol-img-table">
- </div>
- </div>
- <script src="/static/jquery-1.11.3.min.js"></script>
- <script type="text/javascript" src="/static/echarts.js"></script>
- <script type="text/javascript" src="/static/layer/layer.js"></script>
- <script>
- $(window).resize(function(){
- location.reload()
- });
- $(function () {
- changeZoom();
- });
- var orgid = "{$info.id}";
- var text = document.title;
- var timer;
- function loadingTitle() {
- clearTimeout(timer);
- document.title = text.substring(1,text.length) + text.substring(0,1);
- text = document.title.substring(0,text.length);
- timer = setTimeout("loadingTitle()", 500)
- }
- loadingTitle();
- getYinhuan();
- getRepair();
- getHot();
- getYsTask();
- getDailyTask();
- getPatrolTask();
- getPatrolImg();
- getTodoStis();
- getYsUser();
- getYsCount();
- getWaste();
- // getTodo();
- // getComment();
- // getTodotime();
- // getPatrol();
- // getDevice();
- // getPatrolRecord();
- setInterval(function () {
- getPatrolTask();
- getPatrolImg();
- }, 10000);
- setInterval(function () {
- getYinhuan();
- getRepair();
- getHot();
- getYsTask();
- getDailyTask();
- getTodoStis();
- getYsUser();
- getYsCount();
- getWaste();
- }, 1*60000);
- function changeZoom() {
- var wb = $(window).width()/1920;
- var hb = $(window).height()/1080;
- if(wb >= hb){
- $('body').css({
- 'zoom': hb,
- });
- }else{
- $('body').css({
- 'zoom': wb,
- });
- }
- }
- function getWaste() {
- var url = '/api/screen/project/waste';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- let option = {
- color: ['#0C9BFF','#FEC006'],
- legend: {
- textStyle: {
- color: "#ffffff"
- }
- },
- xAxis: {
- type: 'category',
- axisLabel: {
- show: true,
- textStyle: {
- color: '#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- },
- data: res.data.xdata
- },
- yAxis: {
- type: 'value',
- splitLine:{
- show:false // 去掉背景的网格线
- },
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- },
- series: [{
- data: res.data.ydata,
- type: 'line'
- }]
- };
- var myChart = echarts.init(document.getElementById('waste-count'));
- myChart.setOption(option);
- }
- });
- }
- function getYsCount() {
- var url = '/api/screen/project/yscount';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- $('#yscount1').html(res.data.count1);
- $('#yscount2').html(res.data.count2);
- $('#yscount3').html(res.data.count3);
- $('#yscount4').html(res.data.count4);
- $('#yscount5').html(res.data.count5);
- $('#yscount6').html(res.data.count6);
- }
- })
- }
- function getYsUser() {
- var url = '/api/screen/project/ysuser';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- var str = '';
- var lists = res.data;
- for (let o in lists){
- str += '<tr>';
- str += '<td>'+lists[o].realName+'</td>';
- str += '<td>'+lists[o].count+'</td>';
- str += '<td>'+lists[o].addrTitle+'</td>';
- str += '</tr>';
- }
- $('#ys-user').html(str);
- }
- })
- }
- function getYsTask() {
- var url = '/api/screen/project/ystask';
- $.post(url,{orgid:orgid,size:20},function (res) {
- if(res.code == 0){
- var str = '';
- var lists = res.data;
- for (let o in lists){
- // if(lists[o].orderMode == 1){
- // str += '<tr>';
- // str += '<td>新任务</td>';
- // }else if(lists[o].orderMode == 5 && !lists[o].confirmTime){
- // str += '<tr class="table-color2">';
- // str += '<td>已派工</td>';
- // }else{
- // str += '<tr class="table-color3">';
- // str += '<td>进行中</td>';
- // }
- str += '<tr>';
- str += '<td>'+lists[o].orderModelTxt+'</td>';
- str += '<td>'+lists[o].content+'</td>';
- str += '<td>'+lists[o].createTime+'</td>';
- str += '<td>'+lists[o].realNames+'</td>';
- str += '<td>'+lists[o].sendTime+'</td>';
- str += '<td>'+lists[o].confirmTime+'</td>';
- }
- $('#yunsong-table').html(str);
- }
- })
- }
- function getDailyTask() {
- var url = '/api/screen/project/daily';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- var str = '';
- var lists = res.data;
- for (let o in lists){
- str += '<tr>';
- str += '<td>'+lists[o].title+'</td>';
- str += '<td>'+lists[o].realName+'</td>';
- str += '<td>'+lists[o].content+'</td>';
- str += '<td>'+lists[o].createTime+'</td>';
- }
- $('#daily-table').html(str);
- }
- })
- }
- function getPatrolTask() {
- var url = '/api/screen/project/patrolList';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- var str = '';
- var lists = res.data;
- for (let o in lists){
- str += '<tr>';
- str += '<td>'+lists[o].title+'</td>';
- str += '<td>'+lists[o].createTime+'</td>';
- str += '<td>'+lists[o].realName+'</td>';
- str += '<td>'+lists[o].taskTitle+'</td>';
- }
- $('#patrol-table').html(str);
- }
- })
- }
- function getPatrolImg() {
- var url = '/api/screen/project/patrolImg';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- var str = '';
- var lists = res.data;
- for (let o in lists){
- str += '<div class="patrol-box">';
- str += '<div class="patrol-box-list">';
- str += '<img onclick="open_img(this)" src="'+lists[o].images+'" alt="">';
- str += '<div>'+lists[o].taskTitle+'</div>';
- str += '</div>';
- str += '</div>';
- }
- $('#patrol-img-table').html(str);
- }
- })
- }
- function getYinhuan() {
- var url = '/api/screen/project/yinhuan';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- var option = {
- title: {
- textStyle: {
- color: "#fff"
- }
- },
- color: ['#0C9BFF','#FEC006'],
- legend: {
- // orient: 'vertical',
- // right: 10,
- textStyle: {
- color: "#ffffff"
- }
- },
- tooltip: {},
- dataset: {
- source:res.data.list
- },
- xAxis: {
- type: 'category',
- axisLabel: {
- show: true,
- textStyle: {
- color: '#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- },
- yAxis: {
- splitLine:{
- show:false
- },
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- },
- // Declare several bar series, each will be mapped
- // to a column of dataset.source by default.
- series: [
- {type: 'bar', barWidth:10},
- {type: 'bar',barWidth:10}
- ]
- };
- var myChart = echarts.init(document.getElementById('yhyj-chart'));
- myChart.setOption(option);
- }
- })
- }
- function getHot() {
- var url = '/api/screen/project/hotaddr';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- let option = {
- title: {
- textStyle: {
- color: "#fff"
- }
- },
- color: ['#23A3F4','#FEC006'],
- legend: {
- data: ['当天运送', '30天内平均运送'],
- textStyle: {
- color: "#ffffff"
- }
- },
- xAxis: [
- {
- type: 'category',
- data: res.data.x,
- axisPointer: {
- type: 'shadow'
- },
- axisLabel: {
- show: true,
- rotate:25,
- textStyle: {
- color: '#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- }
- ],
- yAxis: [
- {
- type: 'value',
- name: '数量',
- axisLabel: {
- formatter: '{value}'
- },
- splitLine:{
- show:false
- },
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- },
- {
- type: 'value',
- name: '数量',
- axisLabel: {
- formatter: '{value}'
- },
- splitLine:{
- show:false
- },
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- }
- ],
- series: [
- {
- name: '当天运送',
- type: 'bar',
- barWidth:10,
- data: res.data.y1
- },
- {
- name: '30天内平均运送',
- type: 'line',
- yAxisIndex: 1,
- data: res.data.y2
- }
- ]
- };
- var myChart = echarts.init(document.getElementById('hot-chart'));
- myChart.setOption(option);
- }
- });
- }
- function getTodoStis() {
- var url = '/api/screen/project/todostis';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- var str = '';
- var lists = res.data;
- for (let o in lists){
- str += '<div class="order-box-list">';
- str += '<div>'+lists[o].name+'</div>';
- str += '<div class="order-box-list-num">'+lists[o].count+'</div>';
- str += '</div>';
- }
- $('#todo-count').html(str);
- }
- })
- }
- function getUser() {
- var url = '/api/screen/project/user';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- var str = '';
- var lists = res.data.list;
- for (let o in lists){
- str += '<div class="user-box">';
- str += '<img src="/static/screen/images/project/left1.png" alt="">';
- str += '<div class="user-box-nums">'+lists[o].value+'</div>';
- str += '<div class="user-box-title">'+lists[o].name+'</div>';
- str += '<div class="user-box-header">';
- str += '<div class="user-box-nums">'+lists[o].bl+'%</div>';
- str += '<div class="user-box-title">'+lists[o].name2+'</div>';
- str += '</div>';
- str += '</div>';
- }
- $('#user-count').html(str);
- }
- })
- }
- function getTodo() {
- var url = '/api/screen/project/todo';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- $('#todoTotal').html(res.data.total);
- $('#todoToday').html(res.data.today);
- $('#todoUndeal').html(res.data.undeal);
- $('#todoComment').html(res.data.comment);
- $('#todoFinish').html(res.data.finish);
- $('#todoUnfinish').html(res.data.unfinish);
- }
- })
- }
- function getComment() {
- var url = '/api/screen/project/comment';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- var option = {
- color: ['#FFD900','#24C768','#FF7E00','#00A1E4','#FE546D'],
- tooltip: {
- trigger: 'item',
- formatter: '{a} <br/>{b} : {c} ({d}%)'
- },
- series: [
- {
- name: '满意度',
- type: 'pie',
- radius: '55%',
- center: ['50%', '50%'],
- data: res.data.count.sort(function (a, b) { return a.value - b.value; }),
- roseType: 'radius',
- label: {
- show: true,
- formatter:'{b}: {d}%',
- },
- labelLine: {
- lineStyle: {
- color: 'rgba(255, 255, 255, 0.3)'
- },
- smooth: 0.2,
- length: 10,
- length2: 20
- },
- animationType: 'scale',
- animationEasing: 'elasticOut',
- animationDelay: function (idx) {
- return Math.random() * 200;
- }
- }
- ]
- };
- var myChart = echarts.init(document.getElementById('comment-chart'));
- myChart.setOption(option);
- var ulist = res.data.list;
- var str = '';
- for (var o in ulist){
- str += '<div class="common-box">';
- str += '<div class="common-box-list1">';
- if(o == 0){
- str += '<img src="/static/screen/images/first.png" alt="">';
- }else if(o == 1){
- str += '<img src="/static/screen/images/second.png" alt="">';
- }else if(o == 2){
- str += '<img src="/static/screen/images/third.png" alt="">';
- }
- str += '</div>';
- str += '<div class="common-box-list2">'+ulist[o].DEP_NAME+'</div>';
- str += '<div class="common-box-list3">'+ulist[o].REAL_NAME+'</div>';
- str += '<div class="common-box-list4">'+ulist[o].SCORE+'</div>';
- if(o < 3){
- str += '<div class="common-box-list5">';
- str += '<img src="/static/screen/images/trophy.png" alt="">'
- str += '</div>';
- }
- }
- $('#comment-box').html(str);
- }
- })
- }
- function getPatrol() {
- var url = '/api/screen/project/patrol';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- $('#patrolAddr').html(res.data.TITLE);
- $('#patrolUser').html(res.data.REAL_NAME);
- $('#patrolTime').html(res.data.CREATE_TIME);
- $('#patrolContent').html(res.data.CONTENT);
- if(res.data.IMAGES){
- $('#patrolImg').attr('src',res.data.IMAGES).show();
- }else{
- $('#patrolImg').attr('src','#').hide();
- }
- }
- })
- }
- function getTodotime() {
- var url = '/api/screen/project/todotime';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- $('#todoBx').html(res.data.bx);
- $('#todoBj').html(res.data.bj);
- $('#todoYs').html(res.data.ys);
- $('#todoYh').html(res.data.yh);
- var option = {
- title: {
- textStyle: {
- color: "#fff"
- }
- },
- color: ['#1E88E5','#26C6DA','#FF7E00'],
- legend: {
- // orient: 'vertical',
- // right: 10,
- textStyle: {
- color: "#ffffff"
- }
- },
- tooltip: {},
- dataset: {
- source:res.data.list
- },
- xAxis: {
- type: 'category',
- axisLabel: {
- show: true,
- textStyle: {
- color: '#ffffff' //这里用参数代替了
- }
- },
- },
- yAxis: {
- splitLine:{
- show:false
- },
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- },
- // Declare several bar series, each will be mapped
- // to a column of dataset.source by default.
- series: [
- {type: 'bar', barWidth:10},
- {type: 'bar',barWidth:10}
- ]
- };
- var myChart = echarts.init(document.getElementById('order-chart'));
- myChart.setOption(option);
- }
- })
- }
- function getDevice() {
- var url = '/api/screen/project/device';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- $('#deviceCount').html(res.data.dcount);
- $('#recordCount').html(res.data.rcount);
- var option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- label: {
- backgroundColor: '#6a7985'
- }
- }
- },
- color: ['#36f6f9','#8efaff'],
- legend: {
- data: ['台账记录'],
- textStyle: {
- color: "#ffffff"
- }
- },
- toolbox: {
- // feature: {
- // saveAsImage: {}
- // }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [
- {
- type: 'category',
- boundaryGap: false,
- data: res.data.month,
- axisLabel: {
- show: true,
- textStyle: {
- color: '#ffffff' //这里用参数代替了
- }
- },
- }
- ],
- yAxis: [
- {
- type: 'value',
- splitLine:{
- show:false
- },
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- }
- ],
- series: [
- {
- name: '台账记录',
- type: 'line',
- stack: '总量',
- smooth: true,
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: '#1E8BFF'
- }, {
- offset: 1,
- color: '#7937FF'
- }])
- },
- data: res.data.list
- }
- ]
- };
- var myChart = echarts.init(document.getElementById('device-chart'));
- myChart.setOption(option);
- }
- })
- }
- function getPatrolRecord() {
- var url = '/api/screen/project/patrolRecord';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- var option = {
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- label: {
- backgroundColor: '#6a7985'
- }
- }
- },
- color: ['#1E8BFF','#9433D6'],
- legend: {
- data: ['巡更', '巡视', '巡查', '巡检'],
- textStyle: {
- color: "#ffffff"
- }
- },
- toolbox: {
- // feature: {
- // saveAsImage: {}
- // }
- },
- grid: {
- left: '3%',
- right: '4%',
- bottom: '3%',
- containLabel: true
- },
- xAxis: [
- {
- type: 'category',
- boundaryGap: false,
- data: res.data.hour,
- axisLabel: {
- show: true,
- textStyle: {
- color: '#ffffff' //这里用参数代替了
- }
- },
- }
- ],
- yAxis: [
- {
- type: 'value',
- splitLine:{
- show:false
- },
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- }
- ],
- series: [
- {
- name: '巡更',
- type: 'line',
- stack: '总量',
- smooth: true,
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: '#1E8BFF'
- }, {
- offset: 1,
- color: '#7937FF'
- }])
- },
- data: res.data.plist1
- },
- {
- name: '巡视',
- type: 'line',
- stack: '总量',
- smooth: true,
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: '#B745FF'
- }, {
- offset: 1,
- color: '#7937FF'
- }])
- },
- data: res.data.plist2
- },
- {
- name: '巡查',
- type: 'line',
- stack: '总量',
- smooth: true,
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: '#ff7e00'
- }, {
- offset: 1,
- color: '#091759'
- }])
- },
- data: res.data.plist3
- },
- {
- name: '巡检',
- type: 'line',
- stack: '总量',
- smooth: true,
- areaStyle: {
- color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
- offset: 0,
- color: '#00f8fd'
- }, {
- offset: 1,
- color: '#091759'
- }])
- },
- data: res.data.plist4
- }
- ]
- };
- var myChart = echarts.init(document.getElementById('patrol-chart'));
- myChart.setOption(option);
- }
- })
- }
- function getRepair() {
- var url = '/api/screen/project/repair';
- $.post(url,{orgid:orgid},function (res) {
- if(res.code == 0){
- var option = {
- color: ['#0C9BFF'],
- xAxis: {
- type: 'category',
- data: res.data.names,
- axisLabel: {
- show: true,
- // rotate:45,
- textStyle: {
- color: '#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- },
- yAxis: {
- type: 'value',
- splitLine:{
- show:false
- },
- // 去掉背景的网格线
- axisLabel: {
- show: true,
- textStyle: {
- color:'#ffffff' //这里用参数代替了
- }
- },
- axisLine:{
- lineStyle:{
- color:'#FFFFFF',
- width:1,//这里是为了突出显示加上的
- }
- }
- },
- series: [{
- data: res.data.counts,
- type: 'bar',
- center: ['30%', '80%'],
- barWidth : 10,
- // itemStyle: {
- // normal: {
- // label: {
- // show: true, //开启显示
- // position: 'top', //在上方显示
- // textStyle: { //数值样式
- // color: '#fff',
- // fontSize: 12,
- // }
- // }
- // }
- // },
- }]
- };
- var myChart = echarts.init(document.getElementById('repair-chart'));
- myChart.setOption(option);
- }
- })
- }
- function open_img(_self) {
- var src = $(_self).attr('src');
- var img = new Image();
- img.src = src;
- var width = $(window).width()*0.8;
- var height = $(window).height()*0.6;
- img.onload = function(){
- var imgw = img.width;
- var imgh = img.height;
- if(imgw > width&&imgh < height){
- imgh = imgh*width/imgw;
- imgw = width;
- }else if(imgw < width&&imgh > height){
- imgw = imgw*height/imgh;
- imgh = height;
- }else if(imgw > width&&imgh > height){
- var bl1 = width/height;
- var bl2 = imgw/imgh;
- if(bl1 < bl2){
- imgh = imgh*width/imgw;
- imgw = width;
- }else if(bl1 > bl2){
- imgw = imgw*height/imgh;
- imgh = height;
- }else{
- imgh = height;
- imgw = width;
- }
- }
- var imgs = '<img width="'+imgw+'" height="'+imgh+'" src="'+src+'" />';
- layer.open({
- type: 1,
- title: false,
- closeBtn: 1,
- area: [imgw+'px', imgh+'px'],
- skin: 'layui-layer-nobg', //没有背景色
- shadeClose: true,
- content: imgs
- });
- };
- }
- function logout() {
- window.location.href = '/Account/logout';
- }
- </script>
- </body>
- </html>
|