| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056 |
- var waterOptions;
- var autoTabSchedulOrNewsTimer = null;// 自动切换 排班信息或重要事项通知的定时器
- $(function() {
- //维保 巡检 tab切换
- $('.wxTab .title_tips').click(function() {
- $(this).addClass('active').siblings().removeClass('active');
- var index = $(this).index();
- $('.contentTop_leftBottomContent').children('div').eq(index).show().siblings().hide()
- })
- $('.InspectDateBtn').click(function() {
- $(this).addClass('active').siblings().removeClass('active');
- var dataIndex = $(this).attr('data-index');
- $('#hidInspectDateType').val(dataIndex);
- getrunninglist(dataIndex);
- });
- $('.bottomBtns').click(function() {
- $(this).addClass('active').siblings().removeClass('active');
- $('.timeType').text($(this).text());
- var dataIndex = $(this).attr('data-index');
- getBottomData(dataIndex);
- });
-
- Ajax();
-
-
- if($("#projectID").attr("index") == "河南省直第三人民医院"){
- administrative(0);//科室数量
- distribution(0);//配送物品前五
- }else{
- getrunninglist($('#hidInspectDateType').val()); //维保巡检
- }
- timeBtn($('.dateBtns'));
- timeBtn($('.officeBtns'));
- timeBtn($('.bottomDateBtns'));
- WXTabtime($('.wxTab'));
- //$("#maintenanceInformation").Scroll({ line: 1, speed: 800, timer: 2000 });//维保通知
- // getMaps();//获取地图
- });
- function contractLiClick(thats) {
- if ($(thats).attr('data-day') >= 0 && $(thats).attr('data-day') <= 30) {
- $(thats).addClass('active').siblings().removeClass('active');
- $('.lateTime').text($(thats).attr('data-day'));
- $('.htWorld').text('距合同到期');
- $('.htWorld').removeClass('active');
- $('.htLate').addClass('active');
- } else if ($(thats).attr('data-day') > 30) {
- $(thats).addClass('active').siblings().removeClass('active');
- $('.lateTime').text($(thats).attr('data-day'));
- $('.htWorld').text('距合同到期');
- $('.htWorld').removeClass('active');
- $('.htLate').removeClass('active');
- } else {
- $(thats).addClass('active').siblings().removeClass('active');
- $('.lateTime').text($(thats).attr('data-day') * -1);
- $('.htWorld').text('合同已过期');
- $('.htWorld').addClass('active');
- $('.htLate').addClass('active');
- }
- // })
- }
- //项目数量
- function getproject() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "equipmentapi/api/RunningChart/getprojectrepairuserequipment",
- dataType: 'json',
- data: {
- projectid: $("#projectID").text()
- },
- async: true,
- success: function(data) {
- if (data.state == 'success') {
- //地图数据
- $("#hospital").rollNum({
- deVal: data.data.projectnum,
- digit: '3'
- });
- $("#engineer").rollNum({
- deVal: data.data.repairusernum,
- digit: '3'
- });
- $("#equipment").rollNum({
- deVal: data.data.equipmentnum,
- digit: '3'
- });
- }
- }
- });
- }
- //巡检、维保
- function getrunninglist(dateTypes) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "equipmentapi/api/RunningChart/getrunninglist",
- dataType: 'json',
- async: true,
- data: {
- datetype: dateTypes
- },
- success: function(data) {
- if (data.state == 'success') {
- if (data.data.rwcount > 0) {
- $('.Inspect_nodo').addClass('active')
- $('.InspectionIn1_nodo').addClass('active')
- $('.InspectionIn2_nodo').addClass('active')
- } else {
- $('.Inspect_nodo').removeClass('active')
- $('.InspectionIn1_nodo').removeClass('active')
- $('.InspectionIn2_nodo').removeClass('active')
- }
- $('.InspectCount').text(data.data.rcount);
- $('.Inspect_done').text(data.data.rycount);
- $('.Inspect_nodo').text(data.data.rwcount);
- if (data.data.rcount == 0) {
- $('.yxjCount').text("0.00%");
- $('.wxj').text("0.00%");
- $('.progressInspect').css('width', "0%");
- } else {
- var yxpersent = (data.data.rycount / data.data.rcount) * 100;
- $('.yxjCount').text(yxpersent.toFixed(2) + "%");
- $('.progressInspect').css('width', yxpersent + "%");
- $('.wxj').text((100 - yxpersent).toFixed(2) + "%");
- }
- }
- }
- });
- //维保统计
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "equipmentapi/api/RunningChart/getmaintainlist",
- dataType: 'json',
- async: true,
- data: {
- datetype: dateTypes
- },
- success: function(data) {
- if (data.state == 'success') {
- if (data.data.mwcount > 0) {
- $('.by_nodo').addClass('active')
- $('.InspectionInwby_11').addClass('active')
- $('.InspectionInwby_21').addClass('active')
- } else {
- $('.by_nodo').removeClass('active')
- $('.InspectionInwby_11').removeClass('active')
- $('.InspectionInwby_21').removeClass('active')
- }
- $('.by_count').text(data.data.mcount);
- $('.by_done').text(data.data.mycount);
- $('.by_nodo').text(data.data.mwcount);
- if (data.data.mwcount == 0) {
- $('.byCountNum').text("0.00%");
- $('.byCountNum').css('left', "-5%");
- $('.byProgress').css('width', "0%");
- } else {
- var ybypersent = (data.data.mwcount / data.data.mcount) * 100;
- $('.byCountNum').text(ybypersent.toFixed(2) + "%");
- // console.log(ybypersent)
- $('.byCountNum').css('left', (ybypersent - 5) + "%");
- $('.byProgress').css('width', ybypersent + "%");
- }
- }
- }
- });
- }
- // 重要事项(项目新闻)
- // el 元素id 'importantInformation'
- function getnewslist(el) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "equipmentapi/api/RunningChart/getnewslist",
- dataType: 'json',
- data: {
- projectid: $("#projectID").text()
- },
- async: true,
- success: function(data) {
- if (data.state == 'success') {
-
- $('#' + el).find('ul').html('');
- $.each(data.data, function(i, n) {
- var str = "";
- if (i % 2 == 0) {
- str = '<li class="active" title="' + n.title + '">';
- if (i < 3) {
- str += '<span class="numbers importants">' + parseInt(i + 1) + '</span>';
- } else {
- str += '<span class="numbers">' + parseInt(i + 1) + '</span>';
- }
- } else {
- str = '<li title="' + n.title + '">'
- if (i < 3) {
- str += '<span class="numbers importants">' + parseInt(i + 1) + '</span>';
- } else {
- str += '<span class="numbers">' + parseInt(i + 1) + '</span>';
- }
- }
- str += '<span class="messages">' + n.title + '</span>' +
- '<span class="pull-right times">' + n.createtime.substring(0, 10) + '</span>' +
- '</li>'
- $('#' + el).find('ul').append(str);
- });
- $('#' + el).Scroll({
- line: 1,
- speed: 800,
- timer: 2000
- });
- }
- }
- });
- }
- // 排班信息
- function getSchedulingInfo() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "signtokenapi/api/WorkClassUser/getuserlistbyday",
- dataType: 'json',
- data: {
- projectid: $("#projectID").text()
- },
- async: true,
- success: function(data) {
- if (data.state === 'success') {
- $('#schedulingInfo ul').empty();
- data = data.data;
- if(data && data.length){
- $.each(data, function(i, v) {
- var str = "";
- if(v.list_class && v.list_class.length){
- str += '<li class="scheduling_info clearfix">'+
- '<div class="scheduling_dept pull-left">'+ v.name +'</div>'+
- '<div class="scheduling_items pull-right">';
- $.each(v.list_class, function(j, k){
- str += '<div class="scheduling_time">'+
- k.code + k.name + ' [' + k.starttime + ' - ' + k.endtime + ']' +
- '</div>';
- if(k.userlist.length && k.userlist[0]){
- str += '<div class="scheduling_personnels">'+
- k.userlist[0].user.join(',')
- '</div>';
- }else{
- str += '<div class="scheduling_personnels">--</div>';
- }
- });
- str += '</div>'+
- '</li>';
- }
- $('#schedulingInfo ul').append(str);
- });
- }
- $("#schedulingInfo").Scroll({
- line: 1,
- speed: 1600,
- timer: 4000
- });
- }
- }
- });
- }
- //维保事项
- function getmaintenancelist() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "equipmentapi/api/RunningChart/getmaintainmsgs",
- dataType: 'json',
- data: {
- projectid: $("#projectID").text()
- },
- async: true,
- success: function(data) {
- if (data.state == 'success') {
- $('#maintenanceInformation ul').html('');
- $.each(data.data, function(i, n) {
- var str = "";
- if (i % 2 == 0) {
- str = '<li title="' + n.content + '">';
- if (i < 3) {
- str += '<span class="numbers importants">' + parseInt(i + 1) + '</span>';
- } else {
- str += '<span class="numbers">' + parseInt(i + 1) + '</span>';
- }
- } else {
- str = '<li title="' + n.content + '">'
- if (i < 3) {
- str += '<span class="numbers importants">' + parseInt(i + 1) + '</span>';
- } else {
- str += '<span class="numbers">' + parseInt(i + 1) + '</span>';
- }
- }
- str += '<span class="messages">' + n.content + '</span>'
- // if(n.state==0){
- // str +='<span class="pull-right times newOrder">新工单</span>'
- // }else
- if (n.state == 3) {
- str += '<span class="pull-right times finish">已完成</span>'
- } else {
- str += '<span class="pull-right times nodo">未完成</span>'
- }
- str += '</li>'
- $('#maintenanceInformation ul').append(str);
- });
- $("#maintenanceInformation").Scroll({
- line: 1,
- speed: 800,
- timer: 2000
- });
- }
- }
- });
- }
- //合同到期提示
- function getContractTimeOut() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "equipmentapi/api/RunningChart/getprojecttimeout",
- dataType: 'json',
- data: {
- projectid: $("#projectID").text()
- },
- async: true,
- success: function(data) {
- if (data.state == 'success') {
- $('#contractTimeOut ul').html('');
- $.each(data.data, function(i, n) {
- var str = "";
- if (i == 0) {
- str = '<li class="active" data-day="' + n.day + '" onclick="contractLiClick(this)"><span class="numbers">' +
- parseInt(i + 1) + '</span><span>' + n.name + '</span></li>'
- } else {
- str = '<li data-day="' + n.day + '" onclick="contractLiClick(this)"><span class="numbers" >' + parseInt(i +
- 1) + '</span><span>' + n.name + '</span></li>'
- }
- $('#contractTimeOut ul').append(str);
- });
- $("#contractTimeOut").ContractScroll({
- line: 1,
- speed: 800,
- timer: 3000
- }); //合同到期
- $("#contractTimeOut ul").find("li:first").trigger('click')
- }
- }
- });
- }
- //获取地图
- function getMaps(){
- $.getJSON('./js/province.json', function(geojson) {
- //$.getJSON('https://data.jianshukeji.com/jsonp?filename=geochina/henan.json&callback=?', function (geojson) {
- // Initiate the chart
- Highcharts.mapChart('containMap', {
- chart: {
- backgroundColor: 'transparent',
- },
- credits: {
- enabled: false // 禁用版权信息
- },
- exporting: {
- enabled: false
- }, //隐藏导出图片
- title: {
- text: false
- },
- subtitle: {
- text: false
- },
- tooltip: false,
- mapNavigation: {
- enabled: false
- },
- plotOptions: {
- series: {
- dataLabels: {
- enabled: true,
- }
- }
- },
- series: [{
- nullColor: '#184ec7',
- // nullColor: '#0a246f',
- mapData: geojson,
- data: [{
- color: '#2e9ef0',
- name: '郑州'
- }],
- joinBy: 'name',
- name: '',
- states: {
- hover: {
- color: '#2891e3'
- }
- },
- borderColor: '#2fa6f3',
- dataLabels: {
- enabled: true,
- format: '{point.name}'
- },
- showInLegend: false
- }]
- });
- });
- }
- //地图数据
- function getmapData() {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "equipmentapi/api/RunningChart/getprojectlist",
- dataType: 'json',
- async: true,
- success: function(data) {
- if (data.state == 'success') {
- $('#mapword ul').html('');
- $.each(data.data, function(i, n) {
- $('<li>' +
- '<p class="mapword_title">' + n.name + '</p>' +
- '<p>维保人员: <span class="mapword_count">' + n.repairusernum + '</span>人</p>' +
- '<p>维护设备: <span class="mapword_count">' + n.equipmentnum + '</span>台</p>' +
- '<p>合同剩余时间: <span class="mapword_count">' + n.remainderday + '</span>天</p>' +
- '</li>').appendTo('#mapword ul')
- })
- // $("#mapword").Scroll({ line: 1, speed: 500, timer: 3000 });//合同到期
- }
- }
- });
- }
- //底部水电气氧数据
- function getBottomData(dateTypes) {
- var barWidth, titleText;
- if (dateTypes == '0') {
- barWidth = 15;
- titleText = "日期"
- } else if (dateTypes == '2') {
- barWidth = 15;
- titleText = "月份"
- } else {
- barWidth = 25;
- titleText = "年份"
- }
- //用水量
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "plcautomationapi/api/plcdata/getwaterdatalist",
- async: true,
- dataType: 'json',
- data: {
- datetype: dateTypes,
- projectname: $("#projectID").attr("index")
- },
- success: function(data) {
- if (data.state.toLowerCase() == 'success') {
- // 用水量
- $('#waterCount').highcharts({
- chart: {
- type: 'column',
- backgroundColor: 'transparent',
- marginRight: 25,
- marginTop: 25
- },
- title: false,
- credits: {
- enabled: false // 禁用版权信息
- },
- exporting: {
- enabled: false
- }, //隐藏导出图片
- legend: {
- enabled: false
- },
- xAxis: {
- categories: (function() {
- var xAxised = [];
- $(data.data).each(function(i, n) {
- xAxised.push(n.TimeValue)
- })
- return xAxised
- })(),
- crosshair: true,
- title: {
- text: titleText,
- align: 'high',
- offset: 0,
- x: 25,
- y: 8,
- style: {
- color: '#266cf8'
- }
- },
- lineColor: "#45599d",
- tickColor: 'transparent',
- labels: {
- style: {
- color: '#fff'
- }
- }
- },
- yAxis: {
- min: 0,
- title: {
- text: '(吨)',
- align: 'high',
- offset: 0,
- rotation: 0,
- y: -10,
- x: -10,
- style: {
- color: '#266cf8'
- }
- },
- gridLineDashStyle: 'longdash', //图表内网格线样式
- gridLineColor: '#242f5d', //图表内网格线颜色
- labels: {
- style: {
- color: '#fff'
- },
- step: 1
- },
- lineColor: '#45599d',
- lineWidth: 1
- },
- plotOptions: {
- column: {
- borderWidth: 0,
- pointWidth: barWidth //柱子之间的距离值
- }
- },
- series: [{
- name: '数量',
- data: (function() {
- var seriesData = [];
- $(data.data).each(function(i, n) {
- seriesData.push(n.DataValue)
- })
- // console.log(seriesData)
- return seriesData.map(s => +s)
- })(),
- color: "#46b2f0",
- dataLabels: {
- enabled: true,
- format: '{y}',
- style: {
- color: '#fff'
- }
- }
- }]
- });
- }
- }
- });
- //用电量
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "plcautomationapi/api/plcdata/getelectricdatalist",
- async: true,
- dataType: 'json',
- data: {
- datetype: dateTypes,
- projectname: $("#projectID").attr("index")
- },
- success: function(data) {
- if (data.state.toLowerCase() == 'success') {
- // 用电量
- $('#electricCount').highcharts({
- chart: {
- type: 'column',
- backgroundColor: 'transparent',
- marginRight: 25,
- marginTop: 25
- },
- title: false,
- credits: {
- enabled: false // 禁用版权信息
- },
- exporting: {
- enabled: false
- }, //隐藏导出图片
- legend: {
- enabled: false
- },
- xAxis: {
- categories: (function() {
- var xAxised = [];
- $(data.data).each(function(i, n) {
- xAxised.push(n.TimeValue)
- })
- return xAxised
- })(),
- crosshair: true,
- title: {
- text: titleText,
- align: 'high',
- offset: 0,
- x: 25,
- y: 8,
- style: {
- color: '#266cf8'
- }
- },
- lineColor: "#45599d",
- tickColor: 'transparent',
- labels: {
- style: {
- color: '#fff'
- }
- }
- },
- yAxis: {
- min: 0,
- title: {
- text: '(度)',
- align: 'high',
- offset: 0,
- rotation: 0,
- y: -10,
- x: -10,
- style: {
- color: '#266cf8'
- },
- },
- gridLineDashStyle: 'longdash', //图表内网格线样式
- gridLineColor: '#242f5d', //图表内网格线颜色
- labels: {
- style: {
- color: '#fff'
- },
- step: 1
- },
- lineColor: '#45599d',
- lineWidth: 1
- },
- plotOptions: {
- column: {
- borderWidth: 0,
- pointWidth: barWidth //柱子之间的距离值
- }
- },
- series: [{
- name: '数量',
- data: (function() {
- var seriesData = [];
- $(data.data).each(function(i, n) {
- seriesData.push(n.DataValue)
- })
- // console.log(seriesData)
- return seriesData.map(s => +s)
- })(),
- color: "#fd3d00",
- dataLabels: {
- enabled: true,
- format: '{y}',
- style: {
- color: '#fff'
- }
- }
- }]
- });
- }
- }
- });
- //用气量
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "plcautomationapi/api/plcdata/getgasdatalist",
- async: true,
- dataType: 'json',
- data: {
- datetype: dateTypes,
- projectname: $("#projectID").attr("index")
- },
- success: function(data) {
- if (data.state.toLowerCase() == 'success') {
- // 用电量
- // 用气量
- $('#gasCount').highcharts({
- chart: {
- type: 'column',
- backgroundColor: 'transparent',
- marginRight: 25,
- marginTop: 25
- },
- title: false,
- credits: {
- enabled: false // 禁用版权信息
- },
- exporting: {
- enabled: false
- }, //隐藏导出图片
- legend: {
- enabled: false
- },
- xAxis: {
- categories: (function() {
- var xAxised = [];
- $(data.data).each(function(i, n) {
- xAxised.push(n.TimeValue)
- })
- return xAxised
- })(),
- crosshair: true,
- title: {
- text: titleText,
- align: 'high',
- offset: 0,
- x: 25,
- y: 8,
- style: {
- color: '#266cf8'
- }
- },
- lineColor: "#45599d",
- tickColor: 'transparent',
- labels: {
- style: {
- color: '#fff'
- }
- }
- },
- yAxis: {
- min: 0,
- title: {
- text: '(立方)',
- align: 'high',
- offset: 0,
- rotation: 0,
- y: -10,
- x: -10,
- style: {
- color: '#266cf8'
- },
- },
- gridLineDashStyle: 'longdash', //图表内网格线样式
- gridLineColor: '#242f5d', //图表内网格线颜色
- labels: {
- style: {
- color: '#fff'
- },
- step: 1
- },
- lineColor: '#45599d',
- lineWidth: 1
- },
- plotOptions: {
- column: {
- borderWidth: 0,
- pointWidth: barWidth //柱子之间的距离值
- }
- },
- series: [{
- name: '数量',
- data: (function() {
- var seriesData = [];
- $(data.data).each(function(i, n) {
- seriesData.push(n.DataValue)
- })
- // console.log(seriesData)
- return seriesData.map(s => +s)
- })(),
- color: "#f8c900",
- dataLabels: {
- enabled: true,
- format: '{y}',
- style: {
- color: '#fff'
- }
- }
- }]
- });
- }
- }
- });
- //用氧量
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "plcautomationapi/api/plcdata/getoxygendatalist",
- async: true,
- dataType: 'json',
- data: {
- datetype: dateTypes,
- projectname: $("#projectID").attr("index")
- },
- success: function(data) {
- if (data.state.toLowerCase() == 'success') {
- // 用氧量
- $('#oxygenCount').highcharts({
- chart: {
- type: 'column',
- backgroundColor: 'transparent',
- marginRight: 25,
- marginTop: 25
- },
- title: false,
- credits: {
- enabled: false // 禁用版权信息
- },
- exporting: {
- enabled: false
- }, //隐藏导出图片
- legend: {
- enabled: false
- },
- xAxis: {
- categories: (function() {
- var xAxised = [];
- $(data.data).each(function(i, n) {
- xAxised.push(n.TimeValue)
- })
- return xAxised
- })(),
- crosshair: true,
- title: {
- text: titleText,
- align: 'high',
- offset: 0,
- x: 25,
- y: 8,
- style: {
- color: '#266cf8'
- }
- },
- lineColor: "#45599d",
- tickColor: 'transparent',
- labels: {
- style: {
- color: '#fff'
- }
- }
- },
- yAxis: {
- min: 0,
- title: {
- text: '(立方)',
- align: 'high',
- offset: 0,
- rotation: 0,
- y: -10,
- x: -10,
- style: {
- color: '#266cf8'
- },
- },
- gridLineDashStyle: 'longdash', //图表内网格线样式
- gridLineColor: '#242f5d', //图表内网格线颜色
- labels: {
- style: {
- color: '#fff'
- },
- step: 1
- },
- lineColor: '#45599d',
- lineWidth: 1
- },
- plotOptions: {
- column: {
- borderWidth: 0,
- pointWidth: barWidth //柱子之间的距离值
- }
- },
- series: [{
- name: '数量',
- data: (function() {
- var seriesData = [];
- $(data.data).each(function(i, n) {
- seriesData.push(n.DataValue)
- })
- // console.log(seriesData)
- return seriesData.map(s => +s)
- })(),
- color: "#1cd585",
- dataLabels: {
- enabled: true,
- format: '{y}',
- style: {
- color: '#fff'
- }
- }
- }]
- });
- }
- }
- });
- }
- //退出
- function logout() {
- window.localStorage.removeItem('token');
- window.localStorage.removeItem('headImg');
- window.localStorage.removeItem('userName');
- window.localStorage.removeItem('userCode');
- window.localStorage.removeItem('roleName');
- window.localStorage.removeItem('seatFlag');
- window.localStorage.removeItem('extno');
- window.localStorage.removeItem('group');
- window.localStorage.removeItem('deptId');
- window.localStorage.removeItem('teamId');
- window.localStorage.removeItem('mobile');
- location.href = "./login.html";
- }
- function timeBtn(obj) {
- var num = 0;
- setInterval(function() {
- num++;
- if (num == 3) {
- num = 0;
- }
- obj.children('.btns').eq(num).trigger('click');
- }, huayi.config.timeBtnTime);
- }
- function WXTabtime(obj) {
- var num = 0;
- setInterval(function() {
- num++;
- if (num == 2) {
- num = 0;
- }
- obj.children('.title_tips').eq(num).trigger('click');
- }, huayi.config.wxTabTime);
- }
- function Ajax() {
- var $storages = window.localStorage;
- if ($("#projectID").text() == "null" || $("#projectID").text() == "") {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "equipmentapi/api/RunningChart/getprojecttimeout",
- dataType: 'json',
- async: true,
- success: function(data) {
- if (data.state == 'success') {
- var selectPro=data.data
- $("#projectID").text(selectPro[0].id);
- $("#projectID").attr("index", selectPro[0].name);
- $("#PjText").text(selectPro[0].name);
- $('#pro_images').attr('src', 'images/' + selectPro[0].id + '.png');
- $storages.setItem('projectIDc', $("#projectID").text());
- $storages.setItem('projectIDName', $("#projectID").attr("index"));
- getmaintenancelist(); //维保事项
- getContractTimeOut(); //合同到期提示
- getBottomData(0);//底部水电气氧数据
- getproject(); //项目数量
- clearInterval(autoTabSchedulOrNewsTimer); //清楚定时
- getnewslist('importantInformation'); //项目新闻
- }
- }
- });
- }else{
- //getmapData();//地图数据
- getContractTimeOut(); //合同到期提示
- if($("#projectID").attr("index") == "河南省直第三人民医院"){
- getnewslist('schedulingInfo'); //项目新闻
- $('#switchTitleTabs').find('.outter').off('click',getSchedulOrNewsInfo);
- $('#switchTitleTabs').find('.outter').on('click',getSchedulOrNewsInfo);
- autoTabSchedulOrNews(); //自动切换
- }else{
- clearInterval(autoTabSchedulOrNewsTimer);
- getnewslist('importantInformation'); //项目新闻
- getmaintenancelist(); //维保事项
- }
- getBottomData(0);//底部水电气氧数据
- getproject(); //项目数量
- }
- }
- function projectTab() {
- getContractTimeOut(); //合同到期提示
- if($("#projectID").attr("index") == "河南省直第三人民医院"){
- getnewslist('schedulingInfo'); //项目新闻
- $('#switchTitleTabs').find('.outter').off('click',getSchedulOrNewsInfo);
- $('#switchTitleTabs').find('.outter').on('click',getSchedulOrNewsInfo);
- autoTabSchedulOrNews(); //自动切换
- }else{
- clearInterval(autoTabSchedulOrNewsTimer);
- getnewslist('importantInformation'); //项目新闻
- getmaintenancelist(); //维保事项
- }
- getproject(); //项目数量
- }
- // 获取排班信息或重要事项通知
- function getSchedulOrNewsInfo(){
- $(this).removeClass('title_sign_transparent').siblings().addClass('title_sign_transparent');
- if($(this).index() === 0){
- getnewslist('schedulingInfo'); //重要事项通知 项目新闻
- }else{
- getSchedulingInfo();//排班信息
- }
- }
- // 自动切换 排班信息或重要事项通知
- function autoTabSchedulOrNews(){
- var num = 0;
- if(autoTabSchedulOrNewsTimer){
- clearInterval(autoTabSchedulOrNewsTimer);
- }
- autoTabSchedulOrNewsTimer = setInterval(function() {
- num++;
- if (num === 2) {
- num = 0;
- }
- $('#switchTitleTabs').find('.outter').eq(num).trigger('click');
- }, huayi.config.timeBtnTime);
- }
|