| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254 | function task() {    $.get('/api/Orders_v2/task',{org_id:orgid, mode: 1},function (res) {        if(res.status === 0) {            var list = res.data.data;            if(list.length > 0){                var str = '';                for (var i=0;i<list.length;i++){                    str += '<tr>';                    // str += '<td>'+list[i]['TODO_ID']+'</td>';                    // str += '<td>'+list[i]['TASK_TYPE']+'</td>';                    str += '<td class="table-project-name">'+list[i]['CONTENT']+'</td>';                    str += '<td>'+list[i]['REPAIR_NAME']+'</td>';                    str += '<td class="table-task-name">'+list[i]['DEP']+'</td>';                    str += '<td>'+list[i]['HANDOUT_TIME']+'</td>';                    str += '<td>'+list[i]['executor']+'</td>';                    if (list[i]['TODO_MODE'] == '待领取') {                        str += '<td style="color: #FD0000;">' + list[i]['TODO_MODE'] + '</td>';                    } else {                        str += '<td style="color: #11F000;">' + list[i]['TODO_MODE'] + '</td>';                    }                     str += '</tr>';                }                $('#task-order').html(str);            }            if (list.length > 11) {                $(function(){                    var text=$("#task-order:first");                    var clear;                    text.hover(function(){                        clearInterval(clear);                    },function(){                        clear=setInterval(function(){                            var field=text.find("tr:first");                            var high=field.height();                            text.animate({ marginTop:-high+"px"},600,function(){                                field.css("marginTop",0).appendTo(text);                                text.css("marginTop",0);                            })                        },5000)//滚动间隔时间                    }).trigger("mouseleave");//自动滚动                });            }        }    })}function todo() {    $.get('/api/Orders_v2/hidden_todo_day',{orgid:orgid, mode: 1},function (data) {        if(data.status == 0){            if(data.data.data.length > 0){                var optionChart = echarts.init(document.getElementById("order-day"));                option = {                    legend: {                        top: '0',                        textStyle: {                            fontSize: 16,                            fontWeight: 'normal',                            color: '#FFFFFF',                        },                    },                    grid: {                        top: '35%',                        left: '5%',                        right: '5%',                        containLabel: true                    },                    tooltip: {                        trigger: 'item',                        formatter: "{b}: {c}个"                    },                    title: {                        text: Math.floor(data.data.ratio * 100) / 100 + '%',                        subtext: '已完成占比',                        x: 'center',                        y: '45%',                        textStyle: {                            fontSize: 36,                            fontWeight: 'normal',                            color: '#3DE8FC',                        },                        subtextStyle: {                            fontSize: 18,                            fontWeight: 'normal',                            align:"center",                            color:'#FFFFFF'                        },                    },                    series: [{                        type: 'pie',                        radius: ['40%', '70%'],                        center: ['50%', '60%'],                        color: ['#1372BD', '#72BBF1'],                        // itemStyle:{                        //     normal: {                        //         borderWidth: 5,                         //         borderColor: '#031845',                        //     }                        // },                        data: data.data.data,                        labelLine: {                            normal: {                                show: true,                                length: 50,                                length2: 50,                                lineStyle: {                                    color: '#52FFFF',                                    width: 2                                }                            }                        },                        label: {                            normal: {                                formatter: '{b} {c}个',                                color: '#fff',                                fontSize: 16,                            }                        }                    }]                };                optionChart.setOption(option);            }        }    });}function orders(type) {    $.get('/api/Orders_v2/hidden_week_month',{orgid:orgid, type:type, mode:1},function (data) {        if(data.status == 0){            if(data.data.list.length > 0){                if(type == 1) {                    $('#order-name').html('周分析');                } else {                    $('#order-name').html('月分析');                }                var patrolChart = echarts.init(document.getElementById("order"));                patrolOption = null;                patrolOption = {                    color: ['#2986CF','#50E2CB'],                    legend: {                        data:['工单总量', '完成工单量'],                        textStyle: { color: "#FFFDFE" },                        top: 10                        // icon: "circle",                    },                    grid: {                        top: '25%',                        left: '3%',                        right: '3%',                        bottom: '1%',                        containLabel: true                    },                    tooltip: {},                    dataset: {                        dimensions: ['day','工单总量','完成工单量'],                        source: data.data.list,                    },                    xAxis: {                        type: 'category',                        axisLine: {                            lineStyle: {                                color: '#fff',                                width: 1,                            }                        },                    },                    yAxis: {                        axisLabel: {                            color:'#fff',                        }                    },                    series: [                        {                            type: 'bar',                            // barMaxWidth: 30,                            label: {                                normal: {                                    show: true,                                    position: 'top',                                    color: '#fff'                                }                            },                        },                        {                            type: 'bar',                            // barMaxWidth: 30,                            label: {                                normal: {                                    show: true,                                    position: 'top',                                    color: '#fff'                                }                            },                        }                    ]                };                if (patrolOption && typeof patrolOption === "object") {                    patrolChart.setOption(patrolOption, true);                }            }        }    });}task();orders(1);todo();setInterval(function () {    task();    todo();},5000*30);setInterval(function () {    setTimeout(function(){        orders(1);    },5000);    setTimeout(function(){        orders(2);    },10000);},15000);function realSysTime(clock) {    var now = new Date();    var year = now.getFullYear(); //获取年份    var month = now.getMonth(); //获取月份    var date = now.getDate(); //获取日期    var day = now.getDay(); //获取星期    var hour = now.getHours(); //获取小时    var minute = now.getMinutes(); //获取分钟    var seconds = now.getSeconds(); //获取秒    month = month + 1;    var arr_week = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六");    var week = arr_week[day];    if (month<10) {        month = '0'+month    }    if (date<10) {        date = '0'+date    }    if (hour<10) {        hour = '0'+hour    }    if (minute<10) {        minute = '0'+minute    }    if (seconds<10) {        seconds = '0'+seconds    }    var time = year + "年" + month + "月" + date + "日 " + week + " " + hour + ":" + minute + ":" + seconds;    clock.innerHTML = time;}function show() {    window.setInterval("realSysTime(clock)", 1000);}window.onload=show();
 |