Commit d5ff60a8 authored by liuna's avatar liuna

Merge remote-tracking branch 'origin/moly' into liuna

parents 8f10cdec d16d3f1f
......@@ -145,25 +145,39 @@
<tr>
<td>数据源:</td>
<td>
<%--<select class="form-control" name="dataSourceList" id="dataSourceListTd" >--%>
<label>
<div class="checkbox-inline">
<input type="checkbox" name="dataSourceRadioAll" value="全选"
onclick="dataSourceRadioAllCheckedClick()"/><font color="#FF0000">全选</font>
</div>
</label>
<c:forEach items="${dataSourceList}" var="dataSource">
<div class="checkbox-inline">
<label>
<div class="checkbox-inline">
<input type="checkbox" onclick="dataSourceRadioClick()"
name="dataSourceRadio" class="provinceDetail"
title="${dataSource.dataSourceName}"
value="${dataSource.dataSourceId}"/>${dataSource.dataSourceName}
</div>
</label>
</div>
</c:forEach>
</td>
</tr>
<tr>
<td>渠道:</td>
<td>
<div id="">
<label>
<div class="checkbox-inline">
<input type="checkbox" name="channelRadioAll" value="全选"
onclick="channelRadioAllCheckedClick()"/><font color="#FF0000">全选</font>
</div>
</label>
<c:forEach items="${channelList}" var="channel">
<div class="checkbox-inline">
<label>
......@@ -174,7 +188,6 @@
</label>
</div>
</c:forEach>
</div>
</td>
</tr>
......@@ -526,6 +539,7 @@
//渠道 复选框 点击 事件
function channelRadioClick() {
$("input[name='channelRadioAll']").removeAttr('checked');
$("#businessActivedListTd").empty();
$("#dimKpiListTd").empty();
......@@ -560,7 +574,130 @@
var jsonDa = eval('(' + data + ')');
// var jsonDa=data;
var strcheckBox = "";
var strcheckBox = "<input type='checkbox' name='BusinessCheckALL' onclick='BusinessCheckALLCLICK()' value='全选'/><font color='#FF0000'>全选</font>";
for (var i = 0; i < jsonDa.length; i++) {
var strInput = "<input type='checkbox' onClick='BusinessCheckClick()' id=BusinessCheck_" + jsonDa[i].businessId + " name='BusinessCheck' class='provinceDetail' title='" + jsonDa[i].businessName + "' value='" + jsonDa[i].businessId + "'/>" + jsonDa[i].businessName;
if((i !=0)&&((i+1)%6 ===0)){strInput=strInput+'<br>'}
strcheckBox += strInput;
}
$("#businessActivedListTd").append(strcheckBox);
}
});
}
//业务 全选复选框 点击 事件 2018.1.23 bymoi
function BusinessCheckALLCLICK(){
if($("input[name='BusinessCheckALL']").attr('checked')){
$("input[name='BusinessCheck']").attr('checked','true');
}else{
$("input[name='BusinessCheck']").removeAttr('checked');
}
// 重置 指标 一栏 筛选保留原有的 和已选择的 指标
/*$("input[name='dimKpiCheck']").each(function (e) {
if (!$(this).attr("checked")) {
$(this).next().remove();
$(this).remove();
}
});*/
// 清空 指标 一栏 所有 指标
$("#dimKpiListTd").empty();
//获取选择的 业务
var businessSelectedArr = [];
$("input[name='BusinessCheck']").each(function (e) {
if ($(this).attr("checked")) {
businessSelectedArr.push($(this).context.id.split("_")[1]);
}
});
$.ajax({
type: 'GET',
async: true,
contentType: 'application/json',
url: "${ctx}/MonitorOperation/AssociateDiagosisConfiguration/getDimKpiListByBusinessIdList?businessIdList=" + businessSelectedArr,
dataType: 'text',
success: function (data) {
var jsonDa = eval('(' + data + ')');
var colLength=0;
for (var i = 0; i < jsonDa.length; i++) {
if ($.inArray(jsonDa[i].kpiId, dimKpiSelected) < 0) {
if(colLength == 0){$("#dimKpiListTd").append("<input type='checkbox' value='全选' name='dimKpiAllChecked' onclick='dimKpiAllCheckedClick()'/><font color='#FF0000'>全选</font>")}
var strInput = "<input type='checkbox' id=dimKpiCheck_" + jsonDa[i].kpiId + " name='dimKpiCheck' class='provinceDetail' title='"+jsonDa[i].code + "' value='" + jsonDa[i].kpiId + "'/><font>" + jsonDa[i].name + "</font>";
if((colLength !=0)&&((colLength+1)%5 ===0)){strInput=strInput+'<br>'}
$("#dimKpiListTd").append(strInput);
colLength=colLength+1;
}
}
}
});
}
// 2018.1.23 bymoi
//指标复选框 全选 2018.1.23 bymoi
function dimKpiAllCheckedClick(){
if($("input[name='dimKpiAllChecked']").attr('checked')){
$("input[name='dimKpiCheck']").attr('checked','true');
}else{
$("input[name='dimKpiCheck']").removeAttr('checked');
}
}
//2018.1.23 bymoi
//渠道 全选复选框 点击 事件 2018.1.23 bymoi
function channelRadioAllCheckedClick(){
//判断 全选框是否选中 若选中 所有 渠道复选框 都选中
if($("input[name='channelRadioAll']").attr('checked')){
$("input[name='channelRadio']").attr('checked','true');
}else{
$("input[name='channelRadio']").removeAttr('checked');
}
$("#businessActivedListTd").empty();
$("#dimKpiListTd").empty();
var channelId = $("input[name='channelRadio']:checked").val();
var dataSourceId = $("input[name='dataSourceRadio']:checked").val();
var channelArray = new Array();// 存放 所选 频道
var i = 0;
$("input[name='channelRadio']:checked").each(function () {
channelArray[i] = $(this).val();
i++;
});
var dataSourceArray = new Array();// 存放 所选数据源
var j = 0;
$("input[name='dataSourceRadio']:checked").each(function () {
dataSourceArray[j] = $(this).val();
j++;
});
if (channelArray.length < 0 || dataSourceArray.length < 0) {
return;
}
$.ajax({
type: 'GET',
async: true,
contentType: 'application/json',
url: "${ctx}/MonitorOperation/AssociateDiagosisConfiguration/getBusinessByChannelIdListAndDataSourceIdList?dataSourceId=" + dataSourceArray + "&channelId=" + channelArray,
dataType: 'text',
success: function (data) {
var jsonDa = eval('(' + data + ')');
var strcheckBox = "<input type='checkbox' name='BusinessCheckALL' onclick='BusinessCheckALLCLICK()' value='全选'/><font color='#FF0000'>全选</font>";
for (var i = 0; i < jsonDa.length; i++) {
var strInput = "<input type='checkbox' onClick='BusinessCheckClick()' id=BusinessCheck_" + jsonDa[i].businessId + " name='BusinessCheck' class='provinceDetail' title='" + jsonDa[i].businessName + "' value='" + jsonDa[i].businessId + "'/>" + jsonDa[i].businessName;
if((i !=0)&&((i+1)%6 ===0)){strInput=strInput+'<br>'}
......@@ -573,11 +710,72 @@
});
}
// 2018.1.23 bymoi
//数据源 全选复选框 点击 事件 2018.1.23 bymoi
function dataSourceRadioAllCheckedClick(){
//判断 全选框是否选中 若选中 所有 数据源复选框 都选中
if($("input[name='dataSourceRadioAll']").attr('checked')){
$("input[name='dataSourceRadio']").attr('checked','true');
}else{
$("input[name='dataSourceRadio']").removeAttr('checked');
}
$("#businessActivedListTd").empty();
$("#dimKpiListTd").empty();
var channelId = $("input[name='channelRadio']:checked").val();
var dataSourceId = $("input[name='dataSourceRadio']:checked").val();
var channelArray = new Array();// 存放 所选 频道
var i = 0;
$("input[name='channelRadio']:checked").each(function () {
channelArray[i] = $(this).val();
i++;
});
var dataSourceArray = new Array();// 存放 所选数据源
var j = 0;
$("input[name='dataSourceRadio']:checked").each(function () {
dataSourceArray[j] = $(this).val();
j++;
});
if (channelArray.length < 0 || dataSourceArray.length < 0) {
return;
}
$.ajax({
type: 'GET',
async: true,
contentType: 'application/json',
url: "${ctx}/MonitorOperation/AssociateDiagosisConfiguration/getBusinessByChannelIdListAndDataSourceIdList?dataSourceId=" + dataSourceArray + "&channelId=" + channelArray,
dataType: 'text',
success: function (data) {
var jsonDa = eval('(' + data + ')');
var strcheckBox = "<input type='checkbox' name='BusinessCheckALL' onclick='BusinessCheckALLCLICK()' value='全选'/><font color='#FF0000'>全选</font>";
for (var i = 0; i < jsonDa.length; i++) {
var strInput = "<input type='checkbox' onClick='BusinessCheckClick()' id=BusinessCheck_" + jsonDa[i].businessId + " name='BusinessCheck' class='provinceDetail' title='" + jsonDa[i].businessName + "' value='" + jsonDa[i].businessId + "'/>" + jsonDa[i].businessName;
if((i !=0)&&((i+1)%6 ===0)){strInput=strInput+'<br>'}
strcheckBox += strInput;
}
$("#businessActivedListTd").append(strcheckBox);
}
});
}
//--2018.1.23 bymoi
//数据源 复选框 点击 事件
function dataSourceRadioClick() {
$("input[name='dataSourceRadioAll']").removeAttr('checked');
$("#businessActivedListTd").empty();
$("#dimKpiListTd").empty();
......@@ -612,7 +810,7 @@
success: function (data) {
var jsonDa = eval('(' + data + ')');
var strcheckBox = "";
var strcheckBox = "<input type='checkbox' name='BusinessCheckALL' onclick='BusinessCheckALLCLICK()' value='全选'/><font color='#FF0000'>全选</font>";
for (var i = 0; i < jsonDa.length; i++) {
var strInput = "<input type='checkbox' onClick='BusinessCheckClick()' id=BusinessCheck_" + jsonDa[i].businessId + " name='BusinessCheck' class='provinceDetail' title='" + jsonDa[i].businessName + "' value='" + jsonDa[i].businessId + "'/>" + jsonDa[i].businessName;
if((i !=0)&&((i+1)%6 ===0)){strInput=strInput+'<br>'}
......@@ -664,6 +862,7 @@
for (var i = 0; i < jsonDa.length; i++) {
if ($.inArray(jsonDa[i].kpiId, dimKpiSelected) < 0) {
if(colLength == 0){$("#dimKpiListTd").append("<input type='checkbox' value='全选' name='dimKpiAllChecked' onclick='dimKpiAllCheckedClick()'/><font color='#FF0000'>全选</font>")}
var strInput = "<input type='checkbox' id=dimKpiCheck_" + jsonDa[i].kpiId + " name='dimKpiCheck' class='provinceDetail' title='"+jsonDa[i].code + "' value='" + jsonDa[i].kpiId + "'/><font>" + jsonDa[i].name + "</font>";
if((colLength !=0)&&((colLength+1)%5 ===0)){strInput=strInput+'<br>'}
$("#dimKpiListTd").append(strInput);
......@@ -781,6 +980,14 @@
}
});
//如果 指标栏 全选复选框 选中
if($("input[name='dimKpiAllChecked']").attr('checked')){
$("#dimKpiListTd").empty();
}
//如果 指标栏不存在 指标 条项
if($("input[name='dimKpiCheck']").length ===0){
$("#dimKpiListTd").empty();
}
/*sumkpiWeightTdVal += tt;
var maxV = parseFloat((1 - Number(sumkpiWeightTdVal)).toFixed(2));
$("#kpiWeightTd").val(maxV === 0?'':parseFloat(maxV));*/
......
......@@ -167,6 +167,12 @@
<tr id="dataSourceTr">
<td>数据源:</td>
<td>
<label>
<div class="checkbox-inline">
<input type="checkbox" name="dataSourceRadioAll" value="全选"
onclick="dataSourceRadioAllCheckedClick()"/><font color="#FF0000">全选</font>
</div>
</label>
<c:forEach items="${dataSourceList}" var="dataSource">
<div class="checkbox-inline">
<label>
......@@ -183,7 +189,12 @@
<tr id="channelTr">
<td>渠道:</td>
<td>
<%--<div class="checkbox-inline"><label><input type="checkbox" name="channelList" id="channelList" title="allSelect" checked />全选</label></div>--%>
<label>
<div class="checkbox-inline">
<input type="checkbox" name="channelRadioAll" value="全选"
onclick="channelRadioAllCheckedClick()"/><font color="#FF0000">全选</font>
</div>
</label>
<c:forEach items="${channelList}" var="channel">
<div class="checkbox-inline">
<label>
......@@ -503,6 +514,7 @@
}
//业务 复选框点击
function BusinessCheckClick() {
// 清空 指标 一栏 所有 指标
$("#dimKpiListTd").empty();
......@@ -559,6 +571,10 @@
if(arrdimKpiChecked.indexOf(jsonDa[i].kpiId) >= 0){
continue;
}
if(colLength == 0){
$("#dimKpiListTd").append(
"<input type='checkbox' value='全选' name='dimKpiAllChecked' onclick='dimKpiAllCheckedClick()'/><font color='#FF0000'>全选</font>")
}
var strInput = "<input type='checkbox' id=dimKpiCheck_" + jsonDa[i].kpiId + " name='dimKpiCheck' class='provinceDetail' title='"+jsonDa[i].code+ "' value=" + jsonDa[i].kpiId + "'/><font>" + jsonDa[i].name + "</font>";
if((colLength !=0)&&((colLength+1)%5 ===0)){strInput=strInput+'<br>'}
$("#dimKpiListTd").append(strInput);
......@@ -607,6 +623,7 @@
}
function channelRadioClick() {
$("input[name='channelRadioAll']").removeAttr('checked');
$("#businessActivedListTd").empty();
$("#dimKpiListTd").empty();
......@@ -646,7 +663,7 @@
success: function (data) {
var jsonDa = eval('(' + data + ')');
var strcheckBox = "";
var strcheckBox = "<input type='checkbox' name='BusinessCheckALL' onclick='BusinessCheckALLCLICK()' value='全选'/><font color='#FF0000'>全选</font>";
for (var i = 0; i < jsonDa.length; i++) {
var strInput = "<input type='checkbox' id=BusinessCheck_" + jsonDa[i].businessId + " name='BusinessCheck' onClick='BusinessCheckClick()' class='provinceDetail' title='" + jsonDa[i].businessName + "' value=" + jsonDa[i].businessId + "'/>" + jsonDa[i].businessName;
if((i !=0)&&((i+1)%6 ===0)){strInput=strInput+'<br>'}
......@@ -662,6 +679,7 @@
function dataSourceRadioClick() {
$("input[name='dataSourceRadioAll']").removeAttr('checked');
$("#businessActivedListTd").empty();
$("#dimKpiListTd").empty();
// 重置 指标 一栏 筛选保留原有的 和已选择的 指标
......@@ -699,7 +717,7 @@
success: function (data) {
var jsonDa = eval('(' + data + ')');
var strcheckBox = "";
var strcheckBox = "<input type='checkbox' name='BusinessCheckALL' onclick='BusinessCheckALLCLICK()' value='全选'/><font color='#FF0000'>全选</font>";
for (var i = 0; i < jsonDa.length; i++) {
var strInput = "<input type='checkbox' id=BusinessCheck_" + jsonDa[i].businessId + " name='BusinessCheck' onClick='BusinessCheckClick()' class='provinceDetail' title='" + jsonDa[i].businessName + "' value=" + jsonDa[i].businessId + "'/>" + jsonDa[i].businessName;
if((i !=0)&&((i+1)%6 ===0)){strInput=strInput+'<br>'}
......@@ -790,6 +808,14 @@
}
});
}
//如果 指标栏 全选复选框 选中
if($("input[name='dimKpiAllChecked']").attr('checked')){
$("#dimKpiListTd").empty();
}
//如果 指标栏不存在 指标 条项
if($("input[name='dimKpiCheck']").length ===0){
$("#dimKpiListTd").empty();
}
/*sumkpiWeightTdVal=curm01+Number(sumkpiWeightTdVal);
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2))===0?'':parseFloat((1-sumkpiWeightTdVal).toFixed(2)));*/
......@@ -827,6 +853,217 @@
}
//数据源 全选复选框 点击 事件 2018.1.23 bymoi
function dataSourceRadioAllCheckedClick(){
//判断 全选框是否选中 若选中 所有 数据源复选框 都选中
if($("input[name='dataSourceRadioAll']").attr('checked')){
$("input[name='dataSourceRadio']").attr('checked','true');
}else{
$("input[name='dataSourceRadio']").removeAttr('checked');
}
$("#businessActivedListTd").empty();
$("#dimKpiListTd").empty();
var channelId = $("input[name='channelRadio']:checked").val();
var dataSourceId = $("input[name='dataSourceRadio']:checked").val();
var channelArray = new Array();// 存放 所选 频道
var i = 0;
$("input[name='channelRadio']:checked").each(function () {
channelArray[i] = $(this).val();
i++;
});
var dataSourceArray = new Array();// 存放 所选数据源
var j = 0;
$("input[name='dataSourceRadio']:checked").each(function () {
dataSourceArray[j] = $(this).val();
j++;
});
if (channelArray.length < 0 || dataSourceArray.length < 0) {
return;
}
$.ajax({
type: 'GET',
async: true,
contentType: 'application/json',
url: "${ctx}/MonitorOperation/AssociateDiagosisConfiguration/getBusinessByChannelIdListAndDataSourceIdList?dataSourceId=" + dataSourceArray + "&channelId=" + channelArray,
dataType: 'text',
success: function (data) {
var jsonDa = eval('(' + data + ')');
var strcheckBox = "<input type='checkbox' name='BusinessCheckALL' onclick='BusinessCheckALLCLICK()' value='全选'/><font color='#FF0000'>全选</font>";
for (var i = 0; i < jsonDa.length; i++) {
var strInput = "<input type='checkbox' onClick='BusinessCheckClick()' id=BusinessCheck_" + jsonDa[i].businessId + " name='BusinessCheck' class='provinceDetail' title='" + jsonDa[i].businessName + "' value='" + jsonDa[i].businessId + "'/>" + jsonDa[i].businessName;
if((i !=0)&&((i+1)%6 ===0)){strInput=strInput+'<br>'}
strcheckBox += strInput;
}
$("#businessActivedListTd").append(strcheckBox);
}
});
}
//--2018.1.23 bymoi
//渠道 全选复选框 点击 事件 2018.1.23 bymoi
function channelRadioAllCheckedClick(){
//判断 全选框是否选中 若选中 所有 渠道复选框 都选中
if($("input[name='channelRadioAll']").attr('checked')){
$("input[name='channelRadio']").attr('checked','true');
}else{
$("input[name='channelRadio']").removeAttr('checked');
}
$("#businessActivedListTd").empty();
$("#dimKpiListTd").empty();
var channelId = $("input[name='channelRadio']:checked").val();
var dataSourceId = $("input[name='dataSourceRadio']:checked").val();
var channelArray = new Array();// 存放 所选 频道
var i = 0;
$("input[name='channelRadio']:checked").each(function () {
channelArray[i] = $(this).val();
i++;
});
var dataSourceArray = new Array();// 存放 所选数据源
var j = 0;
$("input[name='dataSourceRadio']:checked").each(function () {
dataSourceArray[j] = $(this).val();
j++;
});
if (channelArray.length < 0 || dataSourceArray.length < 0) {
return;
}
$.ajax({
type: 'GET',
async: true,
contentType: 'application/json',
url: "${ctx}/MonitorOperation/AssociateDiagosisConfiguration/getBusinessByChannelIdListAndDataSourceIdList?dataSourceId=" + dataSourceArray + "&channelId=" + channelArray,
dataType: 'text',
success: function (data) {
var jsonDa = eval('(' + data + ')');
var strcheckBox = "<input type='checkbox' name='BusinessCheckALL' onclick='BusinessCheckALLCLICK()' value='全选'/><font color='#FF0000'>全选</font>";
for (var i = 0; i < jsonDa.length; i++) {
var strInput = "<input type='checkbox' onClick='BusinessCheckClick()' id=BusinessCheck_" + jsonDa[i].businessId + " name='BusinessCheck' class='provinceDetail' title='" + jsonDa[i].businessName + "' value='" + jsonDa[i].businessId + "'/>" + jsonDa[i].businessName;
if((i !=0)&&((i+1)%6 ===0)){strInput=strInput+'<br>'}
strcheckBox += strInput;
}
$("#businessActivedListTd").append(strcheckBox);
}
});
}
// 2018.1.23 bymoi
//业务 全选复选框 点击 事件 2018.1.23 bymoi
function BusinessCheckALLCLICK(){
if($("input[name='BusinessCheckALL']").attr('checked')){
$("input[name='BusinessCheck']").attr('checked','true');
}else{
$("input[name='BusinessCheck']").removeAttr('checked');
}
// 清空 指标 一栏 所有 指标
$("#dimKpiListTd").empty();
//$("#dimKpiListTd").empty();
//获取选择的 业务
var businessSelectedArr =new Array();
$("input[name='BusinessCheck']").each(function (e) {
if ($(this).attr("checked")) {
businessSelectedArr.push($(this).context.id.split("_")[1]);
}
});
if (businessSelectedArr.length < 1) {
return;
}
var dimKpiHadSelectedArr = new Array();//原有的指标
$("#addTr").find("tr").each(function(){
var id=$(this).attr("id");
id=Number(id.split("_")[1]);
dimKpiHadSelectedArr.push(id);
});
// 重置 指标 一栏 筛选保留原有的 指标
/*$("input[name='dimKpiCheck']").each(function (e) {
if (!$(this).attr("checked")) {
$(this).next().remove();
$(this).remove();
}
});*/
var arrdimKpiChecked=getValueOfNamedimKpiCheck();
$.ajax({
type: 'GET',
async: true,
contentType: 'application/json',
url: "${ctx}/MonitorOperation/AssociateDiagosisConfiguration/getDimKpiListByBusinessIdList?businessIdList=" + businessSelectedArr,
dataType: 'text',
success: function (data) {
var jsonDa = eval('(' + data + ')');
var colLength=0;
for (var i = 0; i < jsonDa.length; i++) {
if (dimKpiHadSelectedArr.indexOf(jsonDa[i].kpiId) >= 0) {
continue;
}
if(arrdimKpiChecked.indexOf(jsonDa[i].kpiId) >= 0){
continue;
}
var strInput = "<input type='checkbox' id=dimKpiCheck_" + jsonDa[i].kpiId + " name='dimKpiCheck' class='provinceDetail' title='"+jsonDa[i].code+ "' value=" + jsonDa[i].kpiId + "'/><font>" + jsonDa[i].name + "</font>";
if((colLength !=0)&&((colLength+1)%5 ===0)){strInput=strInput+'<br>'}
if(colLength == 0){$("#dimKpiListTd").append("<input type='checkbox' value='全选' name='dimKpiAllChecked' onclick='dimKpiAllCheckedClick()'/><font color='#FF0000'>全选</font>")}
$("#dimKpiListTd").append(strInput);
colLength=colLength+1;
}
}
});
}
// 2018.1.23 bymoi
// 2018.1.23 bymoi
//指标复选框 全选 2018.1.23 bymoi
function dimKpiAllCheckedClick(){
if($("input[name='dimKpiAllChecked']").attr('checked')){
$("input[name='dimKpiCheck']").attr('checked','true');
}else{
$("input[name='dimKpiCheck']").removeAttr('checked');
}
}
//2018.1.23 bymoi
</script>
</body>
</html>
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