Commit 4e584ac9 by guanzhenshan

增加站点显示

parent e7d4cad9
...@@ -11,23 +11,32 @@ ...@@ -11,23 +11,32 @@
<form id="toolbar"> <form id="toolbar">
<div class="form-inline" style="line-height:40px;"> <div class="form-inline" style="line-height:40px;">
<div class="form-group"> <div class="form-group">
<label>站点</label> @*<label>站点</label>
<select id="website" name="website" class="form-control" style="width:130px;"> <select id="website" name="website" class="form-control" style="width:130px;">
<option value="">请选择站点</option> <option value="">请选择站点</option>
@foreach (var item in ViewBag.sites) @foreach (var item in ViewBag.sites)
{ {
<option value="@item">@item</option> <option value="@item">@item</option>
<button class="btn btn-info" type="button" aria-pressed="false"></button>
} }
</select> </select>*@
站点:
<div data-toggle="buttons-checkbox" class="btn-group">
@foreach (var item in ViewBag.sites)
{
//<option value="@item">@item</option>
<button class="btn btn-info wsites" type="button" aria-pressed="false" onclick="selWebsite('@item',this)">@item</button>
}
</div>
</div> </div>
<div class="form-group"> <div class="form-group" style="margin-left:10px">
<label>月份</label> <label>月份</label>
<input id="month" name="month" class="form-control" style="width:100px" value="@(DateTime.Now.AddMonths(-1).ToString("yyyy-MM"))" /> <input id="month" name="month" class="form-control" style="width:100px" value="@(DateTime.Now.AddMonths(-1).ToString("yyyy-MM"))" />
</div> </div>
<div class="form-group"> <div class="form-group">
<label>&nbsp;</label> <label>&nbsp;</label>
<button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i>&nbsp;查询</button> <button type="button" class="btn btn-primary" onclick="list();"><i class="fa fa-search"></i>&nbsp;查询</button>
<button id="btnexport" style="display:;" type="button" class="btn btn-success" onclick="ExportCSV()">导出</button> <button id="btnexport" style="" type="button" class="btn btn-success" onclick="ExportCSV()">导出</button>
</div> </div>
</div> </div>
</form> </form>
...@@ -36,7 +45,7 @@ ...@@ -36,7 +45,7 @@
<div class="ibox-content m-b-sm border-bottom table-responsive"> <div class="ibox-content m-b-sm border-bottom table-responsive">
<table id="roletable" class="table table-hover table-bordered table-striped" style="table-layout:fixed;"> <table id="roletable" class="table table-hover table-bordered table-striped" style="table-layout:fixed;">
<thead id="tb_head"> <thead id="tb_head">
</thead> </thead>
<tbody id="tb"> <tbody id="tb">
</tbody> </tbody>
...@@ -159,6 +168,7 @@ ...@@ -159,6 +168,7 @@
<script type="text/javascript"> <script type="text/javascript">
var tb; var tb;
var current_page = 1; var current_page = 1;
var website = '';
$(document).ready(function () { $(document).ready(function () {
//list(); //list();
...@@ -167,7 +177,7 @@ ...@@ -167,7 +177,7 @@
}) })
function list() { function list() {
var website = $('#website').val(); //var website = $('#website').val();
var month = $('#month').val(); var month = $('#month').val();
if (website == '') { if (website == '') {
...@@ -203,7 +213,6 @@ ...@@ -203,7 +213,6 @@
$('#tb_head').html(_head); $('#tb_head').html(_head);
//内容 //内容
for (var i in result.rows) { for (var i in result.rows) {
var _obj = result.rows[i].jsondata; var _obj = result.rows[i].jsondata;
...@@ -229,6 +238,17 @@ ...@@ -229,6 +238,17 @@
}) })
} }
function selWebsite(site,data) {
website = site;
$('.wsites').each(function () {
$(this).attr('aria-pressed', 'false');
$(this).removeClass('active');
})
$(data).prop('aria-pressed', 'true');
}
function InitPage(totalpage) { function InitPage(totalpage) {
$('#page-contain').html('<span id="pageresult"></span><div id="pagination" class="pagination" style="margin-left:5px;"></div>'); $('#page-contain').html('<span id="pageresult"></span><div id="pagination" class="pagination" style="margin-left:5px;"></div>');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment