Browse Source

动画完成&民意感知点击地图显示派出所

main
不爱学习的石同学 11 months ago
parent
commit
dcf56ec3ef
  1. 6
      src/api/screen/jwpy.ts
  2. 46
      src/views/datav/CaseVerif.vue
  3. 6
      src/views/datav/Jwpy.vue
  4. 98
      src/views/datav/MailVisits.vue
  5. 46
      src/views/datav/SceneInsp.vue
  6. 10
      src/views/datav/subonedatav/SubOneCaseVerif.vue
  7. 76
      src/views/datav/subonedatav/SubOneMailVisits.vue

6
src/api/screen/jwpy.ts

@ -29,9 +29,9 @@ export function GetZHMYLPM(PeriodId, PeriodSonID, OrgId, TaskID, TaskClass) {
let formData = new FormData();
formData.append("PeriodId", PeriodId);
formData.append("PeriodSonID", PeriodSonID);
formData.append("OrgId", OrgId);
formData.append("TaskID", TaskID);
formData.append("TaskClass", TaskClass);
OrgId && formData.append("OrgId", OrgId);
TaskID && formData.append("TaskID", TaskID);
TaskClass && formData.append("TaskClass", TaskClass);
return outrequest.post({
url: `/out-police-service/api/DSJ/GetZHMYLPM`,
body: formData

46
src/views/datav/CaseVerif.vue

@ -193,6 +193,7 @@ import {
getCaseVerificationCount
} from "@/api/screen/caseVerif.ts";
import {circularChart} from "@/views/datav/simulateData/AnimationTestData.js";
import {mapOrgNameMapping} from "@/enums/orgMapping.js";
const currentYear = new Date().getFullYear();
const years = ref([currentYear.toString(), (currentYear - 1).toString(), (currentYear - 2).toString()]); //
@ -544,50 +545,7 @@ const getCaseVerificationCountData = async (timeValue) => {
}
const getCaseVerificationMapData = async (timeValue) => {
const res = await getCaseVerificationMap(timeValue);
const mappedData = res.caseVerificationMapList.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.total,
};
});
const mappedData = mapOrgNameMapping(res.caseVerificationMapList, "total");
const maxItem = mappedData.reduce((max, item) => (Number(item.value) > Number(max.value) ? item : max), mappedData[0]);
const range60Percent = maxItem.value * 0.6 //
const range80Percent = maxItem.value * 0.8 //

6
src/views/datav/Jwpy.vue

@ -423,15 +423,15 @@ const handleChartClick = async (params) => {
}
await getData();
// 滿
discovery();
let tempId = setTimeout(discovery, 300);
};
// endregion
//
const discovery = () => {
const discovery = async () => {
//
GetZHMYLPM(selectYear.value, selectMonth.value, selectOrg.value, task.value, 2).then((res) => {
await GetZHMYLPM(selectYear.value, selectMonth.value, selectOrg.value, task.value, 2).then((res) => {
tableData1.value = res[0].lstCity
let temp = res[0].lstSheng;
//

98
src/views/datav/MailVisits.vue

@ -363,6 +363,7 @@ import {
getMailMapIcon,
getMailTrend
} from "@/api/screen/mail.ts";
import {mapOrgNameMapping} from "@/enums/orgMapping.js";
//region
@ -453,6 +454,7 @@ const leaderViewColors = [
const fxsjFirstAndRepeatTab = ref("1");
const firstAndRepeat = ref(null)
const mailMap = ref(null);
const mailMapIconList = ref([]);
const mailTrendTabs = ref("1");
const mailTrendCard = ref(null)
const fxsjEntanglementTab = ref("1");
@ -860,7 +862,7 @@ const option3 = {
// region
const getFirstAndRepeatMailRank = async (timeValue = time.value) => {
const getFirstAndRepeatMailData = async (timeValue = time.value) => {
const res = await getFirstAndRepeatMail(timeValue)
fxjsFirstAndRepeatOverview.value = res.fxjsFirstAndRepeatOverview;
bwzdFirstAndRepeatOverview.value = res.bwzdFirstAndRepeatOverview
@ -873,11 +875,28 @@ const getFirstAndRepeatMailRank = async (timeValue = time.value) => {
bwzdLeaderViewMailList.value = res.bwzdLeaderViewRankList;
}
const getOverview = async (timeValue = time.value) => {
const getAllMailCountData = async (timeValue = time.value) => {
const res = await getAllMailCount(timeValue)
overview.value = res.overview;
}
const getTrend = async (year = selectedYear.value) => {
const getMailMapIconData = async (timeValue = time.value) => {
const res = await getMailMapIcon(timeValue);
const mappedData = mapOrgNameMapping(res.mailMapIconList, "total");
mailMapIconList.value = mappedData;
console.log(mailMapIconList)
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 getMailTrendData = async (year = selectedYear.value) => {
const res = await getMailTrend(year);
const policeList = res.policeList;
const commissionerList = res.commissionerList;
@ -901,7 +920,7 @@ const getTrend = async (year = selectedYear.value) => {
countryTrend.value.xAxis.data = countrycategories;
countryTrend.value.series[0].data = countryvalues;
}
const getEntangleMassRank = async (timeValue = time.value) => {
const getEntanglementAndMassMailData = async (timeValue = time.value) => {
const res = await getEntanglementAndMassMail(timeValue)
fxsjMailEntanglementMassOverview.value = res.fxsjMailEntanglementMassOverview;
bwzdMailEntanglementMassOverview.value = res.bwzdMailEntanglementMassOverview;
@ -914,71 +933,12 @@ const getEntangleMassRank = async (timeValue = time.value) => {
bwzdMassMailList.value = res.bwzdMassList;
}
const mailMapIconList = ref([]);
const getMailMapIconList = async (timeValue = time.value) => {
const res = await getMailMapIcon(timeValue);
const mappedData = res.mailMapIconList.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.total,
};
});
mailMapIconList.value = mappedData;
console.log(mailMapIconList)
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 getData = () => {
getFirstAndRepeatMailRank();
getOverview();
getMailMapIconList()
getTrend();
getEntangleMassRank();
getFirstAndRepeatMailData();
getAllMailCountData();
getMailMapIconData()
getMailTrendData();
getEntanglementAndMassMailData();
}
const currentLeftOverview = computed(() => {
@ -1066,7 +1026,7 @@ onMounted(() => {
});
const handleCommand = (year) => {
selectedYear.value = year;
getTrend()
getMailTrendData()
};
const handleClick = (params) => {
const departId = params.data.departId;

46
src/views/datav/SceneInsp.vue

@ -805,6 +805,7 @@ import {
import router from "@/router/index.ts";
import {circularChart, workDynamics} from "@/views/datav/simulateData/AnimationTestData.js";
import {workDynamicColorMapping} from "@/enums/workDynamicColorMapping.js";
import {mapOrgNameMapping} from "@/enums/orgMapping.js";
// region
const time = ref([
@ -1148,50 +1149,7 @@ const getSupervisionNotifyCountData = async () => {
}
const getSupervisionNotifyMapData = async () => {
const res = await getSupervisionNotifyMap(time.value);
const mappedData = res.superviseTempMapVoList.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 mappedData = mapOrgNameMapping(res.superviseTempMapVoList, "totalPro");
const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0);
const avg = total / mappedData.length; //
const range30Percent = avg * 0.3 //

10
src/views/datav/subonedatav/SubOneCaseVerif.vue

@ -612,7 +612,7 @@ const subOneCaseVerifMapAnimation = () => {
if (!mapTemp) return;
//
const mapLength = gobalTempMapVoList.value.length;
const randomNum = Math.floor(mapLength);
const randomNum = Math.floor(Math.random() * mapLength);
console.log(randomNum);
mapTemp.dispatchAction({
type: "downplay", //downplay
@ -683,7 +683,7 @@ const handleClick = (params) => {
const departId = params.data.departId;
showDialog.value = true;
tempDepartId.value = departId
clearInterval(subOneGlobalMapIntervalId);
clearInterval(subOneCaseVerifMapIntervalId);
}
const setupEventListeners = () => {
caseVerifRankAnimationStop();
@ -728,9 +728,9 @@ const subOneCaseVerifMapAnimationStop = () => {
});
//
mapTemp.on('mouseout', () => {
if ( showDialog ){
if (showDialog.value) {
clearInterval(subOneCaseVerifMapIntervalId); //
}else {
} else {
clearInterval(subOneCaseVerifMapIntervalId); //
subOneCaseVerifMapIntervalId = setInterval(subOneCaseVerifMapAnimation, 2000);
}
@ -774,8 +774,6 @@ const subOneCaseVerifJbclSituationAnimationStop = () => {
}
// endregion
</script>
<style lang="scss" scoped>

76
src/views/datav/subonedatav/SubOneMailVisits.vue

@ -365,25 +365,18 @@ import vCharts from "vue-echarts";
import changshaMap from "@/assets/data/changsha.json";
import * as echarts from "echarts/core";
import moment from "moment/moment.js";
import {
getAllMailCount,
getEntanglementAndMassMail,
getMailMapIcon,
getMailTrend
} from "@/api/screen/mail.ts";
import {getSubOneStreetMap} from "@/api/screen/subScreen/subOneGlobal.ts";
import {
getSubOneEntanglementAndMassMail,
getSubOneFirstAndRepeatMail,
getSubOneAllMailCount, getSubOneMailTrend, getSubOneMailMapIcon
getSubOneAllMailCount,
getSubOneMailTrend,
getSubOneMailMapIcon
} from "@/api/screen/subScreen/subOneMailVisits.ts";
//region
let timer;
const activeTab = ref("1");
const bwzdActiveTab = ref("1"); // tab
const activeMailTrend = ref("1"); // 访tab
const activeMailTab = ref("1");
const bwzdActiveTab = ref("1");
const activeTabRight = ref("1");
const overview = ref({
totalMail: 0,
@ -462,6 +455,7 @@ const leaderViewColors = [
percentage: 0,
},
];
const mailMapIconList = ref([]);
const subOneFxsjFirstAndRepeatTab = ref("1");
const subOneFirstAndRepeat = ref(null)
@ -487,7 +481,7 @@ const getMapJSON = async (departId = currentDepartId) => {
subOneMailMap.value.chart.setOption(option.value);
}
const getSubOneFirstAndRepeatMailRankData = async (depart = currentDepartId, timeValue = time.value) => {
const getSubOneFirstAndRepeatMailData = async (depart = currentDepartId, timeValue = time.value) => {
const res = await getSubOneFirstAndRepeatMail(depart, timeValue)
fxjsFirstAndRepeatOverview.value = res.fxjsFirstAndRepeatOverview;
bwzdFirstAndRepeatOverview.value = res.bwzdFirstAndRepeatOverview
@ -500,11 +494,33 @@ const getSubOneFirstAndRepeatMailRankData = async (depart = currentDepartId, tim
bwzdLeaderViewMailList.value = res.bwzdLeaderViewRankList;
}
const getOverviewData = async (depart = currentDepartId, timeValue = time.value) => {
const getSubOneAllMailCountData = async (depart = currentDepartId, timeValue = time.value) => {
const res = await getSubOneAllMailCount(depart, timeValue)
overview.value = res.overview;
}
const getTrendData = async (departId = currentDepartId, year = selectedYear.value) => {
const getSubOneMailMapIconData = async (departId = currentDepartId, timeValue = time.value) => {
const res = await getSubOneMailMapIcon(departId, timeValue);
const mappedData = res.mailMapIconList.map(item => {
return {
...item,
value: item.total,
};
});
mailMapIconList.value = mappedData;
console.log(mailMapIconList)
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 getSubOneMailTrendData = async (departId = currentDepartId, year = selectedYear.value) => {
const res = await getSubOneMailTrend(departId, year);
const policeList = res.policeList;
const manageList = res.manageList;
@ -540,34 +556,12 @@ const getSubOneEntangleMassRankData = async (depart = currentDepartId, timeValue
bwzdEntanglementMailList.value = res.bwzdEntanglementList;
bwzdMassMailList.value = res.bwzdMassList;
}
const mailMapIconList = ref([]);
const getMailMapIconListData = async (departId = currentDepartId, timeValue = time.value) => {
const res = await getSubOneMailMapIcon(departId, timeValue);
const mappedData = res.mailMapIconList.map(item => {
return {
...item,
value: item.total,
};
});
mailMapIconList.value = mappedData;
console.log(mailMapIconList)
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 getData = () => {
getMapJSON();
getSubOneFirstAndRepeatMailRankData();
getOverviewData();
getMailMapIconListData();
getTrendData();
getSubOneFirstAndRepeatMailData();
getSubOneAllMailCountData();
getSubOneMailMapIconData();
getSubOneMailTrendData();
getSubOneEntangleMassRankData();
}
@ -1015,7 +1009,7 @@ subOneFxsjEntanglementIntervalId = setInterval(subOneFxsjEntanglementAnimation,
// region ||||
const handleCommand = (year) => {
selectedYear.value = year;
getTrendData()
getSubOneMailTrendData()
};
// 访tab
watch(time, () => {

Loading…
Cancel
Save