Commit 8b5b5a46 authored by liuna's avatar liuna

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

--数据质量规则筛选项增加,插入返回弹出框提示
parent a1e0ac68
......@@ -43,7 +43,11 @@
<div class="form">
<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="disable" class="btn btn-warning" onclick="ruleResultReset()">重置</button>
</div>
......@@ -62,6 +66,7 @@
<span id="ProvinceTag" 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="KpiCodeTag" class="label label-info" data-placement="bottom" ></span>
</div>
</div>
......@@ -95,21 +100,22 @@
</div>
<script type="text/javascript" src="${ctx}/static/js/ruleResultDetailTable.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var url = decodeURI(window.location.search);
var a = url.split("?")[1];
$(document).ready(function(){
var url = decodeURI(window.location.search);
var a = url.split("?")[1];
if (a =="sr=1"){
$.dialog({
content:"成功生成数据质量规则!"
})
}else if (a =="sr=2"){
}else{
var list = a.split("=")[1];
list=list.substring(0,list.length-1);
console.log(list);
$.dialog({
content:"已经存在此kpiId的数据质量规则!"
content:"已经存在"+list+"的数据质量规则!"
})
}
console.log(url.split("?")[1]);
});
}
});
var receiveRulePageNum = "${rulePageNum}";
ruleResultDetailTable();
......@@ -128,47 +134,90 @@ $("#createRule").click(function(){
var dataSource=getStatsDataSourceCheckedValuesString();
var chnnal=getStatsChannelCheckedValuesString();
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();
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();
$.ajax({
type : 'GET',
contentType : 'application/json',
url: "${ctx}/AnalysisSupport/QualityRuleResult/ruleTableChange?dataSource="+dataSource+"&chnnal="+chnnal+"&bussines="+bussines,
dataType : 'text',
async: false,
beforeSend: function(data) {
},
success: function(data) {
$("#qualityRuleView").val(data);
ruleResultDetailTable();
qualityRuleId="";
$("#updateRule").attr("disabled", true);
toggleMenu('slidePushMenus2');//隐藏筛选项
}
});
}
//渠道标签
$('#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();
function ruleResultReset(){
//指标编码
$("#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==""){
$.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');//隐藏筛选项
}
});
}
}
}
function ruleResultReset(){
$("#kpiCodeID").attr("value",'');
statsDataSourceReset();//三级联动重置
}
$("#updateRule").click(function(){
......@@ -203,6 +252,9 @@ $("#deleteRule").click(function(){
});
});
</script>
</body>
</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