Browse Source

路由修改

main
不爱学习的石同学 11 months ago
parent
commit
594ab4ecad
  1. 3
      .idea/misc.xml
  2. 41
      src/api/mv/VideoComponent.vue
  3. 55
      src/api/mv/WebRTCService.js
  4. 12
      src/router/routes.ts
  5. 47
      src/views/datav/MailVisits.vue
  6. 1
      src/views/datav/VideoInsp.vue
  7. 735
      src/views/datav/subOnedatav/SubOneCaseVerif.vue
  8. 1360
      src/views/datav/subOnedatav/SubOneSceneInsp.vue
  9. 722
      src/views/datav/subOnedatav/SubOneVideoInsp.vue
  10. 0
      src/views/datav/subonedatav/SubOneMailVisits.vue
  11. 0
      src/views/datav/subonedatav/subOneAuditSuper.vue
  12. 0
      src/views/datav/subonedatav/subOneRightsComfort.vue

3
.idea/misc.xml

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager">
<component name="ProjectRootManager" version="2" project-jdk-name="corretto-17_12" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

41
src/api/mv/VideoComponent.vue

@ -0,0 +1,41 @@
<template>
<div>
<video ref="localVideo" autoplay></video>
<video ref="remoteVideo" autoplay></video>
<button @click="startCall">Start Call</button>
</div>
</template>
<script setup>
import { ref, onMounted } from 'vue';
import WebRTCService from "@/api/mv/WebRTCService.js";
const webrtcService = new WebRTCService();
const localVideo = ref(null);
const remoteVideo = ref(null);
const localStream = ref(null);
const remoteStream = ref(null);
onMounted(async () => {
localStream.value = await webrtcService.init();
localVideo.value.srcObject = localStream.value;
webrtcService.peer.ontrack = (event) => {
remoteStream.value = event.streams[0];
remoteVideo.value.srcObject = remoteStream.value;
};
});
const startCall = () => {
webrtcService.createOffer();
};
</script>
<style scoped>
video {
width: 45%;
height: auto;
border: 1px solid #ccc;
margin: 10px;
}
</style>

55
src/api/mv/WebRTCService.js

@ -0,0 +1,55 @@
// src/services/webrtcService.js
export default class WebRTCService {
constructor() {
this.peer = new RTCPeerConnection({
iceServers: [
{ urls: 'stun:stun.l.google.com:19302' }
]
});
this.stream = null;
this.socket = new WebSocket('ws://localhost:8080');
this.socket.onmessage = (message) => {
const data = JSON.parse(message.data);
if (data.type === 'offer') {
this.peer.setRemoteDescription(new RTCSessionDescription(data.offer));
this.createAnswer();
} else if (data.type === 'answer') {
this.peer.setRemoteDescription(new RTCSessionDescription(data.answer));
} else if (data.type === 'candidate') {
this.peer.addIceCandidate(new RTCIceCandidate(data.candidate));
}
};
this.peer.onicecandidate = (event) => {
if (event.candidate) {
this.socket.send(JSON.stringify({ type: 'candidate', candidate: event.candidate }));
}
};
this.peer.ontrack = (event) => {
const [stream] = event.streams;
this.remoteStream = stream;
};
}
async init() {
this.stream = await navigator.mediaDevices.getUserMedia({ video: true, audio: true });
this.stream.getTracks().forEach(track => this.peer.addTrack(track, this.stream));
return this.stream;
}
async createOffer() {
const offer = await this.peer.createOffer();
await this.peer.setLocalDescription(offer);
this.socket.send(JSON.stringify({ type: 'offer', offer }));
}
async createAnswer() {
const answer = await this.peer.createAnswer();
await this.peer.setLocalDescription(answer);
this.socket.send(JSON.stringify({ type: 'answer', answer }));
}
}

12
src/router/routes.ts

@ -69,7 +69,7 @@ export const routes = [
},
{
path: '/datav/subOneVideoInsp',
component: () => import('@/views/datav/subOnedatav/SubOneVideoInsp.vue'),
component: () => import('@/views/datav/subonedatav/SubOneVideoInsp.vue'),
},
{
path: '/401',
@ -77,7 +77,7 @@ export const routes = [
},
{
path: '/datav/subOneSceneInsp',
component: () => import('@/views/datav/subOnedatav/SubOneSceneInsp.vue'),
component: () => import('@/views/datav/subonedatav/SubOneSceneInsp.vue'),
},
{
path: '/datav/sub1',
@ -85,11 +85,15 @@ export const routes = [
},
{
path: '/datav/subOneCaseVerif',
component: () => import('@/views/datav/subOnedatav/SubOneCaseVerif.vue'),
component: () => import('@/views/datav/subonedatav/SubOneCaseVerif.vue'),
},
{
path: '/datav/subOneMailVisits',
component: () => import('@/views/datav/subOnedatav/SubOneMailVisits.vue'),
component: () => import('@/views/datav/subonedatav/SubOneMailVisits.vue'),
},
{
path: '/datav/test',
component: () => import('@/api/mv/VideoComponent.vue'),
},

47
src/views/datav/MailVisits.vue

@ -10,7 +10,7 @@
<el-col :span="8">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
{{ firstAndRepeatOverview.firstMail }}
{{ currentOverview.firstMail }}
</div>
<div class="descriptions_label">
初信初访
@ -20,7 +20,7 @@
<el-col :span="8">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
{{ firstAndRepeatOverview.repeatMail }}
{{ currentOverview.repeatMail }}
</div>
<div class="descriptions_label">
重复信访
@ -30,7 +30,7 @@
<el-col :span="8">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
{{ firstAndRepeatOverview.leaderMail }}
{{ currentOverview.leaderMail }}
</div>
<div class="descriptions_label">
领导接访数
@ -216,7 +216,7 @@
<el-col :span="8">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
{{ mailEntanglementMassOverview.leaderReview }}
{{ currentRightOverview.leaderReview }}
</div>
<div class="descriptions_label">
领导督办
@ -226,7 +226,7 @@
<el-col :span="8">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
{{ mailEntanglementMassOverview.entanglement }}
{{ currentRightOverview.entanglement }}
</div>
<div class="descriptions_label">
缠访闹访
@ -236,7 +236,7 @@
<el-col :span="8">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
{{ mailEntanglementMassOverview.mass }}
{{ currentRightOverview.mass }}
</div>
<div class="descriptions_label">
群体集访
@ -245,7 +245,7 @@
</el-col>
</el-row>
<datav-card>
<datav-tabs>
<datav-tabs v-model="activeTabRight">
<datav-tab-item label="分县市局" name="1">
<datav-tabs
type="bottom-button"
@ -361,8 +361,6 @@ const bwzdActiveTab = ref("1"); // 部委支队初重信tab
const activeMailTrend = ref("1"); // 访tab
const activeMailTab = ref("1");
const activeTabRight = ref("1");
const activeMailTabRight = ref("1");
const overview = ref({
totalMail: 0,
countryMail: 0,
@ -370,8 +368,12 @@ const overview = ref({
numberMail: 0,
manageMail: 0,
}); //
const firstAndRepeatOverview = ref({
const fxjsFirstAndRepeatOverview = ref({
firstMail: 0,
repeatMail: 0,
leaderMail: 0
});
const bwzdFirstAndRepeatOverview = ref({
firstMail: 0,
repeatMail: 0,
leaderMail: 0
@ -382,7 +384,12 @@ const fxsjLeaderViewMailList = ref([]); // 分局领导接访
const bwzdFirstMailList = ref([]); //
const bwzdRepeatMailList = ref([]); // 访
const bwzdLeaderViewMailList = ref([]); // 访
const mailEntanglementMassOverview = ref({
const fxsjMailEntanglementMassOverview = ref({
entanglement: 0,
mass: 0,
leaderReview: 0,
})
const bwzdMailEntanglementMassOverview = ref({
entanglement: 0,
mass: 0,
leaderReview: 0,
@ -404,9 +411,12 @@ const selectedYear = ref(currentYear); // 当前选中的年份
//endregion
// region
const getFirstAndRepeatMailRank = async (timeValue = time.value) => {
const res = await getFirstAndRepeatMail(timeValue)
firstAndRepeatOverview.value = res.firstAndRepeatOverview;
fxjsFirstAndRepeatOverview.value = res.fxjsFirstAndRepeatOverview;
bwzdFirstAndRepeatOverview.value = res.bwzdFirstAndRepeatOverview
fxsjFirstMailList.value = res.fxsjFirstRankList;
fxsjRepeatMailList.value = res.fxsjRepeatRankList;
fxsjLeaderViewMailList.value = res.fxsjLeaderViewRankList;
@ -446,7 +456,8 @@ const getTrend = async (year = selectedYear.value) => {
}
const getEntangleMassRank = async (timeValue = time.value) => {
const res = await getEntanglementAndMassMail(timeValue)
mailEntanglementMassOverview.value = res.mailEntanglementMassOverview;
fxsjMailEntanglementMassOverview.value = res.fxsjMailEntanglementMassOverview;
bwzdMailEntanglementMassOverview.value = res.bwzdMailEntanglementMassOverview;
fxsjEntanglementMailList.value = res.fxsjEntanglementList;
fxsjMassMailList.value = res.fxsjMassList;
fxsjLeaderReviewMailList.value = res.fxsjLeaderReviewList;
@ -522,6 +533,14 @@ const getData = () => {
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

1
src/views/datav/VideoInsp.vue

@ -5,6 +5,7 @@
<main>
<el-row :gutter="16">
<el-col :span="6">
<VideoComponent />
<datav-card title="内部视频">
<div class="row mt-4 mb-20">
<div class="col col-8">

735
src/views/datav/subOnedatav/SubOneCaseVerif.vue

@ -1,735 +0,0 @@
<template>
<el-scrollbar height="100vh">
<div class="wrapper">
<datav-header/>
<main>
<el-row :gutter="16">
<el-col :span="6">
<datav-card title="所队排名" subTitle="查实案件数">
<datav-tabs
type="bottom-button"
>
<datav-tab-item label="派出所" name="1">
<el-scrollbar height="350px">
<datav-chart-bar
:data="fxsjBarList"
size="large"
:color="colors"
/>
</el-scrollbar>
</datav-tab-item>
<datav-tab-item label="大队" name="2">
<el-scrollbar height="350px">
<datav-chart-bar
:data="jsdwBarList"
:max="11"
size="large"
/>
</el-scrollbar>
</datav-tab-item>
</datav-tabs>
</datav-card>
<datav-card title="案件问题性质">
<datav-tabs>
<datav-tab-item label="执法办案" name="1">
<v-charts
style="height: 320px"
:option="zfbaPieOption"
autoresize
/>
</datav-tab-item>
<datav-tab-item label="服务管理" name="2">
<v-charts
style="height: 320px"
:option="fwglPieOption"
autoresize
/>
</datav-tab-item>
<datav-tab-item label="警纪警规" name="3">
<v-charts
style="height: 320px"
:option="jgjjPieOption"
autoresize
/>
</datav-tab-item>
</datav-tabs>
</datav-card>
</el-col>
<el-col :span="12">
<datav-date-picker v-model="time"/>
<div class="flex gap-42">
<datav-statistic
:value="overview.total"
title="案件总数(起)"
style="width: 16.66%"
/>
<datav-statistic
:value="overview.confirmed"
title="查实案件数"
style="width: 16.66%"
/>
<datav-statistic
:value="overview.dealCasePro"
title="查处问题(个)"
style="width: 16.66%"
/>
<datav-statistic
:value="overview.punishPre"
title="问责人次"
style="width: 16.66%"
/>
<datav-statistic
:value="overview.punishOrg"
title="问责单位数"
style="width: 16.66%"
/>
<datav-statistic
:value="overview.rate"
value-unit="%"
title="查实率"
style="width: 16.66%"
/>
</div>
<v-charts
style="height: 420px"
:option="option"
autoresize
ref="chart"
/>
<datav-card title="查实问题趋势">
<v-charts
style="height: 320px"
:option="proTrend"
autoresize
/>
<div class="gobal-dropdown-container">
<el-dropdown class="test" @command="handleCommand">
<span class="el-dropdown-link my-gobal-yearselect">
{{ selectedYear + " 年" }}
</span>
<template #dropdown>
<el-dropdown-menu style="width: 90px">
<el-dropdown-item v-for="year in years" :key="year" :command="year">{{ year + " " }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
</datav-card>
</el-col>
<el-col :span="6">
<datav-card>
<datav-tabs>
<datav-tab-item label="案件来源占比" name="1">
<div class="mb-40">
<v-charts
style="height: 340px"
:option="ajlyPieOption"
autoresize
/>
</div>
</datav-tab-item>
<datav-tab-item label="问责处理情况" name="2">
<div class="mb-40">
<v-charts
style="height: 340px"
:option="wzclPieOption"
autoresize
/>
</div>
</datav-tab-item>
</datav-tabs>
</datav-card>
<datav-card>
<datav-tabs>
<datav-tab-item label="禁闭处理情况" name="1">
<div class="mb-40">
<v-charts
style="height: 340px"
:option="jbcloption"
autoresize
/>
</div>
</datav-tab-item>
<datav-tab-item label="停职处理情况" name="2">
<div class="mb-40">
<v-charts
style="height: 340px"
:option="tzcloption"
autoresize
/>
</div>
</datav-tab-item>
</datav-tabs>
</datav-card>
</el-col>
</el-row>
</main>
</div>
</el-scrollbar>
</template>
<script setup>
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 {
getSubOneAllCaseVerificationCount,
getSubOneCaseProblemProperty, getSubOneCaseSourceRateAndDealSituation,
getSubOneCaseVerificationRank, getSubOneCaseVerificationTrend
} from "@/api/screen/subScreen/subOneCaseVerif.ts";
const currentYear = new Date().getFullYear();
const years = ref([currentYear.toString(), (currentYear - 1).toString(), (currentYear - 2).toString()]); //
const selectedYear = ref(currentYear); //
const time = ref([
moment().startOf("year").format("YYYY-MM-DD"),
moment().format("YYYY-MM-DD"),
]);
const route = useRoute();
const currentDepartId = route.query.departId;
const chart = ref(null); //
const currentMapData = ref({}) //
const fxsjBarList = ref([]);
const jsdwBarList = ref([]);
const overview = ref({
total: 0,
confirmed: 0, //
dealCasePro: 0, //
punishPre: 0, //
punishOrg: 0, //
rate: 0, //
});
let gobalTempMapVoList = ref([]);
// region ||
const handleCommand = ( year) => {
selectedYear.value = year; //
getProTrendList(currentDepartId,year);
};
watch(time, () => {
getData();
});
onMounted(() => {
getData();
});
// 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 getRankListData = async(departId, timeValue) => {
const res = await getSubOneCaseVerificationRank(departId, timeValue);
fxsjBarList.value = res.fxsjRankList
jsdwBarList.value = res.jsdwRankList
}
const getCaseProblemPropertyList = async(departId, timeValue) => {
const res = await getSubOneCaseProblemProperty(departId,timeValue);
zfbaPieOption.value.series[0].data = res.zfbaPieList;
fwglPieOption.value.series[0].data = res.fwglPieList;
}
const getOverview = async(departId, timeValue)=>{
const res = await getSubOneAllCaseVerificationCount(departId, timeValue)
overview.value = res.overview
}
const getMapIcon = 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,
// };
// });
// gobalTempMapVoList.value = mappedData
// 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 getProTrendList= async(departId, year) => {
const res = await getSubOneCaseVerificationTrend(departId, year);
const temp = res.proTrendList;
const categories = temp.map(item => item.name);
const values = temp.map(item => item.value);
proTrend.value.xAxis.data = categories;
proTrend.value.series[0].data = values;
}
const getCaseSourceAndDeal = async (departId, timeValue)=>{
const res = await getSubOneCaseSourceRateAndDealSituation(departId, timeValue);
ajlyPieOption.value.series[0].data = res.caseSourceRateList
wzclPieOption.value.series[0].data = res.dealSituationPieList
}
// const getConfinementAndPauseList = async (timeValue)=>{
// const res = await getConfinementAndPause(timeValue);
// jbcloption.value.series[0].data = res.jbclList;
// tzcloption.value.series[0].data = res.dzclList;
// }
function getData() {
getMapJSON(currentDepartId)
getRankListData(currentDepartId,time.value)
getCaseProblemPropertyList(currentDepartId,time.value)
getOverview(currentDepartId,time.value)
getProTrendList(currentDepartId,currentYear)
getCaseSourceAndDeal(currentDepartId,time.value)
}
// endregion
echarts.registerMap("changsha", changshaMap);
const option = ref({
geo: {
// registerMap''
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.total}</span></li>
<li>查实案件数 <span>${dataItem.confirmed}</span></li>
<li>查处问题 <span>${dataItem.dealCasePro}</span></li>
<li>问责人次 <span>${dataItem.punishPre}</span></li>
<li>问责单位数 <span>${dataItem.punishOrg}</span></li>
<li>查实率 <span>${dataItem.rate}</span></li>
</ul>
</div>
</div>`;
} else {
return `<div class="tooltip">
<div class="tooltip-title">${params.name}</div>
<div class="tooltip-content">
<ul class="tooltip-ul"">
<li>案件总数 <span>-</span></li>
<li>查实案件数 <span>-</span></li>
<li>查处问题 <span>-</span></li>
<li>问责人次 <span>-</span></li>
<li>问责单位数 <span>-</span></li>
<li>查实率 <span>-</span></li>
</ul>
</div>
</div>`;
}
},
// 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: [
{gte: 0, lte: 200, label: "低于平均问题30%", color: "#4987F6"},
{gte: 200, lte: 400, label: "平均问题上下浮动30%内", color: "#F6A149"},
{gte: 400, label: "高于平均问题30%", color: "#D34343"},],
right: 10, //
realtime: false,
orient: "horizontal", //
textStyle: {
color: "#fff", //
},
calculable: true,
inRange: {
color: ["#4987F6","#F6A149", "#D34343" ],
},
},
series: [
{
name: "长沙",
type: "map",
map: "changsha",
hoverAnimation: true,
label: {
show: true,
color: "white",
},
itemStyle: {
areaColor: "#02215E", //
borderColor: "#24D2EE",
borderWidth: 1 //
},
data: [],
},
],
});
const proTrend = ref({
grid: {
left: '5%', //
right: '2%', //
top: '10%', //
bottom: '20%', //
containLabel: false //
},
xAxis: {
type: "category",
boundaryGap: true,
axisTick: {
// X线
show: false
},
data: ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月'],
},
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 ajlyPieOption = ref({
series: [
{
type: "pie",
radius: ["40%", "70%"],
label: {
color: "#fff",
},
data: [],
},
],
tooltip: {
trigger: "item",
},
});
const wzclPieOption = ref({
series: [
{
type: "pie",
radius: ["40%", "70%"],
label: {
color: "#fff",
},
data: [],
},
],
tooltip: {
trigger: "item",
},
});
const zfbaPieOption = ref({
series: [
{
type: "pie",
radius: ["40%", "70%"],
label: {
color: "#fff",
},
data: [],
},
],
tooltip: {
trigger: "item",
},
});
const fwglPieOption = ref({
series: [
{
type: "pie",
radius: ["40%", "70%"],
label: {
color: "#fff",
},
data: [],
},
],
tooltip: {
trigger: "item",
},
});
const jgjjPieOption = ref({
series: [
{
type: "pie",
radius: ["40%", "70%"],
label: {
color: "#fff",
},
data: [],
},
],
tooltip: {
trigger: "item",
},
});
const jbcloption = ref({
tooltip: {
trigger: "item",
},
series: [
{
type: "pie",
radius: ["40%", "70%"],
label: {
color: "#fff",
},
data: [
// {value: 14, name: ""},
// {value: 11, name: ""},
// {value: 3, name: ""},
// {value: 2, name: ""},
// {value: 12, name: ""},
// {value: 8, name: ""},
// {value: 2, name: ""},
// {value: 2, name: ""},
// {value: 3, name: ""},
],
},
],
});
const tzcloption = ref({
tooltip: {
trigger: "item",
},
series: [
{
type: "pie",
radius: ["40%", "70%"],
label: {
color: "#fff",
},
data: [
// {value: 14, name: ""},
// {value: 11, name: ""},
// {value: 3, name: ""},
// {value: 2, name: ""},
// {value: 12, name: ""},
// {value: 8, name: ""},
// {value: 2, name: ""},
// {value: 2, name: ""},
// {value: 3, name: ""},
],
},
],
});
const colors = [
{
color: "linear-gradient( 270deg, #FB002D 0%, #822232 100%)",
percentage: 80,
},
{
color: "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)",
percentage: 60,
},
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 40,
},
];
</script>
<style lang="scss" scoped>
@import "@/style/datav.scss";
:deep() {
//
.tooltip {
position: relative;
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: 160px;
height: 43px;
background: linear-gradient(180deg, #0A2F86 0%, #04154E 100%);
box-shadow: inset 0px -1px 0px 0px #253755;
display: flex;
justify-content: center; /* 水平居中 */
align-items: center; /* 垂直居中 */
font-weight: 400;
font-size: 16px;
color: #FFFFFF;
border-bottom: 1px solid #253755; /* 设置下边框 */
}
.tooltip-content {
width: 160px;
height: 150px;
background: linear-gradient(180deg, #010457 0%, #031577 100%)
}
.tooltip-content ul {
list-style-type: none; /* 移除默认的小圆点 */
padding-left: 5px;
margin: 0;
}
.tooltip-content ul li {
height: 24px;
color: #597AE9;
font-weight: 400;
font-size: 14px;
}
//// span
.tooltip-ul span {
float: right;
width: 55px;
color: #fff;
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; /* */
//}
}
.gobal-dropdown-container {
position: absolute;
right: 20px;
top: 15px;
}
.test {
width: 95px;
height: 25px;
background: #1C3472;
}
.gobal-dropdown-container {
position: absolute;
right: 20px;
top: 15px;
}
.my-gobal-yearselect {
font-size: 14px;
padding-top: 6px;
padding-left: 20px;
width: 90px;
color: #fff;
}
</style>

1360
src/views/datav/subOnedatav/SubOneSceneInsp.vue

File diff suppressed because it is too large Load Diff

722
src/views/datav/subOnedatav/SubOneVideoInsp.vue

@ -1,722 +0,0 @@
<template>
<el-scrollbar height="100vh">
<div class="wrapper">
<datav-header/>
<main>
<el-row :gutter="16">
<el-col :span="6">
<datav-card title="内部视频">
<div class="row mt-4 mb-20">
<div class="col col-8">
<label>视频总数</label>
<span>107</span>
</div>
<div class="col col-8">
<label>在线数</label>
<span>97</span>
</div>
<div class="col col-8">
<label>在线率</label>
<span>91%</span>
</div>
</div>
<div class="mb-12">
<video
width="100%"
height="250"
controls="controls"
autoplay
>
<source src="/mp4/1.mp4" type="video/ogg"/>
</video>
</div>
<el-row :gutter="12">
<el-col :span="8">
<img src="/imgs/datav/1.png" class="active" alt=""/>
</el-col>
<el-col :span="8">
<img src="/imgs/datav/2.jpg" alt=""/>
</el-col>
<el-col :span="8">
<img src="/imgs/datav/3.jpeg" alt=""/>
</el-col>
</el-row>
</datav-card>
<datav-card title="问题数排名" sub-title="问题数" style="height: 370px;">
<datav-tabs
type="bottom-button"
>
<datav-tab-item label="派出所" name="1">
<el-scrollbar height="280px">
<datav-chart-bar
:data="fxsjRankList"
size="large"
:color="colors"
/>
</el-scrollbar>
</datav-tab-item>
<datav-tab-item label="大队" name="2">
<el-scrollbar height="280px">
<datav-chart-bar
:data="jsdwRankList"
:max="11"
size="large"
/>
</el-scrollbar>
</datav-tab-item>
</datav-tabs>
</datav-card>
</el-col>
<el-col :span="12">
<datav-date-picker v-model="time"/>
<div class="flex gap-42">
<datav-statistic
:value="overview.discoverProblem"
title="发现问题数"
style="width: 20%"
/>
<datav-statistic
:value="overview.changedProblem"
title="整改问题数"
style="width: 20%"
/>
<datav-statistic
:value="overview.relativeOrg"
title="涉及单位数"
style="width: 20%"
/>
<datav-statistic
:value="overview.relativePer"
title="涉及人数"
style="width: 20%"
/>
<datav-statistic
:value="overview.changedRate"
value-unit="%"
title="整改率"
style="width: 20%"
/>
</div>
<v-charts
style="height: 420px"
:option="option"
autoresize
ref="subOneVideoInspMapChart"
/>
<datav-card title="问题趋势">
<v-charts
style="height: 250px"
:option="proTrend"
autoresize
/>
<div class="gobal-dropdown-container">
<el-dropdown class="test" @command="handleCommand">
<span class="el-dropdown-link my-gobal-yearselect">
{{ selectedYear + ' 年'}}
</span>
<template #dropdown>
<el-dropdown-menu style="width: 90px">
<el-dropdown-item v-for="year in years" :key="year" :command="year">{{ year + " " }}
</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
</datav-card>
</el-col>
<el-col :span="6">
<datav-card title="实时预警">
<el-scrollbar height="450px">
<div class="message message-error">
<div class="message-title">待处理</div>
<div>
芙蓉-定王台-办案区-问室 湖南省长沙市公安局芙蓉分局定王台派出所 &emsp; 民警单人询的违规问题
</div>
<div class="message-footer flex between">
<span>芙蓉分局定王台派出所</span>
<span>2024-11-18 20:12</span>
</div>
</div>
<div class="message message-info">
<div class="message-title">待处理</div>
<div>
望城-管理中心-办案区-询问室湖南省长沙市望城区公安局法制大队&emsp; 民警单人询的违规问题
</div>
<div class="message-footer flex between">
<span>望城区公安局法制大队</span>
<span>2024-11-18 19:12</span>
</div>
</div>
<div class="message">
<div class="message-title">待处理</div>
<div>
执法办案中心-询问室7湖南省长沙市公安局芙蓉分局蓉园派出所 &emsp;同时讯问多名嫌疑对象
</div>
<div class="message-footer flex between">
<span>芙蓉分局蓉园派出所</span>
<span>2024-11-18 16:12</span>
</div>
</div>
<div class="message">
<div class="message-title">待处理</div>
<div>
开福-直属-执法办案管理-讯询问室湖南省长沙市公安局开福分局法制大队 &emsp;民警单人询的违规问题
</div>
<div class="message-footer flex between">
<span>开福分局法制大队</span>
<span>2024-11-18 15:12</span>
</div>
</div>
</el-scrollbar>
</datav-card>
<datav-card title="问题类型占比">
<v-charts
style="height: 300px"
:option="ProblemTypeRateChart"
autoresize
/>
</datav-card>
</el-col>
</el-row>
</main>
</div>
</el-scrollbar>
</template>
<script setup>
import changshaMap from "@/assets/data/changsha.json";
import vCharts from "vue-echarts";
import * as echarts from "echarts/core";
import {
getVideoSuperviseMap
} from "@/api/screen/videoSupervise.ts";
import moment from "moment/moment.js";
import {getSubOneStreetMap} from "@/api/screen/sub1.ts";
import {
getSubOneAllVideoSuperviseCount,
getSubOneVideoSuperviseProblemRank, getSubOneVideoSuperviseProblemTypeRate, getSubOneVideoSuperviseTrend
} from "@/api/screen/subScreen/subOneVideoSupervise.ts";
const time = ref([
moment().startOf("year").format("YYYY-MM-DD"),
moment().format("YYYY-MM-DD"),
]);
const fxsjRankList = ref([]);
const jsdwRankList = ref([]);
const overview = ref({
discoverProblem: 0,
changedProblem: 0,
relativeOrg: 0,
relativePer: 0,
changedRate: 0,
});
const mapIconList = ref([{
originalName:"浏阳市局",
name: "浏阳市",
discoverProblem: 135,
changedProblem: 135,
relativeOrg: 89,
relativePer: 152,
changedRate: 100
}])
const currentYear = new Date().getFullYear();
const years = ref([currentYear.toString(), (currentYear - 1).toString(), (currentYear - 2).toString()]); //
const selectedYear = ref('2024'); //
const currentMapData = ref({})
const subOneVideoInspMapChart = ref(null); //
const route = useRoute();
const currentDepartId = route.query.departId;
// region
const getMapJSON = async (departId) => {
const res = await getSubOneStreetMap(departId);
currentMapData.value = res;
echarts.registerMap("changsha", res);
subOneVideoInspMapChart.value.chart.setOption(option.value);
}
const getOverview = async (departId, timeValue) => {
const res = await getSubOneAllVideoSuperviseCount(departId, timeValue);
overview.value = res.overview;
}
const getMap = async (timeValue) => {
const res = await getVideoSuperviseMap(timeValue);
// console.log(res.videoSuperviseMapIconVoList)
const mappedData = res.videoSuperviseMapIconVoList.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.discoverProblem,
};
});
const total = mappedData.reduce((sum, item) => sum + Number(item.value), 0);
const avg = total / mappedData.length; //
const range30Percent = avg*0.3 //
mapIconList.value = mappedData
option.value.series[0].data = mapIconList
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 getProblemTypeRate = async (departId, timeValue) => {
const res = await getSubOneVideoSuperviseProblemTypeRate(departId, timeValue);
ProblemTypeRateChart.value.series[0].data = res.subOneVideoSuperviseProblemTypeRate
}
const getRankList = async (departId, timeValue) => {
const res = await getSubOneVideoSuperviseProblemRank(departId, timeValue);
fxsjRankList.value = res.policeVideoSuperviseProblemRankList
jsdwRankList.value = res.teamVideoSuperviseProblemRankList
}
const getTrend = async(departId, year)=> {
const res = await getSubOneVideoSuperviseTrend(departId, year);
const temp = res.videoSuperviseTrendList;
const categories = temp.map(item => item.name);
const values = temp.map(item => item.value);
proTrend.value.xAxis.data = categories;
proTrend.value.series[0].data = values;
}
const getData = async () => {
getOverview(currentDepartId,time.value);
getRankList(currentDepartId, time.value);
// getMap(time.value)
getTrend(currentDepartId, selectedYear.value)
getProblemTypeRate(currentDepartId, time.value)
// getProblemTypeRate(time.value);
getMapJSON(currentDepartId)
}
// endregion
// region
watch(time, () => {
getData()
})
onMounted(() => {
getData()
})
const handleCommand = (year) => {
selectedYear.value = year; //
getTrend(currentDepartId, year)
};
// endregion
// region
const proTrend = ref({
xAxis: {
type: "category",
boundaryGap: true,
data: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月",],
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,
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: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
},
],
grid: {
left: '5%', //
right: '2%', //
top: '10%', //
bottom: '20%', //
containLabel: false //
},
});
echarts.registerMap("changsha", changshaMap);
const option = ref({
geo: {
map: "changsha",
},
tooltip: {
trigger: 'item',
formatter: function (params) {
const dataItem = mapIconList.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.discoverProblem}</span></li>
<li>整改问题数 <span>${dataItem.changedProblem}</span></li>
<li>涉及单位数 <span>${dataItem.relativeOrg}</span></li>
<li>涉及人数 <span>${dataItem.relativePer}</span></li>
<li>整改率 <span>${dataItem.changedRate}%</span></li>
</ul>
</div>
</div>`;
} else {
return `<div class="tooltip">
<div class="tooltip-title">${params.name}</div>
<div class="tooltip-content">
<ul class="tooltip-ul"">
<li>发现问题数 <span>-</span></li>
<li>整改问题数 <span>-</span></li>
<li>涉及单位数 <span>-</span></li>
<li>涉及人数 <span>-</span></li>
<li>整改率 <span>-</span></li>
</ul>
</div>
</div>`;
}
},
},
visualMap: {
type: "piecewise",
bottom: 10,
pieces: [
{gte: 0, lte: 200, label: "低于平均问题30%", color: "#4987F6"},
{gte: 200, lte: 400, label: "平均问题上下浮动30%内", color: "#F6A149"},
{gte: 400, label: "高于平均问题30%", color: "#D34343"},],
right: 10,
realtime: false,
orient: "horizontal",
textStyle: {
color: "#fff",
},
calculable: true,
inRange: {
color: ["#4987F6","#F6A149", "#D34343" ],
},
},
series: [
{
name: "长沙",
type: "map",
map: "changsha",
hoverAnimation: true,
label: {
show: true,
color: "white",
},
itemStyle: {
normal: {
areaColor: "#02215E",
borderColor: "#24D2EE",
borderWidth: 1 //
},
},
emphasis: {
areaColor: "#FFD700", //
borderColor: "#FF0000", //
borderWidth: 4 //
},
data: mapIconList,
}
],
})
const ProblemTypeRateChart = ref({
series: [
{
type: "pie",
radius: ["40%", "70%"],
label: {
color: "#fff",
},
data: [],
},
],
tooltip: {
trigger: "item",
},
}); //
// endregion
const colors = [
{
color: "linear-gradient( 270deg, #FB002D 0%, #822232 100%)",
percentage: 80,
},
{
color: "linear-gradient( 270deg, #FFB90E 0%, #71501D 100%)",
percentage: 60,
},
{
color: "linear-gradient( 270deg, #63E700 0%, #19674C 100%)",
percentage: 40,
},
];
</script>
<style lang="scss" scoped>
@import "@/style/datav.scss";
img {
width: 100%;
display: block;
border: 1px solid transparent;
&.active {
border-color: #1cd9ff;
}
}
.message {
padding: 10px;
margin-bottom: 10px;
background: linear-gradient(
180deg,
rgba(145, 145, 145, 0) 0%,
rgba(164, 164, 164, 0.26) 98%
);
border: 1px solid;
border-image: linear-gradient(
180deg,
rgba(255, 255, 255, 0.28),
rgba(255, 255, 255, 0.26)
) 1 1;
&.message-error {
background: linear-gradient(
180deg,
rgba(208, 18, 18, 0) 0%,
rgba(255, 0, 0, 0.26) 100%
);
border: 1px solid;
border-image: linear-gradient(
180deg,
rgba(255, 71, 71, 0.59),
rgba(251, 95, 95, 1)
) 1 1;
.message-title {
color: #ff0017;
}
}
&.message-info {
background: linear-gradient(
180deg,
rgba(18, 104, 208, 0) 0%,
rgba(0, 166, 255, 0.26) 100%
);
border: 1px solid;
border-image: linear-gradient(
180deg,
rgba(71, 209, 255, 0.28),
rgba(8, 177, 255, 1)
) 1 1;
.message-title {
color: #1cd9ff;
}
}
.message-title {
font-size: 23px;
font-weight: 700;
margin-bottom: 10px;
color: #597ae9;
}
.message-footer {
font-size: 14px;
color: #597ae9;
margin-top: 10px;
}
}
:deep() {
//
.tooltip {
position: relative;
width: 169.88px;
height: 178px;
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;
height: 43px;
background: linear-gradient(180deg, rgba(1, 4, 87, 0.8) 0%, rgba(3, 21, 119, 0.8) 100%);
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%);
}
.tooltip-content ul {
list-style-type: none; /* 移除默认的小圆点 */
padding: 0;
}
.tooltip-content ul li {
margin-left: 5px;
height: 25px;
color: #597AE9;
font-size: 13px;
}
// span
.tooltip-ul span {
float: right;
width: 30px;
text-align: right;
margin-right: 15px;
color: #fff;
font-size: 13px;
}
/* 小尖角 */
.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; /* */
}
}
.gobal-dropdown-container {
position: absolute;
right: 20px;
top: 15px;
}
.test {
width: 95px;
height: 25px;
background: #1C3472;
}
.gobal-dropdown-container {
position: absolute;
right: 20px;
top: 15px;
}
.my-gobal-yearselect {
font-size: 14px;
padding-top: 6px;
padding-left: 20px;
width: 90px;
color: #fff;
}
</style>

0
src/views/datav/subOnedatav/SubOneMailVisits.vue → src/views/datav/subonedatav/SubOneMailVisits.vue

0
src/views/datav/subOnedatav/subOneAuditSuper.vue → src/views/datav/subonedatav/subOneAuditSuper.vue

0
src/views/datav/subOnedatav/subOneRightsComfort.vue → src/views/datav/subonedatav/subOneRightsComfort.vue

Loading…
Cancel
Save