3 changed files with 134 additions and 1 deletions
@ -0,0 +1,121 @@ |
|||||||
|
<template> |
||||||
|
<div class="container"> |
||||||
|
<header> |
||||||
|
<el-form :label-width="120"> |
||||||
|
<el-row> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="来信时间"> |
||||||
|
<el-date-picker v-model="query.searchTime" value-format="YYYY-MM-DD HH:mm:ss" |
||||||
|
type="datetimerange" format="YYYY-MM-DD HH:mm:ss" range-separator="~" |
||||||
|
start-placeholder="开始日期" end-placeholder="结束日期" @change="handleMailTimeQuery" /> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
</el-row> |
||||||
|
<div class="flex end mb-20"> |
||||||
|
<el-button type="primary" @click="getList">查询</el-button> |
||||||
|
<el-button @click="reset">重置</el-button> |
||||||
|
</div> |
||||||
|
</el-form> |
||||||
|
</header> |
||||||
|
<main> |
||||||
|
<div class="table-container"> |
||||||
|
<el-table :data="notice" style="width: 100%"> |
||||||
|
<el-table-column prop="createTime" label="时间" align="center" width="200" /> |
||||||
|
<el-table-column prop="content" label="消息内容" > |
||||||
|
</el-table-column> |
||||||
|
</el-table> |
||||||
|
</div> |
||||||
|
<div class="flex mt-4 end"> |
||||||
|
<el-pagination @size-change="getList" @current-change="getList" :current-page="query.current" |
||||||
|
:page-sizes="[10, 20, 50]" :page-size="query.size" v-model:current-page="query.current" |
||||||
|
layout="total,sizes, prev, pager, next, jumper" :total="totalSize.total"> |
||||||
|
</el-pagination> |
||||||
|
</div> |
||||||
|
</main> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
</template> |
||||||
|
<script lang="ts" setup> |
||||||
|
import MailDialog from "./components/MailDialog.vue"; |
||||||
|
|
||||||
|
import { getMailFlowDetail } from "@/api/mail"; |
||||||
|
import { useDictData } from "@/hooks/useDictOptions"; |
||||||
|
import { useDictOptions } from '@/hooks/useDictOptions' |
||||||
|
import { onMounted, onUnmounted } from 'vue' |
||||||
|
import useMailStore from "@/stores/modules/mail"; |
||||||
|
import { getDictLable, formatTimeText, getFlowTagType } from "@/utils/util"; |
||||||
|
import { ref, reactive, watchEffect } from "vue"; |
||||||
|
import { getlist } from '@/api/notice' |
||||||
|
import { getFlowNodes } from '@/api/org/flowNode' |
||||||
|
const mailStore = useMailStore(); |
||||||
|
mailStore.getMailCategorys(); |
||||||
|
const { dictData } = useDictData(["mail_source", "mail_level", "mail_state"]); |
||||||
|
|
||||||
|
const query = ref({ |
||||||
|
size: 10, |
||||||
|
current: 1 |
||||||
|
}); |
||||||
|
const totalSize = reactive({ |
||||||
|
total: 0, |
||||||
|
pages: 0 |
||||||
|
}) |
||||||
|
|
||||||
|
const notice = ref([]); |
||||||
|
|
||||||
|
const handleMailTimeQuery = (val: any) => { |
||||||
|
if (val) { |
||||||
|
query.value.searchStartTime = val[0]; |
||||||
|
query.value.searchEndTime = val[1]; |
||||||
|
} else { |
||||||
|
delete query.value.searchStartTime |
||||||
|
delete query.value.searchEndTime |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function getList() { |
||||||
|
getlist(query.value).then((data) => { |
||||||
|
notice.value = data.records; |
||||||
|
totalSize.total = data.total; |
||||||
|
totalSize.pages = data.pages; |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
function reset() { |
||||||
|
query.value = {} |
||||||
|
getList() |
||||||
|
} |
||||||
|
|
||||||
|
getList() |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script> |
||||||
|
<style lang="scss" scoped> |
||||||
|
.success { |
||||||
|
padding: 0 8px; |
||||||
|
height: 24px; |
||||||
|
line-height: 24px; |
||||||
|
text-align: center; |
||||||
|
|
||||||
|
.text { |
||||||
|
color: #128009; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
.error { |
||||||
|
background-color: #ff0000; |
||||||
|
color: #fff; |
||||||
|
padding: 0 8px; |
||||||
|
height: 24px; |
||||||
|
line-height: 24px; |
||||||
|
border-radius: 20px; |
||||||
|
text-align: center; |
||||||
|
} |
||||||
|
</style> |
||||||
Loading…
Reference in new issue