Browse Source

信件来源统计

master
laishajiang 2 years ago
parent
commit
51e844538e
  1. 4
      src/api/data.ts
  2. 55
      src/views/data/source.vue

4
src/api/data.ts

@ -14,3 +14,7 @@ export function getsourcelist(query: any) {
export function getCategoryHeaderlist(query: any) {
return request.get({ url: '/data/listForCategoryHeader',query })
}
export function getSourceHeaderlist(query: any) {
return request.get({ url: '/data/listForSourceHeader',query })
}

55
src/views/data/source.vue

@ -49,35 +49,24 @@
<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="12345市长热线" 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>
<el-table-column label="110举报投诉" 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
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>
</el-table-column>
</el-table>
</div>
@ -96,7 +85,7 @@
import { useDictData } from "@/hooks/useDictOptions";
import useMailStore from "@/stores/modules/mail";
import { ref, reactive, watchEffect } from "vue";
import { getsourcelist} from '@/api/data'
import { getsourcelist,getSourceHeaderlist} from '@/api/data'
import { useDictOptions } from '@/hooks/useDictOptions'
import { deptEasyLists,listSecond } from '@/api/org/department'
import { getToken } from '@/utils/auth'
@ -151,7 +140,7 @@ const totalSize = reactive({
})
const statistics = ref([]);
const columns = ref([]);
const handleMailTimeQuery = (val: any) => {
if (val) {
query.value.searchStartTime = val[0];
@ -167,11 +156,15 @@ const handleMailTimeQuery = (val: any) => {
function getList() {
getSourceHeaderlist(query.value).then((data) => {
columns.value = data;
});
getsourcelist(query.value).then((data) => {
statistics.value = data.records;
totalSize.total = data.total;
totalSize.pages = data.pages;
});
}
function reset() {

Loading…
Cancel
Save