index.html 6.5 KB
<div class="panel panel-default panel-intro">
    {:build_heading()}

    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div id="toolbar" class="toolbar">
                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
                        <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('match/match/add')?'':'hide'}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('创建比赛')}</a>
                    </div>
                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                           data-operate-edit="{:$auth->check('match/match/edit')}" 
                           data-operate-del="{:$auth->check('match/match/del')}" 
                           width="100%">
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>


<style type="text/css">
    .row{
        margin: 0;
        padding: 0;
    }
    .wrap{
        width: 100%;
        border:1px solid #edf0f2;
        margin-bottom: 30px;
    }
    .header{
        display: flex;
        flex-direction: column;
        height: 97px;
        background-color: #f6f8fa;
        padding: 10px 30px;
        border-bottom:1px solid #edf0f2;
    }
    .header-left{
        display: flex;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
    .header-left-font{
        font-size: 24px;
        font-weight: bold;
    }

    .m-wrap{
        margin-top: 15px;
        display: flex;
    }
    .m-wrap-text{
        margin-left: 30px;
    }

    .main{
        display: flex;
        flex-direction: column;
        padding: 10px 30px;
        border-bottom:1px solid #d9edf7;
    }
    .main:hover{
        background-color: #edf0f2;
    }
    .level-text{
        display: flex;
        flex-direction: row;
    }
    .match-wrap{
        margin-top: 15px;
        width: 100%;
        justify-content: space-between;
    }
    .rows{
        display: flex;
        flex-direction: row;
    }
    .match-name{
        font-size: 19px;
        cursor: pointer;
    }
    .match-name:hover{
        color: #26c6da;
    }
    .group_num{
        font-size: 24px;
        font-weight: bold;
        color: #fc515e;
    }
</style>

<script id="itemtpl" type="text/html">
        <div class="wrap">
            <div class="header">
                <div class="header-left">
                    <div class="header-left-font"><%=item.match_name%></div>
                    <div class="addMatch" data-id="<%=item.id%>" data-title="<%=item.match_name%>"  style="cursor: pointer">添加比赛</div>
                </div>
                <div class="m-wrap">
                    <div>主办单位:<%=item.organizer%></div>
                    <div class="m-wrap-text">赛事最高级别:国家级</div>
                    <div class="m-wrap-text">赛事分类:本科竞赛</div>
                    <div class="m-wrap-text">承办部门:<%=item.undertake%></div>
                </div>
            </div>
            <% for (var i = 0; i < item.match.length; i++) { %>
            <% var match = item.match[i] %>
                    <div class="main">
                        <div class="level-text">
                            <div>比赛等级:
                                <select name="" class="match_level" data-id="<%=match.id%>">
                                    <option <%=match.match_level==0?'selected':''  %> value="0">校级</option>
                                    <option <%=match.match_level==1?'selected':''  %>  value="1">市级</option>
                                    <option <%=match.match_level==2?'selected':''  %> value="2">省级</option>
                                    <option <%=match.match_level==3?'selected':''  %> value="3">国家级</option>
                                </select>
                            </div>
                            <div class="m-wrap-text">认定等级:
                                <select name="" class="firmly_level" data-id="<%=match.id%>">
                                    <option value="">暂无</option>
                                    <option <%=match.firmly_level==0?'selected':''  %> value="0">校级</option>
                                    <option <%=match.firmly_level==1?'selected':''  %> value="1">市级</option>
                                    <option <%=match.firmly_level==2?'selected':''  %> value="2">省级</option>
                                    <option <%=match.firmly_level==3?'selected':''  %> value="3">国家级</option>
                                </select>
                            </div>
                        </div>
                        <div class="match-wrap rows">
                            <div  data-id="<%=match.id%>" data-title="<%=match.match_title%>" class="match-name tocantainer"><%=match.match_title%></div>
                            <div class="sign-num">报名人数</div>
                        </div>

                        <div class="match-wrap rows">
                            <div><%=match.match_starttime_text%> 至 <%=match.match_endtime_text%></div>
                            <div class="group_num"><%=match.group_count%> 组 |  <%=match.people_count%>  人</div>
                        </div>

                        <div class="match-wrap rows">
                            <div><%=match.match_type_str%></div>
                        </div>

                        <div class="match-wrap rows">
                            <div>  </div>
                            <div>
<!--                                <span style="cursor: pointer" class="glyphicon glyphicon-link">复制</span>-->
                                <span style="cursor: pointer" data-id="<%=match.id%>" class="del glyphicon glyphicon-trash m-wrap-text">删除</span>

                                <span  data-id="<%=match.id%>" data-title="<%=item.match_name%>" style="cursor: pointer" class="glyphicon glyphicon-cog m-wrap-text setMatch">设置</span>

<!--                                <span data-id="<%=match.id%>" data-title="<%=item.match_name%>" style="cursor: pointer" class="glyphicon glyphicon-stats m-wrap-text statistics">统计</span>-->
                            </div>
                        </div>
                    </div>
            <% } %>
        </div>
</script>