API
Component

ImportExcel ($UI/comp/excelpro/components/excelpro/importExcel)

使用范围:UI2

Contents

component ImportExcel ($UI/comp/excelpro/components/excelpro/importExcel) extends BindComponent

导入excel组件(高级)

Constructor Top

  ImportExcel ()
  ImportExcel ( options)

Properties Top

service

导入的服务

Attributes Top

service

导入的服务

xid

xid标识

Methods Top

void importExcel ()

Operations Top

importExcel ()
void ImportExcel ()

Events Top

boolean onBeforeImport (BeforeEvent event)
void onError (ErrorEvent event)
void onSuccess (SuccessEvent event)
void onUploadStart (ViewEvent event)
void onUploadSuccess (ViewEvent event)

Constructor details Top

public ImportExcel ()

导入excel组件(高级)

public ImportExcel ( options)

构造函数

Inherited from ViewComponent

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

Parameters

options

参数选项

Properties Detail Top

public service

导入的服务

Attributes Detail Top

public service

导入的服务

public xid

xid标识

Methods Detail Top

public void importExcel ()

导入excel

	this.comp("excelImport1").importExcel();

Return Value

void

Operations Detail Top

public importExcel ()

导入excel

public void ImportExcel ()

导入Excel

Return Value

void

Events Detail Top

public boolean onBeforeImport (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 (SuccessEvent event)

[回调型事件]导入成功

Parameters

SuccessEvent event


参数结构如下:

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

Return Value

void

public void onUploadStart (ViewEvent event)

[回调型事件]开始提交Excel文件前

Parameters

ViewEvent event


结构如下:

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

Return Value

void

public void onUploadSuccess (ViewEvent event)

[回调型事件]提交Excel文件成功

Parameters

ViewEvent event


结构如下:

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

Return Value

void