293 lines
12 KiB
Plaintext
293 lines
12 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "getFx";
|
|
}
|
|
|
|
|
|
@section scripts{
|
|
<script type="text/javascript">
|
|
var openf;
|
|
var dic = new Dictionary();
|
|
$(function () {
|
|
$("#grid1").ligerGrid({
|
|
height: '200px',
|
|
columns: [
|
|
{ display: '异常项目名称', name: 'key', align: 'left', width: 120, render: function (row) { return row.key.split('-')[0]} },
|
|
{ display: '人次', name: 'value', align: 'left', width: 50 },
|
|
{ display: '所属小组', name: 'key', align: 'left', width: 120, render: function (row) { return row.key.split('-')[1] } }
|
|
],
|
|
pageSize: 30,
|
|
rownumbers: true,
|
|
fixedCellHeight: false,
|
|
usePager: false
|
|
});
|
|
$("#grid2").ligerGrid({
|
|
height: '200px',
|
|
columns: [
|
|
{ display: '异常项目小组', name: 'key', align: 'left', width: 120 },
|
|
{ display: '人次', name: 'value', align: 'left', width: 50 }
|
|
],
|
|
pageSize: 30,
|
|
rownumbers: true,
|
|
fixedCellHeight: false,
|
|
usePager: false,
|
|
onSelectRow: function (rowdata, rowid, rowobj) {
|
|
var grid = liger.get("grid1");
|
|
var rows = grid.getData();
|
|
for (var i in rows)
|
|
{
|
|
if (rows[i].key.indexOf(rowdata.key) >= 0)
|
|
grid.select(i);
|
|
}
|
|
}
|
|
});
|
|
$("#grid3").ligerGrid({
|
|
height: '200px',
|
|
columns: [
|
|
{ display: '疑似职业病', name: 'key', align: 'left', width: 120 },
|
|
{ display: '人次', name: 'value', align: 'left', width: 50 }
|
|
],
|
|
pageSize: 30,
|
|
rownumbers: true,
|
|
fixedCellHeight: false,
|
|
usePager: false
|
|
});
|
|
$("#grid4").ligerGrid({
|
|
height: '200px',
|
|
columns: [
|
|
{ display: '职业禁忌证', name: 'key', align: 'left', width: 120 },
|
|
{ display: '人次', name: 'value', align: 'left', width: 50 }
|
|
],
|
|
pageSize: 30,
|
|
fixedCellHeight: false,
|
|
rownumbers: true,
|
|
usePager: false
|
|
});
|
|
|
|
//分析按钮
|
|
$("#bt1").click(function () {
|
|
var hazards = $('input[name="hazards"]:checked').val();
|
|
var result = "本次接触“" + hazards + "”作业人员的职业健康检查,实际检查" + $("#tb0").val() + "人次,统计分析" + $("#tb0").val() + "人次,结果如下:"
|
|
if ($("#tb1").val() == "0")
|
|
result += "\r\n 1、本次职业健康体检未发现不宜接触“" + hazards + "”相关的体检结果无明显异常人员。";
|
|
else
|
|
result += "\r\n 1、体检结果无明显异常" + $("#tb1").val() + "人次,占统计分析人次数的" + $("#tb11").val() + "。";
|
|
if ($("#tb2").val() == "0")
|
|
result += "\r\n 2、本次职业健康体检未发现不宜接触“" + hazards + "”相关的检查项目异常情况人员。";
|
|
else
|
|
result += "\r\n 2、检查项目异常情况" + $("#tb2").val() + "人次(异常人员详情见附表),占统计分析人次数的" + $("#tb22").val() + "。";
|
|
if ($("#tb3").val() == "0")
|
|
result += "\r\n 3、本次职业健康体检未发现与接触“" + hazards + "”相关的疑似职业病患者。";
|
|
else
|
|
result += "\r\n 3、疑似职业病" + $("#tb3").val() + "人次,占统计分析人次数的" + $("#tb33").val() + "。";
|
|
if ($("#tb4").val() == "0")
|
|
result += "\r\n 4、本次职业健康体检未发现不宜接触“" + hazards + "”相关的职业禁忌证人员。";
|
|
else
|
|
result += "\r\n 4、职业禁忌证" + $("#tb4").val() + "人次,占统计分析人次数的" + $("#tb44").val() + "。";
|
|
$("#tb5").val(result);
|
|
|
|
//缓存在页面 字典 中
|
|
dic.put(hazards, $("#tb5").val());
|
|
});
|
|
//确定按钮
|
|
$("#bt2").click(function () {
|
|
dic.getAll();
|
|
parent.getFx(dic.getAll());
|
|
});
|
|
//取消按钮
|
|
$("#bt3").click(function () {
|
|
parent.getFx("");
|
|
});
|
|
|
|
$(":radio").click(function () {
|
|
getData();
|
|
});
|
|
|
|
//初始化加载数据
|
|
getData();
|
|
});
|
|
|
|
function getData() {
|
|
var hazards = $('input[name="hazards"]:checked').val();
|
|
//获取统计
|
|
$.ajax(
|
|
{
|
|
url: "@Url.Action("getFxData")", type: "post", dataType: "json", data: { hazards: hazards, personids: $("#personids").val() },
|
|
success: function (d) {
|
|
if (d == "") {
|
|
$.ligerDialog.alert("没有相关分析数据!");
|
|
return false;
|
|
}
|
|
|
|
$.ligerDialog.closeWaitting();
|
|
|
|
$("#tb0").val(d.sort0);
|
|
$("#tb1").val(d.sort1); $("#tb11").val(d.sort11);
|
|
$("#tb2").val(d.sort2); $("#tb22").val(d.sort22);
|
|
$("#tb3").val(d.sort4); $("#tb33").val(d.sort44);
|
|
$("#tb4").val(d.sort5); $("#tb44").val(d.sort55);
|
|
//
|
|
liger.get("grid1").options.data = d.p11;
|
|
liger.get("grid1").loadData();
|
|
liger.get("grid2").options.data = d.p22;
|
|
liger.get("grid2").loadData();
|
|
liger.get("grid3").options.data = d.p66;
|
|
liger.get("grid3").loadData();
|
|
liger.get("grid4").options.data = d.p55;
|
|
liger.get("grid4").loadData();
|
|
|
|
$("#tb5").val(dic.get(hazards));
|
|
},
|
|
failure: function () {
|
|
$.ligerDialog.alert("获取分析结果失败!");
|
|
},
|
|
complete: function () {
|
|
$.ligerDialog.closeWaitting();
|
|
},
|
|
beforeSend: function () {
|
|
$.ligerDialog.waitting("正在加载请稍后……");
|
|
}
|
|
});
|
|
}
|
|
|
|
// 自定义字典对象
|
|
function Dictionary() {
|
|
this.data = new Array();
|
|
|
|
this.put = function (key, value) {
|
|
this.data[key] = value;
|
|
};
|
|
|
|
this.get = function (key) {
|
|
return this.data[key];
|
|
};
|
|
|
|
this.remove = function (key) {
|
|
this.data[key] = null;
|
|
};
|
|
|
|
this.isEmpty = function () {
|
|
return this.data.length == 0;
|
|
};
|
|
|
|
this.size = function () {
|
|
return this.data.length;
|
|
};
|
|
|
|
this.getAll = function () {
|
|
var result = "";
|
|
var i = 1;
|
|
for (var key in this.data)
|
|
{
|
|
result += "【" + i + "】" + this.data[key] + "\r\n";
|
|
i++;
|
|
}
|
|
return result;
|
|
}
|
|
}
|
|
</script>
|
|
}
|
|
|
|
|
|
<div class="l-clear"></div>
|
|
@using (Ajax.BeginForm("Add", new AjaxOptions { HttpMethod = "Post", OnSuccess = "success" }))
|
|
{
|
|
@Html.Hidden("personids", ViewData["personids"])
|
|
<table class="t1" style="width: 100%">
|
|
<tr>
|
|
<td class="rtd" colspan="4" style="text-align:center">
|
|
|
|
@foreach (string h in ViewData["hazards"].ToString().Split(','))
|
|
{
|
|
if (ViewData["i"].ToString() == "0")
|
|
{
|
|
@Html.RadioButton("hazards", h, new { @checked="checked" } ); @h; @:
|
|
}
|
|
else
|
|
{
|
|
@Html.RadioButton("hazards", h); @h; @:
|
|
}
|
|
ViewData["i"] = 1;
|
|
}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd" width="190px">接触本职业危害因素:</td>
|
|
<td class="rtd">
|
|
@Html.TextBox("tb0", "", new { @class = "l-text", @readonly = "readonly", style = "width:80px" })人次
|
|
</td>
|
|
<td class="ltd" width="190px"></td>
|
|
<td class="rtd"></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd" width="190px">体检结果无明显异常:</td>
|
|
<td class="rtd">
|
|
@Html.TextBox("tb1", "", new { @class = "l-text", @readonly = "readonly", style = "width:80px" })人次
|
|
</td>
|
|
<td class="ltd" width="190px">百分比</td>
|
|
<td class="rtd">
|
|
@Html.TextBox("tb11", "", new { @class = "l-text", @readonly = "readonly", style = "width:80px" })
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd" width="190px">共查处相关异常情况:</td>
|
|
<td class="rtd">
|
|
@Html.TextBox("tb2", "", new { @class = "l-text", @readonly = "readonly", style = "width:80px" })人次
|
|
</td>
|
|
<td class="ltd" width="190px">百分比</td>
|
|
<td class="rtd">
|
|
@Html.TextBox("tb22", "", new { @class = "l-text", @readonly = "readonly", style = "width:80px" })
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd" width="190px">疑似职业病:</td>
|
|
<td class="rtd">
|
|
@Html.TextBox("tb3", "", new { @class = "l-text", @readonly = "readonly", style = "width:80px" })人次
|
|
</td>
|
|
<td class="ltd" width="190px">百分比</td>
|
|
<td class="rtd">
|
|
@Html.TextBox("tb33", "", new { @class = "l-text", @readonly = "readonly", style = "width:80px" })
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd" width="190px">职业禁忌证:</td>
|
|
<td class="rtd">
|
|
@Html.TextBox("tb4", "", new { @class = "l-text", @readonly = "readonly", style = "width:80px" })人次
|
|
</td>
|
|
<td class="ltd" width="190px">百分比</td>
|
|
<td class="rtd">
|
|
@Html.TextBox("tb44", "", new { @class = "l-text", @readonly = "readonly", style = "width:80px" })
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<div id="grid1"></div>
|
|
</td>
|
|
<td>
|
|
<div id="grid2"></div>
|
|
</td>
|
|
<td>
|
|
<div id="grid3"></div>
|
|
</td>
|
|
<td>
|
|
<div id="grid4"></div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="ltd" colspan="2" style="text-align:center">
|
|
单危害因素分析: <input type="button" id="bt1" value="分析" class="l-button" style="width:90px" />
|
|
</td>
|
|
<td class="ltd" colspan="2" style="text-align:center">
|
|
<input type="button" id="bt2" value="确定" class="l-button" style="width:90px" />
|
|
<input type="button" id="bt3" value="取消" class="l-button" style="width:90px" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="rtd" colspan="4" style="text-align:center">
|
|
@Html.TextArea("tb5", "", new { style = "width:100%;height:100px" })
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
}
|
|
<div style="display:none;"></div> |