Commit 6a337c26 authored by liuna's avatar liuna

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

parents 74f37a76 b3436e99
...@@ -38,6 +38,9 @@ public interface ModelParameterDao extends JpaSpecificationExecutor<ModelParamet ...@@ -38,6 +38,9 @@ public interface ModelParameterDao extends JpaSpecificationExecutor<ModelParamet
void updateParamByParameterId(@Param("parameterName")String parameterName,@Param("parameterCode")String parameterCode,@Param("parameterValue")String parameterValue,@Param("parameterDataType")String parameterDataType,@Param("parameterId")Long parameterId); void updateParamByParameterId(@Param("parameterName")String parameterName,@Param("parameterCode")String parameterCode,@Param("parameterValue")String parameterValue,@Param("parameterDataType")String parameterDataType,@Param("parameterId")Long parameterId);
//根据数据模型ID查找参数d //根据数据模型ID查找参数d
List<ModelParameter> findByDataModelId(Long dataModelId); List<ModelParameter> findByDataModelId(Long dataModelId);
@Query(value = "SELECT mp FROM ModelParameter mp WHERE mp.dataModelId =:dataModelId AND mp.ifSystemDefault =:ifSystemDefault")
List<ModelParameter> findByDataModelIdAndifSystemDefault(@Param("dataModelId") Long dataModelId,@Param("ifSystemDefault") Long ifSystemDefault);
//根据数据模型ID查找系统默认的参数d //根据数据模型ID查找系统默认的参数d
......
...@@ -136,7 +136,7 @@ public class QualityRuleOperationController { ...@@ -136,7 +136,7 @@ public class QualityRuleOperationController {
String ifWarning="正常"; String ifWarning="正常";
sortType = HtmlUtils.htmlEscape(sortType); sortType = HtmlUtils.htmlEscape(sortType);
// Page<QualityRuleInfo> qualityRuleInfoPage = qualityRuleInfoService.getQualityRuleInfoPage(qualityRuleInfo,pageNumber,pageSize,sortType); // Page<QualityRuleInfo> qualityRuleInfoPage = qualityRuleInfoService.getQualityRuleInfoPage(qualityRuleInfo,pageNumber,pageSize,sortType);
Page<QualityRuleInfo> qualityRuleInfoPage = qualityRuleInfoService.getQualityRuleInfoBy(qualityRuleInfo, pageNumber, pageSize, sortType,dataSourceList,chnnalList,bussinesList,provinceList,ifFilterList,ifWarning,startTime,endTime); Page<QualityRuleInfo> qualityRuleInfoPage = null;//qualityRuleInfoService.getQualityRuleInfoBy(qualityRuleInfo, pageNumber, pageSize, sortType,dataSourceList,chnnalList,bussinesList,provinceList,ifFilterList,ifWarning,startTime,endTime);
// qualityRuleInfoList = qualityRuleInfoPage.iterator(); // qualityRuleInfoList = qualityRuleInfoPage.iterator();
for (Object aQualityRuleInfoPage : qualityRuleInfoPage) { for (Object aQualityRuleInfoPage : qualityRuleInfoPage) {
......
...@@ -288,6 +288,7 @@ public class TaskManageController { ...@@ -288,6 +288,7 @@ public class TaskManageController {
@RequestParam(value="paramId") String paramId, @RequestParam(value="paramId") String paramId,
@RequestParam(value="useType") String useType, @RequestParam(value="useType") String useType,
@RequestParam(value="paramValue") String paramValue, @RequestParam(value="paramValue") String paramValue,
@RequestParam(value="paramCode") String paramCode,
@RequestParam(value="paramType") String paramType, @RequestParam(value="paramType") String paramType,
@RequestParam(value="taskId") String taskId, @RequestParam(value="taskId") String taskId,
@RequestParam(value="modelId") String modelId, @RequestParam(value="modelId") String modelId,
...@@ -302,6 +303,7 @@ public class TaskManageController { ...@@ -302,6 +303,7 @@ public class TaskManageController {
if(!paramName.trim().equals("")){modelParameter.setParameterName(paramName);} if(!paramName.trim().equals("")){modelParameter.setParameterName(paramName);}
if(!paramValue.trim().equals("")){modelParameter.setParameterValue(paramValue);} if(!paramValue.trim().equals("")){modelParameter.setParameterValue(paramValue);}
if(!paramCode.trim().equals("")){modelParameter.setParameterCode(paramCode);}
if(!paramType.trim().equals("")){modelParameter.setParameterDataType(paramType);} if(!paramType.trim().equals("")){modelParameter.setParameterDataType(paramType);}
if(!taskId.trim().equals("")){modelParameter.setTaskId(Long.parseLong(taskId));} if(!taskId.trim().equals("")){modelParameter.setTaskId(Long.parseLong(taskId));}
if(!modelId.trim().equals("")){modelParameter.setDataModelId(Long.parseLong(modelId));} if(!modelId.trim().equals("")){modelParameter.setDataModelId(Long.parseLong(modelId));}
......
...@@ -315,7 +315,7 @@ public class ModelResultController { ...@@ -315,7 +315,7 @@ public class ModelResultController {
public void findParam( public void findParam(
@RequestParam(value = "dataModelId") String dataModelId, @RequestParam(value = "dataModelId") String dataModelId,
HttpServletResponse response){ HttpServletResponse response){
List<ModelParameter> modelParameterList = modelParameterDao.findByDataModelId(Long.parseLong(dataModelId)); List<ModelParameter> modelParameterList = modelParameterDao.findByDataModelIdAndifSystemDefault(Long.parseLong(dataModelId),0l);
cmszOperationLogService.createLog("查询","数据参数","查询数据参数"); cmszOperationLogService.createLog("查询","数据参数","查询数据参数");
Gson gson = new Gson(); Gson gson = new Gson();
response.setContentType("text/Xml;charset=gbk"); response.setContentType("text/Xml;charset=gbk");
......
...@@ -101,7 +101,13 @@ public class AssociateDiagosisDetailController { ...@@ -101,7 +101,13 @@ public class AssociateDiagosisDetailController {
String timestamp1 = getLastMonth();//getOld(); String timestamp1 = getLastMonth();//getOld();
String timestamp2 = getNow();//getNew(); String timestamp2 = getNow();//getNew();
List<AssociateDiagosisDetail> associateDiagosisDetails = associateDiagosisDetailService.findAssociateDiagosisDetailByWarnTimeBeginAndEnd(timestamp1, timestamp2); List<AssociateDiagosisDetail> associateDiagosisDetails = associateDiagosisDetailService.findAssociateDiagosisDetailByWarnTimeBeginAndEnd(timestamp1, timestamp2);
Iterator<AssociateDiagosisDetail>iterator=associateDiagosisDetails.iterator();
while (iterator.hasNext()){
AssociateDiagosisDetail detail=iterator.next();
if(detail.getWarningNum().compareTo(BigInteger.ZERO)<=0){
iterator.remove();
}
}
model.put("provinceList", provinceList); model.put("provinceList", provinceList);
Gson gson = new Gson(); Gson gson = new Gson();
model.put("diagosisDetails", gson.toJson(associateDiagosisDetails)); model.put("diagosisDetails", gson.toJson(associateDiagosisDetails));
...@@ -142,6 +148,15 @@ public class AssociateDiagosisDetailController { ...@@ -142,6 +148,15 @@ public class AssociateDiagosisDetailController {
List<AssociateDiagosisDetail> diagosisDetails = associateDiagosisDetailService. List<AssociateDiagosisDetail> diagosisDetails = associateDiagosisDetailService.
findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList(warnBeginTime, warnEndTime, dimension, provinceList); findLastMathAssociateDiagosisDetailByWarnTimeBeginAndEndAndDimesionAndProvinceList(warnBeginTime, warnEndTime, dimension, provinceList);
//--
Iterator<AssociateDiagosisDetail>iterator=diagosisDetails.iterator();
while (iterator.hasNext()){
AssociateDiagosisDetail detail=iterator.next();
if(detail.getWarningNum().compareTo(BigInteger.ZERO)<=0){
iterator.remove();
}
}
//--
Gson gson = new Gson(); Gson gson = new Gson();
return gson.toJson(diagosisDetails); return gson.toJson(diagosisDetails);
} }
...@@ -288,6 +303,15 @@ public class AssociateDiagosisDetailController { ...@@ -288,6 +303,15 @@ public class AssociateDiagosisDetailController {
list1.add(detail); list1.add(detail);
}*/ }*/
list1 = associateDiagosisDetailService.findDetailByProvinceIdAndoccurTimeAndCloseTime(provinceId, occurTimes, closeTimes); list1 = associateDiagosisDetailService.findDetailByProvinceIdAndoccurTimeAndCloseTime(provinceId, occurTimes, closeTimes);
//--
Iterator<AssociateDiagosisDetail>iterator=list1.iterator();
while (iterator.hasNext()){
AssociateDiagosisDetail detail=iterator.next();
if(detail.getWarningNum().compareTo(BigInteger.ZERO)<=0){
iterator.remove();
}
}
//--
Gson gson = new Gson(); Gson gson = new Gson();
model.put("diagosisDetails", gson.toJson(list1)); model.put("diagosisDetails", gson.toJson(list1));
return PageURLController.AssociateDiagosisDetail; return PageURLController.AssociateDiagosisDetail;
......
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="table-header"> <div class="table-header">
关联诊断结果查询 关联诊断配置查询
<shiro:hasAnyRoles name="admin,dataAnalysis,businessAnalysis"> <shiro:hasAnyRoles name="admin,dataAnalysis,businessAnalysis">
<div id="time_div" <div id="time_div"
style="top: -6px;float: right;height: 0px;position: relative;"> style="top: -6px;float: right;height: 0px;position: relative;">
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
//初始化界面 //初始化界面
initTable(); initTable();
var v=document.getElementById('gzfxDetail').value; var v=document.getElementById('gzfxDetail').value;
console.log("v "+v);
}); });
function goClick(e,id){ function goClick(e,id){
var beginTime=""; var beginTime="";
...@@ -134,7 +133,7 @@ ...@@ -134,7 +133,7 @@
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="table-header"> <div class="table-header">
关联诊断结果查询 关联诊断明细查询
</div> </div>
<!--写故障明细列表处--> <!--写故障明细列表处-->
<table class="table table-hover table-striped" <table class="table table-hover table-striped"
...@@ -272,8 +271,7 @@ ...@@ -272,8 +271,7 @@
var str=""; var str="";
var period=getPeriod(); var period=getPeriod();
str=str+period[0]+"~"+period[1]; str=str+period[0]+"~"+period[1];
console.log("str "+str);
console.log("str leng "+str.length);
return str; return str;
} }
...@@ -290,9 +288,7 @@ ...@@ -290,9 +288,7 @@
}else{ }else{
var detailProvince = getDetailProvinceCheckedValueString(); var detailProvince = getDetailProvinceCheckedValueString();
var dimension=getDetailCheckeddDimension(); var dimension=getDetailCheckeddDimension();
console.log("detailProvince "+detailProvince);
console.log("dimension "+dimension);
console.log("detailtime "+detailtime);
//alert(dimension+"-pi-"); //alert(dimension+"-pi-");
// alert(detailProvince); // alert(detailProvince);
var href="${ctx}/MonitorOperation/AssociateDiagosisDetail/tableList?detailProvince="+detailProvince+"&detailtime="+detailtime+"&dimension="+dimension; var href="${ctx}/MonitorOperation/AssociateDiagosisDetail/tableList?detailProvince="+detailProvince+"&detailtime="+detailtime+"&dimension="+dimension;
......
...@@ -517,7 +517,7 @@ ...@@ -517,7 +517,7 @@
var jsonDa = eval('(' + data + ')'); var jsonDa = eval('(' + data + ')');
for (var i = 0; i < jsonDa.length; i++) { 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>"; var strInput = "<input type='checkbox' id=dimKpiCheck_" + jsonDa[i].kpiId + " name='dimKpiCheck' class='provinceDetail' title='" + jsonDa[i].name + " value='" + jsonDa[i].kpiId + "'><span>" + jsonDa[i].name + "</span>";
$("#dimKpiListTd").append(strInput); $("#dimKpiListTd").append(strInput);
} }
} }
...@@ -656,7 +656,7 @@ ...@@ -656,7 +656,7 @@
for (var i = 0; i < jsonDa.length; i++) { for (var i = 0; i < jsonDa.length; i++) {
if ($.inArray(jsonDa[i].kpiId, dimKpiSelected) < 0) { 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>"; 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>";
$("#dimKpiListTd").append(strInput); $("#dimKpiListTd").append(strInput);
} }
...@@ -756,16 +756,15 @@ ...@@ -756,16 +756,15 @@
kpiWeightTdVal=parseFloat(Number(kpiWeightTdVal).toFixed(2)); kpiWeightTdVal=parseFloat(Number(kpiWeightTdVal).toFixed(2));
for (var i = 0; i < arrDimKpiidAndNameChecked.length; i++) { for (var i = 0; i < arrDimKpiidAndNameChecked.length; i++) {
var id_name = arrDimKpiidAndNameChecked[i]; var id_name = arrDimKpiidAndNameChecked[i];
var addRow = $("<tr class='" + id_name.split("_")[0] + "_" + kpiWeightTdVal + "'><td>" + id_name.split("_")[1] + "</td><td style='display:none;'>" + kpiWeightTdVal + "</td><td><a href='javascript:;' title='" + id_name.split("_")[0] + "' onclick='deleteRow(this)'>删除</a>&nbsp;&nbsp;</td></tr>");//<a href='javascript:;' onclick='updateRow(this)'>修改</a> var addRow = $("<tr class='" + id_name.split("&")[0] + "_" + kpiWeightTdVal + "'><td title="+id_name.split("&")[2]+">" + id_name.split("&")[1] + "</td><td style='display:none;'>" + kpiWeightTdVal + "</td><td><a href='javascript:;' title='" + id_name.split("_")[0] + "' onclick='deleteRow(this)'>删除</a>&nbsp;&nbsp;</td></tr>");//<a href='javascript:;' onclick='updateRow(this)'>修改</a>
$("#addTr").append(addRow); $("#addTr").append(addRow);
dimKpiSelected.push(Number(id_name.split("_")[0])); 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).next().remove();
$(this).remove(); $(this).remove();
...@@ -795,7 +794,9 @@ ...@@ -795,7 +794,9 @@
var arrDimKpiChecked = []; var arrDimKpiChecked = [];
$("input[name='dimKpiCheck']").each(function (e) { $("input[name='dimKpiCheck']").each(function (e) {
if ($(this).attr("checked")) { if ($(this).attr("checked")) {
var id_name = $(this).context.id.split("_")[1] + "_" + $(this).context.title.split(" ")[0]; //var id_name = $(this).context.id.split("_")[1] + "_" + $(this).context.title.split(" ")[0]+"_"+$(this).context.title.split(" ")[1];
var id_name = $(this).context.id.split("_")[1] + "&" + $(this).next().text()+"&"+$(this).context.title;
arrDimKpiChecked.push(id_name); arrDimKpiChecked.push(id_name);
} }
}); });
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
<tbody id="addTr"> <tbody id="addTr">
<c:forEach items="${dimKpiSelectedList}" var="dimKpi"> <c:forEach items="${dimKpiSelectedList}" var="dimKpi">
<tr class="${dimKpi.kpiId}" id='dimKpiCheck_${dimKpi.kpiId}'> <tr class="${dimKpi.kpiId}" id='dimKpiCheck_${dimKpi.kpiId}'>
<td>${dimKpi.name}</td> <td title="${dimKpi.code}">${dimKpi.name}</td>
<c:forEach items="${anaInfo.items}" var="ite"> <c:forEach items="${anaInfo.items}" var="ite">
<c:if test="${ite.kpiId == dimKpi.kpiId}"> <c:if test="${ite.kpiId == dimKpi.kpiId}">
<%--<td>${ite.kpiWeight}</td>--%> <%--<td>${ite.kpiWeight}</td>--%>
...@@ -555,7 +555,7 @@ ...@@ -555,7 +555,7 @@
if(arrdimKpiChecked.indexOf(jsonDa[i].kpiId) >= 0){ if(arrdimKpiChecked.indexOf(jsonDa[i].kpiId) >= 0){
continue; continue;
} }
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>"; 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>";
$("#dimKpiListTd").append(strInput); $("#dimKpiListTd").append(strInput);
} }
} }
...@@ -578,8 +578,9 @@ ...@@ -578,8 +578,9 @@
$("input[name='dimKpiCheck']").each(function (e) { $("input[name='dimKpiCheck']").each(function (e) {
if ($(this).attr("checked")) { if ($(this).attr("checked")) {
var dimKpiHadCheckId = Number($(this).attr("id").split("_")[1]); var dimKpiHadCheckId = Number($(this).attr("id").split("_")[1]);
var dimKpiHadCheckName = $(this).attr("title"); var dimKpiHadCheckCode = $(this).attr("title");
arr.push(dimKpiHadCheckId+"_"+dimKpiHadCheckName); var dimKpiHadCheckName = $(this).next().text();
arr.push(dimKpiHadCheckId+"&"+dimKpiHadCheckName+"&"+dimKpiHadCheckCode);
} }
}); });
return arr; return arr;
...@@ -752,7 +753,8 @@ ...@@ -752,7 +753,8 @@
var kpiId_Name=getkpiid_NameOfNamedimKpiCheck(); var kpiId_Name=getkpiid_NameOfNamedimKpiCheck();
for(var i=0;i<kpiId_Name.length;i++){ for(var i=0;i<kpiId_Name.length;i++){
var id_name=kpiId_Name[i]; var id_name=kpiId_Name[i];
var addRow = $("<tr class='"+id_name.split("_")[0]+"' id='dimKpiCheck_"+id_name.split("_")[0]+"'><td>"+id_name.split("_")[1].split(" ")[0]+"</td><td style='display: none'>"+id_kpiWeightTd_value+"</td><td><a href='javascript:;' onclick='deleteRow(this)'>删除</a>&nbsp;&nbsp;</td></tr>");//<a href='javascript:;' onclick='updateRow(this)'>修改</a> //var addRow = $("<tr class='"+id_name.split("_")[0]+"' id='dimKpiCheck_"+id_name.split("_")[0]+"'><td title='"+id_name.split("_")[1].split(" ")[1]+"'>"+id_name.split("_")[1].split(" ")[0]+"</td><td style='display: none'>"+id_kpiWeightTd_value+"</td><td><a href='javascript:;' onclick='deleteRow(this)'>删除</a>&nbsp;&nbsp;</td></tr>");//<a href='javascript:;' onclick='updateRow(this)'>修改</a>
var addRow = $("<tr class='"+id_name.split("&")[0]+"' id='dimKpiCheck_"+id_name.split("&")[0]+"'><td title='"+id_name.split("&")[2]+"'>"+id_name.split("&")[1]+"</td><td style='display: none'>"+id_kpiWeightTd_value+"</td><td><a href='javascript:;' onclick='deleteRow(this)'>删除</a>&nbsp;&nbsp;</td></tr>");//<a href='javascript:;' onclick='updateRow(this)'>修改</a>
$("#addTr").append(addRow); $("#addTr").append(addRow);
$("input[name='dimKpiCheck']").each(function (e) { $("input[name='dimKpiCheck']").each(function (e) {
if ($(this).attr("checked")) { if ($(this).attr("checked")) {
......
...@@ -179,14 +179,15 @@ var kpiOptions = []; ...@@ -179,14 +179,15 @@ var kpiOptions = [];
var paramId = $(this).context.id; var paramId = $(this).context.id;
var modelId = $('#modelId').val(); var modelId = $('#modelId').val();
var paramName = $(this).find("td").eq(0).html(); var paramName = $(this).find("td").eq(0).html();
var paramValue = $(this).find("td").eq(1).find("input").val(); var paramCode = $(this).find("td").eq(1).html();
var paramType = $(this).find("td").eq(2).html(); var paramValue = $(this).find("td").eq(2).find("input").val();
var paramType = $(this).find("td").eq(3).html();
var taskId = $('#taskId').val(); var taskId = $('#taskId').val();
$.ajax({ $.ajax({
type: "GET", type: "GET",
contentType: "application/json", contentType: "application/json",
url: "${ctx}/BaseManage/TaskManage/createModelParam?useType="+$("#useType").val()+"&paramId="+paramId+"&modelId="+encodeURIComponent(modelId)+"&paramName=" + encodeURIComponent(paramName) + "&paramValue=" + encodeURIComponent(paramValue) + "&paramType=" + paramType + "&taskId=" + taskId, url: "${ctx}/BaseManage/TaskManage/createModelParam?useType="+$("#useType").val()+"&paramId="+paramId+"&modelId="+encodeURIComponent(modelId)+"&paramName=" + encodeURIComponent(paramName) +"&paramCode=" + encodeURIComponent(paramCode) + "&paramValue=" + encodeURIComponent(paramValue) + "&paramType=" + paramType + "&taskId=" + taskId,
dataType: "text", dataType: "text",
async: false, async: false,
beforeSend: function (data) { beforeSend: function (data) {
...@@ -371,7 +372,7 @@ var kpiOptions = []; ...@@ -371,7 +372,7 @@ var kpiOptions = [];
<c:forEach items="${dataModelParameterList}" var="dataModelParameter"> <c:forEach items="${dataModelParameterList}" var="dataModelParameter">
var tr = "<tr id='${dataModelParameter.parameterId}'><td>${dataModelParameter.parameterName}</td><td><input type='text' class='parameterValue' name='parameterValue' value='${dataModelParameter.parameterValue}'/></td><td>${dataModelParameter.parameterDataType}</td></tr>"; var tr = "<tr id='${dataModelParameter.parameterId}'><td>${dataModelParameter.parameterName}</td><td>${dataModelParameter.parameterCode}</td><td><input type='text' class='parameterValue' name='parameterValue' value='${dataModelParameter.parameterValue}'/></td><td>${dataModelParameter.parameterDataType}</td></tr>";
$('#addTr').append(tr); $('#addTr').append(tr);
</c:forEach> </c:forEach>
if("${useType}" !== "new"){ if("${useType}" !== "new"){
...@@ -500,7 +501,7 @@ var kpiOptions = []; ...@@ -500,7 +501,7 @@ var kpiOptions = [];
$('#addTr').empty(); $('#addTr').empty();
data = JSON.parse(data) data = JSON.parse(data)
data.forEach(function(t){ data.forEach(function(t){
var tr = "<tr id='"+t.parameterId+"'><td>"+t.parameterName+"</td><td><input type='text' class='parameterValue' value='"+t.parameterValue+"'/></td><td>"+t.parameterDataType+"</td></tr>"; var tr = "<tr id='"+t.parameterId+"'><td>"+t.parameterName+"</td><td>"+t.parameterCode+"</td><td><input type='text' class='parameterValue' value='"+t.parameterValue+"'/></td><td>"+t.parameterDataType+"</td></tr>";
$('#addTr').append(tr); $('#addTr').append(tr);
}) })
} }
...@@ -730,7 +731,7 @@ var kpiOptions = []; ...@@ -730,7 +731,7 @@ var kpiOptions = [];
<div style="width:420px;height: 130px;overflow: auto"> <div style="width:420px;height: 130px;overflow: auto">
<table class="table table-hover table-striped" id="displayParam" > <table class="table table-hover table-striped" id="displayParam" >
<thead> <thead>
<tr><th>参数名</th><th>参数值</th><th>参数类型</th></tr> <tr><th>参数名</th><th>参数编码</th><th>参数</th><th>参数类型</th></tr>
</thead> </thead>
<tbody id="addTr"> <tbody id="addTr">
......
...@@ -130,12 +130,14 @@ taskName = "自定义任务"; ...@@ -130,12 +130,14 @@ taskName = "自定义任务";
var context = "<div style='width:420px;height: 130px;overflow: auto'>" + var context = "<div style='width:420px;height: 130px;overflow: auto'>" +
"<table class='table table-hover table-striped' id='displayParam' >" + "<table class='table table-hover table-striped' id='displayParam' >" +
"<thead>" + "<thead>" +
"<tr><th>参数名</th><th>参数值</th><th>参数类型</th></tr>" + "<tr><th>参数名</th><th>参数编码</th><th>参数值</th><th>参数类型</th></tr>" +
"</thead>" + "</thead>" +
"<tbody id='addTr'>"; "<tbody id='addTr'>";
data.forEach(function (t) { data.forEach(function (t) {
context +='<tr class="parameterTr" id='+t.parameterId+'><td>'+t.parameterName+'</td><td><input type="text" class="parameterValue" value="'+t.parameterValue+'"/></td><td>'+t.parameterDataType+'</td></tr>'; var parameterCode=t.parameterCode;
if(parameterCode == null){parameterCode=''}
context +='<tr class="parameterTr" id='+t.parameterId+'><td>'+t.parameterName+'</td><td>'+parameterCode+'</td><td><input type="text" class="parameterValue" value="'+t.parameterValue+'"/></td><td>'+t.parameterDataType+'</td></tr>';
}); });
context = context+ context = context+
"</tbody>" + "</tbody>" +
......
...@@ -5,7 +5,7 @@ function initTable(){ ...@@ -5,7 +5,7 @@ function initTable(){
var header = new Array(); var header = new Array();
//provinceToArr(); //provinceToArr();
header[0] = ["","associationId","1%",""]; header[0] = ["选择","associationId","1%",""];
header[1] = ["省份","provinceId","10%",""]; header[1] = ["省份","provinceId","10%",""];
header[2] = ["维度","AssociationType","10%","16"]; header[2] = ["维度","AssociationType","10%","16"];
header[3] = ["描述","AssoicationDesc","5%",""]; header[3] = ["描述","AssoicationDesc","5%",""];
......
...@@ -175,7 +175,8 @@ table_pagging.prototype={ ...@@ -175,7 +175,8 @@ table_pagging.prototype={
} }
tdContext = context; tdContext = context;
} else { }
else {
if(tdContext==null){ if(tdContext==null){
tdContext = "&nbsp;"; tdContext = "&nbsp;";
...@@ -198,7 +199,8 @@ table_pagging.prototype={ ...@@ -198,7 +199,8 @@ table_pagging.prototype={
var et=this.getData(this.objectlist[i],this.header[6][1]); var et=this.getData(this.objectlist[i],this.header[6][1]);
// tdContext="<a onclick='goClick("+id+","+new Date(st).getTime()+","+new Date(et).getTime()+")'>详-情</a>"; // tdContext="<a onclick='goClick("+id+","+new Date(st).getTime()+","+new Date(et).getTime()+")'>详-情</a>";
tdContext="<a onclick='goClick(this"+","+id+")'>详-情</a>"; tdContext="<a onclick='goClick(this"+","+id+")'>详-情</a>";
}else{ }
else{
tdContext = this.getData(this.objectlist[i],this.header[k][1]); tdContext = this.getData(this.objectlist[i],this.header[k][1]);
} }
......
...@@ -319,22 +319,23 @@ table_pagging.prototype = { ...@@ -319,22 +319,23 @@ table_pagging.prototype = {
+")' alt='"+i+"'>"+this.getData(this.objectlist[i],this.header[k][1])+"</a>"; +")' alt='"+i+"'>"+this.getData(this.objectlist[i],this.header[k][1])+"</a>";
} }
if(k==10){ if(k==9){
if(tdContext!="&nbsp;"){ if(tdContext!="&nbsp;"){
tdContext = df.format(new Date(tdContext)); tdContext = df.format(new Date(tdContext));
} }
} }
if(k==11){ if(k==10){
if(tdContext!="&nbsp;"){ if(tdContext!="&nbsp;"){
tdContext = df.format(new Date(tdContext)); tdContext = df.format(new Date(tdContext));
} }
} }
if(k==12){ if(k==11){
if(tdContext!="&nbsp;"){ if(tdContext!="&nbsp;"){
tdContext = df.format(new Date(tdContext)); tdContext = df.format(new Date(tdContext));
} }
} }
if(k==16){ if(k==15){
if(tdContext=="已确认"){ if(tdContext=="已确认"){
tr.className="green-tr"; tr.className="green-tr";
}else if(tdContext=="已关联协查单"){ }else if(tdContext=="已关联协查单"){
......
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