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

Loading…
Cancel
Save