diff --git a/src/api/screen/rightsComfort.ts b/src/api/screen/rightsComfort.ts index d0074ad..bcc32a8 100644 --- a/src/api/screen/rightsComfort.ts +++ b/src/api/screen/rightsComfort.ts @@ -26,6 +26,13 @@ export function getALlComfortCount(times) { }); } +export function getComfortMapIcon(times) { + return request.get({ + url: `/datav/rightsComfort/getComfortMapIcon?beginTime=${times[0]}&endTime=${times[1]}` + }); +} + + export function getPunishmentSituation(times) { return request.get({ diff --git a/src/api/screen/sub1.ts b/src/api/screen/sub1.ts deleted file mode 100644 index c6fd5b1..0000000 --- a/src/api/screen/sub1.ts +++ /dev/null @@ -1,34 +0,0 @@ -import request from "../request"; - -export function getSubOneStreetMap(departPId) { - return request.get({ - url: `/datav/sub1/getSubOneStreetMap?departPId=${departPId}` - }); -} - - -export function getSubOneSupervisionRank(departPId, times) { - return request.get({ - url: `/datav/sub1/getSubOneSupervisionRank?departPId=${departPId}&beginTime=${times[0]}&endTime=${times[1]}` - }); -} - -export function getSubOneOverView(departPId, times) { - return request.get({ - url: `/datav/sub1/getSubOneOverView?departPId=${departPId}&beginTime=${times[0]}&endTime=${times[1]}` - }); -} - - -export function getSubOneTrend(departPId, year) { - return request.get({ - url: `/datav/sub1/getSubOneTrend?departPId=${departPId}&year=${year}` - }); -} - - -export function getSubOneCaseVerifyRank(departPId, times) { - return request.get({ - url: `/datav/sub1/getSubOneCaseVerifyRank?departPId=${departPId}&beginTime=${times[0]}&endTime=${times[1]}` - }); -} diff --git a/src/api/screen/subScreen/subOneGlobal.ts b/src/api/screen/subScreen/subOneGlobal.ts new file mode 100644 index 0000000..f7f8fc0 --- /dev/null +++ b/src/api/screen/subScreen/subOneGlobal.ts @@ -0,0 +1,47 @@ +import request from "@/api/request"; + + +export function getSubOneStreetMap(departId) { + return request.get({ + url: `/datav/sub1/getSubOneStreetMap?departId=${departId}` + }); +} + +export function getSubOneOrganizationRank(departId, times) { + return request.get({ + url: `/datav/sub1/getSubOneOrganizationRank?departId=${departId}&beginTime=${times[0]}&endTime=${times[1]}` + }); +} + +export function getSubOneBusinessRate(departId, times) { + return request.get({ + url: `/datav/sub1/getSubOneBusinessRate?departId=${departId}&beginTime=${times[0]}&endTime=${times[1]}` + }); +} + + +export function getSubOneAllCount(departId, times) { + return request.get({ + url: `/datav/sub1/getSubOneAllCount?departId=${departId}&beginTime=${times[0]}&endTime=${times[1]}` + }); +} + +export function getSubOneGlobalTrend(departId, year) { + return request.get({ + url: `/datav/sub1/getSubOneGlobalTrend?departId=${departId}&year=${year}` + }); +} + + +export function getSubOneStrongProblemRate(departId, times) { + return request.get({ + url: `/datav/sub1/getSubOneStrongProblemRate?departId=${departId}&beginTime=${times[0]}&endTime=${times[1]}` + }); +} + + +export function getSubOneProblemBusinessRate(departId, times) { + return request.get({ + url: `/datav/sub1/getSubOneProblemBusinessRate?departId=${departId}&beginTime=${times[0]}&endTime=${times[1]}` + }); +} diff --git a/src/api/screen/subScreen/subOneMailVisits.ts b/src/api/screen/subScreen/subOneMailVisits.ts index 9b07d72..2fc96ea 100644 --- a/src/api/screen/subScreen/subOneMailVisits.ts +++ b/src/api/screen/subScreen/subOneMailVisits.ts @@ -7,4 +7,25 @@ export function getSubOneFirstAndRepeatMail(departId, times) { return request.get({ url: `/datav/sub1/mailVisits/getSubOneFirstAndRepeatMail?departId=${departId}&beginTime=${times[0]}&endTime=${times[1]}` }); +} + + +export function getSubOneMailTrend(departId, year) { + return request.get({ + url: `/datav/sub1/mailVisits/getSubOneMailTrend?departId=${departId}&year=${year}` + }); +} + + +export function getSubOneAllMailCount(departId, times) { + return request.get({ + url: `/datav/sub1/mailVisits/getSubOneAllMailCount?departId=${departId}&beginTime=${times[0]}&endTime=${times[1]}` + }); +} + + +export function getSubOneEntanglementAndMassMail(departId, times) { + return request.get({ + url: `/datav/sub1/mailVisits/getSubOneEntanglementAndMassMail?departId=${departId}&beginTime=${times[0]}&endTime=${times[1]}` + }); } \ No newline at end of file diff --git a/src/api/screen/subScreen/subOneRightsConfort.ts b/src/api/screen/subScreen/subOneRightsConfort.ts index e69de29..34fc1d8 100644 --- a/src/api/screen/subScreen/subOneRightsConfort.ts +++ b/src/api/screen/subScreen/subOneRightsConfort.ts @@ -0,0 +1,27 @@ +import request from "@/api/request"; + + + + +export function getSubOneALlComfortCount(departId, times) { + return request.get({ + url: `/datav/sub1/rightsComfort/getSubOneALlComfortCount?departId=${departId}&beginTime=${times[0]}&endTime=${times[1]}` + }); +} + + +export function getSubOnePoliceHurtSituationAndHurtType(departId, times) { + return request.get({ + url: `/datav/sub1/rightsComfort/getSubOnePoliceHurtSituationAndHurtType?departId=${departId}&beginTime=${times[0]}&endTime=${times[1]}` + }); +} + + + +export function getSubOneCaseAriseSituationRate(departId, times) { + return request.get({ + url: `/datav/sub1/rightsComfort/getSubOneCaseAriseSituationRate?departId=${departId}&beginTime=${times[0]}&endTime=${times[1]}` + }); +} + + diff --git a/src/router/routes.ts b/src/router/routes.ts index fed9c01..fddb68a 100644 --- a/src/router/routes.ts +++ b/src/router/routes.ts @@ -74,8 +74,8 @@ export const routes = [ }, { - path: '/datav/sub1', - component: () => import('@/views/datav/Sub1.vue'), + path: '/datav/subOneGlobal', + component: () => import('@/views/datav/subonedatav/SubOneGlobal.vue'), }, { path: '/datav/subOneVideoInsp', @@ -93,6 +93,10 @@ export const routes = [ path: '/datav/subOneMailVisits', component: () => import('@/views/datav/subonedatav/SubOneMailVisits.vue'), }, + { + path: '/datav/subOneRightsComfort', + component: () => import('@/views/datav/subonedatav/SubOneRightsComfort.vue'), + }, { path: '/datav/test', component: () => import('@/api/mv/VideoComponent.vue'), diff --git a/src/views/datav/Gobal.vue b/src/views/datav/Gobal.vue index db51e86..a489ee6 100644 --- a/src/views/datav/Gobal.vue +++ b/src/views/datav/Gobal.vue @@ -415,8 +415,8 @@ const getAllGlobalCountData = async (timeValue = time.value) => { const res = await getAllGlobalCount(timeValue); overview.value = res.overview; } -const getGlobalRecentlyTrendByMonthData = async (timeValue = time.value) => { - const res = await getGlobalRecentlyTrendByMonth(timeValue); +const getGlobalRecentlyTrendByMonthData = async (year = selectedYear.value) => { + const res = await getGlobalRecentlyTrendByMonth(year); const globalRecentlyTrendList = res.globalRecentlyTrendList; const categories = globalRecentlyTrendList.map(item => item.name); const values = globalRecentlyTrendList.map(item => item.value); @@ -424,93 +424,83 @@ const getGlobalRecentlyTrendByMonthData = async (timeValue = time.value) => { proTrend.value.xAxis.data = categories; proTrend.value.series[0].data = values; } +const getStrongProblemRateData = async (timeValue = time.value) => { + const res = await getStrongProblemRate(timeValue); + tcwtlist.value = res.tcwtlist; +} -// const getStrongProblemRate +const getProblemBusinessRateData=async (timeValue=time.value)=>{ + const res =await getProblemBusinessRate(timeValue); + wtlxlist.value = res.wtlxlist; +} +const getGlobalMapData= async(timeValue=time.value)=>{ + const res =await getGlobalMap(timeValue); + const mappedData = res.globalTempMapVoList.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.totalPro, + }; + }); + const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0); + const avg = total / mappedData.length; // 计算平均值 + const range30Percent = avg * 0.3 // 不用取整,小数也可以 + globalTempMapVoList.value = mappedData; + option.value.series[0].data = globalTempMapVoList; + 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"}, + ]; +} // endregion // region 初始化数据 function getData() { - getOrganizationRank(time.value).then((res) => { - fxsjlist.value = res.fxsjlist; - jsdwlist.value = res.jsdwlist; - }); - getBusinessRate(time.value).then((res) => { - ywzblist.value = res.ywzblist; - }); - getAllGlobalCount(time.value).then((res) => { - overview.value = res.overview; - }); - getGlobalRecentlyTrendByMonth(new Date().getFullYear()).then((res) => { - const globalRecentlyTrendList = res.globalRecentlyTrendList; - const categories = globalRecentlyTrendList.map(item => item.name); - const values = globalRecentlyTrendList.map(item => item.value); - // 更新图表数据 - proTrend.value.xAxis.data = categories; - proTrend.value.series[0].data = values; - }); - getStrongProblemRate(time.value).then((res) => { - tcwtlist.value = res.tcwtlist; - }); - getProblemBusinessRate(time.value).then((res) => { - wtlxlist.value = res.wtlxlist; - }); - getGlobalMap(time.value).then(res => { - // 对返回的数据映射处理 - const mappedData = res.globalTempMapVoList.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.totalPro, - }; - }); - const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0); - const avg = total / mappedData.length; // 计算平均值 - const range30Percent = avg * 0.3 // 不用取整,小数也可以 - globalTempMapVoList.value = mappedData; - option.value.series[0].data = globalTempMapVoList; - 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"}, - ]; - }) + getOrganizationRankData(); + getBusinessRateData(); + getAllGlobalCountData(); + getGlobalRecentlyTrendByMonthData(); + getStrongProblemRateData(); + getProblemBusinessRateData(); + getGlobalMapData(); } onMounted(() => { @@ -537,7 +527,7 @@ watch(time, () => { const handleClick = (params) => { const departId = params.data.departId; const url = router.resolve({ - path: "/datav/sub1", + path: "/datav/subOneGlobal", query: {departId: departId}, }).href; window.open(url, "_blank"); diff --git a/src/views/datav/MailVisits.vue b/src/views/datav/MailVisits.vue index 3008603..c5eeb7a 100644 --- a/src/views/datav/MailVisits.vue +++ b/src/views/datav/MailVisits.vue @@ -608,7 +608,6 @@ const gobalTempMapVoList = [ const option = ref({ geo: { map: "changsha", - }, tooltip: { trigger: 'item', @@ -646,7 +645,6 @@ const option = ref({ }, }, visualMap: { - type: "piecewise", bottom: 10, pieces: [ @@ -687,10 +685,7 @@ const option = ref({ borderColor: "#FF0000", // 高亮时边框颜色 borderWidth: 4 // 高亮时边框宽度 }, - data: gobalTempMapVoList.map(item => ({ - name: item.name, - value: item.totalPro // 将 totalPro 值映射到 value 字段 - })) + data:[] } ], }) diff --git a/src/views/datav/RightsComfort.vue b/src/views/datav/RightsComfort.vue index 148dee5..0cf927a 100644 --- a/src/views/datav/RightsComfort.vue +++ b/src/views/datav/RightsComfort.vue @@ -5,35 +5,87 @@
- - -
-
- -
- -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + +
@@ -41,27 +93,27 @@
@@ -86,7 +139,7 @@ @@ -95,35 +148,60 @@ - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + @@ -136,131 +214,312 @@ import vCharts from "vue-echarts"; import changshaMap from "@/assets/data/changsha.json"; import * as echarts from "echarts/core"; -import {getRightsComfortData} from "@/api/datav"; -import moment from "moment"; - -const temp = ref({ - tempTotalCase: 0, - tempVictimPer: 0, - tempComfortPer: 0, - tempHitPro: 0, - tempComfortMon: 0, -}) - -setTimeout(() => { - temp.value={ - tempTotalCase: 171, - tempVictimPer: 121, - tempComfortPer: 114, - tempHitPro: 205, - tempComfortMon: 28.1, - } -}, 1000); +import moment from "moment"; +import { + getALlComfortCount, + getPunishmentSituation, + getComfortSituation, + getRightsAndComfortRank, getPoliceHurtSituationAndHurtType, getCaseAriseSituationRate, getComfortMapIcon +} from "@/api/screen/rightsComfort.ts"; -echarts.registerMap("changsha", changshaMap); +// region 所有变量 +const router = useRouter(); const time = ref([ moment().startOf("year").format("YYYY-MM-DD"), moment().format("YYYY-MM-DD"), ]); -const comfortPersonNumber = ref(114); -const hitPersonNumber = ref(28.1); -const comfortMoney = ref(0.0); -const punishmentSituationList = ref([]); -const comfortSituationList = ref([]); -let gobalTempMapVoList = [ +const fxsjRightsRank = ref([ { - "name": "岳麓分局", - "totalCase": 23, - "victimPer": "暂无", - "comfortPer": "19", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "岳麓分局", + value: 23 }, { - "name": "芙蓉分局", - "totalCase": 20, - "victimPer": "暂无", - "comfortPer": "12", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "芙蓉分局", + value: 20 }, { - "name": "天心分局", - "totalCase": 20, - "victimPer": "暂无", - "comfortPer": "23", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "天心分局", + value: 20 }, { - "name": "雨花分局", - "totalCase": 19, - "victimPer": "暂无", - "comfortPer": "16", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "雨花分局", + value: 19 }, { - "name": "浏阳市局", - "totalCase": 17, - "victimPer": "暂无", - "comfortPer": "30", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "浏阳市局", + value: 17 }, { - "name": "宁乡市局", - "totalCase": 11, - "victimPer": "暂无", - "comfortPer": "0", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "宁乡市局", + value: 11 }, { - "name": "开福分局", - "totalCase": 11, - "victimPer": "暂无", - "comfortPer": "4", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "开福分局", + value: 11 }, { - "name": "望城分局", - "totalCase": 9, - "victimPer": "暂无", - "comfortPer": "0", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "望城分局", + value: 9 }, { - "name": "长沙县局", - "totalCase": 9, - "victimPer": "暂无", - "comfortPer": "0", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "长沙县局", + value: 9 }, { - "name": "高新分局", - "totalCase": 4, - "victimPer": "暂无", - "comfortPer": "7", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "高新分局", + value: 4 }, -]; -function getData() { - getRightsComfortData(time.value).then((data) => { - console.log('Received data:', data); // 添加日志输出 - comfortPersonNumber.value = data.comfortPersonNumber; - hitPersonNumber.value = data.hitPersonNumber; - comfortMoney.value = data.comfortMoney; - punishmentSituationList.value = data.punishmentSituation; - comfortSituationList.value = data.comfortSituation; +]); // 分县市局维权案件情况 +const jsdwRightsRank = ref([ + { + label: "岳麓分局", + value: 27 + }, + { + label: "芙蓉分局", + value: 20 + }, + { + label: "天心分局", + value: 20 + }, + { + label: "雨花分局", + value: 19 + }, + { + label: "浏阳市局", + value: 17 + }, + { + label: "宁乡市局", + value: 11 + }, + { + label: "开福分局", + value: 11 + }, + { + label: "望城分局", + value: 9 + }, + { + label: "长沙县局", + value: 9 + }, + { + label: "高新分局", + value: 4 + }, + +]); // 局属单位维权案件情况 +const fxsjComfortMoneyRank = ref([ + { + label: "岳麓分局", + value: 53 + }, + { + label: "芙蓉分局", + value: 20 + }, + { + label: "天心分局", + value: 20 + }, + { + label: "雨花分局", + value: 19 + }, + { + label: "浏阳市局", + value: 17 + }, + { + label: "宁乡市局", + value: 11 + }, + { + label: "开福分局", + value: 11 + }, + { + label: "望城分局", + value: 9 + }, + { + label: "长沙县局", + value: 9 + }, + { + label: "高新分局", + value: 4 + }, + +]); // 分县市局抚慰金额情况 +const jsdwComfortMoneyRank = ref([ + { + label: "岳麓分局", + value: 33 + }, + { + label: "芙蓉分局", + value: 20 + }, + { + label: "天心分局", + value: 20 + }, + { + label: "雨花分局", + value: 19 + }, + { + label: "浏阳市局", + value: 17 + }, + { + label: "宁乡市局", + value: 11 + }, + { + label: "开福分局", + value: 11 + }, + { + label: "望城分局", + value: 9 + }, + { + label: "长沙县局", + value: 9 + }, + { + label: "高新分局", + value: 4 + }, + +]); // 局属单位抚慰金额情况 +const comfortOverview = ref({ + comfortCaseTotal: 0, + hurtTotal: 0, + comfortTotal: 0, + hitTotal: 0, + comfortMoney: 0, +}) // 数据总览 +let globalTempMapVoList = ref([]); +// endregion + + +// region 所有函数 +// 维权案件情况 +const getRightsRankList = async (timeValue) => { + const res = await getRightsAndComfortRank(timeValue); + fxsjRightsRank.value = res.fxsjRightsRankList; + jsdwRightsRank.value = res.jsdwRightsRankList; +} +// 中央总览 +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 (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 +} + + +// endregion + +function getData() { + getRightsRankList(time.value); + getComfortOverview(time.value); + getMapData(time.value) + getPunishmentSituationList(time.value); + getComfortSituationList(time.value); + getPoliceHurtSituationList(time.value); + getCaseAriseSituationRateList(time.value); } watch(time, () => { @@ -269,16 +528,27 @@ watch(time, () => { onMounted(() => { getData(); }); +const handleClick = (params) => { + const departId = params.data.departId; + const url = router.resolve({ + path: "/datav/subOneRightsComfort", + query: {departId: departId}, + }).href; + window.open(url, "_blank"); +} + + +// region 所有图表 +echarts.registerMap("changsha", changshaMap); const option = ref({ geo: { map: "changsha", - }, tooltip: { trigger: 'item', formatter: function (params) { console.log(params) - const dataItem = gobalTempMapVoList.find(item => item.name.includes(params.name.substring(0, 2))); + const dataItem = globalTempMapVoList.value.find(item => item.name.includes(params.name.substring(0, 2))); if (dataItem) { return `
@@ -298,27 +568,21 @@ const option = ref({
${dataItem.name}
    -
  • 维权案件数 0
  • -
  • 抚慰人数 0
  • +
  • 维权案件总数 -
  • +
  • 受侵害人数 -
  • +
  • 抚慰人数 -
  • +
  • 打击处理人数 -
  • +
  • 抚慰金额 -
`; } }, - // backgroundColor: "#031577", // - // borderColor: "#0A2F86", - // borderWidth: 0, // 设置边框宽度为1像素 - // borderRadius: 3, // 设置边框半径为3像素 - // shadowBlur: 0, // 设置阴影模糊程度为8像素 - // shadowOffsetX: 0, // 设置水平阴影位移量为0像素 - // shadowOffsetY: 0, // 设置垂直阴影位移量为6像素 }, visualMap: { type: "piecewise", bottom: 10, - pieces: [ - { min: 0, max: 500, label: "问题数低于500" }, { min: 501, max: 1000, label: "问题数介于500-1000" }, { min: 1001, label: "问题数高于1000" }, - ], + pieces: [], right: 10, realtime: false, orient: "horizontal", @@ -343,7 +607,8 @@ const option = ref({ itemStyle: { normal: { areaColor: "#02215E", - borderColor: "#1773c3", + borderColor: "#24D2EE", + borderWidth: 1 // 高亮时边框宽度 }, }, emphasis: { @@ -351,152 +616,31 @@ const option = ref({ borderColor: "#FF0000", // 高亮时边框颜色 borderWidth: 4 // 高亮时边框宽度 }, - data: gobalTempMapVoList.map(item => ({ - name: item.name, - value: item.totalPro // 将 totalPro 值映射到 value 字段 - })) + data: [] } ], }) - -const option1 = ref({ - xAxis: { - type: "category", - boundaryGap: false, - data: [ - "9/10", - "9/11", - "9/12", - "9/13", - "9/14", - "9/15", - "9/16", - "9/17", - "9/18", - "9/19", - "9/20", - "9/21", - "9/22", - "9/23", - ], - }, - yAxis: { - type: "value", - splitLine: { - show: true, - lineStyle: { - color: "#193775", - }, - }, - }, +const xsajCaseTypeOption = ref({ series: [ { - type: "line", - smooth: true, + type: "pie", + radius: ["40%", "70%"], label: { - show: false, - }, - lineStyle: { - color: "#28E6FF", - width: 4, - }, - areaStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { - offset: 0, - color: "rgba(40,230,255,0.47)", // 渐变起始颜色 - }, - { - offset: 1, - color: "rgba(40,230,255,0)", // 渐变结束颜色 - }, - ]), + color: "#fff", }, data: [ - 2000, 1160, 2310, 3000, 3100, 3100, 3100, 2000, 1160, 2310, - 3000, 3100, 3100, 3100, + {value: 32, name: "故意伤害"}, + {value: 42, name: "袭警罪"}, + {value: 12, name: "寻衅滋事"}, + {value: 28, name: "妨碍公务"} ], }, ], -}); - -const data1 = [ - { - label: "岳麓分局", - value: 23 - }, - { - label: "芙蓉分局", - value: 20 - }, - { - label: "天心分局", - value: 20 - }, - { - label: "雨花分局", - value: 19 - }, - { - label: "浏阳市局", - value: 17 - }, - { - label: "宁乡市局", - value: 11 - }, - { - label: "开福分局", - value: 11 - }, - - { - label: "望城分局", - value: 9 - }, - { - label: "长沙县局", - value: 9 - }, - { - label: "高新分局", - value: 4 - }, - -]; - -const data2 = [ - { - name: "开福分局", - value: 9700, - }, - { - name: "芙蓉分局", - value: 9021, - }, - { - name: "岳麓分局", - value: 8512, - }, - { - name: "雨花分局", - value: 8021, - }, - { - name: "望城分局", - value: 7111, - }, - { - name: "浏阳市局", - value: 6622, - }, - { - name: "长沙县局", - value: 6221, + tooltip: { + trigger: "item", }, -]; - -const option2 = { +}) +const xzajCaseTypeOption = ref({ series: [ { type: "pie", @@ -515,54 +659,70 @@ const option2 = { tooltip: { trigger: "item", }, +}); +const punishmentSituationOption = { + series: [ + { + type: "pie", + radius: ["40%", "70%"], + label: { + color: "#fff", + }, + data: [ + // {value: 71, name: "刑事追究"}, + // {value: 97, name: "行政处理"}, + ], + }, + ], + tooltip: { + trigger: "item", + }, }; - -const option3 = computed(() => { - return { - series: [ - { - type: "pie", - radius: ["40%", "70%"], - label: { - color: "#fff", - }, - data: punishmentSituationList.value, +const comfortSituationOption = { + series: [ + { + type: "pie", + radius: ["40%", "70%"], + label: { + color: "#fff", }, - ], - tooltip: { - trigger: "item", + data: [ + // {value: 71, name: "刑事追究"}, + // {value: 97, name: "行政处理"}, + ], }, - }; -}); - -const option4 = computed(() => { - return { - series: [ - { - type: "pie", - radius: ["40%", "70%"], - label: { - color: "#fff", - }, - // data: comfortSituationList.value, - data: [ - {value: 61, name: "民警"}, - {value: 51, name: "辅警"}, - {value: 2, name: "协警"}, - ] + ], + tooltip: { + trigger: "item", + }, +}; +const hurtNumOption = ref({ + series: [ + { + type: "pie", + radius: ["30%", "50%"], + label: { + color: "#fff", + }, + tooltip: { + trigger: "item", }, - ], - tooltip: { - trigger: "item", + data: [ + {value: 68, name: "民警"}, + {value: 50, name: "辅警"}, + {value: 3, name: "协警"}, + ], }, - }; + ], + tooltip: { + trigger: "item", + }, }); - -const option6 = { +const hurtTypeOption = ref({ series: [ { type: "pie", - radius: ["40%", "70%"], + radius: ["30%", "50%"], label: { color: "#fff", }, @@ -571,7 +731,7 @@ const option6 = { }, data: [ {value: 68, name: "民警"}, - {value: 50, name: "辅警"}, + {value: 250, name: "辅警"}, {value: 3, name: "协警"}, ], @@ -580,9 +740,8 @@ const option6 = { tooltip: { trigger: "item", }, -}; - -const option5 = { +}); +const ariseCaseLinkOption = ref({ series: [ { type: "pie", @@ -605,10 +764,8 @@ const option5 = { tooltip: { trigger: "item", }, -}; - - -const data10 = { +}); +const ariseCasePoliceOption = ref({ series: [ { type: "pie", @@ -617,16 +774,46 @@ const data10 = { color: "#fff", }, data: [ - {value: 71, name: "刑事追究"}, - {value: 97, name: "行政处理"}, + {value: 127, name: "110警情"}, + {value: 132, name: "执勤处室"}, + {value: 222, name: "组织调解"}, + {value: 332, name: "传唤抓捕"}, + {value: 2, name: "安保维稳"}, + {value: 276, name: "网络侵权"}, + {value: 492, name: "医闹纠纷"}, + {value: 199, name: "其它"}, ], }, ], tooltip: { trigger: "item", }, -}; - +}); +const ariseCaseORgOption = ref({ + series: [ + { + type: "pie", + radius: ["40%", "70%"], + label: { + color: "#fff", + }, + data: [ + {value: 17, name: "110警情"}, + {value: 322, name: "执勤处室"}, + {value: 234, name: "组织调解"}, + {value: 343, name: "传唤抓捕"}, + {value: 22, name: "安保维稳"}, + {value: 2, name: "网络侵权"}, + {value: 2, name: "医闹纠纷"}, + {value: 1, name: "其它"}, + ], + }, + ], + tooltip: { + trigger: "item", + }, +}); +// endregion const colors = [ { @@ -654,77 +841,72 @@ const colors = [ // 弹框整体 .tooltip { position: relative; - width: 169.88px; - height: 170px; + width: 160px; + height: 194px; background: linear-gradient(180deg, rgba(1, 4, 87, 0.8) 0%, rgba(3, 21, 119, 0.8) 100%); border: 1px solid #4E8FFF; margin: -10px -10px -10px -10px; } - //浏阳市局 + ////浏阳市局 .tooltip-title { - width: 169.88px; + width: 160px; height: 43px; - background: linear-gradient(180deg, rgba(1, 4, 87, 0.8) 0%, rgba(3, 21, 119, 0.8) 100%); + background: linear-gradient(180deg, #0A2F86 0%, #04154E 100%); + box-shadow: inset 0px -1px 0px 0px #253755; display: flex; justify-content: center; /* 水平居中 */ align-items: center; /* 垂直居中 */ - text-align: center; /* 水平居中 */ font-weight: 400; font-size: 16px; color: #FFFFFF; - line-height: 22px; border-bottom: 1px solid #253755; /* 设置下边框 */ } - .tooltip-content { - width: 170px; - height: 132px; - //font-size: 11px; - margin-top: -12px; - background: linear-gradient(180deg, #010457 0%, #031577 100%); + width: 160px; + height: 150px; + background: linear-gradient(180deg, #010457 0%, #031577 100%) } .tooltip-content ul { list-style-type: none; /* 移除默认的小圆点 */ - padding: 0; - + padding-left: 5px; + margin: 0; } .tooltip-content ul li { - margin-left: 5px; - height: 25px; + height: 24px; color: #597AE9; - font-size: 13px; + font-weight: 400; + font-size: 14px; } - // 数字的span + //// 数字的span .tooltip-ul span { float: right; - width: 50px; - text-align: right; - margin-right: 35px; + width: 55px; color: #fff; - font-size: 13px; - } - + font-size: 14px; + text-align: center; /* 水平居中 */ - /* 小尖角 */ - .tooltip::before { - content: ''; - position: absolute; - top: 90px; /* 调整尖角的垂直位置 */ - left: -10px; /* 调整尖角的水平位置 */ - width: 0; - height: 0; - //border-top: 10px solid red; /* 顶边颜色 */ - //border-bottom: 10px solid green; /* 底边颜色 */ - //border-right: 10px solid blue; /* 右边颜色,与背景颜色相同 */ } + ///* 小尖角 */ + //.tooltip::before { + // content: ''; + // position: absolute; + // top: 90px; /* 调整尖角的垂直位置 */ + // left: -10px; /* 调整尖角的水平位置 */ + // width: 0; + // height: 0; + // //border-top: 10px solid red; /* 顶边颜色 */ + // //border-bottom: 10px solid green; /* 底边颜色 */ + // //border-right: 10px solid blue; /* 右边颜色,与背景颜色相同 */ + //} + } .test { diff --git a/src/views/datav/Sub1.vue b/src/views/datav/Sub1.vue deleted file mode 100644 index 1a68395..0000000 --- a/src/views/datav/Sub1.vue +++ /dev/null @@ -1,984 +0,0 @@ - - - - - \ No newline at end of file diff --git a/src/views/datav/subonedatav/SubOneCaseVerif.vue b/src/views/datav/subonedatav/SubOneCaseVerif.vue index 46bed5a..a038d82 100644 --- a/src/views/datav/subonedatav/SubOneCaseVerif.vue +++ b/src/views/datav/subonedatav/SubOneCaseVerif.vue @@ -174,8 +174,7 @@ import vCharts from "vue-echarts"; import changshaMap from "@/assets/data/changsha.json"; import * as echarts from "echarts/core"; import moment from "moment"; -import {getCaseVerificationMap } from "@/api/screen/CaseVerif.ts"; -import {getSubOneStreetMap} from "@/api/screen/sub1.ts"; +import {getSubOneStreetMap} from "@/api/screen/subScreen/subOneGlobal.ts"; import { getSubOneAllCaseVerificationCount, getSubOneCaseProblemProperty, getSubOneCaseSourceRateAndDealSituation, diff --git a/src/views/datav/subonedatav/SubOneGlobal.vue b/src/views/datav/subonedatav/SubOneGlobal.vue new file mode 100644 index 0000000..f63cb41 --- /dev/null +++ b/src/views/datav/subonedatav/SubOneGlobal.vue @@ -0,0 +1,602 @@ + + + + + + + + diff --git a/src/views/datav/subonedatav/SubOneMailVisits.vue b/src/views/datav/subonedatav/SubOneMailVisits.vue index 4a13217..848d6cb 100644 --- a/src/views/datav/subonedatav/SubOneMailVisits.vue +++ b/src/views/datav/subonedatav/SubOneMailVisits.vue @@ -10,7 +10,7 @@
- {{ firstAndRepeatOverview.firstMail }} + {{ currentOverview.firstMail }}
初信初访 @@ -20,7 +20,7 @@
- {{ firstAndRepeatOverview.repeatMail }} + {{ currentOverview.repeatMail }}
重复信访 @@ -30,7 +30,7 @@
- {{ firstAndRepeatOverview.leaderMail }} + {{ currentOverview.leaderMail }}
领导接访数 @@ -216,7 +216,7 @@
- {{ mailEntanglementMassOverview.leaderReview }} + {{ currentRightOverview.leaderReview }}
领导督办 @@ -226,7 +226,7 @@
- {{ mailEntanglementMassOverview.entanglement }} + {{ currentRightOverview.entanglement }}
缠访闹访 @@ -236,7 +236,7 @@
- {{ mailEntanglementMassOverview.mass }} + {{ currentRightOverview.mass }}
群体集访 @@ -245,7 +245,7 @@ - + { +const getMapJSON = async (departId = currentDepartId) => { const res = await getSubOneStreetMap(departId); currentMapData.value = res; echarts.registerMap("changsha", res); chart.value.chart.setOption(option.value); } -const getFirstAndRepeatMailRank = async (timeValue = time.value) => { - const res = await getSubOneFirstAndRepeatMail(timeValue) - firstAndRepeatOverview.value = res.firstAndRepeatOverview; +const getSubOneFirstAndRepeatMailRankData = async (depart = currentDepartId, timeValue = time.value) => { + const res = await getSubOneFirstAndRepeatMail(depart, timeValue) + fxjsFirstAndRepeatOverview.value = res.fxjsFirstAndRepeatOverview; + bwzdFirstAndRepeatOverview.value = res.bwzdFirstAndRepeatOverview fxsjFirstMailList.value = res.fxsjFirstRankList; fxsjRepeatMailList.value = res.fxsjRepeatRankList; fxsjLeaderViewMailList.value = res.fxsjLeaderViewRankList; @@ -427,12 +438,12 @@ const getFirstAndRepeatMailRank = async (timeValue = time.value) => { bwzdLeaderViewMailList.value = res.bwzdLeaderViewRankList; } -const getOverview = async (timeValue = time.value) => { - const res = await getAllMailCount(timeValue) +const getOverviewData = async (depart = currentDepartId, timeValue = time.value) => { + const res = await getSubOneAllMailCount(depart, timeValue) overview.value = res.overview; } -const getTrend = async (year = selectedYear.value) => { - const res = await getMailTrend(year); +const getTrendData = async (departId = currentDepartId, year = selectedYear.value) => { + const res = await getSubOneMailTrend(departId, year); const policeList = res.policeList; const manageList = res.manageList; const numberList = res.numberList; @@ -455,9 +466,10 @@ const getTrend = async (year = selectedYear.value) => { countryTrend.value.xAxis.data = countrycategories; countryTrend.value.series[0].data = countryvalues; } -const getEntangleMassRank = async (timeValue = time.value) => { - const res = await getEntanglementAndMassMail(timeValue) - mailEntanglementMassOverview.value = res.mailEntanglementMassOverview; +const getSubOneEntangleMassRankData = async (depart = currentDepartId, timeValue = time.value) => { + const res = await getSubOneEntanglementAndMassMail(depart, timeValue) + fxsjMailEntanglementMassOverview.value = res.fxsjMailEntanglementMassOverview; + bwzdMailEntanglementMassOverview.value = res.bwzdMailEntanglementMassOverview; fxsjEntanglementMailList.value = res.fxsjEntanglementList; fxsjMassMailList.value = res.fxsjMassList; fxsjLeaderReviewMailList.value = res.fxsjLeaderReviewList; @@ -518,21 +530,33 @@ const getMailMapIconList = async (timeValue = time.value) => { console.log(mailMapIconList) const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0); const avg = total / mappedData.length; // 计算平均值 - const range30Percent = avg*0.3 // 不用取整,小数也可以 + 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, lte: avg + range30Percent + 0.1, label: `平均问题上下浮动30%内`, color: "#F6A149"}, {gte: avg + range30Percent, label: "高于平均问题30%", color: "#D34343"}, ]; } const getData = () => { - getFirstAndRepeatMailRank(); - getOverview(); - getMailMapIconList() - getTrend(); - getEntangleMassRank(); + getMapJSON(); + getSubOneFirstAndRepeatMailRankData(); + getOverviewData(); + getTrendData(); + getSubOneEntangleMassRankData(); + // getOverview(); + // getMailMapIconList() + // getTrend(); + // getEntangleMassRank(); } + +const currentOverview = computed(() => { + return activeTab.value === '1' ? fxjsFirstAndRepeatOverview.value : bwzdFirstAndRepeatOverview.value; +}); + +const currentRightOverview = computed(() => { + return activeTabRight.value === '1' ? fxsjMailEntanglementMassOverview.value : bwzdMailEntanglementMassOverview.value; +}); // endregion @@ -595,6 +619,8 @@ const gobalTempMapVoList = [ "numTotal": 44, } ]; + +// const gobalTempMapVoList=[] const option = ref({ geo: { map: "changsha", @@ -982,14 +1008,13 @@ const option3 = { const handleCommand = (year) => { selectedYear.value = year; - getTrend() + getTrendData() }; // 监听信访趋势tab切换 watch(time, () => { getData(); }) onMounted(() => { - getMapJSON(currentDepartId) getData(); // timer = setInterval(() => { // activeMailTab.value = (parseInt(activeMailTab.value) % 3 + 1).toString(); diff --git a/src/views/datav/subonedatav/SubOneRightsComfort.vue b/src/views/datav/subonedatav/SubOneRightsComfort.vue index 148dee5..6dd96bb 100644 --- a/src/views/datav/subonedatav/SubOneRightsComfort.vue +++ b/src/views/datav/subonedatav/SubOneRightsComfort.vue @@ -5,35 +5,87 @@
- - -
-
- -
- -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + +
@@ -41,27 +93,27 @@
@@ -86,7 +140,7 @@ @@ -95,35 +149,60 @@ - - - - - - - - - + + + + + + + + + + - - - - - - - - - + + + + + + + + + + + + + + + @@ -136,149 +215,359 @@ import vCharts from "vue-echarts"; import changshaMap from "@/assets/data/changsha.json"; import * as echarts from "echarts/core"; -import {getRightsComfortData} from "@/api/datav"; -import moment from "moment"; -const temp = ref({ - tempTotalCase: 0, - tempVictimPer: 0, - tempComfortPer: 0, - tempHitPro: 0, - tempComfortMon: 0, -}) - -setTimeout(() => { - temp.value={ - tempTotalCase: 171, - tempVictimPer: 121, - tempComfortPer: 114, - tempHitPro: 205, - tempComfortMon: 28.1, - } -}, 1000); - - - -echarts.registerMap("changsha", changshaMap); +import moment from "moment"; +import { + getALlComfortCount, + getPunishmentSituation, + getComfortSituation, + getRightsAndComfortRank, getPoliceHurtSituationAndHurtType, getCaseAriseSituationRate, getComfortMapIcon +} from "@/api/screen/rightsComfort.ts"; +import {getSubOneStreetMap} from "@/api/screen/subScreen/subOneGlobal.ts"; +import { + getSubOneALlComfortCount, getSubOneCaseAriseSituationRate, + getSubOnePoliceHurtSituationAndHurtType +} from "@/api/screen/subScreen/subOneRightsConfort.ts"; + + +// region 所有变量 +const router = useRouter(); +const route = useRoute(); +const currentMapData = ref({}) +const chart = ref(null); // 地图 +const currentDepartId = route.query.departId; const time = ref([ moment().startOf("year").format("YYYY-MM-DD"), moment().format("YYYY-MM-DD"), ]); -const comfortPersonNumber = ref(114); -const hitPersonNumber = ref(28.1); -const comfortMoney = ref(0.0); -const punishmentSituationList = ref([]); -const comfortSituationList = ref([]); -let gobalTempMapVoList = [ +const fxsjRightsRank = ref([ { - "name": "岳麓分局", - "totalCase": 23, - "victimPer": "暂无", - "comfortPer": "19", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "岳麓分局", + value: 23 }, { - "name": "芙蓉分局", - "totalCase": 20, - "victimPer": "暂无", - "comfortPer": "12", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "芙蓉分局", + value: 20 }, { - "name": "天心分局", - "totalCase": 20, - "victimPer": "暂无", - "comfortPer": "23", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "天心分局", + value: 20 }, { - "name": "雨花分局", - "totalCase": 19, - "victimPer": "暂无", - "comfortPer": "16", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "雨花分局", + value: 19 }, { - "name": "浏阳市局", - "totalCase": 17, - "victimPer": "暂无", - "comfortPer": "30", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "浏阳市局", + value: 17 }, { - "name": "宁乡市局", - "totalCase": 11, - "victimPer": "暂无", - "comfortPer": "0", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "宁乡市局", + value: 11 }, { - "name": "开福分局", - "totalCase": 11, - "victimPer": "暂无", - "comfortPer": "4", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "开福分局", + value: 11 }, { - "name": "望城分局", - "totalCase": 9, - "victimPer": "暂无", - "comfortPer": "0", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "望城分局", + value: 9 }, { - "name": "长沙县局", - "totalCase": 9, - "victimPer": "暂无", - "comfortPer": "0", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "长沙县局", + value: 9 }, { - "name": "高新分局", - "totalCase": 4, - "victimPer": "暂无", - "comfortPer": "7", - "hitPro": "暂无", - "comfortMon": "暂无", + label: "高新分局", + value: 4 }, -]; +]); // 分县市局维权案件情况 +const jsdwRightsRank = ref([ + { + label: "岳麓分局", + value: 27 + }, + { + label: "芙蓉分局", + value: 20 + }, + { + label: "天心分局", + value: 20 + }, + { + label: "雨花分局", + value: 19 + }, + { + label: "浏阳市局", + value: 17 + }, + { + label: "宁乡市局", + value: 11 + }, + { + label: "开福分局", + value: 11 + }, + { + label: "望城分局", + value: 9 + }, + { + label: "长沙县局", + value: 9 + }, + { + label: "高新分局", + value: 4 + }, + +]); // 局属单位维权案件情况 +const fxsjComfortMoneyRank = ref([ + { + label: "岳麓分局", + value: 53 + }, + { + label: "芙蓉分局", + value: 20 + }, + { + label: "天心分局", + value: 20 + }, + { + label: "雨花分局", + value: 19 + }, + { + label: "浏阳市局", + value: 17 + }, + { + label: "宁乡市局", + value: 11 + }, + { + label: "开福分局", + value: 11 + }, + { + label: "望城分局", + value: 9 + }, + { + label: "长沙县局", + value: 9 + }, + { + label: "高新分局", + value: 4 + }, + +]); // 分县市局抚慰金额情况 +const jsdwComfortMoneyRank = ref([ + { + label: "岳麓分局", + value: 33 + }, + { + label: "芙蓉分局", + value: 20 + }, + { + label: "天心分局", + value: 20 + }, + { + label: "雨花分局", + value: 19 + }, + { + label: "浏阳市局", + value: 17 + }, + { + label: "宁乡市局", + value: 11 + }, + { + label: "开福分局", + value: 11 + }, + { + label: "望城分局", + value: 9 + }, + { + label: "长沙县局", + value: 9 + }, + { + label: "高新分局", + value: 4 + }, + +]); // 局属单位抚慰金额情况 +const comfortOverview = ref({ + comfortCaseTotal: 0, + hurtTotal: 0, + comfortTotal: 0, + hitTotal: 0, + comfortMoney: 0, +}) // 数据总览 +let globalTempMapVoList = ref([]); +// endregion + + +// region 所有函数 + +const getMapJSON = async (departId) => { + const res = await getSubOneStreetMap(departId); + currentMapData.value = res; + echarts.registerMap("changsha", res); + chart.value.chart.setOption(option.value); +} + +// 维权案件情况 +const getRightsRankList = async (departId, timeValue) => { + const res = await getSubOneALlComfortCount(departId, timeValue); + fxsjRightsRank.value = res.fxsjRightsRankList; + jsdwRightsRank.value = res.jsdwRightsRankList; +} +// 中央总览 +// 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 getCaseAriseSituationRateList = async (departId, timeValue) => { + const res = await getSubOneCaseAriseSituationRate(departId, timeValue); + ariseCaseLinkOption.value.series[0].data = res.incidentLinkList + ariseCasePoliceOption.value.series[0].data = res.incidentPoliceTypeList + ariseCaseORgOption.value.series[0].data = res.incidentOrgList +} + + +// endregion + function getData() { - getRightsComfortData(time.value).then((data) => { - console.log('Received data:', data); // 添加日志输出 - comfortPersonNumber.value = data.comfortPersonNumber; - hitPersonNumber.value = data.hitPersonNumber; - comfortMoney.value = data.comfortMoney; - punishmentSituationList.value = data.punishmentSituation; - comfortSituationList.value = data.comfortSituation; - }); + getRightsRankList(currentDepartId, time.value); + // getComfortOverview(time.value); + // getMapData(time.value) + // getPunishmentSituationList(time.value); + // getComfortSituationList(time.value); + getPoliceHurtSituationList(currentDepartId, time.value); + getCaseAriseSituationRateList(currentDepartId, time.value); } watch(time, () => { getData(); }) onMounted(() => { + getMapJSON(currentDepartId); getData(); }); +const handleClick = (params) => { + const departId = params.data.departId; + const url = router.resolve({ + path: "/datav/subOneRightsComfort", + query: {departId: departId}, + }).href; + window.open(url, "_blank"); +} + + +// region 所有图表 +echarts.registerMap("changsha", changshaMap); const option = ref({ geo: { map: "changsha", - }, tooltip: { trigger: 'item', formatter: function (params) { console.log(params) - const dataItem = gobalTempMapVoList.find(item => item.name.includes(params.name.substring(0, 2))); + const dataItem = globalTempMapVoList.value.find(item => item.name.includes(params.name.substring(0, 2))); if (dataItem) { return `
@@ -298,27 +587,21 @@ const option = ref({
${dataItem.name}
    -
  • 维权案件数 0
  • -
  • 抚慰人数 0
  • +
  • 维权案件总数 -
  • +
  • 受侵害人数 -
  • +
  • 抚慰人数 -
  • +
  • 打击处理人数 -
  • +
  • 抚慰金额 -
`; } }, - // backgroundColor: "#031577", // - // borderColor: "#0A2F86", - // borderWidth: 0, // 设置边框宽度为1像素 - // borderRadius: 3, // 设置边框半径为3像素 - // shadowBlur: 0, // 设置阴影模糊程度为8像素 - // shadowOffsetX: 0, // 设置水平阴影位移量为0像素 - // shadowOffsetY: 0, // 设置垂直阴影位移量为6像素 }, visualMap: { type: "piecewise", bottom: 10, - pieces: [ - { min: 0, max: 500, label: "问题数低于500" }, { min: 501, max: 1000, label: "问题数介于500-1000" }, { min: 1001, label: "问题数高于1000" }, - ], + pieces: [], right: 10, realtime: false, orient: "horizontal", @@ -343,7 +626,8 @@ const option = ref({ itemStyle: { normal: { areaColor: "#02215E", - borderColor: "#1773c3", + borderColor: "#24D2EE", + borderWidth: 1 // 高亮时边框宽度 }, }, emphasis: { @@ -351,152 +635,31 @@ const option = ref({ borderColor: "#FF0000", // 高亮时边框颜色 borderWidth: 4 // 高亮时边框宽度 }, - data: gobalTempMapVoList.map(item => ({ - name: item.name, - value: item.totalPro // 将 totalPro 值映射到 value 字段 - })) + data: [] } ], }) - -const option1 = ref({ - xAxis: { - type: "category", - boundaryGap: false, - data: [ - "9/10", - "9/11", - "9/12", - "9/13", - "9/14", - "9/15", - "9/16", - "9/17", - "9/18", - "9/19", - "9/20", - "9/21", - "9/22", - "9/23", - ], - }, - yAxis: { - type: "value", - splitLine: { - show: true, - lineStyle: { - color: "#193775", - }, - }, - }, +const xsajCaseTypeOption = ref({ series: [ { - type: "line", - smooth: true, + type: "pie", + radius: ["40%", "70%"], label: { - show: false, - }, - lineStyle: { - color: "#28E6FF", - width: 4, - }, - areaStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ - { - offset: 0, - color: "rgba(40,230,255,0.47)", // 渐变起始颜色 - }, - { - offset: 1, - color: "rgba(40,230,255,0)", // 渐变结束颜色 - }, - ]), + color: "#fff", }, data: [ - 2000, 1160, 2310, 3000, 3100, 3100, 3100, 2000, 1160, 2310, - 3000, 3100, 3100, 3100, + {value: 32, name: "故意伤害"}, + {value: 42, name: "袭警罪"}, + {value: 12, name: "寻衅滋事"}, + {value: 28, name: "妨碍公务"} ], }, ], -}); - -const data1 = [ - { - label: "岳麓分局", - value: 23 - }, - { - label: "芙蓉分局", - value: 20 - }, - { - label: "天心分局", - value: 20 - }, - { - label: "雨花分局", - value: 19 - }, - { - label: "浏阳市局", - value: 17 - }, - { - label: "宁乡市局", - value: 11 - }, - { - label: "开福分局", - value: 11 - }, - - { - label: "望城分局", - value: 9 - }, - { - label: "长沙县局", - value: 9 - }, - { - label: "高新分局", - value: 4 - }, - -]; - -const data2 = [ - { - name: "开福分局", - value: 9700, - }, - { - name: "芙蓉分局", - value: 9021, - }, - { - name: "岳麓分局", - value: 8512, - }, - { - name: "雨花分局", - value: 8021, - }, - { - name: "望城分局", - value: 7111, - }, - { - name: "浏阳市局", - value: 6622, - }, - { - name: "长沙县局", - value: 6221, + tooltip: { + trigger: "item", }, -]; - -const option2 = { +}) +const xzajCaseTypeOption = ref({ series: [ { type: "pie", @@ -515,54 +678,70 @@ const option2 = { tooltip: { trigger: "item", }, +}); +const punishmentSituationOption = { + series: [ + { + type: "pie", + radius: ["40%", "70%"], + label: { + color: "#fff", + }, + data: [ + // {value: 71, name: "刑事追究"}, + // {value: 97, name: "行政处理"}, + ], + }, + ], + tooltip: { + trigger: "item", + }, }; - -const option3 = computed(() => { - return { - series: [ - { - type: "pie", - radius: ["40%", "70%"], - label: { - color: "#fff", - }, - data: punishmentSituationList.value, +const comfortSituationOption = { + series: [ + { + type: "pie", + radius: ["40%", "70%"], + label: { + color: "#fff", }, - ], - tooltip: { - trigger: "item", + data: [ + // {value: 71, name: "刑事追究"}, + // {value: 97, name: "行政处理"}, + ], }, - }; -}); - -const option4 = computed(() => { - return { - series: [ - { - type: "pie", - radius: ["40%", "70%"], - label: { - color: "#fff", - }, - // data: comfortSituationList.value, - data: [ - {value: 61, name: "民警"}, - {value: 51, name: "辅警"}, - {value: 2, name: "协警"}, - ] + ], + tooltip: { + trigger: "item", + }, +}; +const hurtNumOption = ref({ + series: [ + { + type: "pie", + radius: ["30%", "50%"], + label: { + color: "#fff", + }, + tooltip: { + trigger: "item", }, - ], - tooltip: { - trigger: "item", + data: [ + {value: 68, name: "民警"}, + {value: 50, name: "辅警"}, + {value: 3, name: "协警"}, + ], }, - }; + ], + tooltip: { + trigger: "item", + }, }); - -const option6 = { +const hurtTypeOption = ref({ series: [ { type: "pie", - radius: ["40%", "70%"], + radius: ["30%", "50%"], label: { color: "#fff", }, @@ -571,7 +750,7 @@ const option6 = { }, data: [ {value: 68, name: "民警"}, - {value: 50, name: "辅警"}, + {value: 250, name: "辅警"}, {value: 3, name: "协警"}, ], @@ -580,9 +759,8 @@ const option6 = { tooltip: { trigger: "item", }, -}; - -const option5 = { +}); +const ariseCaseLinkOption = ref({ series: [ { type: "pie", @@ -605,10 +783,8 @@ const option5 = { tooltip: { trigger: "item", }, -}; - - -const data10 = { +}); +const ariseCasePoliceOption = ref({ series: [ { type: "pie", @@ -617,16 +793,46 @@ const data10 = { color: "#fff", }, data: [ - {value: 71, name: "刑事追究"}, - {value: 97, name: "行政处理"}, + {value: 127, name: "110警情"}, + {value: 132, name: "执勤处室"}, + {value: 222, name: "组织调解"}, + {value: 332, name: "传唤抓捕"}, + {value: 2, name: "安保维稳"}, + {value: 276, name: "网络侵权"}, + {value: 492, name: "医闹纠纷"}, + {value: 199, name: "其它"}, ], }, ], tooltip: { trigger: "item", }, -}; - +}); +const ariseCaseORgOption = ref({ + series: [ + { + type: "pie", + radius: ["40%", "70%"], + label: { + color: "#fff", + }, + data: [ + {value: 17, name: "110警情"}, + {value: 322, name: "执勤处室"}, + {value: 234, name: "组织调解"}, + {value: 343, name: "传唤抓捕"}, + {value: 22, name: "安保维稳"}, + {value: 2, name: "网络侵权"}, + {value: 2, name: "医闹纠纷"}, + {value: 1, name: "其它"}, + ], + }, + ], + tooltip: { + trigger: "item", + }, +}); +// endregion const colors = [ { @@ -654,77 +860,72 @@ const colors = [ // 弹框整体 .tooltip { position: relative; - width: 169.88px; - height: 170px; + width: 160px; + height: 194px; background: linear-gradient(180deg, rgba(1, 4, 87, 0.8) 0%, rgba(3, 21, 119, 0.8) 100%); border: 1px solid #4E8FFF; margin: -10px -10px -10px -10px; } - //浏阳市局 + ////浏阳市局 .tooltip-title { - width: 169.88px; + width: 160px; height: 43px; - background: linear-gradient(180deg, rgba(1, 4, 87, 0.8) 0%, rgba(3, 21, 119, 0.8) 100%); + background: linear-gradient(180deg, #0A2F86 0%, #04154E 100%); + box-shadow: inset 0px -1px 0px 0px #253755; display: flex; justify-content: center; /* 水平居中 */ align-items: center; /* 垂直居中 */ - text-align: center; /* 水平居中 */ font-weight: 400; font-size: 16px; color: #FFFFFF; - line-height: 22px; border-bottom: 1px solid #253755; /* 设置下边框 */ } - .tooltip-content { - width: 170px; - height: 132px; - //font-size: 11px; - margin-top: -12px; - background: linear-gradient(180deg, #010457 0%, #031577 100%); + width: 160px; + height: 150px; + background: linear-gradient(180deg, #010457 0%, #031577 100%) } .tooltip-content ul { list-style-type: none; /* 移除默认的小圆点 */ - padding: 0; - + padding-left: 5px; + margin: 0; } .tooltip-content ul li { - margin-left: 5px; - height: 25px; + height: 24px; color: #597AE9; - font-size: 13px; + font-weight: 400; + font-size: 14px; } - // 数字的span + //// 数字的span .tooltip-ul span { float: right; - width: 50px; - text-align: right; - margin-right: 35px; + width: 55px; color: #fff; - font-size: 13px; - } - + font-size: 14px; + text-align: center; /* 水平居中 */ - /* 小尖角 */ - .tooltip::before { - content: ''; - position: absolute; - top: 90px; /* 调整尖角的垂直位置 */ - left: -10px; /* 调整尖角的水平位置 */ - width: 0; - height: 0; - //border-top: 10px solid red; /* 顶边颜色 */ - //border-bottom: 10px solid green; /* 底边颜色 */ - //border-right: 10px solid blue; /* 右边颜色,与背景颜色相同 */ } + ///* 小尖角 */ + //.tooltip::before { + // content: ''; + // position: absolute; + // top: 90px; /* 调整尖角的垂直位置 */ + // left: -10px; /* 调整尖角的水平位置 */ + // width: 0; + // height: 0; + // //border-top: 10px solid red; /* 顶边颜色 */ + // //border-bottom: 10px solid green; /* 底边颜色 */ + // //border-right: 10px solid blue; /* 右边颜色,与背景颜色相同 */ + //} + } .test { diff --git a/src/views/datav/subonedatav/SubOneSceneInsp.vue b/src/views/datav/subonedatav/SubOneSceneInsp.vue index cdb8b00..d5ac188 100644 --- a/src/views/datav/subonedatav/SubOneSceneInsp.vue +++ b/src/views/datav/subonedatav/SubOneSceneInsp.vue @@ -792,7 +792,7 @@ import changshaMap from "@/assets/data/changsha.json"; import * as echarts from "echarts/core"; import moment from "moment"; -import {getSubOneStreetMap} from "@/api/screen/sub1.ts"; +import {getSubOneStreetMap} from "@/api/screen/subScreen/subOneGlobal.ts"; import { getAllSubOneSupervisionNotifyCount, getSubOneChangedRank, getSubOneCheckBeer, getSubOneCompanyProblem, getSubOneGunController, getSubOneHandleCase, diff --git a/src/views/datav/subonedatav/SubOneVideoInsp.vue b/src/views/datav/subonedatav/SubOneVideoInsp.vue index 9561ea3..d070546 100644 --- a/src/views/datav/subonedatav/SubOneVideoInsp.vue +++ b/src/views/datav/subonedatav/SubOneVideoInsp.vue @@ -195,7 +195,7 @@ import { getVideoSuperviseMap } from "@/api/screen/videoSupervise.ts"; import moment from "moment/moment.js"; -import {getSubOneStreetMap} from "@/api/screen/sub1.ts"; +import {getSubOneStreetMap} from "@/api/screen/subScreen/subOneGlobal.ts"; import { getSubOneAllVideoSuperviseCount, getSubOneVideoSuperviseProblemRank, getSubOneVideoSuperviseProblemTypeRate, getSubOneVideoSuperviseTrend