提交 2693e3d9 编写于 作者: tony001's avatar tony001

update:更新工作流

上级 b11f6cfd
<#ibizinclude>
../@MACRO/DEFAULT.less.ftl
</#ibizinclude>
.app-wfredirect-view{
width:100%;
.${srffilepath2(view.getCodeName())}{
width: 100%;
height: 100%;
.view-card {
.ivu-card-body {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.context {
padding-top: 26px;
margin-left: 1em;
font-size: 24px;
font-family: ui-monospace;
}
}
}
}
\ No newline at end of file
<div class="app-wfredirect-view ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<div class="view-container ${srffilepath2(view.getCodeName())}<#if view.getPSSysCss?? && view.getPSSysCss()??> ${view.getPSSysCss().getCssName()}</#if>">
<app-studioaction :viewTitle="$t(model.srfCaption)" viewName="${view.getCodeName()?lower_case}"></app-studioaction>
<card class='view-card ' :dis-hover="true" :bordered="false">
<img src="@/assets/img/redirect.svg" />
<div class="context">页面跳转中~</div>
</card>
</div>
\ No newline at end of file
......@@ -51,7 +51,7 @@
*/
public getWFLinkModel():Promise<any>{
return new Promise((resolve:any, reject:any) =>{
let datas: any[] = [];
let datas: {} = {};
if (Object.keys(this.viewparams).length > 0) {
Object.assign(datas, { 'processDefinitionKey': this.viewparams.processDefinitionKey });
Object.assign(datas, { 'taskDefinitionKey': this.viewparams.taskDefinitionKey || this.viewparams.userTaskId });
......
<#assign import_block>
import UIService from '@/uiservice/ui-service';
import qs from 'qs';
</#assign>
<#assign created_block>
this.viewInit();
......@@ -13,23 +14,24 @@ import UIService from '@/uiservice/ui-service';
*/
public isEnableWorkflow:boolean = true;
/**
* 初始化视图
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public async viewInit(){
const {srfkey:srfkey,srfappde:srfappde,srfworklist:srfworklist} = this.viewparams;
const uiService:UIService = new UIService();
const targetService:any = await uiService.getService(srfappde.toLowerCase());
targetService.getRDAppView(srfkey,this.isEnableWorkflow).then((res:any) =>{
if(res && res.viewname && res.srfappde){
// <#noparse>?worklist=${srfworklist}</#noparse>
console.log('重定向之后的视图'+res.viewname);
const path:string =<#noparse>`/${res.srfappde}/${srfkey}/${res.viewname}`</#noparse>;
this.$router.push({path:path});
}else{
let { srfappkey, srfappde, userTaskId } = this.viewparams;
const uiService: UIService = new UIService();
const targetService: any = await uiService.getService(srfappde.toLowerCase());
targetService.getRDAppView(srfappkey, this.isEnableWorkflow).then((res: any) => {
if (res && res.viewname && res.srfappde) {
const indexPath = this.$viewTool.getIndexRoutePath(this.$route);
<#noparse>let routePath: string = `${indexPath}/${res.srfappde}/${srfappkey}/${res.viewname}`;</#noparse>
if (userTaskId) {
<#noparse>routePath = `${routePath}?${qs.stringify({ taskDefinitionKey: userTaskId }, { delimiter: ';' })}`;</#noparse>
}
this.$router.push({ path: routePath });
} else {
console.error("未查找到重定向视图")
}
})
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册