Index.html 4.42 KB
<%include '../../../common/views/__ui/header'%>
<%include '../../../common/views/__partail/ListHeader'%>

<div class="contentpanel">
    <div class="panel panel-default" style="margin-bottom:10px;">
        <div class="panel-body" style="padding-bottom: 0">
            <a class="btn btn-success " id="add-resource"><i class="fa fa-plus"></i> 添加资源位</a>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="panel-col">
                    <input type="text" id="inputResourceId" placeholder="请输入ID" class="form-control" />
                </div>
                <div class="panel-col">
                    <input type="text" id="inputResourceName" placeholder="请输入资源名" class="form-control" />
                </div>
                <div class="panel-col">
                    <input type="text" id="inputResourceCode" placeholder="请输入位置码" class="form-control" />
                </div>
                <div class="panel-col" id="category-content">

                </div>
                <div class="panel-col" id="platform-content">
                </div>
                <div class="panel-col">
                    <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
                    <a id="filter-all" href="/resource/index/index" class="btn btn-info">全部</a>
                </div>
            </div>
        </div>
    </div>
    <div class="panel" style="margin-bottom: 10px">
        <input type="hidden" id="url" value="/runManage/subjectManage/subjectList"/>
        <div class="panel-body nopadding">
            <div id="content-list"></div>
        </div>
    </div>
</div>

<script type="text/template" id="search-category">
    <select id="choose-category" title="" class="select2-offscreen brandBtn-group">
        <option value="">选择分类</option>
        [[each data as item index]]
        <option value="[[item.sortId]]">[[item.sortName]]</option>
        [[/each]]
    </select>
</script>

<script type="text/template" id="search-platform">
    <select id="choose-platform" title="" class="select2-offscreen brandBtn-group">
        <option value="">选择平台</option>
        [[each data as item index]]
        <option value="[[item.platformId]]">[[item.platformName]]</option>
        [[/each]]
    </select>
</script>

<script type="text/template" id="edit-template">
    <div class="modal-body" id="base-form">
        <div class="form-group">
            <label class="col-sm-2 control-label">名称</label>
            <div class="col-sm-8">
                <input type="text" id="name" name="name" value="[[name]]" class="form-control" required>
            </div>
        </div><!-- form-group -->
        <div class="form-group">
            <label class="col-sm-2 control-label">分类</label>
            <div class="col-sm-8">
                <select id="sortId" name="sortId" style="width: 160px;" value="[[sortId]]" required>
                    <option value="">请选择资源分类</option>
                    [[each resSorts as item index]]
                    <option value="[[item.sortId]]">[[item.sortName]]</option>
                    [[/each]]
                </select>
            </div>
        </div><!-- form-group -->

        <div class="form-group">
            <label class="col-sm-2 control-label">平台</label>
            <div class="col-sm-8">
                <select id="platformId" name="platformId" style="width: 160px;" value="[[platformId]]" required>
                    <option value="">请选择资源平台</option>
                    [[each resPlatforms as item index]]
                    <option value="[[item.platformId]]">[[item.platformName]]</option>
                    [[/each]]
                </select>
            </div>
        </div><!-- form-group -->

        <div class="form-group" hidden id="code-content">
            <label class="col-sm-2 control-label">位置码</label>
            <div class="col-sm-8">
                <input type="text" disabled="disabled" value="[[code]]" class="form-control">
            </div>
        </div><!-- form-group -->

        <div class="form-group">
            <label class="col-sm-2 control-label">匹配码</label>
            <div class="col-sm-8">
                <input type="text" id="matchCode" value="[[matchCode]]" class="form-control">
            </div>
        </div><!-- form-group -->

        <input type="hidden" id="id" value="[[id]]">
    </div>
</script>