(1)策略分组修改,增加分租asn,id 为4

(2)策略分组删除时判断ASN分组是否已经下发过,如果已经下发过,则不能删除
(3)配置分组修改不能更新分组类型
This commit is contained in:
wangxin
2018-08-27 21:10:13 +08:00
parent 4259117e94
commit 18bfc299e4
12 changed files with 166 additions and 20 deletions

View File

@@ -5,6 +5,14 @@
<title><spring:message code="${cfgName}"></spring:message></title>
<script type="text/javascript">
$(function(){
if($("[name=groupId]").val()){
$("[name=groupType] option").each(function(){
if("${_cfg.groupType}"!=$(this).attr("value")){
$(this).attr("disabled",true);
}
});
$("[name=groupType]").selectpicker("refresh");
}
$(".action").on("change", function() {
$("#serviceId").val($(this).attr("serviceId"));
});

View File

@@ -34,15 +34,38 @@
var checkboxes=$("tbody tr td input.i-checks:checkbox");
var ids="";
var str="";
var serviceGroupIds=[];
checkboxes.each(function(){
if(true == $(this).is(':checked')){
if($(this).attr("groupType")==4){
serviceGroupIds.push($(this).attr("serviceGroupId"));
}
str+=$(this).attr("id")+",";
}
});
if(str.substr(str.length-1)== ','){
ids = str.substr(0,str.length-1);
}
window.location = url+"&ids="+ids;
var canDel=true;
if(serviceGroupIds.length>0){
$.ajax({
type:'post',
url:'${ctx}/basics/policyGroup/ajaxServiceIdState',
data:{"serviceGroupIds":serviceGroupIds.join(',')},
async:false,
success:function(data,textStatus){//处理返回结果
if(data){
canDel=false;
}
}
});
}
if(canDel){
window.location = url+"&ids="+ids;
}else{
$.jBox.tip('<spring:message code="can_not_delete_issued_asn_group"/>');
return false;
}
}
</script>
</head>
@@ -188,7 +211,7 @@
<tbody>
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
<tr>
<td><input type="checkbox" class="i-checks" id="${cfg.groupId}"></td>
<td><input type="checkbox" class="i-checks" id="${cfg.groupId}" groupType="${cfg.groupType}" serviceGroupId="${cfg.serviceGroupId}"></td>
<td>
<a href="javascript:;" data-original-title="${cfg.groupName}"
class="tooltips" data-flag="false" data-html="true" data-placement="top">