Browse Source

fit: BUG修复

main
wxc 1 year ago
parent
commit
4f40f00353
  1. 8
      src/api/sensitivePerception/riskClue.ts
  2. 1
      src/components/date-time-range-picker-ext.vue
  3. 8
      src/components/description-pair.vue
  4. 12
      src/components/model-risk-tree.vue
  5. 7
      src/components/model-tree.vue
  6. 16
      src/components/negative/verify.vue
  7. 3
      src/style/public.scss
  8. 13
      src/views/sensitivePerception/DepartNegative.vue
  9. 44
      src/views/sensitivePerception/Model.vue
  10. 134
      src/views/sensitivePerception/PoliceNegative.vue
  11. 154
      src/views/sensitivePerception/RiskClue.vue
  12. 128
      src/views/sensitivePerception/RiskPersonnel.vue
  13. 2
      src/views/sensitivePerception/RiskScoreRule.vue
  14. 59
      src/views/work/NegativeImport.vue

8
src/api/sensitivePerception/riskClue.ts

@ -0,0 +1,8 @@
import request from "@/api/request";
export function listRiskClues(query) {
return request.get({
url: `/risk/clues`,
query
});
}

1
src/components/date-time-range-picker-ext.vue

@ -5,6 +5,7 @@
end-placeholder="结束时间"
value-format="YYYY-MM-DD HH:mm:ss"
:shortcuts="shortcuts"
:unlink-panels="true"
/>
</template>
<script setup>

8
src/components/description-pair.vue

@ -5,13 +5,17 @@
<span class="value2">{{ value2 }}</span>
</div>
<div class="text-center description-label" :size="size">
<span v-if="value1">{{ label1 }}</span>
<span v-if="value1">{{ label }}{{ label1 }}</span>
<span v-if="value1">/</span>
<span>{{ label2 }}</span>
<span>{{ label }}{{ label2 }}</span>
</div>
</template>
<script setup>
defineProps({
label: {
type: String,
default: "",
},
label1: {
type: String,
default: "",

12
src/components/model-risk-tree.vue

@ -13,6 +13,7 @@
:default-expanded-keys="[ROOT_ID]"
:props="{
label: 'riskName',
value: 'id'
}"
:filter-node-method="filterNode"
@node-click="handleClick"
@ -113,13 +114,10 @@ function handleClick(node) {
}
function getModelId(arr, node) {
if (node.type === "model") {
arr.push(node.value);
} else if (node.children && node.children.length) {
node.children.forEach((item) => {
getModelId(arr, item);
});
}
arr.push(node.id);
node.children.forEach((item) => {
getModelId(arr, item);
});
}
</script>
<style lang="scss" scoped>

7
src/components/model-tree.vue

@ -76,6 +76,13 @@ function renderContent(
title: node.label,
},
node.label
),
h(
"span",
{
class: 'ml-8 text-primary'
},
node.data.size ? `(${node.data.size })` : ''
)
);
}

16
src/components/negative/verify.vue

@ -144,6 +144,22 @@
v-model="form.checkStatusDesc"
/>
</el-form-item>
<el-form-item
label="问题整改情况"
prop="rectifyDesc"
v-if="form.checkStatus === InspectCase.TRUE"
:rules="{
required: true,
message: '请输入问题整改情况',
trigger: ['blur'],
}"
>
<el-input
type="textarea"
placeholder="请输入问题整改情况"
v-model="form.rectifyDesc"
/>
</el-form-item>
<div
v-if="form.accountabilityTarget !== AccountabilityTarget.DEPARTMENT"

3
src/style/public.scss

@ -327,12 +327,13 @@ svg+span {
.row {
display: flex;
flex-wrap: wrap;
--label-width: 100px;
.col {
margin-bottom: 12px;
}
}
.col {
--label-width: 100px;
--gap-width: 10px;
display: flex;
gap: var(--gap-width);

13
src/views/sensitivePerception/DepartNegative.vue

@ -91,7 +91,7 @@
/>
<el-table-column label="风险指数" align="center" width="160">
<template #default="{ row }">
<span :type="getType(score)" class="score-theme" v-if="row.score">{{ Math.round(row.score) }}</span>
<span :style="{color: getColor(score)}" v-if="row.score">{{ Math.round(row.score) }}</span>
<span v-else>-</span>
</template>
</el-table-column>
@ -634,6 +634,17 @@ function getScoreLabel() {
}
return "高风险";
}
function getColor(val) {
if (val < 60) {
return "var(--success-color)";
}
if (val < 80) {
return "#e87749";
}
return "var(--danger-color)";
}
</script>
<style lang="scss" scoped>
main {

44
src/views/sensitivePerception/Model.vue

@ -533,20 +533,12 @@
</div>
</div>
<div class="flex end mb-20">
<el-button
type="primary"
plain
@click="
router.push({
path: `/sensitivePerception/modelClue`,
query: {
modelId: activeModel.id,
},
})
"
>查看线索数据</el-button
>
<el-button
<el-button type="primary" plain @click="goClue">{{
activeModel.classId === GRJDBLFX_CLASS_ID
? "查看风险问题"
: "查看线索数据"
}}</el-button>
<!-- <el-button
type="primary"
plain
@click="handleDetailConfigShow"
@ -555,7 +547,7 @@
<icon name="el-icon-Edit" />
</template>
线索详细信息配置</el-button
>
> -->
</div>
</el-col>
</el-row>
@ -617,9 +609,7 @@ import {
import { WEEKS } from "@/enums/appEnums";
import { MENU_ROOT_ID } from "@/enums/appEnums";
import { listModelClass } from "@/api/sensitivePerception/modelClass";
import {
listRiskScoreRuleTree
} from "@/api/sensitivePerception/riskScoreRule";
import { listRiskScoreRuleTree } from "@/api/sensitivePerception/riskScoreRule";
import {
addModel,
updateModel,
@ -763,6 +753,24 @@ async function handleDetailConfigShow() {
}
detailConfigShow.value = true;
}
function goClue() {
if (activeModel.value.classId === GRJDBLFX_CLASS_ID) {
router.push({
path: `/sensitivePerception/riskClue`,
query: {
riskScoreRuleId: activeModel.value.riskScoreRuleId,
},
});
} else {
router.push({
path: `/sensitivePerception/modelClue`,
query: {
modelId: activeModel.value.id,
},
});
}
}
</script>
<style lang="scss" scoped>
.menu {

134
src/views/sensitivePerception/PoliceNegative.vue

@ -6,12 +6,30 @@
<el-col :span="6">
<el-form-item label="单位分组">
<el-select v-model="query.departGroupId" clearable>
<el-option value="10" label="派出所"></el-option>
<el-option value="11" label="交警大队"></el-option>
<el-option value="13" label="刑侦大队"></el-option>
<el-option value="14" label="禁毒大队"></el-option>
<el-option value="15" label="治安大队"></el-option>
<el-option value="16" label="人境大队"></el-option>
<el-option
value="10"
label="派出所"
></el-option>
<el-option
value="11"
label="交警大队"
></el-option>
<el-option
value="13"
label="刑侦大队"
></el-option>
<el-option
value="14"
label="禁毒大队"
></el-option>
<el-option
value="15"
label="治安大队"
></el-option>
<el-option
value="16"
label="人境大队"
></el-option>
<el-option value="12" label="其他"></el-option>
</el-select>
</el-form-item>
@ -104,7 +122,11 @@
/>
<el-table-column label="风险指数" align="center" width="160">
<template #default="{ row }">
<span :type="getType(score)" class="score-theme" v-if="row.score">{{ Math.round(row.score) }}</span>
<span
:style="{color: getColor(score)}"
v-if="row.score"
>{{ Math.round(row.score) }}</span
>
<span v-else>-</span>
</template>
</el-table-column>
@ -200,6 +222,10 @@
<label>警号</label>
<span>{{ policeInfo.empNo }}</span>
</div>
<div class="col col-12">
<label>身份证号</label>
<span>{{ policeInfo.idCode }}</span>
</div>
<div class="col col-12">
<label>入职时间</label>
<span>{{
@ -227,9 +253,16 @@
class="text-primary"
style="font-size: 34px"
>
{{ activeRow.verifySize }}
{{ negativeInfo.size }}
</div>
<div>问题总数</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>
@ -242,8 +275,9 @@
"
>
<description-pair
label1="110接处警量"
label2="110接处警问题数"
label="110接处警"
label1="量"
label2="问题数"
:value1="
negativeInfo.jcj110BusinessSize
"
@ -258,8 +292,9 @@
"
>
<description-pair
label1="122接处警量"
label2="122接处警问题数"
label="122接处警"
label1="量"
label2="问题数"
:value1="
negativeInfo.jcj122BusinessSize
"
@ -268,8 +303,8 @@
</el-col>
<el-col :span="12">
<description-pair
label1="执法办案"
label2="执法办案问题数"
label="执法办案"
label2="问题数"
:value1="
negativeInfo.zfbaBusinessSize
"
@ -304,7 +339,7 @@
style="font-size: 14px"
class="mb-16"
>
分险指标值
风险指数
</div>
</div>
<div
@ -338,20 +373,22 @@
/>
</el-col>
<el-col :span="8">
<h5>业务类型占比</h5>
<h5>问题类型占比</h5>
<v-charts
style="height: 320px"
:option="businessTypePieOptions"
:option="problemTypePieOptions"
autoresize
/>
</el-col>
<el-col :span="8">
<h5>风险构成</h5>
<v-charts
style="height: 320px"
:option="radarOption"
autoresize
/>
<h5 style="margin-bottom: 0">风险构成</h5>
<div class="flex center">
<v-charts
style="height: 340px; width: 280px"
:option="radarOption"
autoresize
/>
</div>
</el-col>
</el-row>
@ -410,7 +447,6 @@
:id="activeNegativeId"
@close="negativeShow = false"
/>
</template>
<script lang="ts" setup>
import vCharts from "vue-echarts";
@ -435,7 +471,6 @@ const query = ref({
moment().startOf("year").format("YYYY-MM-DD HH:mm:ss"),
moment().format("YYYY-MM-DD HH:mm:ss"),
],
departGroupId: '10'
});
const list = ref<any[]>([]);
const total = ref(0);
@ -458,7 +493,6 @@ function reset() {
moment().startOf("year").format("YYYY-MM-DD HH:mm:ss"),
moment().format("YYYY-MM-DD HH:mm:ss"),
],
departGroupId: '10'
};
getList();
}
@ -491,7 +525,7 @@ const problemSourcesPieOptions = ref({
},
],
});
const businessTypePieOptions = ref({
const problemTypePieOptions = ref({
tooltip: {
trigger: "item",
},
@ -541,6 +575,10 @@ watch(activeRow, async () => {
const time = ref([]);
const radarOption = ref({
color: ["#F60000", "#162582"],
legend: {
data: ["风险指数", "权重"],
},
radar: {
indicator: [
{ name: "110接处警", max: 100 },
@ -551,28 +589,27 @@ const radarOption = ref({
{ name: "执法办案", max: 100 },
{ name: "专项工作", max: 100 },
{ name: "安保维稳", max: 100 },
{ name: "治安防控", max: 100 },
{ name: "行政管理", max: 100 },
{ name: "服务基层", max: 100 },
{ name: "队伍管理", max: 100 },
{ name: "其他", max: 100 },
],
},
series: [
{
type: "radar",
data: [
{
value: [0, 0, 80, 31, 0, 0, 31, 0, 0],
value: [],
name: "风险指数",
label: {
show: true,
},
},
{
value: [0, 0, 61, 21, 0, 0, 10, 0, 0],
value: [],
name: "权重",
label: {
show: true,
},
},
],
label: {
show: true,
},
},
],
});
@ -592,10 +629,12 @@ async function getProfileData() {
policeInfo.value = data.policeInfo;
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;
// radarOption.value.radar.indicator = data.problemTypeRadarIndicator;
// radarOption.value.series[0].data[0].value = data.problemTypeRadarData;
radarOption.value.radar.indicator = data.businessTypeRadarIndicator;
radarOption.value.series[0].data[0].value = data.businessTypeScoreRadarData;
radarOption.value.series[0].data[1].value =
data.businessTypeWeightRadarData;
loading.value = false;
}
@ -635,6 +674,17 @@ function getType(val) {
}
return "danger";
}
function getColor(val) {
if (val < 60) {
return "var(--success-color)";
}
if (val < 80) {
return "#e87749";
}
return "var(--danger-color)";
}
function getScoreLabel() {
if (score.value === 0) {
return "无法预测";

154
src/views/sensitivePerception/RiskClue.vue

@ -2,48 +2,44 @@
<div class="container h100">
<el-row :gutter="20" class="h100">
<el-col :span="6" class="h100">
<model-risk-tree v-model="query.modelIds" />
<model-risk-tree v-model="query.riskScoreRuleId" />
</el-col>
<el-col :span="18">
<header>
<el-form :label-width="140">
<el-row>
<el-col :span="8">
<el-form-item label="预警时间">
<el-form-item label="发生时间">
<date-time-range-picker-ext
v-model="query.createTime"
v-model="query.eventTime"
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="涉及单位">
<depart-tree-select
v-model="query.involveDepartId"
:check-strictly="false"
<el-form-item label="姓名">
<el-input
placeholder="请输入"
v-model="query.name"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="预警内容">
<el-form-item label="身份证号">
<el-input
placeholder="请输入"
v-model="query.thingDesc"
v-model="query.idCode"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="分发状态">
<el-select
v-model="query.distributionState"
<el-form-item label="风险内容">
<el-input
placeholder="请输入"
v-model="query.thingDesc"
clearable
>
<el-option
v-for="item in dict.distributionState"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
/>
</el-form-item>
</el-col>
</el-row>
@ -60,75 +56,42 @@
</div>
</div>
</header>
<div class="table-container">
<div class="table-container" v-loading="loading">
<el-table :data="list">
<el-table-column
label="预警时间"
prop="createTime"
label="发生时间"
prop="eventTime"
width="180"
/>
<el-table-column
label="姓名"
prop="name"
width="150"
/>
<!-- <el-table-column-->
<!-- label="预警模型"-->
<!-- prop="modelName"-->
<!-- width="160"-->
<!-- show-overflow-tooltip-->
<!-- />-->
<el-table-column
label="涉及单位"
show-overflow-tooltip
width="200"
>
<template #default="{ row }">
<span>{{ row.involveParentDepartName }}</span><span v-if="row.involveDepartName"><br>{{ row.involveDepartName }}</span>
</template>
</el-table-column>
<el-table-column
label="涉及人员"
prop="involvePoliceName"
width="100"
>
<template #default="{ row }">
<div v-if="row.involvePoliceName">
<div v-for="item in row.involvePoliceName.split(' ')" class="text-nowrap">{{
item }}</div>
</div>
<div v-else></div>
</template>
</el-table-column>
<el-table-column
label="预警内容"
prop="thingDesc"
label="身份证号码"
prop="idCode"
width="180"
show-overflow-tooltip
/>
<el-table-column
label="分发状态"
align="center"
width="120"
>
<template #default="{ row }">
<span>{{
getDictLable(
dict.distributionState,
row.distributionState
)
}}</span>
</template>
</el-table-column>
label="风险因素"
prop="riskReason"
show-overflow-tooltip
/>
<el-table-column
label="风险内容"
prop="thingDesc"
show-overflow-tooltip
/>
<el-table-column label="操作" width="180">
<template #default="{ row }">
<el-button
<!-- <el-button
type="primary"
link
@click="handleShowDetail(row)"
>查看详情</el-button
>
<el-button
v-if="row.negativeId"
type="primary"
link
@click="handleAction(row)"
>处理详情</el-button
>
> -->
</template>
</el-table-column>
</el-table>
@ -150,15 +113,9 @@
</el-col>
</el-row>
</div>
</template>
<script lang="ts" setup>
import { listModelClue } from "@/api/sensitivePerception/modelClue";
import useCatchStore from "@/stores/modules/catch";
import { getDictLable } from "@/utils/util";
const catchStore = useCatchStore();
const dict = catchStore.getDicts(["distributionState","handleState"]);
import { listRiskClues } from "@/api/sensitivePerception/riskClue";
const query = ref({});
@ -168,25 +125,24 @@ const total = ref(0);
onMounted(() => {
getList();
});
watch(() => query.value.riskScoreRuleId, () => {
getList()
})
const route = useRoute();
watch(
() => route.query.modelId,
() => route.query.riskScoreRuleId,
(val) => {
query.value.modelIds = [val];
}
);
watch(
() => query.value.modelIds,
() => {
getList();
query.value.riskScoreRuleId = [val];
}
);
const loading = ref(false)
function getList() {
listModelClue(query.value).then((data) => {
loading.value = true
listRiskClues(query.value).then((data) => {
list.value = data.records;
total.value = data.total;
loading.value = false
});
}
@ -195,22 +151,6 @@ function reset() {
getList();
}
const show = ref(false);
const activeModelClue = ref({});
function handleShowDetail(row) {
activeModelClue.value = row;
show.value = true;
}
const activeNegativeId = ref('')
const negativeShow = ref(false)
function handleAction(row) {
negativeShow.value = true;
activeNegativeId.value = row.negativeId;
}
</script>
<style lang="scss" scoped>
</style>

128
src/views/sensitivePerception/RiskPersonnel.vue

@ -24,7 +24,9 @@
</el-col>
<el-col :span="6">
<el-form-item label="管控单位">
<depart-tree-select v-model="query.controlDepartId" />
<depart-tree-select
v-model="query.controlDepartId"
/>
</el-form-item>
</el-col>
<el-col :span="6">
@ -53,15 +55,23 @@
<div class="table-container">
<el-table :data="list">
<el-table-column label="姓名" prop="name" width="120" />
<el-table-column label="性别" prop="gender" width="60" align="center" >
<el-table-column
label="性别"
prop="gender"
width="60"
align="center"
>
<template #default="{ row }">
<span v-if="row.gender == 1"></span>
<span v-if="row.gender == 2"></span>
<span>{{ getGender(row.gender) }}</span>
</template>
</el-table-column>
<el-table-column label="年龄" prop="age" width="60" />
<el-table-column label="身份证号" prop="idCode" width="180" />
<el-table-column label="手机号" prop="mobileNumber" width="120" />
<el-table-column
label="手机号"
prop="mobileNumber"
width="120"
/>
<el-table-column
label="管控单位"
prop="controlDepartName"
@ -70,15 +80,17 @@
<el-table-column label="人员标签">
<template #default="{ row }">
<div class="flex gap" v-if="row.tags">
<el-tag v-for="item in row.tags.split(',')" :key="item">{{ item }}</el-tag>
<el-tag
v-for="item in row.tags.split(',')"
:key="item"
>{{ item }}</el-tag
>
</div>
</template>
</el-table-column>
<el-table-column label="高风险因素">
<template #default="{ row }">
<div class="flex gap">
</div>
<div class="flex gap"></div>
</template>
</el-table-column>
<el-table-column
@ -90,7 +102,7 @@
<el-table-column label="操作" width="160">
<template #default="{ row }">
<el-button type="primary" link @click="show = true"
<el-button type="primary" link @click="handleShowDesc(row)"
>查看详情</el-button
>
</template>
@ -98,27 +110,49 @@
</el-table>
</div>
<div class="flex end mt-8">
<el-pagination
@size-change="getList"
@current-change="getList"
:current-page="query.current"
:page-sizes="[10, 20, 50]"
:page-size="query.size"
v-model:current-page="query.current"
layout="total, sizes, prev, pager, next"
:total="total"
>
</el-pagination>
</div>
<el-pagination
@size-change="getList"
@current-change="getList"
:current-page="query.current"
:page-sizes="[10, 20, 50]"
:page-size="query.size"
v-model:current-page="query.current"
layout="total, sizes, prev, pager, next"
:total="total"
>
</el-pagination>
</div>
</div>
<el-dialog
title="风险人员详情"
v-model="show"
width="80vw"
top="2vh"
>
<img src="/imgs/lmgz/1.png" alt="">
<el-dialog title="风险人员详情" v-model="show" width="80vw" top="2vh">
<el-row>
<el-col :span="5"></el-col>
<el-col :span="12">
<div class="row" style="--label-width: 60px">
<div class="col col-8">
<label>姓名</label>
<span>{{ activeRow.name }}</span>
</div>
<div class="col col-8">
<label>性别</label>
<span>{{ getGender(activeRow.gender) }}</span>
</div>
<div class="col col-8">
<label>身份证号</label>
<span>{{ activeRow.idCode }}</span>
</div>
<div class="col col-8">
<label>年龄</label>
<span>{{ activeRow.age }}</span>
</div>
<div class="col col-8">
<label>管控单位</label>
<span>{{ activeRow.controlDepartName }}</span>
</div>
</div>
</el-col>
<el-col :span="5"></el-col>
</el-row>
</el-dialog>
</template>
<script lang="ts" setup>
@ -126,24 +160,40 @@ import { listRiskPersonnel } from "@/api/sensitivePerception/riskPersonnel";
const query = ref({});
const list = ref<any[]>([]);
const total = ref(false)
const show = ref(false)
const total = ref(0);
const show = ref(false);
function getList() {
listRiskPersonnel(query.value).then(data => {
list.value = data.records
total.value = data.total
})
listRiskPersonnel(query.value).then((data) => {
list.value = data.records;
total.value = data.total;
});
}
function reset() {
query.value = {}
getList()
query.value = {};
getList();
}
onMounted(() => {
getList()
})
getList();
});
const activeRow = ref({})
function handleShowDesc(row) {
activeRow.value = row
show.value = true
}
function getGender(val) {
if (val == 1) {
return '男'
}
if (val == 1) {
return '女'
}
return ''
}
</script>
<style lang="scss" scoped>
</style>

2
src/views/sensitivePerception/RiskScoreRule.vue

@ -22,7 +22,7 @@
</div>
<a
class="flex v-center gap file-link"
:href="`${BASE_PATH}/templates/长沙公安数字督察灵敏感知体系问题赋分及风险预警机制.pdf`"
:href="`${BASE_PATH}/templates/【工作机制】个人极端暴力风险数字督察灵敏感知体系风险赋分及预警处置机制.doc`"
target="__blank"
>
<icon name="local-icon-pdf" :size="38" />

59
src/views/work/NegativeImport.vue

@ -0,0 +1,59 @@
<template>
<div class="container">
<header>
<div class="flex gap">
<el-upload
:multiple="false"
:show-file-list="false"
:action="`${BASE_PATH}/negative/import`"
:headers="{ Authorization: getToken() }"
:before-upload="beforeUpload"
@success="handleSuccess"
@error="handleError"
accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
v-perms="['police:import']"
>
<el-button type="primary">
<template #icon>
<icon name="el-icon-Upload" />
</template>
黄赌毒历史问题下发</el-button
>
</el-upload>
<a
class="link"
:href="`${BASE_PATH}/templates/数字督察警员权限导入模板.xlsx`"
target="__blank"
style="padding: 8px"
v-perms="['police:import']"
>黄赌毒历史问题模板下载</a
>
</div>
</header>
</div>
</template>
<script setup>
import { BASE_PATH } from "@/api/request";
import { getToken } from "@/utils/token";
import feedback from "@/utils/feedback";
import { ElLoading } from "element-plus";
let importLoading;
function beforeUpload() {
importLoading = ElLoading.service({
lock: true,
text: "数据导入中",
background: "rgba(0, 0, 0, 0.7)",
});
}
function handleSuccess(result) {
importLoading.close();
if (result.code !== 200) {
feedback.msgError(result.message);
return;
}
feedback.msgSuccess('下发成功');
}
</script>
<style lang="scss" scoped>
</style>
Loading…
Cancel
Save