Browse Source

11/26/17:22 现场督察的一些代码

main
parent
commit
b57ec8f469
  1. 32
      src/api/data/supervisionNotify.ts
  2. 284
      src/views/datav/Gobal.vue
  3. 2
      src/views/datav/Jwpy.vue
  4. 24
      src/views/datav/SceneInsp.vue

32
src/api/data/supervisionNotify.ts

@ -8,6 +8,16 @@ export function getAllSupervisionNotifyCount(times) {
}); });
} }
/**
*
*/
export function getProblemTypeRate(times) {
return request.get({
url: `/datav/supervisonNotify/getProblemTypeRate?beginTime=${times[0]}&endTime=${times[1]}`
});
}
export function getChangedRank(times, groupType) { export function getChangedRank(times, groupType) {
@ -23,3 +33,25 @@ export function getSupervisionTrend(year) {
url: `/datav/supervisonNotify/getSupervisionTrend?year=${year}` url: `/datav/supervisonNotify/getSupervisionTrend?year=${year}`
}); });
} }
/**
*
*/
export function getMap(times) {
return request.get({
url: `/datav/supervisonNotify/getMap?beginTime=${times[0]}&endTime=${times[1]}`
});
}
/**
*
*/
export function getYellowBetDrug(times) {
return request.get({
url: `/datav/supervisonNotify/getYellowBetDrug?beginTime=${times[0]}&endTime=${times[1]}`
});
}

284
src/views/datav/Gobal.vue

@ -139,14 +139,14 @@ import vCharts from "vue-echarts";
import changshaMap from "@/assets/data/changsha.json"; 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 {getCaseVerifData} from "@/api/datav";
import { import {
getAllGobalCount, getAllGobalCount,
getBusinessRate, getBusinessRate,
getGobalRecentlyTrendByMonth, getGobalRecentlyTrendByMonth,
getOrganizationRank, getProblemBusinessRate, getStrongProblemRate, getGobalMap getOrganizationRank, getProblemBusinessRate, getStrongProblemRate, getGobalMap
} from "@/api/data/basicScreen.ts"; } from "@/api/data/basicScreen.ts";
// region
// region
const activeOrgTab = ref("1"); const activeOrgTab = ref("1");
const fxsjlist = ref([]); // const fxsjlist = ref([]); //
const jsdwlist = ref([]); // const jsdwlist = ref([]); //
@ -176,15 +176,137 @@ const gobalTempMapVoList = ref([
"reviewPro": 11 "reviewPro": 11
} }
]); // ]); //
const router = useRouter(); const router = useRouter();
const years = ref(['2024', '2023', '2022']); // const years = ref(['2024', '2023', '2022']); //
const selectedYear = ref('2024'); // const selectedYear = ref('2024'); //
// endregion // endregion
function go() {
router.push("/datav/sub1")
}
// region
//
const zfbaPieOption = computed(() => {
return {
tooltip: {
trigger: "item",
},
series: [
{
type: "pie",
radius: ["40%", "70%"],
label: {
color: "#fff",
},
data: ywzblist.value,
},
],
};
});
//
const wtlxPieOption = computed(() => {
return {
tooltip: {
trigger: "item",
},
series: [
{
type: "pie",
radius: ["40%", "70%"],
label: {
color: "#fff",
},
data: wtlxlist.value,
// region线 },
],
};
});
//
echarts.registerMap("changsha", changshaMap);
const option = ref({
geo: {
map: "changsha",
},
tooltip: {
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>
</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>0</span></li>
<li>督察问题 <span>0</span></li>
<li>案件核查问题 <span>0</span></li>
<li>信访投诉问题 <span>0</span></li>
<li>民意感知问题 <span>0</span></li>
</ul>
</div>
</div>`;
}
},
},
visualMap: {
type: "piecewise",
bottom: 10,
pieces: [
{min: 0, max: 500, label: "问题数低于500", color: "#4987F6"},
{min: 501, max: 1000, label: "问题数介于500-1000", color: "#F6A149"},
{min: 1001, label: "问题数高于1000", color: "#D34343"},
],
right: 10,
realtime: false,
orient: "horizontal",
textStyle: {
color: "#fff",
},
calculable: true,
},
series: [
{
name: "长沙",
type: "map",
map: "changsha",
hoverAnimation: true,
label: {
show: true,
color: "white",
},
itemStyle: {
normal: {
areaColor: "#02215E",
borderColor: "#1773c3",
},
},
emphasis: {
areaColor: "#FFD700", //
borderColor: "#FF0000", //
borderWidth: 4 //
},
data: []
}
],
})
// 线
const proTrend = ref({ const proTrend = ref({
grid: { grid: {
left: '10%', // left: '10%', //
@ -243,60 +365,6 @@ const proTrend = ref({
}, },
], ],
}); });
const handleCommand = (year) => {
selectedYear.value = year; //
getGobalRecentlyTrendByMonth(year).then(res => {
proTrend.value.xAxis.data = res.monthList;
proTrend.value.series[0].data = res.totalList;
});
};
// endregion
function go() {
router.push("/datav/sub1")
}
// region
//
const zfbaPieOption = computed(() => {
return {
tooltip: {
trigger: "item",
},
series: [
{
type: "pie",
radius: ["40%", "70%"],
label: {
color: "#fff",
},
data: ywzblist.value,
},
],
};
});
//
const wtlxPieOption = computed(() => {
return {
tooltip: {
trigger: "item",
},
series: [
{
type: "pie",
radius: ["40%", "70%"],
label: {
color: "#fff",
},
data: wtlxlist.value,
},
],
};
});
// endregion // endregion
// region // region
@ -322,8 +390,7 @@ function getData() {
wtlxlist.value = res.wtlxlist; wtlxlist.value = res.wtlxlist;
}); });
getGobalMap(time.value).then(res => { getGobalMap(time.value).then(res => {
//
//
const mappedData = res.gobalTempMapVoList.map(item => { const mappedData = res.gobalTempMapVoList.map(item => {
let name; let name;
switch (item.name) { switch (item.name) {
@ -372,100 +439,25 @@ function getData() {
option.value.series[0].data = mappedData; option.value.series[0].data = mappedData;
}) })
} }
onMounted(() => { onMounted(() => {
getData(); getData();
}); });
// endregion
// region ||
const handleCommand = (year) => {
selectedYear.value = year; //
getGobalRecentlyTrendByMonth(year).then(res => {
proTrend.value.xAxis.data = res.monthList;
proTrend.value.series[0].data = res.totalList;
});
};
watch(time, () => { watch(time, () => {
getData(); getData();
}); });
// endregion // endregion
// region
echarts.registerMap("changsha", changshaMap);
const option = ref(
{
geo: {
map: "changsha",
},
tooltip: {
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>
</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>0</span></li>
<li>督察问题 <span>0</span></li>
<li>案件核查问题 <span>0</span></li>
<li>信访投诉问题 <span>0</span></li>
<li>民意感知问题 <span>0</span></li>
</ul>
</div>
</div>`;
}
},
},
visualMap: {
type: "piecewise",
bottom: 10,
pieces: [
{min: 0, max: 500, label: "问题数低于500", color: "#4987F6"},
{min: 501, max: 1000, label: "问题数介于500-1000", color: "#F6A149"},
{min: 1001, label: "问题数高于1000", color: "#D34343"},
],
right: 10,
realtime: false,
orient: "horizontal",
textStyle: {
color: "#fff",
},
calculable: true,
},
series: [
{
name: "长沙",
type: "map",
map: "changsha",
hoverAnimation: true,
label: {
show: true,
color: "white",
},
itemStyle: {
normal: {
areaColor: "#02215E",
borderColor: "#1773c3",
},
},
emphasis: {
areaColor: "#FFD700", //
borderColor: "#FF0000", //
borderWidth: 4 //
},
data: []
}
],
})
// endregion
const colors = [ const colors = [
{ {

2
src/views/datav/Jwpy.vue

@ -706,7 +706,7 @@ onMounted(async () => {
task.value = content.value[0].ID; task.value = content.value[0].ID;
} }
// //
// await getData(); await getData();
}); });

24
src/views/datav/SceneInsp.vue

@ -257,7 +257,12 @@ import vCharts from "vue-echarts";
import changshaMap from "@/assets/data/changsha.json"; import changshaMap from "@/assets/data/changsha.json";
import * as echarts from "echarts/core"; import * as echarts from "echarts/core";
import moment from "moment"; import moment from "moment";
import {getAllSupervisionNotifyCount, getChangedRank, getSupervisionTrend} from "@/api/data/supervisionNotify.ts"; import {
getAllSupervisionNotifyCount,
getChangedRank,
getMap, getProblemTypeRate,
getSupervisionTrend, getYellowBetDrug
} from "@/api/data/supervisionNotify.ts";
import {getGobalRecentlyTrendByMonth} from "@/api/data/basicScreen.ts"; import {getGobalRecentlyTrendByMonth} from "@/api/data/basicScreen.ts";
const data1 = ref([]); const data1 = ref([]);
@ -573,8 +578,8 @@ function getData() {
getChangedRank(time.value, 3).then((res) => { getChangedRank(time.value, 3).then((res) => {
rankOverview.value = res.rankOverview; rankOverview.value = res.rankOverview;
data1.value = res.changedRankList; data1.value = res.changedRankList;
// option2.series[0].data = res.wtlxList;
}); });
getSupervisionTrend(new Date().getFullYear()).then((res) => { getSupervisionTrend(new Date().getFullYear()).then((res) => {
const supervisionTrend = res.supervisionTrend; const supervisionTrend = res.supervisionTrend;
const categories = supervisionTrend.map(item => item.name); const categories = supervisionTrend.map(item => item.name);
@ -585,6 +590,21 @@ function getData() {
}); });
// getMap(time.value).then((res)=> {
// superviseTempMapVoList = res.superviseTempMapVoList;
// })
//
//
// getProblemTypeRate(time.value).then((res) => {
// wtlxList.value = res.wtlxList
// });
//
//
// getYellowBetDrug().then((res) => {
// hddOverview.value = res.hddOverview;
// hddList.value = res.hddList
// });
} }
watch(time, () => { watch(time, () => {

Loading…
Cancel
Save