This commit is contained in:
shilixia 2019-10-18 17:18:01 +08:00
parent cf6aedda8f
commit 3da5b1851e
1 changed files with 118 additions and 109 deletions

View File

@ -6,11 +6,14 @@
month = now.getMonth() + 1;
for (var i = 0; i < 5; i++) {
$('#year').append('<option value="' + (year - i) + '">' + (year - i) + '</option>');
$('#years').append('<option value="' + (year - i) + '">' + (year - i) + '</option>');
}
$.get('api/tool?a=servertime', function (res) {
$('#year').combobox().combobox('setValue', res.year);
$('#years').combobox().combobox('setValue', res.year);
$('#month').combobox().combobox('setValue', res.month);
behaviorDate();
gczxt();
})
});
@ -151,8 +154,11 @@
function funTypeChange() {
behaviorDate();//饼图
}
var y = now.getFullYear();
function funTypeChange2() {
gczxt();
}
function gczxt() {//行为观察折线图
var y = $("#years").val();
//行为观察折线图
$.ajax({
type: "get",
@ -163,7 +169,7 @@
//请求成功时执行该函数内容data即为服务器返回的json对象
var gcChart2 = echarts.init(document.getElementById("piecontainer2"));
gcChart2.hideLoading();
gcChart2.setOption(option = {
title: {
text: '行为观察折线图'
@ -244,13 +250,16 @@
gcChart2.hideLoading();
}
});
}
</script>
<div class="border" id="desktop" style="margin: 10px 10px 0 10px; background: #fff; overflow: auto;">
<!--行为观察统计-->
<select class="txtInput select3" id="years" name="years" style="width:100px;"></select><label></label>
<button class="btn btn-info" onclick="funTypeChange2()">&nbsp;查询</button>
<div id="piecontainer2" style="width:100%;height:400px;">
</div>
@ -278,12 +287,12 @@
</div>
</div>
<div style="width: 60%; margin: 0px auto;float:right;margin-bottom:100px; ">
<table name="" id="fxrpmtable" class='easyui-datagrid' title="行为观察排名" data-options="rownumbers:true,singleSelect:true,striped: true,method:'get',url: 'api/obscount?a=gclxbg',toolbar:'#fxrpmbar'" style="height:400px">
<table name="" id="fxrpmtable" class='easyui-datagrid' title="行为观察记录排名" data-options="rownumbers:true,singleSelect:true,striped: true,method:'get',url: 'api/obscount?a=gclxbg',toolbar:'#fxrpmbar'" style="height:400px">
<thead>
<tr>
<th data-options="field:'looker__userid',hidden:true">用户ID</th>
<th data-options="field:'looker__name',align:'right'" width="30%">观察人姓名</th>
<th data-options="field:'looker__name',align:'right'" width="30%">观察记录人姓名</th>
<th data-options="field:'lookpart__partname',align:'right'" width="35%">观察部门</th>
<th data-options="field:'number',align:'right'" width="35%">行为观察数</th>
</tr>