o2oa api: documentcontext | o2oa开发平台-游戏厅捕鱼达人

module

您可以通过documentcontext获取内容管理实例相关的对象数据。

usable range

cms

example

//您可以在内容管理表单中,通过this来获取当前实例的documentcontext对象,如下:
var context = this.documentcontext;

source

methods

static

getdocument() → {document}

获取当前内容管理实例的文档对象:document对象。

syntax

var doc = this.documentcontext.getdocument();

returns

  • document

    文档对象.

    {
    	    "id": "3359aedd-c2d8-4d8c-b8b0-02507da1b3f4",		//数据库主键,自动生成.
    	    "summary": " ",		//文档摘要
    		"title": "航天科工外部董事调研组到培训中心调研",		//文档标题
    		"documenttype": "信息",		//文档类型,跟随分类类型,信息 | 数据
    		"appid": "c295f34c-9ce1-4122-b795-820267e32b68",		//栏目id
    		"appname": "游戏厅捕鱼达人的公告",		//栏目名称
    		"appalias": " ",		//栏目别名
    		"categoryid": "33fb19f0-0670-464d-875c-32fb86148f7a",		//分类id
    		"categoryname": "游戏厅捕鱼达人的公告",		//分类名称
    		"categoryalias": "游戏厅捕鱼达人的公告-游戏厅捕鱼达人的公告",		//分类别名
    		"form": "dddefed4-4411-4e4e-b982-cdd4cd083443",		//绑定的表单模板id
    		"formname": "游戏厅捕鱼达人的公告编辑表单",		//绑定的表单模板名称
    		"importbatchname": " ",		//文件导入的批次号:一般是分类id 时间缀
    		"readformid": "d6f1f596-fcb7-4a87-baaf-7f6cdafe3cec",		//绑定的阅读表单模板id
    		"readformname": "游戏厅捕鱼达人的公告阅读表单",		//绑定的阅读表单模板名称
    		"creatorperson": "李义@liyi@p",		//创建人,可能为空,如果由系统创建。
    		"creatoridentity": "李义@469d1601-c4a5-46ae-b7bf-4da9af07b6fa@i",		//创建人identity,可能为空,如果由系统创建。
    		"creatorunitname": "浙江兰德纵横@a706f5f0-4a3b-4785-8e1d-0a944bfad4eb@u",		//创建人组织,可能为空,如果由系统创建。
    		"creatortopunitname": "浙江兰德纵横@a706f5f0-4a3b-4785-8e1d-0a944bfad4eb@u",		//创建人顶层组织,可能为空,如果由系统创建。
    		"docstatus": "published",		//文档状态: waitpublished | published | draft | checking | error
    		"description": " ",		//说明备注,可以填写说明信息,如导入信息检验失败原因等
    		"viewcount": 1,		//文档被查看次数
    		"commendcount": 1,		//文档被赞次数
    		"commentcount": 1,		//文档评论次数
    		"publishtime": "2018-01-04 14:17:16",		//文档发布时间
    		"modifytime": "2022-09-01 17:05:47",		//文档修改时间
    		"istop": true,		//是否置顶
    		"hasindexpic": true,		//是否含有游戏厅捕鱼达人首页图片
    		"reviewed": true,		//是否已经更新review信息.
    		"sequencetitle": " ",		//用于标题排序的sequence
    		"sequenceappalias": " ",		//用于栏目别名排序的sequence
    		"sequencecategoryalias": " ",		//用于分类别名排序的sequence
    		"sequencecreatorperson": " ",		//用于创建者排序的sequence
    		"sequencecreatorunitname": " ",		//用于创建者组织排序的sequence
    		"readpersonlist": [
    			"张三@zhangsan@p"
    			"所有人"
    		],		//阅读人员
    		"readunitlist": [
    		],		//阅读组织
    		"readgrouplist": [
    		],		//阅读群组
    		"authorpersonlist": [
    			"张三@zhangsan@p"
    		],		//作者人员
    		"authorunitlist": [
    		],		//作者组织
    		"authorgrouplist": [
    		],		//作者群组
    		"remindpersonlist": [
    			" "
    		],		//发布提醒人员
    		"remindunitlist": [
    			" "
    		],		//发布提醒组织
    		"remindgrouplist": [
    			" "
    		],		//发布提醒群组
    		"managerlist": [
    			"张三@zhangsan@p"
    		],		//管理者
    		"picturelist": [
    		],		//游戏厅捕鱼达人首页图片列表
    		"distributefactor": 1,		//分布式存储标识位.
    		"createtime": "2022-09-01 17:05:47",		//创建时间,自动生成,索引创建在约束中.
    		"updatetime": "2022-09-01 17:05:47",		//修改时间,自动生成,索引创建在约束中.
    		"sequence": " ",		//列表序号,由创建时间以及id组成.在保存时自动生成,索引创建在约束中.
         "stringvalue01": "", //业务数据string值01.
         "stringvalue02": "", //业务数据string值02.
         "stringvalue03": "", //业务数据string值03.
         "stringvalue04": "", //业务数据string值04.
         "stringvalue05": "", //业务数据string值05.
         "stringvalue06": "", //业务数据string值06.
         "stringvalue07": "", //业务数据string值07.
         "stringvalue08": "", //业务数据string值08.
         "stringvalue09": "", //业务数据string值09.
         "stringvalue10": "", //业务数据string值10.
         "longvalue01": "", //业务数据long值01.
         "longvalue02": "", //业务数据long值02.
         "doublevalue01": "", //业务数据double值01.
         "doublevalue02": "", //业务数据double值02.
         "datetimevalue01": "", //业务数据datetime值01.
         "datetimevalue02": "", //业务数据datetime值02.
         "datetimevalue03": "", //业务数据datetime值03.
    	}
    

source

static

getcontrol() → {documentcontrol}

获取当前人对文档的权限。

syntax

var control = this.documentcontext.getcontrol();

returns

  • documentcontrol

    当前人对文档所拥有的权限.

    {
       "allowread": true,              //是否允许阅读文档
       "allowpublishdocument": true,   //是否允许发布文档
       "allowsave": true,              //是否允许保存文档
       "allowpopulardocument": true,   //是否允许设置为热点
       "alloweditdocument": true,      //是否允许编辑文档
       "allowdeletedocument": true     //是否允许删除文档
    }

source

static

getattachmentlist() → {array.}

获取当前文档的附件对象列表。

syntax

var attachmentlist = this.documentcontext.getattachmentlist();

returns

  • array.

    当前文档的附件对象列表.

{
	"id": "a5cc5858-cac5-445a-a0a5-888d224eb2f6",		//数据库主键,自动生成.
	"lastupdatetime": "2023-11-21 15:02:35",		//最后更新时间
	"storage": " ",		//关联的存储名称.
	"site": "attachment_1",		//附件框分类.
	"objectsecurityclearance": 1,		//客体密级标识.
	"name": "13145352_115454884000_2.jpg",		//文件真实名称
	"cloudid": " ",		//云文件id
	"filename": " ",		//服务器上编码后的文件名,为了方便辨识带扩展名
	"appid": "c295f34c-9ce1-4122-b795-820267e32b68",		//文件所属应用id
	"categoryid": "33fb19f0-0670-464d-875c-32fb86148f7a",		//文件所属分类id
	"documentid": "ca74cbef-2a7f-401a-80e3-577ac9839348",		//文件所属文档id
	"filetype": " ",		//文件类别:云文件(cloud) | 附件(attachment)
	"fileexttype": " ",		//文件类别:picture | word | excel | ppt | zip | txt | other
	"type": " ",		//根据流文件判断的文件类型.
	"filehost": " ",		//文件存储主机名
	"filepath": " ",		//文件存储路径
	"description": " ",		//文件说明
	"creatoruid": "xx@huqi@p",		//创建者uid
	"extension": "jpg",		//扩展名
	"seqnumber": 1,		//排序号
	"length": 364507,		//文件大小.
	"text": " ",		//文本.
	"readidentitylist": [
		" "
	],		//可以访问的身份.
	"readunitlist": [
		" "
	],		//可以访问的组织.
	"editidentitylist": [
		" "
	],		//可以修改的用户.
	"editunitlist": [
		" "
	],		//可以修改的组织.
	"controlleridentitylist": [
		" "
	],		//可以管理的用户.
	"controllerunitlist": [
		" "
	],		//可以管理的组织.
	"deeppath": true,		//是否使用更深的路径.
	"encryptkey": " ",		//文件密钥.
	"createtime": "2023-11-21 15:02:35",		//创建时间,自动生成,索引创建在约束中.
	"updatetime": "2023-11-21 15:02:35" 		//修改时间,自动生成,索引创建在约束中.
}

source

网站地图