diff --git a/o2web/jsdoc_static/actionOut_examples/x_organization_assemble_express.json b/o2web/jsdoc_static/actionOut_examples/x_organization_assemble_express.json index 7a1f627bd64a56ddbdf86fef31b77b048eedc7e2..2e84c7ef4bc28b3263f7cd5db900038d080e16da 100644 --- a/o2web/jsdoc_static/actionOut_examples/x_organization_assemble_express.json +++ b/o2web/jsdoc_static/actionOut_examples/x_organization_assemble_express.json @@ -95,9 +95,16 @@ "张三@zhangsan@P", "李四@lisi@P" ], + "identityList": [ + "王五@kfb_wangwu@I", + "赵六@kfb_zhaoliu@I" + ], "groupList": [ "所有部门领导@AllDepartLeader@G", "所有部门汇报管理员@AllDepartReportManager@G" + ], + "unitList": [ + "开发部@kfb@U" ] } } \ No newline at end of file diff --git a/o2web/source/o2_core/o2/xScript/ServerApi.js b/o2web/source/o2_core/o2/xScript/ServerApi.js index 091155602d6ab82b1965925ee34f0bf32dbfbbeb..ee08dbb8324e684afc6acf6bd9c70fd05adb6303 100644 --- a/o2web/source/o2_core/o2/xScript/ServerApi.js +++ b/o2web/source/o2_core/o2/xScript/ServerApi.js @@ -626,6 +626,21 @@ * var groupList = this.org.listGroupWithPerson( name ); */ + //身份所在群组(嵌套)--返回群组的对象数组 + /** + * 根据身份标识获取所有的群组对象数组。如果群组具有群组(group)成员,且群组成员中包含该身份,那么该群组也被返回。 + * @method listGroupWithIdentity + * @o2membercategory group + * @methodOf module:server.org + * @static + * @param {IdentityFlag|IdentityFlag[]} name - 身份的distinguishedName、name、id、unique属性值,身份对象,或上述属性值和对象的数组。 + * @return {GroupData[]} 返回群组对象数组。 + * @o2ActionOut x_organization_assemble_express.GroupAction.listWithPersonObject|example=Group + * @o2syntax + * //返回群组数组。 + * var groupList = this.org.listGroupWithIdentity( name ); + */ + //角色*************** //获取角色--返回角色的对象数组 diff --git a/o2web/source/o2_core/o2/xScript/ViewEnvironment.js b/o2web/source/o2_core/o2/xScript/ViewEnvironment.js index ffe6115e3bcc319e33cead133a1a8b602a95dc6a..2266f20365912e64372081d5cd972be9a94ece37 100644 --- a/o2web/source/o2_core/o2/xScript/ViewEnvironment.js +++ b/o2web/source/o2_core/o2/xScript/ViewEnvironment.js @@ -2155,7 +2155,7 @@ MWF.xScript.ViewEnvironment = function (ev) { * @return {Promise|GroupData[]} 当async为true时,返回 * {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise|Promise}。 * 否则返回群组对象数组。 - * @o2ActionOut x_organization_assemble_express.GroupAction.listGroupWithIdentity|example=Group + * @o2ActionOut x_organization_assemble_express.GroupAction.listWithPersonObject|example=Group * @o2syntax * //同步执行,返回群组数组。 * var groupList = this.org.listGroupWithIdentity( identity ); diff --git a/o2web/source/x_desktop/js/initalScriptSubstitute.js b/o2web/source/x_desktop/js/initalScriptSubstitute.js index 4e2b0283ece32412c640fc80cdc3eed6ef1c5f2e..41a1f51ce006f9ea9ea3c90fed69768406efbbf0 100644 --- a/o2web/source/x_desktop/js/initalScriptSubstitute.js +++ b/o2web/source/x_desktop/js/initalScriptSubstitute.js @@ -338,6 +338,11 @@ var _org = { var v = this.oGroup.listWithPerson(getNameFlag(name)); return this.getObject(this.oGroup, v); }, + //身份所在群组(嵌套)--返回群组的对象数组 + listGroupWithIdentity:function(name){ + var v = this.oGroup.listWithIdentity(getNameFlag(name)); + return this.getObject(this.oGroup, v); + }, //群组是否拥有角色--返回true, false groupHasRole: function(name, role){ nameFlag = (library.typeOf(name)==="object") ? (name.distinguishedName || name.id || name.unique || name.name) : name; diff --git a/o2web/source/x_desktop/js/initalServiceScriptSubstitute.js b/o2web/source/x_desktop/js/initalServiceScriptSubstitute.js index 69fbdacbe417eb20b805ac0f32608161b4804ead..9f9879eb69c61bc8c6dfee0140a55b7fdcb9ebf2 100644 --- a/o2web/source/x_desktop/js/initalServiceScriptSubstitute.js +++ b/o2web/source/x_desktop/js/initalServiceScriptSubstitute.js @@ -553,6 +553,11 @@ var _org = { var v = this.oGroup.listWithPerson(getNameFlag(name)); return this.getObject(this.oGroup, v); }, + //身份所在群组(嵌套)--返回群组的对象数组 + listGroupWithIdentity:function(name){ + var v = this.oGroup.listWithIdentity(getNameFlag(name)); + return this.getObject(this.oGroup, v); + }, //群组是否拥有角色--返回true, false groupHasRole: function(name, role){ nameFlag = (library.typeOf(name)==="object") ? (name.distinguishedName || name.id || name.unique || name.name) : name; diff --git a/o2web/source/x_desktop/js/initialScriptText.js b/o2web/source/x_desktop/js/initialScriptText.js index a6fcbffc5665ab818ca939536042f62be3ba5419..2460cd3aaef54345666d6ab185608d6737b8e832 100644 --- a/o2web/source/x_desktop/js/initialScriptText.js +++ b/o2web/source/x_desktop/js/initialScriptText.js @@ -328,6 +328,11 @@ var _org = { var v = this.oGroup.listWithPerson(getNameFlag(name)); return this.getObject(this.oGroup, v); }, + //身份所在群组(嵌套)--返回群组的对象数组 + listGroupWithIdentity:function(name){ + var v = this.oGroup.listWithIdentity(getNameFlag(name)); + return this.getObject(this.oGroup, v); + }, //群组是否拥有角色--返回true, false groupHasRole: function(name, role){ nameFlag = (library.typeOf(name)==="object") ? (name.distinguishedName || name.id || name.unique || name.name) : name; diff --git a/o2web/source/x_desktop/js/initialServiceScriptText.js b/o2web/source/x_desktop/js/initialServiceScriptText.js index 3b33ab91d8d01614bdbaa3c5daab10ffe6891a4b..537802fb183181a1b69e6a0e679be5425a666491 100644 --- a/o2web/source/x_desktop/js/initialServiceScriptText.js +++ b/o2web/source/x_desktop/js/initialServiceScriptText.js @@ -2954,6 +2954,11 @@ var _org = { var v = this.oGroup.listWithPerson(getNameFlag(name)); return this.getObject(this.oGroup, v); }, + //身份所在群组(嵌套)--返回群组的对象数组 + listGroupWithIdentity:function(name){ + var v = this.oGroup.listWithIdentity(getNameFlag(name)); + return this.getObject(this.oGroup, v); + }, //群组是否拥有角色--返回true, false groupHasRole: function(name, role){ nameFlag = (library.typeOf(name)==="object") ? (name.distinguishedName || name.id || name.unique || name.name) : name;