2
13693261870
2022-09-16 653761a31dfeb50dd3d007e892d69c90bf0cdafc
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8" />
    <title th:text="${systemName}"></title>
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport" />
    <link rel="stylesheet" th:href="@{${pubzyWebRoot} + 'BootStrap4/assets/css/style.css'}" />
    <link rel="stylesheet" th:href="@{${pubzyWebRoot} + 'BootStrap4/expand/css/bootstrap-extract.css'}" />
    <link rel="stylesheet" th:href="@{${pubzyWebRoot} + 'BootStrap4/assets/plugins/bootstrap-datepicker/old_datepaker/datepicker.css'}" />
    <link rel="stylesheet" th:href="@{${pubzyWebRoot} + 'BootStrap4/expand/plugins/portlet/css/portlet.css'}" />
    <link rel="stylesheet" th:href="@{${pubzyWebRoot} + 'BootStrap4/expand/plugins/jqgrid/ui.jqgrid-bootstrap.css'}"/>
    <script th:src="@{${pubzyWebRoot} + 'BootStrap4/expand/plugins/portlet/portlet.js'}"></script>
    <!-- 表单样式  -->
    <script th:src="@{${pubzyWebRoot} + 'BootStrap4/assets/js/jquery.min.js'}"></script>
    <script th:src="@{${pubzyWebRoot} + 'BootStrap4/expand/plugins/layer/layer.js'}"></script>
    <script th:src="@{${pubzyWebRoot} + 'BootStrap4/assets/js/tether.min.js'}"></script>
    <script th:src="@{${pubzyWebRoot} + 'BootStrap4/assets/js/bootstrap.min.js'}"></script>
    <script th:src="@{${pubzyWebRoot} + 'BootStrap4/assets/plugins/bootstrap-datepicker/old_datepaker/bootstrap-datepicker.js'}"></script>
    <script th:src="@{${pubzyWebRoot} + 'BootStrap4/assets/plugins/bootstrap-datepicker/old_datepaker/bootstrap-datepicker.zh-CN.min.js'}"></script>
    <link th:href="@{${pubzyWebRoot} + 'ext-4.2.1.883/resources/css/ext-all-neptune.css'}" rel="stylesheet" type="text/css" />
 
    <script th:src="@{${pubzyWebRoot} + 'ext-4.2.1.883/ext-all.js'}"></script>
    <script th:src="@{${pubzyWebRoot} + 'ext-4.2.1.883/locale/ext-lang-zh_CN.js'}"></script>
    <script th:src="@{${pubzyWebRoot} + 'ext-4.2.1.883/PagingToolbar.js'}"></script>
    <script src="/js/Extjs/ResTheme/restheme.js"></script>
    <script th:src="@{${pubzyWebRoot} + 'media/js/winPro.js'}"></script>
    <script src="/js/common.js"></script>
    <link href="/css/grid-selfAdaptH.css" rel="stylesheet" type="text/css"/>
    <style>
        .x-grid-with-row-lines .x-grid-td {
            vertical-align: text-top;
        }
        .x-grid-view {
            overflow: hidden !important;
        }
        .x-body{
            overflow-x: hidden;
        }
        .DivHeight {
            height: 45px;
        }
 
        .form-horizontal .control-label {
            width: 70px;
        }
 
        [class*='span'] {
            margin-left: 0 !important;
        }
 
        .row-fluid [class*='span'] {
            margin-left: 0 !important;
        }
 
        .row {
            margin-left: 0;
            margin-right: 0;
        }
 
        .x-grid-row td,
        .x-grid-data-row td {
            border-right: 1px solid #E3E3E3;
        }
 
        .col-sm-12, .col-md-6, .col-lg-4, .col-xl-3 {
            padding-left: 0;
            padding-right: 0;
        }
 
        body {
            padding-bottom: 10px;
        }
 
        .btn_arrow {
            width: 19px;
            height: 25px;
            float: left;
            background: url('/image/arrow.png') no-repeat 0px 0px;
            margin-left: 15px;
            margin-bottom: 10px;
            cursor: pointer;
        }
    </style>
    <script>
        $(function () {
            $(".date-picker").datepicker({
                language: 'zh-CN',
                format: 'yyyy-mm-dd'
            });
        });
        function Clear() {
            document.getElementById("SearchForm").reset();
        }
 
        function Search() {
            if(!checkDate()) {
                $("#pubdatefinish").focus();
                $("#pubdatefinish").focus();
                return false;
            }
            Ext.getCmp('gridexample').dockedItems.items[1].store.currentPage = 1;
            ThemeStore.load();
        }
 
        //判断发布时间选择框,后一个时间是否小于前一个时间
        function checkDate() {
            var pubdateBegin = $("#pubdateBegin").val();
            var pubdatefinish = $("#pubdatefinish").val();
            if(pubdateBegin != "" && pubdatefinish != ""){
                var pubdatestart = new Date(pubdateBegin.replace(/-/g,"/"));
                var pubdateend = new Date(pubdatefinish.replace(/-/g,"/"));
                if(pubdatestart > pubdateend){
                    alert("结束时间不能小于开始时间!");
                    return false;
                }
                else {
                    return true;
                }
            }
            else {
                return true;
            }
        }
 
        //新增业务专题
        function AddResTheme() {
            var url = "/res/ResTheme/addResTheme";
            //winPro.openFullwin(url, "查看业务专题", "yes");
            openFullWindow(url, "查看业务专题")
        }
 
        function openResTheme(id) {
            var url = "/res/ResTheme/addResTheme?themeid=" + id;
           // winPro.openFullwin(url, "查看业务专题", "yes");
            openFullWindow(url, "查看业务专题")
        }
 
        function openModule() {
            // var url = "/res/ResThemeModule/ModuleList";
            // winPro.openFullwin(url, "查看模块信息", "yes");
            window.open("/res/ResThemeModule/ModuleList");
        }
 
        //打开排序
        function showOrderList(){
            $.ajax({
                type: "GET",
                url: "/res/ResTheme/selectResThemeByOrderid",
                contentType: "application/json",
                dataType: 'json',
                success: function(result) {
                    // var data = eval("(" + result + ")");
                    var data = result.result;
                    jQuery("#theme_order").empty();
                    jQuery.each(data, function(i, item) {
                        jQuery("#theme_order").append("<option value=" + item.themeid + ">" + item.title + "</option>");
                    });
                    $("#theme_order").attr("size", 15);
                }
            });
        }
 
        //排序點擊
        function updateOrder(type){
            if ($("#theme_order option:selected").length == 0) {
                alert("请选择节点!");
                return false;
            }
            if ($("#theme_order option:selected").length >1) {
                alert("请选择一个节点!");
                return false;
            }
            if(type == "allup"){
                $('#theme_order option:selected').insertBefore($('#theme_order option').first());
            }else if (type == "up"){
                $('#theme_order option:selected').insertBefore($('#theme_order option:selected').prev());
            }else if (type == "down"){
                $('#theme_order option:selected').insertAfter($('#theme_order option:selected').next());
            }else{
                $('#theme_order option:selected').insertAfter($('#theme_order option').last());
            }
        }
 
        //修改排序
        function submitOrder(){
            var idlist = "";
            $("#theme_order option").each(function () {
                if(idlist != "") idlist+=",";
                idlist += $(this).attr("value");
            });
            $.ajax({
                type: "post",
                url: "/res/ResTheme/updateOrderid",
                data:{
                    'ids':idlist
                },
                success: function(result) {
                    var data = eval("(" + result + ")");
                    if(data.result == 1){
                        alert("保存成功!");
                        showOrderList();
                        Search();
                    }
                }
            });
        }
    </script>
</head>
<body>
<div id="rapp" shiro:hasPermission="res:thememodule:edit">
    <div>
        <div class="panel panel-default">
            <div class="panel-heading">
                查询区
            </div>
            <div class="panel-body SearchBox">
                <form id="SearchForm">
                    <div class="row">
                        <div class="col-sm-12 col-md-6 col-lg-4 col-xl-3 DivHeight">
                            <label class="control-label">专题名称</label>
                            <div class="controls">
                                <input type="text" class="form-control" id="title" name="title" />
                            </div>
                        </div>
                        <div class="col-sm-12 col-md-6 col-lg-4 col-xl-3">
                            <label class="control-label">创建时间</label>
                            <div class="controls">
                                <input type="text" class="custom-form-control date-picker" readonly="readonly" id="pubdateBegin" name="pubdateBegin" style="width:49%; display: inline-block;" />
                                <input type="text" class="custom-form-control date-picker" readonly="readonly" id="pubdatefinish" name="pubdatefinish" style="width:49%; display: inline-block;" />
                            </div>
                        </div>
                        <div class="col-sm-12 col-md-6 col-lg-4 col-xl-3 DivHeight">
                            <label class="control-label">所属模块</label>
                            <div class="controls">
                                <select class="form-control col-sm-12" name="isonemap" id="isonemap">
                                    <option value="" selected="selected">全部</option>
                                    <option value="1" >一张图模块</option>
                                    <option value="3" >默认模块</option>
 
 
                                </select>
                            </div>
                        </div>
                    </div>
                    <div class="row" style="display:block;">
                        <div style="padding-left: 1.75em; float: left;">
                            <a class="btn btn-success" shiro:hasPermission="res:thememodule:edit" onclick="AddResTheme();"><i class="fa fa-plus"></i>&nbsp;新增</a>
                            <a class="btn btn-success" shiro:hasPermission="res:thememodule:edit" onclick="openModule();"><i class="fa fa-list-ul"></i>&nbsp;微件管理</a>
                            <a class="btn btn-warning" shiro:hasPermission="res:thememodule:edit" data-toggle="modal" data-target="#orderModal" onclick="showOrderList()">
                                <i class="fa fa-sort"></i>&nbsp;排序</a>
                        </div>
                        <div style="float: right;padding-right: 0.75em;">
                            <a class="btn btn-primary-outline" onclick="Search();"><i class="fa fa-search"></i>&nbsp;查询</a>
                            <a class="btn btn-primary-outline" onclick="Clear();"><i class="fa fa-trash-o"></i>&nbsp;清除</a>
                        </div>
                    </div>
                </form>
            </div>
        </div>
        <div id="grid" style="width: 100%"></div>
        <div class="modal fade" id="orderModal" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog" style="width: 360px;">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                            &times;
                        </button>
                        <h4 class="modal-title" id="myModalLabel">
                            排序-列表
                        </h4>
                    </div>
                    <div class="modal-body">
                        <div style="-ms-overflow-y: auto;height: 370px;overflow: auto;">
                            <div class="row-fluid">
                                <div style="float:left;">
                                    <div class="controls">
                                        <select class="ui-jqgrid" multiple="multiple" id="theme_order" style="width:278px;height: 303px;">
                                        </select>
                                    </div>
                                </div>
                                <div style="padding:80px 0 0 20px;">
                                    <div class="btn_arrow" onclick="updateOrder('allup')" title="置顶"></div>
                                    <div class="btn_arrow" onclick="updateOrder('up')" title="上移" style="background-position: 0px -85px; margin-bottom: 25px;"></div>
                                    <div class="btn_arrow" onclick="updateOrder('down')" title="下移" style="background-position: 0px -49px"></div>
                                    <div class="btn_arrow" onclick="updateOrder('alldown')" title="置底" style="background-position: 0px -125px"></div>
                                    <!--<div>&nbsp;</div>-->
                                    <!--<div><a href="javascript:;" style="margin-left: 6px;" onclick="updateOrder('allup')"><i style="font-size: 22px;" class="zmdi zmdi-format-valign-top"></i></a></div>-->
                                    <!--<div style="margin-left:7px;"><a href="javascript:;" onclick="updateOrder('up')" class="icon-arrow-up"></a></div>-->
                                    <!--<div>&nbsp;</div>-->
                                    <!--<div style="margin-left:7px;"><a href="javascript:;" onclick="updateOrder('down')" class="icon-arrow-down"></a></div>-->
                                    <!--<div><a href="javascript:;" style="margin-left: 6px;" onclick="updateOrder('alldown')"><i style="font-size: 22px;" class="zmdi zmdi-format-valign-bottom"></i></a></div>-->
                                </div>
                                <div style="float: right;margin-right: 10px;margin-top:20px;">
                                    <a class="btn btn-primary" shiro:hasPermission="res:thememodule:edit" onclick="submitOrder()"><i class="fa fa-eyes"></i>确定排序</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>