nianxian
This commit is contained in:
parent
cf6aedda8f
commit
3da5b1851e
|
@ -6,11 +6,14 @@
|
||||||
month = now.getMonth() + 1;
|
month = now.getMonth() + 1;
|
||||||
for (var i = 0; i < 5; i++) {
|
for (var i = 0; i < 5; i++) {
|
||||||
$('#year').append('<option value="' + (year - i) + '">' + (year - i) + '</option>');
|
$('#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) {
|
$.get('api/tool?a=servertime', function (res) {
|
||||||
$('#year').combobox().combobox('setValue', res.year);
|
$('#year').combobox().combobox('setValue', res.year);
|
||||||
|
$('#years').combobox().combobox('setValue', res.year);
|
||||||
$('#month').combobox().combobox('setValue', res.month);
|
$('#month').combobox().combobox('setValue', res.month);
|
||||||
behaviorDate();
|
behaviorDate();
|
||||||
|
gczxt();
|
||||||
})
|
})
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -151,8 +154,11 @@
|
||||||
function funTypeChange() {
|
function funTypeChange() {
|
||||||
behaviorDate();//饼图
|
behaviorDate();//饼图
|
||||||
}
|
}
|
||||||
|
function funTypeChange2() {
|
||||||
var y = now.getFullYear();
|
gczxt();
|
||||||
|
}
|
||||||
|
function gczxt() {//行为观察折线图
|
||||||
|
var y = $("#years").val();
|
||||||
//行为观察折线图
|
//行为观察折线图
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "get",
|
type: "get",
|
||||||
|
@ -163,7 +169,7 @@
|
||||||
//请求成功时执行该函数内容,data即为服务器返回的json对象
|
//请求成功时执行该函数内容,data即为服务器返回的json对象
|
||||||
|
|
||||||
var gcChart2 = echarts.init(document.getElementById("piecontainer2"));
|
var gcChart2 = echarts.init(document.getElementById("piecontainer2"));
|
||||||
gcChart2.hideLoading();
|
|
||||||
gcChart2.setOption(option = {
|
gcChart2.setOption(option = {
|
||||||
title: {
|
title: {
|
||||||
text: '行为观察折线图'
|
text: '行为观察折线图'
|
||||||
|
@ -172,7 +178,7 @@
|
||||||
trigger: 'axis'
|
trigger: 'axis'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: ['人员的反映', '员工的位置', '个人防护装备', '工具和设备', '程序和标准','人体工程学','环境整洁']
|
data: ['人员的反映', '员工的位置', '个人防护装备', '工具和设备', '程序和标准', '人体工程学', '环境整洁']
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: '3%',
|
left: '3%',
|
||||||
|
@ -244,13 +250,16 @@
|
||||||
gcChart2.hideLoading();
|
gcChart2.hideLoading();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<div class="border" id="desktop" style="margin: 10px 10px 0 10px; background: #fff; overflow: auto;">
|
<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()"> 查询</button>
|
||||||
<div id="piecontainer2" style="width:100%;height:400px;">
|
<div id="piecontainer2" style="width:100%;height:400px;">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -278,12 +287,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="width: 60%; margin: 0px auto;float:right;margin-bottom:100px; ">
|
<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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<th data-options="field:'looker__userid',hidden:true">用户ID</th>
|
<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:'lookpart__partname',align:'right'" width="35%">观察部门</th>
|
||||||
<th data-options="field:'number',align:'right'" width="35%">行为观察数</th>
|
<th data-options="field:'number',align:'right'" width="35%">行为观察数</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -306,7 +315,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue