zhuguifei
2026-03-10 2c1fd10c6fbabb8e9f0e9f07fe66fb36c008e883
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html>
<head>
    <title>源数据监控</title>
    <jsp:include page="../../../initlib/initAll.jsp"></jsp:include>
    <script type="text/javascript" src="${pageContext.request.contextPath }/pms/pub/combobox/comboboxUtil.js"
            charset="utf-8"></script>
    <script type="text/javascript">
        var twoGrid = null;
        $(function () {
            twoGrid = $('#twoGrid').datagrid({
                rownumbers: true,
                idField: 'key',
                fit: true,
                singleSelect: true,
                fitColumns: true, //fitColumns= true就会自动适应宽度(无滚动条)
                border: false,
                striped: true,
                nowrap: true,
                remoteSort: false,
                checkOnSelect: false,
                selectOnCheck: false,
                columns: [[{
                    field: 'key',
                    title: '键',
                    width: 130,
                    align: 'center',
                    sortable: true
                }, {
                    field: 'value',
                    title: '值',
                    align: 'center',
                    width: 130,
                    sortable: true
                    /*formatter: function(value){
                        return '<span title='+value+'>'+value+'</span>';
                    }*/
                }]],
                toolbar: '#typeToolbar',
                onLoadSuccess: function () {
                    $(this).datagrid('tooltip');
                },
                onRowContextMenu: function (e, rowIndex, rowData) {
                    e.preventDefault();
                    $(this).datagrid('unselectAll').datagrid('uncheckAll');
                    $(this).datagrid('selectRow', rowIndex);
                    $('#typeMenu').menu('show', {
                        left: e.pageX - 10,
                        top: e.pageY - 5
                    });
                }
            });
        });
 
        //点击主菜单,查询相应的数据
        function querySourceDate(name) {
            //重新加载datagrid的数据
            twoGrid.datagrid({
                url: "${pageContext.request.contextPath}/pms/monitoring/querySourceDate.do?name=" + name
            });
 
        }
 
        var categoryGrid = null;
        $(function () {
 
            categoryGrid = $('#categoryGrid').datagrid({
                fit: true,
                fitColumns: true, //fitColumns= true就会自动适应宽度(无滚动条)
                border: false,
                idField: 'name',
                //pagination : true, //在DataGrid控件底部显示分页工具栏。
                nowrap: true,
                rownumbers: true,
                striped: true,
                remoteSort: false,
                //pageSize : 20, //每页显示多少条记录
                //pageList : [ 10, 20, 30, 40, 50 ], //每页显示条数可选项
                sortName: 'name',
                sortOrder: 'asc',
                singleSelect: true,
                checkOnSelect: false,
                selectOnCheck: false,
                showPageList: false,
                columns: [[{
                    field: 'name',
                    title: '一级名称',
                    width: 170,
                    align: 'center',
                    sortable: true
                }, {
                    field: 'des',
                    title: '描述',
                    width: 150,
                    align: 'center'
                }]],
                toolbar: '#categoryToolbar',
                url: "${pageContext.request.contextPath}/pms/monitoring/querySourceDateList.do",
                queryParams: $("#categroyForm").form("getData"),
                onLoadSuccess: function () {
                    $(this).datagrid('tooltip');
                },
                onRowContextMenu: function (e, rowIndex, rowData) {
                    e.preventDefault();
                    $(this).datagrid('unselectAll').datagrid('uncheckAll');
                    $(this).datagrid('selectRow', rowIndex);
                    $('#categoryMenu').menu('show', {
                        left: e.pageX - 10,
                        top: e.pageY - 5
                    });
                },
                onClickRow: function (rowIndex, rowData) {
                    querySourceDate(rowData.name);
                }
            });
        });
 
        /**
         * 查询数据
         */
        function querySourceDateList() {
            categoryGrid.datagrid({
                url: "${pageContext.request.contextPath}/pms/monitoring/querySourceDateList.do",
                queryParams: $("#categroyForm").form("getData")
            });
        }
    </script>
</head>
<body class="easyui-layout" data-options="fit : true,border : false">
<div data-options="region:'west',border:true,split:false,title:'源数据监控数据字典【可单击表格】'" style="width: 400px;">
    <div id="categoryToolbar" style="display: none;">
        <form id="categroyForm" style="margin:4px 0px 0px 0px">
            <div class="topTool">
                <fieldset>
                    <div>
                        <span class="label">一级名称:</span>
                        <input type="text" name="name" class="easyui-validatebox "
                               data-options="prompt: '请输入数据名称',width:120"/>
                    </div>
                    <div>
                        <span class="label">设备类型:</span>
                        <select name="eqpType"
                                class="easyui-combobox"
                                data-options="panelHeight:'auto',editable:false,width:120">
                            <!-- 1-月 2-周 3-日 -->
                            <option value="">全部</option>
                            <option value="卷烟机">卷烟机</option>
                            <option value="包装机">包装机</option>
                            <option value="装封箱机">装封箱机</option>
                            <option value="发射机">发射机</option>
                            <option value="成型机">成型机</option>
                            <option value="提升机">提升机</option>
                        </select>
                    </div>
                </fieldset>
            </div>
        </form>
        <div class="easyui-toolbar" style="width:400px;">
            <a onclick="querySourceDateList()" href="javascript:void(0);" class="easyui-linkbutton"
               data-options="plain:true,iconCls:'icon-standard-zoom'">查询</a>
        </div>
    </div>
    <table id="categoryGrid"></table>
</div>
 
<div data-options="region:'center',border:true,title:'二级数据'">
    <div id="typeToolbar" style="display: none;"></div>
    <table id="twoGrid"></table>
</div>
</body>
</html>