1
hao
2025-05-20 8e24c6fea30d9b179375ee2893710cdec2443b13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
//车间看板
var interval_do = null;// 页面刷新定时器
clearInterval(interval_do);
 
$(function() {
    doData()
    interval_do = setInterval(getKanbanData, 60 * 1000); // 启动,执行默认方法
})
 
function doData() {
    if (RESULT.result == false) {
        return false
    }
    var List = RESULT.data[0].data
    // console.log( RESULT.data[2])
    setTableClass(1, 'part_1', RESULT.data[2], 0)
 
 
    // for (var i = 0; i < List.length; i++) {
    //     var arr = List[i]
    //     $("#title_" + i).text(arr.TITLE_NAME)
    //     var partID = "part_" + i
    //     console.log(partID)
    //     if (arr.SHOW_TYPE == "TABLE") {// 表格
    //         setTableClass(i, partID, RESULT.data[i], arr.CHART_TYPE)
    //     }
    //     else if (arr.SHOW_TYPE == "CHART") {// 图表
    //
    //         if (RESULT.data[i].result == 1) {
    //             continue;
    //         }
    //         // 圆
    //         if (arr.CHART_TYPE == "PIE") {
    //             buildPieEchart(RESULT.data[i].data, partID)
    //         } else if (arr.CHART_TYPE == "LINEBAR") {// 折柱
    //             buildEchart(RESULT.data[i].data, partID)
    //         }
    //         } else if (arr.SHOW_TYPE == "FWORD") {// 显示数值
    //         setWordsDiv(RESULT.data[i], partID)
    //     }
    // }
 
}
 
function getKanbanData() {
    getDataType();
}
function getDataType() {
    var params = {
        "kanbanNo" : FTYPE,
        "frequency" : FREQUENCY,
        "lineNo" : ""
    };
    $.ajax({
        type : "GET",
        url : context + "kanban/getTemplateList",
        data : params,
        dataType : "json",
        success : function(res) {
            console.log(res)
            if (res.result) {
 
                RESULT = res
 
                doData()
 
            } else {
                // clearInterval(interval_do);//错误-关闭定时器
            }
        }
    });
}
// 获取屏幕宽度并计算比例-设置echarts文字
function fontSize(res) {
    var docEl = document.documentElement, clientWidth = window.innerWidth
            || document.documentElement.clientWidth
            || document.body.clientWidth;
    if (!clientWidth)
        return;
    var fontSize = 100 * (clientWidth / 2880);// 原:1920/2400/2880
    return res * fontSize;
}
 
function isNull(str) {
    if (str == null) {
        return ""
    } else {
        return str
    }
}