自动化立体仓库 - WMS系统
#
lty
10 小时以前 0f423073e7cdfb8cbfe527aa6d0286b3b732c221
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../static/css/cool.css" media="all">
    <link rel="stylesheet" href="../../static/css/common.css" media="all">
    <style>
    </style>
</head>
<body>
<div class="layui-inline"  style="width:31%;margin-top: 20px">
    <label class="layui-form-label">发生时间:</label>
    <div class="layui-input-inline">
        <input id="createTime" class="layui-input" type="text" disabled="disabled">
    </div>
</div>
<table class="layui-hide" id="logDetlByTime" lay-filter="logDetlByTime"></table>
</body>
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
<script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script>
<script type="text/javascript">
    var tableIns1;  // 全局变量
    var pageCur;
    function getCol() {
        var cols = [
            {field: 'crnNo', align: 'center',title: '编号'}
            ,{field: 'ibDriveFault', align: 'center',title: '行走变频器故障'}
            ,{field: 'ibSupplyFault', align: 'center',title: '提共变频器故障'}
            ,{field: 'ibForkDriveFault', align: 'center',title: '货叉变频器故障'}
            ,{field: 'ibDriveCircuitFault', align: 'center',title: '行走断路器故障'}
            ,{field: 'ibLiftCircuitFault', align: 'center',title: '提升断路器故障'}
            ,{field: 'ibForkCircuitFault', align: 'center',title: '货叉断路器故障'}
            ,{field: 'ibForwardLimit', align: 'center',title: '前进限位',hide:true}
            ,{field: 'ibReverseLimit', align: 'center',title: '后退限位',hide:true}
            ,{field: 'ibDriveStart', align: 'center',title: '行走原点',hide:true}
            ,{field: 'ibForwardBrakeSpeed', align: 'center',title: '前进强制低速',hide:true}
            ,{field: 'ibReverseBrakeSpeed', align: 'center',title: '后退强制低速',hide:true}
            ,{field: 'ibUpLimit', align: 'center',title: '上升限位',hide:true}
            ,{field: 'ibDownLimit', align: 'center',title: '下限限位',hide:true}
            ,{field: 'ibUpOrigin', align: 'center',title: '提升原点',hide:true}
            ,{field: 'ibUpBrakeSpeed', align: 'center',title: '上升强制低速',hide:true}
            ,{field: 'ibDownBrakeSpeed', align: 'center',title: '下降强制低速',hide:true}
            ,{field: 'ibPlatformSignal', align: 'center',title: '载货台探货'}
            ,{field: 'ibForkMidSignal', align: 'center',title: '货叉中位信号'}
            ,{field: 'ibForkLeftLimit', align: 'center',title: '货叉左极限'}
            // ,{field: 'id', align: 'center',title: ''}
            ,{field: 'ibForkRightLimit', align: 'center',title: '货叉右极限'}
            ,{field: 'ibFrontOverLimit', align: 'center',title: '前超限'}
            ,{field: 'ibRearOverLimit', align: 'center',title: '后超限'}
            ,{field: 'ibLeftOverLimit', align: 'center',title: '左超限'}
            ,{field: 'ibRightOverLimit', align: 'center',title: '右超限'}
            ,{field: 'ibHighOverLimit1', align: 'center',title: '高超限1'}
            ,{field: 'ibHighOverLimit2', align: 'center',title: '高超限2'}
            ,{field: 'ibHighOverLimit3', align: 'center',title: '高超限3'}
            ,{field: 'ibOneExtendLeftLoad1', align: 'center',title: '一伸左侧探货1',hide:true}
            ,{field: 'ibOneExtendLeftLoad2', align: 'center',title: '一伸左侧探货2',hide:true}
            ,{field: 'ibOneExtendRightLoad1', align: 'center',title: '一伸右侧探货1',hide:true}
            ,{field: 'ibOneExtendRightLoad2', align: 'center',title: '一伸右侧探货2',hide:true}
            ,{field: 'ibTwoExtendLeftLoad1', align: 'center',title: '二伸左侧探货1',hide:true}
            ,{field: 'ibTwoExtendLeftLoad2', align: 'center',title: '二伸左侧探货2',hide:true}
            ,{field: 'ibTwoExtendRightLoad1', align: 'center',title: '二伸右侧探货1',hide:true}
            ,{field: 'ibTwoExtendRightLoad2', align: 'center',title: '二伸右侧探货2',hide:true}
            ,{field: 'ibSpeedSignal1', align: 'center',title: '超速信号1',hide:true}
            ,{field: 'ibSpeedSignal2', align: 'center',title: '超速信号2',hide:true}
            ,{field: 'ibOverweightSignal1', align: 'center',title: '超重信号1',hide:true}
            ,{field: 'ibOverweightSignal2', align: 'center',title: '超重信号2',hide:true}
            ,{field: 'ibRopeReleaseSignal1', align: 'center',title: '松绳信号1',hide:true}
            ,{field: 'ibRopeReleaseSignal2', align: 'center',title: '松绳信号2',hide:true}
            ,{field: 'ibSafetyClamp', align: 'center',title: '安全钳',hide:true}
            ,{field: 'ibTightener', align: 'center',title: '张紧器',hide:true}
            ,{field: 'ibSpeedLimiter', align: 'center',title: '限速器',hide:true}
            ,{field: 'ibSafetyDoorOpen', align: 'center',title: '安全门打开',hide:true}
            ,{field: 'createTime$', align: 'center',title: '创建时间'}
        ];
        return cols;
    }
    // 格式化时间函数
    function formatDateTime(isoString) {
        const date = new Date(isoString);
        const y = date.getFullYear();
        const m = String(date.getMonth() + 1).padStart(2, '0');
        const d = String(date.getDate()).padStart(2, '0');
        const hh = String(date.getHours()).padStart(2, '0');
        const mm = String(date.getMinutes()).padStart(2, '0');
        const ss = String(date.getSeconds()).padStart(2, '0');
        return `${y}-${m}-${d} ${hh}:${mm}:${ss}`;
    }
 
    // 渲染表格函数
    function renderTable() {
        if(!parentUuid) return; // 没uuid就不渲染
 
        layui.use(['table','form'], function(){
            var table = layui.table;
 
            tableIns1 = table.render({
                elem: '#logDetlByTime',
                url: baseUrl + '/basCrnErrorLog/listByUuid/auth',
                headers: { token: localStorage.getItem('token') },
                where: { uuid: parentUuid },
                page: true,
                limit: 16,
                cols: [getCol()],
                parseData: function(res){ // 转换接口返回的数据
                    console.log(res);
                    return res;
                }
            });
        });
    }
 
    // 父页面调用 setUuid 后设置 uuid 并渲染表格
    function setUuid(uuid){
        parentUuid = uuid;
        renderTable();
    }
 
    // 父页面调用 setCreateTime 设置时间显示
    function setCreateTime(value){
        $('#createTime').val(formatDateTime(value));
    }
 
</script>
</html>