2019独角兽企业重金招聘Python工程师标准>>>
tips:
在 Javascript 里,null,0,””,false,和 undefined 全部彼此相等(==),因为它们的计算值都为 ‘false。
TNMS.flow.traph.dispatch.maintain.L2vpnInfoModifyPanel
repeatable:function(arr1,arr2,tag1,tag2,callback){if(arr1.length !=0 && arr2.length !=0){arr1 = arr1.split(',');arr2 = arr2.split(',');var tempArray = [];for(var i=0;i
save:function(callback){var scope = this;var res = this.getResult();// 输入校验var orig_ne = res.baseForm['RELATED_ORIG_NE_CUID'];var dest_ne_a = res.baseForm['RELATED_DEST_NE_A_CUID'];var dest_ne_b = res.baseForm['RELATED_DEST_NE_B_CUID'];if (orig_ne == dest_ne_a || orig_ne == dest_ne_b){Ext.Msg.alert("温馨提示","源端网元和宿端网元不能相同,请重新选择!");callback.call(scope);return;}var a1 = res.dniConstraint['MUST_WORK_LINK'];var a2 = res.dniConstraint['MUST_PROTECT_LINK'];var a3 = res.dniConstraint['FORBIT_WORK_LINK'];var a4 = res.dniConstraint['FORBIT_PROTECT_LINK'];this.repeatable(a1,a3,'必经链路列表(工作)','禁止链路列表(工作)',callback);this.repeatable(a2,a4,'必经链路列表(保护)','禁止链路列表(保护)',callback);var b1 = res.wireConstraint['WIRE_MUST_WORK_NE'];var b2 = res.wireConstraint['WIRE_MUST_PROTECT_NE'];var b3 = res.wireConstraint['WIRE_FORBIT_WORK_NE'];var b4 = res.wireConstraint['WIRE_FORBIT_PROTECT_NE'];this.repeatable(b1,b3,'必经节点列表(工作)','禁止节点列表(工作)',callback);this.repeatable(b2,b4,'必经节点列表(保护)','禁止节点列表(保护)',callback);var c1 = res.wireConstraint['WIRE_MUST_WORK_TOPO'];var c2 = res.wireConstraint['WIRE_MUST_PROTECT_TOPO'];var c3 = res.wireConstraint['WIRE_FORBIT_WORK_TOPO'];var c4 = res.wireConstraint['WIRE_FORBIT_PROTECT_TOPO'];this.repeatable(c1,c3,'必经链路列表(工作)','禁止链路列表(工作)',callback);this.repeatable(c2,c4,'必经链路列表(保护)','禁止链路列表(保护)',callback);L2vpnMaintainDwrAction.save(Ext.encode(res),function(){if(Ext.isFunction(callback)){callback.call(scope);}});
},