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

方法格式化

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