Browse Source

地图加缓存、二级子屏案件核查

main
parent
commit
31a101558f
  1. 20
      src/api/data/basicScreen.ts
  2. 19
      src/api/screen/sub1.ts
  3. 71
      src/views/datav/Gobal.vue
  4. 2
      src/views/datav/SceneInsp.vue
  5. 432
      src/views/datav/Sub1.vue

20
src/api/data/basicScreen.ts

@ -9,9 +9,9 @@ import request from "@/api/request";
/* /*
* *
*/ */
export function getAllGobalCount(times) { export function getAllGlobalCount(times) {
return request.get({ return request.get({
url: `/datav/dataGobalScreen?beginTime=${times[0]}&endTime=${times[1]}` url: `/datav/dataGlobalScreen?beginTime=${times[0]}&endTime=${times[1]}`
}); });
} }
@ -19,9 +19,9 @@ export function getAllGobalCount(times) {
/** /**
* *
*/ */
export function getGobalRecentlyTrendByMonth(year) { export function getGlobalRecentlyTrendByMonth(year) {
return request.get({ return request.get({
url: `/datav/dataGobalScreen/getGobalRecentlyTrendByMonth?year=${year}` url: `/datav/dataGlobalScreen/getGlobalRecentlyTrendByMonth?year=${year}`
}); });
} }
@ -32,7 +32,7 @@ export function getGobalRecentlyTrendByMonth(year) {
*/ */
export function getOrganizationRank(times) { export function getOrganizationRank(times) {
return request.get({ return request.get({
url: `/datav/dataGobalScreen/getOrganizationRank?beginTime=${times[0]}&endTime=${times[1]}` url: `/datav/dataGlobalScreen/getOrganizationRank?beginTime=${times[0]}&endTime=${times[1]}`
}); });
} }
@ -43,7 +43,7 @@ export function getOrganizationRank(times) {
*/ */
export function getBusinessRate(times) { export function getBusinessRate(times) {
return request.get({ return request.get({
url: `/datav/dataGobalScreen/getBusinessRate?beginTime=${times[0]}&endTime=${times[1]}` url: `/datav/dataGlobalScreen/getBusinessRate?beginTime=${times[0]}&endTime=${times[1]}`
}); });
} }
@ -54,7 +54,7 @@ export function getBusinessRate(times) {
*/ */
export function getStrongProblemRate(times) { export function getStrongProblemRate(times) {
return request.get({ return request.get({
url: `/datav/dataGobalScreen/getStrongProblemRate?beginTime=${times[0]}&endTime=${times[1]}` url: `/datav/dataGlobalScreen/getStrongProblemRate?beginTime=${times[0]}&endTime=${times[1]}`
}); });
} }
@ -65,7 +65,7 @@ export function getStrongProblemRate(times) {
*/ */
export function getProblemBusinessRate(times) { export function getProblemBusinessRate(times) {
return request.get({ return request.get({
url: `/datav/dataGobalScreen/getProblemBusinessRate?beginTime=${times[0]}&endTime=${times[1]}` url: `/datav/dataGlobalScreen/getProblemBusinessRate?beginTime=${times[0]}&endTime=${times[1]}`
}); });
} }
@ -74,9 +74,9 @@ export function getProblemBusinessRate(times) {
* *
*/ */
export function getGobalMap(times) { export function getGlobalMap(times) {
return request.get({ return request.get({
url: `/datav/dataGobalScreen/getMap?beginTime=${times[0]}&endTime=${times[1]}` url: `/datav/dataGlobalScreen/getMap?beginTime=${times[0]}&endTime=${times[1]}`
}); });
} }

19
src/api/screen/sub1.ts

@ -1,7 +1,22 @@
import request from "../request"; import request from "../request";
export function test(departId) { export function getSubOneStreetMap(departPId) {
return request.get({ return request.get({
url: `/datav/sub1/test?departId=${departId}` url: `/datav/sub1/getSubOneStreetMap?departPId=${departPId}`
});
}
export function getSubOneTrend(departPId, year) {
return request.get({
url: `/datav/sub1/getSubOneTrend?departPId=${departPId}&year=${year}`
});
}
export function getCaseVerifyRank(departPId, times) {
return request.get({
url: `/datav/sub1/getCaseVerifyRank?departPId=${departPId}&beginTime=${times[0]}&endTime=${times[1]}`
}); });
} }

71
src/views/datav/Gobal.vue

@ -139,10 +139,13 @@ import changshaMap from "@/assets/data/changsha.json";
import * as echarts from "echarts/core"; import * as echarts from "echarts/core";
import moment from "moment/moment"; import moment from "moment/moment";
import { import {
getAllGobalCount,
getBusinessRate, getBusinessRate,
getGobalRecentlyTrendByMonth, getGlobalRecentlyTrendByMonth,
getOrganizationRank, getProblemBusinessRate, getStrongProblemRate, getGobalMap getOrganizationRank,
getProblemBusinessRate,
getStrongProblemRate,
getGlobalMap,
getAllGlobalCount
} from "@/api/data/basicScreen.ts"; } from "@/api/data/basicScreen.ts";
// region // region
@ -166,7 +169,7 @@ const time = ref([
moment().startOf("year").format("YYYY-MM-DD"), moment().startOf("year").format("YYYY-MM-DD"),
moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD"),
]); // ]); //
const gobalTempMapVoList = ref([ const globalTempMapVoList = ref([
{ {
"name": "天心分局", "name": "天心分局",
"totalPro": 11, "totalPro": 11,
@ -237,7 +240,7 @@ const option = ref({
trigger: 'item', trigger: 'item',
formatter: function (params) { formatter: function (params) {
// console.log(params); // console.log(params);
const dataItem = gobalTempMapVoList.value.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) { if (dataItem) {
return ` return `
<div class="tooltip"> <div class="tooltip">
@ -391,23 +394,25 @@ const proTrend = ref({
// endregion // endregion
// region // region
const getOrganizationRankData = async (timeValue=time.value)=>{ const getOrganizationRankData = async (timeValue = time.value) => {
const res = await getOrganizationRank(timeValue); const res = await getOrganizationRank(timeValue);
fxsjlist.value = res.fxsjlist; fxsjlist.value = res.fxsjlist;
jsdwlist.value = res.jsdwlist; jsdwlist.value = res.jsdwlist;
} }
const getBusinessRateData=async (timeValue=time.value)=>{ const getBusinessRateData = async (timeValue = time.value) => {
const res=await getBusinessRate(timeValue); const res = await getBusinessRate(timeValue);
ywzblist.value = res.ywzblist; ywzblist.value = res.ywzblist;
} }
const getAllGobalCountData = async(timeValue=time.value)=>{ const getAllGlobalCountData = async (timeValue = time.value) => {
const res = await getAllGlobalCount(timeValue);
overview.value = res.overview; overview.value = res.overview;
} }
const getGobalRecentlyTrendByMonthData=async(timeValue=time.value)=>{ const getGlobalRecentlyTrendByMonthData = async (timeValue = time.value) => {
const gobalRecentlyTrendList = res.gobalRecentlyTrendList; const res = await getGlobalRecentlyTrendByMonth(timeValue);
const categories = gobalRecentlyTrendList.map(item => item.name); const globalRecentlyTrendList = res.globalRecentlyTrendList;
const values = gobalRecentlyTrendList.map(item => item.value); const categories = globalRecentlyTrendList.map(item => item.name);
const values = globalRecentlyTrendList.map(item => item.value);
// //
proTrend.value.xAxis.data = categories; proTrend.value.xAxis.data = categories;
proTrend.value.series[0].data = values; proTrend.value.series[0].data = values;
@ -425,13 +430,13 @@ function getData() {
getBusinessRate(time.value).then((res) => { getBusinessRate(time.value).then((res) => {
ywzblist.value = res.ywzblist; ywzblist.value = res.ywzblist;
}); });
getAllGobalCount(time.value).then((res) => { getAllGlobalCount(time.value).then((res) => {
overview.value = res.overview; overview.value = res.overview;
}); });
getGobalRecentlyTrendByMonth(new Date().getFullYear()).then((res) => { getGlobalRecentlyTrendByMonth(new Date().getFullYear()).then((res) => {
const gobalRecentlyTrendList = res.gobalRecentlyTrendList; const globalRecentlyTrendList = res.globalRecentlyTrendList;
const categories = gobalRecentlyTrendList.map(item => item.name); const categories = globalRecentlyTrendList.map(item => item.name);
const values = gobalRecentlyTrendList.map(item => item.value); const values = globalRecentlyTrendList.map(item => item.value);
// //
proTrend.value.xAxis.data = categories; proTrend.value.xAxis.data = categories;
proTrend.value.series[0].data = values; proTrend.value.series[0].data = values;
@ -442,9 +447,9 @@ function getData() {
getProblemBusinessRate(time.value).then((res) => { getProblemBusinessRate(time.value).then((res) => {
wtlxlist.value = res.wtlxlist; wtlxlist.value = res.wtlxlist;
}); });
getGobalMap(time.value).then(res => { getGlobalMap(time.value).then(res => {
// //
const mappedData = res.gobalTempMapVoList.map(item => { const mappedData = res.globalTempMapVoList.map(item => {
let name; let name;
switch (item.name) { switch (item.name) {
case '长沙县局': case '长沙县局':
@ -491,8 +496,8 @@ function getData() {
const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0); const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0);
const avg = total / mappedData.length; // const avg = total / mappedData.length; //
const range30Percent = avg * 0.3 // const range30Percent = avg * 0.3 //
gobalTempMapVoList.value = mappedData; globalTempMapVoList.value = mappedData;
option.value.series[0].data = gobalTempMapVoList; option.value.series[0].data = globalTempMapVoList;
option.value.visualMap.pieces = [ option.value.visualMap.pieces = [
{gte: 0, lte: avg - range30Percent, label: "低于平均问题30%", color: "#4987F6"}, {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"},
@ -509,10 +514,10 @@ onMounted(() => {
// region || // region ||
const handleCommand = (year) => { const handleCommand = (year) => {
selectedYear.value = year; // selectedYear.value = year; //
getGobalRecentlyTrendByMonth(year).then(res => { getGlobalRecentlyTrendByMonth(year).then(res => {
const gobalRecentlyTrendList = res.gobalRecentlyTrendList; const globalRecentlyTrendList = res.globalRecentlyTrendList;
const categories = gobalRecentlyTrendList.map(item => item.name); const categories = globalRecentlyTrendList.map(item => item.name);
const values = gobalRecentlyTrendList.map(item => item.value); const values = globalRecentlyTrendList.map(item => item.value);
// //
proTrend.value.xAxis.data = categories; proTrend.value.xAxis.data = categories;
proTrend.value.series[0].data = values; proTrend.value.series[0].data = values;
@ -523,15 +528,15 @@ watch(time, () => {
}); });
const handleClick = (params) => { const handleClick = (params) => {
// const departId = params.data.departId; const departId = params.data.departId;
// const { name } = params.data; const {name} = params.data;
// alert("id"+departId); // alert("id"+departId);
// alert(""+name); // alert(""+name);
// const url = router.resolve({ const url = router.resolve({
// path: "/datav/sub1", path: "/datav/sub1",
// query: { departId: departId }, query: {departId: departId},
// }).href; }).href;
// window.open(url, "_blank"); window.open(url, "_blank");
} }
// endregion // endregion

2
src/views/datav/SceneInsp.vue

@ -792,8 +792,6 @@ import {
getMap, getProblemTypeRate, getMap, getProblemTypeRate,
getSupervisionTrend, getYellowBetDrug getSupervisionTrend, getYellowBetDrug
} from "@/api/data/supervisionNotify.ts"; } from "@/api/data/supervisionNotify.ts";
import {getGobalRecentlyTrendByMonth} from "@/api/data/basicScreen.ts";
import Message from "@/components/datav/message.vue";
// region // region
const activeTabRight = ref("1") const activeTabRight = ref("1")

432
src/views/datav/Sub1.vue

@ -267,34 +267,35 @@
style="height: 360px" style="height: 360px"
:option="option" :option="option"
autoresize autoresize
ref="chart"
/> />
<datav-card title="问题趋势"> <datav-card title="问题趋势">
<datav-tabs v-model="activeMailTrend" @change="handleTabChange"> <datav-tabs v-model="activeMailTrend" @change="handleTabChange">
<datav-tab-item label="督察问题趋势" name="1"> <datav-tab-item label="督察问题趋势" name="1">
<v-charts <v-charts
style="width: 105%; height: 300px;" style="width: 105%; height: 300px;"
:option="option1" :option="superviseProTrend"
autoresize autoresize
/> />
</datav-tab-item> </datav-tab-item>
<datav-tab-item label="案件核查趋势" name="2"> <datav-tab-item label="案件核查趋势" name="2">
<v-charts <v-charts
style="width: 105%; height: 300px;" style="width: 105%; height: 300px;"
:option="option1" :option="caseVerifyTrend"
autoresize autoresize
/> />
</datav-tab-item> </datav-tab-item>
<datav-tab-item label="警务评议趋势" name="3"> <datav-tab-item label="警务评议趋势" name="3">
<v-charts <v-charts
style="width: 105%; height: 300px;" style="width: 105%; height: 300px;"
:option="option1" :option="policeCommentTrend"
autoresize autoresize
/> />
</datav-tab-item> </datav-tab-item>
<datav-tab-item label="信访投诉趋势" name="4"> <datav-tab-item label="信访投诉趋势" name="4">
<v-charts <v-charts
style="width: 105%; height: 300px;" style="width: 105%; height: 300px;"
:option="option1" :option="mailTrend"
autoresize autoresize
/> />
</datav-tab-item> </datav-tab-item>
@ -423,107 +424,85 @@
> >
<datav-tab-item label="派出所" name="1"> <datav-tab-item label="派出所" name="1">
<el-row class="mb-32"> <el-row class="mb-32">
<el-col :span="6"> <el-col :span="8">
<div class="descriptions_cell text-center"> <div class="descriptions_cell text-center">
<div class="descriptions_content"> <div class="descriptions_content">
22 {{ caseVerifyPrecinctOverView.one }}
</div> </div>
<div class="descriptions_label"> <div class="descriptions_label">
问题 案件
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="8">
<div class="descriptions_cell text-center"> <div class="descriptions_cell text-center">
<div class="descriptions_content"> <div class="descriptions_content">
22 {{ caseVerifyPrecinctOverView.two }}
</div> </div>
<div class="descriptions_label"> <div class="descriptions_label">
整改中 查实数
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="8">
<div class="descriptions_cell text-center"> <div class="descriptions_cell text-center">
<div class="descriptions_content"> <div class="descriptions_content">
22 {{ caseVerifyPrecinctOverView.three }}
</div> </div>
<div class="descriptions_label"> <div class="descriptions_label">
已整改 查实率
</div>
</div>
</el-col>
<el-col :span="6">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
22%
</div>
<div class="descriptions_label">
整改率
</div> </div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-scrollbar height="350px"> <el-scrollbar height="350px">
<datav-chart-bar <datav-chart-bar
:size="small" :size="small"
:data="caseVerifyPrecinctRank"
title="整改率排名" title="整改率排名"
sub-title="已整改/问题数" sub-title="问题数/查实数"
unit="%"
/> />
</el-scrollbar> </el-scrollbar>
</datav-tab-item> </datav-tab-item>
<datav-tab-item label="大队" name="2"> <datav-tab-item label="大队" name="2">
<el-row class="mb-32"> <el-row class="mb-32">
<el-col :span="6"> <el-col :span="8">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
22
</div>
<div class="descriptions_label">
问题数
</div>
</div>
</el-col>
<el-col :span="6">
<div class="descriptions_cell text-center"> <div class="descriptions_cell text-center">
<div class="descriptions_content"> <div class="descriptions_content">
22 {{ caseVerifyTeamOverView.one }}
</div> </div>
<div class="descriptions_label"> <div class="descriptions_label">
整改中 案件数
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="8">
<div class="descriptions_cell text-center"> <div class="descriptions_cell text-center">
<div class="descriptions_content"> <div class="descriptions_content">
22 {{ caseVerifyTeamOverView.two }}
</div> </div>
<div class="descriptions_label"> <div class="descriptions_label">
已整改 查实数
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="8">
<div class="descriptions_cell text-center"> <div class="descriptions_cell text-center">
<div class="descriptions_content"> <div class="descriptions_content">
22% {{ caseVerifyTeamOverView.three }}
</div> </div>
<div class="descriptions_label"> <div class="descriptions_label">
整改 查实
</div> </div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<el-scrollbar height="350px"> <el-scrollbar height="350px">
<datav-chart-bar <datav-chart-bar
:size="small" :size="small"
:data="caseVerifyTeamRank"
title="整改率排名" title="整改率排名"
sub-title="已整改/问题数" sub-title="问题数/查实数"
unit="%"
/> />
</el-scrollbar> </el-scrollbar>
</datav-tab-item> </datav-tab-item>
@ -540,61 +519,276 @@
import vCharts from "vue-echarts"; import vCharts from "vue-echarts";
import moment from "moment"; import moment from "moment";
import * as echarts from "echarts/core"; import * as echarts from "echarts/core";
import {getCaseVerifyRank, getSubOneStreetMap, getSubOneTrend} from "@/api/screen/sub1.ts";
import changshaMap from "@/assets/data/changsha.json";
const router = useRouter()
const route = useRoute();
const time = ref([ const time = ref([
moment().startOf("year").format("YYYY-MM-DD"), moment().startOf("year").format("YYYY-MM-DD"),
moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD"),
]); // ]); //
const router = useRouter() const currentDepartId = route.query.departId;
const route = useRoute(); const currentMapData = ref({})
import geoJson from "@/assets/data/浏阳市.json"; const chart = ref(null); //
import {test} from "@/api/screen/sub1.ts"; const currentYear = new Date().getFullYear(); //
const superviseProTrend = ref({
grid: {
left: '5%', //
right: '2%', //
top: '10%', //
bottom: '20%', //
containLabel: false //
},
xAxis: {
type: "category",
data: [],
boundaryGap: true,
axisTick: {
// X线
show: false
},
},
yAxis: {
type: "value",
splitLine: {
show: true,
lineStyle: {
color: "#193775",
},
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'line',
label: {
backgroundColor: '#6a7985'
}
}
},
series: [
{
type: "line",
smooth: true,
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)", //
},
]),
},
data: [],
},
],
}); //
const caseVerifyTrend = ref({
grid: {
left: '5%', //
right: '2%', //
top: '10%', //
bottom: '20%', //
containLabel: false //
},
xAxis: {
type: "category",
data: [],
boundaryGap: true,
axisTick: {
// X线
show: false
},
},
yAxis: {
type: "value",
splitLine: {
show: true,
lineStyle: {
color: "#193775",
},
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'line',
label: {
backgroundColor: '#6a7985'
}
}
},
series: [
{
type: "line",
smooth: true,
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)", //
},
]),
},
data: [],
},
],
}); //
const policeCommentTrend = ref({
grid: {
left: '5%', //
right: '2%', //
top: '10%', //
bottom: '20%', //
containLabel: false //
},
xAxis: {
type: "category",
data: [],
boundaryGap: true,
axisTick: {
// X线
show: false
},
},
yAxis: {
type: "value",
splitLine: {
show: true,
lineStyle: {
color: "#193775",
},
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'line',
label: {
backgroundColor: '#6a7985'
}
}
},
series: [
{
type: "line",
smooth: true,
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)", //
},
]),
},
data: [],
},
],
}); //
const mailTrend = ref({
grid: {
left: '5%', //
right: '2%', //
top: '10%', //
bottom: '20%', //
containLabel: false //
},
xAxis: {
type: "category",
data: [],
boundaryGap: true,
axisTick: {
// X线
show: false
},
},
yAxis: {
type: "value",
splitLine: {
show: true,
lineStyle: {
color: "#193775",
},
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'line',
label: {
backgroundColor: '#6a7985'
}
}
},
series: [
{
type: "line",
smooth: true,
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)", //
},
]),
},
data: [],
},
],
}); // 访
echarts.registerMap("浏阳市", geoJson); echarts.registerMap("changsha", changshaMap);
const option = ref({ const option = ref({
geo: { geo: {
map: "浏阳市", map: "changsha",
}, },
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: function (params) {
// console.log(params);
// const dataItem = gobalTempMapVoList.value.find(item => item.name.includes(params.name.substring(0, 2)));
// if (dataItem) {
// return `
// <div class="tooltip">
// <div class="tooltip-title">${dataItem.originalName}</div>
// <div class="tooltip-content">
// <ul class="tooltip-ul" >
// <li> <span>${dataItem.totalPro}</span></li>
// <li> <span>${dataItem.supervisePro}</span></li>
// <li> <span>${dataItem.caseVerifyPro}</span></li>
// <li>访 <span>${dataItem.mailPro}</span></li>
// <li> <span>${dataItem.policePro}</span></li>
// <li> <span>${dataItem.reviewPro}</span></li>
// </ul>
// </div>
// </div>`;
// } else {
// return `
// <div class="tooltip">
// <div class="tooltip-title">${dataItem.originalName}</div>
// <div class="tooltip-content">
// <ul class="tooltip-ul"">
// <li> <span>0000</span></li>
// <li> <span>0000</span></li>
// <li> <span>0000</span></li>
// <li>访 <span>0000</span></li>
// <li> <span>0000</span></li>
// <li> <span>0000</span></li>
//
// </ul>
//
// </div>
// </div>`;
// }
},
}, },
visualMap: { visualMap: {
type: "piecewise", type: "piecewise",
@ -615,7 +809,7 @@ const option = ref({
series: [ series: [
{ {
type: "map", type: "map",
map: "浏阳市", map: "changsha",
hoverAnimation: true, hoverAnimation: true,
label: { label: {
show: true, show: true,
@ -687,18 +881,58 @@ const option1 = ref({
}, },
], ],
}); });
const currentDepartId = route.query.departId; const caseVerifyPrecinctOverView = ref({})
const beginTest = async (departId) => { const caseVerifyTeamOverView =ref({})
const res = await test(departId); const caseVerifyPrecinctRank = ref([])
const caseVerifyTeamRank = ref([])
const getMapJSON = async (departId) => {
const res = await getSubOneStreetMap(departId);
currentMapData.value = res;
echarts.registerMap("changsha", res);
chart.value.chart.setOption(option.value);
}
const getTrendData = async (currentDepartId, currentYear) => {
const res = await getSubOneTrend(currentDepartId, currentYear);
const superviseProTrendList = res.superviseProTrend;
const caseVerifyTrendList = res.caseVerifyTrend;
const policeCommentTrendList = res.policeCommentTrend;
const mailTrendList = res.mailTrend;
const superviseCategories = superviseProTrendList.map(item => item.name);
const superviseValues = superviseProTrendList.map(item => item.value);
const caseVerifyCategories = caseVerifyTrendList.map(item => item.name);
const caseVerifyValues = caseVerifyTrendList.map(item => item.value);
const policeCommentCategories = policeCommentTrendList.map(item => item.name);
const policeCommentValues = policeCommentTrendList.map(item => item.value);
const mailCategories = mailTrendList.map(item => item.name);
const mailValues = mailTrendList.map(item => item.value);
//
superviseProTrend.value.xAxis.data = superviseCategories;
superviseProTrend.value.series[0].data = superviseValues;
caseVerifyTrend.value.xAxis.data = caseVerifyCategories;
caseVerifyTrend.value.series[0].data = caseVerifyValues;
policeCommentTrend.value.xAxis.data = policeCommentCategories;
policeCommentTrend.value.series[0].data = policeCommentValues;
mailTrend.value.xAxis.data = mailCategories;
mailTrend.value.series[0].data = mailValues;
}
const getCaseVerifyRankList = async (currentDepartId, times) => {
const res = await getCaseVerifyRank(currentDepartId, times);
console.log(res) console.log(res)
caseVerifyPrecinctRank.value = res.caseVerifyPrecinctList;
caseVerifyTeamRank.value = res.caseVerifyTeamList;
caseVerifyPrecinctOverView.value = res.caseVerifyPrecinctOverView;
caseVerifyTeamOverView.value= res.caseVerifyTeamOverView;
} }
onMounted(() => { onMounted(() => {
// currentDepartId.value = route.query.departId; getMapJSON(currentDepartId);
beginTest(currentDepartId); getTrendData(currentDepartId, currentYear);
getCaseVerifyRankList(currentDepartId, time.value);
}) })
console.log(currentDepartId)
function go() { function go() {
router.push('/datav/sub2') router.push('/datav/sub2')

Loading…
Cancel
Save