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

update:更新工作流

上级 b12dd67e
此差异已折叠。
此差异已折叠。
...@@ -171,12 +171,22 @@ export default class AppMessagePopover extends Vue { ...@@ -171,12 +171,22 @@ export default class AppMessagePopover extends Vue {
* 点击标签事件 * 点击标签事件
*/ */
public handleTag(data: any) { public handleTag(data: any) {
if (!data) return this.$message.error("未获取到标签内容"); if (!data) return;
// 拼接要打开的窗口地址 const baseUrl: any = Environment.BaseUrl;
const baseUrl:any = Environment.BaseUrl; this.$http.get(baseUrl + `/wfcore/mytasks/${data.processDefinitionKey}/web/${data.processInstanceBusinessKey}/usertasks/${data.taskDefinitionKey}`).then((response: any) => {
const openUrl:any = baseUrl + `/wfcore/mytasks/${data.processDefinitionKey}/web/${data.processInstanceBusinessKey}/usertasks/${data.taskDefinitionKey}`; const { status, data } = response;
// 打开新窗口 if (status && status == 200) {
window.open(openUrl,'_blank'); const url = data.substr(data.indexOf("#") + 1);
const indexPath = this.$viewTool.getIndexRoutePath(this.$route);
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 });
})
} }
/** /**
...@@ -223,5 +233,5 @@ export default class AppMessagePopover extends Vue { ...@@ -223,5 +233,5 @@ export default class AppMessagePopover extends Vue {
</script> </script>
<style lang='less'> <style lang='less'>
@import "app-message-popover.less"; @import "app-message-popover.less";
</style> </style>
\ No newline at end of file
...@@ -51,7 +51,8 @@ export default class AppTodoList extends Vue { ...@@ -51,7 +51,8 @@ export default class AppTodoList extends Vue {
} }
} }
}).catch((error: any) => { }).catch((error: any) => {
console.warn("加载数据错误"); const message = error.message ? error.message : '加载数据错误';
this.$Notice.error({ title: (this.$t('app.commonWords.wrong') as string), desc: message });
}) })
} }
...@@ -61,11 +62,21 @@ export default class AppTodoList extends Vue { ...@@ -61,11 +62,21 @@ export default class AppTodoList extends Vue {
*/ */
public handleClick(data: any) { public handleClick(data: any) {
if (!data) return; if (!data) return;
// 拼接要打开的窗口地址
const baseUrl: any = Environment.BaseUrl; const baseUrl: any = Environment.BaseUrl;
const openUrl: any = baseUrl + `/wfcore/mytasks/${data.processDefinitionKey}/web/${data.processInstanceBusinessKey}/usertasks/${data.taskDefinitionKey}`; this.$http.get(baseUrl + `/wfcore/mytasks/${data.processDefinitionKey}/web/${data.processInstanceBusinessKey}/usertasks/${data.taskDefinitionKey}`).then((response: any) => {
// 打开新窗口 const { status, data } = response;
window.open(openUrl, '_blank'); if (status && status == 200) {
const url = data.substr(data.indexOf("#") + 1);
const indexPath = this.$viewTool.getIndexRoutePath(this.$route);
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 });
})
} }
} }
......
...@@ -13,18 +13,34 @@ export default class UIService { ...@@ -13,18 +13,34 @@ export default class UIService {
/** /**
* Vue 状态管理器 * Vue 状态管理器
* *
* @private * @protected
* @type {(any | null)} * @type {(any | null)}
* @memberof UIService * @memberof UIService
*/ */
private $store: Store<any> | null = null; protected $store: Store<any> | null = null;
/**
* 所有关联视图
*
* @memberof IBIZSample0021UIServiceBase
*/
protected allViewMap: Map<string, Object> = new Map();
/**
* 流程状态数组
*
* @protected
* @type {Array<string>}
* @memberof UIService
*/
protected InWorkflowArray: Array<string> = ['todo', 'toread'];
/** /**
* 所依赖权限服务 * 所依赖权限服务
* *
* @memberof UIService * @memberof UIService
*/ */
public authService:any; public authService: any;
/** /**
* Creates an instance of UIService. * Creates an instance of UIService.
...@@ -64,13 +80,31 @@ export default class UIService { ...@@ -64,13 +80,31 @@ export default class UIService {
* @param tag 资源标识 * @param tag 资源标识
* @memberof UIService * @memberof UIService
*/ */
public getResourceOPPrivs(tag:any){ public getResourceOPPrivs(tag: any) {
if(!this.authService) { if (!this.authService) {
this.authService = new AuthService(this.getStore()); this.authService = new AuthService(this.getStore());
} }
return this.authService.getResourcePermission(this.authService.sysOPPrivsMap.get(tag))?1:0; return this.authService.getResourcePermission(this.authService.sysOPPrivsMap.get(tag)) ? 1 : 0;
} }
/**
* 获取工作流视图
*
* @memberof UIService
*/
public getWFView() {
let result = this.allViewMap.get("WFEDITVIEW:");
if (!result) {
const allViews:any = this.allViewMap.values();
for (let value of allViews) {
if(value.viewType === 'DEWFDYNAEDITVIEW'){
return value;
}
}
}else{
return result;
}
}
} }
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册