|
楼主 |
发表于 2016-7-29 14:17:06
|
显示全部楼层
代码如下,
var UserChangroupPermissions = this.comp("UserChangroupPermissions");
var OrgData = this.comp("OrgData");
var ORGID = OrgData.getRowID();
UserChangroupPermissions.setFilter("filterOrgID", "ORGID='"+ORGID+"'");
UserChangroupPermissions.refreshData();
UserChangroupPermissions.deleteAllData();
var cgdata = this.comp("CameraGroup");
var fid = "";
//alert(checknodes.join(","))
for(var i=0; i<checknodes.length; i++){
cgdata.setFilter("filterid", "XH_CameraGroupInfo='"+checknodes+"'");
cgdata.refreshData();
fid = cgdata.getValue("FullID");
var selectOrgPermissions = {
defaultValues : [ {
ORGID : ORGID,
CAMERAGROUPID : checknodes,
CAMERAGROUPFID : fid,
ISGROUP : 1
} ]
};
UserChangroupPermissions.newData(selectOrgPermissions);
}
UserChangroupPermissions.saveData();
|
|