API
Component

Print ($UI/system/components/justep/print/print)

使用范围:UI2

Contents

component Print ($UI/system/components/justep/print/print) extends BindComponent

打印组件

Constructor Top

  Print ()
  Print ( options)

Properties Top

data

打印的Data xid

downloadFilename = download.xls

导出的文件名

template

模板

type

导出类型,取值范围:"pdf",默认"pdf"

Attributes Top

data

打印的Data xid

downloadFilename = download.xls

导出的文件名

template

模板

type

导出类型,取值范围:"pdf",默认"pdf"

xid

xid标识

Methods Top

Object get (String name)
void print ()
void set (json arg)

Operations Top

print ()

Events Top

boolean onBeforePrint (BeforeEvent event)
void onError (ErrorEvent event)
void onSuccess (ViewEvent event)

Constructor details Top

public Print ()

打印组件

public Print ( options)

构造函数

Inherited from ViewComponent

	
		参数options格式类似{parent:xx, config:{}},parent是组件的父节点,允许为空或不指定,config是组件的参数选项
	 

Parameters

options

参数选项

Properties Detail Top

public data

打印的Data xid

public downloadFilename = download.xls

导出的文件名

public template

模板

public type

导出类型,取值范围:"pdf",默认"pdf"

Attributes Detail Top

public data

打印的Data xid

public downloadFilename = download.xls

导出的文件名

public template

模板

public type

导出类型,取值范围:"pdf",默认"pdf"

public xid

xid标识

Methods Detail Top

public Object get (String name)

获取属性值

Parameters

String name

属性名称,取值范围:"template"、"type"、"downloadFilename"

Return Value

Object

public void print ()

根据类型打印,type=pdf,为导出pdf文件

	this.comp("excelExport1").exportExcel();

Return Value

void

public void set (json arg)

设置属性值

Parameters

json arg

属性值对
结构如下:

{ "template" : {string} 打印, "type" : {string} 打印类型 "downloadFilename: {string} 导出的文件名 }

Return Value

void

Operations Detail Top

public print ()

打印

Events Detail Top

public boolean onBeforePrint (BeforeEvent event)

[回调型事件]打印前

Parameters

BeforeEvent event


参数结构如下:

{ "source" : 组件的js对象 "bindingContext" : 组件绑定的上下文,包含$model、$object等具体请参考bindingContext说明 "cancel" : 取消打印 }

Return Value

boolean

控制 打印动作是否继续

public void onError (ErrorEvent event)

[回调型事件]导出失败

Parameters

ErrorEvent event


参数结构如下:

{ "source" : 组件的js对象, "bindingContext" : 组件绑定的上下文,包含$model、$object等具体请参考bindingContext说明 "message" : 导出错误信息, "result" : http请求返回 }

Return Value

void

public void onSuccess (ViewEvent event)

[回调型事件]导出成功

Parameters

ViewEvent event


参数结构如下:

{ "source" : 组件的js对象 "bindingContext" : 组件绑定的上下文,包含$model、$object等具体请参考bindingContext说明 }

Return Value

void