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
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<!--
功能描述:资源中心 - 资源发布
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:layout="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.w3.org/1999/xhtml" layout:decorator="MasterPage/CommonPage/Layout">
<!-- layout文件路径-->
<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title th:text="'资源发布 - ' + ${systemName}"></title>
    <!--<link th:href="@{${pubzyWebRoot} + 'ext-4.2.1.883/resources/css/ext-all-neptune.css'}" rel="stylesheet" type="text/css" />-->
    <link th:href="@{${pubzyWebRoot} + 'media/css/bootstrap-tree.css'}" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" th:href="@{${pubzyWebRoot} + 'BootStrap4/expand/plugins/portlet/css/portlet.css'}" />
    <link th:href="@{${pubzyWebRoot} + 'media/css/select2_metro.css'}" type="text/css" rel="stylesheet" />
    <link th:href="@{${pubzyWebRoot} + 'media/css/pagination.css'}" type="text/css" rel="stylesheet" />
    <link rel="stylesheet" th:href="@{${pubzyWebRoot} + 'BootStrap4/assets/plugins/bootstrap-datepicker/old_datepaker/datepicker.css'}" />
    <link th:href="@{${pubzyWebRoot} + 'zTree/css/metroStyle/metroStyle.css'}" rel="stylesheet" type="text/css" />
    <script th:src="@{${pubzyWebRoot} + 'jqPaginator/jqpaginator.min.js'}"></script>
    <!--<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/ZYML/ZYMLZiYuan.js"></script>-->
    <script th:src="@{${pubzyWebRoot} + 'media/js/tabPages.js'}"></script>
    <script th:src="@{${pubzyWebRoot} + 'media/js/winPro.js'}"></script>
    <script th:src="@{${pubzyWebRoot} + 'echarts/echarts.min-3.0.js'}" type="text/javascript"></script>
    <script th:src="@{${pubzyWebRoot} + 'media/js/select2.min.js'}" type="text/javascript"></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>-->
    <script th:src="@{${pubzyWebRoot} + 'zTree/js/jquery.ztree.all.js'}"></script>
    <script th:src="@{${pubzyWebRoot} + 'zTree/js/jquery.ztree.core.js'}"></script>
    <script th:src="@{${pubzyWebRoot} + 'zTree/js/jquery.ztree.exedit.js'}"></script>
    <script th:src="@{${pubzyWebRoot} + 'zTree/js/jquery.ztree.excheck.js'}"></script>
    <script src="/js/openresource.js"></script>
    <style type="text/css">
        .div_left{
            /*float: left;*/
            position: absolute;
            width:260px;
            height: 500px;
        }
        .div_right{
            /*float: left;*/
            margin-left: 270px;
            height: 100%;
        }
        .div_catalog{
            float: left;
            width:100%;
            color: white;
        }
        .div_catalog div{
            width: 100%;
            height: 50px;
            border-bottom: 1px solid;
            cursor:pointer;
        }
        .div_catalog div:first-child{
            background-color: #0E51A6;
        }
        .div_catalog div:not(:first-child){
            background-color: #0B92D4;
        }
        .div_catalog div:not(:first-child):hover{
            background-color: #17A6EC;
        }
        .span_left{
            float: left;
            font-size:17px;
            line-height:47px;
            margin-left: 20px;
        }
        .span_right{
            float: right;
            fonst-size:14px;
            line-height: 50px;
            margin-right: 10px;
        }
        .div_search{
            background-color:white;
            height: 110px;
            width: 100%;
            padding: 18px 0px 0px 27px;
        }
        .div_main{
            color:grey;
            height: 500px;
            font-size: 14px;
        }
        .div_zy{
            background-color: white;
            padding: 18px 0px 0px 27px;
            border-left:3px solid #E0DEDB;
            height: 165px;
        }
        .div_zy:first-child{
            border-top: 1px solid #E0DEDB;
        }
        .div_zy:not(:first-child){
            margin-top: 10px;
        }
        .sort{
            cursor: pointer;
            padding: 2px 15px;
        }
        .shtype{
            cursor: pointer;
            padding: 2px 15px;
        }
 
        .clickCss {
            color: #EEE683;
            background-color: #17A6EC !important;
        }
    </style>
    <script type="text/javascript" th:inline="javascript">
        var resourceType = "";
        var formdata = {};
        $(function () {
            resourceType = [[${ResourceTypeListJson}]];
            showResourceType();
            $(".div_right").css("width",window.innerWidth-300+"px");
        });
        function  changepage(num) {
            var url = 'dataList?page=' + num;
            $("#block").load(url, formdata, function () { //加载图文列表
                var Page = Number(document.getElementById("curren").value);
                var Count = Number(document.getElementById("total").value);
                if (Count != 0) {
                    $('#Paginator').jqPaginator({
                        totalCounts: Count,
                        pageSize: 15,
                        currentPage: Page,
                        first: '<li class="first"><a href="javascript:void(0);">首页</a></li>',
                        prev: '<li class="prev"><a href="javascript:void(0);">上一页</a></li>',
                        next: '<li class="next"><a href="javascript:void(0);">下一页</a></li>',
                        last: '<li class="last"><a href="javascript:void(0);">末页</a></li>',
                        page: '<li class="page"><a href="javascript:void(0);">{{page}}</a></li>',
                        onPageChange: function (num) {
                            if (num != Page) {
                                changepage(num);
                            }
                        }
                    });
                }
            });
        }
        function showResourceType(){
            var list = eval(resourceType);
            var html = "<div onclick=\"Search('','','all','')\" key=\"all\"><span class=\"span_left\">全部资源类型</span></div>";
            for(var i =0;i<list.length;i++){
                var name = (list[i].key.indexOf("KJ_") != -1 && list[i].key != "KJ_") ? ("--"+list[i].value):list[i].value;
                html+="<div onclick=\"Search('','','"+list[i].key+"','')\" key='"+list[i].key+"'><span class='span_left'>"+name
                    +"</span><span class='span_right'>资源数(" + list[i].zycount + "笔)> </span></div>";
            }
            $(".div_catalog").html(html);
        }
        //排序
        function sort(obj){
            $(".sort").each(function () {
                if($(this)[0].id != $(obj)[0].id){
                    $(this).css("color","black").css("font-weight","normal");
                    $(this).css("background-color","");
                }else{//选中排序
                    var type = "";
                    if($(obj).attr("type").trim() == ""){
                        type = " desc";
                    }
                    if($(obj).attr("type").trim() == "desc"){
                        type = "";
                    }
                    $(obj).attr("type",type);
                    Search($(obj)[0].id+type,"","","");
                    $(this).css("color","#ffffff").css("font-weight","bold");
                    $(this).css("background-color","#0b92d4");
                }
            })
        }
        //审核状态
        function shtype(obj) {
            $(".shtype").each(function () {
                if($(this).attr("type") != $(obj).attr("type")){
                    $(this).css("color","black").css("font-weight","normal");
                    $(this).css("background-color","");
                }else{//选中排序
                    Search("","","",$(obj).attr("type"));
                    $(this).css("color","#ffffff").css("font-weight","bold");
                    $(this).css("background-color","#0b92d4");
                }
            })
        }
    </script>
    <script>
        //查询事件
        function Search(sort,title,resourceclass,type) {
            formdata = {};
            if(resourceclass != ''){
                $("#resourceclass").val(resourceclass);
                $(".div_catalog div:not(:first-child)").each(function () {
                    if($(this).attr("key") == resourceclass){
                        $(this).addClass("clickCss");
                        // $(this).css("color","#EEE683");
                        // $(this).css("background-color","#17A6EC");
                    }else {
                        $(this).removeClass("clickCss");
                        // $(this).css("color","white");
                        // $(this).css("background-color","#0B92D4");
                    }
                })
            }
            var thistype = "";
            $(".shtype").each(function () {
                if($(this).css("color") == "rgb(11, 146, 212)"){
                    thistype = $(this).attr("type");
                }
            })
            formdata = {
                sort:sort,
                title:$("#title").val(),
                resourceclass: $("#resourceclass").val() != 'all' ? $("#resourceclass").val() : "",
                auditstatus:type != ''?type:thistype
            };
            $("#block").load('dataList', formdata, function () {
                var  Page =Number(document.getElementById("curren").value);
                var  Count =Number(document.getElementById("total").value);
                if(Count != 0) {
                    $('#Paginator').jqPaginator({
                        totalCounts: Count,
                        pageSize: 15,
                        currentPage: Page,
                        first: '<li class="first"><a href="javascript:void(0);">首页</a></li>',
                        prev: '<li class="prev"><a href="javascript:void(0);">上一页</a></li>',
                        next: '<li class="next"><a href="javascript:void(0);">下一页</a></li>',
                        last: '<li class="last"><a href="javascript:void(0);">末页</a></li>',
                        page: '<li class="page"><a href="javascript:void(0);">{{page}}</a></li>',
                        onPageChange: function (num) {
                            if(num!=Page){
                                changepage(num);
                            }
                        }
                    });
                }
            });
        }
        $(function(){
            var url ='dataList?page='+1;
            formdata = {
                sort:'pubdate desc'
            };
            $("#block").load(url, formdata, function () { //加载图文列表
                var  Page =Number(document.getElementById("curren").value);
                var  Count =Number(document.getElementById("total").value);
                if(Count != 0) {
                    $('#Paginator').jqPaginator({
                        totalCounts: Count,
                        pageSize: 15,
                        currentPage: Page,
                        first: '<li class="first"><a href="javascript:void(0);">首页</a></li>',
                        prev: '<li class="prev"><a href="javascript:void(0);">上一页</a></li>',
                        next: '<li class="next"><a href="javascript:void(0);">下一页</a></li>',
                        last: '<li class="last"><a href="javascript:void(0);">末页</a></li>',
                        page: '<li class="page"><a href="javascript:void(0);">{{page}}</a></li>',
                        onPageChange: function (num) {
                            if(num!=Page){
                                changepage(num);
                            }
                        }
                    });
                }
            });
        })
        function  changepage(num) {
            var url ='dataList?page='+num;
            $("#block").load(url, formdata, function () { //加载图文列表
                var  Page =Number(document.getElementById("curren").value);
                var  Count =Number(document.getElementById("total").value);
                if(Count != 0) {
                    $('#Paginator').jqPaginator({
                        totalCounts: Count,
                        pageSize: 15,
                        currentPage: Page,
                        first: '<li class="first"><a href="javascript:void(0);">首页</a></li>',
                        prev: '<li class="prev"><a href="javascript:void(0);">上一页</a></li>',
                        next: '<li class="next"><a href="javascript:void(0);">下一页</a></li>',
                        last: '<li class="last"><a href="javascript:void(0);">末页</a></li>',
                        page: '<li class="page"><a href="javascript:void(0);">{{page}}</a></li>',
                        onPageChange: function (num) {
                            if(num!=Page){
                                changepage(num);
                            }
                        }
                    });
                }
            });
        }
        //打开资源信息新增窗口
        function AddZiYuan() {
            var url = "/res/ResManage/ResRegister/ResEdit?resMainInfoId=";
            // winPro.openFullwin(url, "新增资源", "yes");
            openFullWindow(url, "新增资源");
        }
    </script>
</head>
<body>
<div layout:fragment="content">
    <input type="hidden" id="resourceclass" />
    <div class="content-page" style="min-height: 978px !important; margin-top: 8px;background-color: #F6F5F4;margin-left:0px;margin-left:10px">
        <div class="div_left">
            <div class="div_catalog">
            </div>
        </div>
        <div class="div_right">
            <div class="div_search">
                <div class="row" style="float: left;width: 100%;">
                    <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3 col-xl-8 DivHeight" style="height:40px;padding-right: 20px;">
                        <div class="control-group">
                            <div class="controls input-icon">
                                <div style="float: left;width: 70%;">
                                    <input type="text" id="title" name="title" value="" style="height: 36px;" class="form-control col-sm-12" placeholder="请输入关键字" />
                                </div>
                                <div class="col-sm-1" style="cursor: pointer;height: 36px; text-align: center;border-radius: 4px; font-size: 20px; border-left:1px solid rgb(221, 221, 221); float: left;margin-left: 5px; background-color: #0B92D4;">
                                    <i class="fa fa-search" style="color: #fff;" onclick="Search('','','','')"></i>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div style="width:100%;float:left;margin-top: 15px;">
                    <div style="float: left;">
                        <span style="font-weight: bold;color:black;">排序</span><span>&nbsp;&nbsp;|</span>
                        <span class="sort" onclick="sort(this)" type="" id="pubdate" type="desc" style="background-color: #0b92d4;padding:2px 15px;color:#fff;font-weight: bold;">发布时间</span>
                        <span class="sort" onclick="sort(this)" type="" id="applycount">申请量</span>
                        <span class="sort" onclick="sort(this)" type="" id="readcount">浏览量</span>
                    </div>
                    <div style="float: left;margin-left: 50px;">
                        <span style="font-weight: bold;color:black;">审核状态</span><span>&nbsp;&nbsp;|</span>
                        <span class="shtype" onclick="shtype(this)" type="" style="background-color: #0b92d4;padding:2px 15px;color:#fff;font-weight: bold;">全部</span>
                        <span class="shtype" onclick="shtype(this)" type="1">待审核</span>
                        <span class="shtype" onclick="shtype(this)" type="3">审核未通过</span>
                        <span class="shtype" onclick="shtype(this)" type="2">审核已通过</span>
                        <span class="shtype" onclick="shtype(this)" type="0">未提交</span>
                    </div>
                    <div style="float: right;margin-right: 15px;">
                        <span style="font-weight: bold;">资源数量:&nbsp;<span id="countNum" style="color: red;font-size: 16px;"></span>&nbsp;笔</span>
                    </div>
                </div>
                <div style="float: right;margin-top: -68px;margin-right: 13px;">
                    <button type="button" class="btn btn-primary" onclick="AddZiYuan('');">
                        <i class="fa fa-plus"></i>发布
                    </button>
                </div>
            </div>
            <div class="div_main" id="block">
            </div>
            <div id="grid" style="display: none"></div>
        </div>
    </div>
</div>
</body>
</html>