...
|
...
|
@@ -239,9 +239,13 @@ |
|
|
<script>
|
|
|
var tagTypes = eval(${tagTypeMapJson});
|
|
|
|
|
|
function refreshTagsByType(parentId){
|
|
|
function refreshTagsByType(parentId,tagTypeTmp){
|
|
|
console.log("parentId is "+parentId);
|
|
|
$("#parentTagDiv").html("");
|
|
|
var tagType=$("#model_tagType").val();
|
|
|
if(tagTypeTmp!=null&&tagTypeTmp!=""){
|
|
|
tagType=tagTypeTmp;
|
|
|
}
|
|
|
$.ajax({
|
|
|
url : contextPath +"hostInfoList/getHostTagsByType?type="+tagType,
|
|
|
type : 'post',
|
...
|
...
|
@@ -252,19 +256,19 @@ |
|
|
selectHtml += '<option value="">---------</option>';
|
|
|
for(var jj=0;jj<respone.data.length;jj++){
|
|
|
selectHtml += '<option ';
|
|
|
if(parentId!=null&&parentId>0&&parentId==respone.data[jj].id){
|
|
|
if(parentId>0&&parentId==respone.data[jj].id){
|
|
|
selectHtml += ' selected=true ';
|
|
|
}
|
|
|
selectHtml += ' value="'+respone.data[jj].id +'">'+ respone.data[jj].text+'</option>';
|
|
|
}
|
|
|
selectHtml += '</select>';
|
|
|
console.log(selectHtml);
|
|
|
$("#parentTagDiv").html(selectHtml);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function createTreeGrid(e){
|
|
|
console.log(e);
|
|
|
var config = {
|
|
|
id : "id",
|
|
|
width : "800",
|
...
|
...
|
@@ -325,7 +329,6 @@ |
|
|
data: {'searchContent': content,'tagTypeContent':$.trim($("#tagType").val())},
|
|
|
dataType: 'json',
|
|
|
success: function (resp) {
|
|
|
console.log(resp);
|
|
|
createTreeGrid(resp.data);
|
|
|
},
|
|
|
error: function (resp) {
|
...
|
...
|
@@ -345,7 +348,7 @@ |
|
|
}
|
|
|
//打开新增或修改页面
|
|
|
function editHostGroup(id, pid,groupName,tagType,descr) {
|
|
|
refreshTagsByType(pid);
|
|
|
refreshTagsByType(pid,tagType);
|
|
|
|
|
|
$("#hostGroupForm #messageAlert").hide();
|
|
|
if (id == 0) {//新增页面
|
...
|
...
|
|