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(() => {