提交 cd670a8b 编写于 作者: zcdtk's avatar zcdtk

方法格式化

上级 8129b6bc
......@@ -84,31 +84,28 @@
/**
* 获取树导航栏数据
*
* @memberof ${srfclassname('${view.codeName}')}Base
* @returns {Promise<any>}
* @memberof ${srfclassname('${view.codeName}')}Base
*/
public getWFStepModel():Promise<any>{
return new Promise((resolve:any, reject:any) =>{
this.appEntityService.WFGetWFStep().then((response:any) =>{
if (response && response.status === 200) {
this.wfStepModel = response.data;
if(this.wfStepModel && this.wfStepModel.length > 0){
this.curSelectedNode = this.wfStepModel[0];
}
Object.assign(this.viewparams,{'userTaskId':this.curSelectedNode['userTaskId'],'processDefinitionKey':this.curSelectedNode['processDefinitionKey']});
this.setTreeNodeHighLight(this.curSelectedNode);
resolve(response.data);
public async getWFStepModel(): Promise<any> {
const response = await this.appEntityService.WFGetWFStep();
if (response && response.status === 200) {
this.wfStepModel = response.data;
if (this.wfStepModel && this.wfStepModel.length > 0) {
this.curSelectedNode = this.wfStepModel[0];
}
Object.assign(this.viewparams,
{
'userTaskId': this.curSelectedNode['userTaskId'],
'processDefinitionKey': this.curSelectedNode['processDefinitionKey']
}
}).catch((response: any) => {
if (response && response.status) {
this.$notice.error(response.message);
return;
}
if (!response || !response.status || !response.data) {
this.$notice.error('系统异常');
return;
}
});
})
);
this.setTreeNodeHighLight(this.curSelectedNode);
} else {
const { error: _data } = response;
this.$notice.error(_data.message);
}
return response;
}
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册