Newer
Older
stockTray / EastLineServer / src / main / resources / templates / zhuli.html
bello on 30 Oct 2020 11 KB 新增code详情
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">

    <title>主力资金通知</title>
    <link href="css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css?v=4.3.0" rel="stylesheet">
    <link href="css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=2.2.0" rel="stylesheet">

</head>

<body>
<div id="wrapper">
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="sidebar-collapse">


        </div>
    </nav>

    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header">
                    <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i>
                    </a>

                </div>

            </nav>
        </div>
        <div class="row wrapper border-bottom white-bg page-heading">
            <div class="col-lg-10">
                <h2>主力资金</h2>
                <ol class="breadcrumb">
                    <li>
                        <a href="index.html">主页</a>
                    </li>
                    <li>
                        <a>主力资金</a>
                    </li>

                </ol>
            </div>
            <div class="col-lg-2">

            </div>
        </div>
        <div class="wrapper wrapper-content animated fadeInRight">

            <div class="row">
                <div class="col-lg-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>今日列表</h5>
                            <div class="ibox-tools">
                                <a class="collapse-link">
                                    <i class="fa fa-chevron-up"></i>
                                </a>

                            </div>
                        </div>
                        <div class="ibox-content" >

                            <table class="table table-bordered">
                                <thead>
                                <tr>
                                    <th>#</th>
                                    <th>代码</th>
                                    <th>名称</th>
                                    <th>主力</th>
                                    <th>振幅</th>
                                    <th>时间</th>
                                </tr>
                                </thead>
                                <tbody id="notify_list">

                                </tbody>
                            </table>

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

            </div>

            <div class="row">
                <div class="col-lg-6">
                    <div class="ibox-content" >

                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th>代码</th>
                                <th>时间</th>
                                <th>涨幅</th>
                                <th>主力量</th>
                                <th>主力</th>
                                <th>超大</th>
                                <th>大</th>
                                <th>中</th>
                                <th>小</th>
                            </tr>
                            </thead>
                            <tbody id="zijin_list">

                            </tbody>
                        </table>

                    </div>
                </div>

                <div class="col-lg-6">
                    <div class="ibox-content" >

                        <table class="table table-bordered">
                            <thead>
                            <tr>
                                <th>代码</th>
                                <th>时间</th>
                                <th>价格</th>
                                <th>涨幅</th>
                                <th>成交</th>
                                <th>振幅</th>
                                <th>换手</th>
                                <th>最低</th>
                                <th>最高</th>
                            </tr>
                            </thead>
                            <tbody id="time_line_list">

                            </tbody>
                        </table>

                    </div>
                </div>

            </div>

        </div>


    </div>
</div>

<div class="modal fade" id="loadingModal" backdrop="static" keyboard="false">
      
    <div style="width: 200px;height:100px; z-index: 20000; position: absolute; text-align: center; left: 50%; top: 50%;margin-left:-100px;margin-top:-10px">
            
        <div class="progress progress-striped active"
             style="margin-bottom: 0;height:50px; text-align:center;line-height: 50px;font-size:small;">
            数据加载中,请稍候......    
        </div>
          
    </div>
</div>

</div>

<!-- Mainly scripts -->
<script src="js/jquery-2.1.1.min.js"></script>
<script src="js/bootstrap.min.js?v=3.4.0"></script>
<script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

<!-- Peity -->
<script src="js/plugins/peity/jquery.peity.min.js"></script>

<!-- Custom and plugin javascript -->
<script src="js/hplus.js?v=2.2.0"></script>
<script src="js/plugins/pace/pace.min.js"></script>

<!-- iCheck -->
<script src="js/plugins/iCheck/icheck.min.js"></script>

<!-- Peity -->
<script src="js/demo/peity-demo.js"></script>
<!-- layer javascript -->
<script src="js/plugins/layer/layer.min.js"></script>

<script>

    $(".sidebar-collapse").load("model/left_menu.html")

    $(document).ready(function () {

        refreshList();

    });


    /**
     *  请求主力通知列表
     */
    function refreshList() {

        $.ajax({
            type: "post",
            url: "/queryZhuLiNoticeList",
            dataType: "json",
            success: function (data) {
                console.log(data)
                if (data.code == 1) {
                    refreshNotifyListHtml(data.data);
                } else {
                    alert(data.msg);
                }
            },
            error: function (e) {
                console.log(e);
            },
            beforeSend: function () {
                layer.load()
            },
            complete: function () {
                layer.closeAll()
            }
        });

    }

    /**
     * 刷新列表的html
     * @param data
     */
    function refreshNotifyListHtml(data) {
        var tableHtml = "";
        for (var i = 0; i < data.length; i++) {
            console.log(data[i]);
            tableHtml += "<tr>";
            tableHtml += "<td>";
            tableHtml += (i + 1);
            tableHtml += "</td>";
            tableHtml += "<td><a onclick=\"javascript:openDetail('" + data[i].code + "')\" >";
            tableHtml += data[i].code;
            tableHtml += "</a></td>";
            tableHtml += "<td><a target='_blank' href='code.html?code="+data[i].code+"'>";
            tableHtml += data[i].name;
            tableHtml += "</a></td>";
            tableHtml += "<td class='text-warning'>";
            tableHtml += data[i].zhuli;
            tableHtml += "</td>";
            if (data[i].zhangfu > 0) {
                tableHtml += "<td class='text-danger'>";
            } else {
                tableHtml += "<td class='text-info'>";
            }
            tableHtml += data[i].zhangfu;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += data[i].shijian;
            tableHtml += "</td>";
            tableHtml += "</tr>";
        }

        $("#notify_list").html(tableHtml);

    }


    /**
     * 今日个股价格和资金流
     * @param code
     */
    function openDetail(code) {
        $.ajax({
            type: "post",
            url: "/queryTodayZhuLiDetail",
            dataType: "json",
            data: {"code": code},
            success: function (data) {
                console.log(data)
                if (data.code == 1) {
                    refreshCodeDetail(data.data);
                } else {
                    alert(data.msg);
                }
            },
            error: function (e) {
                console.log(e);
            },
            beforeSend: function () {
                layer.load()
            },
            complete: function () {
                layer.closeAll()
            }
        });
    }


    /**
     * 个股详情
     * @param data
     */
    function refreshCodeDetail(data) {
        var tableHtml = "";
        for (var i = 0; i < data['ziJin'].length; i++) {
            var zijin = data['ziJin'][i]
            tableHtml += "<tr>";
            tableHtml += "<td>";
            tableHtml += zijin.code;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += zijin.shijian;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += zijin.zhangfu;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += zijin.zhuli;
            tableHtml += "</td>";
            if (zijin.zhu > 10){
                tableHtml += "<td class='text-danger'>";
            } else {
                tableHtml += "<td class='text-info'>";
            }
            tableHtml += zijin.zhu;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += zijin.chao;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += zijin.da;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += zijin.zhong;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += zijin.xiao;
            tableHtml += "</td>";
            tableHtml += "</tr>";
        }

        $("#zijin_list").html(tableHtml);


        var tableHtml = "";
        for (var i = 0; i < data['timeLine'].length; i++) {
            var timeLine = data['timeLine'][i]
            tableHtml += "<tr>";
            tableHtml += "<td>";
            tableHtml += timeLine.code;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += timeLine.shijian;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += timeLine.zuixinjia;
            tableHtml += "</td>";
            if (timeLine.percent>0){
                tableHtml += "<td class='text-danger'>";
            } else {
                tableHtml += "<td class='text-info'>";
            }

            tableHtml += timeLine.percent;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += timeLine.chengjiaoer;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += timeLine.zhenfu;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += timeLine.huanshoulv;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += timeLine.zuidi;
            tableHtml += "</td>";
            tableHtml += "<td>";
            tableHtml += timeLine.zuigao;
            tableHtml += "</td>";
            tableHtml += "</tr>";
        }

        $("#time_line_list").html(tableHtml);

    }


</script>


</body>

</html>