<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>风控指标查询</title>
    <link rel="stylesheet" href="../../lib/element-ui/css/index.css">
    <script src="../../lib/jquery-1.11.3.min.js"></script>
    <script src="../../lib/vue/vue.min.js"></script>
    <script src="../../lib/element-ui/js/index.js"></script>

    <script src="../../_common/lts_result.js"></script>
    <script src="../../_common/service_fcfg.js"></script>
    <script src="../../_common/fy_client.js"></script>
    <script src="../../_common/service.js"></script>
    <script src="../../_common/service_exports.js"></script>

    <style type="text/css">
        [v-cloak] {
            display: none;
        }
    </style>
</head>

<body>
    <div id="app" v-cloak>
        <link rel="stylesheet" href="./concentration_default.css" v-if="ifBlack">
        <link rel="stylesheet" href="./concentration_white.css" v-else>
        <!--四条线-->
        <div class="tip-line">
            <p class="top-title">我公司维持担保比例执行如下标准</p>
            <div class="risk-table">
                <el-table ref="" :data="riskRatio" height="150" border>
                    <div slot="empty">
                        <div v-if="nullData">
                            <div>
                                <img src="./images/loading000.gif" alt="" v-if="loadingColor">
                                <img src="./images/loadingfff.gif" alt="" v-else>
                            </div>
                        </div>
                        <div v-else>
                            暂无数据
                        </div>
                    </div>
                    <el-table-column prop="item" label="项目">
                    </el-table-column>
                    <el-table-column prop="ratio" label="维持担保比例">
                    </el-table-column>
                </el-table>
            </div>
        </div>
        <div class="tranText">
            *平仓线： 当投资者日终清算后信用账户维持担保比例低于平仓线时，本公司可在下一交易日对其进行强制平仓。以上是触发强制平仓的情形之一。本公司可以根据有关情况在证券交易所公布的范围内调整平仓线，该业务参数以公司公告为准。
        </div>
        <!--信用账户持仓集中度查询-->
        <div class="query-box">
            <!-- 股票集中度 -->
            <div v-if="stkArr">
                <h4 class="title">股票集中度指标</h4>
                <div class="concentration-table one-table">
                    <p class="search-input">
                        <el-input class="ctrl-input" v-model="input" placeholder="请输入股票代码" onkeypress="return(/[\d]/.test(String.fromCharCode(event.keyCode)))"
                            @keyup.native="provingCode" maxlength=6></el-input>
                        <el-button class="search" @click="clickSearch">搜索</el-button>
                    </p>
                    <el-table ref="" :data="queryArrStk" height="200" border>
                        <div slot="empty">
                            <div v-if="nullStkData">
                                <div>
                                    <img src="./images/loading000.gif" alt="" v-if="loadingColor">
                                    <img src="./images/loadingfff.gif" alt="" v-else>
                                </div>
                            </div>
                            <div v-else>
                                <!-- 暂无该股票集中度指标 -->
                                {{stkErrorInfo}}
                            </div>
                        </div>
                        <el-table-column prop="security_id" label="股票代码">
                        </el-table-column>
                        <el-table-column prop="keep_rate_begin" label="起始维保比例(>=)">
                            <template slot-scope="scope">
                                {{scope.row.keep_rate_begin | numberFilter}}
                            </template>
                        </el-table-column>
                        <el-table-column prop="keep_rate_end" label="结束维保比例(<)">
                            <template slot-scope="scope">
                                {{scope.row.keep_rate_end | numberFilter}}
                            </template>
                        </el-table-column>
                        <el-table-column prop="debt_begin" label="起始总负债(>=)">
                            <template slot-scope="scope">
                                {{Math.round(parseFloat(scope.row.debt_begin)) | debtvalueFilter}}
                            </template>
                        </el-table-column>
                        <el-table-column prop="debt_end" label="终止总负债(<)">
                            <template slot-scope="scope">
                                {{Math.round(parseFloat(scope.row.debt_end)) | debtvalueFilter}}
                            </template>
                        </el-table-column>
                        <el-table-column prop="ctrl_rate" label="集中度控制比例">
                            <template slot-scope="scope">
                                {{scope.row.ctrl_rate | numberFilter}}
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
                <div class="pagination">
                    <el-button type="primary" :disabled="ifHome" @click="homepage">首页</el-button>
                    <el-button type="primary" :disabled="ifNext" @click="nextpage">下一页</el-button>
                    <el-select class="select-pagesize" v-model="pageSize" placeholder="" @change="choosedPageSize">
                        <el-option v-for="item in pagesizeList" :key="item.value" :label="item.num" :value="item.value">
                        </el-option>
                    </el-select>
                </div>
            </div>
            <!-- 板块集中度 -->
            <div v-if="queryArrPlate.length != 0">
                <h4 class="title">板块集中度指标</h4>
                <div class="two-table">
                    <div class="concentration-table">
                        <el-table ref="" :data="queryArrPlate" height="200" border>
                            <div slot="empty">
                                <div v-if="nullPlateData">
                                    <div>
                                        <img src="./images/loading000.gif" alt="" v-if="loadingColor">
                                        <img src="./images/loadingfff.gif" alt="" v-else>
                                    </div>
                                </div>
                                <div v-else>
                                    暂无数据
                                </div>
                            </div>
                            <el-table-column prop="plate_symbol" label="板块">
                            </el-table-column>
                            <el-table-column prop="keep_rate_begin" label="起始维保比例(>=)">
                                <template slot-scope="scope">
                                    {{scope.row.keep_rate_begin | numberFilter}}
                                </template>
                            </el-table-column>
                            <el-table-column prop="keep_rate_end" label="结束维保比例(<)">
                                <template slot-scope="scope">
                                    {{scope.row.keep_rate_end | numberFilter}}
                                </template>
                            </el-table-column>
                            <el-table-column prop="debt_begin" label="起始总负债(>=)">
                                <template slot-scope="scope">
                                    {{Math.round(parseFloat(scope.row.debt_begin)) | debtvalueFilter}}
                                </template>
                            </el-table-column>
                            <el-table-column prop="debt_end" label="终止总负债(<)">
                                <template slot-scope="scope">
                                    {{Math.round(parseFloat(scope.row.debt_end)) | debtvalueFilter}}
                                </template>
                            </el-table-column>
                            <el-table-column prop="ctrl_rate" label="集中度控制比例">
                                <template slot-scope="scope">
                                    {{scope.row.ctrl_rate | numberFilter}}
                                </template>
                            </el-table-column>
                        </el-table>
                    </div>
                </div>
            </div>

            <!-- 总体集中度 -->
            <div class="totalDiv" v-if="queryArrTotal.length != 0">
                <h4 class="title">总体集中度指标</h4>
                <div class="concentration-table one-table">
                    <el-table ref="" :data="queryArrTotal" height="200" border>
                        <div slot="empty">
                            <div v-if="nullTotalData">
                                <div>
                                    <img src="./images/loading000.gif" alt="" v-if="loadingColor">
                                    <img src="./images/loadingfff.gif" alt="" v-else>
                                </div>
                            </div>
                            <div v-else>
                                暂无数据
                            </div>
                        </div>
                        <el-table-column prop="credit_kind" label="信用类型">
                            <template slot-scope="scope">
                                <span v-show="scope.row.credit_kind == '1'">维持担保控制</span>
                                <span v-show="scope.row.credit_kind == '2'">资产规模控制</span>
                            </template>
                        </el-table-column>
                        <el-table-column prop="credit_name" label="信用名称">
                        </el-table-column>
                        <el-table-column prop="beginvalue" label="起始值">
                            <template slot-scope="scope">
                                {{scope.row.beginvalue | numberFilter}}
                            </template>
                        </el-table-column>
                        <el-table-column prop="endvalue" label="结束值">
                            <template slot-scope="scope">
                                {{scope.row.endvalue | numberFilter}}
                            </template>
                        </el-table-column>
                        <el-table-column prop="ctrl_rate" label="控制比例">
                            <template slot-scope="scope">
                                {{scope.row.ctrl_rate | numberFilter}}
                            </template>
                        </el-table-column>
                    </el-table>
                </div>
            </div>
        </div>

        <div class="toast" v-if="stkcodeTip">
            <img class="tipimg" src="./images/toast.png" alt="">
            <span class="tiptxt">请输入6位股票代码</span>
        </div>
    </div>

    <script src="./concentration.js"></script>
</body>

</html>