Compare commits

...

2 Commits

Author SHA1 Message Date
wxc cb7bda5dbb 优化完善 2 months ago
wxc 5fd691bf91 20250902 3 months ago
  1. 2
      .gitignore
  2. 6
      src/api/mail.js
  3. 130
      src/views/MailEtl.vue
  4. 18
      src/views/ManageMail.vue
  5. 2
      vite.config.js

2
.gitignore vendored

@ -9,3 +9,5 @@ node_modules
*.mjs *.mjs
admin admin
*.zip

6
src/api/mail.js

@ -5,3 +5,9 @@ export function listMail(query) {
url: '/mail/list', query url: '/mail/list', query
}) })
} }
export function mailDetail(id) {
return get({
url: '/mail/detail?id=' + id
})
}

130
src/views/MailEtl.vue

@ -38,10 +38,10 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="是否成功"> <el-form-item label="是否成功">
<el-input <el-select v-model="form.success" clearable>
v-model="form.success" <el-option label="成功" :value="true"></el-option>
placeholder="" <el-option label="失败" :value="false"></el-option>
></el-input> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -86,7 +86,7 @@
label="创建日期" label="创建日期"
width="120px" width="120px"
/> />
<el-table-column label="是否成功" width="90px" align="center"> <el-table-column label="是否成功" width="120px" align="center">
<template #default="{ row }"> <template #default="{ row }">
<el-tag type="success" v-if="row.success">成功</el-tag> <el-tag type="success" v-if="row.success">成功</el-tag>
<el-tag type="danger" v-else>失败</el-tag> <el-tag type="danger" v-else>失败</el-tag>
@ -97,8 +97,15 @@
label="错误信息" label="错误信息"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column width="120" label="操作"> <el-table-column width="160" label="操作">
<template #default="{ row }"> <template #default="{ row }">
<el-button
type="primary"
link
size="small"
@click="handleShowDetail(row.mailId)"
>详情</el-button
>
<el-popconfirm <el-popconfirm
title="确认删除?" title="确认删除?"
@confirm="handleDel(row.id)" @confirm="handleDel(row.id)"
@ -132,10 +139,66 @@
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
<el-dialog title="信件详情" v-model="show">
<div class="row">
<div class="col">
<label>信件编号</label>
<span>{{ activeRow.id }}</span>
</div>
<div class="col">
<label>来信时间</label>
<span>{{ activeRow.createTime }}</span>
</div>
</div>
<div class="row">
<div class="col">
<label>来信人姓名</label>
<span>{{ activeRow.contactName }}</span>
</div>
<div class="col">
<label>来信人电话</label>
<span>{{ activeRow.contactPhone }}</span>
</div>
</div>
<div class="row">
<div class="col">
<label>证件号码</label>
<span>{{ activeRow.contactIdCard }}</span>
</div>
</div>
<div class="row">
<div class="col" style="width: 100%">
<label>信件内容</label>
<div class="content">{{ activeRow.content }}</div>
</div>
</div>
<div class="row">
<div class="col">
<label>案件编号</label>
<span>{{ activeRow.caseNumber }}</span>
</div>
<div class="col">
<label>被投诉/举报单位</label>
<span>{{ activeRow.involvedDeptName }}</span>
</div>
</div>
<div class="row" v-if="activeRow.attachments">
<div class="col" style="width: 100%">
<label>附件</label>
<div class="flex gap wrap attachments" v-if="JSON.parse(activeRow.attachments).length">
<img v-for="(item, index) in JSON.parse(activeRow.attachments)" :key="index" :src="`https://jzxx.hncsga.cn/api/file/stream/${item.filepath}`" alt="" @click="open(`https://jzxx.hncsga.cn/api/file/stream/${item.filepath}`)">
</div>
<el-empty description="无附件" v-else />
</div>
</div>
<footer></footer>
</el-dialog>
</template> </template>
<script setup> <script setup>
import { request } from "@/util/axios_config"; import { request } from "@/util/axios_config";
import { mailDetail } from "@/api/mail";
import { getToken } from "@/util/token"; import { getToken } from "@/util/token";
import { delMailEtl } from "@/api/mailEtl"; import { delMailEtl } from "@/api/mailEtl";
@ -178,10 +241,8 @@ const flexColumnWidth = (label, prop) => {
const handleResponse = (response) => { const handleResponse = (response) => {
tableData.value = []; tableData.value = [];
if (MailTab.value == "mail_etl") { if (MailTab.value == "mail_etl") {
console.log("aaaa");
tableData.value = response.data.mails; tableData.value = response.data.mails;
} else { } else {
console.log("bbbb");
tableData.value = response.data.evaMails; tableData.value = response.data.evaMails;
} }
tableData.value.forEach((item) => { tableData.value.forEach((item) => {
@ -265,4 +326,57 @@ async function handleDel(id) {
await delMailEtl(id) await delMailEtl(id)
search() search()
} }
const show = ref(false)
const activeRow = ref({})
function handleShowDetail(id) {
mailDetail(id).then(data => {
activeRow.value = data;
show.value = true
})
}
</script> </script>
<style lang="scss" scoped>
.row {
display: flex;
padding: 10px 0;
.col {
width: 50%;
display: flex;
gap: 10px;
label {
width: 160px;
text-align: right;
color: #666;
+ * {
width: calc(100% - 170px);
}
}
span {
color: #333;
}
.content {
background: #EFF0F5;
padding: 8px 20px;
white-space: pre-wrap;
}
}
}
.attachments {
img {
max-width: 160px;
max-height: 300px;
border: 1px solid transparent;
&:hover {
cursor: pointer;
border-color: red;
}
}
}
footer {
min-height: 20px;
}
</style>

18
src/views/ManageMail.vue

@ -12,6 +12,7 @@
value-format="YYYY-MM-DD HH:mm:ss" value-format="YYYY-MM-DD HH:mm:ss"
time-format="A hh:mm:ss" time-format="A hh:mm:ss"
v-model="query.createTime" v-model="query.createTime"
clearable
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -20,6 +21,7 @@
<el-input <el-input
placeholder="请输入" placeholder="请输入"
v-model="query.contactName" v-model="query.contactName"
clearable
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -28,14 +30,16 @@
<el-input <el-input
placeholder="请输入" placeholder="请输入"
v-model="query.contactPhone" v-model="query.contactPhone"
clearable
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="来信人证件号码"> <el-form-item label="证件号码">
<el-input <el-input
placeholder="请输入" placeholder="请输入"
v-model="query.contactIdCard" v-model="query.contactIdCard"
clearable
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -46,12 +50,22 @@
<el-input <el-input
placeholder="请输入" placeholder="请输入"
v-model="query.content" v-model="query.content"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="信件编码">
<el-input
placeholder="请输入"
v-model="query.id"
clearable
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="评价结果"> <el-form-item label="评价结果">
<el-select v-model="query.satisfactionSms"> <el-select v-model="query.satisfactionSms" clearable>
<el-option value="satisfied" label="非常满意" /> <el-option value="satisfied" label="非常满意" />
<el-option <el-option
value="basically_satisfied" value="basically_satisfied"

2
vite.config.js

@ -53,7 +53,7 @@ export default ({ mode }) => {
'/admin-api': { '/admin-api': {
// http://118.253.151.67:8989/admin-api // http://118.253.151.67:8989/admin-api
// http://127.0.0.1:8083 // http://127.0.0.1:8083
target: 'http://127.0.0.1:8083', target: 'http://118.253.151.67:8989/admin-api',
changeOrigin: true, changeOrigin: true,
rewrite: (p) => p.replace(/^\/admin-api/, '') rewrite: (p) => p.replace(/^\/admin-api/, '')
} }

Loading…
Cancel
Save