From cd0633d519c7c1b52fd871f205fd98f0385b8141 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 10 Apr 2024 18:40:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=80=A7=E8=83=BD=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=BF=80=E6=B4=BB=E5=81=9C=E6=AD=A2=E6=94=BE=E5=87=BA=EF=BC=8C?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=88=A0=E9=99=A4=E6=94=BE=E5=88=B0=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/perfManage/perfThreshold/index.vue | 53 +++++++++++++------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/src/views/perfManage/perfThreshold/index.vue b/src/views/perfManage/perfThreshold/index.vue index b25c4f41..1cb3354d 100644 --- a/src/views/perfManage/perfThreshold/index.vue +++ b/src/views/perfManage/perfThreshold/index.vue @@ -5,7 +5,6 @@ import { Form, message, Modal } from 'ant-design-vue/lib'; import { SizeType } from 'ant-design-vue/lib/config-provider'; import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface'; import { ColumnsType } from 'ant-design-vue/lib/table'; -import { parseDateToStr } from '@/utils/date-utils'; import { RESULT_CODE_SUCCESS } from '@/constants/result-constants'; import useI18n from '@/hooks/useI18n'; import useDictStore from '@/store/modules/dict'; @@ -196,7 +195,11 @@ function fnGetList(pageNum?: number) { } tablePagination.total = res.total; tableState.data = res.rows; - if (tablePagination.total <=(queryParams.pageNum - 1) * tablePagination.pageSize &&queryParams.pageNum !== 1) { + if ( + tablePagination.total <= + (queryParams.pageNum - 1) * tablePagination.pageSize && + queryParams.pageNum !== 1 + ) { tableState.loading = false; fnGetList(queryParams.pageNum - 1); } @@ -311,7 +314,7 @@ function fnModalVisibleByEdit(id?: string) { modalState.confirmLoading = false; hide(); if (res.code === RESULT_CODE_SUCCESS && res.data) { - fnSelectPerformanceInit(res.data.neType) + fnSelectPerformanceInit(res.data.neType); modalState.from = Object.assign(modalState.from, res.data); modalState.title = t('views.perfManage.perfThreshold.editThre'); modalState.visibleByEdit = true; @@ -468,6 +471,14 @@ function fnTaskModalVisible(type: string | number, row: Record) { } fnRecordStop(row); } + + if (type === 'edit') { + fnModalVisibleByEdit(row.id); + } + + if (type === 'delete') { + fnRecordDelete(row); + } } onMounted(() => { @@ -600,23 +611,25 @@ onMounted(() => {