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

update:更新统一待办逻辑

上级 301cc763
...@@ -171,22 +171,14 @@ export default class AppMessagePopover extends Vue { ...@@ -171,22 +171,14 @@ export default class AppMessagePopover extends Vue {
* 点击标签事件 * 点击标签事件
*/ */
public handleTag(data: any) { public handleTag(data: any) {
if (!data) return; if(!data || !data.processDefinitionKey || !data.processInstanceBusinessKey || !data.taskDefinitionKey){
const baseUrl: any = Environment.BaseUrl; this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '参数不足,跳转失败' });
this.$http.get(baseUrl + `/wfcore/mytasks/${data.processDefinitionKey}/web/${data.processInstanceBusinessKey}/usertasks/${data.taskDefinitionKey}`).then((response: any) => { return;
const { status, data } = response; }
if (status && status == 200) { const srfappde = (data.processDefinitionKey as string).split('-')[1];
const url = data.substr(data.indexOf("#") + 1); const url = `/appwfdataredirectview?srfappde=${srfappde};srfappkey=${data.processInstanceBusinessKey};userTaskId=${data.taskDefinitionKey}`;
const indexPath = this.$viewTool.getIndexRoutePath(this.$route); const indexPath = this.$viewTool.getIndexRoutePath(this.$route);
this.$router.push({ path: `${indexPath}${url}` }); this.$router.push({ path: `${indexPath}${url}` });
} else {
const message = data.message ? data.message : '跳转失败';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: message });
}
}).catch((error: any) => {
const message = error.message ? error.message : '跳转失败';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: message });
})
} }
/** /**
......
...@@ -111,22 +111,14 @@ export default class AppTodoList extends Vue { ...@@ -111,22 +111,14 @@ export default class AppTodoList extends Vue {
* 处理点击 * 处理点击
*/ */
public handleClick(data: any) { public handleClick(data: any) {
if (!data) return; if(!data || !data.processDefinitionKey || !data.processInstanceBusinessKey || !data.taskDefinitionKey){
const baseUrl: any = Environment.BaseUrl; this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: '参数不足,跳转失败' });
this.$http.get(baseUrl + `/wfcore/mytasks/${data.processDefinitionKey}/web/${data.processInstanceBusinessKey}/usertasks/${data.taskDefinitionKey}`).then((response: any) => { return;
const { status, data } = response; }
if (status && status == 200) { const srfappde = (data.processDefinitionKey as string).split('-')[1];
const url = data.substr(data.indexOf("#") + 1); const url = `/appwfdataredirectview?srfappde=${srfappde};srfappkey=${data.processInstanceBusinessKey};userTaskId=${data.taskDefinitionKey}`;
const indexPath = this.$viewTool.getIndexRoutePath(this.$route); const indexPath = this.$viewTool.getIndexRoutePath(this.$route);
this.$router.push({ path: `${indexPath}${url}` }); this.$router.push({ path: `${indexPath}${url}` });
} else {
const message = data.message ? data.message : '跳转失败';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: message });
}
}).catch((error: any) => {
const message = error.message ? error.message : '跳转失败';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: message });
})
} }
/** /**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册