From 8fc504555822c2737a795f5f9a2daacd7c129bc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=86=8A=E6=88=90=E5=BC=BA?= Date: Wed, 4 Nov 2020 10:26:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 5 +++++ .../kpi/assessment/performance/index.vue | 3 ++- src/views/kpi/workbench/home/index.vue | 22 +++++++++++++++++-- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/App.vue b/src/App.vue index b978b2e..cc495a9 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,6 +9,11 @@ import { mapState, mapActions } from 'vuex' export default { name: 'App', + data () { + return { + + } + }, computed: { ...mapState(['user']) }, diff --git a/src/views/kpi/assessment/performance/index.vue b/src/views/kpi/assessment/performance/index.vue index acbf6f4..6c71e13 100644 --- a/src/views/kpi/assessment/performance/index.vue +++ b/src/views/kpi/assessment/performance/index.vue @@ -5,7 +5,7 @@
@@ -182,6 +182,7 @@ export default { methods: { async handleGetTbale (id = this.$route.query.id) { let res = await apiResultGetDetail({ id }) + if (res.code !== 200) return this.obj = res.data console.log('res: ', res) }, diff --git a/src/views/kpi/workbench/home/index.vue b/src/views/kpi/workbench/home/index.vue index 693ee2c..66a9f08 100644 --- a/src/views/kpi/workbench/home/index.vue +++ b/src/views/kpi/workbench/home/index.vue @@ -42,7 +42,11 @@ export default { pageSize: 3, status: 0 }, - selectedTableList: [] + selectedTableList: [], + list: [{ + name: 'assessment-performance', + tag: 'detail' + }] } }, components: { @@ -52,7 +56,21 @@ export default { computed: {}, beforeMount () {}, mounted () { - this.handleGetList() + let search = window.location.search + console.log('search: ', search) + if (search) { + const item = this.list.filter(i => '?' + i.tag === search.split('=')[0]) + if (item.length > 0) { + this.$nextTick(() => { + this.$router.replace({ + name: item[0].name, + query: this.$route.query + }) + }) + } + } else { + this.handleGetList() + } }, methods: { handleGetList () {