Browse Source

优化风险人员库查询

main
wxc 12 months ago
parent
commit
2e3904cd17
  1. 33
      src/components/negative/verify.vue
  2. 234
      src/views/sensitivePerception/RiskPersonnel.vue
  3. 2
      src/views/sensitivePerception/RiskScoreRule.vue

33
src/components/negative/verify.vue

@ -597,7 +597,7 @@
</el-row>
</div>
<div class="flex center" style="width: 100%">
<el-button type="primary" plain @click="handleAddPersomal">
<el-button type="primary" plain @click="handleAddPersonal">
<template #icon>
<icon name="el-icon-Plus" />
</template>
@ -1303,7 +1303,7 @@ function getFormData() {
}
}
function handleAddPersomal() {
function handleAddPersonal() {
form.value.blames.push({
type: BlameType.PERSONAL,
problems: [{}],
@ -1344,13 +1344,14 @@ function handleChangeLead(val, blame) {
watch(
() => form.value.accountabilityTarget,
(val) => {
if (val === AccountabilityTarget.PERSONAL) {
if (
val === AccountabilityTarget.PERSONAL &&
!form.value.blames.filter(
form.value.blames.filter(
(item) => item.type === BlameType.PERSONAL
).length
).length === 0
) {
handleAddPersomal();
handleAddPersonal();
}
form.value.blames.forEach((item) => {
if (item.type === BlameType.DEPARTMENT) {
handleRemovePersonal(item);
@ -1363,10 +1364,9 @@ watch(
handleRemovePersonal(item);
}
});
if (
!form.value.blames.filter(
if (form.value.blames.filter(
(item) => item.type === BlameType.DEPARTMENT
).length
).length === 0
) {
form.value.blames.push({
type: BlameType.DEPARTMENT,
@ -1376,17 +1376,15 @@ watch(
form.value.blameLeaders = [];
}
if (val === AccountabilityTarget.PERSONAL_AND_DEPARTMENT) {
if (
!form.value.blames.filter(
if (form.value.blames.filter(
(item) => item.type === BlameType.PERSONAL
).length
).length === 0
) {
handleAddPersomal();
handleAddPersonal();
}
if (
!form.value.blames.filter(
if (form.value.blames.filter(
(item) => item.type === BlameType.DEPARTMENT
).length
).length === 0
) {
form.value.blames.push({
type: BlameType.DEPARTMENT,
@ -1405,7 +1403,7 @@ function handleChangeCheckStatus(val, item) {
form.value.accountabilityTarget !== AccountabilityTarget.DEPARTMENT &&
form.value.blames.length === 0
) {
handleAddPersomal();
handleAddPersonal();
}
}
@ -1427,7 +1425,6 @@ function handleChangeSubjectiveAspect(val, item) {
}
function handleChangeProblem(node, problem) {
debugger;
if (node.level === 3) {
problem.threeLevelContent = node.label;
problem.oneLevelCode = node.parent.parent.key;

234
src/views/sensitivePerception/RiskPersonnel.vue

@ -99,10 +99,7 @@
prop="controlDepartName"
width="120"
/>
<el-table-column
label="人员标签"
width="240"
>
<el-table-column label="人员标签" width="240">
<template #default="{ row }">
<div class="flex gap-4 wrap" v-if="row.tags">
<el-tag
@ -117,10 +114,10 @@
<template #default="{ row }">
<div class="flex gap-4 wrap" v-if="row.smallTags">
<el-tag
:type="getTagType(item)"
v-for="item in row.smallTags"
v-for="item in getSmallTags(row.smallTags)"
:type="item.type"
:key="item"
>{{ item }}
>{{ item.value }}
</el-tag>
</div>
</template>
@ -167,59 +164,85 @@
</div>
<el-dialog title="风险人员详情" v-model="show" width="80vw" top="2vh">
<h5>风险人员基本情况</h5>
<el-row>
<el-col :span="1"></el-col>
<el-col :span="18">
<el-col :span="18">
<div class="col col-20">
<div class="person-photo">
<img src="@/assets/images/defaultPhoto.png" />
<el-col :span="4">
<div v-for="item in rules" :key="item">
<div class="risk-first">{{ item.riskName }}</div>
<div
v-for="risk in item.children"
:key="risk"
class="risk-second pointer"
>
{{ risk.riskName }}
</div>
</div>
<div class="row" style="height: 100%">
<div class="col col-6">
</el-col>
<el-col :span="20">
<el-row class="mt-20">
<el-col :span="19">
<p class="text-primary mb-10">风险人员基本情况</p>
<el-row>
<el-col :span="4">
<img :src="personal.riskPersonal?.avatar" v-if="personal.riskPersonal?.avatar"
style="height: 180px; width: 140px"
/>
<img src="@/assets/images/defaultPhoto.png" v-else
style="height: 180px; width: 140px"
/>
</el-col>
<el-col :span="20">
<div class="row">
<div class="col col-12">
<label>姓名</label>
<span>{{ activeRow.name }}</span>
</div>
<div class="col col-8">
<div class="col col-12">
<label>性别</label>
<span>{{ getGender(activeRow.gender) }}</span>
<span>{{
getGender(activeRow.gender)
}}</span>
</div>
<div class="col col-12">
<label>年龄</label>
<span>{{ activeRow.age }}</span>
</div>
<div class="col col-10">
<div class="col col-12">
<label>证件号码</label>
<span>{{ activeRow.idCode }}</span>
</div>
<div class="row" style="width: 100%">
<div class="col col-6">
<label>年龄</label>
<span>{{ activeRow.age }}</span>
<div class="col col-12">
<label>手机号码</label>
<span>{{
activeRow.mobileNumber
}}</span>
</div>
<div class="col col-8">
<div class="col col-12">
<label>管控单位</label>
<span>{{
activeRow.controlDepartName
}}</span>
</div>
<div class="col col-10">
<label>电话</label>
<span>{{ activeRow.mobileNumber }}</span>
</div>
</div>
</div>
</div>
</el-col>
</el-row>
</el-col>
<el-col :span="5">
<div class="flex center column text-center">
<div class="socre-box">
{{ personal.riskPersonal.riskScore.toFixed(1) }}
</div>
<span style="font-size: 24px" class="mt-10">风险指数</span>
<span style="font-size: 24px" class="mt-10"
>风险指数</span
>
</div>
</el-col>
</el-row>
<div style="min-height: 50vh">
<div v-for="(item, index) in personal.riskClueList" :key="index">
<div
v-for="(item, index) in personal.riskClueList"
:key="index"
>
<h5>{{ item.riskName }}</h5>
<el-table :data="item.clues">
<el-table-column
@ -233,17 +256,26 @@
width="160"
show-overflow-tooltip
/>
<el-table-column label="风险内容" show-overflow-tooltip>
<el-table-column
label="风险内容"
show-overflow-tooltip
>
<template #default="{ row }">
<span style="white-space: pre-wrap">{{
row.data
}}</span>
</template>
</el-table-column>
<el-table-column width="80" label="分值" prop="scoreResult" />
<el-table-column
width="80"
label="分值"
prop="scoreResult"
/>
</el-table>
</div>
</div>
</el-col>
</el-row>
</el-dialog>
<el-dialog v-model="showNotification" title="创建提醒" width="600px">
<el-form label-width="148" :model="formData2" ref="formRef">
@ -326,7 +358,7 @@ import {
listRiskPersonnel,
getRiskPersonnel,
} from "@/api/sensitivePerception/riskPersonnel";
import { ref } from "vue";
import { listRiskScoreRuleTree } from "@/api/sensitivePerception/riskScoreRule";
import { alarmNotificationCommit } from "~/api/work/alarm";
import feedback from "~/utils/feedback";
import { listPoliceAll } from "~/api/system/police";
@ -436,8 +468,12 @@ function reset() {
getList();
}
const rules = ref([]);
onMounted(() => {
getList();
listRiskScoreRuleTree().then((data) => {
rules.value = data;
});
});
const activeRow = ref({});
@ -506,8 +542,8 @@ const tags = [
value: "涉违法犯罪人员",
},
{
label: "涉举报投诉信访人员",
value: "涉举报投诉信访人员",
label: "涉投诉举报信访人员",
value: "涉投诉举报信访人员",
},
{
label: "涉诉讼人员",
@ -560,6 +596,18 @@ const riskReasons = [
label: "重点上访人员",
value: "重点上访人员",
},
{
label: "已被打击处理",
value: "已被打击处理",
},
{
label: "受到刑政处罚",
value: "受到刑政处罚",
},
{
label: "受到刑事处罚",
value: "受到刑事处罚",
},
{
label: "取保候审",
value: "取保候审",
@ -572,6 +620,7 @@ const riskReasons = [
label: "其它潜在危害人员",
value: "其它潜在危害人员",
},
{
label: "殴打他人",
value: "殴打他人",
@ -589,8 +638,20 @@ const riskReasons = [
value: "精神障碍患者",
},
{
label: '"扬言滋事、自杀等行为”',
value: "扬言滋事、自杀等行为”",
label: "厌世情绪",
value: "厌世情绪",
},
{
label: "报复社会",
value: "报复社会",
},
{
label: "遭遇不公",
value: "遭遇不公",
},
{
label: "自杀",
value: "自杀",
},
{
label: "家暴",
@ -620,24 +681,24 @@ const riskReasons = [
];
const educations = [
{
label: "小学",
value: "小学",
label: "小学及以下",
value: "小学及以下",
},
{
label: "初中",
value: "初中",
},
{
label: "中/中",
value: "中/中",
label: "中/中",
value: "中/中",
},
{
label: "专科/本科",
value: "专科/本科",
label: "大学",
value: "大学",
},
{
label: "研究生以上",
value: "研究生以上",
label: "大学以上",
value: "大学以上",
},
];
@ -664,17 +725,68 @@ const ages = [
},
];
function getTagType(item) {
if (item.includes('在逃') || item.includes('重大刑事犯罪') || item.includes('个人极端') || item.includes('涉稳人员')
|| item.includes('涉毒') || item.includes('重点上访人员')) {
return 'danger';
function getSmallTags(val) {
if (!val) {
return [];
}
const arr = val.split(",").map((tag) => {
return getSmallTagObj(tag);
});
arr.sort((a, b) => a.sort - b.sort);
return arr;
}
if (item.includes('取保候审') || item.includes('监视居住') || item.includes('其它潜在危害人员') || item.includes('殴打他人')
|| item.includes('故意伤害') || item.includes('寻衅滋事') || item.includes('精神障碍患者') || item.includes('扬言滋事')
|| item.includes('家暴') || item.includes('离婚') || item.includes('酗酒') || item.includes('纠纷') || item.includes('无业人员')) {
return 'warning';
function getSmallTagObj(item) {
if (
item.includes("在逃") ||
item.includes("重大刑事犯罪") ||
item.includes("个人极端") ||
item.includes("涉稳人员") ||
item.includes("涉毒") ||
item.includes("重点上访人员") ||
item.includes("已被打击处理") ||
item.includes("受到刑政处罚") ||
item.includes("受到刑事处罚")
) {
return {
type: "danger",
sort: 1,
value: item,
};
}
return 'info'
if (
item.includes("取保候审") ||
item.includes("监视居住") ||
item.includes("其它潜在危害人员") ||
item.includes("殴打他人") ||
item.includes("故意伤害") ||
item.includes("寻衅滋事") ||
item.includes("精神障碍患者") ||
item.includes("扬言滋事") ||
item.includes("家暴") ||
item.includes("离婚") ||
item.includes("酗酒") ||
item.includes("纠纷") ||
item.includes("无业人员")
) {
return {
type: "warning",
sort: 2,
value: item,
};
}
return {
type: "info",
sort: 3,
value: item,
};
}
function getColor(score) {
if (score >= 80) {
return "red";
}
return "#333";
}
</script>
<style lang="scss" scoped>
@ -711,4 +823,14 @@ function getTagType(item) {
margin-bottom: 0;
}
}
.risk-first {
height: 60px;
line-height: 60px;
color: #222;
}
.risk-second {
height: 40px;
line-height: 40px;
box-shadow: inset 0px -1px 0px 0px #e9ebfd;
}
</style>

2
src/views/sensitivePerception/RiskScoreRule.vue

@ -292,7 +292,7 @@ async function handleCalculate() {
}
function getChildWeightSum(row) {
const arr = row.children.map(item => item.weight || 0);
const arr = row.children.filter(item => item.status).map(item => item.weight || 0);
if (arr.length === 0) {
return 0;
}

Loading…
Cancel
Save