Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cmszMonitorAnalysis
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuna
cmszMonitorAnalysis
Commits
f49cbb74
Commit
f49cbb74
authored
Dec 21, 2017
by
胡斌
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/moly'
parents
53aa1338
c2cc7a83
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
925 additions
and
460 deletions
+925
-460
AssociateDiagosisConfigurationController.java
...oroperation/AssociateDiagosisConfigurationController.java
+1
-14
GZFX__Dimension_Province_detail.tag
...n/webapp/WEB-INF/tags/GZFX__Dimension_Province_detail.tag
+156
-148
GZFX__Dimension_Province_detail_associateDiagosisDetail.tag
...FX__Dimension_Province_detail_associateDiagosisDetail.tag
+396
-0
GZFX__Time_Dimension_Province_AssociateDiagosisConfiguration.tag
...ime_Dimension_Province_AssociateDiagosisConfiguration.tag
+15
-9
AssociateDiagosisConfiguration.jsp
...views/MonitorOperation/AssociateDiagosisConfiguration.jsp
+6
-4
AssociateDiagosisDetail.jsp
...EB-INF/views/MonitorOperation/AssociateDiagosisDetail.jsp
+1
-1
CreateDiagosis.jsp
.../webapp/WEB-INF/views/MonitorOperation/CreateDiagosis.jsp
+350
-284
No files found.
src/main/java/com/hp/cmsz/web/monitoroperation/AssociateDiagosisConfigurationController.java
View file @
f49cbb74
...
...
@@ -430,11 +430,7 @@ public class AssociateDiagosisConfigurationController {
try
{
/*String[] dimKpiSelSelectedArr = dimKpiSelSelectedarr.split(",");
List<Long> dimKpiSelSelectedList = new ArrayList<Long>();//指标名称 ID
for (String s : dimKpiSelSelectedArr) {
dimKpiSelSelectedList.add(Long.parseLong(s));
}*/
Long
associationIdL
=
Long
.
parseLong
(
associationId
);
//associationId
...
...
@@ -466,17 +462,8 @@ public class AssociateDiagosisConfigurationController {
relInfo
.
setDimAssociationAnaInfo
(
dimAssociationAnaInfo
);
dimKpiAssociationRelInfoList
.
add
(
relInfo
);
}
/*for (Long aLong : dimKpiSelSelectedList) {
DimKpiAssociationRelInfo relInfo = new DimKpiAssociationRelInfo();
relInfo.setKpiAssociationRelatedId(-1L);
relInfo.setKpiId(aLong);
relInfo.setKpiWeight(BigDecimal.valueOf(kpiWeightTdVL));
relInfo.setDimAssociationAnaInfo(dimAssociationAnaInfo);
dimKpiAssociationRelInfoList.add(relInfo);
}*/
// dimAssociationAnaInfo.setItems(dimKpiAssociationRelInfoList);
associateDiagosisConfigurationService
.
updateAssociDigConfig
(
associationIdL
,
dimKpiAssociationRelInfoList
);
...
...
src/main/webapp/WEB-INF/tags/GZFX__Dimension_Province_detail.tag
View file @
f49cbb74
<%@tag pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"
/>
<%@tag pageEncoding="UTF-8"
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<div id="timeLine" class="date">
<label for="">时间范围</label><!-- 最近3年 -->
<input id="d1" class="Wdate" type="text" value="" onFocus="var d2=$dp.$('d2');WdatePicker({onpicked:function(){d2.focus();},minDate:'{%y-3}-%M-%d %H:%m:%s',maxDate:'#F{$dp.$D(\'d2\')||\'%y-%M-%d %H:%m:%s\'}'})">
<input id="d1" class="Wdate" type="text" value=""
onFocus="var d2=$dp.$('d2');WdatePicker({onpicked:function(){d2.focus();},minDate:'{%y-3}-%M-%d %H:%m:%s',maxDate:'#F{$dp.$D(\'d2\')||\'%y-%M-%d %H:%m:%s\'}'})">
--
<input id="d2" class="Wdate" type="text" value=""
onFocus="WdatePicker({minDate:'#F{$dp.$D(\'d1\')||\'{%y-3}-%M-%d %H:%m:%s\'}',maxDate:'%y-%M-%d %H:%m:%s'})">
<input id="d2" class="Wdate" type="text" value=""
onFocus="WdatePicker({minDate:'#F{$dp.$D(\'d1\')||\'{%y-3}-%M-%d %H:%m:%s\'}',maxDate:'%y-%M-%d %H:%m:%s'})">
<%--<input id="d1" class="Wdate" type="text" style="width:137px;" value="" onFocus="var d2=$dp.$('d2');WdatePicker({onpicked:function(){d2.focus();},minDate:'{%y-3}-%M-%d %H:%m:%s',maxDate:'#F{$dp.$D(\'d2\')||\'%y-%M-%d %H:%m:%s\'}',dateFmt:'yyyy-MM-dd'})">
...
...
@@ -49,8 +50,7 @@
</div>
<script type="text/javascript">
function initStartTime()
{
function initStartTime() {
var now = new Date();
var year = now.getFullYear(); //年
...
...
@@ -62,115 +62,115 @@
var clock = year + "-";
if(month < 10)
if
(month < 10)
clock += "0";
clock += month + "-";
if(day < 10)
if
(day < 10)
clock += "0";
clock += day + " ";
if(hh < 10)
if
(hh < 10)
clock += "0";
clock += hh + ":";
if (mm < 10) clock += '0';
clock += mm;
clock += ":"
+
"00";
return(clock);
clock += ":"
+
"00";
return
(clock);
}
function initEndTime() {
var date = new Date();
var daysInMonth = new Array([0],
[31],[28],[31],[30],[31],[30],[31],[31],[30],[31],[30],
[31]);
var daysInMonth = new Array([0],
[31], [28], [31], [30], [31], [30], [31], [31], [30], [31], [30],
[31]);
var strYear = date.getFullYear();
var strDay = date.getDate();
var strMonth = date.getMonth()
+
1;
var strMonth = date.getMonth()
+
1;
var hh = date.getHours(); //时
var mm = date.getMinutes(); //分
if
(strYear%4 == 0 && strYear%100 != 0)
{
if
(strYear % 4 == 0 && strYear % 100 != 0)
{
daysInMonth[2] = 29;
}
if(strMonth - 1 == 0)
{
if (strMonth - 1 == 0) {
strYear -= 1;
strMonth = 12;
}
else
{
else {
strMonth -= 1;
}
strDay = daysInMonth[strMonth] >= strDay ? strDay : daysInMonth[strMonth];
if(strMonth<10)
{
strMonth="0"+strMonth;
if (strMonth < 10) {
strMonth = "0" + strMonth;
}
if(strDay<10)
{
strDay="0"+strDay;
if (strDay < 10) {
strDay = "0" + strDay;
}
var clock = strYear
+"-"+strMonth+"-"+
strDay;
var clock = strYear
+ "-" + strMonth + "-" +
strDay;
clock += " ";
if(hh < 10)
if
(hh < 10)
clock += "0";
clock += hh + ":";
if (mm < 10) clock += '0';
clock += mm;
clock += ":"
+
"00";
clock += ":"
+
"00";
return(clock);
return
(clock);
}
//初始化时间控件的默认值,需要在页面加载时调用此初始化方法
function initDate(){
function initDate()
{
$(".date #d1").val(initEndTime());
$(".date #d2").val(initStartTime());
}
var detailProviderCheckedValues
=
$(".providerDetail:checked");
var detailProviderCheckedValues
=
$(".providerDetail:checked");
$("#allProviderDetail").click(function
()
{
if
($("#allProviderDetail").attr("checked") == "checked")
{//全选
$(".providerDetail").attr("checked","checked");
$("#allProviderDetail").click(function
()
{
if
($("#allProviderDetail").attr("checked") == "checked")
{//全选
$(".providerDetail").attr("checked",
"checked");
// $(".providerDetail").attr("disabled",true);
detailProviderCheckedValues
=
$(".providerDetail:checked");
detailProviderCheckedValues
=
$(".providerDetail:checked");
//alert(getDetailChannelCheckedValuesString());
detailProviderChange();
}
else
{//不全选
$(".providerDetail").attr("checked",false);
$(".providerDetail").attr("disabled",false);
detailProviderCheckedValues
=
$(".providerDetail:checked");
}
else
{//不全选
$(".providerDetail").attr("checked",
false);
$(".providerDetail").attr("disabled",
false);
detailProviderCheckedValues
=
$(".providerDetail:checked");
// alert(getDetailChannelCheckedValuesString());
detailProviderChange();
}
judge
=
false;
judge
=
false;
});
$(".providerDetail").click(function(){
var clickFlag=true;//是否全部选中
$(".providerDetail").each(function(){
if($(this).attr("checked") == null||$(this).attr("checked") == false){ clickFlag=false; }
$(".providerDetail").click(function () {
var clickFlag = true;//是否全部选中
$(".providerDetail").each(function () {
if ($(this).attr("checked") == null || $(this).attr("checked") == false) {
clickFlag = false;
}
});
$("#allProviderDetail").attr("checked",clickFlag);
detailProviderCheckedValues
=
$(".providerDetail:checked");
$("#allProviderDetail").attr("checked",
clickFlag);
detailProviderCheckedValues
=
$(".providerDetail:checked");
detailProviderChange();
//alert(getDetailProviderCheckedValuesString());
//alert(getDetailProviderCheckedTitles());
judge
=
false;
judge
=
false;
});
//返回结果为一个数组,数组中包含选中的渠道类型
function getDetailProviderCheckedValues(){
var detailProviderArray
=
new Array();
var i
=
0;
detailProviderCheckedValues.each(function
()
{
detailProviderArray[i]
=
$(this).val();
function getDetailProviderCheckedValues()
{
var detailProviderArray
=
new Array();
var i
=
0;
detailProviderCheckedValues.each(function
()
{
detailProviderArray[i]
=
$(this).val();
i++;
});
...
...
@@ -178,9 +178,9 @@
}
//返回结果为逗号分隔的ID字串
function getDetailProviderCheckedValuesString(){
function getDetailProviderCheckedValuesString()
{
//var detailProviderStr="";
var detailProviderArray
=
getDetailProviderCheckedValues();
var detailProviderArray
=
getDetailProviderCheckedValues();
// detailProviderArray.join(",");
// if($("#allProviderDetail").attr("checked") == "checked"){detailProviderArray.push("-1");}
/* for(var i=0;i<detailProviderArray.length;i++){
...
...
@@ -195,35 +195,35 @@
//返回 关联维度 的 选择值
function getDetailCheckeddDimension() {
var checkedDimension
=
$("#xcdStatusSelect option:selected").val();
console.log("checkedDimension "
+
checkedDimension);
var checkedDimension
=
$("#xcdStatusSelect option:selected").val();
console.log("checkedDimension "
+
checkedDimension);
return checkedDimension;
}
//返回结果集成商名称集
function getDetailProviderCheckedTitles(){
var detailProviderArray
=
new Array();
var i
=
0;
detailProviderCheckedValues.each(function
()
{
detailProviderArray[i]
=
$(this).attr("title");
function getDetailProviderCheckedTitles()
{
var detailProviderArray
=
new Array();
var i
=
0;
detailProviderCheckedValues.each(function
()
{
detailProviderArray[i]
=
$(this).attr("title");
i++;
});
var detailProviderTitles
=
"";
for
(i=0;i<detailProviderArray.length;i++)
{
if
(i==detailProviderArray.length-1)
{
detailProviderTitles
+=
detailProviderArray[i];
}
else
{
detailProviderTitles
+=detailProviderArray[i]+
" ";
var detailProviderTitles
=
"";
for
(i = 0; i < detailProviderArray.length; i++)
{
if
(i == detailProviderArray.length - 1)
{
detailProviderTitles
+=
detailProviderArray[i];
}
else
{
detailProviderTitles
+= detailProviderArray[i] +
" ";
}
}
return detailProviderTitles;
}
function detailProviderReset(){
$("#allProviderDetail").attr("checked","checked");
$(".providerDetail").attr("checked","checked");
detailProviderCheckedValues
=
$(".providerDetail:checked");
function detailProviderReset()
{
$("#allProviderDetail").attr("checked",
"checked");
$(".providerDetail").attr("checked",
"checked");
detailProviderCheckedValues
=
$(".providerDetail:checked");
detailProviderChange();
}
...
...
@@ -231,54 +231,57 @@
</script>
<script type="text/javascript">
var detailProvinceCheckedValues
=
$(".provinceDetail:checked");
var detailProvinceCheckedValues
=
$(".provinceDetail:checked");
//全选和不全选所有的省
$("#allProvinceDetail").click(function
()
{
if
($("#allProvinceDetail").attr("checked") == "checked")
{//全选
$(".provinceDetail").attr("checked","checked");
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
}
else
{//不全选
$(".provinceDetail").attr("checked",false);
$(".provinceDetail").attr("disabled",false);
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
}
judge
=
false;
$("#allProvinceDetail").click(function
()
{
if
($("#allProvinceDetail").attr("checked") == "checked")
{//全选
$(".provinceDetail").attr("checked",
"checked");
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
}
else
{//不全选
$(".provinceDetail").attr("checked",
false);
$(".provinceDetail").attr("disabled",
false);
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
}
judge
=
false;
});
//选中勾选了的省
$(".provinceDetail").click(function(){
var clickFlag=true;//是否全部选中
$(".provinceDetail").each(function(){
if($(this).attr("checked") == null||$(this).attr("checked") == false){ clickFlag=false; }
$(".provinceDetail").click(function () {
var clickFlag = true;//是否全部选中
$(".provinceDetail").each(function () {
if ($(this).attr("checked") == null || $(this).attr("checked") == false) {
clickFlag = false;
}
});
$("#allProvinceDetail").attr("checked",clickFlag);
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
$("#allProvinceDetail").attr("checked",
clickFlag);
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
//alert(getDetailProvinceCheckedValueString());
judge
=
false;
judge
=
false;
});
//重置
function detailProvinceReset(){
$("#allProvinceDetail").attr("checked","checked");
$(".provinceDetail").attr("checked","checked");
detailProvinceCheckedValues
=
$(".provinceDetail");
function detailProvinceReset()
{
$("#allProvinceDetail").attr("checked",
"checked");
$(".provinceDetail").attr("checked",
"checked");
detailProvinceCheckedValues
=
$(".provinceDetail");
}
//返回结果为一个数组,数组中包含选中的省份
function getDetailProvinceCheckedValues(){
var provinceArray
=
new Array();
detailProvinceCheckedValues.each(function
()
{
function getDetailProvinceCheckedValues()
{
var provinceArray
=
new Array();
detailProvinceCheckedValues.each(function
()
{
provinceArray.push($(this).val());
});
console.log("provinceArray "
+provinceArray
);
console.log("provinceArray "
+ provinceArray
);
return provinceArray;
}
//获取 选择的省份
function getDetailProvinceCheckedValueString(){
function getDetailProvinceCheckedValueString()
{
//var detailProvince = "";
var provinceArray
=
getDetailProvinceCheckedValues();
var provinceArray
=
getDetailProvinceCheckedValues();
//provinceArray.join("-1");
//if($("#allProvinceDetail").attr("checked") == "checked"){provinceArray.push("-1");}
/* for(var i=0;i<provinceArray.length;i++){
...
...
@@ -293,19 +296,19 @@
//返回结果为选中的省份名,筛选项标签
function getDetailProvinceCheckedTitles(){
var provinceArray
=
new Array();
var i
=
0;
$(".provinceDetail:checked").each(function
()
{
provinceArray[i]
=
$(this).attr("title");
function getDetailProvinceCheckedTitles()
{
var provinceArray
=
new Array();
var i
=
0;
$(".provinceDetail:checked").each(function
()
{
provinceArray[i]
=
$(this).attr("title");
i++;
});
var detailProvinceTitles
=
"";
for
(var i=0;i<provinceArray.length;i++)
{
if
(i==provinceArray.length-1)
{
detailProvinceTitles
+=
provinceArray[i];
}
else
{
detailProvinceTitles
+=provinceArray[i]+
" ";
var detailProvinceTitles
=
"";
for
(var i = 0; i < provinceArray.length; i++)
{
if
(i == provinceArray.length - 1)
{
detailProvinceTitles
+=
provinceArray[i];
}
else
{
detailProvinceTitles
+= provinceArray[i] +
" ";
}
}
return detailProvinceTitles;
...
...
@@ -313,56 +316,59 @@
</script>
<%--************************************************集成商与省份联动***************************************** --%>
<script type="text/javascript">
function detailProviderChange(){
function detailProviderChange()
{
$("#provinceSelectAreaDetail").empty();
var providerSelectIds = getDetailProviderCheckedValuesString();
$.ajax({
type : 'GET',
contentType : 'application/json',
url: '${ctx}/MonitorOperation/FailureStatisticsCriteria/provider_select/'+providerSelectIds+'/'+Date.parse(new Date()),
dataType : 'text',
beforeSend: function(data) {},
success: function(data) {
for(var i=0;i<data.length;i++){
if(data[i]=='\"'){
data=data.replace('\"','\'');
type: 'GET',
contentType: 'application/json',
url: '${ctx}/MonitorOperation/FailureStatisticsCriteria/provider_select/' + providerSelectIds + '/' + Date.parse(new Date()),
dataType: 'text',
beforeSend: function (data) {
},
success: function (data) {
for (var i = 0; i < data.length; i++) {
if (data[i] == '\"') {
data = data.replace('\"', '\'');
}
}
data
=eval("("+data+
")");//获取从后台返回的数据,通常是Json格式
data
= eval("(" + data +
")");//获取从后台返回的数据,通常是Json格式
if
(data != null && data != "")
{
$("#allProvinceDetail").attr("checked",true);
for
(var t=0;t<data.length;t++)
{
$("#provinceSelectAreaDetail").append('<div class="checkbox-inline"><label><input type="checkbox" name="provinceDetail" class="provinceDetail" title="'
+data[t].provinceName+'" value="'+data[t].provinceId+'" checked>'+data[t].provinceName+
'</label></div>');
if
(data != null && data != "")
{
$("#allProvinceDetail").attr("checked",
true);
for
(var t = 0; t < data.length; t++)
{
$("#provinceSelectAreaDetail").append('<div class="checkbox-inline"><label><input type="checkbox" name="provinceDetail" class="provinceDetail" title="'
+ data[t].provinceName + '" value="' + data[t].provinceId + '" checked>' + data[t].provinceName +
'</label></div>');
}
}
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
//全选和不全选所有的省
$("#allProvinceDetail").click(function
()
{
if
($("#allProvinceDetail").attr("checked") == "checked")
{//全选
$(".provinceDetail").attr("checked","checked");
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
}
else
{//不全选
$(".provinceDetail").attr("checked",false);
$(".provinceDetail").attr("disabled",false);
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
}
judge
=
false;
$("#allProvinceDetail").click(function
()
{
if
($("#allProvinceDetail").attr("checked") == "checked")
{//全选
$(".provinceDetail").attr("checked",
"checked");
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
}
else
{//不全选
$(".provinceDetail").attr("checked",
false);
$(".provinceDetail").attr("disabled",
false);
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
}
judge
=
false;
});
//选中勾选了的省
$(".provinceDetail").click(function(){
var clickFlag=true;//是否全部选中
$(".provinceDetail").each(function(){
if($(this).attr("checked") == null||$(this).attr("checked") == false){ clickFlag=false; }
$(".provinceDetail").click(function () {
var clickFlag = true;//是否全部选中
$(".provinceDetail").each(function () {
if ($(this).attr("checked") == null || $(this).attr("checked") == false) {
clickFlag = false;
}
});
$("#allProvinceDetail").attr("checked",clickFlag);
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
$("#allProvinceDetail").attr("checked",
clickFlag);
detailProvinceCheckedValues
=
$(".provinceDetail:checked");
//alert(getDetailProvinceCheckedValueString());
judge
=
false;
judge
=
false;
});
}
});
...
...
@@ -372,12 +378,13 @@
// reset province
function detail_Province_Reset() {
$("#allProvinceDetail").attr("checked","checked");
$(".provinceDetail").attr("checked","checked");
$("#allProvinceDetail").attr("checked",
"checked");
$(".provinceDetail").attr("checked",
"checked");
}
// reset dimension
function detail_Dimension_Reset(){
function detail_Dimension_Reset()
{
$("#xcdStatusSelect option").removeAttr("selected");
$("#xcdStatusSelect option:eq(1)").attr("selected",true);
$("#xcdStatusSelect option:eq(1)").attr("selected",
true);
}
</script>
\ No newline at end of file
src/main/webapp/WEB-INF/tags/GZFX__Dimension_Province_detail_associateDiagosisDetail.tag
0 → 100644
View file @
f49cbb74
<%@tag pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<div id="timeLine" class="date">
<label for="">时间范围</label><!-- 最近3年 -->
<input id="d1" class="Wdate" type="text" value=""
onFocus="var d2=$dp.$('d2');WdatePicker({onpicked:function(){d2.focus();},minDate:'{%y-3}-%M-%d %H:%m:%s',maxDate:'#F{$dp.$D(\'d2\')||\'%y-%M-%d %H:%m:%s\'}'})">
--
<input id="d2" class="Wdate" type="text" value=""
onFocus="WdatePicker({minDate:'#F{$dp.$D(\'d1\')||\'{%y-3}-%M-%d %H:%m:%s\'}',maxDate:'%y-%M-%d %H:%m:%s'})">
<%--<input id="d1" class="Wdate" type="text" style="width:137px;" value="" onFocus="var d2=$dp.$('d2');WdatePicker({onpicked:function(){d2.focus();},minDate:'{%y-3}-%M-%d %H:%m:%s',maxDate:'#F{$dp.$D(\'d2\')||\'%y-%M-%d %H:%m:%s\'}',dateFmt:'yyyy-MM-dd'})">
--
<input id="d2" class="Wdate" type="text" style="width:137px;" value="" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'d1\')||\'{%y-3}-%M-%d %H:%m:%s\'}',maxDate:'%y-%M-%d %H:%m:%s',dateFmt:'yyyy-MM-dd'})">
--%>
</div>
<div id="more-option" class="slide-menu-option">
<div class="slide-select">
<label for="">关联维度:</label>
<select name="xcdStatus" id="xcdStatusSelect" class="slide-menu-select" onChange="judge=false;">
<option value="c">业务</option>
<option value="q" selected>渠道</option>
<%--<c:forEach var="workingOrderStatus" items="${workingOrderStatusList}">
<option value="${workingOrderStatus}" id="xcdStatus">
${workingOrderStatus}
</option>
</c:forEach>--%>
</select>
</div>
</div>
<%--省份筛选项 --%>
<div id="provinceDetail" class="slide-menu-option">
<label for="">省份</label>
<div class="checkbox-inline"><label><input type="checkbox" name="allProvinceDetail" id="allProvinceDetail"
title="allSelect" checked/>全选</label></div>
<div id="provinceSelectAreaDetail">
<c:forEach items="${provinceList}" var="provinces">
<c:if test="${provinces.provinceId !=32}">
<div class="checkbox-inline">
<label>
<input type="checkbox" name="provinceDetail" class="provinceDetail"
title="${provinces.provinceName}" value="${provinces.provinceId}"
checked/>${provinces.provinceName}
</label>
</div>
</c:if>
</c:forEach>
</div>
</div>
<script type="text/javascript">
function initStartTime() {
var now = new Date();
var year = now.getFullYear(); //年
var month = now.getMonth() + 1; //月
var day = now.getDate(); //日
var hh = now.getHours(); //时
var mm = now.getMinutes(); //分
var clock = year + "-";
if (month < 10)
clock += "0";
clock += month + "-";
if (day < 10)
clock += "0";
clock += day + " ";
if (hh < 10)
clock += "0";
clock += hh + ":";
if (mm < 10) clock += '0';
clock += mm;
clock += ":" + "00";
return (clock);
}
function initEndTime() {
var date = new Date();
var daysInMonth = new Array([0], [31], [28], [31], [30], [31], [30], [31], [31], [30], [31], [30], [31]);
var strYear = date.getFullYear();
var strDay = date.getDate();
var strMonth = date.getMonth() + 1;
var hh = date.getHours(); //时
var mm = date.getMinutes(); //分
if (strYear % 4 == 0 && strYear % 100 != 0) {
daysInMonth[2] = 29;
}
if (strMonth - 1 == 0) {
strYear -= 1;
strMonth = 12;
}
else {
strMonth -= 1;
}
strDay = daysInMonth[strMonth] >= strDay ? strDay : daysInMonth[strMonth];
if (strMonth < 10) {
strMonth = "0" + strMonth;
}
if (strDay < 10) {
strDay = "0" + strDay;
}
var clock = strYear + "-" + strMonth + "-" + strDay;
clock += " ";
if (hh < 10)
clock += "0";
clock += hh + ":";
if (mm < 10) clock += '0';
clock += mm;
clock += ":" + "00";
return (clock);
}
//初始化时间控件的默认值,需要在页面加载时调用此初始化方法
function initDate() {
$(".date #d1").val(initEndTime());
$(".date #d2").val(initStartTime());
}
var detailProviderCheckedValues = $(".providerDetail:checked");
$("#allProviderDetail").click(function () {
if ($("#allProviderDetail").attr("checked") == "checked") {//全选
$(".providerDetail").attr("checked", "checked");
// $(".providerDetail").attr("disabled",true);
detailProviderCheckedValues = $(".providerDetail:checked");
//alert(getDetailChannelCheckedValuesString());
detailProviderChange();
} else {//不全选
$(".providerDetail").attr("checked", false);
$(".providerDetail").attr("disabled", false);
detailProviderCheckedValues = $(".providerDetail:checked");
// alert(getDetailChannelCheckedValuesString());
detailProviderChange();
}
judge = false;
});
$(".providerDetail").click(function () {
var clickFlag = true;//是否全部选中
$(".providerDetail").each(function () {
if ($(this).attr("checked") == null || $(this).attr("checked") == false) {
clickFlag = false;
}
});
$("#allProviderDetail").attr("checked", clickFlag);
detailProviderCheckedValues = $(".providerDetail:checked");
detailProviderChange();
//alert(getDetailProviderCheckedValuesString());
//alert(getDetailProviderCheckedTitles());
judge = false;
});
//返回结果为一个数组,数组中包含选中的渠道类型
function getDetailProviderCheckedValues() {
var detailProviderArray = new Array();
var i = 0;
detailProviderCheckedValues.each(function () {
detailProviderArray[i] = $(this).val();
i++;
});
return detailProviderArray;
}
//返回结果为逗号分隔的ID字串
function getDetailProviderCheckedValuesString() {
//var detailProviderStr="";
var detailProviderArray = getDetailProviderCheckedValues();
// detailProviderArray.join(",");
// if($("#allProviderDetail").attr("checked") == "checked"){detailProviderArray.push("-1");}
/* for(var i=0;i<detailProviderArray.length;i++){
if(i==detailProviderArray.length-1){
detailProviderStr+=detailProviderArray[i];
}else{
detailProviderStr+=detailProviderArray[i]+",";
}
} */
return detailProviderArray;//detailProviderStr;
}
//返回 关联维度 的 选择值
function getDetailCheckeddDimension() {
var checkedDimension = $("#xcdStatusSelect option:selected").val();
console.log("checkedDimension " + checkedDimension);
return checkedDimension;
}
//返回结果集成商名称集
function getDetailProviderCheckedTitles() {
var detailProviderArray = new Array();
var i = 0;
detailProviderCheckedValues.each(function () {
detailProviderArray[i] = $(this).attr("title");
i++;
});
var detailProviderTitles = "";
for (i = 0; i < detailProviderArray.length; i++) {
if (i == detailProviderArray.length - 1) {
detailProviderTitles += detailProviderArray[i];
} else {
detailProviderTitles += detailProviderArray[i] + " ";
}
}
return detailProviderTitles;
}
function detailProviderReset() {
$("#allProviderDetail").attr("checked", "checked");
$(".providerDetail").attr("checked", "checked");
detailProviderCheckedValues = $(".providerDetail:checked");
detailProviderChange();
}
</script>
<script type="text/javascript">
var detailProvinceCheckedValues = $(".provinceDetail:checked");
//全选和不全选所有的省
$("#allProvinceDetail").click(function () {
if ($("#allProvinceDetail").attr("checked") == "checked") {//全选
$(".provinceDetail").attr("checked", "checked");
detailProvinceCheckedValues = $(".provinceDetail:checked");
} else {//不全选
$(".provinceDetail").attr("checked", false);
$(".provinceDetail").attr("disabled", false);
detailProvinceCheckedValues = $(".provinceDetail:checked");
}
judge = false;
});
//选中勾选了的省
$(".provinceDetail").click(function () {
var clickFlag = true;//是否全部选中
$(".provinceDetail").each(function () {
if ($(this).attr("checked") == null || $(this).attr("checked") == false) {
clickFlag = false;
}
});
$("#allProvinceDetail").attr("checked", clickFlag);
detailProvinceCheckedValues = $(".provinceDetail:checked");
//alert(getDetailProvinceCheckedValueString());
judge = false;
});
//重置
function detailProvinceReset() {
$("#allProvinceDetail").attr("checked", "checked");
$(".provinceDetail").attr("checked", "checked");
detailProvinceCheckedValues = $(".provinceDetail");
}
//返回结果为一个数组,数组中包含选中的省份
function getDetailProvinceCheckedValues() {
var provinceArray = new Array();
detailProvinceCheckedValues.each(function () {
provinceArray.push($(this).val());
});
console.log("provinceArray " + provinceArray);
return provinceArray;
}
//获取 选择的省份
function getDetailProvinceCheckedValueString() {
//var detailProvince = "";
var provinceArray = getDetailProvinceCheckedValues();
//provinceArray.join("-1");
//if($("#allProvinceDetail").attr("checked") == "checked"){provinceArray.push("-1");}
/* for(var i=0;i<provinceArray.length;i++){
if(i==provinceArray.length-1){
detailProvince+=provinceArray[i];
}else{
detailProvince+=provinceArray[i]+",";
}
} */
return provinceArray;//detailProvince;
}
//返回结果为选中的省份名,筛选项标签
function getDetailProvinceCheckedTitles() {
var provinceArray = new Array();
var i = 0;
$(".provinceDetail:checked").each(function () {
provinceArray[i] = $(this).attr("title");
i++;
});
var detailProvinceTitles = "";
for (var i = 0; i < provinceArray.length; i++) {
if (i == provinceArray.length - 1) {
detailProvinceTitles += provinceArray[i];
} else {
detailProvinceTitles += provinceArray[i] + " ";
}
}
return detailProvinceTitles;
}
</script>
<%--************************************************集成商与省份联动***************************************** --%>
<script type="text/javascript">
function detailProviderChange() {
$("#provinceSelectAreaDetail").empty();
var providerSelectIds = getDetailProviderCheckedValuesString();
$.ajax({
type: 'GET',
contentType: 'application/json',
url: '${ctx}/MonitorOperation/FailureStatisticsCriteria/provider_select/' + providerSelectIds + '/' + Date.parse(new Date()),
dataType: 'text',
beforeSend: function (data) {
},
success: function (data) {
for (var i = 0; i < data.length; i++) {
if (data[i] == '\"') {
data = data.replace('\"', '\'');
}
}
data = eval("(" + data + ")");//获取从后台返回的数据,通常是Json格式
if (data != null && data != "") {
$("#allProvinceDetail").attr("checked", true);
for (var t = 0; t < data.length; t++) {
$("#provinceSelectAreaDetail").append('<div class="checkbox-inline"><label><input type="checkbox" name="provinceDetail" class="provinceDetail" title="' + data[t].provinceName + '" value="' + data[t].provinceId + '" checked>' + data[t].provinceName + '</label></div>');
}
}
detailProvinceCheckedValues = $(".provinceDetail:checked");
//全选和不全选所有的省
$("#allProvinceDetail").click(function () {
if ($("#allProvinceDetail").attr("checked") == "checked") {//全选
$(".provinceDetail").attr("checked", "checked");
detailProvinceCheckedValues = $(".provinceDetail:checked");
} else {//不全选
$(".provinceDetail").attr("checked", false);
$(".provinceDetail").attr("disabled", false);
detailProvinceCheckedValues = $(".provinceDetail:checked");
}
judge = false;
});
//选中勾选了的省
$(".provinceDetail").click(function () {
var clickFlag = true;//是否全部选中
$(".provinceDetail").each(function () {
if ($(this).attr("checked") == null || $(this).attr("checked") == false) {
clickFlag = false;
}
});
$("#allProvinceDetail").attr("checked", clickFlag);
detailProvinceCheckedValues = $(".provinceDetail:checked");
//alert(getDetailProvinceCheckedValueString());
judge = false;
});
}
});
}
</script>
<script type="text/javascript">
// reset province
function detail_Province_Reset() {
$("#allProvinceDetail").attr("checked", "checked");
$(".provinceDetail").attr("checked", "checked");
}
// reset dimension
function detail_Dimension_Reset() {
$("#xcdStatusSelect option").removeAttr("selected");
$("#xcdStatusSelect option:eq(1)").attr("selected", true);
}
</script>
\ No newline at end of file
src/main/webapp/WEB-INF/tags/GZFX__Time_Dimension_Province_AssociateDiagosisConfiguration.tag
View file @
f49cbb74
...
...
@@ -13,21 +13,27 @@
<div class="slide-select">
<label for="">关联维度:</label>
<select name="xcdStatus" id="xcdStatusSelect" class="slide-menu-select" onChange="judge=false;">
<option value="" selected>全部</option>
<option value="y">业务</option>
<option value="c" selected>渠道</option>
<%--<c:forEach var="workingOrderStatus" items="${workingOrderStatusList}">
<option value="${workingOrderStatus}" id="xcdStatus">
${workingOrderStatus}
</option>
</c:forEach>--%>
<option value="c">渠道</option>
</select>
</div>
</div>
<%--省份筛选项 --%>
<div id="provinceDetail" class="slide-menu-option">
<label for="">省份</label>
<div class="checkbox-inline"><label><input type="checkbox" name="allProvinceDetail" id="allProvinceDetail" title="allSelect" checked />全选</label></div>
<div id="provinceSelectAreaDetail">
<div class="checkbox-inline">
<%--<label><input type="checkbox" name="allProvinceDetail" id="allProvinceDetail" title="allSelect" checked />全选</label>--%>
<label>
<c:forEach items="${provinceList}" var="provinces">
<c:if test="${provinces.provinceId ==32}">
<input type="checkbox" name="provinceDetail" class="provinceDetail" title="${provinces.provinceName}" value="${provinces.provinceId}" checked disabled/>${provinces.provinceName}
</c:if>
</c:forEach>
</label>
</div>
<%--<div id="provinceSelectAreaDetail">
<c:forEach items="${provinceList}" var="provinces">
<div class="checkbox-inline">
<label>
...
...
@@ -35,7 +41,7 @@
</label>
</div>
</c:forEach>
</div>
</div>
--%>
</div>
<script type="text/javascript">
var detailProviderCheckedValues=$(".providerDetail:checked");
...
...
src/main/webapp/WEB-INF/views/MonitorOperation/AssociateDiagosisConfiguration.jsp
View file @
f49cbb74
...
...
@@ -243,7 +243,8 @@
});
$
(
"#createIndicatorsBtn"
).
click
(
function
(){
$
.
dialog
({
window
.
location
.
href
=
"${ctx}/MonitorOperation/AssociateDiagosisConfiguration/createDiagosis"
;
/*$.dialog({
title: "提醒",
content:"确定新建指标?",
ok: function(){location.href="${ctx}/MonitorOperation/AssociateDiagosisConfiguration/createDiagosis";},
...
...
@@ -251,7 +252,7 @@
cancel: function(){},
cancelValue:"取消",
lock:true
});
});
*/
});
//详情
...
...
@@ -309,7 +310,8 @@
$
(
"#updateIndicatorsBtn"
).
click
(
function
(){
var
associationId
=
$
(
"#anaInfoSelected"
).
val
();
$
.
dialog
({
window
.
location
.
href
=
"${ctx}/MonitorOperation/AssociateDiagosisConfiguration/getAanaInfo?associationId="
+
associationId
;
/*$.dialog({
title: "提醒",
content:"确定修改模型?",
ok: function(){location.href="${ctx}/MonitorOperation/AssociateDiagosisConfiguration/getAanaInfo?associationId="+associationId;},
...
...
@@ -317,7 +319,7 @@
cancel: function(){},
cancelValue:"取消",
lock:true
});
});
*/
/* $.confirm("确定修改模型?",
function(){location.href="${ctx}/ModelManage/ModelParameterConfiguration?dataModelId="+modelId;},
function(){}); */
...
...
src/main/webapp/WEB-INF/views/MonitorOperation/AssociateDiagosisDetail.jsp
View file @
f49cbb74
...
...
@@ -96,7 +96,7 @@
<div
class=
"slideMenu"
id=
"cbp-spmenu-s2"
style=
""
>
<div
class=
"form"
>
<tags:GZFX
__Dimension_Province_detail
/>
<tags:GZFX
__Dimension_Province_detail
_associateDiagosisDetail
/>
<button
class=
"btn btn-primary"
onclick=
"detailSubmit()"
>
提交
</button>
<button
class=
"btn btn-warning"
onclick=
"detailReset()"
>
重置
</button>
...
...
src/main/webapp/WEB-INF/views/MonitorOperation/CreateDiagosis.jsp
View file @
f49cbb74
...
...
@@ -15,22 +15,37 @@
<head>
<title>
模型维护
</title>
<style>
.table-null
.table
{
.table-null
.table
{
margin-bottom
:
0px
;
}
.table-null
.table
>
tbody
>
tr
>
td
,
.table-null
.table
>
thead
>
tr
>
th
{
.table-null
.table
>
tbody
>
tr
>
td
,
.table-null
.table
>
thead
>
tr
>
th
{
text-align
:
center
;
width
:
25%
;
}
.table-null
td
:first-child
{
.table-null
td
:first-child
{
text-align
:
right
;
width
:
36%
;
}
.table-null
tr
td
:last-child
.form-control
,
.table-null
tr
td
:last-child
table
{
.table-null
tr
td
:last-child
.form-control
,
.table-null
tr
td
:last-child
table
{
width
:
400px
;
}
.file-box
{
position
:
relative
;}
.file
{
position
:
absolute
;
top
:
0
;
height
:
30px
;
filter
:
alpha
(
opacity
:
0
);
opacity
:
0
;
width
:
470px
;
cursor
:
pointer
;
}
.file-box
{
position
:
relative
;
}
.file
{
position
:
absolute
;
top
:
0
;
height
:
30px
;
filter
:
alpha
(
opacity
:
0
);
opacity
:
0
;
width
:
470px
;
cursor
:
pointer
;
}
/*
.file-box
{
position
:
relative
;
width
:
340px
}
.txt
{
height
:
22px
;
border
:
1px
solid
#cdcdcd
;
width
:
180px
;}
...
...
@@ -58,27 +73,36 @@
<div
class=
"row"
>
<div
class=
"col-xs-12"
>
<div
class=
"table-header"
>
新建指标
</div>
<form
action=
"#"
class=
"form-horizontal"
id=
"modelMaintainForm"
method=
"post"
enctype=
"multipart/form-data"
>
<form
action=
"#"
class=
"form-horizontal"
id=
"modelMaintainForm"
method=
"post"
enctype=
"multipart/form-data"
>
<table
id=
"modelMaintainTable"
class=
"table-null"
>
<tr>
<td>
省份:
</td>
<td>
<div
class=
"checkbox-inline"
>
<
%
--
<
div
class=
"checkbox-inline"
>
<input
type=
"checkbox"
name=
""
id=
"provinceDetailAll"
title=
""
value=
""
/><div
style=
"color:red;"
>
全选
</div>
</div>
</div>
--%>
<c:forEach
var=
"provice"
items=
"${proviceList}"
>
<div
class=
"checkbox-inline"
>
<c:if
test=
"${provice.provinceId ==32}"
>
<label>
<input
type=
"checkbox"
name=
"provinceDetail"
class=
"provinceDetail"
title=
"${provice.provinceName}"
value=
"${provice.provinceId}"
/>
${provice.provinceName}
<input
type=
"checkbox"
name=
"provinceDetail"
class=
"provinceDetail"
title=
"${provice.provinceName}"
value=
"${provice.provinceId}"
checked
disabled
/>
${provice.provinceName}
</label>
</div>
</c:if>
</c:forEach>
</td>
</tr>
<tr>
<td>
维度:
</td>
<td><select
class=
"form-control"
name=
"dimensionTd"
id=
"dimensionTd"
>
<td><select
class=
"form-control"
name=
"dimensionTd"
id=
"dimensionTd"
>
<c:forEach
var=
"modelType"
items=
"${dimensionList}"
>
<c:choose>
...
...
@@ -97,17 +121,26 @@
</tr>
<tr>
<td>
描述(
<font
color=
"red"
>
必填
</font>
):
</td>
<td><input
type=
"text"
class=
"form-control"
name=
"descTd"
id=
"descTd"
style=
"display: inline;"
/>
<span
id=
"writeWarningInf"
style=
"color:red;display: inline;padding-left:10px;"
></span></td>
<td><input
type=
"text"
class=
"form-control"
name=
"descTd"
id=
"descTd"
style=
"display: inline;"
/>
<span
id=
"writeWarningInf"
style=
"color:red;display: inline;padding-left:10px;"
></span></td>
</tr>
<tr>
<td>
已添加指标:
</td>
<td><table
class=
"table table-hover table-striped"
id=
"displayParam"
>
<td>
<table
class=
"table table-hover table-striped"
id=
"displayParam"
>
<thead>
<tr><th>
指标名称
</th><th>
权重值
</th><th><a
href=
"javascript:deleteAllTr()"
>
删除所有
</a></th></tr>
<tr>
<th>
指标名称
</th>
<th>
权重值
</th>
<th><a
href=
"javascript:deleteAllTr()"
>
删除所有
</a></th>
</tr>
</thead>
<tbody
id=
"addTr"
></tbody>
</table></td></tr>
</table>
</td>
</tr>
<tr>
<tr>
<td>
数据源:
</td>
...
...
@@ -116,7 +149,10 @@
<c:forEach
items=
"${dataSourceList}"
var=
"dataSource"
>
<div
class=
"checkbox-inline"
>
<label>
<input
type=
"checkbox"
onclick=
"dataSourceRadioClick()"
name=
"dataSourceRadio"
class=
"provinceDetail"
title=
"${dataSource.dataSourceName}"
value=
"${dataSource.dataSourceId}"
/>
${dataSource.dataSourceName}
<input
type=
"checkbox"
onclick=
"dataSourceRadioClick()"
name=
"dataSourceRadio"
class=
"provinceDetail"
title=
"${dataSource.dataSourceName}"
value=
"${dataSource.dataSourceId}"
/>
${dataSource.dataSourceName}
</label>
</div>
</c:forEach>
...
...
@@ -132,7 +168,10 @@
<c:forEach
items=
"${channelList}"
var=
"channel"
>
<div
class=
"checkbox-inline"
>
<label>
<input
type=
"checkbox"
onclick=
"channelRadioClick()"
name=
"channelRadio"
class=
"provinceDetail"
title=
"${channel.channelId}"
value=
"${channel.channelId}"
/>
${channel.channelName}
<input
type=
"checkbox"
onclick=
"channelRadioClick()"
name=
"channelRadio"
class=
"provinceDetail"
title=
"${channel.channelId}"
value=
"${channel.channelId}"
/>
${channel.channelName}
</label>
</div>
</c:forEach>
...
...
@@ -141,9 +180,8 @@
</tr>
<tr>
<td><
acronym
title=
"ni caicai"
>
业务:
</acronym
></td>
<td><
%
--
<
acronym
title=
"ni caicai"
>
--%>业务:
<
%
--
</
acronym
>
--%
>
</td>
<td
id=
"businessActivedListTd"
>
</td>
...
...
@@ -158,7 +196,8 @@
</tr>
<tr><td></td>
<tr>
<td></td>
<
%
--
<
td
><button
type=
"button"
id=
"selectAnaInfo"
class=
"btn btn-primary btn-small"
>
查找指标
</button>
--%>
<
%
--
<
button
type=
"button"
id=
"selectBusiness"
class=
"btn btn-info- btn-small"
>
查找业务
</button></td>
--%>
<
%
--
<
td
><button
type=
"button"
id=
"addAnaInfo"
class=
"btn btn-primary"
>
添加指标
</button></td>
--%>
...
...
@@ -166,22 +205,31 @@
<tr>
<td>
权重(
<font
color=
"red"
>
必填
</font>
):
</td>
<td><input
type=
"number"
step=
"0.01"
class=
"form-control"
name=
"descTd"
id=
"kpiWeightTd"
value=
"1.00"
style=
"display: inline;"
/>
<span
id=
"writeWarningInfTd"
style=
"color:red;display: inline;padding-left:10px;"
></span></td>
<td><input
type=
"number"
step=
"0.01"
class=
"form-control"
name=
"descTd"
id=
"kpiWeightTd"
value=
"1.00"
style=
"display: inline;"
/>
<span
id=
"writeWarningInfTd"
style=
"color:red;display: inline;padding-left:10px;"
></span></td>
</tr>
<tr><td></td><td>
<tr>
<td></td>
<td>
<button
type=
"button"
id=
"UPDATEAnaInfo"
class=
"btn btn-primary"
>
修改指标
</button>
<button
type=
"button"
id=
"UPDATEAnaInfo"
class=
"btn btn-primary"
>
修改指标
</button>
</td></tr>
</td>
</tr>
<tr><td></td><td>
<tr>
<td></td>
<td>
<button
type=
"button"
id=
"addAnaInfo"
class=
"btn btn-info"
>
添加勾选指标
</button>
<button
type=
"button"
id=
"modelSubmit"
class=
"btn btn-primary"
>
确定
</button>
<button
type=
"reset"
class=
"btn btn-default"
id=
"modelReset"
>
清空
</button>
<button
type=
"reset"
class=
"btn btn-warning"
id=
"modelBack"
>
返回
</button>
</td></tr>
</td>
</tr>
</table>
</form>
</div>
...
...
@@ -194,18 +242,18 @@
</div>
<script
type=
"text/javascript"
>
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
"#UPDATEAnaInfo"
).
hide
();
if
(
$
(
"#paramDataType"
).
val
()
==
"字符"
)
{
if
(
$
(
"#paramDataType"
).
val
()
==
"字符"
)
{
var
addDataValue
=
$
(
"<input type='text' class='form-control name=paramValue' id='paramValue'/>"
);
$
(
"#addParamVal"
).
append
(
addDataValue
);
}
else
if
(
$
(
"#paramDataType"
).
val
()
==
"日期"
)
{
}
else
if
(
$
(
"#paramDataType"
).
val
()
==
"日期"
)
{
var
addDataValue
=
$
(
"<input type='text' class='form-control name=paramValue' id='paramValue' onFocus='WdatePicker({dateFmt:
\"
yyyy-MM-dd
\"
})'/>"
);
$
(
"#addParamVal"
).
append
(
addDataValue
);
}
else
if
(
$
(
"#paramDataType"
).
val
()
==
"时间"
)
{
}
else
if
(
$
(
"#paramDataType"
).
val
()
==
"时间"
)
{
var
addDataValue
=
$
(
"<input type='text' class='form-control name=paramValue' id='paramValue' onFocus='WdatePicker({})'/>"
);
$
(
"#addParamVal"
).
append
(
addDataValue
);
}
else
{
}
else
{
var
addDataValue
=
$
(
"<input type='text' class='form-control' name='paramValue' id='paramValue' onkeyup='(this.v=function(){this.value=this.value.replace(/[^0-9]+/,
\"\"
);}).call(this)' onblur='this.v();'/>"
);
$
(
"#addParamVal"
).
append
(
addDataValue
);
}
...
...
@@ -214,37 +262,68 @@
//全选和不全选所有的省
$
(
"#provinceDetailAll"
).
click
(
function
()
{
if
(
$
(
"#provinceDetailAll"
).
attr
(
"checked"
)
==
"checked"
){
//全选
$
(
"provinceDetail"
).
attr
(
"checked"
,
"checked"
);
$
(
"input[name='provinceDetail']"
).
attr
(
"checked"
,
"checked"
);
if
(
$
(
"#provinceDetailAll"
).
attr
(
"checked"
)
==
"checked"
)
{
//全选
$
(
"provinceDetail"
).
attr
(
"checked"
,
"checked"
);
$
(
"input[name='provinceDetail']"
).
attr
(
"checked"
,
"checked"
);
$
(
"input[name='provinceDetail'][value='32']"
).
attr
(
"checked"
,
false
);
}
else
{
//不全选
$
(
"input[name='provinceDetail']"
).
attr
(
"checked"
,
false
);
$
(
"input[name='provinceDetail']"
).
attr
(
"disabled"
,
false
);
}
else
{
//不全选
$
(
"input[name='provinceDetail']"
).
attr
(
"checked"
,
false
);
$
(
"input[name='provinceDetail']"
).
attr
(
"disabled"
,
false
);
}
});
$
(
"input[name='provinceDetail'][value='3000']"
).
click
(
function
()
{
alert
(
$
(
"input[name='provinceDetail'][value='32']"
).
text
());
alert
(
$
(
"input[name='provinceDetail'][value='32']"
).
html
());
if
(
$
(
"input[name='provinceDetail'][value='32']"
).
attr
(
"checked"
)
==
"checked"
)
{
/*$("#provinceDetailAll").next().hide();
$("#provinceDetailAll").hide();
$("input[name='provinceDetail'][value!='32']").next().hide();
$("input[name='provinceDetail'][value!='32']").hide();
*/
$
(
"#provinceDetailAll"
).
prop
(
"disabled"
,
"disabled"
);
$
(
"input[name='provinceDetail'][value!='32']"
).
prop
(
"disabled"
,
"disabled"
);
}
else
{
/* $("#provinceDetailAll").next().show();
$("#provinceDetailAll").show();
$("input[name='provinceDetail'][value!='32']").next().show();
$("input[name='provinceDetail'][value!='32']").show();*/
$
(
"#provinceDetailAll"
).
removeAttr
(
"disabled"
);
$
(
"input[name='provinceDetail'][value!='32']"
).
removeAttr
(
"disabled"
);
}
}
);
//模型名称是否重复判断
var
isDouble
=
true
;
$
(
"#dataModelName"
).
blur
(
function
()
{
if
(
""
!=
$
.
trim
(
$
(
this
).
val
()))
{
$
(
"#dataModelName"
).
blur
(
function
()
{
if
(
""
!=
$
.
trim
(
$
(
this
).
val
()))
{
var
modelName
=
$
(
this
).
val
();
$
.
ajax
({
type
:
"GET"
,
contentType
:
"application/json"
,
contentType
:
"application/json"
,
dataType
:
"text"
,
url
:
"${ctx}/ModelManage/ModelMaintain/select_modelName/"
+
encodeURIComponent
(
modelName
),
beforeSend
:
function
(
data
)
{
$
(
"#modelSubmit"
).
attr
(
"disabled"
,
true
);},
success
:
function
(
data
){
url
:
"${ctx}/ModelManage/ModelMaintain/select_modelName/"
+
encodeURIComponent
(
modelName
),
beforeSend
:
function
(
data
)
{
$
(
"#modelSubmit"
).
attr
(
"disabled"
,
true
);
},
success
:
function
(
data
)
{
data
=
parseInt
(
data
);
if
(
0
==
data
)
{
if
(
0
==
data
)
{
$
(
"#writeWarningInf"
).
html
(
""
);
isDouble
=
false
;
$
(
"#modelSubmit"
).
attr
(
"disabled"
,
false
);
}
else
{
$
(
"#modelSubmit"
).
attr
(
"disabled"
,
false
);
}
else
{
$
(
"#writeWarningInf"
).
html
(
"<img src='${ctx}/static/images/x.png'/> 标题已存在"
);
isDouble
=
true
;
$
(
"#modelSubmit"
).
attr
(
"disabled"
,
true
);
$
(
"#modelSubmit"
).
attr
(
"disabled"
,
true
);
}
}
});
...
...
@@ -252,58 +331,45 @@
});
//参数类型变化 类型数据验证
$
(
"#paramDataType"
).
change
(
function
()
{
$
(
"#paramDataType"
).
change
(
function
()
{
$
(
"#addParamVal"
).
empty
();
var
paramDataType
=
$
(
this
).
find
(
"option:selected"
).
val
();
if
(
paramDataType
==
"字符"
)
{
if
(
paramDataType
==
"字符"
)
{
var
addDataValue
=
$
(
"<input type='text' class='form-control name=paramValue' id='paramValue'/>"
);
$
(
"#addParamVal"
).
append
(
addDataValue
);
}
else
if
(
paramDataType
==
"日期"
)
{
}
else
if
(
paramDataType
==
"日期"
)
{
var
addDataValue
=
$
(
"<input type='text' class='form-control name=paramValue' id='paramValue' onFocus='WdatePicker({dateFmt:
\"
yyyy-MM-dd
\"
})'/>"
);
$
(
"#addParamVal"
).
append
(
addDataValue
);
}
else
if
(
paramDataType
==
"时间"
)
{
}
else
if
(
paramDataType
==
"时间"
)
{
var
addDataValue
=
$
(
"<input type='text' class='form-control name=paramValue' id='paramValue' onFocus='WdatePicker({})'/>"
);
$
(
"#addParamVal"
).
append
(
addDataValue
);
}
else
{
}
else
{
var
addDataValue
=
$
(
"<input type='text' class='form-control' name='paramValue' id='paramValue' onkeyup='(this.v=function(){this.value=this.value.replace(/[^0-9]+/,
\"\"
);}).call(this)' onblur='this.v();'/>"
);
$
(
"#addParamVal"
).
append
(
addDataValue
);
}
});
//删除所有参数
function
deleteAllTr
(){
function
deleteAllTr
()
{
$
(
"#addTr"
).
empty
();
dimKpiSelected
.
splice
(
0
,
dimKpiSelected
.
length
);
dimKpiSelected
.
splice
(
0
,
dimKpiSelected
.
length
);
}
//修改一条参数
/* function updateRow(elementTag){
$("#addParam").text("修改参数");
$("#addTr").find("tr").removeClass("orange-tr");
$(elementTag).parents("tr").eq(0).addClass("orange-tr");
var paramName = $(elementTag).parents("tr").find("td").eq(0).html();
var paramValue = $(elementTag).parents("tr").find("td").eq(1).html();
var paramType = $(elementTag).parents("tr").find("td").eq(2).html();
$("#paramDataType option[value='"+paramType+"']").attr("selected","selected");
$("#paramDataType").change();
$("#paramName").val(paramName);
$("#paramValue").val(paramValue);
}*/
//添加/修改参数
$
(
"#addParam"
).
click
(
function
()
{
$
(
"#addParam"
).
click
(
function
()
{
var
paramDataType
=
$
(
"#paramDataType"
).
val
();
var
paramName
=
$
.
trim
(
$
(
"#paramName"
).
val
());
var
paramValue
=
$
(
"#paramValue"
).
val
();
if
(
paramName
==
""
)
{
if
(
paramName
==
""
)
{
$
.
alert
(
"参数名不能为空"
);
}
else
{
if
(
$
(
"#addTr"
).
find
(
"tr.orange-tr"
).
html
()
==
null
)
{
var
addRow
=
$
(
"<tr><td>"
+
paramName
+
"</td><td id='paramValue_'+paramValue>"
+
paramValue
+
"</td><td>"
+
paramDataType
+
"</td><td><a href='javascript:;' title='' onclick='deleteRow(this)'>删除</a> <a href='javascript:;' onclick='updateRow(this)'>修改</a></td></tr>"
);
}
else
{
if
(
$
(
"#addTr"
).
find
(
"tr.orange-tr"
).
html
()
==
null
)
{
var
addRow
=
$
(
"<tr><td>"
+
paramName
+
"</td><td id='paramValue_'+paramValue>"
+
paramValue
+
"</td><td>"
+
paramDataType
+
"</td><td><a href='javascript:;' title='' onclick='deleteRow(this)'>删除</a> <a href='javascript:;' onclick='updateRow(this)'>修改</a></td></tr>"
);
$
(
"#addTr"
).
append
(
addRow
);
$
(
"#paramName"
).
attr
(
"value"
,
""
);
$
(
"#paramValue"
).
attr
(
"value"
,
""
);
}
else
{
$
(
"#paramName"
).
attr
(
"value"
,
""
);
$
(
"#paramValue"
).
attr
(
"value"
,
""
);
}
else
{
var
findTr
=
$
(
"#addTr"
).
find
(
"tr.orange-tr"
);
$
(
findTr
).
find
(
"td"
).
eq
(
0
).
html
(
paramName
);
$
(
findTr
).
find
(
"td"
).
eq
(
1
).
html
(
paramValue
);
...
...
@@ -315,59 +381,59 @@
});
//修改一条参数
function
updateRow
(
e
){
function
updateRow
(
e
)
{
var
pro
=
prompt
(
"请输入"
,
$
(
e
).
parent
().
prev
()[
0
].
innerHTML
);
var
initK
=
Number
(
$
(
e
).
parent
().
prev
()[
0
].
innerHTML
);
pro
=
$
.
trim
(
pro
);
if
(
$
.
isNumeric
(
pro
))
{
pro
=
parseFloat
(
pro
);
var
pro
=
prompt
(
"请输入"
,
$
(
e
).
parent
().
prev
()[
0
].
innerHTML
);
var
initK
=
Number
(
$
(
e
).
parent
().
prev
()[
0
].
innerHTML
);
pro
=
$
.
trim
(
pro
);
if
(
$
.
isNumeric
(
pro
))
{
pro
=
parseFloat
(
pro
);
if
(
pro
>
0
)
{
if
(
initK
>=
pro
)
{
$
(
e
).
parent
().
prev
()[
0
].
innerHTML
=
parseFloat
(
pro
);
sumkpiWeightTdVal
-=
initK
;
sumkpiWeightTdVal
+=
pro
;
var
maxV
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
if
(
pro
>
0
)
{
if
(
initK
>=
pro
)
{
$
(
e
).
parent
().
prev
()[
0
].
innerHTML
=
parseFloat
(
pro
);
sumkpiWeightTdVal
-=
initK
;
sumkpiWeightTdVal
+=
pro
;
var
maxV
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
$
(
"#kpiWeightTd"
).
val
(
maxV
);
}
else
{
var
k
=
sumkpiWeightTdVal
-
initK
+
pro
;
if
(
k
<=
1.00
)
{
$
(
e
).
parent
().
prev
()[
0
].
innerHTML
=
parseFloat
(
pro
);
sumkpiWeightTdVal
-=
initK
;
sumkpiWeightTdVal
+=
pro
;
var
maxV
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
}
else
{
var
k
=
sumkpiWeightTdVal
-
initK
+
pro
;
if
(
k
<=
1.00
)
{
$
(
e
).
parent
().
prev
()[
0
].
innerHTML
=
parseFloat
(
pro
);
sumkpiWeightTdVal
-=
initK
;
sumkpiWeightTdVal
+=
pro
;
var
maxV
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
$
(
"#kpiWeightTd"
).
val
(
maxV
);
}
}
}
}
}
//删除一条参数
function
deleteRow
(
e
){
var
v
=
$
(
e
).
parent
().
prev
().
text
();
sumkpiWeightTdVal
=
sumkpiWeightTdVal
-
v
;
$
(
"#kpiWeightTd"
).
val
(
(
1.00
-
sumkpiWeightTdVal
).
toFixed
(
2
));
var
id
=
Number
(
e
.
title
);
dimKpiSelected
.
splice
(
$
.
inArray
(
id
,
dimKpiSelected
),
1
);
function
deleteRow
(
e
)
{
var
v
=
$
(
e
).
parent
().
prev
().
text
();
sumkpiWeightTdVal
=
sumkpiWeightTdVal
-
v
;
$
(
"#kpiWeightTd"
).
val
(
(
1.00
-
sumkpiWeightTdVal
).
toFixed
(
2
));
var
id
=
Number
(
e
.
title
);
dimKpiSelected
.
splice
(
$
.
inArray
(
id
,
dimKpiSelected
),
1
);
$
(
e
).
parent
().
parent
().
remove
();
}
//form表单重置
$
(
"#modelReset"
).
click
(
function
()
{
$
(
"#modelReset"
).
click
(
function
()
{
$
(
"#businessActivedListTd"
).
empty
();
$
(
"#dimKpiListTd"
).
empty
();
deleteAllTr
();
});
//返回 选中的省份
function
getDetailProvinceCheckedValues
(){
var
provinceArray
=
new
Array
();
$
(
"input[name='provinceDetail']"
).
each
(
function
()
{
if
(
$
(
this
).
attr
(
"checked"
))
{
function
getDetailProvinceCheckedValues
()
{
var
provinceArray
=
new
Array
();
$
(
"input[name='provinceDetail']"
).
each
(
function
()
{
if
(
$
(
this
).
attr
(
"checked"
))
{
provinceArray
.
push
(
$
(
this
).
val
());
}
});
...
...
@@ -375,50 +441,54 @@
}
//form表单提交
$
(
"#modelSubmit"
).
click
(
function
()
{
$
(
"#modelSubmit"
).
click
(
function
()
{
//sumkpiWeightTdVal=sumkpiWeightTdVal.toFixed(2);
sumkpiWeightTdVal
=
parseFloat
(
2
);
if
(
sumkpiWeightTdVal
<
1.00
)
{
sumkpiWeightTdVal
=
parseFloat
(
2
);
if
(
sumkpiWeightTdVal
<
1.00
)
{
$
.
alert
(
"权限总和需 为 1"
);
return
;
}
var
anainfoShallSaveArr
=
getAnainfoShallSave
();
var
arrDimKpiChecked
=
getArrDimKpiChecked
();
var
provinceDetailChecked
=
getDetailProvinceCheckedValues
();
if
(
provinceDetailChecked
.
length
<
1
)
{
var
anainfoShallSaveArr
=
getAnainfoShallSave
();
var
arrDimKpiChecked
=
getArrDimKpiChecked
();
var
provinceDetailChecked
=
getDetailProvinceCheckedValues
();
if
(
provinceDetailChecked
.
length
<
1
)
{
$
.
alert
(
"省份需选"
);
return
;
}
else
if
(
$
.
trim
(
$
(
"#descTd"
).
val
())
==
""
)
{
}
else
if
(
$
.
trim
(
$
(
"#descTd"
).
val
())
==
""
)
{
$
.
alert
(
"描述不能为空"
);
return
;
}
else
if
(
anainfoShallSaveArr
.
length
<
1
)
{
}
else
if
(
anainfoShallSaveArr
.
length
<
1
)
{
$
.
alert
(
"指标需选"
);
return
;
}
else
{
else
{
var
proviceTdSelected
=
$
(
"#proviceTd option:selected"
).
val
();
var
dimensionTdSelected
=
$
(
"#dimensionTd option:selected"
).
val
();
var
proviceTdSelected
=
$
(
"#proviceTd option:selected"
).
val
();
var
dimensionTdSelected
=
$
(
"#dimensionTd option:selected"
).
val
();
var
descTdV
=
$
(
"#descTd"
).
val
();
var
kpiWeightTdV
=
$
(
"#kpiWeightTd"
).
val
();
var
descTdV
=
$
(
"#descTd"
).
val
();
var
kpiWeightTdV
=
$
(
"#kpiWeightTd"
).
val
();
$
(
"#modelSubmit"
).
attr
(
"disabled"
,
"disabled"
);
$
(
"#modelSubmit"
).
attr
(
"disabled"
,
"disabled"
);
$
.
ajax
({
type
:
'GET'
,
async
:
true
,
contentType
:
'application/json'
,
data
:
{
/*proviceTdSelected : proviceTdSelected,*/
dimensionTdSelected
:
dimensionTdSelected
,
descTdV
:
descTdV
/*,kpiWeightTdV:kpiWeightTdV*/
},
url
:
"${ctx}/MonitorOperation/AssociateDiagosisConfiguration/createAssociDigConfig?anainfoShallSaveArr="
+
anainfoShallSaveArr
+
"&proviceSelected="
+
provinceDetailChecked
,
dataType
:
'text'
,
success
:
function
(
data
){
type
:
'GET'
,
async
:
true
,
contentType
:
'application/json'
,
data
:
{
/*proviceTdSelected : proviceTdSelected,*/
dimensionTdSelected
:
dimensionTdSelected
,
descTdV
:
descTdV
/*,kpiWeightTdV:kpiWeightTdV*/
},
url
:
"${ctx}/MonitorOperation/AssociateDiagosisConfiguration/createAssociDigConfig?anainfoShallSaveArr="
+
anainfoShallSaveArr
+
"&proviceSelected="
+
provinceDetailChecked
,
dataType
:
'text'
,
success
:
function
(
data
)
{
$
.
alert
(
data
);
sumkpiWeightTdVal
=
0.00
;
sumkpiWeightTdVal
=
0.00
;
setTimeout
(
function
()
{
location
.
href
=
"${ctx}/MonitorOperation/AssociateDiagosisConfiguration"
;
},
2000
);
location
.
href
=
"${ctx}/MonitorOperation/AssociateDiagosisConfiguration"
;
},
2000
);
}
...
...
@@ -427,9 +497,9 @@
}
});
$
(
"#modelBack"
).
click
(
function
()
{
$
(
"#modelBack"
).
click
(
function
()
{
location
.
href
=
"${ctx}/MonitorOperation/AssociateDiagosisConfiguration"
;
location
.
href
=
"${ctx}/MonitorOperation/AssociateDiagosisConfiguration"
;
});
...
...
@@ -438,25 +508,25 @@
$
(
"#dimKpiListTd"
).
empty
();
//获取选择的 业务
var
businessSelectedArr
=
[];
var
businessSelectedArr
=
[];
$
(
"input[name='BusinessCheck']"
).
each
(
function
(
e
)
{
if
(
$
(
this
).
attr
(
"checked"
))
{
$
(
"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
+
')'
);
for
(
var
i
=
0
;
i
<
jsonDa
.
length
;
i
++
)
{
var
strInput
=
"<input type='checkbox' id=dimKpiCheck_"
+
jsonDa
[
i
].
kpiId
+
" name='dimKpiCheck' class='provinceDetail' title='"
+
jsonDa
[
i
].
name
+
" value='"
+
jsonDa
[
i
].
kpiId
+
"'>"
+
jsonDa
[
i
].
name
+
"</input>"
;
type
:
'GET'
,
async
:
true
,
contentType
:
'application/json'
,
url
:
"${ctx}/MonitorOperation/AssociateDiagosisConfiguration/getDimKpiListByBusinessIdList?businessIdList="
+
businessSelectedArr
,
dataType
:
'text'
,
success
:
function
(
data
)
{
var
jsonDa
=
eval
(
'('
+
data
+
')'
);
for
(
var
i
=
0
;
i
<
jsonDa
.
length
;
i
++
)
{
var
strInput
=
"<input type='checkbox' id=dimKpiCheck_"
+
jsonDa
[
i
].
kpiId
+
" name='dimKpiCheck' class='provinceDetail' title='"
+
jsonDa
[
i
].
name
+
" value='"
+
jsonDa
[
i
].
kpiId
+
"'>"
+
jsonDa
[
i
].
name
+
"</input>"
;
$
(
"#dimKpiListTd"
).
append
(
strInput
);
}
}
...
...
@@ -464,45 +534,44 @@
});
//渠道 复选框 点击 事件
function
channelRadioClick
(){
function
channelRadioClick
()
{
$
(
"#businessActivedListTd"
).
empty
();
var
channelId
=
$
(
"input[name='channelRadio']:checked"
).
val
();
var
dataSourceId
=
$
(
"input[name='dataSourceRadio']:checked"
).
val
();
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
();
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
();
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
)
{
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
+
')'
);
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 jsonDa=data;
var
strcheckBox
=
""
;
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
;
strcheckBox
+=
strInput
;
var
strcheckBox
=
""
;
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
;
strcheckBox
+=
strInput
;
}
$
(
"#businessActivedListTd"
).
append
(
strcheckBox
);
...
...
@@ -513,46 +582,45 @@
}
//数据源 复选框 点击 事件
function
dataSourceRadioClick
(){
function
dataSourceRadioClick
()
{
$
(
"#businessActivedListTd"
).
empty
();
var
channelId
=
$
(
"input[name='channelRadio']:checked"
).
val
();
var
dataSourceId
=
$
(
"input[name='dataSourceRadio']:checked"
).
val
();
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
();
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
();
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
)
{
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
=
""
;
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
;
strcheckBox
+=
strInput
;
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
=
""
;
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
;
strcheckBox
+=
strInput
;
}
$
(
"#businessActivedListTd"
).
append
(
strcheckBox
);
...
...
@@ -561,13 +629,14 @@
});
}
// 业务 复选框 点击事件
function
BusinessCheckClick
()
{
//$("#dimKpiListTd").empty();
// 重置 指标 一栏 筛选保留原有的 和已选择的 指标
$
(
"input[name='dimKpiCheck']"
).
each
(
function
(
e
)
{
if
(
!
$
(
this
).
attr
(
"checked"
))
{
$
(
"input[name='dimKpiCheck']"
).
each
(
function
(
e
)
{
if
(
!
$
(
this
).
attr
(
"checked"
))
{
$
(
this
).
next
().
remove
();
$
(
this
).
remove
();
...
...
@@ -576,27 +645,27 @@
//获取选择的 业务
var
businessSelectedArr
=
[];
var
businessSelectedArr
=
[];
$
(
"input[name='BusinessCheck']"
).
each
(
function
(
e
)
{
if
(
$
(
this
).
attr
(
"checked"
))
{
$
(
"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
+
')'
);
for
(
var
i
=
0
;
i
<
jsonDa
.
length
;
i
++
)
{
if
(
$
.
inArray
(
jsonDa
[
i
].
kpiId
,
dimKpiSelected
)
<
0
)
{
var
strInput
=
"<input type='checkbox' id=dimKpiCheck_"
+
jsonDa
[
i
].
kpiId
+
" name='dimKpiCheck' class='provinceDetail' title='"
+
jsonDa
[
i
].
name
+
" "
+
jsonDa
[
i
].
code
+
"' value='"
+
jsonDa
[
i
].
kpiId
+
"'/><font>"
+
jsonDa
[
i
].
name
+
"</font>"
;
type
:
'GET'
,
async
:
true
,
contentType
:
'application/json'
,
url
:
"${ctx}/MonitorOperation/AssociateDiagosisConfiguration/getDimKpiListByBusinessIdList?businessIdList="
+
businessSelectedArr
,
dataType
:
'text'
,
success
:
function
(
data
)
{
var
jsonDa
=
eval
(
'('
+
data
+
')'
);
for
(
var
i
=
0
;
i
<
jsonDa
.
length
;
i
++
)
{
if
(
$
.
inArray
(
jsonDa
[
i
].
kpiId
,
dimKpiSelected
)
<
0
)
{
var
strInput
=
"<input type='checkbox' id=dimKpiCheck_"
+
jsonDa
[
i
].
kpiId
+
" name='dimKpiCheck' class='provinceDetail' title='"
+
jsonDa
[
i
].
name
+
" "
+
jsonDa
[
i
].
code
+
"' value='"
+
jsonDa
[
i
].
kpiId
+
"'/><font>"
+
jsonDa
[
i
].
name
+
"</font>"
;
$
(
"#dimKpiListTd"
).
append
(
strInput
);
}
...
...
@@ -606,44 +675,41 @@
}
// 查找 业务
$
(
"#selectBusiness"
).
click
(
function
()
{
$
(
"#selectBusiness"
).
click
(
function
()
{
$
(
"#businessActivedListTd"
).
empty
();
var
channelId
=
$
(
"input[name='channelRadio']:checked"
).
val
();
var
dataSourceId
=
$
(
"input[name='dataSourceRadio']:checked"
).
val
();
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
();
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
();
var
dataSourceArray
=
new
Array
();
// 存放 所选数据源
var
j
=
0
;
$
(
"input[name='dataSourceRadio']:checked"
).
each
(
function
()
{
dataSourceArray
[
j
]
=
$
(
this
).
val
();
j
++
;
});
$
.
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
=
""
;
for
(
var
i
=
0
;
i
<
jsonDa
.
length
;
i
++
)
{
var
strInput
=
"<input type='checkbox' id=BusinessCheck_"
+
jsonDa
[
i
].
businessId
+
" name='BusinessCheck' class='provinceDetail' title='"
+
jsonDa
[
i
].
businessName
+
" value='"
+
jsonDa
[
i
].
businessId
+
"'/>"
+
jsonDa
[
i
].
businessName
;
strcheckBox
+=
strInput
;
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
=
""
;
for
(
var
i
=
0
;
i
<
jsonDa
.
length
;
i
++
)
{
var
strInput
=
"<input type='checkbox' id=BusinessCheck_"
+
jsonDa
[
i
].
businessId
+
" name='BusinessCheck' class='provinceDetail' title='"
+
jsonDa
[
i
].
businessName
+
" value='"
+
jsonDa
[
i
].
businessId
+
"'/>"
+
jsonDa
[
i
].
businessName
;
strcheckBox
+=
strInput
;
}
$
(
"#businessActivedListTd"
).
append
(
strcheckBox
);
...
...
@@ -654,78 +720,78 @@
});
sumkpiWeightTdVal
=
0.00
;
// 添加 '勾选指标指标'按钮 点击事件
$
(
"#addAnaInfo"
).
click
(
function
()
{
var
arrDimKpiChecked
=
getArrDimKpiChecked
();
if
(
arrDimKpiChecked
.
length
<
1
)
{
sumkpiWeightTdVal
=
0.00
;
// 添加 '勾选指标指标'按钮 点击事件
$
(
"#addAnaInfo"
).
click
(
function
()
{
var
arrDimKpiChecked
=
getArrDimKpiChecked
();
if
(
arrDimKpiChecked
.
length
<
1
)
{
$
.
alert
(
"需选指标"
);
return
;
}
var
kpiWeightTdVal
=
$
.
trim
(
$
(
"#kpiWeightTd"
).
val
());
if
(
kpiWeightTdVal
==
""
||
kpiWeightTdVal
==
0
)
{
var
kpiWeightTdVal
=
$
.
trim
(
$
(
"#kpiWeightTd"
).
val
());
if
(
kpiWeightTdVal
==
""
||
kpiWeightTdVal
==
0
)
{
$
.
alert
(
"权重不能为空"
);
return
;
}
if
(
kpiWeightTdVal
<
0
){
if
(
kpiWeightTdVal
<
0
)
{
$
.
alert
(
"权重不能为负"
);
var
mmm
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
var
mmm
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
$
(
"#kpiWeightTd"
).
val
(
mmm
);
return
;
}
if
(
kpiWeightTdVal
>
1.00
)
{
if
(
kpiWeightTdVal
>
1.00
)
{
$
.
alert
(
"权重超值 1"
);
var
mmmm
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
var
mmmm
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
$
(
"#kpiWeightTd"
).
val
(
mmmm
);
return
;
return
;
}
var
tt
=
0.00
;
for
(
var
jj
=
0
;
jj
<
arrDimKpiChecked
.
length
;
jj
++
)
{
tt
+=
Number
(
kpiWeightTdVal
);
var
tt
=
0.00
;
for
(
var
jj
=
0
;
jj
<
arrDimKpiChecked
.
length
;
jj
++
)
{
tt
+=
Number
(
kpiWeightTdVal
);
}
var
k
=
sumkpiWeightTdVal
+
tt
;
var
k
=
sumkpiWeightTdVal
+
tt
;
//var k=sumkpiWeightTdVal+Number(kpiWeightTdVal);
if
(
k
>
1.00
)
{
if
(
k
>
1.00
)
{
$
.
alert
(
"权重和 超值 1"
);
var
mm
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
var
mm
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
$
(
"#kpiWeightTd"
).
val
(
mm
);
return
;
}
// 勾选指标 的 名称 和 value
var
arrDimKpiidAndNameChecked
=
getArrDimKpiidAndNameChecked
();
var
arrDimKpiidAndNameChecked
=
getArrDimKpiidAndNameChecked
();
//向 已添加指标 添加
for
(
var
i
=
0
;
i
<
arrDimKpiidAndNameChecked
.
length
;
i
++
)
{
var
id_name
=
arrDimKpiidAndNameChecked
[
i
];
var
addRow
=
$
(
"<tr class='"
+
id_name
.
split
(
"_"
)[
0
]
+
"_"
+
kpiWeightTdVal
+
"'><td>"
+
id_name
.
split
(
"_"
)[
1
]
+
"</td><td>"
+
kpiWeightTdVal
+
"</td><td><a href='javascript:;' title='"
+
id_name
.
split
(
"_"
)[
0
]
+
"' onclick='deleteRow(this)'>删除</a> <a href='javascript:;' onclick='updateRow(this)'>修改</a></td></tr>"
);
for
(
var
i
=
0
;
i
<
arrDimKpiidAndNameChecked
.
length
;
i
++
)
{
var
id_name
=
arrDimKpiidAndNameChecked
[
i
];
var
addRow
=
$
(
"<tr class='"
+
id_name
.
split
(
"_"
)[
0
]
+
"_"
+
kpiWeightTdVal
+
"'><td>"
+
id_name
.
split
(
"_"
)[
1
]
+
"</td><td>"
+
kpiWeightTdVal
+
"</td><td><a href='javascript:;' title='"
+
id_name
.
split
(
"_"
)[
0
]
+
"' onclick='deleteRow(this)'>删除</a> <a href='javascript:;' onclick='updateRow(this)'>修改</a></td></tr>"
);
$
(
"#addTr"
).
append
(
addRow
);
dimKpiSelected
.
push
(
Number
(
id_name
.
split
(
"_"
)[
0
]));
}
// 指标项中 去除 已添加指标 已有的指标
$
(
"input[name='dimKpiCheck']"
).
each
(
function
(
e
)
{
$
(
"input[name='dimKpiCheck']"
).
each
(
function
(
e
)
{
var
id
=
Number
(
$
(
this
).
context
.
id
.
split
(
"_"
)[
1
]);
var
id
=
Number
(
$
(
this
).
context
.
id
.
split
(
"_"
)[
1
]);
if
(
$
.
inArray
(
id
,
dimKpiSelected
)
>=
0
)
{
if
(
$
.
inArray
(
id
,
dimKpiSelected
)
>=
0
)
{
$
(
this
).
next
().
remove
();
$
(
this
).
remove
();
}
});
//sumkpiWeightTdVal+=Number(kpiWeightTdVal);
sumkpiWeightTdVal
+=
tt
;
var
maxV
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
sumkpiWeightTdVal
+=
tt
;
var
maxV
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
$
(
"#kpiWeightTd"
).
val
(
maxV
);
//$("#kpiWeightTd").attr("max",maxV);
});
dimKpiSelected
=
new
Array
();
dimKpiSelected
=
new
Array
();
function
getAnainfoShallSave
(){
var
anainfoShallSaveArr
=
new
Array
();
$
(
"#addTr"
).
find
(
"tr"
).
each
(
function
()
{
var
claz
=
$
(
this
).
attr
(
"class"
);
function
getAnainfoShallSave
()
{
var
anainfoShallSaveArr
=
new
Array
();
$
(
"#addTr"
).
find
(
"tr"
).
each
(
function
()
{
var
claz
=
$
(
this
).
attr
(
"class"
);
anainfoShallSaveArr
.
push
(
claz
);
});
return
anainfoShallSaveArr
;
...
...
@@ -741,21 +807,21 @@
}*/
// 获取勾选指标的 数据 格式 id_名称
function
getArrDimKpiidAndNameChecked
(){
var
arrDimKpiChecked
=
[];
$
(
"input[name='dimKpiCheck']"
).
each
(
function
(
e
)
{
if
(
$
(
this
).
attr
(
"checked"
))
{
var
id_name
=
$
(
this
).
context
.
id
.
split
(
"_"
)[
1
]
+
"_"
+
$
(
this
).
context
.
title
.
split
(
" "
)[
0
];
function
getArrDimKpiidAndNameChecked
()
{
var
arrDimKpiChecked
=
[];
$
(
"input[name='dimKpiCheck']"
).
each
(
function
(
e
)
{
if
(
$
(
this
).
attr
(
"checked"
))
{
var
id_name
=
$
(
this
).
context
.
id
.
split
(
"_"
)[
1
]
+
"_"
+
$
(
this
).
context
.
title
.
split
(
" "
)[
0
];
arrDimKpiChecked
.
push
(
id_name
);
}
});
return
arrDimKpiChecked
;
}
function
getArrDimKpiChecked
(){
var
arrDimKpiChecked
=
[];
$
(
"input[name='dimKpiCheck']"
).
each
(
function
(
e
)
{
if
(
$
(
this
).
attr
(
"checked"
))
{
function
getArrDimKpiChecked
()
{
var
arrDimKpiChecked
=
[];
$
(
"input[name='dimKpiCheck']"
).
each
(
function
(
e
)
{
if
(
$
(
this
).
attr
(
"checked"
))
{
arrDimKpiChecked
.
push
(
$
(
this
).
context
.
id
.
split
(
"_"
)[
1
]);
}
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment