@@ -103,7 +114,8 @@ import { ref, reactive, watchEffect } from "vue";
import { getCategoryHeaderlist ,getCategorylist} from '@/api/data'
import { useDictOptions } from '@/hooks/useDictOptions'
import { deptEasyLists,listSecond } from '@/api/org/department'
-
+import { getToken } from '@/utils/auth'
+import axios from 'axios'
const { optionsData } = useDictOptions<{
dept: any[]
seconddept:any[]
@@ -165,7 +177,31 @@ function reset() {
getList()
-
+const exportLedger = () => {
+ delete query.value.size
+ delete query.value.current
+
+ const data = query.value
+ console.log("exportLedger", data);
+ axios.post('/lan-api/api/data/exportcategory', data, {
+ headers: {
+ 'Content-Type': 'application/json',
+ 'Accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ "Admin": getToken()
+ },
+ responseType: 'blob'
+ }).then((res: any) => {
+ const url = window.URL.createObjectURL(new Blob([res.data]));
+ const link = document.createElement('a');
+ link.href = url;
+ link.setAttribute('download', '局长信箱即接即办信件三率统计.xlsx'); // 根据需求修改文件名
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ }).catch((err: any) => {
+ console.log(err);
+ });
+}
diff --git a/src/views/data/data.vue b/src/views/data/data.vue
index 17bb67b..2d55ad0 100644
--- a/src/views/data/data.vue
+++ b/src/views/data/data.vue
@@ -29,9 +29,21 @@
-
-
查询
-
重置
+
+
@@ -44,7 +56,7 @@
信件总量
-
+
@@ -55,7 +67,7 @@
办结率
-
+
@@ -66,7 +78,7 @@
解决率
-
+
@@ -77,7 +89,7 @@
满意率
-
+
@@ -87,7 +99,7 @@
总得分
-
+
@@ -112,7 +124,8 @@ import { ref, reactive, watchEffect } from "vue";
import { getlist } from '@/api/data'
import { useDictOptions } from '@/hooks/useDictOptions'
import { deptEasyLists,listSecond } from '@/api/org/department'
-
+import { getToken } from '@/utils/auth'
+import axios from 'axios'
const { optionsData } = useDictOptions<{
dept: any[]
seconddept:any[]
@@ -155,6 +168,31 @@ const handleMailTimeQuery = (val: any) => {
}
}
+const exportLedger = () => {
+ delete query.value.size
+ delete query.value.current
+
+ const data = query.value
+ console.log("exportLedger", data);
+ axios.post('/lan-api/api/data/exportdata', data, {
+ headers: {
+ 'Content-Type': 'application/json',
+ 'Accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ "Admin": getToken()
+ },
+ responseType: 'blob'
+ }).then((res: any) => {
+ const url = window.URL.createObjectURL(new Blob([res.data]));
+ const link = document.createElement('a');
+ link.href = url;
+ link.setAttribute('download', '局长信箱即接即办信件三率统计.xlsx'); // 根据需求修改文件名
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ }).catch((err: any) => {
+ console.log(err);
+ });
+}
diff --git a/src/views/data/source.vue b/src/views/data/source.vue
index 6c8c7e5..81c4178 100644
--- a/src/views/data/source.vue
+++ b/src/views/data/source.vue
@@ -29,9 +29,20 @@
-
-
查询
-
重置
+
@@ -88,7 +99,8 @@ import { ref, reactive, watchEffect } from "vue";
import { getsourcelist} from '@/api/data'
import { useDictOptions } from '@/hooks/useDictOptions'
import { deptEasyLists,listSecond } from '@/api/org/department'
-
+import { getToken } from '@/utils/auth'
+import axios from 'axios'
const { optionsData } = useDictOptions<{
dept: any[]
seconddept:any[]
@@ -100,34 +112,31 @@ 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 exportLedger = () => {
+ delete query.value.size
+ delete query.value.current
+
+ const data = query.value
+ console.log("exportLedger", data);
+ axios.post('/lan-api/api/data/exportsource', data, {
+ headers: {
+ 'Content-Type': 'application/json',
+ 'Accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
+ "Admin": getToken()
+ },
+ responseType: 'blob'
+ }).then((res: any) => {
+ const url = window.URL.createObjectURL(new Blob([res.data]));
+ const link = document.createElement('a');
+ link.href = url;
+ link.setAttribute('download', '局长信箱即接即办信件三率统计.xlsx'); // 根据需求修改文件名
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ }).catch((err: any) => {
+ console.log(err);
});
-
-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"]);