From a625d8e4695e7fba5ef6747cc3a47625553290c7 Mon Sep 17 00:00:00 2001 From: 21819 Date: Tue, 27 Feb 2024 19:07:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BF=A1=E4=BB=B6=E6=A0=B8?= =?UTF-8?q?=E5=AF=B9=E7=9A=84=E8=A1=A8=E5=8D=95=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/work/components/MailCheck.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/views/work/components/MailCheck.vue b/src/views/work/components/MailCheck.vue index 5b0056f..15e0a34 100644 --- a/src/views/work/components/MailCheck.vue +++ b/src/views/work/components/MailCheck.vue @@ -12,7 +12,7 @@ + range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleMailTimeQuery"/> @@ -144,6 +144,8 @@ const importData = ref([]) const handleUpload: UploadProps['httpRequest'] = (file) => { const formData = new FormData(); // 创建表单数据对象 + formData.append("mailTimeStart",query.value.mailTimeStart) + formData.append("mailTimeStartEnd",query.value.mailTimeEnd) formData.append("file", file.file); // 将文件添加到表单数据中 return axios.post("/lan-api/api/work/check", formData) // 使用 axios 发送 post 请求到后端 .then((res) => { @@ -190,6 +192,15 @@ const handleExceed: UploadProps['onExceed'] = (files) => { function resetView(){ ifShow.value = false } +const handleMailTimeQuery = (val: any) => { + if (val) { + query.value.mailTimeStart = val[0]; + query.value.mailTimeEnd = val[1]; + }else{ + delete query.value.mailTimeStart + delete query.value.mailTimeEnd + } +}