Commit cde5c983 by Sweet Zhang

增加搜索条件

parent 0fd0cb01
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
class="px-3 py-1 inline-flex text-xs leading-5 font-semibold rounded-full" class="px-3 py-1 inline-flex text-xs leading-5 font-semibold rounded-full"
:class="getStatusClass(record.status)" :class="getStatusClass(record.status)"
> >
{{ getStatusLabel(record.status) }} {{ record.statusLabel || '未知状态' }}
</span> </span>
</td> </td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
......
...@@ -241,13 +241,14 @@ const formatStatus = (status: string): string => { ...@@ -241,13 +241,14 @@ const formatStatus = (status: string): string => {
// 上传所有文件方法 // 上传所有文件方法
const handleUploadAll = async () => { const handleUploadAll = async () => {
try { const results = await uploadAllFiles()
const results = await uploadAllFiles() if (results[0].data.code === 200) {
console.log('上传成功:', results)
emit('success', results) emit('success', results)
return results return results
} catch (error) { } else {
emit('error', error as Error) console.log('上传失败:', results)
throw error emit('error', results[0].data.msg as Error)
} }
} }
</script> </script>
......
<template> <template>
<div class="bg-white rounded-lg shadow-md p-6"> <div class="bg-white rounded-lg shadow-md p-6" v-loading="loading">
<div class="mb-4"> <div class="mb-4">
<label class="block text-gray-700 mb-2 font-medium">发件人</label> <label class="block text-gray-700 mb-2 font-medium">发件人</label>
<select <select
...@@ -190,7 +190,7 @@ ...@@ -190,7 +190,7 @@
发送 发送
</button> </button>
</div> </div>
<!-- 导入记录管理弹窗 --> <!-- 编辑数据管理弹窗 -->
<ImportRecordManager <ImportRecordManager
v-if="showImportRecordManager" v-if="showImportRecordManager"
:records="importRecords" :records="importRecords"
...@@ -205,6 +205,7 @@ ...@@ -205,6 +205,7 @@
title="导入数据" title="导入数据"
accept=".csv,.txt,.xlsx" accept=".csv,.txt,.xlsx"
@file-selected="handleImportContacts" @file-selected="handleImportContacts"
@error="handleImportError"
/> />
<!-- 联系人选择弹窗 --> <!-- 联系人选择弹窗 -->
<ContactSelector <ContactSelector
...@@ -221,11 +222,30 @@ ...@@ -221,11 +222,30 @@
@insert-variable="insertVariable" @insert-variable="insertVariable"
@close="showVariableSelector = false" @close="showVariableSelector = false"
/> />
<!-- 发送邮件弹窗 -->
<el-dialog v-model="dialogVisible" title="提示" width="500" :before-close="handleClose">
<span>邮件发送任务已提交,请前往邮件记录中查看发送状态</span>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">暂不前往</el-button>
<!-- 路由导航到邮件记录 -->
<el-button type="primary" @click="navigateToEmailRecords"> 前往邮件记录 </el-button>
</div>
</template>
</el-dialog>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch, onMounted } from 'vue' import { ref, watch, onMounted } from 'vue'
import { ElMessageBox } from 'element-plus'
import { useRouter } from 'vue-router'
const router = useRouter()
const navigateToEmailRecords = () => {
router.push({ name: 'EmailRecords' })
}
import ContactSelector from './ContactSelector.vue' import ContactSelector from './ContactSelector.vue'
import VariableSelector from './VariableSelector.vue' import VariableSelector from './VariableSelector.vue'
import ImportRecordManager from './ImportRecordManager.vue' import ImportRecordManager from './ImportRecordManager.vue'
...@@ -233,7 +253,17 @@ import ImportDialog from './ImportDialog.vue' ...@@ -233,7 +253,17 @@ import ImportDialog from './ImportDialog.vue'
import type { Sender, Contact, Variable, VariableTemplate, ImportRecord, EmailForm } from '../types' import type { Sender, Contact, Variable, VariableTemplate, ImportRecord, EmailForm } from '../types'
// 引入api接口,获取联系人列表、发件人列表、变量模版列表 // 引入api接口,获取联系人列表、发件人列表、变量模版列表
import { senderApi, variableGroupApi, contactApi, sendEmailApi, importContactApi } from '../api/api' import { senderApi, variableGroupApi, contactApi, sendEmailApi, importContactApi } from '../api/api'
const dialogVisible = ref(false)
const handleClose = (done: () => void) => {
ElMessageBox.confirm('邮件发送任务已提交,请前往邮件记录中查看发送状态')
.then(() => {
done()
})
.catch(() => {
// catch error
})
}
// 初始化数据 // 初始化数据
const getSenders = () => { const getSenders = () => {
senderApi senderApi
...@@ -315,7 +345,7 @@ onMounted(() => { ...@@ -315,7 +345,7 @@ onMounted(() => {
getContacts() getContacts()
getGroups() getGroups()
}) })
const loading = ref(false)
const variablePrefix = '{{' const variablePrefix = '{{'
const variableNextfix = '}}' const variableNextfix = '}}'
...@@ -378,12 +408,15 @@ const confirmContactSelection = (selected: Contact<unknown>[]) => { ...@@ -378,12 +408,15 @@ const confirmContactSelection = (selected: Contact<unknown>[]) => {
} }
}) })
} }
getImportedContacts(emailForm.value.sessionId || '') getImportedContacts(emailForm.value.sessionId || '', '')
} }
}) })
} }
const handleImportError = (error: string) => {
ElMessage.error(error)
}
// 更新导入记录 // 编辑数据记录
const updateImportRecord = (updatedRecord: ImportRecord) => { const updateImportRecord = (updatedRecord: ImportRecord) => {
const params = { const params = {
...updatedRecord, ...updatedRecord,
...@@ -426,11 +459,22 @@ const deleteImportRecord = (importBizId: string) => { ...@@ -426,11 +459,22 @@ const deleteImportRecord = (importBizId: string) => {
}) })
} }
// 修改handleImportContacts方法 // 导入数据
const handleImportContacts = (results) => { const handleImportContacts = (results) => {
console.log(results) console.log('导入数据:', results)
if (results.data) { if (results.data) {
emailForm.value.sessionId = results.data.sessionId || '' emailForm.value.sessionId = results.data.data.sessionId || ''
importContactApi.getEmailContactImportDetail(emailForm.value.sessionId || '').then((res) => {
if (res.code === 200) {
emailForm.value.receiveEmail = res.data?.receiveEmails || ''
emailForm.value.ccEmails = res.data?.ccEmails || ''
} else {
ElMessage({
message: res.data.msg || '导入数据失败',
type: 'error',
})
}
})
} }
} }
...@@ -442,29 +486,36 @@ const sendEmail = () => { ...@@ -442,29 +486,36 @@ const sendEmail = () => {
senderBizId: currentSender.value?.senderBizId, senderBizId: currentSender.value?.senderBizId,
sendEmail: currentSender.value?.email || '', sendEmail: currentSender.value?.email || '',
} }
console.log(params) console.log('发送邮件参数:', params)
// 确认发送邮件 loading.value = true
sendEmailApi.sendEmail(params).then((res) => { try {
if (res.code === 200) { // 确认发送邮件
ElMessage({ sendEmailApi.sendEmail(params).then((res) => {
message: '邮件发送成功', loading.value = false
type: 'success', if (res.code === 200) {
}) dialogVisible.value = true
// 发送成功之后,清空表单 // 发送成功之后,清空表单
emailForm.value = { emailForm.value = {
receiveEmail: '', receiveEmail: '',
ccEmailList: [], ccEmailList: [],
content: '', content: '',
attachmentPath: '', attachmentPath: '',
sessionId: '', sessionId: '',
}
} else {
ElMessage({
message: '邮件发送失败,请重新提交',
type: 'error',
})
} }
} else { })
ElMessage({ } catch (error) {
message: '邮件发送失败', loading.value = false
type: 'error', ElMessage({
}) message: '邮件发送失败,请重新提交',
} type: 'error',
}) })
}
} }
// 通过sessionId获取导入的联系人 // 通过sessionId获取导入的联系人
...@@ -497,6 +548,7 @@ import { ElMessage } from 'element-plus' ...@@ -497,6 +548,7 @@ import { ElMessage } from 'element-plus'
import FileUploadComponent from '@/components/FileUploadComponent.vue' import FileUploadComponent from '@/components/FileUploadComponent.vue'
import { UploadResult } from '@/utils/fileUpload' import { UploadResult } from '@/utils/fileUpload'
import { get } from 'http' import { get } from 'http'
import { ca, lo } from 'element-plus/es/locales.mjs'
// 上传成功的文件 // 上传成功的文件
const uploadedFiles = ref<any[]>([]) const uploadedFiles = ref<any[]>([])
......
...@@ -26,25 +26,49 @@ ...@@ -26,25 +26,49 @@
<div class="relative flex-1"> <div class="relative flex-1">
<i class="fas fa-search absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"></i> <i class="fas fa-search absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"></i>
<input <input
v-model="searchQuery" v-model="searchQuery.name"
type="text" type="text"
class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg" class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg"
placeholder="搜索联系人姓名、公司或邮箱..." placeholder="搜索联系人姓名..."
@keyup.enter="searchContacts" />
</div>
<!-- 搜索公司 -->
<div class="relative flex-1">
<i class="fas fa-search absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"></i>
<input
v-model="searchQuery.companyName"
type="text"
class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg"
placeholder="搜索公司..."
/>
</div>
<!-- 搜索邮箱 -->
<div class="relative flex-1">
<i class="fas fa-search absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"></i>
<input
v-model="searchQuery.email"
type="text"
class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg"
placeholder="搜索邮箱..."
/> />
</div> </div>
<div class="flex gap-3 w-full md:w-auto"> <div class="flex gap-3 w-full md:w-auto">
<select <select
v-model="sortBy" v-model="sortBy"
class="w-full md:w-auto px-4 py-2 border border-gray-300 rounded-lg" class="w-full md:w-auto px-4 py-2 border border-gray-300 rounded-lg"
@change="searchContacts"
> >
<option value="name">按姓名排序</option> <option value="name">按姓名排序</option>
<option value="company">按公司排序</option> <option value="companyName">按公司排序</option>
<option value="addedAt">按添加时间排序</option> <option value="email">按邮箱排序</option>
</select> </select>
<button @click="resetSearch" class="btn-outline px-4">重置</button>
</div> </div>
<button @click="resetSearch" class="btn-outline px-4">
<i class="fas fa-sync mr-2"></i>重置
</button>
<!-- 搜索按钮 -->
<button @click="searchContacts" class="btn-primary px-4 flex items-center">
<i class="fas fa-search mr-2"></i> 搜索
</button>
</div> </div>
</div> </div>
...@@ -407,7 +431,11 @@ const handleCancel = (triggerKey: string) => { ...@@ -407,7 +431,11 @@ const handleCancel = (triggerKey: string) => {
const editingSenderId = ref('') const editingSenderId = ref('')
// 页面状态 // 页面状态
const contacts = ref<Contact[]>([]) const contacts = ref<Contact[]>([])
const searchQuery = ref('') const searchQuery = ref({
name: '',
companyName: '',
email: '',
})
const sortBy = ref('name') const sortBy = ref('name')
const isLoading = ref(false) const isLoading = ref(false)
// 模态框状态 // 模态框状态
...@@ -465,6 +493,9 @@ const fetchContacts = async () => { ...@@ -465,6 +493,9 @@ const fetchContacts = async () => {
try { try {
isLoading.value = true isLoading.value = true
const data = await contactApi.getContactList({ const data = await contactApi.getContactList({
companyName: searchQuery.value.companyName,
name: searchQuery.value.name,
email: searchQuery.value.email,
pageNo: currentPage.value, pageNo: currentPage.value,
pageSize: pageSize.value, pageSize: pageSize.value,
sortField: sortBy.value, sortField: sortBy.value,
...@@ -493,7 +524,11 @@ const searchContacts = () => { ...@@ -493,7 +524,11 @@ const searchContacts = () => {
// 重置搜索 // 重置搜索
const resetSearch = () => { const resetSearch = () => {
searchQuery.value = '' searchQuery.value = {
name: '',
companyName: '',
email: '',
}
sortBy.value = 'name' sortBy.value = 'name'
currentPage.value = 1 currentPage.value = 1
fetchContacts() fetchContacts()
......
...@@ -18,13 +18,26 @@ ...@@ -18,13 +18,26 @@
<select <select
v-model="filterStatus" v-model="filterStatus"
class="px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500" class="px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
@change="getEmailTaskMainList"
> >
<option value="">全部状态</option> <option value="">全部状态</option>
<option v-for="item in statusOptions" :key="item.itemValue" :value="item.itemValue"> <option v-for="item in statusOptions" :key="item.itemValue" :value="item.itemValue">
{{ item.itemLabel }} {{ item.itemLabel }}
</option> </option>
</select> </select>
<!-- 重置按钮 -->
<button
@click="resetSearch"
class="px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-400 transition-colors"
>
<i class="fas fa-sync mr-2"></i>重置
</button>
<!-- 搜索按钮 -->
<button
@click="getEmailTaskMainList"
class="px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
>
<i class="fas fa-search mr-2"></i> 搜索
</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -148,6 +161,11 @@ import Pagination from '@/components/Pagination.vue' ...@@ -148,6 +161,11 @@ import Pagination from '@/components/Pagination.vue'
const total = ref(0) const total = ref(0)
const currentPage = ref(1) const currentPage = ref(1)
const pageSize = ref(10) const pageSize = ref(10)
const resetSearch = () => {
searchTerm.value = ''
filterStatus.value = ''
getEmailTaskMainList()
}
// 处理分页变化 // 处理分页变化
const handlePageChange = (page: number, size: number) => { const handlePageChange = (page: number, size: number) => {
...@@ -261,6 +279,7 @@ const getEmailTaskMainList = async () => { ...@@ -261,6 +279,7 @@ const getEmailTaskMainList = async () => {
try { try {
isEmailListLoading.value = true isEmailListLoading.value = true
const params: EmailTask = { const params: EmailTask = {
queryContent: searchTerm.value,
pageNo: currentPage.value, pageNo: currentPage.value,
pageSize: pageSize.value, pageSize: pageSize.value,
status: filterStatus.value, status: filterStatus.value,
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
v-model="uploadedFiles" v-model="uploadedFiles"
:config="uploadConfig" :config="uploadConfig"
@success="handleDocumentUploadSuccess" @success="handleDocumentUploadSuccess"
@error="handleDocumentUploadError"
/> />
<div class="flex justify-end gap-3"> <div class="flex justify-end gap-3">
<button <button
...@@ -43,7 +44,6 @@ const props = defineProps({ ...@@ -43,7 +44,6 @@ const props = defineProps({
* 文件上传配置 * 文件上传配置
*/ */
// 上传附件 // 上传附件
import { ElMessage } from 'element-plus'
import FileUploadComponent from '@/components/FileUploadComponent.vue' import FileUploadComponent from '@/components/FileUploadComponent.vue'
import { UploadResult, UploadConfig } from '@/utils/fileUpload' import { UploadResult, UploadConfig } from '@/utils/fileUpload'
...@@ -62,7 +62,11 @@ const handleDocumentUploadSuccess = (results: UploadResult[]) => { ...@@ -62,7 +62,11 @@ const handleDocumentUploadSuccess = (results: UploadResult[]) => {
emit('update:visible', false) emit('update:visible', false)
emit('file-selected', results[0]) emit('file-selected', results[0])
} }
const emit = defineEmits(['update:visible', 'file-selected']) // 处理文档上传失败
const handleDocumentUploadError = (error: string) => {
emit('error', error)
}
const emit = defineEmits(['update:visible', 'file-selected', 'error'])
const handleCancel = () => { const handleCancel = () => {
emit('update:visible', false) emit('update:visible', false)
......
...@@ -18,12 +18,12 @@ ...@@ -18,12 +18,12 @@
/> />
</div> </div>
<div> <div>
<label class="block text-gray-700 mb-1 text-sm">密码/授权码 *</label> <label class="block text-gray-700 mb-1 text-sm">授权码 *</label>
<input <input
v-model="formData.password" v-model="formData.password"
type="password" type="password"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
placeholder="邮箱密码或授权码" placeholder="邮箱授权码"
/> />
</div> </div>
<div> <div>
...@@ -66,6 +66,45 @@ ...@@ -66,6 +66,45 @@
<div class="p-6 border-b border-gray-200"> <div class="p-6 border-b border-gray-200">
<h3 class="text-lg font-semibold">发件人列表</h3> <h3 class="text-lg font-semibold">发件人列表</h3>
</div> </div>
<!-- 搜索发件人 -->
<div class="p-6 border-b border-gray-200 flex flex-col md:flex-row gap-4">
<div class="relative flex-1">
<i class="fas fa-search absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"></i>
<input
v-model="searchQuery.displayName"
type="text"
class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg"
placeholder="搜索发件人姓名..."
/>
</div>
<!-- 搜索发件人邮箱 -->
<div class="relative flex-1">
<i class="fas fa-search absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"></i>
<input
v-model="searchQuery.email"
type="text"
class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg"
placeholder="搜索发件人邮箱..."
/>
</div>
<!-- 搜索和重置按钮在右侧 -->
<div class="flex gap-3 w-full md:w-auto">
<!-- 重置和搜索 -->
<button
@click="resetSearch"
class="px-4 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-400 transition-colors mr-2"
>
<i class="fas fa-sync mr-2"></i>重置
</button>
<button
@click="getSenders"
class="btn-outline px-4 py-2 border border-blue-500 text-blue-500 rounded-md hover:bg-blue-50 transition-colors"
>
<i class="fas fa-search mr-2"></i> 搜索
</button>
</div>
</div>
<div class="overflow-x-auto"> <div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200"> <table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50"> <thead class="bg-gray-50">
...@@ -167,6 +206,18 @@ import Pagination from '@/components/Pagination.vue' ...@@ -167,6 +206,18 @@ import Pagination from '@/components/Pagination.vue'
const total = ref(0) const total = ref(0)
const currentPage = ref(1) const currentPage = ref(1)
const pageSize = ref(10) const pageSize = ref(10)
const searchQuery = ref({
displayName: '',
email: '',
})
const resetSearch = () => {
searchQuery.value = {
displayName: '',
email: '',
}
getSenders()
}
// 处理分页变化 // 处理分页变化
const handlePageChange = (page: number, size: number) => { const handlePageChange = (page: number, size: number) => {
...@@ -185,6 +236,7 @@ const handlePageSizeUpdate = (size: number) => { ...@@ -185,6 +236,7 @@ const handlePageSizeUpdate = (size: number) => {
} }
// 引入弹窗组件 // 引入弹窗组件
import CommonModal from '@/components/CommonModal.vue' import CommonModal from '@/components/CommonModal.vue'
import { get } from 'http'
// 弹窗提示信息对象 // 弹窗提示信息对象
const modalVisible = ref(false) const modalVisible = ref(false)
const modalConfig = ref({ const modalConfig = ref({
...@@ -272,7 +324,8 @@ const getProviders = () => { ...@@ -272,7 +324,8 @@ const getProviders = () => {
const getSenders = () => { const getSenders = () => {
senderApi senderApi
.getEmailSenderConfigList({ .getEmailSenderConfigList({
emailSenderConfigName: '', displayName: searchQuery.value.displayName,
email: searchQuery.value.email,
pageNo: currentPage.value, pageNo: currentPage.value,
pageSize: pageSize.value, pageSize: pageSize.value,
}) })
...@@ -286,7 +339,7 @@ const saveSender = () => { ...@@ -286,7 +339,7 @@ const saveSender = () => {
if (!formData.value.email || !formData.value.password || !formData.value.providerBizId) { if (!formData.value.email || !formData.value.password || !formData.value.providerBizId) {
openModal({ openModal({
title: '添加失败', title: '添加失败',
message: '请填写完整邮箱、密码和服务商', message: '请填写完整邮箱授权码和服务商',
}) })
return return
} }
......
...@@ -134,6 +134,44 @@ ...@@ -134,6 +134,44 @@
<div class="p-6 border-b border-gray-200"> <div class="p-6 border-b border-gray-200">
<h3 class="text-lg font-semibold">变量列表</h3> <h3 class="text-lg font-semibold">变量列表</h3>
</div> </div>
<!-- 增加搜索条件 -->
<!-- 通过变量中文名和英文名搜索 -->
<div class="bg-white rounded-lg shadow-sm p-4 mb-6">
<div class="flex flex-col md:flex-row gap-4">
<div class="relative flex-1">
<i class="fas fa-search absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"></i>
<input
v-model="searchQuery.variableNameCn"
type="text"
class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg"
placeholder="输入变量中文名"
/>
</div>
<div class="relative flex-1">
<i class="fas fa-search absolute left-3 top-1/2 -translate-y-1/2 text-gray-400"></i>
<input
v-model="searchQuery.variableNameEn"
type="text"
class="w-full pl-10 pr-4 py-2 border border-gray-300 rounded-lg"
placeholder="输入变量英文名"
/>
</div>
<!-- 搜索按钮 -->
<button
@click="resetSearch"
class="px-4 py-2 bg-gray-100 text-gray-700 rounded-md hover:bg-gray-400 transition-colors mr-2"
>
<i class="fas fa-sync mr-2"></i>重置
</button>
<button
@click="fetchVariables"
class="px-4 py-2 bg-blue-500 text-white rounded-md hover:bg-blue-700 transition-colors text-sm"
>
<i class="fas fa-search mr-2"></i> 搜索
</button>
</div>
</div>
<div class="overflow-x-auto"> <div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200"> <table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50"> <thead class="bg-gray-50">
...@@ -310,7 +348,17 @@ import Pagination from '@/components/Pagination.vue' ...@@ -310,7 +348,17 @@ import Pagination from '@/components/Pagination.vue'
const total = ref(0) const total = ref(0)
const currentPage = ref(1) const currentPage = ref(1)
const pageSize = ref(10) const pageSize = ref(10)
const searchQuery = ref({
variableNameCn: '',
variableNameEn: '',
})
const resetSearch = () => {
searchQuery.value = {
variableNameCn: '',
variableNameEn: '',
}
fetchVariables()
}
// 处理分页变化 // 处理分页变化
const handlePageChange = (page: number, size: number) => { const handlePageChange = (page: number, size: number) => {
console.log('分页变化:', page, size) console.log('分页变化:', page, size)
...@@ -509,6 +557,7 @@ const deleteVariable = (id: string, type?: string) => { ...@@ -509,6 +557,7 @@ const deleteVariable = (id: string, type?: string) => {
// 查询变量列表 // 查询变量列表
const fetchVariables = () => { const fetchVariables = () => {
const params = { const params = {
...searchQuery.value,
pageNo: currentPage.value, pageNo: currentPage.value,
pageSize: pageSize.value, pageSize: pageSize.value,
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment