From a97bf805e1195bfbd054bc5f204ba80a41246356 Mon Sep 17 00:00:00 2001 From: yujinlong Date: Tue, 5 Nov 2024 18:02:18 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9AActionBar=E4=B8=8A=E4=B8=80?= =?UTF-8?q?=E7=A5=A8=E4=B8=8B=E4=B8=80=E7=A5=A8=E4=BC=98=E5=8C=96=20?= =?UTF-8?q?=E5=8F=AF=E4=BC=A0=E9=80=92=E9=A2=9D=E5=A4=96=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ActionBar/index.vue | 16 +++++++++------- .../financialTax/expenseAccount/detail/index.vue | 2 -- src/views/financialTax/expenseAccount/index.vue | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/ActionBar/index.vue b/src/components/ActionBar/index.vue index a4702530..b483fd0d 100644 --- a/src/components/ActionBar/index.vue +++ b/src/components/ActionBar/index.vue @@ -199,6 +199,7 @@ import { useRoute } from 'vue-router' import { useGo } from '/@/hooks/web/usePage' import { closePage } from '/@/hooks/web/common' + import { setObjToUrlParams } from '/@/utils' export default defineComponent({ name: 'ActionBar', props: { @@ -335,21 +336,22 @@ extraIndex = index - 1 } else { // 下一票 - if (index == 19) { + if (index == ids.length - 1) { return createMessage.warning('该票为当前页码最后一票!') } id = ids[index + 1] extraIndex = index + 1 } - const extraQuery = props?.getExtraQuery(extraIndex) || {} + const extraQuery = props?.getExtraQuery ? props?.getExtraQuery(extraIndex) : {} + const goParams = { + id, + ...extraQuery, + } go({ path: route.path, - query: { - id, - ...extraQuery, - }, + query: goParams, }) - closePage(route.path + '?id=' + id) + closePage(setObjToUrlParams(route.path, goParams)) } else { createMessage.warning('列表页面数据丢失,请回退列表页面后重试!') } diff --git a/src/views/financialTax/expenseAccount/detail/index.vue b/src/views/financialTax/expenseAccount/detail/index.vue index ed1a1fad..b7b6e8d5 100644 --- a/src/views/financialTax/expenseAccount/detail/index.vue +++ b/src/views/financialTax/expenseAccount/detail/index.vue @@ -218,8 +218,6 @@ // 获取额外Query参数 const getActionExtraQuery = (index) => { const obj = appStore.getIdsData - console.log('expenseAccount', obj['expenseAccount']) - console.log('index', index) if (obj && obj['expenseAccount']) { const preData = obj['expenseAccount'][index] diff --git a/src/views/financialTax/expenseAccount/index.vue b/src/views/financialTax/expenseAccount/index.vue index bf96eb46..b70a781f 100644 --- a/src/views/financialTax/expenseAccount/index.vue +++ b/src/views/financialTax/expenseAccount/index.vue @@ -177,8 +177,8 @@ go({ path: '/expenseAccountDetail', query: { - type: pageType, id: row.id, + type: pageType, tabName: pageType == 'EDIT' ? '报销单申请' : '报销单详情', }, })