Browse Source

fix: 个人风险库/单位风险库

master
wxc 1 month ago
parent
commit
b9f0acc942
  1. 7
      src/components/comfort/dialog.vue
  2. 2
      src/components/datav/chart-bar.vue
  3. 31
      src/components/file/list.vue
  4. 453
      src/components/negativeInfo/depart-dialog.vue
  5. 60
      src/components/negativeInfo/police-dialog.vue
  6. 1168
      src/views/mobileSupervise/TaskProblem.vue
  7. 1137
      src/views/sensitivePerception/PoliceNegative.vue

7
src/components/comfort/dialog.vue

@ -72,12 +72,7 @@
<el-divider />
<template v-if="comfort.apply.isSelf === '0'">
<div class="row">
<div class="col col-6">
<label>代理人关系</label>
<span>{{
comfort.apply.relation === "1" ? "同事" : "亲属"
}}</span>
</div>
<div class="col col-6">
<label>代理人姓名</label>
<span>{{ comfort.apply.agentName }}</span>

2
src/components/datav/chart-bar.vue

@ -3,7 +3,7 @@
<span class="bar-title">{{ title }}</span>
<span class="bar-sub-title">{{ subTitle }}</span>
</div>
<div>
<div style="width:100%">
<div
class="flex v-center bar-item wrap between"
v-for="item in data"

31
src/components/file/list.vue

@ -15,7 +15,7 @@
:style="{
backgroundImage: `url(${BASE_PATH}/file/stream/${item.filePath})`,
}"
@click="filePreview(item)"
@click="filePreview(item, index)"
></div>
<a
class="remove-btn"
@ -29,7 +29,7 @@
<div
class="item flex end v-center column text-center"
:title="item.fileName"
@click="filePreview(item)"
@click="filePreview(item, index)"
v-else
>
<icon :name="getIconName(item.fileName)" :size="40" />
@ -54,8 +54,8 @@
v-for="(item, index) in files"
:key="index"
class="flex gap v-center pointer"
:active="files.indexOf(activeFile) === index"
@click="filePreview(item)"
:active="activeIndex === index"
@click="filePreview(item, index)"
>
<icon :name="getIconName(item.fileName)" :size="24" />
<span>{{ item.fileName }}</span>
@ -249,10 +249,13 @@ let moveFlag = false;
let initialX = 0;
let initialY = 0;
const fileRrror = ref(false);
const activeIndex = ref(0);
function filePreview(file) {
preview.value = true;
function filePreview(file, index) {
activeIndex.value = index;
activeFile.value = file;
console.log(activeFile.value)
preview.value = true;
rotate.value = 0;
scale.value = 1;
translateX.value = 0;
@ -271,20 +274,20 @@ function download() {
}
function prev() {
const index = props.files.indexOf(activeFile.value);
if (index === 0) {
filePreview(props.files[props.files.length - 1]);
if (activeIndex.value === 0) {
activeIndex.value = props.files.length - 1
} else {
filePreview(props.files[index - 1]);
activeIndex.value = activeIndex.value - 1;
}
filePreview(props.files[activeIndex.value], activeIndex.value);
}
function next() {
const index = props.files.indexOf(activeFile.value);
if (index === props.files.length - 1) {
filePreview(props.files[0]);
if (activeIndex.value === props.files.length - 1) {
activeIndex.value = 0;
} else {
filePreview(props.files[index + 1]);
activeIndex.value = activeIndex.value + 1
}
filePreview(props.files[activeIndex.value], activeIndex.value);
}
function wheel(event) {

453
src/components/negativeInfo/depart-dialog.vue

@ -1,307 +1,282 @@
<template>
<el-dialog
title="单位问题详情"
width="85vw"
top="1vh"
style="margin: 1vh auto"
>
<el-dialog title="单位问题详情" width="85vw" top="1vh" style="margin: 1vh auto">
<header class="flex center v-center gap">
<label>统计范围</label>
<div style="width: 320px">
<date-time-range-picker-ext
v-model="time"
@change="getProfileData"
style="width: 300px"
v-model="time"
@change="getProfileData"
style="width: 300px"
/>
</div>
<el-button type="primary" @click="getProfileData">查询</el-button>
</header>
<el-scrollbar
max-height="calc(98vh - 120px)"
v-loading="loading"
element-loading-text="单位问题详情加载中..."
max-height="calc(98vh - 120px)"
v-loading="loading"
element-loading-text="单位问题详情加载中..."
>
<main>
<el-row class="mb-20">
<el-row class="mb-20" :gutter="20">
<el-col :span="8">
<h5>单位情况</h5>
<el-row>
<el-col :span="12">
<div class="row">
<div class="col col-24">
<label>单位名称</label>
<span>{{ departInfo.name }}</span>
</div>
<div class="col col-24">
<label>所长</label>
<span>{{ departInfo.mainRole }}</span>
</div>
<div class="col col-24">
<label>副所长</label>
<span>
<span
v-for="item in departInfo.deputyRole"
:key="item"
class="mr-10"
>{{ item }}</span
>
</span>
<div class="card-item">
<el-row class="mb-10">
<el-col :span="16">
<div class="row">
<div class="col col-24">
<label>单位名称</label>
<span>{{ departInfo.name }}</span>
</div>
<div class="col col-24">
<label>所长</label>
<span>{{ departInfo.mainRole }}</span>
</div>
<div class="col col-24">
<label>副所长</label>
<span>
<span
v-for="item in departInfo.deputyRole"
:key="item"
class="mr-10"
>{{ item }}</span
>
</span>
</div>
</div>
</div>
</el-col>
<el-col :span="12" v-if="departInfo.departImg">
<img
</el-col>
<el-col :span="8" >
<div class="flex center v-center">
<img
:src="`${BASE_PATH}/file/stream/${departInfo.departImg}`"
style="max-height: 96px"
/>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<description-pair
v-if="departInfo.departImg1"
/>
</div>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<description-pair
label1="民警总人数"
label2="问题涉及民警数"
:value1="departInfo.negativePoliceSize"
:value1="departInfo.policeSize"
:value2="departInfo.negativePoliceSize"
size="large"
/>
</el-col>
<el-col :span="12">
<description-pair
/>
</el-col>
<el-col :span="12">
<description-pair
label1="协辅警人数"
label2="问题涉及协辅警数"
:value1="departInfo.negativeAuxSize"
:value1="departInfo.auxSize"
:value2="departInfo.negativeAuxSize"
size="large"
/>
</el-col>
</el-row>
/>
</el-col>
</el-row>
</div>
</el-col>
<el-col :span="8">
<h5>问题情况</h5>
<el-row
class="flex v-center"
style="height: calc(100% - 76px)"
>
<el-col :span="6" class="text-center">
<div
class="text-primary"
style="font-size: 34px"
>
{{ negativeInfo.size }}
</div>
<div>问题总数</div>
</el-col>
<el-col :span="18">
<el-row>
<el-col
:span="12"
<div class="card-item">
<el-row class="flex v-center" style="height: calc(100% - 76px)">
<el-col :span="6" class="text-center">
<div class="text-primary" style="font-size: 34px">
{{ negativeInfo.size }}
</div>
<div>问题总数</div>
</el-col>
<el-col :span="18">
<el-row>
<el-col
:span="24"
class="mb-20"
v-if="
negativeInfo.jcj110BusinessSize ||
negativeInfo.jcj110Size
"
>
<description-pair
v-if="negativeInfo.jcj110BusinessSize || negativeInfo.jcj110Size"
>
<description-pair
label1="110接处警量"
label2="110接处警问题数"
:value1="
negativeInfo.jcj110BusinessSize
"
:value1="negativeInfo.jcj110BusinessSize"
:value2="negativeInfo.jcj110Size"
/>
</el-col>
<el-col
:span="12"
v-if="
negativeInfo.jcj122BusinessSize ||
negativeInfo.jcj122Size
"
>
<description-pair
/>
</el-col>
<el-col
:span="24"
v-if="negativeInfo.jcj122BusinessSize || negativeInfo.jcj122Size"
class="mb-20"
>
<description-pair
label1="122接处警量"
label2="122接处警问题数"
:value1="
negativeInfo.jcj122BusinessSize
"
:value1="negativeInfo.jcj122BusinessSize"
:value2="negativeInfo.jcj122Size"
/>
</el-col>
<el-col :span="12">
<description-pair
/>
</el-col>
<el-col :span="24">
<description-pair
label1="执法办案"
label2="执法办案问题数"
:value1="
negativeInfo.zfbaBusinessSize
"
:value1="negativeInfo.zfbaBusinessSize"
:value2="negativeInfo.zfbaSize"
/>
</el-col>
</el-row>
</el-col>
</el-row>
/>
</el-col>
</el-row>
</el-col>
</el-row>
</div>
</el-col>
<el-col :span="8">
<h5 style="margin-bottom: 0">风险</h5>
<div class="flex center">
<h5>问题累计分</h5>
<div class="flex center card-item wrap">
<el-progress
type="dashboard"
:percentage="100"
:stroke-width="16"
:width="220"
:color="colors2"
type="dashboard"
:percentage="100"
:stroke-width="16"
:width="200"
color="#5B8FF9"
>
<div class="score-progress-body">
<div v-if="score">
<div>
<div style="font-size: 16px">分数</div>
<div>
<span
class="score-progress_score score-theme text-bold"
:type="getType(score)"
>{{ score }}</span
>
<span></span>
<span
class="score-progress_score score-theme text-bold"
style="color: #19257d"
>{{ score }}</span>
</div>
<!-- <div
style="font-size: 14px"
class="mb-16"
>
分险指标值
</div> -->
</div>
<div
v-else
style="
font-size: 60px;
line-height: 84px;
color: #999;
"
>
-
</div>
<!-- <div
class="score-progress_title score-theme"
:type="getType(score)"
>
{{ getScoreLabel() }}
</div> -->
</div>
</el-progress>
<div style="width: 100%" class="text-center">累计{{ days }}天分值</div>
</div>
</el-col>
</el-row>
<el-row class="mb-20">
<el-row class="mb-20" :gutter="20">
<el-col :span="8">
<h5>问题来源占比</h5>
<v-charts
<div class="card-item">
<v-charts
style="height: 320px"
:option="problemSourcesPieOptions"
autoresize
/>
/>
</div>
</el-col>
<el-col :span="8">
<h5>业务类型占比</h5>
<v-charts
<div class="card-item">
<v-charts
style="height: 320px"
:option="businessTypePieOptions"
autoresize
/>
/>
</div>
</el-col>
<el-col :span="8">
<h5>风险问题构成</h5>
<v-charts
<h5>问题涉及方面</h5>
<div class="card-item">
<v-charts
style="height: 320px"
:option="radarOption"
:option="problemTypePieOptions"
autoresize
/>
/>
</div>
</el-col>
</el-row>
<el-row class="mb-20" :gutter="20">
<el-col :span="8">
<h5>个人问题排名</h5>
<el-scrollbar max-height="300px">
<datav-chart-bar
size="small"
:data="policeBarList"
:color="colors"
/>
<el-empty v-if="policeBarList.length === 0"/>
</el-scrollbar>
<div class="card-item">
<el-scrollbar max-height="300px">
<datav-chart-bar size="small" :data="policeBarList" :color="colors" />
<el-empty v-if="policeBarList.length === 0" />
</el-scrollbar>
</div>
</el-col>
<el-col :span="8">
<h5>问题涉及领导</h5>
<div class="card-item">
<el-scrollbar max-height="300px">
<datav-chart-bar size="small" :data="policeLeadBarList" :color="colors" />
<el-empty v-if="policeLeadBarList.length === 0" />
</el-scrollbar>
</div>
</el-col>
<el-col :span="8">
<h5>突出问题排名</h5>
<el-scrollbar max-height="300px">
<datav-chart-bar
<div class="card-item">
<el-scrollbar max-height="300px">
<datav-chart-bar
size="small"
:data="problemTypeBarList"
:color="colors"
labelPosition="top"
/>
<el-empty v-if="problemTypeBarList.length === 0"/>
</el-scrollbar>
/>
<el-empty v-if="problemTypeBarList.length === 0" />
</el-scrollbar>
</div>
</el-col>
</el-row>
<div style="margin-top: 60px">
<div>
<h5>问题变化趋势</h5>
<v-charts
style="height: 320px"
:option="barOption"
autoresize
/>
<div></div>
<div class="card-item">
<v-charts style="height: 320px" :option="barOption" autoresize />
</div>
</div>
<h5>问题清单</h5>
<el-table :data="negativeList">
<el-table-column label="发现时间" prop="discoveryTime"/>
<el-table-column label="问题来源" prop="problemSources"/>
<el-table-column label="业务类别" prop="businessTypeName"/>
<el-table :data="negativeList" height="500">
<el-table-column label="发现时间" prop="discoveryTime" width="160" />
<el-table-column label="问题来源" prop="problemSources" width="150" />
<el-table-column label="业务类别" prop="businessTypeName" width="150" />
<el-table-column
label="问题详情"
prop="thingDesc"
show-overflow-tooltip
/>
<el-table-column
label="核查情况"
prop="checkStatusDesc"
show-overflow-tooltip
/>
<el-table-column
label="问题类型"
prop="problemType"
show-overflow-tooltip
/>
<el-table-column
label="分值"
prop="score"
width="100"
align="center"
/>
<el-table-column label="操作" width="160">
<template #default="{ row }">
<el-button
type="primary"
link
@click="handleAction(row)"
>查看详情
</el-button
>
<el-button type="primary" link @click="handleAction(row)"
>查看详情
</el-button>
</template>
</el-table-column>
</el-table>
<div class="flex end mt-8 mb-20">
<el-pagination
@size-change="getNegativeList"
@current-change="getNegativeList"
:page-sizes="[10, 20, 50, 100]"
v-model:page-size="negativeQuery.size"
v-model:current-page="negativeQuery.current"
layout="total, sizes, prev, pager, next"
:total="negativeTotal"
>
</el-pagination>
</div>
</main>
</el-scrollbar>
<negative-dialog
v-model="negativeShow"
:id="activeNegativeId"
@close="negativeShow = false"
v-model="negativeShow"
:id="activeNegativeId"
@close="negativeShow = false"
/>
</el-dialog>
</template>
<script setup>
import vCharts from "vue-echarts";
import {BASE_PATH} from "@/api/request";
import {InspectCase} from "@/enums/dictEnums";
import { BASE_PATH } from "@/api/request";
import { InspectCase } from "@/enums/dictEnums";
import {
getDepartProfile,
listNegativeMonthly,
} from "@/api/sensitivePerception/profileDepart";
import {listNegative} from "@/api/work/negative";
import { listNegative } from "@/api/work/negative";
import moment from "moment";
const props = defineProps({
@ -311,50 +286,50 @@ const props = defineProps({
});
const time = ref([
moment().subtract(12, "month").format("YYYY-MM-DD HH:mm:ss"),
moment().startOf('year').format("YYYY-MM-DD HH:mm:ss"),
moment().format("YYYY-MM-DD HH:mm:ss"),
]);
const colors = [
{color: "#5AD8A6", percentage: 40},
{color: "#F6BD16", percentage: 60},
{color: "#E8684A ", percentage: 80},
{ color: "#5AD8A6", percentage: 40 },
{ color: "#F6BD16", percentage: 60 },
{ color: "#E8684A ", percentage: 80 },
];
const colors2 = [
{color: "var(--success-color)", percentage: 60},
{color: "#DC6231", percentage: 80},
{color: "var(--danger-color)", percentage: 100},
{ color: "var(--success-color)", percentage: 60 },
{ color: "#DC6231", percentage: 80 },
{ color: "var(--danger-color)", percentage: 100 },
];
const loading = ref(false);
const departInfo = ref({});
const negativeInfo = ref({});
const negativeQuery = ref({
checkStatusList: [InspectCase.TRUE, InspectCase.TRUE],
});
const negativeList = ref([]);
const negativeTotal = ref(0);
const problemTypeBarList = ref([]);
const score = ref(0);
const days = ref(0)
async function getProfileData() {
loading.value = true;
negativeQuery.value.involveDepartId = props.departId;
getNegativeList();
const data = await getDepartProfile(props.departId, {
beginTime: time.value.length ? time.value[0] : "",
endTime: time.value.length ? time.value[1] : "",
});
score.value = Math.round(data.score);
console.log(data.expression);
console.log(data.remarks);
score.value = data.score;
days.value = data.days
negativeList.value = data.negatives;
departInfo.value = data.departInfo;
negativeInfo.value = data.negativeInfo;
problemSourcesPieOptions.value.series[0].data = data.problemSourcesList;
businessTypePieOptions.value.series[0].data = data.businessTypeList;
problemTypePieOptions.value.series[0].data = data.problemTypeList;
policeBarList.value = data.policeBarList;
policeLeadBarList.value = data.policeLeadBarList;
radarOption.value.radar.indicator = data.problemTypeRadarIndicator;
radarOption.value.series[0].data[0].value = data.problemTypeRadarData;
@ -381,23 +356,16 @@ const barOption = ref({
});
watch(
() => props.departId,
() => {
getProfileData();
listNegativeMonthly(props.departId).then((data) => {
barOption.value.xAxis.data = data.months;
barOption.value.series[0].data = data.values;
});
}
() => props.departId,
() => {
getProfileData();
listNegativeMonthly(props.departId).then((data) => {
barOption.value.xAxis.data = data.months;
barOption.value.series[0].data = data.values;
});
}
);
function getNegativeList() {
listNegative(negativeQuery.value).then((data) => {
negativeList.value = data.records;
negativeTotal.value = data.total;
});
}
const radarOption = ref({
radar: {
indicator: [],
@ -409,8 +377,8 @@ const radarOption = ref({
{
value: [],
areaStyle: {
color: 'rgba(255, 145, 124, 0.9)'
}
color: "rgba(255, 145, 124, 0.9)",
},
},
],
label: {
@ -443,8 +411,21 @@ const businessTypePieOptions = ref({
},
],
});
const problemTypePieOptions = ref({
tooltip: {
trigger: "item",
},
series: [
{
type: "pie",
radius: ["40%", "70%"],
data: [],
},
],
});
const policeBarList = ref([]);
const policeLeadBarList = ref([])
function getType(val) {
if (val < 60) {
@ -514,4 +495,12 @@ main {
color: var(--danger-color);
}
}
</style>
h5 {
margin-bottom: 12px;
}
.card-item {
background: #f9faff;
padding: 16px;
min-height: 200px;
}
</style>

60
src/components/negativeInfo/police-dialog.vue

@ -26,7 +26,7 @@
<el-row class="mb-20">
<el-col :span="8">
<h5>民警基本情况</h5>
<el-row>
<el-row >
<el-col :span="6">
<img v-if="policeInfo.avatarUrl" :src="`${BASE_PATH}/file/stream/${policeInfo.avatarUrl}`"
class="police-avatar" style="width: 94px"/>
@ -49,33 +49,33 @@
<div class="col col-24">
<label>所属单位</label>
<span>
<span
>{{
activeRow.parentDepartName
? activeRow.parentDepartName +
"/"
: activeRow.parentDepartName
}}{{
activeRow.departName
}}</span
>
</span>
<span
>{{
activeRow.parentDepartName
? activeRow.parentDepartName +
"/"
: activeRow.parentDepartName
}}{{
activeRow.departName
}}</span
>
</span>
</div>
<div class="col col-12">
<div class="col col-24">
<label>警号</label>
<span>{{ policeInfo.empNo }}</span>
</div>
<div class="col col-12">
<div class="col col-24">
<label>身份证号</label>
<span>{{ policeInfo.idCode }}</span>
</div>
<div class="col col-12">
<div class="col col-24">
<label>入职时间</label>
<span>{{
policeInfo.employmentDate || "/"
}}</span>
</div>
<div class="col col-12">
<div class="col col-24">
<label>手机号</label>
<span>{{
policeInfo.mobile || "/"
@ -99,13 +99,6 @@
{{ negativeInfo.size }}
</div>
<div class="mb-10">问题总数</div>
<div
class="text-danger"
style="font-size: 34px"
>
{{ negativeInfo.score }}
</div>
<div>风险值</div>
</el-col>
<el-col :span="18">
<el-row>
@ -166,14 +159,14 @@
:percentage="100"
:stroke-width="16"
:width="220"
:color="colors"
color="#DC6231"
>
<div class="score-progress-body">
<div v-if="score">
<div>
<span
class="score-progress_score score-theme text-bold"
:type="getType(score)"
>{{ score }}</span
>
<span></span>
@ -243,18 +236,18 @@
<div></div>
<h5>问题清单</h5>
<el-table :data="negativeList">
<el-table-column label="发现时间" prop="discoveryTime"/>
<el-table-column label="问题来源" prop="problemSources"/>
<el-table-column label="业务类别" prop="businessTypeName"/>
<el-table-column label="发现时间" prop="discoveryTime" width="160" />
<el-table-column label="问题来源" prop="problemSources" width="150" />
<el-table-column label="业务类别" prop="businessTypeName" width="150" />
<el-table-column
label="涉及单位"
prop="involveDepartName"
label="问题详情"
prop="thingDesc"
show-overflow-tooltip
/>
<el-table-column
label="核查情况"
prop="checkStatusName"
width="140"
align="center"
prop="checkStatusDesc"
show-overflow-tooltip
/>
<el-table-column label="操作" width="160">
<template #default="{ row }">
@ -521,4 +514,5 @@ main {
color: var(--danger-color);
}
}
</style>

1168
src/views/mobileSupervise/TaskProblem.vue

File diff suppressed because it is too large Load Diff

1137
src/views/sensitivePerception/PoliceNegative.vue

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save