Browse Source

feat: 子信件不抓,添加更新机制

master
buaixuexideshitongxue 7 hours ago
parent
commit
6e878d9634
  1. 8
      src/api/data/complaintCollection.ts
  2. 25
      src/views/data/ComplaintCollection_jzxx.vue
  3. 3
      src/views/work/Query.vue

8
src/api/data/complaintCollection.ts

@ -9,6 +9,13 @@ export function getComplaintCollectionPage(body) {
}); });
} }
export function refreshMayorMailbox(body) {
return request.post({
url: `/data/complaintCollection/refreshMayorMailbox`,
body
});
}
export function addComplaintCollection(body) { export function addComplaintCollection(body) {
return request.post({ return request.post({
url: `/data/complaintCollection/addComplaintCollection`, url: `/data/complaintCollection/addComplaintCollection`,
@ -133,4 +140,3 @@ export function getMergeHistory(body) {
body body
}); });
} }

25
src/views/data/ComplaintCollection_jzxx.vue

@ -325,9 +325,15 @@
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="120" fixed="right"> <el-table-column label="操作" width="190" fixed="right">
<template #default="{ row }"> <template #default="{ row }">
<el-button type="primary" link @click="handleActionDetail(row)">办理详情</el-button> <el-button type="primary" link @click="handleActionDetail(row)">办理详情</el-button>
<el-button
type="primary"
link
:loading="refreshingId === row.id"
@click="handleRefresh(row)"
>再次更新</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -368,8 +374,10 @@ import {timeFormat} from "@/utils/util";
import useCatchStore from "@/stores/modules/catch"; import useCatchStore from "@/stores/modules/catch";
import { import {
exportData, exportData,
getComplaintCollectionPage getComplaintCollectionPage,
refreshMayorMailbox
} from "@/api/data/complaintCollection.ts"; } from "@/api/data/complaintCollection.ts";
import feedback from "@/utils/feedback";
const catchStore = useCatchStore(); const catchStore = useCatchStore();
const show = ref(false); const show = ref(false);
@ -391,6 +399,7 @@ const query = ref({
const list = ref([]); const list = ref([]);
const total = ref(0); const total = ref(0);
const loading = ref(false) const loading = ref(false)
const refreshingId = ref('')
const getList = async () => { const getList = async () => {
loading.value = true; loading.value = true;
@ -515,6 +524,18 @@ function handleActionDetail(row) {
} }
} }
const handleRefresh = async (row) => {
await feedback.confirm(`确定从局长信箱重新同步信件“${row.originId}”的最新办理结果吗?`)
refreshingId.value = row.id
try {
const message = await refreshMayorMailbox({id: row.id})
feedback.msgSuccess(message || '再次更新成功')
await getList()
} finally {
refreshingId.value = ''
}
}
const handleExport = async () => { const handleExport = async () => {
const body = { const body = {
...query.value, ...query.value,

3
src/views/work/Query.vue

@ -637,7 +637,8 @@
<countdown <countdown
:time="row.remainingDuration" :time="row.remainingDuration"
v-if=" v-if="
row.remainingDuration && row.remainingDuration !== null &&
row.remainingDuration !== undefined &&
row.processingStatus !== row.processingStatus !==
ProcessingStatus.COMPLETED ProcessingStatus.COMPLETED
" "

Loading…
Cancel
Save