live.html 45 KB
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
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head th:replace="../templates/common/head::head">
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <!--     <link rel="stylesheet"  -->
    <!--     href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"  -->
    <!--     integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"  -->
    <!--     crossorigin="anonymous"> -->
</head>

<body class="hold-transition skin-blue sidebar-mini">

<div class="wrapper">
    <div th:replace="../templates/common/frame::frame"></div>
    <div class="content-wrapper" style="min-height: 788px;">
        <section class="content-header">
            <h1>直播审核</h1>
            <ol class="breadcrumb">
                <li><a href="/"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li class="active"><a href="/live/page?activity_status=1">直播审核</a></li>
            </ol>
        </section>
        <section class="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="box box-info">
                        <div class="box-body">
                            <div class="clearfix">
                                <div class="btn-group margin-bottom" id="hide_select_area_2">
                                    <div class="cb-toolbar">
                                        <input type="checkbox" id="select_all">全选
                                    </div>
                                    <div class="btn-group margin-bottom pull-left" style=>
                                        <input type="hidden" name="state" id="state" value=""/>

                                        <button type="button"
                                                class="btn btn-success btn-sm margin-r-5 action claim"
                                                value="2" data="claim" id="claim" data-toggle="modal"
                                                data-target="#modal" onclick="receive(0);">认领
                                        </button>
                                        <button type="button"
                                                class="btn btn-success btn-sm margin-r-5 action claim"
                                                value="2" data="claim10" id="claim10" data-toggle="modal"
                                                data-target="#modal" onclick="receive(10);">认领10条
                                        </button>
                                        <button type="button"
                                                class="btn btn-success btn-sm margin-r-5 action claim"
                                                value="2" data="claim100" id="claim100"
                                                data-toggle="modal" data-target="#modal" onclick="receive(100);">认领100条
                                        </button>
                                    </div>
                                </div>

                                <div class="btn-group margin-bottom pull-right">
                                    <button type="button" class="btn  btn-success btn-sm margin-r-5 filter "
                                            th:onclick="'javascript:daochu()'" value="" id="excel">导出excel
                                    </button>
                                    <button type="button" class="btn btn-sm margin-r-5 filter >"
                                            value="0" th:onclick="'javascript:quanbu()'" id="quanbu">查询
                                    </button>
                                    <button type="button"
                                            class="btn  btn-sm margin-r-5 filter " id="daishen" value="0">全部待领
                                    </button>
                                    <button type="button"
                                            class="btn  btn-sm margin-r-5 filter " id="Mydaishen" value="0">我的待审
                                    </button>
                                    <button type="button"
                                            class="btn  btn-sm margin-r-5 filter " id="yishen" value="1">我的已审
                                    </button>
                                    <button type="button"
                                            class="btn btn-primary btn-sm margin-r-5" id="query"
                                            onclick="openOrClose(&#39;forms&#39;)">
                                        <span id="a_up">展开▼</span><span id="a_down">收起▲</span>
                                    </button>
                                </div>

                            </div>

                            <div class="clearfix">
                                <div class="form-horizontal form-group-sm" id="forms"
                                     style="display: none;">
                                    <div class="btn-group margin-bottom col-md-7"
                                         style="padding: 0;">
                                        <div class="col-md-3" style="padding: 0">
                                            <label for="activity_name" class="control-label cb-toolbar">直播名称:</label>
                                            <div class="col-sm-7" style="padding: 0;">
                                                <input class="form-control col-sm-2" name="activity_name"
                                                       type="text" id="activity_name" th:value="${Activity_name}">
                                            </div>
                                        </div>
                                        <div class="col-md-3" style="padding: 0">
                                            <label for="activity_id" class="control-label cb-toolbar">直播id:</label>
                                            <div class="col-sm-7" style="padding: 0;">
                                                <input class="form-control" name="activity_id" type="text"
                                                       id="activity_id" th:value="${Activity_id}">
                                            </div>
                                        </div>

                                        <div class="col-md-3" style="padding: 0" th:if="${session.sessionUser.spid==0}">
                                            <label for="contentId" class="control-label cb-toolbar">内容id:</label>
                                            <div class="col-sm-7" style="padding: 0;">
                                                <input class="form-control" name="contentId" type="text"
                                                       id="contentId" th:value="${ContentId}">
                                            </div>
                                        </div>

                                        <!-- 											<div class="col-md-3" style="padding: 0"> -->
                                        <!-- 												<label for="is_hot" class="control-label cb-toolbar">是否热点:</label> -->
                                        <!-- 												<div class="col-sm-6" style="padding: 0;"> -->
                                        <!-- 													<select class="form-control" id="is_hot" name="is_hot"><option -->
                                        <!-- 															value="0">全部</option> -->
                                        <!-- 														<option value="2">是</option> -->
                                        <!-- 														<option value="1">否</option></select> -->
                                        <!-- 												</div> -->
                                        <!-- 											</div> -->

                                        <div class="col-md-6" style="padding: 0;width: 25%;"
                                             th:if="${session.sessionUser.spid==0}">
                                            <label for="sp_desc" class="control-label cb-toolbar">sp简称:</label>
                                            <div class="col-sm-8" style="padding: 0;">
                                                <input class="form-control" type="text" th:value="${Sp_desc}" value="" id="sp_desc">
                                            </div>
                                        </div>
                                        <div class="col-md-3" style="padding: 0">
                                            <label for="activity_status"
                                                   class="control-label cb-toolbar">直播状态:</label>
                                            <div class="col-sm-7" style="padding: 0;">
                                                <select class="form-control col-sm-2" id="activity_status"
                                                        name="activity_status">
                                                    <option value="">全部</option>
                                                    <option value="3" th:selected="${ActivityStatus==3}">等待直播</option>
                                                    <option value="1" th:selected="${ActivityStatus==1}">正在直播</option>
                                                    <option value="2" th:selected="${ActivityStatus==2}">直播结束</option>
                                                    <option value="0" th:selected="${ActivityStatus==0}">直播撤销</option>
                                                    <option value="4" th:selected="${ActivityStatus==4}">直播下线</option>
                                                </select>
                                            </div>
                                        </div>

                                    </div>

                                    <div class="btn-group margin-bottom col-md-5 pull-right"
                                         style="padding: 0">
                                        <div class="col-md-11" style="width: 88%; padding: 0;">
                                            <div class="col-md-5" style="padding: 0">
                                                <label for="start_date" class="control-label cb-toolbar">时间:</label>
                                                <div class='input-group col-md-9 date'>
                                                    <input class="form-control date" name="start_date"
                                                           type="text" id="start_date" th:value="${Start_date}"> <span
                                                        class="input-group-addon"> <span
                                                        class="glyphicon glyphicon-calendar"></span>
														</span>
                                                </div>
                                            </div>
                                            <div class="col-md-5" style="padding: 0">
                                                <label for="start_date" class="control-label cb-toolbar"></label>
                                                <div class='input-group col-md-9 date'>
                                                    <input class="form-control date" name="end_date"
                                                           type="text" id="end_date" th:value="${End_date}"> <span class="input-group-addon">
															<span class="glyphicon glyphicon-calendar"></span>
														</span>
                                                </div>
                                            </div>
                                        </div>

                                        <!-- 											<div class="col-md-1 text-center" -->
                                        <!-- 												style="width: 12%; padding: 0"> -->
                                        <!-- 												<button type="button" class="btn btn-primary btn-sm" -->
                                        <!-- 													id="live_query" onclick="query()">查 询</button> -->
                                        <!-- 											</div> -->

                                    </div>

                                    <div class="btn-group margin-bottom col-md-6"
                                         style="padding: 0;"></div>
                                </div>
                            </div>

                            <div class="modal fade common" id="modal_remove" tabindex="-1"
                                 role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                <div class="modal-dialog">
                                    <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="modal_title"></h4>
                                        </div>
                                        <div class="modal-body">
                                            <div class="alert alert-danger" id="window_msg"
                                                 style="display: none;">
                                                <p></p>
                                            </div>
                                            <div id="contents"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="fixed-table-container" style="padding-bottom: 0px;">
                                <div class="fixed-table-body">
                                    <table id="table">
                                        <div>
                                            <div class="col-xs-3 col-lg-3 margin-bottom action"
                                                 th:each="live : ${livePage.list}">
                                                <!-- 											<a href="#" class="thumbnail margin-bottom" -->
                                                <!-- 												th:onclick="@{'preview(\''+${live.rtmp_url}+'\')'}"> -->
                                                <!-- 												<div style="text-align: center"> -->
                                                <!-- 													<img th:src='@{${live.cover_img_url}}' -->
                                                <!-- 														alt="封面图" width="134px" height="100px"> -->
                                                <!-- 												</div> -->

                                                <!-- 											</a> -->
                                                <div class="form-group" th:if="${live.activity_status != 1 }">
                                                    <div style="height: 22vmin">
                                                        <img th:src='@{${live.cover_img_url}}'
                                                             th:onclick="'detail('+${live.id}+')'"
                                                             alt="封面图" width="100%" height="100%">
                                                    </div>

                                                </div>
                                                <div class="form-group" th:if="${live.activity_status== 1 }">
                                                    <div style="height: 22vmin">
                                                        <embed name="cnlive" width="100%" height="100%" id="cnlive"
                                                               src="http://data.cnlive.com/export/UuidPlayerMain.swf"
                                                               th:flashVars="@{'hasBorder=false&appid=82_irej0pbo53&type=live&model=2&videoURL='+${live.rtmp_url}}"
                                                               type="application/x-shockwave-flash" wmode="window"
                                                               quility="high" allowscriptaccess="always"
                                                               allowfullscreen="true">
                                                    </div>

                                                </div>
                                                <div>
                                                    <p style="line-height: 0">
                                                        <span class="text-success"
                                                              th:text="${live.shenhe_state==2?'已审':'待审'}">待审</span>
                                                        <span class="text-primary pull-right"
                                                              th:text="${#dates.format(live.pre_start_time, 'yyyy-MM-dd HH:mm:ss')}">2019-06-26 14:56:33</span>
                                                    </p>
                                                    <p class="info-box-text">
                                                        <input type="checkbox" class="check" th:value="${live.id}"
                                                               name="btSelectItem">
                                                        <span th:text="${live.activity_name}">国新办举行新时代人民满意公务员代表中外记者见面会</span>
                                                    </p>
                                                    <p class="info-box-text">
                                                        <span style="float: left;">id:<span
                                                                th:text="${live.id}">10225</span></span>
                                                        <span style="float: right;"> <span style="margin-left: 40px;">&nbsp;&nbsp;
														<span th:if="${live.activity_status==0}" style="color:green;">直播撤销</span>
														<span th:if="${live.activity_status==1}" style="color:blue;">正在直播</span>
														<span th:if="${live.activity_status==2}" style="color:black;">直播完成</span>
														<span th:if="${live.activity_status==3}" style="color:brown;">等待直播</span>
														<span th:if="${live.activity_status==4}"
                                                              style="color:red;">直播下线</span>
													</span><span></span>
													</span>
                                                    </p>
                                                    <p class="info-box-text">
													<span style="float: left;"> <span>SP简称:</span>
													</span> <span style="float: right;"> <span
                                                            th:text="${live.spid_desc}">国新客户端</span>
													</span>
                                                    </p>

                                                </div>
                                                <div class="width-10p pull-left padding-r-5"
                                                     th:if="${live.shenhe_state==0}">
                                                    <button class="btn btn-primary btn-xs btn-block" title="认领"
                                                            th:onclick="'applyReceive('+${live.id}+')'"
                                                            data-field="action"
                                                            data-formatter="actionFormatter" data-events="actionEvents"
                                                            data-toggle="tooltip" data-placement="top" value="2"
                                                            th:id="'claim_'+${live.id}">
                                                        <i class="fa fa-hand-pointer-o"></i>
                                                    </button>
                                                </div>

                                                <div class="width-10p pull-left padding-r-5">
                                                    <button class="btn btn-success btn-xs btn-block "
                                                            title="查看"
                                                            th:onclick="'detail('+${live.id}+')'"
                                                            data-toggle="tooltip" data-placement="top"
                                                    >
                                                        <i class="fa fa-eye"></i>
                                                    </button>
                                                </div>
                                                <div class="width-10p pull-left padding-r-5"
                                                     th:if="${live.activity_status!=4 and live.activity_status!=2 and live.shenhe_state==1  and session.sessionUser.userId==live.auditor}">
                                                    <button class="btn btn-danger btn-xs btn-block"
                                                            title="退领" th:onclick="'applyRetReceive('+${live.id}+')'"
                                                            data-toggle="tooltip" data-placement="top">
                                                        <i class="fa fa-mail-reply"></i>
                                                    </button>
                                                </div>


                                                <div class="width-10p pull-right padding-r-5">
                                                    <button class="btn btn-danger btn-xs btn-block" title="下线直播"
                                                            th:onclick="'offline_live('+${live.id}+')'"
                                                            data-toggle="tooltip"
                                                            data-placement="top"
                                                            data-target="#modal">
                                                        <i class="fa fa-arrow-down"></i>
                                                    </button>
                                                </div>
                                                <div class="width-10p pull-right padding-r-5">
                                                    <button class="btn btn-primary btn-xs btn-block" title="同步直播云"
                                                            th:onclick="'sync_live('+${live.id}+')'"
                                                            data-toggle="tooltip" data-placement="top">
                                                        <i class="fa fa-bullseye"></i>
                                                    </button>
                                                </div>

                                                <!-- 											<div class="width-10p pull-right padding-r-5"> -->
                                                <!-- 												<button class="btn btn-danger btn-xs btn-block" title="下线主播" -->
                                                <!-- 													th:onclick="'offline_anchor('+${live.id}+')'" data-toggle="tooltip" -->
                                                <!-- 													data-placement="top"> -->
                                                <!-- 													<i class="glyphicon glyphicon-user"></i> -->
                                                <!-- 												</button> -->
                                                <!-- 											</div> -->
                                            </div>

                                        </div>
                                    </table>
                                </div>


                                <!--分页处理-->
                                <div class="fixed-table-pagination" style="display: block;">
                                    <div class="pull-left pagination-detail">
                                        <span class="pagination-info" th:text="'共 '+${livePage.total}+' 条记录,每页显示'">共 0 条记录</span>
                                        <select class="" id="pageSize" name="pageSize" onchange="selectPageSize()">
                                            <option value="20" th:selected="${pageSize==20}">20</option>
                                            <option value="40" th:selected="${pageSize==40}">40</option>
                                            <option value="60" th:selected="${pageSize==60}">60</option>
                                            <option value="80" th:selected="${pageSize==80}">80</option>
                                        </select>
                                        <span class="pagination-info">条记录</span>
                                    </div>
                                    <div class="pull-right pagination">
                                        <ul class="pagination" th:if="${livePage.pages>1}">
                                            <li class="page-pre"><a th:href="'javascript:fanye(1);'">‹‹</a></li>
                                            <li class="page-pre" th:if="${!livePage.isFirstPage}"><a
                                                    th:onclick="'javascript:fanye(\''+${livePage.pageNum-1}+'\');'"></a>
                                            </li>

                                            <li class="page-number" th:if="${livePage.pageNum-3>=1}"><a
                                                    th:onclick="'javascript:fanye(\''+${livePage.pageNum-3}+'\');'"
                                                    th:text="${livePage.pageNum-3}">2</a></li>
                                            <li class="page-number" th:if="${livePage.pageNum-2>=1}"><a
                                                    th:onclick="'javascript:fanye(\''+${livePage.pageNum-2}+'\');'"
                                                    th:text="${livePage.pageNum-2}">2</a></li>
                                            <li class="page-number" th:if="${livePage.pageNum-1>=1}"><a
                                                    th:onclick="'javascript:fanye(\''+${livePage.pageNum-1}+'\');'"
                                                    th:text="${livePage.pageNum-1}">2</a></li>
                                            <li class="page-number active"><a href="javaScript:void(0);"
                                                                              th:text="${livePage.pageNum}">2</a></li>
                                            <li class="page-number" th:if="${livePage.pageNum+1<=livePage.pages}"><a
                                                    th:onclick="'javascript:fanye(\''+${livePage.pageNum+1}+'\');'"
                                                    th:text="${livePage.pageNum+1}">2</a></li>
                                            <li class="page-number" th:if="${livePage.pageNum+2<=livePage.pages}"><a
                                                    th:onclick="'javascript:fanye(\''+${livePage.pageNum+2}+'\');'"
                                                    th:text="${livePage.pageNum+2}">2</a></li>
                                            <li class="page-number" th:if="${livePage.pageNum+3<=livePage.pages}"><a
                                                    th:onclick="'javascript:fanye(\''+${livePage.pageNum+3}+'\');'"
                                                    th:text="${livePage.pageNum+3}">2</a></li>

                                            <li class="page-next" th:if="${!livePage.isLastPage}"><a
                                                    th:onclick="'javascript:fanye(\''+${livePage.pageNum+1}+'\');'"></a>
                                            </li>
                                            <li class="page-next"><a
                                                    th:onclick="'javascript:fanye(\''+${livePage.pages}+'\');'">››</a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <!-- /.content -->
        <!-- 			<div class="box-footer"> -->
        <!-- 				<div class="pull-right"></div> -->
        <!-- 			</div> -->
    </div>
    <!-- /.content-wrapper -->

    <!-- 预览对话框 -->
    <div class="modal fade" id="preview" role="dialog" aria-hidden="true">
        <div class="modal-dialog" style="width: 670px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"
                            aria-hidden="true">&times;
                    </button>
                    <h5 class="modal-title" id="myModalLabel">视频预览</h5>
                </div>
                <div class="modal-body">
                    <embed name="cnlive" width="640" height="450" id="cnlive" volume="0"
                           src="http://data.cnlive.com/export/UuidPlayerMain.swf"
                           flashVars="" type="application/x-shockwave-flash" wmode="window"
                           quility="high" allowscriptaccess="always" allowfullscreen="true">
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal -->
    </div>

    <!-- 确认直播下线,直播下线 -->
    <div class="modal" id="action_note" role="dialog"
         aria-labelledby="myModalLabel">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title">温馨提示</h4>
                </div>
                <div class="modal-body" id="msg2"></div>

                <div class="modal-footer">
                    <button type="button" class="btn btn-default "
                            data-dismiss="modal" id="action_note_no">取消
                    </button>
                    <button type="button" class="btn btn-primary" id="action_note_yes">确认</button>
                    <input type="hidden" name="action_note_type" id="action_note_type"
                           value=""/> <input type="hidden" name="action_note_id"
                                             id="action_note_id" value=""/>
                </div>
            </div>
        </div>
    </div>
    <!-- 模态框(Modal) -->
    <div class="modal fade" id="msgModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog">
            <div class="modal-content" style="margin-top: 30%;">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title" id="myModalLabel">审核意见</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group" style="margin-bottom: 0;">
                        <textarea id="reviewMsg" style="width: 100%;height: 80px;"></textarea>
                    </div>
                    <div class="form-group">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" onclick="javascript:repulseSubmit();">提交</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div>
    <!-- /.modal -->


    <script th:inline="javascript">
        //      获取路径参数
        function GetQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]);
            return null;
        }

        var activity_id = "";//直播id
        var activity_name = "";//直播名称
        var is_hot = "";//是否热点
        var activity_status = "";//直播状态
        var start_date = "";//开始时间
        var end_date = "";//结束时间
        var sp_desc = "";
        var count = "";
        var shenhe_state = "";//审核状态
        var contentId = "";//审核状态

        function query() {
            activity_id = $("#activity_id").val();
            activity_name = $("#activity_name").val();
            activity_status = $("#activity_status").val();
            start_date = $("#start_date").val();
            end_date = $("#end_date").val();
            count = $("#pageSize").val();
            var spId = [[${session.sessionUser.spid}]];
            if (spId == 0) {
                sp_desc = $("#sp_desc").val();
                contentId = $("#contentId").val();
            }
            var expand_list_state = $("#forms").attr("expand_list_state");
            window.location.href = "/live/page?activity_status=" + activity_status + "&activity_id=" + activity_id + "&start_date=" + start_date + "&end_date=" + end_date + "&activity_name=" + activity_name + "&sp_desc=" + sp_desc + "&page=" + 1  + "&pageSize=" + count + "&shenhe_state=" + shenhe_state + "&contentId=" + contentId + "&expand_list_state=" + expand_list_state;
        }

        //全部
        function quanbu() {
            query();
        }

        //全部待领
        $('#daishen').click(function () {
            shenhe_state = 0;
            query();
        });
        //我的待审核
        $('#Mydaishen').click(function () {
            shenhe_state = 1;
            query();
        });
        //我的已审核
        $('#yishen').click(function () {
            shenhe_state = 2;
            query();
        });


        /*全选的操作*/
        $('#select_all').click(function () {
            if ($("[name=btSelectItem]:checkbox:not(:checked)").length > 0) {
                $("#select_all").prop('checked', true);
                $("[name=btSelectItem]:checkbox").each(function () {
                    $(this).prop('checked', true);
                });
            } else {
                $("#select_all").prop('checked', false);
                $("[name=btSelectItem]:checkbox").each(function () {
                    $(this).prop('checked', false);
                });
            }
        });

        /**
         * 认领
         */
        function receive(n) {
            if (n > 0) {
                applyReceiveNum(n);
            } else {
                var rows = $("[name=btSelectItem]:checkbox:checked");
                if (rows.length > 0) {
                    var ids = "";
                    rows.each(function (i, e) {
                        ids = ids + "," + e.value;
                    })
                    ids = ids.substring(1);
                    applyReceive(ids);
                } else {
                    alert("请选择要认领的内容!");
                }
            }
        }

        //认领选中请求
        function applyReceive(ids) {
            $.post("/live/receive?ids=" + ids, function (data) {
                if (data.errorCode == 0) {
                    alert(data.errorMessage);
                    location.href = location.href;
                } else {
                    alert(data.errorMessage);
                }
            })
        }

        //认领多条请求
        function applyReceiveNum(num) {
            $.post("/live/receive?num=" + num, function (data) {
                if (data.errorCode == 0) {
                    alert(data.errorMessage);
                    location.href = location.href;
                } else {
                    alert(data.errorMessage);
                }
            })
        }

        //退领选中内容
        function retReceive() {
            var rows = $("[name=btSelectItem]:checkbox:checked");
            if (rows.length > 0) {
                var r = confirm("您确定退领选中的" + rows.length + "条内容吗?");
                if (r == true) {
                    var ids = "";
                    rows.each(function (i, e) {
                        ids = ids + "," + e.value;
                    })
                    ids = ids.substring(1);
                    applyRetReceive(ids);
                }
            } else {
                alert("没有选中的数据!");
            }
        }

        //退领
        function applyRetReceive(ids) {
            $.post("/live/retReceive?ids=" + ids, function (data) {
                if (data.errorCode == 0) {
                    alert(data.errorMessage);
                    location.href = location.href;
                } else {
                    alert(data.errorMessage);
                }
            })
        }

        //导出excel
        function daochu() {
            var param = location.search;
            window.location.href = "/live/excel" + param;
        }

        //详情页
        function detail(ids) {
            location.href = "/live/details?id=" + ids;
        }

        /*下线主播*/
        function offline_anchor(id) {
            $('#msg2').html('您确认下线该主播吗?');
            $('#action_note').show();
            $("#action_note_type").val('offline_anchor');
            $("#action_note_id").val(id);
        }

        /*下线直播*/
        function offline_live(id) {

            $('#msg2').html('您确认下线该直播吗?');
            $('#action_note').show();
            $("#action_note_type").val('offline_live');
            $("#action_note_id").val(id);
            $('#modal_remove').attr('claim', 'claim');
        }

        /*同步直播云信息*/
        function sync_live(id) {
            var r = confirm("您确定要同步直播云的最新数据吗?");
            if (r == true) {
                $.post("/live/syncLive?ids=" + id, function (data) {
                    if (data.errorCode == 0) {
                        alert(data.errorMessage);
                        location.href = location.href;
                    } else {
                        alert(data.errorMessage);
                    }
                })
            }
        }

        $("#action_note_no").click(function () {
            $("#action_note").hide();
        });

        $("#action_note_yes").click(function () {
            $("#action_note").hide();
            $('#msgModal').modal('show');
        })

        //提交打回
        function repulseSubmit() {
            var action_note_type = $("#action_note_type").val();
            var ids = $("#action_note_id").val();
            var msg = $("#reviewMsg").val();
            if (msg.trim() == '') { //消息为空 不行
                alert('请输入审核意见!');
                return false;
            }
            if (action_note_type == 'offline_live') {
                $.post("/live/repulse?ids=" + ids + "&msg=" + msg + "&status=" + 6, function (data) {
                    if (data.errorCode == 0) {
                        alert(data.errorMessage);
                        location.href = location.href;
                    } else {
                        alert(data.errorMessage);
                    }
                })
            } else if (action_note_type == 'offline_anchor') {
                $.post("/anchor/repulse?ids=" + ids + "&msg=" + msg, function (data) {
                    if (data.errorCode == 0) {
                        alert(data.errorMessage);
                        location.href = location.href;
                    } else {
                        alert(data.errorMessage);
                    }
                })
            } else if (action_note_type = 'reject') {

            }
        }


        /*时间插件*/
        $('.date').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: "zh-CN",
            toolbarPlacement: 'bottom',
            showClear: true,
        });


        $('#a_down').hide();

        /*查询样式*/
        function openOrClose(id_name_str) {
            var id_name = '#' + id_name_str;
            if ($(id_name).css('display') == 'block') {
                $(id_name).slideUp(350);
                $('#a_up').show();
                $('#a_down').hide();
                $("#forms").attr("expand_list_state", "1");
            } else {
                $(id_name).slideDown(350);
                $('#a_up').hide();
                $('#a_down').show();
                $("#forms").attr("expand_list_state", "2");
            }
        }

        //  状态==2是展开状态 触发展开
        $(function () {
            if (GetQueryString("expand_list_state") == "2") {
                $("#query").click();
            }
            //按钮颜色设置
            var shenhe_state = [[${param.shenhe_state}]] ? [[${param.shenhe_state}]][0] : null;
            var stateIsNull = $.trim(shenhe_state) == "";
            if (stateIsNull) {
                $("#quanbu").addClass("btn-info");
            } else if (shenhe_state == '0') {
                $("#daishen").addClass("btn-warning");
            } else if (shenhe_state == '1') {
                $("#Mydaishen").addClass("btn-success");
            } else if (shenhe_state == '2') {
                $("#yishen").addClass("btn-danger");
            }

        })

        //翻页函数
        function fanye(page) {
            var param = location.search;
            if (param.indexOf("page=") != -1) {
                var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
                var split = se.split("&");
                var h = "";
                for (var i = 0; i < split.length; i++) {
                    var s = split[i];
                    if (s.indexOf("page=") < 0) h = h + "&" + split[i];
                }
                h = h.substring(1, h.length);
                window.location.href = "/live/page?" + h + "&page=" + page;
            } else {
                param = param.substring(1, param.length);
                window.location.href = "/live/page?" + param + "&page=" + page;
            }
        }

        //选择每页数量触发函数
        function selectPageSize() {
            var pageSize = $("#pageSize").val();
            var param = location.search;
            if (param.indexOf("pageSize=") != -1) {
                var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
                var split = se.split("&");
                var h = "";
                for (var i = 0; i < split.length; i++) {
                    var s = split[i];
                    if (s.indexOf("pageSize=") < 0 && s.indexOf("page=") < 0) h = h + "&" + split[i];
                }
                h = h.substring(1, h.length);
                window.location.href = "/live/page?" + h + "&page=" + 1  + "&pageSize=" + pageSize;
            } else {
                var se = param.replace("?", "");//去掉问号,防止问号和要去掉的参数相连
                var split = se.split("&");
                var h = "";
                for (var i = 0; i < split.length; i++) {
                    var s = split[i];
                    if (s.indexOf("page=") < 0) h = h + "&" + split[i];
                }
                h = h.substring(1, h.length);
                window.location.href = "/live/page?" + h + "&page=" + 1  + "&pageSize=" + pageSize;
            }
        }


        //弹窗播放操作 ---预览,审核,查看,退领
        function preview(url) {
            $('#cnlive').attr('flashVars',
                "hasBorder=false&appid=82_irej0pbo53&type=live&model=2&videoURL="
                + url);
            $('#preview').modal('show');
            $('.close').click(function () {
                $('.preview').attr('display', 'none');
            })
        }

    </script>
    <script>
        $(function () {
            $("[data-toggle='tooltip']").tooltip();
        });
    </script>


    <footer th:replace="../templates/common/foot::foot"></footer>


    <!-- Control Sidebar -->
    <aside class="control-sidebar control-sidebar-dark">
        <!-- Create the tabs -->
        <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
            <li><a href="#control-sidebar-home-tab" data-toggle="tab"><i
                    class="fa fa-home"></i></a></li>
            <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i
                    class="fa fa-gears"></i></a></li>
        </ul>
        <!-- Tab panes -->
        <div class="tab-content">
            <!-- Home tab content -->
            <div class="tab-pane" id="control-sidebar-home-tab"></div>
            <!-- /.tab-pane -->
        </div>
    </aside>
    <!-- /.control-sidebar -->
    <!-- Add the sidebar's background. This div must be placed
 immediately after the control sidebar -->
    <div class="control-sidebar-bg"></div>

</div>
<!-- ./wrapper -->
</body>


<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script type="text/javascript">
    $('div.alert').not('.alert-danger').delay(3000).slideUp(300);
</script>

<!-- AdminLTE App -->
<script src="./../../static/js/app.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="./../../static/js/sidebar.js"></script>

</html>