var _soa4l_uids_path="/uids" /** * @fileOverview 此文件定义了一个组织结构管理系统所必须要提供的以JavaScript方式调用的服务 * 由于需要动态获取uids的地址因此不能直接包含此文件 */ var soa4l = soa4l || {}; var _soa4l_uids_path = _soa4l_uids_path || null; //应该由页面动态生成 var _unit_sel_instance; /** * 代表一个用户、组织结构所属于的域 * @param {string} domainId 域的编号 * @param {string} domainName 域的名称 */ soa4l.domain = function(domainId, domainName) { this.domainId = domainId; this.domainName = domainName; } /** * 代表用户所在的组织结构 */ soa4l.unit = function() { /** * 组织结构编号 */ this.unitId = null; this.unitName = null; this.unitType = null; this.domain = new soa4l.domain(); } /** * 代表一个组织结构选择界面,调用者可以设置若干参数,最后调用show方法显示出选择界面 * * @class * @name soa4l.userService.selUnitWindow */ soa4l.selUnitWindow = function() { /** * 设置窗口的回调函数,即用户在选择了组织结构之后将soa4l.unit传递到的函数,目前只支持传递1个unit */ this.callBack = null; /** * 设置是否为多选窗口,如果不设置默认为单选 */ this.multiSelected = false; /** * 设置以某个组织结构为起点进行选择 * @param {string}unitId 组织结构的编号 */ this.startUnit = null; /** * 设置选择哪个域的组织结构 * @param domainId 域的编号 */ this.domainId = null; /** * 设置在出现的选择界面中默认被选中的组织结构的编号 * @param {string[]}unitIds 要选择的组织结构的ID的数组 */ this.selectedUnits = null; /** * 设置选择哪些类型的组织结构 * @param uniTypes 代表用户类型的字符串数组 */ this.unitType = null; //设置当前调用者提供的解决跨域js调用问题的页面,该页面应该接受2个参数 c:调用的本地的函数名,p:参数 this.cdpage = null; /** * 显示出选择组织结构的界面,其他函数必须在调用此函数之间调用否则无效 */ this.show = function() { if (!this.callBack) { alert("没有设置回调函数!"); return; } //alert(this.callBack) //var owin=window.open("http://127.0.0.1:81/uids/admin/unit/unitSel.jsp","us"); /*if(!document.getElementById("_dv_unit_sel")){ document.body.innerHTML+="
"; } */ // /*var oDIV = document.getElementById("_dv_unit_sel"); if (!oDIV) { oDIV = document.createElement("DIV"); oDIV.id = "_dv_unit_sel"; oDIV.innerHTML = "