|
|
|
|
@ -38,39 +38,50 @@
|
|
|
|
|
<main> |
|
|
|
|
<div class="table-container"> |
|
|
|
|
<el-table :data="statistics" style="width: 100%"> |
|
|
|
|
<el-table-column prop="second_dept_name1" label="单位名称" align="center" width="200" /> |
|
|
|
|
<el-table-column key="allcount1" sortable prop="allcount1" label="信件总量" align="center" /> |
|
|
|
|
<el-table-column label="投诉类" align="center" > |
|
|
|
|
<el-table-column prop="sumcount1" sortable label="数量" align="center" /> |
|
|
|
|
<el-table-column prop="countrate1" sortable label="占比" align="center" /> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="举报类" align="center" > |
|
|
|
|
<el-table-column prop="sumcount2" sortable label="数量" align="center" /> |
|
|
|
|
<el-table-column prop="countrate2" sortable label="占比" align="center" /> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="咨询求助类" align="center" > |
|
|
|
|
<el-table-column prop="sumcount3" sortable label="数量" align="center" /> |
|
|
|
|
<el-table-column prop="countrate3" sortable label="占比" align="center" /> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="工作建议类" align="center" > |
|
|
|
|
<el-table-column prop="sumcount4" sortable label="数量" align="center" /> |
|
|
|
|
<el-table-column prop="countrate4" sortable label="占比" align="center" /> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="涉众金融平台类" align="center" > |
|
|
|
|
<el-table-column prop="sumcount5" sortable label="数量" align="center" /> |
|
|
|
|
<el-table-column prop="countrate5" sortable label="占比" align="center" /> |
|
|
|
|
<el-table-column |
|
|
|
|
v-for="(column, index) in columns" |
|
|
|
|
:key="index" |
|
|
|
|
:prop="column.prop" |
|
|
|
|
:label="column.label" |
|
|
|
|
:sortable="column.sortable" |
|
|
|
|
:width="column.width" |
|
|
|
|
align='center' |
|
|
|
|
> |
|
|
|
|
<!-- 如果列有子列,递归渲染 --> |
|
|
|
|
<el-table-column |
|
|
|
|
v-if="column.children" |
|
|
|
|
v-for="(childColumn, childIndex) in column.children" |
|
|
|
|
:key="childIndex" |
|
|
|
|
:prop="childColumn.prop" |
|
|
|
|
:label="childColumn.label" |
|
|
|
|
sortable |
|
|
|
|
align='center' |
|
|
|
|
> |
|
|
|
|
<!-- 如果子列还有子列,继续递归 --> |
|
|
|
|
<el-table-column |
|
|
|
|
v-if="childColumn.children" |
|
|
|
|
v-for="(grandChildColumn, grandChildIndex) in childColumn.children" |
|
|
|
|
:key="grandChildIndex" |
|
|
|
|
:prop="grandChildColumn.prop" |
|
|
|
|
:label="grandChildColumn.label" |
|
|
|
|
sortable |
|
|
|
|
align='center' |
|
|
|
|
> |
|
|
|
|
<el-table-column |
|
|
|
|
v-if="grandChildColumn.children" |
|
|
|
|
v-for="(grandgrandChildColumnChildColumn, grandgrandChildIndex) in grandChildColumn.children" |
|
|
|
|
:key="grandgrandChildIndex" |
|
|
|
|
:prop="grandgrandChildColumnChildColumn.prop" |
|
|
|
|
:label="grandgrandChildColumnChildColumn.label" |
|
|
|
|
sortable |
|
|
|
|
align='center' |
|
|
|
|
> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="无效类" align="center" > |
|
|
|
|
<el-table-column prop="sumcount6" sortable label="数量" align="center" /> |
|
|
|
|
<el-table-column prop="countrate6" sortable label="占比" align="center" /> |
|
|
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="终止类" align="center" > |
|
|
|
|
<el-table-column prop="sumcount7" sortable label="数量" align="center" /> |
|
|
|
|
<el-table-column prop="countrate7" sortable label="占比" align="center" /> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="感谢信类" align="center" > |
|
|
|
|
<el-table-column prop="sumcount8" sortable label="数量" align="center" /> |
|
|
|
|
<el-table-column prop="countrate8" sortable label="占比" align="center" /> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
|
</div> |
|
|
|
|
@ -86,10 +97,10 @@
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
<script lang="ts" setup> |
|
|
|
|
import { useDictData } from "@/hooks/useDictOptions"; |
|
|
|
|
|
|
|
|
|
import useMailStore from "@/stores/modules/mail"; |
|
|
|
|
import { ref, reactive, watchEffect } from "vue"; |
|
|
|
|
import { getlist ,getCategorylist} from '@/api/data' |
|
|
|
|
import { getCategoryHeaderlist ,getCategorylist} from '@/api/data' |
|
|
|
|
import { useDictOptions } from '@/hooks/useDictOptions' |
|
|
|
|
import { deptEasyLists,listSecond } from '@/api/org/department' |
|
|
|
|
|
|
|
|
|
@ -104,37 +115,10 @@ const { optionsData } = useDictOptions<{
|
|
|
|
|
api: listSecond |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|
const modifiedCategoryHeaders = computed(() => { |
|
|
|
|
const headers = [...categoryHeaders.value]; |
|
|
|
|
const complaintIndex = headers.findIndex(h => h.label === '投诉类'); |
|
|
|
|
|
|
|
|
|
if (complaintIndex !== -1) { |
|
|
|
|
const complaintHeader = headers.splice(complaintIndex, 1); |
|
|
|
|
headers.splice(complaintIndex, 0, ...complaintHeader, { label: '数量', width: 120 }, { label: '占比', width: 120 }); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return headers; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
const categoryHeaders = ref([ |
|
|
|
|
{ label: '投诉类' }, |
|
|
|
|
{ label: '举报类' }, |
|
|
|
|
{ label: '咨询求助类' }, |
|
|
|
|
{ label: '工作建议类' }, |
|
|
|
|
{ label: '涉众金融平台类' }, |
|
|
|
|
{ label: '无效类' }, |
|
|
|
|
{ label: '终止类' }, |
|
|
|
|
{ label: '感谢信类' }, |
|
|
|
|
]) ; |
|
|
|
|
|
|
|
|
|
const subHeaders = ref([ |
|
|
|
|
{ label: '数量' }, |
|
|
|
|
{ label: '占比' }, |
|
|
|
|
]); |
|
|
|
|
|
|
|
|
|
const mailStore = useMailStore(); |
|
|
|
|
mailStore.getMailCategorys(); |
|
|
|
|
const { dictData } = useDictData(["mail_source", "mail_level", "mail_state"]); |
|
|
|
|
|
|
|
|
|
const query = ref({ |
|
|
|
|
size: 10, |
|
|
|
|
@ -146,7 +130,7 @@ const totalSize = reactive({
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const statistics = ref([]); |
|
|
|
|
|
|
|
|
|
const columns = ref([]); |
|
|
|
|
const handleMailTimeQuery = (val: any) => { |
|
|
|
|
if (val) { |
|
|
|
|
query.value.searchStartTime = val[0]; |
|
|
|
|
@ -162,11 +146,15 @@ const handleMailTimeQuery = (val: any) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getList() { |
|
|
|
|
getCategoryHeaderlist(query.value).then((data) => { |
|
|
|
|
columns.value = data; |
|
|
|
|
}); |
|
|
|
|
getCategorylist(query.value).then((data) => { |
|
|
|
|
statistics.value = data.records; |
|
|
|
|
totalSize.total = data.total; |
|
|
|
|
totalSize.pages = data.pages; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function reset() { |
|
|
|
|
|