Commit 8b5b5a46 authored by liuna's avatar liuna

2017年12月24日 --智能分析平台

--数据质量规则筛选项增加,插入返回弹出框提示
parent a1e0ac68
...@@ -43,6 +43,10 @@ ...@@ -43,6 +43,10 @@
<div class="form"> <div class="form">
<tags:Quality_dataSource_channel_business/> <tags:Quality_dataSource_channel_business/>
<div id="kpiCodeDiv" class="slide-menu-option">
<label >指标编码</label>&nbsp;&nbsp;
<input id="kpiCodeID" class="form-control" type="text" style="width:250px;" onFocus="">
</div>
<button id="submit" class="btn btn-primary" onclick="ruleResultSubmit()">提交</button> <button id="submit" class="btn btn-primary" onclick="ruleResultSubmit()">提交</button>
<button id="disable" class="btn btn-warning" onclick="ruleResultReset()">重置</button> <button id="disable" class="btn btn-warning" onclick="ruleResultReset()">重置</button>
...@@ -62,6 +66,7 @@ ...@@ -62,6 +66,7 @@
<span id="ProvinceTag" class="label label-info" data-placement="bottom" ></span> <span id="ProvinceTag" class="label label-info" data-placement="bottom" ></span>
<span id="DataSourceTag" class="label label-info" data-placement="bottom" ></span> <span id="DataSourceTag" class="label label-info" data-placement="bottom" ></span>
<span id="BusinessTag" class="label label-info" data-placement="bottom" ></span> <span id="BusinessTag" class="label label-info" data-placement="bottom" ></span>
<span id="KpiCodeTag" class="label label-info" data-placement="bottom" ></span>
</div> </div>
</div> </div>
...@@ -102,13 +107,14 @@ ...@@ -102,13 +107,14 @@
$.dialog({ $.dialog({
content:"成功生成数据质量规则!" content:"成功生成数据质量规则!"
}) })
}else if (a =="sr=2"){ }else{
var list = a.split("=")[1];
list=list.substring(0,list.length-1);
console.log(list);
$.dialog({ $.dialog({
content:"已经存在此kpiId的数据质量规则!" content:"已经存在"+list+"的数据质量规则!"
}) })
} }
console.log(url.split("?")[1]);
}); });
var receiveRulePageNum = "${rulePageNum}"; var receiveRulePageNum = "${rulePageNum}";
...@@ -128,7 +134,46 @@ $("#createRule").click(function(){ ...@@ -128,7 +134,46 @@ $("#createRule").click(function(){
var dataSource=getStatsDataSourceCheckedValuesString(); var dataSource=getStatsDataSourceCheckedValuesString();
var chnnal=getStatsChannelCheckedValuesString(); var chnnal=getStatsChannelCheckedValuesString();
var bussines=getStatsBusinessCheckedValuesString(); var bussines=getStatsBusinessCheckedValuesString();
var code=$.trim(document.getElementById("kpiCodeID").value);
if(code ===""){
if(dataSource==""){
$.alert("数据来源的选择不能为空");
}else if(chnnal===""){
$.alert("渠道的选择不能为空");
}else if(bussines===""){
$.alert("业务的选择不能为空");
}else{
toggleMenu('slidePushMenus');//隐藏筛选项
//数据来源标签
$('#DataSourceTag').text("数据来源").append($("<span class='badge'></span>").text(getStatsDataSourceCheckedValues().length)).attr('data-original-title',getStatsDataSourceCheckedTitles()).tooltip();
//渠道标签
$('#ChannelTag').text("渠道").append($("<span class='badge'></span>").text(getStatsChannelCheckedValues().length)).attr('data-original-title',getStatsChannelCheckedTitles()).tooltip();
//业务标签
$('#BusinessTag').text("业务").append($("<span class='badge'></span>").text(getStatsBusinessCheckedValues().length)).attr('data-original-title',getStatsBusinessCheckedTitlesString()).tooltip();
//指标编码
$("#KpiCodeTag").text("指标编码").attr('data-original-title',code).tooltip();
$.ajax({
type : 'GET',
contentType : 'application/json',
url: "${ctx}/AnalysisSupport/QualityRuleResult/ruleTableChange?dataSource="+dataSource+"&chnnal="+chnnal+"&bussines="+bussines+"&code"+code,
dataType : 'text',
async: false,
beforeSend: function(data) {
},
success: function(data) {
$("#qualityRuleView").val(data);
ruleResultDetailTable();
qualityRuleId="";
$("#updateRule").attr("disabled", true);
toggleMenu('slidePushMenus2');//隐藏筛选项
}
});
}
}else if(code!==""){
if(dataSource==""){ if(dataSource==""){
$.alert("数据来源的选择不能为空"); $.alert("数据来源的选择不能为空");
}else if(chnnal===""){ }else if(chnnal===""){
...@@ -146,11 +191,13 @@ $("#createRule").click(function(){ ...@@ -146,11 +191,13 @@ $("#createRule").click(function(){
//业务标签 //业务标签
$('#BusinessTag').text("业务").append($("<span class='badge'></span>").text(getStatsBusinessCheckedValues().length)).attr('data-original-title',getStatsBusinessCheckedTitlesString()).tooltip(); $('#BusinessTag').text("业务").append($("<span class='badge'></span>").text(getStatsBusinessCheckedValues().length)).attr('data-original-title',getStatsBusinessCheckedTitlesString()).tooltip();
//指标编码
$("#KpiCodeTag").text("指标编码").attr('data-original-title',code).tooltip();
$.ajax({ $.ajax({
type : 'GET', type : 'GET',
contentType : 'application/json', contentType : 'application/json',
url: "${ctx}/AnalysisSupport/QualityRuleResult/ruleTableChange?dataSource="+dataSource+"&chnnal="+chnnal+"&bussines="+bussines, url: "${ctx}/AnalysisSupport/QualityRuleResult/ruleTableChange?dataSource="+dataSource+"&chnnal="+chnnal+"&bussines="+bussines+"&code="+code,
dataType : 'text', dataType : 'text',
async: false, async: false,
beforeSend: function(data) { beforeSend: function(data) {
...@@ -164,11 +211,13 @@ $("#createRule").click(function(){ ...@@ -164,11 +211,13 @@ $("#createRule").click(function(){
} }
}); });
} }
}
} }
function ruleResultReset(){ function ruleResultReset(){
$("#kpiCodeID").attr("value",'');
statsDataSourceReset();//三级联动重置 statsDataSourceReset();//三级联动重置
} }
$("#updateRule").click(function(){ $("#updateRule").click(function(){
...@@ -203,6 +252,9 @@ $("#deleteRule").click(function(){ ...@@ -203,6 +252,9 @@ $("#deleteRule").click(function(){
}); });
}); });
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
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