From ddc0b15123dfb464b95513e48f3a790c9c81a62b Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Sat, 3 Dec 2022 16:27:24 +0800 Subject: [PATCH] =?UTF-8?q?tab=E7=9B=B8=E5=85=B3BUG=E4=BF=AE=E6=94=B9=20ji?= =?UTF-8?q?ra269?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../activiti/demo/abilitydemandapply.vue | 24 ++++++++++++------ .../views/modules/activiti/demo/comments.vue | 23 ++++++++++++----- .../activiti/demo/putaway-process3.vue | 23 ++++++++++++----- .../myAgent/demo/ability-resource-shelf.vue | 23 ++++++++++++----- .../myAgent/demo/competency-application.vue | 25 +++++++++++++------ 5 files changed, 86 insertions(+), 32 deletions(-) diff --git a/back/src/views/modules/activiti/demo/abilitydemandapply.vue b/back/src/views/modules/activiti/demo/abilitydemandapply.vue index 11f2f09e..b725343e 100644 --- a/back/src/views/modules/activiti/demo/abilitydemandapply.vue +++ b/back/src/views/modules/activiti/demo/abilitydemandapply.vue @@ -245,7 +245,6 @@ export default { // 同意与退回 agreeOrNot: debounce( function (data, type) { - this.dataForm.taskId = this.$route.params.taskId if (type === '同意') { // if (this.input !== '') { @@ -339,15 +338,26 @@ export default { } // 当前选中tab被删除 if (tabName === this.$store.state.contentTabsActiveName) { - const tab = + // 判断是否有列表页 + const tab1 = this.$store.state.contentTabs.filter(val => val.name === tabName.substring(0, tabName.indexOf('__')))[0] + // 如果没列表页打开最后一个tab + const tab2 = this.$store.state.contentTabs[ this.$store.state.contentTabs.length - 1 ] - this.$router.push({ - name: /^iframe_.+/.test(tab.name) ? 'iframe' : tab.name, - params: { ...tab.params }, - query: { ...tab.query } - }) + if (tab1) { + this.$router.push({ + name: /^iframe_.+/.test(tab1.name) ? 'iframe' : tab1.name, + params: { ...tab1.params }, + query: { ...tab1.query } + }) + } else { + this.$router.push({ + name: /^iframe_.+/.test(tab2.name) ? 'iframe' : tab2.name, + params: { ...tab2.params }, + query: { ...tab2.query } + }) + } } }, // 启动流程出错回调 diff --git a/back/src/views/modules/activiti/demo/comments.vue b/back/src/views/modules/activiti/demo/comments.vue index f2171a60..ad6922c2 100644 --- a/back/src/views/modules/activiti/demo/comments.vue +++ b/back/src/views/modules/activiti/demo/comments.vue @@ -248,15 +248,26 @@ export default { } // 当前选中tab被删除 if (tabName === this.$store.state.contentTabsActiveName) { - const tab = + // 判断是否有列表页 + const tab1 = this.$store.state.contentTabs.filter(val => val.name === tabName.substring(0, tabName.indexOf('__')))[0] + // 如果没列表页打开最后一个tab + const tab2 = this.$store.state.contentTabs[ this.$store.state.contentTabs.length - 1 ] - this.$router.push({ - name: /^iframe_.+/.test(tab.name) ? 'iframe' : tab.name, - params: { ...tab.params }, - query: { ...tab.query } - }) + if (tab1) { + this.$router.push({ + name: /^iframe_.+/.test(tab1.name) ? 'iframe' : tab1.name, + params: { ...tab1.params }, + query: { ...tab1.query } + }) + } else { + this.$router.push({ + name: /^iframe_.+/.test(tab2.name) ? 'iframe' : tab2.name, + params: { ...tab2.params }, + query: { ...tab2.query } + }) + } } } }, diff --git a/back/src/views/modules/activiti/demo/putaway-process3.vue b/back/src/views/modules/activiti/demo/putaway-process3.vue index 91e353c4..a4b8bf35 100644 --- a/back/src/views/modules/activiti/demo/putaway-process3.vue +++ b/back/src/views/modules/activiti/demo/putaway-process3.vue @@ -325,15 +325,26 @@ export default { } // 当前选中tab被删除 if (tabName === this.$store.state.contentTabsActiveName) { - const tab = + // 判断是否有列表页 + const tab1 = this.$store.state.contentTabs.filter(val => val.name === tabName.substring(0, tabName.indexOf('__')))[0] + // 如果没列表页打开最后一个tab + const tab2 = this.$store.state.contentTabs[ this.$store.state.contentTabs.length - 1 ] - this.$router.push({ - name: /^iframe_.+/.test(tab.name) ? 'iframe' : tab.name, - params: { ...tab.params }, - query: { ...tab.query } - }) + if (tab1) { + this.$router.push({ + name: /^iframe_.+/.test(tab1.name) ? 'iframe' : tab1.name, + params: { ...tab1.params }, + query: { ...tab1.query } + }) + } else { + this.$router.push({ + name: /^iframe_.+/.test(tab2.name) ? 'iframe' : tab2.name, + params: { ...tab2.params }, + query: { ...tab2.query } + }) + } } }, // 启动流程出错回调 diff --git a/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue b/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue index 05b4ab65..d1bc3afd 100644 --- a/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue +++ b/back/src/views/modules/myAgent/demo/ability-resource-shelf.vue @@ -344,15 +344,26 @@ export default { } // 当前选中tab被删除 if (tabName === this.$store.state.contentTabsActiveName) { - const tab = + // 判断是否有列表页 + const tab1 = this.$store.state.contentTabs.filter(val => val.name === tabName.substring(0, tabName.indexOf('__')))[0] + // 如果没列表页打开最后一个tab + const tab2 = this.$store.state.contentTabs[ this.$store.state.contentTabs.length - 1 ] - this.$router.push({ - name: /^iframe_.+/.test(tab.name) ? 'iframe' : tab.name, - params: { ...tab.params }, - query: { ...tab.query } - }) + if (tab1) { + this.$router.push({ + name: /^iframe_.+/.test(tab1.name) ? 'iframe' : tab1.name, + params: { ...tab1.params }, + query: { ...tab1.query } + }) + } else { + this.$router.push({ + name: /^iframe_.+/.test(tab2.name) ? 'iframe' : tab2.name, + params: { ...tab2.params }, + query: { ...tab2.query } + }) + } } } } diff --git a/back/src/views/modules/myAgent/demo/competency-application.vue b/back/src/views/modules/myAgent/demo/competency-application.vue index 6cb68116..098deeab 100644 --- a/back/src/views/modules/myAgent/demo/competency-application.vue +++ b/back/src/views/modules/myAgent/demo/competency-application.vue @@ -2,7 +2,7 @@ * @Author: hisense.liangjunhua * @Date: 2022-06-29 15:59:51 * @LastEditors: Light - * @LastEditTime: 2022-11-30 15:45:35 + * @LastEditTime: 2022-12-03 16:25:55 * @Description: 告诉大家这是什么 --> @@ -516,15 +516,26 @@ export default { } // 当前选中tab被删除 if (tabName === this.$store.state.contentTabsActiveName) { - const tab = + // 判断是否有列表页 + const tab1 = this.$store.state.contentTabs.filter(val => val.name === tabName.substring(0, tabName.indexOf('__')))[0] + // 如果没列表页打开最后一个tab + const tab2 = this.$store.state.contentTabs[ this.$store.state.contentTabs.length - 1 ] - this.$router.push({ - name: /^iframe_.+/.test(tab.name) ? 'iframe' : tab.name, - params: { ...tab.params }, - query: { ...tab.query } - }) + if (tab1) { + this.$router.push({ + name: /^iframe_.+/.test(tab1.name) ? 'iframe' : tab1.name, + params: { ...tab1.params }, + query: { ...tab1.query } + }) + } else { + this.$router.push({ + name: /^iframe_.+/.test(tab2.name) ? 'iframe' : tab2.name, + params: { ...tab2.params }, + query: { ...tab2.query } + }) + } } }, // 启动流程出错回调