Commit 5766eec2 authored by liuna's avatar liuna

2018年1月1日 --智能分析平台

--修改质量规则和过滤规则全选不联动
parent a0735b9a
This diff is collapsed.
......@@ -12,8 +12,8 @@ import java.io.Serializable;
* @author Liu Na
*
*/
@Entity
@Table(name = "APP_SM_DB_CITY_KPI_T",schema = "ccolap")
//@Entity
//@Table(name = "APP_SM_DB_CITY_KPI_T",schema = "ccolap")
public class FlowMonitor implements Serializable {
private Long batchId;
......
......@@ -147,27 +147,19 @@ public class QualityRuleMaintainController {
@RequestMapping(value = "/findKpiId*")
@ResponseBody
public void findKpiId(@RequestParam(value = "businessIds", defaultValue = "") String businessIds,
public List<Object[]> findKpiId(@RequestParam(value = "businessIds", defaultValue = "") String businessIds,
@RequestParam(value = "calCycleValue", defaultValue = "30MI") String calCycleValue,
HttpServletResponse response) {
List<Object[]> businessKpiList = new ArrayList<Object[]>();
if(!"".equals(businessIds)){
String[] strs = businessIds.split(",");
List<Long> businessIdlist = new ArrayList<Long>();
for (int i = 0; i < strs.length; i++) {
businessIdlist.add(Long.valueOf(strs[i]));
}
List<Object[]> businessKpiList = kpiDao.findKpiIdAndKpiNameAndKpiCodeByBusinessIds(calCycleValue, businessIdlist);
Gson gson = new Gson();
response.setContentType("text/Xml;charset=gbk");
PrintWriter out = null;
try {
out = response.getWriter();
out.println(gson.toJson(businessKpiList));
} catch (IOException ex1) {
ex1.printStackTrace();
} finally {
out.close();
businessKpiList = kpiDao.findKpiIdAndKpiNameAndKpiCodeByBusinessIds(calCycleValue, businessIdlist);
}
return businessKpiList;
}
......
......@@ -114,7 +114,7 @@
<ul class="dropdown-menu">
<li><a href="${ctx}/MonitorOperation/RegularityAnalysis">数据特征探查</a></li>
<li><a href="${ctx}/MonitorOperation/KeyLinkProcessAnalysis">业务环节分析</a></li>
<li><a href="${ctx}/MonitorOperation/FlowMonitor">实体厅流量监测分析</a></li>
<%--<li><a href="${ctx}/MonitorOperation/FlowMonitor">实体厅流量监测分析</a></li>--%>
</ul>
</li>
</shiro:hasPermission>
......
......@@ -241,7 +241,6 @@
beforeSend: function(data) {},
success: function(data){
var tbody=$('<tbody></tbody>');
data = JSON.parse(data)
data.forEach(function(t,i){
var tr = $('<tr></tr>');
tr.empty();
......@@ -291,6 +290,7 @@
}
});
$(".businessItem").click(function(){
businessIds="";
$("[name='businessinput']:checked").each(function (){
......@@ -438,6 +438,13 @@
$(".province").attr("checked",false);
}
});
$(".province").click(function(){
var clickFlag=true;//是否全部选中
$(".province").each(function(){
if($(this).attr("checked") == null||$(this).attr("checked") == false){ clickFlag=false; }
});
$("#allProvince").attr("checked",clickFlag);
});
//业务全选
$("#allBusiness").click(function(){
if($("#allBusiness").attr("checked") == "checked"){//全选
......@@ -445,6 +452,19 @@
}else{//不全选
$(".businessItem").attr("checked",false);
}
businessIds="";
$("[name='businessinput']:checked").each(function (){
businessIds += $(this).val()+",";
});
updateKpi(businessIds);
});
$(".businessItem").click(function(){
var clickFlag=true;//是否全部选中
$(".businessItem").each(function(){
if($(this).attr("checked") == null||$(this).attr("checked") == false){ clickFlag=false; }
});
$("#allBusiness").attr("checked",clickFlag);
});
//指标全选
$("#allKpi").click(function(){
......@@ -454,6 +474,13 @@
$(".kpiItem").attr("checked",false);
}
});
$(".kpiItem").click(function(){
var cFlag=true;//是否全部选中
$(".kpiItem").each(function(){
if($(this).attr("checked") == null||$(this).attr("checked") == false){ cFlag=false; }
});
$("#allKpi").attr("checked",cFlag);
});
</script>
</body>
......@@ -462,8 +462,9 @@ function updateKpi(businessIds,calCycleValue){
async: false,
beforeSend: function(data) {},
success: function(data){
console.log(data)
var tbody=$('<tbody></tbody>');
data = JSON.parse(data)
data.forEach(function(t,i){
var tr = $('<tr></tr>');
tr.empty();
......@@ -629,6 +630,19 @@ $("#allBusiness").click(function(){
}else{//不全选
$(".businessItem").attr("checked",false);
}
businessIds="";
$("[name='businessinput']:checked").each(function (){
businessIds += $(this).val()+",";
});
console.log(businessIds);
updateKpi(businessIds,calCycleValue);
});
$(".businessItem").click(function(){
var clickFlag=true;//是否全部选中
$(".businessItem").each(function(){
if($(this).attr("checked") == null||$(this).attr("checked") == false){ clickFlag=false; }
});
$("#allBusiness").attr("checked",clickFlag);
});
//指标全选
$("#allKpi").click(function(){
......@@ -638,6 +652,13 @@ $("#allKpi").click(function(){
$(".kpiItem").attr("checked",false);
}
});
$(".kpiItem").click(function(){
var cFlag=true;//是否全部选中
$(".kpiItem").each(function(){
if($(this).attr("checked") == null||$(this).attr("checked") == false){ cFlag=false; }
});
$("#allKpi").attr("checked",cFlag);
});
</script>
......
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