Browse Source

修复信件核对时无法正确查询数据库的bug

master
21819 2 years ago
parent
commit
567b8dfba0
  1. 19
      src/views/work/components/MailCheck.vue

19
src/views/work/components/MailCheck.vue

@ -12,7 +12,8 @@
<el-col span="6"> <el-col span="6">
<el-form-item label="来信时间"> <el-form-item label="来信时间">
<el-date-picker v-model="query.mailTime" value-format="YYYY-MM-DD" type="daterange" <el-date-picker v-model="query.mailTime" value-format="YYYY-MM-DD" type="daterange"
range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleMailTimeQuery"/> range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期"
@change="handleMailTimeQuery" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col span="6"> <el-col span="6">
@ -22,6 +23,7 @@
:http-request="handleUpload" :on-exceed="handleExceed" :auto-upload="false" :http-request="handleUpload" :on-exceed="handleExceed" :auto-upload="false"
:file-list="fileList"> :file-list="fileList">
<el-button>上传 <el-button>上传
<template #icon> <template #icon>
<icon name="el-icon-Upload" /> <icon name="el-icon-Upload" />
</template> </template>
@ -55,6 +57,7 @@
<el-table :data="form" style="width: 100%" stripe ref="tableRef"> <el-table :data="form" style="width: 100%" stripe ref="tableRef">
<el-table-column prop="mailTime" label="来信时间" align="center" width="170" /> <el-table-column prop="mailTime" label="来信时间" align="center" width="170" />
<el-table-column label="信件来源" align="center" width="94"> <el-table-column label="信件来源" align="center" width="94">
<template #default="{ row }"> <template #default="{ row }">
<span>{{ <span>{{
dictData.mail_source.filter( dictData.mail_source.filter(
@ -68,12 +71,14 @@
<el-table-column prop="mailCategory" label="信件分类" width="160" /> <el-table-column prop="mailCategory" label="信件分类" width="160" />
<el-table-column prop="content" label="信件内容" show-overflow-tooltip /> <el-table-column prop="content" label="信件内容" show-overflow-tooltip />
<el-table-column label="信件状态" width="90"> <el-table-column label="信件状态" width="90">
<template #default="{ row }"> <template #default="{ row }">
<span>{{ getDictLable(dictData.mail_state, row.mailState) }}</span> <span>{{ getDictLable(dictData.mail_state, row.mailState) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="threeDeptName" label="办理单位" width="160" /> <el-table-column prop="threeDeptName" label="办理单位" width="160" />
<el-table-column label="流程节点"> <el-table-column label="流程节点">
<template #default="{ row }"> <template #default="{ row }">
<el-tag :type="getFlowTagType(row.flowKey)" v-if="row.flowBeforeName">{{ row.flowBeforeName <el-tag :type="getFlowTagType(row.flowKey)" v-if="row.flowBeforeName">{{ row.flowBeforeName
}}</el-tag> }}</el-tag>
@ -81,6 +86,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="流程限时" width="140"> <el-table-column label="流程限时" width="140">
<template #default="{ row }"> <template #default="{ row }">
<div v-if="row.flowLimitedRemainingTime > 0" class="success"> <div v-if="row.flowLimitedRemainingTime > 0" class="success">
<span class="mr-4">剩余</span> <span class="mr-4">剩余</span>
@ -99,6 +105,7 @@
</el-dialog> </el-dialog>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, defineProps } from 'vue' import { ref, defineProps } from 'vue'
import { watch } from 'vue' import { watch } from 'vue'
@ -144,8 +151,10 @@ const importData = ref([])
const handleUpload: UploadProps['httpRequest'] = (file) => { const handleUpload: UploadProps['httpRequest'] = (file) => {
const formData = new FormData(); // const formData = new FormData(); //
formData.append("mailTimeStart",query.value.mailTimeStart) if (query.value.mailTimeStart && query.value.mailTimeEnd) {
formData.append("mailTimeStartEnd",query.value.mailTimeEnd) formData.append("mailTimeStart", query.value.mailTimeStart)
formData.append("mailTimeStartEnd", query.value.mailTimeEnd)
}
formData.append("file", file.file); // formData.append("file", file.file); //
return axios.post("/lan-api/api/work/check", formData) // 使 axios post return axios.post("/lan-api/api/work/check", formData) // 使 axios post
.then((res) => { .then((res) => {
@ -189,14 +198,14 @@ const handleExceed: UploadProps['onExceed'] = (files) => {
upload.value!.handleStart(file) upload.value!.handleStart(file)
} }
function resetView(){ function resetView() {
ifShow.value = false ifShow.value = false
} }
const handleMailTimeQuery = (val: any) => { const handleMailTimeQuery = (val: any) => {
if (val) { if (val) {
query.value.mailTimeStart = val[0]; query.value.mailTimeStart = val[0];
query.value.mailTimeEnd = val[1]; query.value.mailTimeEnd = val[1];
}else{ } else {
delete query.value.mailTimeStart delete query.value.mailTimeStart
delete query.value.mailTimeEnd delete query.value.mailTimeEnd
} }

Loading…
Cancel
Save