Browse Source

fix--抚慰大屏重构step2

master
buaixuexideshitongxue 3 weeks ago
parent
commit
0c542b57af
  1. 65
      src/api/datav.ts
  2. 77
      src/api/screen/rightsComfort.ts
  3. 105
      src/views/datav/RightsComfort.vue

65
src/api/datav.ts

@ -1,24 +1,5 @@
import request from "./request"; import request from "./request";
export function getCaseVerifData(times) {
return request.get({
url: `/datav/caseVerif?beginTime=${times[0]}&endTime=${times[1]}`
});
}
export function getCaseVerifTrend(times, month) {
return request.get({
url: `/datav/caseVerif/trend?beginTime=${times[0]}&endTime=${times[1]}&month=${month}`
});
}
export function getMailVisitsData(times) {
return request.get({
url: `/datav/mailVisits?beginTime=${times[0]}&endTime=${times[1]}`
});
}
export function selectDistribution(times){ export function selectDistribution(times){
@ -27,54 +8,8 @@ export function selectDistribution(times){
url: `/datav/Jwpy?beginTime=${times[0]}&endTime=${times[1]}` url: `/datav/Jwpy?beginTime=${times[0]}&endTime=${times[1]}`
}); });
} }
export function getRightsComfortData(times) {
return request.get({
url: `/datav/rightsComfort?beginTime=${times[0]}&endTime=${times[1]}`
});
}
/**
*
* @param body
*/
export function getRightsBarList(body) {
return request.post({
url: `/datav/rightsComfort/getRightsBarList`,
body
});
}
/**
*
* @param body
*/
export function getComfortMoneyBarList(body) {
return request.post({
url: `/datav/rightsComfort/getComfortMoneyBarList`,
body
});
}
export function getRecentlyMailTrend(query) {
// alert(days + activeMailTrend.value)
return request.get({
url: `/datav/mailVisits/getRecentlyMailTrendMonth`,
query
});
}
export function getRecentlyMailTrend12337(query) {
// alert(days + activeMailTrend.value)
return request.get({
url: `/datav/mailVisits/getRecentlyMailTrendByMonth12337`,
query
});
}
export function getAuditOverview(time) { export function getAuditOverview(time) {
return request.get({ return request.get({

77
src/api/screen/rightsComfort.ts

@ -1,22 +1,12 @@
import request from "../request"; import request from "../request";
export function getRightsAndComfortRank(times) {
return request.get({
url: `/datav/rightsComfort/getRightsAndComfortRank?beginTime=${times[0]}&endTime=${times[1]}`
});
}
export function getCaseTypeRate(times) { export function getRightsComfortData(times) {
return request.get({ return request.get({
url: `/datav/rightsComfort/getCaseTypeRate?beginTime=${times[0]}&endTime=${times[1]}` url: `/datav/rightsComfort?beginTime=${times[0]}&endTime=${times[1]}`
}); });
} }
export function getALlComfortCount(times) {
return request.get({
url: `/datav/rightsComfort/getALlComfortCount?beginTime=${times[0]}&endTime=${times[1]}`
});
}
export function getComfortMapIcon(times) { export function getComfortMapIcon(times) {
return request.get({ return request.get({
@ -25,31 +15,61 @@ export function getComfortMapIcon(times) {
} }
/**
export function getPunishmentSituation(times) { *
return request.get({ * @param body
url: `/datav/rightsComfort/getPunishmentSituation?beginTime=${times[0]}&endTime=${times[1]}` */
export function getRightsBarList(body) {
return request.post({
url: `/datav/rightsComfort/getRightsBarList`,
body
}); });
} }
export function getComfortSituation(times) {
return request.get({
url: `/datav/rightsComfort/getComfortSituation?beginTime=${times[0]}&endTime=${times[1]}`
});
}
/**
*
* @param body
*/
export function getComfortMoneyBarList(body) {
return request.post({
url: `/datav/rightsComfort/getComfortMoneyBarList`,
body
});
}
/**
*
* @param time
*/
export function getCaseAriseSituationRate(body) {
return request.post({
url: `/datav/rightsComfort/getCaseAriseSituationRate`,
body
});
}
export function getPoliceHurtSituationAndHurtType(times) { /**
return request.get({ *
url: `/datav/rightsComfort/getPoliceHurtSituationAndHurtType?beginTime=${times[0]}&endTime=${times[1]}` * @param time
*/
export function getComfortSituation(body) {
return request.post({
url: `/datav/rightsComfort/getComfortSituation`,
body
}); });
} }
export function getCaseAriseSituationRate(times) {
return request.get({ /**
url: `/datav/rightsComfort/getCaseAriseSituationRate?beginTime=${times[0]}&endTime=${times[1]}` *
* @param time
*/
export function getPoliceHurtSituationAndHurtType(body) {
return request.post({
url: `/datav/rightsComfort/getPoliceHurtSituationAndHurtType`,
body
}); });
} }
@ -57,3 +77,6 @@ export function getCaseAriseSituationRate(times) {

105
src/views/datav/RightsComfort.vue

@ -150,7 +150,7 @@
<el-col :span="6"> <el-col :span="6">
<datav-card title="民辅警受伤情况" sub-title=""> <datav-card title="民辅警受伤情况" sub-title="">
<datav-tabs <datav-tabs
v-model="comfortInjuryActiveMailTab" v-model="comfortInjuryActiveMailTab"
type="bottom-button" type="bottom-button"
@ -218,12 +218,14 @@ import * as echarts from "echarts/core";
import moment from "moment"; import moment from "moment";
import { import {
getPoliceHurtSituationAndHurtType, getCaseAriseSituationRate, getComfortMapIcon getComfortMapIcon,
} from "@/api/screen/rightsComfort.ts"; getRightsBarList,
import { getComfortMoneyBarList,
getCaseAriseSituationRate,
getRightsComfortData, getRightsComfortData,
getRightsBarList, getComfortMoneyBarList getPoliceHurtSituationAndHurtType,
} from "@/api/datav"; getComfortSituation
} from "@/api/screen/rightsComfort.ts";
// //
@ -343,7 +345,7 @@ const punishmentSituationOption = ref({
}, },
}); });
// //
const comfortPoliceInjurySituation = ref( const comfortPoliceInjurySituation = ref(
{ {
series: [ series: [
@ -380,10 +382,10 @@ const comfortInjuryCategory = ref(
}, },
} }
); );
//////////////////////////////////////////////////////////////////////////////////////////////////
function getData() { function getData() {
//
getRightsBarListFun(); getRightsBarListFun();
//
getComfortMoneyBarListFun(); getComfortMoneyBarListFun();
getRightsComfortData(time.value).then(data => { getRightsComfortData(time.value).then(data => {
overview.value.rightsNumber = data.rightsNumber overview.value.rightsNumber = data.rightsNumber
@ -391,17 +393,19 @@ function getData() {
overview.value.hitPersonNumber = data.hitPersonNumber overview.value.hitPersonNumber = data.hitPersonNumber
overview.value.comfortPersonNumber = data.comfortPersonNumber overview.value.comfortPersonNumber = data.comfortPersonNumber
overview.value.comfortMoney = data.comfortMoney overview.value.comfortMoney = data.comfortMoney
// countyComfortMoneyBarList.value = data.countyComfortMoneyBarList;
// bureauComfortMoneyBarList.value = data.bureauComfortMoneyBarList;
punishmentSituationOption.value.series[0].data = data.punishmentSituation punishmentSituationOption.value.series[0].data = data.punishmentSituation
comfortPoliceInjurySituation.value.series[0].data = data.comfortPoliceInjurySituation // comfortPoliceInjurySituation.value.series[0].data = data.comfortPoliceInjurySituation
comfortInjuryCategory.value.series[0].data = data.comfortInjuryCategory // comfortInjuryCategory.value.series[0].data = data.comfortInjuryCategory
// countyRightsBarList.value = data.countyRightsBarList;
// bureauRightsBarList.value=data.bureauRightsBarList;
xsajCaseTypeOption.value.series[0].data = data.crownCaseBarList; xsajCaseTypeOption.value.series[0].data = data.crownCaseBarList;
xzajCaseTypeOption.value.series[0].data = data.administrativeCaseList; xzajCaseTypeOption.value.series[0].data = data.administrativeCaseList;
}) })
getCaseAriseSituationRateList(time.value) //
getComfortSituationFun();
//
getPoliceHurtSituationAndHurtTypeFun();
//
getCaseAriseSituationRateFun();
//
getMapData(time.value) getMapData(time.value)
} }
@ -412,6 +416,11 @@ onMounted(() => {
getData(); getData();
}); });
// region
/**
* 维权抚慰一级 维权案件情况
* @param body
*/
const getRightsBarListFun = async() =>{ const getRightsBarListFun = async() =>{
const body = { const body = {
beginTime: time.value[0], beginTime: time.value[0],
@ -422,7 +431,10 @@ const getRightsBarListFun = async() =>{
bureauRightsBarList.value = res.bureauRightsBarList; bureauRightsBarList.value = res.bureauRightsBarList;
} }
/**
* 维权抚慰一级 抚慰金额情况
* @param body
*/
const getComfortMoneyBarListFun = async() =>{ const getComfortMoneyBarListFun = async() =>{
const body = { const body = {
beginTime: time.value[0], beginTime: time.value[0],
@ -433,6 +445,53 @@ const getComfortMoneyBarListFun = async() =>{
bureauComfortMoneyBarList.value = res.bureauComfortMoneyBarList; bureauComfortMoneyBarList.value = res.bureauComfortMoneyBarList;
} }
/**
* 维权抚慰一级 抚慰情况
* @param body
*/
const getComfortSituationFun = async ()=>{
const body = {
beginTime: time.value[0],
endTime: time.value[1]
}
const res = await getComfortSituation(body);
comfortPoliceInjurySituation.value.series[0].data = res.comfortPoliceInjurySituation
}
/**
* 维权抚慰一级 民辅警受伤情况
* @param body
*/
const getPoliceHurtSituationAndHurtTypeFun = async ()=>{
const body = {
beginTime: time.value[0],
endTime: time.value[1]
}
const res = await getPoliceHurtSituationAndHurtType(body);
comfortInjuryCategory.value.series[0].data = res.comfortInjuryCategory
}
/**
* 维权抚慰一级 发案情况占比
* @param body
*/
const getCaseAriseSituationRateFun = async ()=>{
const body = {
beginTime: time.value[0],
endTime: time.value[1]
}
const res = await getCaseAriseSituationRate(body);
ariseCaseLinkOption.value.series[0].data = res.incidentLinkList
ariseCasePoliceOption.value.series[0].data = res.incidentPoliceTypeList
ariseCaseORgOption.value.series[0].data = res.incidentOrgList
}
// endregion
let globalTempMapVoList = ref([]); let globalTempMapVoList = ref([]);
// //
@ -503,19 +562,7 @@ const getMapData = async (timeValue) => {
]; ];
} }
// -
const getPoliceHurtSituationList = async (timeValue) => {
const res = await getPoliceHurtSituationAndHurtType(timeValue);
hurtNumOption.value.series[0].data = res.policeHurtSituationList
hurtTypeOption.value.series[0].data = res.policeHurtTypeList
}
const getCaseAriseSituationRateList = async (timeValue) => {
const res = await getCaseAriseSituationRate(timeValue);
ariseCaseLinkOption.value.series[0].data = res.incidentLinkList
ariseCasePoliceOption.value.series[0].data = res.incidentPoliceTypeList
ariseCaseORgOption.value.series[0].data = res.incidentOrgList
}
const handleClick = (params) => { const handleClick = (params) => {
console.log('点击事件参数:', params); console.log('点击事件参数:', params);

Loading…
Cancel
Save