Browse Source

fix:大屏修复

master
pengwei 1 month ago
parent
commit
d19e54f667
  1. 1
      src/assets/data/barkChangsha.json
  2. 2
      src/assets/data/changsha.json
  3. 3
      src/assets/data/changsha2.json
  4. 12
      src/components/police-picker.vue
  5. 26
      src/enums/JwpyOrgMapping.js
  6. 4
      src/enums/orgMapping.js
  7. 8
      src/views/Home.vue
  8. 6
      src/views/datav/Jwpy.vue
  9. 120
      src/views/datav/Lmgz.vue
  10. 5
      src/views/datav/RightsComfort.vue
  11. 11
      src/views/datav/SceneInsp.vue
  12. 4
      src/views/mobileSupervise/Inspection.vue
  13. 15
      src/views/superviseReport/superviseReport.vue

1
src/assets/data/barkChangsha.json

File diff suppressed because one or more lines are too long

2
src/assets/data/changsha.json

File diff suppressed because one or more lines are too long

3
src/assets/data/changsha2.json

@ -1272,10 +1272,11 @@
}
},
{
"type": "Feature",
"properties": {
"adcode": 430104,
"name": "岳麓区",
"name": "湘江新区",
"center": [
112.911591,
28.213044

12
src/components/police-picker.vue

@ -163,6 +163,9 @@ const props = defineProps({
},
departId: {
type: String
},
dataDepartId:{
type:String
}
});
@ -217,6 +220,15 @@ watch(()=>props.modelValue,(val)=>{
getList();
},{immediate:true,deep:true})
watch(()=>props.dataDepartId,(val)=>{
console.log('val',val)
if(val){
query.value.departId = node.id;
getList();
}
},{immediate:true,deep:true})
const changeCheck = (row)=>{
let checkIndex =checkPolices.value.map(s=>s.empNo);
if(row.isCheck){

26
src/enums/JwpyOrgMapping.js

@ -2,6 +2,20 @@
// 映射后端传来的名字和前端地图名字 jwpy
export const orgMapping = {
'长沙县公安局': '长沙县',
'芙蓉分局': '芙蓉区',
'天心分局': '天心区',
'湘江新区': '湘江新区',
'开福分局': '开福区',
'雨花分局': '雨花区',
'望城分局': '望城区',
'宁乡市公安局': '宁乡市',
'浏阳市公安局': '浏阳市',
'高新区分局': '高新区'
};
export const orgMappingTwo = {
'长沙县公安局': '长沙县',
'芙蓉分局': '芙蓉区',
'天心分局': '天心区',
@ -26,3 +40,15 @@ export function mapOrgNameMapping(backendData, valueMapping) {
};
});
}
export function mapOrgNameMappingJwpy(backendData, valueMapping) {
return backendData.map(item => {
const mappedName = orgMappingTwo[item.OrganizeName] || item.OrganizeName;
return {
...item,
originalName: item.OrganizeName, // 保留原始名称,就是后端传送的名字
name: mappedName,
value: Number(item[valueMapping] || 0), // 自定义属性
};
});
}

4
src/enums/orgMapping.js

@ -5,7 +5,7 @@ export const orgMapping = {
'长沙县局': '长沙县',
'芙蓉分局': '芙蓉区',
'天心分局': '天心区',
'岳麓分局': '岳麓区',
'湘江新区': '湘江新区',
'开福分局': '开福区',
'雨花分局': '雨花区',
'望城分局': '望城区',
@ -25,4 +25,4 @@ export function mapOrgNameMapping(backendData, valueMapping) {
value: item[valueMapping], // 自定义属性
};
});
}
}

8
src/views/Home.vue

@ -74,12 +74,16 @@ const links = [
title: "民意感知",
url: 'http://65.47.6.114:8001'
},
{
title: "政府投资",
url: 'http://65.47.6.108/invest'
},
{
title: '视频督察',
url: 'http://65.47.26.34'
},
{
title: '情指行',
title: '情指行',
url: 'http://65.32.34.30/home/ui/#/'
},
{
@ -172,4 +176,4 @@ function goQuery2(item) {
border: 1px solid #19257d;
color: var(--primary-color);
}
</style>
</style>

6
src/views/datav/Jwpy.vue

@ -228,9 +228,9 @@
<script setup>
import changshaMap from "@/assets/data/changsha.json";
import changshaMap from "@/assets/data/barkChangsha.json";
import * as echarts from "echarts/core";
import { mapOrgNameMapping } from "@/enums/JwpyorgMapping.js";
import { mapOrgNameMappingJwpy } from "@/enums/JwpyorgMapping.js";
import vCharts from "vue-echarts";
import {
@ -877,7 +877,7 @@ async function getData() {
function GetDITUFun(){
GetDITU(selectYear.value).then((res) => {
tempMap.value = res
let valData = mapOrgNameMapping(tableData2.value,"FinalRP")
let valData = mapOrgNameMappingJwpy(tableData2.value,"FinalRP")
console.log('valData',valData)
let listData = valData.sort((a, b) => b["value"]- a["value"]);
console.log('listData',listData)

120
src/views/datav/Lmgz.vue

@ -442,103 +442,87 @@ onMounted(() => {
getPoliceBRiskData(selectedMetricXFJ.value);///
});
const getTotalData = () => {
totalStatistics(time.value).then(res => {
statisticsTotal.value.aTotal = res.atotal == undefined ? 0 : res.atotal;
statisticsTotal.value.caseTotal = res.caseTotal == undefined ? 0 : res.caseTotal;
statisticsTotal.value.negativeTotal = res.negativeTotal == undefined ? 0 : res.negativeTotal;
statisticsTotal.value.peopleCount = res.peopleCount == undefined ? 0 : res.peopleCount;
statisticsTotal.value.avgPeople = res.avgPeople == undefined ? 0.0 : res.avgPeople;
})
const getTotalData = async () => {
const res = await totalStatistics(time.value);
statisticsTotal.value.aTotal = res.atotal == undefined ? 0 : res.atotal;
statisticsTotal.value.caseTotal = res.caseTotal == undefined ? 0 : res.caseTotal;
statisticsTotal.value.negativeTotal = res.negativeTotal == undefined ? 0 : res.negativeTotal;
statisticsTotal.value.peopleCount = res.peopleCount == undefined ? 0 : res.peopleCount;
statisticsTotal.value.avgPeople = res.avgPeople == undefined ? 0.0 : res.avgPeople;
}
const getAreaRiskData = (type) => {
areaRiskStatistics(time.value, type).then(res => {
areaRiskList.value = eachData(res)
})
const getAreaRiskData =async (type) => {
const res =await areaRiskStatistics(time.value, type);
areaRiskList.value = eachData(res)
}
const getPCSRiskData = (type) => {
orgRiskStatistics(time.value, type).then(res => {
pcsRiskList.value = eachData(res)
})
const getPCSRiskData =async (type) => {
const res =await orgRiskStatistics(time.value, type);
pcsRiskList.value = eachData(res)
}
const getCarRiskData = (type) => {
orgCarRiskStatistics(time.value, type).then(res => {
carRiskList.value = eachData(res)
})
const getCarRiskData =async (type) => {
const res =await orgCarRiskStatistics(time.value, type);
carRiskList.value = eachData(res)
}
const getPoliceARiskData = (type) => {
policeARiskStatistics(time.value, type).then(res => {
policeARiskList.value = eachData(res)
})
const getPoliceARiskData =async (type) => {
const res = await policeARiskStatistics(time.value, type);
policeARiskList.value = eachData(res)
}
const getPoliceBRiskData = (type) => {
policeBRiskStatistics(time.value, type).then(res => {
policeBRiskList.value = eachData(res)
})
const getPoliceBRiskData =async (type) => {
const res = await policeBRiskStatistics(time.value, type)
policeBRiskList.value = eachData(res);
}
const getLeaderRiskData = (type) => {
leaderRiskStatistics(time.value, type).then(res => {
leaderRiskList.value = eachData(res)
})
const getLeaderRiskData =async (type) => {
const res = await leaderRiskStatistics(time.value, type);
leaderRiskList.value = eachData(res);
}
const getAreaNegativeData = (type) => {
areaNegativeStatistics(time.value, type).then(res => {
areaNegativeList.value = eachData(res)
})
const getAreaNegativeData =async (type) => {
const res=await areaNegativeStatistics(time.value, type);
areaNegativeList.value = eachData(res)
}
const getOrgNegativeData = (type) => {
orgNegativeStatistics(time.value, type).then(res => {
orgNegativeList.value = eachData(res)
})
const getOrgNegativeData = async (type) => {
const res = await orgNegativeStatistics(time.value, type);
orgNegativeList.value = eachData(res);
}
const getCarOrgNegativeData = (type) => {
orgCarNegativeStatistics(time.value, type).then(res => {
orgCarNegativeList.value = eachData(res)
})
const getCarOrgNegativeData =async (type) => {
const res = await orgCarNegativeStatistics(time.value, type)
orgCarNegativeList.value = eachData(res);
}
const getPoliceANegativeData = (type) => {
policeANegativeStatistics(time.value, type).then(res => {
policeANegativeList.value = eachData(res)
})
const getPoliceANegativeData =async (type) => {
const res = await policeANegativeStatistics(time.value, type);
policeANegativeList.value = eachData(res)
}
const getPoliceBNegativeData = (type) => {
policeBNegativeStatistics(time.value, type).then(res => {
policeBNegativeList.value = eachData(res)
})
const getPoliceBNegativeData =async (type) => {
const res = await policeBNegativeStatistics(time.value, type)
policeBNegativeList.value = eachData(res)
}
const getLeaderNegativeData = (type) => {
policeLeaderNegativeStatistics(time.value, type).then(res => {
leaderNegativeList.value = eachData(res)
})
const getLeaderNegativeData =async (type) => {
const res = await policeLeaderNegativeStatistics(time.value, type);
leaderNegativeList.value = eachData(res)
}
const getAreaRateData = (type) => {
areaRateStatistics(time.value, type).then(res => {
areaRateList.value = eachData(res)
})
const getAreaRateData =async (type) => {
const res = await areaRateStatistics(time.value, type);
areaRateList.value = eachData(res)
}
const getOrgRateData = (type) => {
orgRateStatistics(time.value, type).then(res => {
orgRateList.value = eachData(res)
})
const getOrgRateData =async (type) => {
const res =await orgRateStatistics(time.value, type);
orgRateList.value = eachData(res)
}
const getCarOrgRateData = (type) => {
orgCarRateStatistics(time.value, type).then(res => {
orgCarRateList.value = eachData(res)
})
const getCarOrgRateData =async (type) => {
const res = await orgCarRateStatistics(time.value, type);
orgCarRateList.value = eachData(res)
}
const eachData = (data) => {

5
src/views/datav/RightsComfort.vue

@ -431,8 +431,9 @@ const getMapData = async (timeValue) => {
case '天心分局':
name = '天心区';
break;
case '岳麓分局':
name = '岳麓区';
case '湘江新区':
name = '湘江新区';
break;
case '开福分局':
name = '开福区';

11
src/views/datav/SceneInsp.vue

@ -494,7 +494,7 @@
<el-table-column prop="reportName" label="督察报告名称"></el-table-column>
<el-table-column prop="crtTime" label="创建时间" >
<template #default="{row}">
{{ timeFormat(row.crtTime) }}
{{ row.crtTime }}
</template>
</el-table-column>
<el-table-column prop="superviseNumber" label="督察问题数">
@ -1325,7 +1325,8 @@ const handleNegativeTable =async (row)=>{
if(row.superviseNumber > 0){
try{
negativeLoging.value=true;
await getNegativePageFun(row);
negativeQuery.value.id =row.id;
await getNegativePageFun();
negativeShow.value = true;
}catch (e){
console.log("督察问题获取失败")
@ -1333,9 +1334,9 @@ const handleNegativeTable =async (row)=>{
}
}
}
const getNegativePageFun = async (row)=>{
negativeQuery.value.id =row.id;
const res = await getNegativePageByQuery(row);
const getNegativePageFun = async ()=>{
const res = await getNegativePageByQuery(negativeQuery.value);
negativeTable.value =res.records;
negativeTotal.value = res.total;
negativeLoging.value=false;

4
src/views/mobileSupervise/Inspection.vue

@ -232,7 +232,7 @@
}"
prop="persons"
>
<police-picker v-model="form.persons"/>
<police-picker v-model="form.persons" :dataDepartId = 'userStore.user.departId'/>
</el-form-item>
<el-form-item label="督察要求" :rules="{
required: true,
@ -1882,6 +1882,8 @@ import {getTaskProblem} from "@/api/mobileSupervision/taskProblem";
import {getToken} from "@/utils/token";
import {disabledDate} from "@/utils/util";
import useUserStore from "@/stores/modules/user";
const userStore = useUserStore();
let cardContent = ref()

15
src/views/superviseReport/superviseReport.vue

@ -100,7 +100,8 @@ const handleNegativeTable =async (row)=>{
if(row.superviseNumber > 0){
try{
negativeLoging.value=true;
await getNegativePageFun(row);
negativeQuery.value.id =row.id;
await getNegativePageFun();
negativeShow.value = true;
}catch (e){
console.log("督察问题获取失败")
@ -109,14 +110,18 @@ const handleNegativeTable =async (row)=>{
}
}
const getNegativePageFun = async (row)=>{
negativeQuery.value.id =row.id;
const res = await getNegativePageByQuery(row);
const getNegativePageFun = async ()=>{
const res = await getNegativePageByQuery(negativeQuery.value);
negativeTable.value =res.records;
negativeTotal.value = res.total;
negativeLoging.value=false;
}
const closeAdd =()=>{
editRow.value={}
}
@ -256,7 +261,7 @@ function onUploadSuccess(file) {
<el-form-item label="创建单位">{{detailRow.crtDepart}}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="创建时间"> {{ timeFormat(detailRow.crtTime) }} </el-form-item>
<el-form-item label="创建时间"> {{ detailRow.crtTime }} </el-form-item>
</el-col>
</el-row>
<el-row>

Loading…
Cancel
Save