|
@ -3,6 +3,12 @@
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
/* ************************** 全局变量定义 **************************** */
|
|
|
|
|
|
var Util = $.Util;
|
|
|
var schemeVersionList = [];
|
|
|
|
|
|
/* *************************** 自定义模块 ***************************** */
|
|
|
var jobLayout = {
|
|
|
dialog:null,
|
|
@ -12,11 +18,56 @@
|
|
|
|
|
|
$('.m-retrieve-area').show();
|
|
|
|
|
|
$.ajax({
|
|
|
url: '${contextRoot}/datacollect/getJobLayout',
|
|
|
type: "get",
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
debugger
|
|
|
if(!Util.isStrEmpty(data)){
|
|
|
schemeVersionList = data || [];
|
|
|
}else{
|
|
|
$.ligerDialog.error(data.message);
|
|
|
}
|
|
|
|
|
|
},
|
|
|
error: function (jqXHR, textStatus, errorThrown) {
|
|
|
$.ligerDialog.error("获取适配方案版本列表失败!")
|
|
|
}
|
|
|
});
|
|
|
|
|
|
|
|
|
me.grid = $("#div_grid").ligerGrid({
|
|
|
url: '${contextRoot}/datacollect/getJob',
|
|
|
// usePager: false,
|
|
|
columns: [
|
|
|
{display:'适配方案',name:'schemeAndVersion', width: '20%'},
|
|
|
{display:'版本',name:'jobPlan',width: '20%'},
|
|
|
{display:'适配方案',name:'schemeAndVersion', width: '20%',render: function (row, rowindex, value, column) {
|
|
|
debugger
|
|
|
var select= '<select class="sel-scheme-id form-control" id="schemeId'+rowindex+'" style="margin-top:3px;font-size:12px;"><option value="">请选择</option>';
|
|
|
for(var i=0;i<schemeVersionList.length;i++){
|
|
|
select+='<option value="'+schemeVersionList[i].id+'">'+schemeVersionList[i].name+'</option>';
|
|
|
}
|
|
|
select = $(select+"</select>");
|
|
|
$('option[value="'+row.schemeId+'"]',select).attr('selected',true);
|
|
|
|
|
|
return select.prop("outerHTML");
|
|
|
}},
|
|
|
{display:'版本',name:'jobPlan',width: '20%',render: function (row, rowindex, value, column) {
|
|
|
debugger
|
|
|
var select= '<select class="sel-version-id form-control" id="versionId'+rowindex+'" style="margin-top:3px;font-size:12px;"><option value="">请选择</option>';
|
|
|
var versionList = [];
|
|
|
for(var i=0;i<schemeVersionList.length;i++){
|
|
|
versionList = schemeVersionList[i].versionList;
|
|
|
for(var j=0;j<versionList.length;j++){
|
|
|
select+='<option value="'+versionList[j].id+'">'+versionList[j].name+'</option>';
|
|
|
}
|
|
|
|
|
|
}
|
|
|
select = $(select+"</select>");
|
|
|
$('option[value="'+row.schemeId+'"]',select).attr('selected',true);
|
|
|
|
|
|
return select.prop("outerHTML");
|
|
|
}},
|
|
|
{display:'数据集名称',name:'jobDataset', width: '40%'},
|
|
|
{display:'操作', name: 'operator', width: '20%', render: function (row) {
|
|
|
var html = '<div class="m-inline-buttons" style="width:55px;">';
|
|
@ -25,8 +76,22 @@
|
|
|
return html;
|
|
|
}}
|
|
|
],
|
|
|
onDblClickRow : function (row){
|
|
|
me.editor(row.id);
|
|
|
onAfterShowData: function (gridData) {//显示完数据事件
|
|
|
|
|
|
//【应用数据元编码】change事件
|
|
|
$(".sel-scheme-id").on("change", function(event,msg) {
|
|
|
var rowIndex = $(this).attr("id").replace("orgId","");
|
|
|
var option = '<option value="">请选择</option>';
|
|
|
for(var i=0;i<datasourceList.length;i++){
|
|
|
if(datasourceList[i].orgId==$(this).val()){
|
|
|
option+='<option value="'+datasourceList[i].id+'">'+datasourceList[i].name+'</option>';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$("#datasourceId"+rowIndex).html("");
|
|
|
$("#datasourceId"+rowIndex).append(option);
|
|
|
});
|
|
|
|
|
|
}
|
|
|
});
|
|
|
|