From 63e1d0781554c52e90299d4493a016d0468b27e7 Mon Sep 17 00:00:00 2001 From: pengwei Date: Tue, 13 May 2025 17:36:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:1=E3=80=81=E4=BF=A1=E8=AE=BF=E6=8A=95?= =?UTF-8?q?=E8=AF=89=E5=A4=A7=E5=B1=8F=E4=B8=AD=E5=A4=AE=E6=95=B0=E5=AD=97?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=B8=A6=E6=97=B6=E9=97=B42=E3=80=81?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9D=E8=AE=BF=E9=87=8D=E8=AE=BF&?= =?UTF-8?q?=E7=BE=A4=E4=BC=97=E9=9B=86=E8=AE=BF=E6=95=B0=E6=8D=AE=E4=B8=8D?= =?UTF-8?q?=E5=87=86=E7=A1=AE&=E6=B7=BB=E5=8A=A0=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=EF=BC=88=E5=9B=BD=E5=AE=B6=E4=BF=A1=E8=AE=BF?= =?UTF-8?q?=E3=80=81=E5=85=AC=E5=AE=89=E9=83=A8=E4=BF=A1=E8=AE=BF=EF=BC=89?= =?UTF-8?q?3=E3=80=81=E4=BF=A1=E8=AE=BF=E6=8A=95=E8=AF=89=E5=8D=A0?= =?UTF-8?q?=E6=AF=94=E9=A5=BC=E5=9B=BE4=E3=80=81=E8=BF=BD=E8=B4=A3?= =?UTF-8?q?=E9=97=AE=E8=B4=A3=E6=83=85=E5=86=B5=E5=8D=A0=E6=AF=94=E9=A5=BC?= =?UTF-8?q?=E5=9B=BE=E6=95=B0=E6=8D=AE=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/screen/mail.ts | 9 +++++ src/utils/util.ts | 22 ++++++++---- src/views/data/Gabxf.vue | 22 +++++++++--- src/views/data/Gjxf.vue | 20 +++++++++-- src/views/data/Mail12337.vue | 17 +++++++--- src/views/data/Mailbox.vue | 16 +++++++-- src/views/datav/MailVisits.vue | 61 ++++++++++++++++++---------------- src/views/work/Query.vue | 23 ++++++++++--- 8 files changed, 138 insertions(+), 52 deletions(-) diff --git a/src/api/screen/mail.ts b/src/api/screen/mail.ts index 8905683..0671e68 100644 --- a/src/api/screen/mail.ts +++ b/src/api/screen/mail.ts @@ -33,3 +33,12 @@ export function getEntanglementAndMassMail(times) { url: `/datav/mailVisits/getEntanglementAndMassMail?beginTime=${times[0]}&endTime=${times[1]}` }); } + + +//追责问责情况 +export function getResultCount(times){ + return request.get({ + url:`/datav/mailVisits/getResultCount?beginTime=${times[0]}&endTime=${times[1]}` + }) + +} diff --git a/src/utils/util.ts b/src/utils/util.ts index 38652c0..da26337 100644 --- a/src/utils/util.ts +++ b/src/utils/util.ts @@ -124,14 +124,24 @@ export const timeFormat = (dateTime: number, fmt = 'yyyy-mm-dd') => { return fmt } +/** + * 时间搜索框设置为今年 + * */ +export const getYearTime = ()=>{ + const end = timeFormat(new Date(),'yyyy-mm-dd hh:MM:ss'); + const currentYear = new Date().getFullYear(); + const start = new Date(currentYear, 0, 1); + return [timeFormat(start,'yyyy-mm-dd hh:MM:ss'),end] +} + export const timeDiffSeconds = (dateStr1: string, dateStr2: string, fmt: string) => { return moment(dateStr1, fmt).diff(moment(dateStr2, fmt), 'seconds') } /** - * - * @param seconds - * @returns + * + * @param seconds + * @returns */ export const formatTimeText = (seconds: number) => { if (!seconds || seconds <= 0) { @@ -281,8 +291,8 @@ export function validatorIdCard(rule: object, code: string, callback: any) { /** * 校验手机号 - * @param {*} phonenumber - * @returns + * @param {*} phonenumber + * @returns */ export function validatorPhone(rule: object, phonenumber: string, callback: any) { if (!phonenumber) { @@ -385,4 +395,4 @@ export function getGenderFromIdCode(idCode) { export function disabledDate(time) { return time.getTime() < moment("1949-10-01", "YYYY-MM-DD").valueOf(); -} \ No newline at end of file +} diff --git a/src/views/data/Gabxf.vue b/src/views/data/Gabxf.vue index d59bc66..58663e8 100644 --- a/src/views/data/Gabxf.vue +++ b/src/views/data/Gabxf.vue @@ -3,7 +3,7 @@
- + \ No newline at end of file + diff --git a/src/views/data/Gjxf.vue b/src/views/data/Gjxf.vue index 8773dd6..918aeb7 100644 --- a/src/views/data/Gjxf.vue +++ b/src/views/data/Gjxf.vue @@ -358,12 +358,12 @@ import { } from "@/api/data/petitionComplaint"; import { ProblemSources, DistributionState } from "@/enums/dictEnums"; import feedback from "@/utils/feedback"; -import { getDictLable } from "@/utils/util"; +import { getDictLable ,getYearTime} from "@/utils/util"; import useCatchStore from "@/stores/modules/catch"; const catchStore = useCatchStore(); const dict = catchStore.getDicts(["distributionState", "initialPetition"]); - +const route = useRoute() const query = ref({ size: 10, current: 1, @@ -371,15 +371,29 @@ const query = ref({ problemSourcesCode: ProblemSources.GJXFPT, }); + + const list = ref([]); const total = ref(0); function getList() { + listPetitionComplaint(query.value).then((data) => { list.value = data.records; total.value = data.total; }); } + +//检测跳转来源界面是否为大屏 +watch(()=>route.query.toString(), + ()=>{ + if(route.query.open){ + query.value.createTime=getYearTime() + } + getList() + },{immediate:true,deep:true}) + + function reset() { query.value = { size: 10, @@ -431,4 +445,4 @@ function handleDetail(row) { } \ No newline at end of file + diff --git a/src/views/data/Mail12337.vue b/src/views/data/Mail12337.vue index e994fca..ebc9e55 100644 --- a/src/views/data/Mail12337.vue +++ b/src/views/data/Mail12337.vue @@ -33,7 +33,7 @@ @@ -613,7 +613,7 @@ import { getIdByOriginId } from "@/api/work/negative"; import { ProblemSources, DistributionState } from "@/enums/dictEnums"; import feedback from "@/utils/feedback"; -import { getDictLable } from "@/utils/util"; +import { getDictLable ,getYearTime} from "@/utils/util"; import useCatchStore from "@/stores/modules/catch"; import { @@ -632,7 +632,7 @@ const dict = catchStore.getDicts([ "businessType", ]); -const router = useRouter(); +const route = useRoute(); const query = ref({ size: 10, @@ -642,9 +642,18 @@ const query = ref({ const list = ref([]); const total = ref(0); +//检测跳转来源界面是否为大屏 +watch(()=>route.query.toString(), + ()=>{ + if(route.query.open){ + query.value.createTime=getYearTime() + } + getList() + },{immediate:true,deep:true}) function getList() { listPetitionComplaint12337(query.value).then((data) => { + list.value = data.records; total.value = data.total; }); @@ -787,4 +796,4 @@ function handleDetail(row) { activeRow.value = row; detailShow.value = true; } - \ No newline at end of file + diff --git a/src/views/data/Mailbox.vue b/src/views/data/Mailbox.vue index 1804bdc..94882d0 100644 --- a/src/views/data/Mailbox.vue +++ b/src/views/data/Mailbox.vue @@ -151,9 +151,9 @@ import { listMailbox } from "@/api/data/mailbox"; import feedback from "@/utils/feedback"; -import { getDictLable } from "@/utils/util"; +import { getDictLable, getYearTime} from "@/utils/util"; import useCatchStore from "@/stores/modules/catch"; - +const route = useRoute() const catchStore = useCatchStore(); const dict = catchStore.getDicts(["distributionState"]); @@ -165,6 +165,16 @@ const query = ref({ const list = ref([]); const total = ref(0); + +//检测跳转来源界面是否为大屏 +// watch(()=>route.query.toString(), +// ()=>{ +// if(route.query.open){ +// query.value.createTime=getYearTime() +// } +// getList() +// },{immediate:true,deep:true}) + function getList() { listMailbox(query.value).then((data) => { list.value = data.records; @@ -193,4 +203,4 @@ function handleAction(row) { \ No newline at end of file + diff --git a/src/views/datav/MailVisits.vue b/src/views/datav/MailVisits.vue index bbf95aa..f3073fc 100644 --- a/src/views/datav/MailVisits.vue +++ b/src/views/datav/MailVisits.vue @@ -77,7 +77,7 @@ - + - + @@ -277,7 +277,7 @@ - + @@ -336,7 +336,8 @@ import { getEntanglementAndMassMail, getFirstAndRepeatMail, getMailMapIcon, - getMailTrend + getMailTrend, + getResultCount } from "@/api/screen/mail.ts"; import {mapOrgNameMapping} from "@/enums/orgMapping.js"; @@ -788,7 +789,7 @@ const countryTrend = ref({ }, ], }); -const option2 = { +const option2 = ref({ series: [ { type: "pie", @@ -796,23 +797,15 @@ const option2 = { label: { color: "#fff", }, - data: [ - {value: 1282, name: "不作为"}, - {value: 426, name: "求助咨询"}, - {value: 284, name: "乱作为"}, - {value: 131, name: "其他"}, - {value: 95, name: "违法违纪违规"}, - {value: 72, name: "慢作为"}, - {value: 24, name: "意见建议"}, - {value: 5, name: "纪律作风"}, - ], + data: [], }, ], tooltip: { trigger: "item", }, -}; -const option3 = { +}); + +const option3 =ref( { tooltip: { trigger: "item", }, @@ -824,19 +817,27 @@ const option3 = { color: "#fff", }, data: [ - {value: 10, name: "通报批评"}, - {value: 2, name: "责令检查"}, - {value: 1, name: "诫勉谈话"}, - {value: 1, name: "批评教育"}, + ], }, ], -}; +}); // endregion -// region 所有函数 +//获取追责问责情况 +const getResultCountData = async (timeValue = time.value)=>{ + const res = await getResultCount(timeValue); + let resultCountArray = [] + Object.keys(res).forEach(s=>{ + resultCountArray.push({name:s,value:res[s]}) + }) + option3.value.series[0].data=resultCountArray; +} +getResultCountData(); + +// region 所有函数 const getFirstAndRepeatMailData = async (timeValue = time.value) => { const res = await getFirstAndRepeatMail(timeValue) fxjsFirstAndRepeatOverview.value = res.fxjsFirstAndRepeatOverview; @@ -853,6 +854,10 @@ const getFirstAndRepeatMailData = async (timeValue = time.value) => { const getAllMailCountData = async (timeValue = time.value) => { const res = await getAllMailCount(timeValue) overview.value = res.overview; + option2.value.series[0].data= [{value:overview.value.manageMail,name:"局长信箱"}, + {value:overview.value.countryMail,name:"国家信访"}, + {value:overview.value.policeMail,name:"公安部信访"}, + {value:overview.value.numberMail,name:"12337信访"},] } diff --git a/src/views/work/Query.vue b/src/views/work/Query.vue index 22d0bbe..a0e8688 100644 --- a/src/views/work/Query.vue +++ b/src/views/work/Query.vue @@ -818,7 +818,7 @@ import { updateNegative, transferTodo, } from "@/api/work/negative"; -import { getDictLable, formatTimeText, getInvolveProblem } from "@/utils/util"; +import { getDictLable, formatTimeText, getInvolveProblem ,getYearTime} from "@/utils/util"; import feedback from "@/utils/feedback"; import { ProcessingStatus } from "@/enums/flowEnums"; @@ -851,7 +851,7 @@ const list = ref([]); const total = ref(0); const loading = ref(true); -function getList() { +function getList() { loading.value = true; listNegative(query.value).then((data) => { list.value = data.records; @@ -894,7 +894,7 @@ watch( } ); -function updateQuery() { +async function updateQuery() { if (route.query.processingStatus) { query.value.processingStatus = [route.query.processingStatus]; } @@ -904,6 +904,21 @@ function updateQuery() { moment().endOf("day").format("YYYY-MM-DD HH:mm:ss"), ]; } + //大屏(12337)跳转 + if(route.query.open && route.query.open === '12337'){ + query.value.crtTime =getYearTime() + query.value.problemSourcesCode = ['24'] + await nextTick() + } + //大屏(局长信箱)跳转 + if(route.query.open && route.query.open === 'Mailbox'){ + query.value.crtTime =getYearTime() + query.value.problemSourcesCode = ['23'] + await nextTick() + } + + + if (route.query.extensionFlag === "true") { query.value.extensionFlag = true; query.value.processingStatus = ['signing', 'processing', 'approval']; @@ -993,4 +1008,4 @@ const remainingTimeFlag = ref(true); } } } - \ No newline at end of file +