Browse Source

fix:tab表格中加上合并历史查看

master
parent
commit
1f9f754e02
  1. 36
      src/views/data/ComplaintCollection.vue

36
src/views/data/ComplaintCollection.vue

@ -296,9 +296,17 @@
</el-table-column>
<el-table-column label="来信内容" width="100" prop="thingDesc" show-overflow-tooltip/>
<el-table-column label="涉嫌问题" width="100" prop="involveProblemStr" show-overflow-tooltip/>
<el-table-column label="是否重复件" width="100">
<el-table-column label="是否重复件" width="120">
<template #default="{ row }">
{{ getDictLabel(dict.yesNo, row.repeatt) }}
<el-button
v-if="row.mergeHistory"
type="primary"
size="small"
link
style="margin-left: 4px; padding: 0;"
@click="showMergeHistory(row)"
>合并历史</el-button>
</template>
</el-table-column>
@ -447,6 +455,12 @@
@close="mailboxShow = false"
/>
<!-- 合并历史弹窗 -->
<MergeHistoryDialog
v-model="mergeHistoryDialogVisible"
:mergeHistory="mergeHistoryData"
/>
</template>
@ -458,8 +472,10 @@ import {
addComplaintCollection,
delComplaintCollection, exportData,
getComplaintCollectionPage, saveInvolveJson,
updateComplaintCollection
updateComplaintCollection,
getMergeHistory
} from "@/api/data/complaintCollection.ts";
import MergeHistoryDialog from "@/components/data/MergeHistoryDialog.vue";
import useUserStore from "@/stores/modules/user.ts";
const route = useRoute()
@ -869,6 +885,22 @@ const handleExport = async () => {
await exportData(body);
}
// endregion
// region
const mergeHistoryDialogVisible = ref(false)
const mergeHistoryData = ref(null)
const showMergeHistory = async (row) => {
try {
const res = await getMergeHistory({ id: row.id })
const data = res?.data || res
mergeHistoryData.value = typeof data === 'string' ? JSON.parse(data) : data
} catch (e) {
mergeHistoryData.value = null
}
mergeHistoryDialogVisible.value = true
}
// endregion
</script>

Loading…
Cancel
Save