52457 【手机端】所有流程 任意节点处理完任务都要显示下图

This commit is contained in:
宋伟佳
2022-04-11 13:11:24 +08:00
parent 33ab7e469d
commit 45df416489
2 changed files with 32 additions and 5 deletions
+30 -3
View File
@@ -62,6 +62,7 @@ import { mapMutations, mapActions } from 'vuex'
import isMobile from "./store/isMobile";
// 路由拦截
router.beforeEach(function (to, from, next) {
alert(to.name)
let toName = to.name
let token = store.state.token
let path = to.path;
@@ -113,7 +114,20 @@ router.beforeEach(function (to, from, next) {
/** 判断是不是在手机端操作 */
if (isMobile()) {
if(toName === 'processCenter'){
hwh5.close();
// hwh5.close();
//关闭当前窗口
let userAgent = navigator.userAgent;
if (userAgent.indexOf("Firefox") !== -1 || userAgent.indexOf("Chrome") !==-1) {
window.location.href="about:blank";
}else if(userAgent.indexOf('Android') > -1 || userAgent.indexOf('Linux') > -1){
window.opener=null;window.open('about:blank','_self','').close();
}else {
window.opener = null;
window.open("about:blank", "_self");
window.close();
}
//如果是微信打开,关闭当前微信窗口
weixinClosePage()
}else {
if ((token === null || token === '' ) && toName !== 'Login') {
if(toName !== 'phoneIndex'){
@@ -177,7 +191,21 @@ router.beforeEach(function (to, from, next) {
extractedVerify(token)
}
}
function weixinClosePage() {
if (typeof WeixinJSBridge == "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', weixin_ClosePage, false);
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', weixin_ClosePage);
document.attachEvent('onWeixinJSBridgeReady', weixin_ClosePage);
}
} else {
weixin_ClosePage();
}
}
function weixin_ClosePage() {
WeixinJSBridge.call('closeWindow');
}
function extractedVerify() {
if (taskId !== undefined && taskId !== null && prcId !== undefined && prcId !== null) {
get_verify_by_instance({
@@ -187,7 +215,6 @@ router.beforeEach(function (to, from, next) {
let hisCount = res.hisCount === undefined ? 0 : res.hisCount;
let commitStatus = res.commitStatus === undefined ? 0 : res.commitStatus;
let isNotFinished = res.isNotFinished === undefined ? 0 : res.isNotFinished;
if ((hisCount && hisCount > 0)) { // 业务系统 当前节点已完成
if(isMobile()){
next('/processedPage')
@@ -3,7 +3,7 @@
<!-- 标准入库流程-->
<ProcessHeaderPhone toggle>
<template slot="proName">标准入库流程</template>
<template slot="proNode">经理人审</template>
<template slot="proNode"></template>
</ProcessHeaderPhone>
<div class="headerTabs">
<div class="headerTabsItem" :class="active === '1' ? 'active' : ''" @click="handleTabs('1')">基础信息</div>
@@ -966,7 +966,7 @@ export default {
this.$message.warning("驳回成功")
this.isSubmit = false
// 流程提交之后,应该流转至待办任务页面
this.$router.push({path: '/processCenter?tabsName=ProcessCenter'})
this.$router.push("/processCenter");
} else {
console.log("hello");
this.processCreateStand(json)