main-pt.html 16.8 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
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>朝阳区公共信用信息服务平台</title>
    <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <link href="../static/css/animate.min.css" th:href="@{/css/animate.min.css}" rel="stylesheet"/>
    <link href="../static/css/style.min.css" th:href="@{/css/style.min.css}" rel="stylesheet"/>
    <link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=1.18.3}" rel="stylesheet"/>
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content">

        <input id="monthEndDay" th:value="${monthEndDay}" type="hidden"/>
        <input id="nowDate" th:value="${nowDate}" type="hidden"/>
<!--        五类数据上报提醒-->
        <input id="wlsjIsShow" th:value="${wlsjIsShow}" type="hidden"/>
<!--        双公示上报提醒-->
        <input id="sgsbsIsShow" th:value="${sgsbsIsShow}" type="hidden"/>
        <div class="row">
            <div class="col-sm-4">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>上报提醒</h5>
                    </div>
                    <div class="ibox-content" style="height: 260px">
                        <table class="table table-hover no-margins">
                            <tbody id="message_table">
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>核查提醒</h5>
                    </div>
                    <div class="ibox-content" style="padding: 0 20px; height: 260px">
                        <table id="check_table"><!--class="table table-hover no-margins"-->
                            <!--<tbody >
                            </tbody>-->
                        </table>
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5 th:if="${showNoticeUrl}"><a onclick="openNoticeMenu()">通知公告</a></h5>
                        <h5 th:if="${showNoticeUrl == false}">通知公告</h5>
                    </div>
                    <div class="ibox-content" style="padding: 0 20px; height: 260px">
                        <table id="notice_table"><!--class="table table-hover no-margins"-->
                            <!--<tbody id="notice_table">
                            </tbody>-->
                        </table>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-sm-6" id="sgsChartPie">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>双公示上报量</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="flot-chart">
                            <div class="echarts" id="echarts-pie-half-chart"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-6" id="wlsjCharPie" >
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>五类行政管理信息报送情况</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="flot-chart">
                            <div class="echarts" id="echarts-pie-chart"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
      </div>
    </div>
    <th:block th:include="include :: footer" />
    <!--<script th:src="@{/js/jquery.min.js}"></script>-->
    <script th:src="@{/js/bootstrap.min.js}"></script>
    <script th:src="@{/js/plugins/metisMenu/jquery.metisMenu.js}"></script>
    <script th:src="@{/js/jquery.contextMenu.min.js}"></script>
    <script th:src="@{/ajax/libs/flot/jquery.flot.js}"></script>
    <script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
    <script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
    <script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.7}"></script>
    <script th:src="@{/ruoyi/js/common.js?v=4.7.7}"></script>

    <th:block th:include="include :: sparkline-js" />
    <th:block th:include="include :: echarts-js" />
    <script th:inline="javascript">
        var prefix =  "/business";
        $(function () {

           var monthEndDay= $("#monthEndDay").val();
           var nowDate = $("#nowDate").val();
           // 五类数据 和双公示 是否展示上报提醒
           let wlsjIsShow = $("#wlsjIsShow").val();
           let sgsbsIsShow = $("#sgsbsIsShow").val();
            var messageContainer = $("#message_table");
           if(monthEndDay && monthEndDay == 1){
               //双公示 是否展示
               if (sgsbsIsShow && sgsbsIsShow ==1){
                   var trsgs =$("<tr><td>当日双公示数据需上报</td><td>"+nowDate+"</td></tr>");
                   trsgs.appendTo(messageContainer);
               }
               // 五类数据 是否展示
               if (wlsjIsShow && wlsjIsShow == 1){
                   var trwlsj =$("<tr><td>本月五类行政管理数据需上报</td><td>"+nowDate+"</td></tr>");
                   trwlsj.appendTo(messageContainer);
               }

               var trmonitor =$("<tr><td>本月城市信用检测数据需上报</td><td>"+nowDate+"</td></tr>");
               trmonitor.appendTo(messageContainer);
           } else {
               //双公示 是否展示
               if (sgsbsIsShow && sgsbsIsShow == 1){
                   var trsgs =$("<tr><td>当日双公示数据需上报</td><td>"+nowDate+"</td></tr>");
                   trsgs.appendTo(messageContainer);
               }
               // 五类数据 是否展示
               if (wlsjIsShow && wlsjIsShow == 1){
                   var trwlsj =$("<tr><td>本月五类行政管理数据需上报</td><td>"+nowDate+"</td></tr>");
                   trwlsj.appendTo(messageContainer);
               }

           }

           //将 五类数据 和 双公示的饼状图div,全部隐藏  后面根据权限展示
            $("#wlsjCharPie").hide();
            $("#sgsChartPie").hide();

            // 双公示上报量-饼状图
            if (sgsbsIsShow && sgsbsIsShow == 1){
                //show出双公示饼状图div
                $("#sgsChartPie").show();

                var halfDom = document.getElementById('echarts-pie-half-chart');
                var halfChart = echarts.init(halfDom, null, {
                    renderer: 'canvas',
                    useDirtyRect: false
                });
                halfChart.setOption(publicityData());
                $(window).resize(halfChart.resize);
            }

            // 五类数据管理-饼状图
            if (wlsjIsShow && wlsjIsShow == 1){
                //show出 五类数据饼状图的div
                $("#wlsjCharPie").show();

                var pieChart = echarts.init(document.getElementById("echarts-pie-chart"));
                pieChart.setOption(administrationData());
                $(window).resize(pieChart.resize);
            }

            /*$.ajax({
                cache : true,
                type : "GET",
                url : "/business/home/notice/latest",
                async : true,
                error : function(request) {
                },
                success : function(data) {
                    if (data.code == 0) {
                        var dataList = data.data;
                        var noticeContainer = $("#notice_table");
                        var checkContainer = $("#check_table");
                        var len = dataList.length;
                        if(len == 0){
                            var ntr =$("<tr><td colspan='3'><font color='#cd0a0a'>暂无通知公告</font></td></tr>");
                            ntr.appendTo(noticeContainer);

                            var ctr =$("<tr><td colspan='3'><font color='#cd0a0a'>暂无核查提醒</font></td></tr>");
                            ctr.appendTo(checkContainer);
                        } else {
                            var nnum = 0;
                            var cnum = 0;

                            for(var i=0;i<len;i++) {
                                var noticeData = dataList[i];
                                var title = noticeData.noticeTitle;
                                if (title.length > 17) {
                                    title = title.substring(0, 15) + '...';
                                }
                                var operate = noticeData.operateType;
                                var readColor = 'blue';
                                if (operate != 0) {
                                    readColor = 'grey';
                                }
                                var dataType = noticeData.dataType;
                                if (dataType == 3) {
                                    var ctr=$("<tr style='color: "+readColor+"'><td><a title='"+noticeData.noticeTitle+"' onclick='confirmNotice("+noticeData.noticeId+")'>"+title+"</a></td>" +
                                        "<td>"+noticeData.noticeType+"</td><td>"+noticeData.noticeTime+"</td>/tr>");
                                    ctr.appendTo(checkContainer);
                                    cnum += 1;
                                } else {
                                    nnum += 1;
                                    var ntr=$("<tr style='color: "+readColor+"'><td><a title='"+noticeData.noticeTitle+"' onclick='openNotice("+noticeData.noticeId+")'>"+title+"</a></td>" +
                                        "<td>"+noticeData.noticeType+"</td><td>"+noticeData.noticeTime+"</td>/tr>");
                                    console.log(noticeData.noticeType);
                                    ntr.appendTo(noticeContainer);
                                }
                            }

                            if (nnum == 0) {
                                var ntr =$("<tr><td colspan='3'><font color='#cd0a0a'>暂无通知公告</font></td></tr>");
                                ntr.appendTo(noticeContainer);
                            }
                            if (cnum == 0) {
                                var ctr =$("<tr><td colspan='3'><font color='#cd0a0a'>暂无核查提醒</font></td></tr>");
                                ctr.appendTo(checkContainer);
                            }
                        }
                    }
                }
            });*/

            var options = {
                id: "notice_table",
                url: prefix + "/home/notice/noticeList",
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                showHeader: false,
                paginationParts: ["pageList"],
                pageSize: 5,
                modalName: "公告",
                columns: [
                {
                    field : 'noticeTitle',
                    title : '公告标题',
                    formatter: function(value, row, index) {
                        var actions = [];
                        var readColor = 'blue';
                        if (row.operateType !== 0) {
                            readColor = 'grey';
                        }
                        actions.push('<a style="color: '+readColor+'" href="javascript:void(0)" onclick="openNotice(\'' + row.noticeId + '\')">'+row.noticeTitle+'</a> ');
                        return actions.join('');
                    }
                },
                {
                    field: 'noticeType',
                    title: '公告类型',
                    align: 'center',
                }]
            };
            $.table.init(options);

            var options2 = {
                id: "check_table",
                url: prefix + "/home/notice/checkList",
                showSearch: false,
                showRefresh: false,
                showToggle: false,
                showColumns: false,
                showHeader: false,
                paginationParts: ["pageList"],
                pageSize: 5,
                modalName: "公告",
                columns: [
                {
                    field : 'noticeTitle',
                    title : '公告标题',
                    formatter: function(value, row, index) {
                        var actions = [];
                        var readColor = 'blue';
                        if (row.operateType !== 0) {
                            readColor = 'grey';
                        }
                        actions.push('<a style="color: '+readColor+'" href="javascript:void(0)" onclick="confirmNotice(\'' + row.noticeId + '\')">'+row.noticeTitle+'</a> ');
                        return actions.join('');
                    }
                },
                {
                    field: 'noticeType',
                    title: '公告类型',
                    align: 'center',
                }]
            };
            $.table.init(options2);

	     });

        function publicityData() {
            var title = "双公示上报量";
            var dataList = [];
            $.ajax({
                cache : true,
                type : "GET",
                url : "/business/home/publicity/data",
                async : false,
                error : function(request) {
                },
                success : function(data) {
                    if (data.code == 0) {
                        var result = data.data;
                        title = result.title;
                        dataList = result.dataList;
                    }
                }
            });

            var option = {
                tooltip: {
                    trigger: 'item'
                },
                legend: {
                    top: '5%',
                    left: 'center'
                },
                series: [
                    {
                        name: title,
                        type: 'pie',
                        radius: ['40%', '70%'],
                        center: ['50%', '70%'],
                        // adjust the start and end angle
                        startAngle: 180,
                        endAngle: 360,
                        data: dataList
                    }
                ]
            };

            return option;
        }

        function administrationData() {
            var titleList = [];
            var dataList = []
            $.ajax({
                cache : true,
                type : "GET",
                url : "/business/home/administration/data",
                async : false,
                error : function(request) {
                },
                success : function(data) {
                    if (data.code == 0) {
                        var result = data.data;
                        titleList = result.titleList;
                        dataList = result.dataList;
                    }
                }
            });
            var pieoption = {
                title : {
                    text: '五类行政管理信息报送情况',
                    // subtext: '五类数据',
                    x:'right'
                },
                tooltip : {
                    trigger: 'item',
                    formatter: "{a} <br/>{b} : {c} ({d}%)"
                },
                legend: {
                    orient : 'vertical',
                    x : 'left',
                    data:titleList
                },
                calculable : true,
                series : [
                    {
                        name:'行政类型',
                        type:'pie',
                        radius : '55%',
                        center: ['50%', '60%'],
                        data:dataList
                    }
                ]
            };
            return pieoption;
        }

        function openNotice(noticeId) {
            $.modal.openTab('通知详情',  "/business/credit/notice/confirm/detail/" + noticeId);
        }

        function confirmNotice(noticeId) {
            $.get("/business/home/notice/confirm/" + noticeId, function (result) {
              $.modal.openTab('核查详情',  "/business/credit/notice/confirm/detail/" + noticeId);
            });
        }

        function openNoticeMenu() {
            $.modal.openTab('通知公告',  "/business/credit/notice");
        }
    </script>
</body>
</html>