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
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<style>
    .control-label {
        white-space: nowrap;
        width: 200px !important;
    }
 
    .control-right {
        white-space: nowrap;
        width: 200px;
        text-align: left;
        padding-top: 5px;
    }
 
    .tb {
        width: 100%;
    }
 
    .td-left {
        width: 16%;
        white-space: nowrap;
        padding: 10px;
        text-align: center;
    }
 
    .td-right {
        width: 25%;
        white-space: nowrap;
        color: #20b2aa;
        padding: 10px;
        text-align: left;
    }
 
    .td-img {
        width: 18%;
        text-align: center;
        vertical-align: middle;
        max-height: 250px;
    }
 
    table, td {
        border: 1px solid #DEDEDE;
        border-collapse: collapse;
    }
 
    .inner-tb td {
        border-style: hidden;
    }
 
    img {
        border: none;
    }
 
    .badge {
        padding-top: 4px;
        padding-bottom: 4px;
    }
 
    .label-zdy,
    .badge-zdy {
        background-color: #40A8CD;
        background-image: none !important;
        text-shadow: none !important;
    }
 
    div#items3 a {
        text-decoration: none;
        color: #3deeee;
        text-align: center;
        vertical-align: middle;
    }
 
    #items3 .item3 {
        display: block;
        width: 250px !important;
        height: 139px !important;
    }
 
    .clear {
        clear: both;
    }
 
    .effect {
        box-shadow: 0 0 10px #444;
        -moz-box-shadow: 0 0 10px #444;
        -webkit-box-shadow: 0 0 10px #444;
    }
 
    #btnzybj:hover {
        box-shadow: 0px 0px 1px 1px #0094ff;
    }
 
    .hand:hover {
        box-shadow: 0px 0px 1px 1px #0094ff;
    }
 
    .hand {
        margin-right: 5px;
    }
 
    #btnzysq:hover {
        box-shadow: 0px 0px 1px 1px #247720;
    }
</style>
<div class="portlet box ltblue">
    <div class="portlet-title">
        基本信息
        <div class="caption">
            <i class="icon-reorder"></i>
        </div>
        <div class="tools">
            <a class="collapse" onclick="portlet_body_ShowOrHide(this);"></a>
        </div>
    </div>
    <div class="portlet-body">
        <div style="height:20px;background-color:#DDDDDD;padding:3px 15px;display:none;">基本信息</div>
        <table class="tb">
            <tr>
                <td rowspan="4" class="td-img">
                    <div style="max-height:250px;max-width:250px;margin-left:10px;margin-right:10px;">
 
                        <div id="items3" style="overflow:hidden;height:139px!important;width:250px!important;">
                            <a rel="group">
                                <img src="/image/ZiYuan/ywtc.gif" id="ZiYuanTuPian" style="width:250px; height:139px; border:0px;" />
                            </a>
                        </div>
                    </div>
                </td>
                <td class="td-left">资源名称</td>
                <td class="td-right" style="font-weight:bold" colspan="3" th:text="${mainInfo.title}"></td>
            </tr>
            <tr>
                <td class="td-left"> 所属目录</td>
                <td class="td-right" colspan="3" th:text="${mainInfo.catlogcode}"></td>
            </tr>
            <tr>
                <td class="td-left">发布单位</td>
                <td class="td-right" th:text="${unitname}"></td>
                <td class="td-left">数据来源</td>
                <td class="td-right" th:text="${mainInfo.datasources}"></td>
            </tr>
            <tr>
                <td class="td-left">数据生产日期</td>
                <td class="td-right" th:text="${Pubdate}"></td>
                <td class="td-left"> 发布时间</td>
                <td class="td-right" th:text="${Pubdate}"></td>
            </tr>
            <tr>
                <td id="lefttd" rowspan="6" style="vertical-align:top;">
                    <img src="/image/ZiYuan/yish.png" id="CollectBtn" style="margin-left:5px;margin-top:5px; cursor:pointer;" title="点击收藏资源" />
                    <img th:if="${not #lists.isEmpty(actionid)}" onclick="quxiaoshoucang();" src="/image/ZiYuan/yisc.png" style="margin-left:5px;margin-top:5px; cursor:pointer;" title="已收藏" />
                    <img th:if="${#lists.isEmpty(actionid)}" onclick="shoucang();" src="/image/ZiYuan/shoucang.png" style="margin-left:5px;margin-top:5px; cursor:pointer;" title="点击收藏" />
                    <div style="margin-top:10px;">
                        <span style="margin-left:5px;"><img src="/image/ZiYuan/shoucang_icon.gif" style="margin-right:5px;" align="absmiddle" />资源收藏<span style="float:right;margin-right:75px;"><span th:text="${shoucangcount}" style="color:#EF5629;font-size:18px;"></span>&nbsp;次</span></span>
                    </div>
                    <div style="margin-top:10px;">
                        <span style="margin-left:5px;"><img src="/image/ZiYuan/liulan_icon.gif" style="margin-right:5px;" align="absmiddle" />浏览次数<span style="float:right;margin-right:75px;"><span th:text="${liulancount}" style="color:#EF5629;font-size:18px;"></span>&nbsp;次</span></span>
                    </div>
                    <div style="margin-top:10px;">
                        <span style="margin-left:5px;"><img src="/image/ZiYuan/diaoyon.gif" style="margin-right:5px" align="absmiddle" />调用次数<span style="float:right;margin-right:75px;"><span th:text="${diaoyongcount}" style="color:#EF5629;font-size:18px;"></span>&nbsp;次</span></span>
                    </div>
                </td>
                <td class="td-left"> 共享协议</td>
                <td class="td-right" th:text="${mainInfo.sharprotocol}"></td>
                <td class="td-left">安全级别</td>
                <td class="td-right" id="divAnQuanJiBie">
                    <input type="hidden" th:value="${mainInfo.securitylev}" id="securitylev" name="securitylev" />
                </td>
            </tr>
            <tr>
                <td class="td-left">数据覆盖范围</td>
                <td class="td-right" colspan="3" th:text="${mainInfo.administrativeid}"></td>
            </tr>
            <tr>
                <td class="td-left"> 数据关键字</td>
                <td class="td-right" colspan="3" th:text="${mainInfo.keywords}"></td>
                <!--<td class="td-left"> 服务类型</td>-->
                <!--<td class="td-right" th:text="${mainInfo.servertype}"></td>-->
            </tr>
            <tr>
                <td class="td-left"> 资源说明</td>
                <td class="td-right" style="white-space:pre-line !important;" colspan="3" th:text="${mainInfo.remark}"></td>
            </tr>
            <tr>
                <td class="td-left"> 资源评价</td>
                <td class="td-right" colspan="3" style="padding: 0;">
                    <table style="border:none;width:100%;">
                        <thead>
                            <tr style="height: 40px;">
                                <td align="center" style="width:30%;color:black;">评价星级</td>
                                <td align="center" style="width:70%;color:black;">评价内容</td>
                            </tr>
                        </thead>
                        <tbody id="evaluationInfo">
 
                        </tbody>
                    </table>
                </td>
            </tr>
            
        </table>
    </div>
</div>
<div id="div_resExtBaseMap" th:if="${resourceType}=='KJ_JCDT'">
    <div class="portlet box ltblue form-horizontal">
        <div class="portlet-title">
            扩展信息
            <div class="caption">
                <i class="icon-reorder"></i>
            </div>
            <div class="tools">
                <a class="collapse" onclick="portlet_body_ShowOrHide(this);"></a>
            </div>
        </div>
        <div class="portlet-body">
            <table class="tb">
                <tr>
                    <td rowspan="5" class="td-img">
                        <div id="items" style="width:269px;">
                            <div id="items4" style="padding-top:10px;">
                                <a class="item4" title="二维" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-erwei.gif" /></a>
                            </div>
                            <div id="items2" style="width:269px;padding-top:5px;padding-bottom:10px;">
                                <a class="item2" title="" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-sanwei.gif" /></a>
                            </div>
                        </div>
                    </td>
                    <td class="td-left">发布平台</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtBaseMap.publishsoft}"></td>
                </tr>
                <tr>
                    <td class="td-left">底图类型</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtBaseMap.basemaptype}"></td>
                </tr>
                <tr style="display:none;">
                    <td class="td-left">影像精度</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtBaseMap.imageaccuracy}"></td>
                </tr>
                <tr>
                    <td class="td-left">显示比例</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtBaseMap.displaylev}"></td>
                </tr>
                <tr>
                    <td class="td-left">Token</td>
                    <td class="td-right" colspan="3"><span id="tokenContent" th:text="${mainInfo.token}"></span>
                        <input type="button" style="float:right;" name="btnToken" id="btnToken" class="btn ltblue" value="获取" onclick="" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>
<div id="div_resExtBusinessLayer" th:if="${resourceType}=='KJ_YWTC'">
    <div class="portlet box ltblue form-horizontal">
        <div class="portlet-title">
            扩展信息
            <div class="caption">
                <i class="icon-reorder"></i>
            </div>
            <div class="tools">
                <a class="collapse" onclick="portlet_body_ShowOrHide(this);"></a>
            </div>
        </div>
        <div class="portlet-body">
            <table class="tb">
                <tr>
                    <td rowspan="5" class="td-img">
                        <div id="items" style="width:269px;">
                            <div id="items4" style="padding-top:10px;">
                                <a class="item4" title="二维" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-erwei.gif" /></a>
                            </div>
                            <div id="items2" style="width:269px;padding-top:5px;padding-bottom:10px;">
                                <a class="item2" title="" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-sanwei.gif" /></a>
                            </div>
                        </div>
                    </td>
                    <td class="td-left">发布平台</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtBusinessLayer.publishsoft}"></td>
                </tr>
                <!--<tr>-->
                <!--<td class="td-left">权限过滤类型</td>-->
                <!--<td class="td-right" style="width:66%;"  th:text="${resExtBusinessLayer.rightfiltertype}"></td>-->
                <!--</tr>-->
                <tr>
                    <td class="td-left">原图层名称</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtBusinessLayer.layername}"></td>
                </tr>
                <tr>
                    <td class="td-left">加载方式</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtBusinessLayer.dataloadtype}"></td>
                </tr>
                <tr>
                    <td class="td-left">Token</td>
                    <td class="td-right" colspan="3"><span id="tokenContent" th:text="${mainInfo.token}"></span>
                        <input type="button" style="float:right;" name="btnToken" id="btnToken" class="btn ltblue" value="获取" onclick="" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>
<div id="div_resExtSpaceServerWithBLOBs" th:if="${resourceType}=='KJ_KJFX'">
    <div class="portlet box ltblue form-horizontal">
        <div class="portlet-title">
            扩展信息
            <div class="caption">
                <i class="icon-reorder"></i>
            </div>
            <div class="tools">
                <a class="collapse" onclick="portlet_body_ShowOrHide(this);"></a>
            </div>
        </div>
        <div class="portlet-body">
            <table class="tb">
                <tr>
                    <td rowspan="5" class="td-img">
                        <div id="items" style="width:269px;">
                            <div id="items4" style="padding-top:10px;">
                                <a class="item4" title="二维" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-erwei.gif" /></a>
                            </div>
                            <div id="items2" style="width:269px;padding-top:5px;padding-bottom:10px;">
                                <a class="item2" title="" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-sanwei.gif" /></a>
                            </div>
                        </div>
                    </td>
                    <td class="td-left">服务地址</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtSpaceServerWithBLOBs.serverurl}"></td>
                </tr>
                <!--<tr>-->
                <!--<td class="td-left">服务分类</td>-->
                <!--<td class="td-right" style="width:66%;"  th:text="${resExtSpaceServerWithBLOBs.servertype}"></td>-->
                <!--</tr>-->
                <!--<tr>-->
                <!--<td class="td-left">运行模式</td>-->
                <!--<td class="td-right" style="width:66%;"  th:text="${resExtSpaceServerWithBLOBs.runmode}"></td>-->
                <!--</tr>-->
                <tr>
                    <td class="td-left">提交方式</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtSpaceServerWithBLOBs.posttype==0?'HttpGet':'HttpPost'}"></td>
                </tr>
            </table>
        </div>
    </div>
</div>
<div id="div_resExtThemeMap" th:if="${resourceType}=='KJ_ZTDT'">
    <div class="portlet box ltblue form-horizontal">
        <div class="portlet-title">
            扩展信息
            <div class="caption">
                <i class="icon-reorder"></i>
            </div>
            <div class="tools">
                <a class="collapse" onclick="portlet_body_ShowOrHide(this);"></a>
            </div>
        </div>
        <div class="portlet-body">
            <table class="tb">
                <tr>
                    <td rowspan="5" class="td-img">
                        <div id="items" style="width:269px;">
                            <div id="items4" style="padding-top:10px;">
                                <a class="item4" title="二维" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-erwei.gif" /></a>
                            </div>
                            <div id="items2" style="width:269px;padding-top:5px;padding-bottom:10px;">
                                <a class="item2" title="" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-sanwei.gif" /></a>
                            </div>
                        </div>
                    </td>
                    <td class="td-left">发布平台</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtThemeMap.publishsoft}"></td>
                </tr>
                <tr>
                    <td class="td-left">原图层名称</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtThemeMap.layername}"></td>
                </tr>
                <tr>
                    <td class="td-left">资源GUID</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtThemeMap.portalguid}"></td>
                </tr>
                <tr>
                    <td class="td-left">自定义图例</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtThemeMap.legendurl}"></td>
                </tr>
                <tr>
                    <td class="td-left">Token</td>
                    <td class="td-right" colspan="3"><span id="tokenContent" th:text="${mainInfo.token}"></span>
                        <input type="button" style="float:right;" name="btnToken" id="btnToken" class="btn ltblue" value="获取" onclick="" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>
<div id="div_resExtApp" th:if="${resourceType}=='专题应用程序'">
    <div class="portlet box ltblue form-horizontal">
        <div class="portlet-title">
            扩展信息
            <div class="caption">
                <i class="icon-reorder"></i>
            </div>
            <div class="tools">
                <a class="collapse" onclick="portlet_body_ShowOrHide(this);"></a>
            </div>
        </div>
        <div class="portlet-body">
            <table class="tb">
                <tr>
                    <td rowspan="5" class="td-img">
                        <div id="items" style="width:269px;">
                            <div id="items4" style="padding-top:10px;">
                                <a class="item4" title="二维" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-erwei.gif" /></a>
                            </div>
                            <div id="items2" style="width:269px;padding-top:5px;padding-bottom:10px;">
                                <a class="item2" title="" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-sanwei.gif" /></a>
                            </div>
                        </div>
                    </td>
                    <td class="td-left">应用模板名称</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtApp.portalmodeltitle}"></td>
                </tr>
                <tr>
                    <td class="td-left">原资源名称</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtApp.portaltitle}"></td>
                </tr>
                <tr>
                    <td class="td-left">PORTAL资源ID</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtApp.portalguid}"></td>
                </tr>
                <tr>
                    <td class="td-left">应用程序地址</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtApp.appurl}"></td>
                </tr>
                <tr>
                    <td class="td-left">Token</td>
                    <td class="td-right" colspan="3"><span id="tokenContent"></span>
                        <input type="button" style="float:right;" name="btnToken" id="btnToken" class="btn ltblue" value="获取" onclick="" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>
<div id="div_resExtIntegrate" th:if="${resourceType}=='YWJC'">
    <div class="portlet box ltblue form-horizontal">
        <div class="portlet-title">
            扩展信息
            <div class="caption">
                <i class="icon-reorder"></i>
            </div>
            <div class="tools">
                <a class="collapse" onclick="portlet_body_ShowOrHide(this);"></a>
            </div>
        </div>
        <div class="portlet-body">
            <table class="tb">
                <tr>
                    <td rowspan="5" class="td-img">
                        <div id="items" style="width:269px;">
                            <div id="items4" style="padding-top:10px;">
                                <a class="item4" title="二维" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-erwei.gif" /></a>
                            </div>
                            <div id="items2" style="width:269px;padding-top:5px;padding-bottom:10px;">
                                <a class="item2" title="" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-sanwei.gif" /></a>
                            </div>
                        </div>
                    </td>
                    <td class="td-left">服务地址</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtIntegrate.serverurl}"></td>
                </tr>
                <tr>
                    <td class="td-left">集成类型</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtIntegrate.integratetype}"></td>
                </tr>
                <tr>
                    <td class="td-left">关联存业务图层ID</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtIntegrate.reflayerid}"></td>
                </tr>
                <tr>
                    <td class="td-left">业务图层关联字段</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtIntegrate.reflayerfield}"></td>
                </tr>
            </table>
        </div>
    </div>
</div>
<div id="div_resExtFileSource" th:if="${resourceType}=='SJWJ'">
    <div class="portlet box ltblue form-horizontal">
        <div class="portlet-title">
            扩展信息
            <div class="caption">
                <i class="icon-reorder"></i>
            </div>
            <div class="tools">
                <a class="collapse" onclick="portlet_body_ShowOrHide(this);"></a>
            </div>
        </div>
        <div class="portlet-body">
            <table class="tb">
                <tr>
                    <td rowspan="5" class="td-img">
                        <div id="items" style="width:269px;">
                            <div id="items4" style="padding-top:10px;">
                                <a class="item4" title="二维" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-erwei.gif" /></a>
                            </div>
                            <div id="items2" style="width:269px;padding-top:5px;padding-bottom:10px;">
                                <a class="item2" title="" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-sanwei.gif" /></a>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="td-left">文件名称</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtFileSource.filename}"></td>
                </tr>
                <tr>
                    <td class="td-left">文件大小</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtFileSource.filesize}+'KB'"></td>
                </tr>
                <tr>
                    <td class="td-left">文件类型</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtFileSource.filetype}"></td>
                </tr>
            </table>
        </div>
    </div>
</div>
<div id="div_resExtDataBase" th:if="${resourceType}=='SJKB'">
    <div class="portlet box ltblue form-horizontal">
        <div class="portlet-title">
            扩展信息
            <div class="caption">
                <i class="icon-reorder"></i>
            </div>
            <div class="tools">
                <a class="collapse" onclick="portlet_body_ShowOrHide(this);"></a>
            </div>
        </div>
        <div class="portlet-body">
            <table class="tb">
                <tr>
                    <td rowspan="5" class="td-img">
                        <div id="items" style="width:269px;">
                            <div id="items4" style="padding-top:10px;">
                                <a class="item4" title="数据库表" onclick="openNewWin('SJKB')"><img class="hand" src="/image/ZiYuan/shujukubiao.gif" /></a>
                            </div>
                        </div>
                    </td>
                    <td class="td-left">数据源</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtDataSource.databasename}"></td>
                </tr>
                <tr>
                    <td class="td-left">表名称</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtDataBase.tablename}"></td>
                </tr>
                <tr>
                    <td class="td-left">主键</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtDataBase.primarykey}"></td>
                </tr>
            </table>
        </div>
    </div>
</div>
<div id="div_resExtInterFaceService" th:if="${resourceType}=='JKFW'">
    <div class="portlet box ltblue form-horizontal">
        <div class="portlet-title">
            扩展信息
            <div class="caption">
                <i class="icon-reorder"></i>
            </div>
            <div class="tools">
                <a class="collapse" onclick="portlet_body_ShowOrHide(this);"></a>
            </div>
        </div>
        <div class="portlet-body">
            <table class="tb">
                <tr>
                    <td rowspan="5" class="td-img">
                        <div id="items" style="width:269px;">
                            <div id="items4" style="padding-top:10px;">
                                <a class="item4" title="二维" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-erwei.gif" /></a>
                            </div>
                            <div id="items2" style="width:269px;padding-top:5px;padding-bottom:10px;">
                                <a class="item2" title="" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-sanwei.gif" /></a>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td class="td-left">服务分类</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtInterFaceService.servertype}"></td>
                </tr>
                <tr>
                    <td class="td-left">服务地址</td>
                    <td class="td-right" style="width:66%;" th:text="${resExtInterFaceService.serverurl}"></td>
                </tr>
            </table>
        </div>
    </div>
</div>
<div id="div_resExt3D" th:if="${resourceType}=='KJ_SWMX'">
    <div class="portlet box ltblue form-horizontal">
        <div class="portlet-title">
            扩展信息
            <div class="caption">
                <i class="icon-reorder"></i>
            </div>
            <div class="tools">
                <a class="collapse" onclick="portlet_body_ShowOrHide(this);"></a>
            </div>
        </div>
        <div class="portlet-body">
            <table class="tb">
                <tr>
                    <td rowspan="5" class="td-img">
                        <div id="items" style="width:269px;">
                            <div id="items4" style="padding-top:10px;">
                                <a class="item4" title="二维" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-erwei.gif" /></a>
                            </div>
                            <div id="items2" style="width:269px;padding-top:5px;padding-bottom:10px;">
                                <a class="item2" title="" onclick=""><img class="hand" src="/image/ZiYuan/ersanwei-sanwei.gif" /></a>
                            </div>
                        </div>
                    </td>
                    <td class="td-left">服务地址</td>
                    <td class="td-right" style="width:66%;" th:text="${resExt3D.serverurl}"></td>
                </tr>
                <tr>
                    <td class="td-left">服务类型</td>
                    <td class="td-right" style="width:66%;" th:text="${resExt3D.servertype}"></td>
                </tr>
                <tr>
                    <td class="td-left">原图层名称</td>
                    <td class="td-right" style="width:66%;" th:text="${resExt3D.layername}"></td>
                </tr>
                <tr>
                    <td class="td-left">Token</td>
                    <td class="td-right" colspan="3"><span id="tokenContent" th:text="${mainInfo.token}"></span>
                        <input type="button" style="float:right;" name="btnToken" id="btnToken" class="btn ltblue" value="获取" onclick="" />
                    </td>
                </tr>
            </table>
        </div>
    </div>
</div>
<div style="height:50px;"></div>
<div class="form-actions navbar-fixed-bottom" style="z-index: 0; padding:10px 20px 10px;">
    <div style="text-align: center;">
        <img class="hand" src="/image/ZiYuan/btn2.png" id="btnzysq" type="button" onclick="AddZiYuanShenQing()" />
        <!--<img class="hand" src="/image/ZiYuan/btn2.png" th:if="${WuQX=='True'}" id="btnzysq" type="button" onclick="AddZiYuanShenQing()" />-->
        <!--<img class="hand" src="/image/ZiYuan/btn1.png" th:if="${WuQX=='False'}" id="btnzybj" type="button" onclick="shuaxin()" />-->
        <img class="hand" src="/image/ZiYuan/btn1.png" id="btnzybj" type="button" onclick="shuaxin()" />
        <img class="hand" src="/image/ZiYuan/erweichakan.png" id="browseBtn2D" type="button" />
        <img class="hand" src="/image/ZiYuan/sanweichakan.png" id="borwseBtn3D" type="button" onclick="ShuJuKuChaKan()" />
        <img class="hand" src="/image/ZiYuan/ziyuanpingjia.gif" id="resEvaluation" type="button" />
        <div id="updateTips" style="float:right;text-align:right;color:red;display:none;">数据正在后台更新,请稍候</div>
    </div>
</div>
<div id="sysinfo" style="height:400px;width:470px;z-index:999;position:absolute;left:240px;top:300px;display:none;">
</div>
<div id="resEvaluationInfo" style="padding:20px;display:none;">
    <div style="width:100%;">
        <div style="float:left;line-height:24px;width:15%;"><span>评价星级:</span></div>
        <div class="input-icon" id="divPingJiaJiBie" >
              <input style="width:15%;" type="hidden" id="starrating" name="starrating" />
        </div>
    </div>
    <div style="float:left;line-height:24px;width:100%;">
        <label style="float: left; margin-top: 10px;width:15%;">评价内容:</label>
        <div style="float:left;width:85%;">
            <textarea id="content" name="content" class="col-sm-12" style="border: 1px solid #e3e3e3;margin-top: 10px;height: 191px;"></textarea>
        </div>
    </div>
    <div style="margin-top:25px;float:right;">
        <button class="btn btn-primary" id="savePingJia" onclick="addResEvaluation()" type="button">
             <i class="fa fa-check"></i> 保存
         </button>
         <button class="btn btn-warning" id="close" type="button" onclick="colseLayer()">
             <i class="fa fa-remove"></i> 关闭
         </button>
    </div>
</div> 
<script th:inline="javascript">
    //数据库表格查看
    function ShuJuKuChaKan() {
        var resMainInfoId = $("#resMainInfoId").val();
        parent.location.href ="BaseLeftSource?resourceid="+resMainInfoId;
    }
    function shuaxin() {
        var resMainInfoId = $("#resMainInfoId").val();
        // parent.location.href = "AddZiYuanBasic?resMainInfoId=" + resMainInfoId;
        parent.location.href = "/res/ResManage/ResRegister/ResEdit?resMainInfoId=" + resMainInfoId;
    }
    function AddZiYuanShenQing(){
        var resMainInfoId = $("#resMainInfoId").val();
         if([[${WuQZ}]]=="False"){
            alert('您已申请了该资源,请等待管理员批复后再申请');
            return;
        }
        window.open("/res/resApplyRecommend/ziYuanShenQing?resMainInfoId="+resMainInfoId);
    }
    function shoucang() {
        var resMainInfoId = $("#resMainInfoId").val();
        $.ajax({
           url:'/res/resActionRecord/registerActionRecord',
           type: 'post',
           data: {'resourceid': resMainInfoId,'actiontype': '收藏','checked': true},
           success: function (data) {
               var jsonb = eval('(' + data + ')');
                alert(jsonb.msg);
               parent.FTabPages.resetTab();
           },
            error: function (e) {
                alert(e.message);
            }
        });
    }
 
    function quxiaoshoucang() {
        var resMainInfoId = $("#resMainInfoId").val();
        $.ajax({
            url:'/res/resActionRecord/registerActionRecord',
            type: 'post',
            data: {'resourceid': resMainInfoId,'actiontype': '收藏','checked': false},
            success: function (data) {
                var jsonb = eval('(' + data + ')');
                alert(jsonb.msg);
                parent.FTabPages.resetTab();
            },
            error: function (e) {
                alert(e.message);
            }
        });
    }
 
    /*<![CDATA[*/
    //安全级别显示
    //安全级别图片路径
    var star = "/image/ZiYuan/star.png";
    var starOff = "/image/ZiYuan/staroff.png";
 
    function GetAnQuanJiBie() {
        for (var i = 0; i < 5; i++) {
            if (i < parseInt($("#securitylev").val())) {
                $("#divAnQuanJiBie").append($('<img data-on="yes" src="/image/ZiYuan/safety.png" />'));
            } else {
                $("#divAnQuanJiBie").append($('<img data-on="no" src="/image/ZiYuan/safetyoff.png" />'));
            }
        }
    }
    
    function PJJB(starrating){
        var html="";
        for (var i = 0; i < 5; i++) {
            if (i < starrating) {
                html+="<img data-on='yes' src='/image/ZiYuan/star.png' />";
            } else {
                html+="<img data-on='no' src='/image/ZiYuan/staroff.png' />";
            }
        }
        return html;
    }
    
    //初始化评价级别
    function getPingJiaJiBie() {
        for (var i = 0; i < 5; i++) {
            if (i < parseInt($("#starrating").val())) {
                $("#divPingJiaJiBie").append($('<img data-on="yes" src="/image/ZiYuan/star.png" />'));
            } else {
                $("#divPingJiaJiBie").append($('<img data-on="no" src="/image/ZiYuan/staroff.png" />'));
            }
        }
        $('#divPingJiaJiBie img').click(function () {
            $(this).attr({"src": star, "data-on": "yes"})
                .prevAll().each(function (index, obj) {
                $(obj).attr({"src": starOff, "data-on": "yes"});
            });
            $(this).nextAll().attr(({"src": star, "data-on": "no"}));
        }).mousemove(function () {
            $(this).attr("src", star)
                .prevAll().each(function (index, obj) {
                $(obj).attr("src", star);
            });
            $(this).nextAll().each(function (index, obj) {
                $(obj).attr("src", starOff);
            });
        }).mouseout(function () {
            $(this).attr("src", function () {
                if ($(this).attr("data-on") == "no") {
                    return starOff;
                } else {
                    return star;
                }
            }).siblings().each(function (index, obj) {
                $(obj).attr("src", function () {
                    if ($(this).attr("data-on") == "no") {
                        return starOff;
                    } else {
                        return star;
                    }
                });
            });
        });
    }
    /*]]>*/
    //评价窗口
    $('#resEvaluation').on('click', function () {
        layer.open({
            type: 1,
            title: '资源评价',
            shadeClose: false,
            area: ['550px', '365px'],
            content: jQuery("#resEvaluationInfo")
        });
    });
    //保存评价级别
    function addResEvaluation(){
        if( $('#divPingJiaJiBie img[data-on="yes"]').length == 0){
            alert("评价星级不能为空!");
            return false;
        }
        $.ajax({
            url:'/res/manage/evaluation/save',
            type: 'post',
            data: {'resourceid': $("#resMainInfoId").val(),'starrating': $('#divPingJiaJiBie img[data-on="yes"]').length,'content': $("#content").val()},
            success: function (data) {
                var result = eval('(' + data + ')');
                if(result = 1){
                    alert("评价成功!");
                    colseLayer();
                    location = location;
                }
            },
            error: function (e) {
                alert(e.message);
            }
        });
    }
    //关闭评价窗口
    function colseLayer(){
        $(".layui-layer-close1").click();
    }
    //获取评价级别和内容
    /*<![CDATA[*/
    function setPingJiaInfo(){
        $.ajax({
            url:'/res/manage/evaluation/selectByResourceid?resourceid='+$("#resMainInfoId").val(),
            type: 'get',
            success: function (result) {
                var data = eval(result);
                var html ="";
                if(data!= null && data.length!=0){
                    for(var i = 0;i<data.length;i++){
                        html+="<tr style='height:40px;'>"
                        +"<td class='td-right' style='text-align:center;'>" + PJJB(data[i].starrating) + "</td> <td class='td-right'>"
                        + data[i].content
                        +"</td></tr>";
                    }
                }
                $("#evaluationInfo").after(html);
                $("#evaluationInfo").find("td").eq(0).attr("rowspan",data.length+1);
                $("#lefttd").attr("rowspan",parseFloat($("#lefttd").attr("rowspan"))+data.length);
            },
            error: function (e) {
                //alert(e.message);
            }
        });
    }
    /*]]>*/
</script>
 
<script>
    $(function () {
        GetAnQuanJiBie();
        getPingJiaJiBie();
        setPingJiaInfo();
    });
    //打开新窗口
    function openNewWin(type){
        if(type == "SJKB"){
            var resMainInfoId = $("#resMainInfoId").val();
            window.open("BaseLeftSource?resourceid="+resMainInfoId, "_blank","modal=true");
        }
    }
</script>
</html>