Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/evaluation/showCriterion.jsp
2026-01-16 14:13:44 +08:00

127 lines
4.5 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page language="java" pageEncoding="UTF-8"%>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
$(function () {
$("#table").bootstrapTable({ // 对应table标签的id
url: ext.contextPath + '/evaluation/criterion/getList.do', // 获取表格数据的url
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
striped: true, //表格显示条纹默认为false
pagination: true, // 在表格底部显示分页组件默认false
pageList: [20, 30, 50], // 设置页面可以显示的数据条数
pageSize: 20, // 页面数据条数
pageNumber: 1, // 首页页码
sidePagination: 'server', // 设置为服务器端分页
queryParams: function (params) { // 请求服务器数据时发送的参数可以在这里添加额外的查询参数返回false则终止请求
return {
rows: params.limit, // 每页要显示的数据条数
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
sort: params.sort, // 要排序的字段
order: params.order
}
},
sortName: 'insdt', // 要排序的字段
sortOrder: 'desc', // 排序规则
columns: [
{
field: 'criterionName', // 返回json数据中的name
title: '标准名称', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
}, {
field: 'condition', // 返回json数据中的name
title: '条件', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle',// 上下居中
formatter: function(value, row, index){
if(row.condition == '1'){
return '大于等于';
}else if(row.condition == '2'){
return '小于等于';
}else if(row.condition == '3'){
return '区间内';
}else{
return '区间外';
}
}
},
{
field: 'condition', // 返回json数据中的name
title: '${typeCriterion}标准', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle',// 上下居中
formatter: function(value, row, index){
if(row.condition == '1' || row.condition == '2'){
if('${type}' == '1'){
return row.nationCriterionValue;
}else if('${type}' == '2'){
return row.areaCriterionValue;
}else{
return row.companyCriterionValue;
}
}else if(row.condition == '3'){
if('${type}' == '1'){
return '[' + row.nationCriterionMin + ',' + row.nationCriterionMax + ']';
}else if('${type}' == '2'){
return '[' + row.areaCriterionMin + ',' + row.areaCriterionMax + ']';
}else{
return '[' + row.companyCriterionMin + ',' + row.companyCriterionMax + ']';
}
}else{
if('${type}' == '1'){
return '[-∞,' + row.nationCriterionMin + '],[' + row.nationCriterionMax + ',+∞]';
}else if('${type}' == '2'){
return '[-∞,' + row.areaCriterionMin + '],[' + row.areaCriterionMax + ',+∞]';
}else{
return '[-∞,' + row.companyCriterionMin + '],[' + row.companyCriterionMax + ',+∞]';
}
}
}
},
{
field: 'detectionLimit', // 返回json数据中的name
title: '检测限', // 表格表头显示文字
align: 'center', // 左右居中
valign: 'middle' // 上下居中
}
],
onLoadSuccess: function () { //加载成功时执行
adjustBootstrapTableView("table");
},
onLoadError: function () { //加载失败时执行
console.info("加载数据失败");
}
});
});
</script>
<div class="modal fade" id="subModal">
<div class="modal-dialog">
<div class="modal-content" style="width: 700px;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">各指标${typeCriterion}标准</h4>
</div>
<div class="modal-body">
<!-- 新增界面formid强制为subForm -->
<table id="table"></table>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>