|
|
|
|
@ -219,12 +219,15 @@ import moment from "moment";
|
|
|
|
|
|
|
|
|
|
import {getSubOneStreetMap} from "@/api/screen/subScreen/subOneGlobal.ts"; |
|
|
|
|
import { |
|
|
|
|
getSubOneALlComfortCount, getSubOneCaseAriseSituationRate, |
|
|
|
|
getSubOnePoliceHurtSituationAndHurtType, |
|
|
|
|
getComfortSituation, |
|
|
|
|
getSubCaseType, |
|
|
|
|
getPunishmentSituation, |
|
|
|
|
getSubComfortMapIcon |
|
|
|
|
getSubOneALlComfortCount, |
|
|
|
|
getSubOneCaseAriseSituationRate, |
|
|
|
|
getSubComfortMapIcon, |
|
|
|
|
getSubRightsBarList, |
|
|
|
|
getSubHitState, |
|
|
|
|
getSubComfortState, |
|
|
|
|
getSubPoliceHurtSituationAndHurtType, |
|
|
|
|
getSubComfortMoneyBarList, |
|
|
|
|
getSubCaseType |
|
|
|
|
} from "@/api/screen/subScreen/subOneRightsConfort.ts"; |
|
|
|
|
import SubOneHeader from "@/components/datav/subOne/subOneHeader.vue"; |
|
|
|
|
import useUserStore from "@/stores/modules/user"; |
|
|
|
|
@ -355,145 +358,121 @@ const getMapJSON = async (departId) => {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 维权案件情况 |
|
|
|
|
const getRightsRankList = async (departId, timeValue) => { |
|
|
|
|
const res = await getSubOneALlComfortCount(departId, timeValue); |
|
|
|
|
const getSubRightsBarListFun = async () => { |
|
|
|
|
const body = { |
|
|
|
|
beginTime: time.value[0], |
|
|
|
|
endTime: time.value[1], |
|
|
|
|
departId: currentDepartId |
|
|
|
|
} |
|
|
|
|
const res = await getSubRightsBarList(body); |
|
|
|
|
fxsjRightsRank.value = res.fxsjRightsRankList; |
|
|
|
|
jsdwRightsRank.value = res.jsdwRightsRankList; |
|
|
|
|
} |
|
|
|
|
// 抚慰金额情况 |
|
|
|
|
const getSubComfortMoneyBarListFun = async ()=>{ |
|
|
|
|
const body = { |
|
|
|
|
beginTime: time.value[0], |
|
|
|
|
endTime: time.value[1], |
|
|
|
|
departId: currentDepartId |
|
|
|
|
} |
|
|
|
|
const res = await getSubComfortMoneyBarList(body); |
|
|
|
|
fxsjComfortMoneyRank.value = res.fxsjComfortMoneyRank; |
|
|
|
|
jsdwComfortMoneyRank.value = res.jsdwComfortMoneyRank; |
|
|
|
|
} |
|
|
|
|
const getSubCaseTypeFun = async ()=>{ |
|
|
|
|
const body = { |
|
|
|
|
beginTime: time.value[0], |
|
|
|
|
endTime: time.value[1], |
|
|
|
|
departId: currentDepartId |
|
|
|
|
} |
|
|
|
|
const res = await getSubCaseType(body); |
|
|
|
|
xsajCaseTypeOption.value.series[0].data =res.crownCaseBar; |
|
|
|
|
xzajCaseTypeOption.value.series[0].data =res.administrativeCase; |
|
|
|
|
} |
|
|
|
|
// 总览数据 |
|
|
|
|
const getSubOneALlComfortCountFun = async ()=>{ |
|
|
|
|
const body = { |
|
|
|
|
beginTime: time.value[0], |
|
|
|
|
endTime: time.value[1], |
|
|
|
|
departId: currentDepartId |
|
|
|
|
} |
|
|
|
|
const res = await getSubOneALlComfortCount(body); |
|
|
|
|
comfortOverview.value=res.comfortOverview; |
|
|
|
|
fxsjComfortMoneyRank.value =res.fxsjComfortMoneyRank; |
|
|
|
|
jsdwComfortMoneyRank.value =res.jsdwComfortMoneyRank; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
// 中央总览 |
|
|
|
|
// const getComfortOverview = async (timeValue) => { |
|
|
|
|
// const res = await getALlComfortCount(timeValue); |
|
|
|
|
// comfortOverview.value = res.comfortOverview; |
|
|
|
|
// } |
|
|
|
|
// 地图数据 |
|
|
|
|
// const getMapData = async (timeValue) => { |
|
|
|
|
// const res = await getComfortMapIcon(timeValue); |
|
|
|
|
// const mappedData = res.comfortMapVoList.map(item => { |
|
|
|
|
// let name; |
|
|
|
|
// switch (item.name) { |
|
|
|
|
// case '长沙县局': |
|
|
|
|
// name = '长沙县'; |
|
|
|
|
// break; |
|
|
|
|
// case '芙蓉分局': |
|
|
|
|
// name = '芙蓉区'; |
|
|
|
|
// break; |
|
|
|
|
// case '天心分局': |
|
|
|
|
// name = '天心区'; |
|
|
|
|
// break; |
|
|
|
|
// case '岳麓分局': |
|
|
|
|
// name = '岳麓区'; |
|
|
|
|
// break; |
|
|
|
|
// case '开福分局': |
|
|
|
|
// name = '开福区'; |
|
|
|
|
// break; |
|
|
|
|
// case '雨花分局': |
|
|
|
|
// name = '雨花区'; |
|
|
|
|
// break; |
|
|
|
|
// case '望城分局': |
|
|
|
|
// name = '望城区'; |
|
|
|
|
// break; |
|
|
|
|
// case '宁乡市局': |
|
|
|
|
// name = '宁乡市'; |
|
|
|
|
// break; |
|
|
|
|
// case '浏阳市局': |
|
|
|
|
// name = '浏阳市'; |
|
|
|
|
// break; |
|
|
|
|
// case '高新分局': |
|
|
|
|
// name = '高新区'; |
|
|
|
|
// break; |
|
|
|
|
// default: |
|
|
|
|
// name = item.name; |
|
|
|
|
// break; |
|
|
|
|
// } |
|
|
|
|
// return { |
|
|
|
|
// ...item, |
|
|
|
|
// originalName: item.name, // 添加原始名称 |
|
|
|
|
// name: name, |
|
|
|
|
// value: item.totalCase, |
|
|
|
|
// }; |
|
|
|
|
// }); |
|
|
|
|
// globalTempMapVoList.value = mappedData |
|
|
|
|
// console.log(globalTempMapVoList) |
|
|
|
|
// const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0); |
|
|
|
|
// const avg = total / mappedData.length; // 计算平均值 |
|
|
|
|
// const range30Percent = avg * 0.3 // 不用取整,小数也可以 |
|
|
|
|
// option.value.series[0].data = mappedData; |
|
|
|
|
// option.value.visualMap.pieces = [ |
|
|
|
|
// {gte: 0, lte: avg - range30Percent, label: "低于平均问题30%", color: "#4987F6"}, |
|
|
|
|
// {gte: avg - range30Percent, lte: avg + range30Percent + 0.1, label: `平均问题上下浮动30%内`, color: "#F6A149"}, |
|
|
|
|
// {gte: avg + range30Percent, label: "高于平均问题30%", color: "#D34343"}, |
|
|
|
|
// ]; |
|
|
|
|
// } |
|
|
|
|
//打处情况 |
|
|
|
|
// const getPunishmentSituationList = async (timeValue) => { |
|
|
|
|
// const res = await getPunishmentSituation(timeValue); |
|
|
|
|
// punishmentSituationOption.series[0].data = res.punishmentSituationList; |
|
|
|
|
// } |
|
|
|
|
// //抚慰情况 |
|
|
|
|
// const getComfortSituationList = async (timeValue) => { |
|
|
|
|
// const res = await getComfortSituation(timeValue); |
|
|
|
|
// comfortSituationOption.series[0].data = res.comfortSituationList; |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
// 民辅警受伤情况-受伤人数 |
|
|
|
|
const getPoliceHurtSituationList = async (departId, timeValue) => { |
|
|
|
|
const res = await getSubOnePoliceHurtSituationAndHurtType(departId, timeValue); |
|
|
|
|
hurtNumOption.value.series[0].data = res.policeHurtSituationList |
|
|
|
|
hurtTypeOption.value.series[0].data = res.policeHurtTypeList |
|
|
|
|
// 打处情况 |
|
|
|
|
const getSubHitStateFun = async ()=>{ |
|
|
|
|
const body = { |
|
|
|
|
beginTime: time.value[0], |
|
|
|
|
endTime: time.value[1], |
|
|
|
|
departId: currentDepartId |
|
|
|
|
} |
|
|
|
|
const res = await getSubHitState(body); |
|
|
|
|
punishmentSituationOption.value.series[0].data = res.PunishmentSituation |
|
|
|
|
} |
|
|
|
|
// 抚慰情况 |
|
|
|
|
const getSubComfortStateFun = async ()=>{ |
|
|
|
|
const body = { |
|
|
|
|
beginTime: time.value[0], |
|
|
|
|
endTime: time.value[1], |
|
|
|
|
departId: currentDepartId |
|
|
|
|
} |
|
|
|
|
const res = await getSubComfortState(body); |
|
|
|
|
comfortSituationOption.value.series[0].data = res.comfortSituationList |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const getCaseAriseSituationRateList = async (departId, timeValue) => { |
|
|
|
|
const res = await getSubOneCaseAriseSituationRate(departId, timeValue); |
|
|
|
|
//受伤情况 |
|
|
|
|
const getSubPoliceHurtSituationAndHurtTypeFun= async ()=>{ |
|
|
|
|
const body = { |
|
|
|
|
beginTime: time.value[0], |
|
|
|
|
endTime: time.value[1], |
|
|
|
|
departId: currentDepartId |
|
|
|
|
} |
|
|
|
|
const res = await getSubPoliceHurtSituationAndHurtType(body); |
|
|
|
|
hurtTypeOption.value.series[0].data = res.policeHurtSituationList |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const getSubOneCaseAriseSituationRateFun = async () => { |
|
|
|
|
const body = { |
|
|
|
|
beginTime: time.value[0], |
|
|
|
|
endTime: time.value[1], |
|
|
|
|
departId: currentDepartId |
|
|
|
|
} |
|
|
|
|
const res = await getSubOneCaseAriseSituationRate(body); |
|
|
|
|
ariseCaseLinkOption.value.series[0].data = res.incidentLinkList |
|
|
|
|
ariseCasePoliceOption.value.series[0].data = res.incidentPoliceTypeList |
|
|
|
|
ariseCaseORgOption.value.series[0].data = res.incidentOrgList |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取抚慰情况 |
|
|
|
|
const getComfortSituationFun =async (departId, timeValue)=>{ |
|
|
|
|
const res = await getComfortSituation(departId,timeValue); |
|
|
|
|
console.log("获取抚慰情况",res) |
|
|
|
|
comfortSituationOption.value.series[0].data = res.comfortSituationList; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
//获取案件类别占比 |
|
|
|
|
const getSubCaseTypeFun = async (departId,timeValue)=>{ |
|
|
|
|
const res = await getSubCaseType(departId,timeValue); |
|
|
|
|
console.log("获取案件类别占比",res) |
|
|
|
|
xsajCaseTypeOption.value.series[0].data=res.crownCaseBar |
|
|
|
|
xzajCaseTypeOption.value.series[0].data=res.administrativeCase |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//打处情况 |
|
|
|
|
const getPunishmentSituationFun = async (departId,timeValue) =>{ |
|
|
|
|
const res = await getPunishmentSituation(departId,timeValue); |
|
|
|
|
console.log("打处情况",res) |
|
|
|
|
punishmentSituationOption.value.series[0].data = res.PunishmentSituation |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取地图数据 |
|
|
|
|
const getMapData = async (departId, times) => { |
|
|
|
|
const res = await getSubComfortMapIcon(departId, times); |
|
|
|
|
console.log('getMapData',res) |
|
|
|
|
if(res && res.comfortMapVoList){ |
|
|
|
|
const mappedData = res.comfortMapVoList.map(item => { |
|
|
|
|
return { |
|
|
|
|
...item, |
|
|
|
|
value: item.totalPro, |
|
|
|
|
}; |
|
|
|
|
}); |
|
|
|
|
const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0); |
|
|
|
|
const avg = total / mappedData.length; // 计算平均值 |
|
|
|
|
const range30Percent = avg * 0.3 // 不用取整,小数也可以 |
|
|
|
|
// 添加模拟数据 |
|
|
|
|
if (res?.comfortMapVoList) { |
|
|
|
|
const mappedData = res.comfortMapVoList.map(item => ({ |
|
|
|
|
...item, |
|
|
|
|
value: Number(item.rightsNumber ?? 0), // ✅ 用 rightsNumber 控制颜色 |
|
|
|
|
})); |
|
|
|
|
|
|
|
|
|
if (!mappedData.length) { |
|
|
|
|
option.value.visualMap.pieces = []; |
|
|
|
|
option.value.series[0].data = []; |
|
|
|
|
globalTempMapVoList.value = []; |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const total = mappedData.reduce((sum, item) => sum + item.value, 0); |
|
|
|
|
const avg = total / mappedData.length; |
|
|
|
|
const range30Percent = avg * 0.3; |
|
|
|
|
|
|
|
|
|
option.value.visualMap.pieces = [ |
|
|
|
|
{gte: 0, lte: avg - range30Percent, label: "低于平均问题30%", color: "#4987F6"}, |
|
|
|
|
{gte: avg - range30Percent, lte: avg + range30Percent, label: "平均问题上下浮动30%内", color: "#F6A149"}, |
|
|
|
|
{gte: avg + range30Percent, label: "高于平均问题30%", color: "#D34343"}, |
|
|
|
|
{ gte: 0, lte: avg - range30Percent, label: "低于平均30%", color: "#4987F6" }, |
|
|
|
|
{ gte: avg - range30Percent, lte: avg + range30Percent, label: "平均±30%", color: "#F6A149" }, |
|
|
|
|
{ gte: avg + range30Percent, label: "高于平均30%", color: "#D34343" }, |
|
|
|
|
]; |
|
|
|
|
|
|
|
|
|
globalTempMapVoList.value = mappedData; |
|
|
|
|
option.value.series[0].data = mappedData; |
|
|
|
|
} |
|
|
|
|
@ -503,15 +482,30 @@ const getMapData = async (departId, times) => {
|
|
|
|
|
// endregion |
|
|
|
|
|
|
|
|
|
function getData() { |
|
|
|
|
getRightsRankList(currentDepartId, time.value); |
|
|
|
|
// getComfortOverview(time.value); |
|
|
|
|
// 维权案件情况 |
|
|
|
|
getSubRightsBarListFun(); |
|
|
|
|
// 抚慰金额情况 |
|
|
|
|
getSubComfortMoneyBarListFun(); |
|
|
|
|
// 案件类别占比 |
|
|
|
|
getSubCaseTypeFun(); |
|
|
|
|
// 中央总览 |
|
|
|
|
getSubOneALlComfortCountFun(); |
|
|
|
|
// 打处情况 |
|
|
|
|
getSubHitStateFun(); |
|
|
|
|
// 抚慰情况 |
|
|
|
|
getSubComfortStateFun(); |
|
|
|
|
// 民辅警受伤情况 |
|
|
|
|
getSubPoliceHurtSituationAndHurtTypeFun(); |
|
|
|
|
// 发案情况占比 |
|
|
|
|
getSubOneCaseAriseSituationRateFun(); |
|
|
|
|
// 地图卡片数据 |
|
|
|
|
getMapData(currentDepartId,time.value) |
|
|
|
|
// getPunishmentSituationList(time.value); |
|
|
|
|
getPunishmentSituationFun(currentDepartId,time.value); |
|
|
|
|
getComfortSituationFun(currentDepartId,time.value) |
|
|
|
|
getSubCaseTypeFun(currentDepartId,time.value); |
|
|
|
|
getPoliceHurtSituationList(currentDepartId, time.value); |
|
|
|
|
getCaseAriseSituationRateList(currentDepartId, time.value); |
|
|
|
|
// getPunishmentSituationFun(currentDepartId,time.value); |
|
|
|
|
// getComfortSituationFun(currentDepartId,time.value) |
|
|
|
|
// getSubCaseTypeFun(currentDepartId,time.value); |
|
|
|
|
// getPoliceHurtSituationList(currentDepartId, time.value); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
watch(time, () => { |
|
|
|
|
@ -543,6 +537,9 @@ echarts.registerMap("changsha", changshaMap);
|
|
|
|
|
const option = ref({ |
|
|
|
|
geo: { |
|
|
|
|
map: "changsha", |
|
|
|
|
itemStyle: { |
|
|
|
|
opacity: 0, |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
tooltip: { |
|
|
|
|
trigger: 'item', |
|
|
|
|
@ -552,7 +549,7 @@ const option = ref({
|
|
|
|
|
if (dataItem) { |
|
|
|
|
return ` |
|
|
|
|
<div class="tooltip"> |
|
|
|
|
<div class="tooltip-title">${dataItem.name}</div> |
|
|
|
|
<div class="tooltip-title">${params.name}</div> |
|
|
|
|
<div class="tooltip-content"> |
|
|
|
|
<ul class="tooltip-ul" > |
|
|
|
|
<li>维权案件总数 <span>${dataItem.rightsNumber || '-'}</span></li> |
|
|
|
|
@ -582,43 +579,32 @@ const option = ref({
|
|
|
|
|
visualMap: { |
|
|
|
|
type: "piecewise", |
|
|
|
|
bottom: 10, |
|
|
|
|
pieces: [], |
|
|
|
|
right: 10, |
|
|
|
|
realtime: false, |
|
|
|
|
pieces: [], // getMapData 里动态塞 |
|
|
|
|
orient: "horizontal", |
|
|
|
|
textStyle: { |
|
|
|
|
color: "#fff", |
|
|
|
|
}, |
|
|
|
|
calculable: true, |
|
|
|
|
inRange: { |
|
|
|
|
color: ["#4987F6", "#F6A149", "#D34343",], |
|
|
|
|
}, |
|
|
|
|
textStyle: { color: "#fff" }, |
|
|
|
|
}, |
|
|
|
|
series: [ |
|
|
|
|
{ |
|
|
|
|
name: "长沙", |
|
|
|
|
type: "map", |
|
|
|
|
map: "changsha", |
|
|
|
|
hoverAnimation: true, |
|
|
|
|
label: { |
|
|
|
|
show: true, |
|
|
|
|
color: "white", |
|
|
|
|
}, |
|
|
|
|
visualMapIndex: 0, |
|
|
|
|
roam: true, |
|
|
|
|
label: { show: true, color: "white" }, |
|
|
|
|
itemStyle: { |
|
|
|
|
normal: { |
|
|
|
|
areaColor: "#02215E", |
|
|
|
|
borderColor: "#24D2EE", |
|
|
|
|
borderWidth: 1 // 高亮时边框宽度 |
|
|
|
|
}, |
|
|
|
|
areaColor: "#02215E", |
|
|
|
|
borderColor: "#24D2EE", |
|
|
|
|
borderWidth: 1, |
|
|
|
|
opacity: 1, |
|
|
|
|
}, |
|
|
|
|
emphasis: { |
|
|
|
|
areaColor: "#FFD700", // 高亮时区域颜色 |
|
|
|
|
borderColor: "#FF0000", // 高亮时边框颜色 |
|
|
|
|
borderWidth: 4 // 高亮时边框宽度 |
|
|
|
|
areaColor: "#FFD700", |
|
|
|
|
borderColor: "#FF0000", |
|
|
|
|
borderWidth: 4 |
|
|
|
|
}, |
|
|
|
|
data: [] |
|
|
|
|
} |
|
|
|
|
], |
|
|
|
|
] |
|
|
|
|
}) |
|
|
|
|
const xsajCaseTypeOption = ref({ |
|
|
|
|
series: [ |
|
|
|
|
@ -628,12 +614,7 @@ const xsajCaseTypeOption = ref({
|
|
|
|
|
label: { |
|
|
|
|
color: "#fff", |
|
|
|
|
}, |
|
|
|
|
data: [ |
|
|
|
|
{value: 32, name: "故意伤害"}, |
|
|
|
|
{value: 42, name: "袭警罪"}, |
|
|
|
|
{value: 12, name: "寻衅滋事"}, |
|
|
|
|
{value: 28, name: "妨碍公务"} |
|
|
|
|
], |
|
|
|
|
data: [], |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
tooltip: { |
|
|
|
|
@ -649,10 +630,7 @@ const xzajCaseTypeOption = ref({
|
|
|
|
|
color: "#fff", |
|
|
|
|
}, |
|
|
|
|
data: [ |
|
|
|
|
{value: 2, name: "故意伤害"}, |
|
|
|
|
{value: 42, name: "袭警罪"}, |
|
|
|
|
{value: 2, name: "寻衅滋事"}, |
|
|
|
|
{value: 28, name: "妨碍公务"} |
|
|
|
|
|
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
@ -668,10 +646,7 @@ const punishmentSituationOption = ref({
|
|
|
|
|
label: { |
|
|
|
|
color: "#fff", |
|
|
|
|
}, |
|
|
|
|
data: [ |
|
|
|
|
// {value: 71, name: "刑事追究"}, |
|
|
|
|
// {value: 97, name: "行政处理"}, |
|
|
|
|
], |
|
|
|
|
data: [], |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
tooltip: { |
|
|
|
|
|