Browse Source

fix:1、民意感知地图三色

master
pengwei 4 months ago
parent
commit
a3c63e1394
  1. 10
      src/components/home/work/my-todo.vue
  2. 28
      src/enums/JwpyOrgMapping.js
  3. 4
      src/views/Login.vue
  4. 43
      src/views/datav/Jwpy.vue
  5. 3
      src/views/datav/SceneInsp.vue

10
src/components/home/work/my-todo.vue

@ -26,7 +26,7 @@
>问题下发</el-button
>
</div>
<div class="table-container">
<div class="table-container" style="height: 500px;overflow-x: auto">
<el-table :data="todos">
<el-table-column type="expand">
<template #default="{ row }">
@ -113,7 +113,7 @@
width="100"
align="center"
/>
<el-table-column label="办理状态" width="140" align="center">
<el-table-column label="办理状态" width="110" align="center">
<template #default="{ row }">
<el-tag
>{{
@ -129,7 +129,7 @@
>
</template>
</el-table-column>
<el-table-column label="流程节点" width="120" show-overflow-tooltip>
<el-table-column label="流程节点" width="100" show-overflow-tooltip>
<template #default="{ row }">
<span>{{
flowNodes.filter(
@ -240,7 +240,7 @@ const addShow = ref(false);
function handleUpdate() {
emit('update')
}
</script>
<style lang="scss" scoped>
@ -249,4 +249,4 @@ function handleUpdate() {
top: 0;
right: 0;
}
</style>
</style>

28
src/enums/JwpyOrgMapping.js

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

4
src/views/Login.vue

@ -15,7 +15,7 @@
:rules="rules"
>
<h1>用户登录</h1>
<el-form-item prop="account">
<el-form-item prop="account" >
<el-input
v-model.trim="formData.account"
placeholder="请输入身份证/警号"
@ -180,4 +180,4 @@ async function szzsLogin() {
height: 20px;
color: var(--danger-color);
}
</style>
</style>

43
src/views/datav/Jwpy.vue

@ -43,29 +43,6 @@
<datav-card title="单位满意率">
<el-container>
<!-- <el-header>-->
<!-- <div style="background-color:#04144E; ">-->
<!-- &lt;!&ndash; 市州考评&ndash;&gt;-->
<!-- <el-table-->
<!-- :data="tableData1"-->
<!-- height="70"-->
<!-- :style="{ width: '100%', marginTop: '10px', fontSize: fontSize + 'px' }"-->
<!-- :header-cell-style="headerCellStyle"-->
<!-- :row-style="tableRowStyleTableData1"-->
<!-- :show-summary='false'-->
<!-- :highlight-current-row='false'-->
<!-- >-->
<!-- <el-table-column prop="OrganizeName" label="市州考评" />-->
<!-- <el-table-column prop="FinalRP" label="滿意度" width="66px"/>-->
<!-- <el-table-column prop="TBRp" label="上期满意度" width="66px"/>-->
<!-- <el-table-column prop="TBRpts" label="同比上期" width="66px">-->
<!-- <template v-slot="scope">-->
<!-- <span :style="getCellStyle(scope.row.TBRpts)">{{ scope.row.TBRpts }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </div>-->
<!-- </el-header>-->
<el-main>
<div style="background-color:#04144E; ">
<!-- 县市考评-->
@ -271,6 +248,8 @@
<script setup>
import changshaMap from "@/assets/data/changsha.json";
import * as echarts from "echarts/core";
import { mapOrgNameMapping } from "@/enums/JwpyorgMapping.js";
import vCharts from "vue-echarts";
import {
GetBMYYBQS,
@ -460,9 +439,9 @@ const option = ref({
type: "piecewise",
bottom: 10,
pieces: [
{min: 0, max: 500, label: "问题数低于500", color: "#F6A149"},
{min: 501, max: 1000, label: "问题数介于500-1000", color: "#F6A149"},
{min: 1001, label: "问题数高于1000", color: "#D34343"},
{gte: 0, lte: 200, label: "满意度前三", color: "#4987F6"},
{gte: 200, lte: 400, label: "满意度一般", color: "#F6A149"},
{gte: 400, label: "满意度较差", color: "#D34343"},
],
right: 10,
realtime: false,
@ -906,10 +885,20 @@ async function getData() {
//
GetDITU(selectYear.value).then((res) => {
tempMap.value = res
let valData = mapOrgNameMapping(tableData2.value,"FinalRP")
let listData = valData.sort((a, b) => b["value"] - a["value"]);
option.value.visualMap.pieces=[
{min: listData[2].value, max: listData[0].value, label: "满意度前三", color: "#4987F6"},
{gte: listData[6].value, lte: listData[3].value, label: "满意度中等", color: "#F6A149"},
{gte: listData[listData.length - 1], label: "满意度较差", color: "#D34343"},
]
mapDataList.value = tempMap.value.map(org => {
return {name: org.OrganizeName, value: org.OrganizeID};
})
option.value.series.data = mapDataList.value
option.value.series.data =listData
console.log('tempMap.value',tempMap.value)
});

3
src/views/datav/SceneInsp.vue

@ -223,6 +223,7 @@
autoresize
@click="handleClick"
ref="sceneMap"
/>
<datav-card title="问题趋势">
<v-charts
@ -997,6 +998,7 @@ const getSupervisionNotifyMapData = async () => {
},
];
superviseTempMapVoList.value = mappedData;
console.log('mappedData',mappedData)
option.value.series[0].data = mappedData;
};
const getSupervisionTrendData = async () => {
@ -1162,6 +1164,7 @@ const handleCommand = (year) => {
};
const handleClick = (params) => {
console.log('params',params)
const departId = params.data.departId;
const url = router.resolve({
path: "/datav/subOneSceneInsp",

Loading…
Cancel
Save