20 changed files with 1168 additions and 363 deletions
@ -0,0 +1,8 @@ |
|||||||
|
import request from "@/api/request"; |
||||||
|
|
||||||
|
export function listRiskPersonnel(query) { |
||||||
|
return request.get({ |
||||||
|
url: '/risk/personal', |
||||||
|
query |
||||||
|
}); |
||||||
|
} |
||||||
@ -0,0 +1,28 @@ |
|||||||
|
import request from "@/api/request"; |
||||||
|
|
||||||
|
export function listRiskScoreRuleTree() { |
||||||
|
return request.get({ |
||||||
|
url: '/risk/scoreRule/tree' |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
export function addRiskScoreRule(body) { |
||||||
|
return request.post({ |
||||||
|
url: '/risk/scoreRule', |
||||||
|
body |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
export function updateRiskScoreRule(body) { |
||||||
|
return request.put({ |
||||||
|
url: '/risk/scoreRule', |
||||||
|
body |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
export function delRiskScoreRule(id) { |
||||||
|
return request.del({ |
||||||
|
url: `/risk/scoreRule/${id}` |
||||||
|
}); |
||||||
|
} |
||||||
@ -0,0 +1,136 @@ |
|||||||
|
<template> |
||||||
|
<el-input v-model="filterText" placeholder="搜索" class="mb-10"> |
||||||
|
<template #prefix> |
||||||
|
<el-icon class="el-input__icon"><search /></el-icon> |
||||||
|
</template> |
||||||
|
</el-input> |
||||||
|
<div class="tree-container"> |
||||||
|
<el-scrollbar> |
||||||
|
<el-tree |
||||||
|
:data="treeData" |
||||||
|
node-key="value" |
||||||
|
:render-content="renderContent" |
||||||
|
:default-expanded-keys="[ROOT_ID]" |
||||||
|
:props="{ |
||||||
|
label: 'riskName', |
||||||
|
}" |
||||||
|
:filter-node-method="filterNode" |
||||||
|
@node-click="handleClick" |
||||||
|
ref="treeRef" |
||||||
|
/> |
||||||
|
</el-scrollbar> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
<script lang="ts" setup> |
||||||
|
import Icon from "@/components/icon/index.vue"; |
||||||
|
import { |
||||||
|
listRiskScoreRuleTree |
||||||
|
} from "@/api/sensitivePerception/riskScoreRule"; |
||||||
|
|
||||||
|
const ROOT_ID = 0; |
||||||
|
const treeData = ref([ |
||||||
|
{ |
||||||
|
riskName: "全部", |
||||||
|
value: ROOT_ID, |
||||||
|
children: [], |
||||||
|
}, |
||||||
|
]); |
||||||
|
|
||||||
|
const list = ref([]); |
||||||
|
const total = ref(0); |
||||||
|
|
||||||
|
onMounted(() => { |
||||||
|
listRiskScoreRuleTree().then((data) => { |
||||||
|
treeData.value[0].children = data; |
||||||
|
}); |
||||||
|
}); |
||||||
|
|
||||||
|
function renderContent( |
||||||
|
h, |
||||||
|
{ |
||||||
|
node, |
||||||
|
data, |
||||||
|
store, |
||||||
|
}: { |
||||||
|
node: Node; |
||||||
|
data: Tree; |
||||||
|
store: Node["store"]; |
||||||
|
} |
||||||
|
) { |
||||||
|
console.log(node); |
||||||
|
return h( |
||||||
|
"div", |
||||||
|
{ |
||||||
|
class: "flex v-center", |
||||||
|
}, |
||||||
|
h( |
||||||
|
Icon, |
||||||
|
{ |
||||||
|
name: "el-icon-Folder", |
||||||
|
class: "mr-8", |
||||||
|
}, |
||||||
|
node.label |
||||||
|
), |
||||||
|
h( |
||||||
|
"span", |
||||||
|
{ |
||||||
|
title: node.label, |
||||||
|
}, |
||||||
|
node.label |
||||||
|
) |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
const filterText = ref(""); |
||||||
|
const treeRef = ref(null); |
||||||
|
|
||||||
|
const filterNode = (value: string, data: Tree) => { |
||||||
|
if (!value) return true; |
||||||
|
return data.label.includes(value); |
||||||
|
}; |
||||||
|
|
||||||
|
watch(filterText, (val) => { |
||||||
|
treeRef.value!.filter(val); |
||||||
|
}); |
||||||
|
|
||||||
|
const props = defineProps({ |
||||||
|
modelValue: { |
||||||
|
type: Array, |
||||||
|
defalut: [], |
||||||
|
}, |
||||||
|
}); |
||||||
|
|
||||||
|
const emit = defineEmits(["update:modelValue"]); |
||||||
|
|
||||||
|
function handleClick(node) { |
||||||
|
if (node.value === ROOT_ID) { |
||||||
|
emit("update:modelValue", null); |
||||||
|
return; |
||||||
|
} |
||||||
|
const arr = []; |
||||||
|
getModelId(arr, node); |
||||||
|
emit("update:modelValue", arr); |
||||||
|
} |
||||||
|
|
||||||
|
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); |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
||||||
|
</script> |
||||||
|
<style lang="scss" scoped> |
||||||
|
:deep() { |
||||||
|
.el-tree-node.is-current { |
||||||
|
& > .el-tree-node__content { |
||||||
|
background: #e1e5ff; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
.tree-container { |
||||||
|
height: calc(100% - 42px); |
||||||
|
} |
||||||
|
</style> |
||||||
@ -1,248 +0,0 @@ |
|||||||
<template> |
|
||||||
<div class="container"> |
|
||||||
<header> |
|
||||||
<el-form :label-width="114"> |
|
||||||
<el-row> |
|
||||||
<el-col :span="6"> |
|
||||||
<el-form-item label="姓名"> |
|
||||||
<el-input |
|
||||||
placeholder="请输入" |
|
||||||
v-model="query.name" |
|
||||||
/> |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="6"> |
|
||||||
<el-form-item label="性别"> |
|
||||||
<el-input |
|
||||||
placeholder="请输入" |
|
||||||
v-model="query.six" |
|
||||||
/> |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="6"> |
|
||||||
<el-form-item label="年龄"> |
|
||||||
<el-input |
|
||||||
placeholder="请输入" |
|
||||||
v-model="query.age" |
|
||||||
type="number" |
|
||||||
/> |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="6"> |
|
||||||
<el-form-item label="学历"> |
|
||||||
<el-input |
|
||||||
placeholder="请输入" |
|
||||||
v-model="query.education" |
|
||||||
/> |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="6"> |
|
||||||
<el-form-item label="管控单位"> |
|
||||||
<el-input |
|
||||||
placeholder="请输入" |
|
||||||
v-model="query.departName" |
|
||||||
/> |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="6"> |
|
||||||
<el-form-item label="身份证号"> |
|
||||||
<el-input |
|
||||||
placeholder="请输入" |
|
||||||
v-model="query.idCode" |
|
||||||
/> |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="6"> |
|
||||||
<el-form-item label="人员标签"> |
|
||||||
<el-input |
|
||||||
placeholder="请输入" |
|
||||||
v-model="query.tag" |
|
||||||
/> |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="6"> |
|
||||||
<el-form-item label="高风险因素"> |
|
||||||
<el-input placeholder="请输入" v-model="query.ys" /> |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="6"> |
|
||||||
<el-form-item label="高风险分级处置"> |
|
||||||
<el-input |
|
||||||
placeholder="请输入" |
|
||||||
v-model="query.fjcl" |
|
||||||
/> |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
<el-col :span="6"> |
|
||||||
<el-form-item label="风险指数"> |
|
||||||
<el-input placeholder="请输入" v-model="query.ss" /> |
|
||||||
</el-form-item> |
|
||||||
</el-col> |
|
||||||
</el-row> |
|
||||||
</el-form> |
|
||||||
<div class="mb-25 flex end"> |
|
||||||
<div> |
|
||||||
<el-button type="primary" @click="getList"> |
|
||||||
<template #icon> |
|
||||||
<icon name="el-icon-Search" /> |
|
||||||
</template> |
|
||||||
查询</el-button |
|
||||||
> |
|
||||||
<el-button @click="reset">重置</el-button> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</header> |
|
||||||
<div class="table-container"> |
|
||||||
<el-table :data="list"> |
|
||||||
<el-table-column label="姓名" prop="name" width="80" /> |
|
||||||
<el-table-column label="性别" prop="six" width="60" /> |
|
||||||
<el-table-column label="年龄" prop="age" width="60" /> |
|
||||||
<el-table-column label="学历" prop="education" width="80" /> |
|
||||||
<el-table-column label="身份证号" prop="idCode" width="180" /> |
|
||||||
<el-table-column |
|
||||||
label="管控单位" |
|
||||||
prop="departName" |
|
||||||
width="120" |
|
||||||
/> |
|
||||||
<el-table-column label="人员标签" prop="roleDesc"> |
|
||||||
<template #default="{ row }"> |
|
||||||
<div class="flex gap"> |
|
||||||
<el-tag v-for="tag in row.tag.split(',')">{{ |
|
||||||
tag |
|
||||||
}}</el-tag> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column label="高风险因素" prop="fx"> |
|
||||||
<template #default="{ row }"> |
|
||||||
<div class="flex gap"> |
|
||||||
<span v-for="(val, index) in row.fx.split(',')" :style="{color: index === 0? '#FF0000' : index === 1 ? '#E59300' : ''}">{{ |
|
||||||
val |
|
||||||
}}</span> |
|
||||||
</div> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
<el-table-column |
|
||||||
label="高风险指数" |
|
||||||
prop="fxzs" |
|
||||||
width="120" |
|
||||||
align="center" |
|
||||||
/> |
|
||||||
|
|
||||||
<el-table-column label="操作" width="160"> |
|
||||||
<template #default="{ row }"> |
|
||||||
<el-button type="primary" link @click="show = true" |
|
||||||
>查看详情</el-button |
|
||||||
> |
|
||||||
</template> |
|
||||||
</el-table-column> |
|
||||||
</el-table> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
|
|
||||||
<el-dialog |
|
||||||
title="风险人员详情" |
|
||||||
v-model="show" |
|
||||||
width="80vw" |
|
||||||
top="2vh" |
|
||||||
> |
|
||||||
<img src="/imgs/lmgz/1.png" alt=""> |
|
||||||
</el-dialog> |
|
||||||
</template> |
|
||||||
<script lang="ts" setup> |
|
||||||
const query = ref({}); |
|
||||||
const list = ref<any[]>([ |
|
||||||
{ |
|
||||||
name: "伍豪", |
|
||||||
age: 32, |
|
||||||
six: "男", |
|
||||||
education: "本科", |
|
||||||
idCode: "430400197301022122", |
|
||||||
departName: "坡子街派出所", |
|
||||||
tag: "涉相关警情人员,特定对象,涉诉讼人员", |
|
||||||
fx: "矛盾纠纷,重点场所异常行为,重大疾病", |
|
||||||
fxzs: 97, |
|
||||||
}, |
|
||||||
{ |
|
||||||
name: "张单单", |
|
||||||
age: 39, |
|
||||||
six: "女", |
|
||||||
education: "初中", |
|
||||||
idCode: "430400197301022121", |
|
||||||
departName: "坡子街派出所", |
|
||||||
tag: "特定对象,涉诉讼人员", |
|
||||||
fx: "收入低下,诉求不满或长期未化解,网络浏览偏好", |
|
||||||
fxzs: 88, |
|
||||||
}, |
|
||||||
{ |
|
||||||
name: "谌婷民", |
|
||||||
age: 51, |
|
||||||
six: "男", |
|
||||||
education: "小学", |
|
||||||
idCode: "430400197301982128", |
|
||||||
departName: "坡子街派出所", |
|
||||||
tag: "涉相关警情人员,特定对象,涉诉讼人员", |
|
||||||
fx: "精神疾病未及时治疗,重大疾病,家庭变故", |
|
||||||
fxzs: 78, |
|
||||||
}, |
|
||||||
{ |
|
||||||
name: "牧志会", |
|
||||||
age: 38, |
|
||||||
six: "男", |
|
||||||
education: "初中", |
|
||||||
idCode: "430400197301021289", |
|
||||||
departName: "坡子街派出所", |
|
||||||
tag: "涉相关警情人员,涉诉讼人员", |
|
||||||
fx: "扬言滋事、自杀等个人极端行,暴力伤害行为", |
|
||||||
fxzs: 89, |
|
||||||
}, |
|
||||||
{ |
|
||||||
name: "都勤锦", |
|
||||||
age: 66, |
|
||||||
six: "男", |
|
||||||
education: "高中", |
|
||||||
idCode: "430400197301066547", |
|
||||||
departName: "坡子街派出所", |
|
||||||
tag: "特定对象,涉诉讼人员", |
|
||||||
fx: "矛盾纠纷,重点场所异常行为,重大疾病", |
|
||||||
fxzs: 91, |
|
||||||
}, |
|
||||||
{ |
|
||||||
name: "未言婕", |
|
||||||
age: 38, |
|
||||||
six: "女", |
|
||||||
education: "小学", |
|
||||||
idCode: "43040019730102212X", |
|
||||||
departName: "坡子街派出所", |
|
||||||
tag: "涉相关警情人员,涉诉讼人员", |
|
||||||
fx: "重大疾病,收入低下", |
|
||||||
fxzs: 66, |
|
||||||
}, |
|
||||||
{ |
|
||||||
name: "施丹", |
|
||||||
age: 51, |
|
||||||
six: "女", |
|
||||||
education: "小学", |
|
||||||
idCode: "430400198103212211", |
|
||||||
departName: "坡子街派出所", |
|
||||||
tag: "涉诉讼人员", |
|
||||||
fx: "矛盾纠纷,重点场所异常行为,重大疾病", |
|
||||||
fxzs: 98, |
|
||||||
}, |
|
||||||
{ |
|
||||||
name: "志会", |
|
||||||
age: 35, |
|
||||||
six: "男", |
|
||||||
education: "大学", |
|
||||||
idCode: "430400197301022121", |
|
||||||
departName: "坡子街派出所", |
|
||||||
tag: "涉相关警情人员,特定对象,涉诉讼人员", |
|
||||||
fx: "重点场所异常行为,重大疾病", |
|
||||||
fxzs: 99, |
|
||||||
}, |
|
||||||
]); |
|
||||||
|
|
||||||
const show = ref(false) |
|
||||||
</script> |
|
||||||
<style lang="scss" scoped> |
|
||||||
</style> |
|
||||||
@ -0,0 +1,216 @@ |
|||||||
|
<template> |
||||||
|
<div class="container h100"> |
||||||
|
<el-row :gutter="20" class="h100"> |
||||||
|
<el-col :span="6" class="h100"> |
||||||
|
<model-risk-tree v-model="query.modelIds" /> |
||||||
|
</el-col> |
||||||
|
<el-col :span="18"> |
||||||
|
<header> |
||||||
|
<el-form :label-width="140"> |
||||||
|
<el-row> |
||||||
|
<el-col :span="8"> |
||||||
|
<el-form-item label="预警时间"> |
||||||
|
<date-time-range-picker-ext |
||||||
|
v-model="query.createTime" |
||||||
|
/> |
||||||
|
</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> |
||||||
|
</el-col> |
||||||
|
<el-col :span="8"> |
||||||
|
<el-form-item label="预警内容"> |
||||||
|
<el-input |
||||||
|
placeholder="请输入" |
||||||
|
v-model="query.thingDesc" |
||||||
|
clearable |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
<el-col :span="8"> |
||||||
|
<el-form-item label="分发状态"> |
||||||
|
<el-select |
||||||
|
v-model="query.distributionState" |
||||||
|
clearable |
||||||
|
> |
||||||
|
<el-option |
||||||
|
v-for="item in dict.distributionState" |
||||||
|
:label="item.dictLabel" |
||||||
|
:value="item.dictValue" |
||||||
|
/> |
||||||
|
</el-select> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
</el-row> |
||||||
|
</el-form> |
||||||
|
<div class="flex end mb-20"> |
||||||
|
<div> |
||||||
|
<el-button type="primary" @click="getList"> |
||||||
|
<template #icon> |
||||||
|
<icon name="el-icon-Search" /> |
||||||
|
</template> |
||||||
|
查询</el-button |
||||||
|
> |
||||||
|
<el-button @click="reset">重置</el-button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</header> |
||||||
|
<div class="table-container"> |
||||||
|
<el-table :data="list"> |
||||||
|
<el-table-column |
||||||
|
label="预警时间" |
||||||
|
prop="createTime" |
||||||
|
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" |
||||||
|
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> |
||||||
|
<el-table-column label="操作" width="180"> |
||||||
|
<template #default="{ row }"> |
||||||
|
<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> |
||||||
|
</div> |
||||||
|
<div class="flex end mt-8"> |
||||||
|
<el-pagination |
||||||
|
@size-change="getList" |
||||||
|
@current-change="getList" |
||||||
|
:current-page="query.current" |
||||||
|
:page-sizes="[9, 18, 36]" |
||||||
|
v-model:page-size="query.size" |
||||||
|
v-model:current-page="query.current" |
||||||
|
layout="total, sizes, prev, pager, next" |
||||||
|
:total="total" |
||||||
|
v-if="list.length" |
||||||
|
> |
||||||
|
</el-pagination> |
||||||
|
</div> |
||||||
|
</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"]); |
||||||
|
|
||||||
|
const query = ref({}); |
||||||
|
|
||||||
|
const list = ref([]); |
||||||
|
const total = ref(0); |
||||||
|
|
||||||
|
onMounted(() => { |
||||||
|
getList(); |
||||||
|
}); |
||||||
|
|
||||||
|
const route = useRoute(); |
||||||
|
watch( |
||||||
|
() => route.query.modelId, |
||||||
|
(val) => { |
||||||
|
query.value.modelIds = [val]; |
||||||
|
} |
||||||
|
); |
||||||
|
watch( |
||||||
|
() => query.value.modelIds, |
||||||
|
() => { |
||||||
|
getList(); |
||||||
|
} |
||||||
|
); |
||||||
|
|
||||||
|
function getList() { |
||||||
|
listModelClue(query.value).then((data) => { |
||||||
|
list.value = data.records; |
||||||
|
total.value = data.total; |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
function reset() { |
||||||
|
query.value = {}; |
||||||
|
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> |
||||||
@ -0,0 +1,149 @@ |
|||||||
|
<template> |
||||||
|
<div class="container"> |
||||||
|
<header> |
||||||
|
<el-form :label-width="114"> |
||||||
|
<el-row> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="姓名"> |
||||||
|
<el-input |
||||||
|
placeholder="请输入" |
||||||
|
v-model="query.name" |
||||||
|
clearable |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="年龄"> |
||||||
|
<el-input |
||||||
|
placeholder="请输入" |
||||||
|
v-model="query.age" |
||||||
|
type="number" |
||||||
|
clearable |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="管控单位"> |
||||||
|
<depart-tree-select v-model="query.controlDepartId" /> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
<el-col :span="6"> |
||||||
|
<el-form-item label="身份证号"> |
||||||
|
<el-input |
||||||
|
placeholder="请输入" |
||||||
|
v-model="query.idCode" |
||||||
|
clearable |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
</el-col> |
||||||
|
</el-row> |
||||||
|
</el-form> |
||||||
|
<div class="mb-25 flex end"> |
||||||
|
<div> |
||||||
|
<el-button type="primary" @click="getList"> |
||||||
|
<template #icon> |
||||||
|
<icon name="el-icon-Search" /> |
||||||
|
</template> |
||||||
|
查询</el-button |
||||||
|
> |
||||||
|
<el-button @click="reset">重置</el-button> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</header> |
||||||
|
<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" > |
||||||
|
<template #default="{ row }"> |
||||||
|
<span v-if="row.gender == 1">男</span> |
||||||
|
<span v-if="row.gender == 2">女</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="controlDepartName" |
||||||
|
width="120" |
||||||
|
/> |
||||||
|
<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> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
<el-table-column label="高风险因素"> |
||||||
|
<template #default="{ row }"> |
||||||
|
<div class="flex gap"> |
||||||
|
|
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
<el-table-column |
||||||
|
label="高风险指数" |
||||||
|
prop="riskScore" |
||||||
|
width="120" |
||||||
|
align="center" |
||||||
|
/> |
||||||
|
|
||||||
|
<el-table-column label="操作" width="160"> |
||||||
|
<template #default="{ row }"> |
||||||
|
<el-button type="primary" link @click="show = true" |
||||||
|
>查看详情</el-button |
||||||
|
> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
</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> |
||||||
|
</div> |
||||||
|
|
||||||
|
<el-dialog |
||||||
|
title="风险人员详情" |
||||||
|
v-model="show" |
||||||
|
width="80vw" |
||||||
|
top="2vh" |
||||||
|
> |
||||||
|
<img src="/imgs/lmgz/1.png" alt=""> |
||||||
|
</el-dialog> |
||||||
|
</template> |
||||||
|
<script lang="ts" setup> |
||||||
|
import { listRiskPersonnel } from "@/api/sensitivePerception/riskPersonnel"; |
||||||
|
|
||||||
|
const query = ref({}); |
||||||
|
const list = ref<any[]>([]); |
||||||
|
const total = ref(false) |
||||||
|
const show = ref(false) |
||||||
|
|
||||||
|
function getList() { |
||||||
|
listRiskPersonnel(query.value).then(data => { |
||||||
|
list.value = data.records |
||||||
|
total.value = data.total |
||||||
|
}) |
||||||
|
} |
||||||
|
|
||||||
|
function reset() { |
||||||
|
query.value = {} |
||||||
|
getList() |
||||||
|
} |
||||||
|
|
||||||
|
onMounted(() => { |
||||||
|
getList() |
||||||
|
}) |
||||||
|
</script> |
||||||
|
<style lang="scss" scoped> |
||||||
|
</style> |
||||||
@ -0,0 +1,296 @@ |
|||||||
|
<template> |
||||||
|
<div class="container" v-loading="loading"> |
||||||
|
<header class="mb-20"> |
||||||
|
<div class="flex between"> |
||||||
|
<div> |
||||||
|
<el-button type="primary" @click="handleAdd"> |
||||||
|
<template #icon> |
||||||
|
<icon name="el-icon-Plus" /> |
||||||
|
</template> |
||||||
|
新增</el-button |
||||||
|
> |
||||||
|
</div> |
||||||
|
<div style="width: 50%"> |
||||||
|
<el-row> |
||||||
|
|
||||||
|
</el-row> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div class="flex between mt-10 v-center"> |
||||||
|
<div> |
||||||
|
<div><span class="text-primary">个人极端暴力风险指数</span> =(基础因素得分百分比 × 15%)+(诱发因素得分百分比 × 30%)+(行为因素得分百分比 × 45%)+(管控因素得分百分比 × 10%)</div> |
||||||
|
</div> |
||||||
|
<a |
||||||
|
class="flex v-center gap file-link" |
||||||
|
:href="`${BASE_PATH}/templates/长沙公安数字督察灵敏感知体系问题赋分及风险预警机制.pdf`" |
||||||
|
target="__blank" |
||||||
|
> |
||||||
|
<icon name="local-icon-pdf" :size="38" /> |
||||||
|
<span>个人极端风险赋分规则.pdf</span> |
||||||
|
</a> |
||||||
|
</div> |
||||||
|
</header> |
||||||
|
<div class="table-container"> |
||||||
|
<el-table :data="scoreRules" row-key="id"> |
||||||
|
<el-table-column |
||||||
|
label="问题条目" |
||||||
|
prop="riskName" |
||||||
|
show-overflow-tooltip |
||||||
|
width="180" |
||||||
|
/> |
||||||
|
<el-table-column label="因素分值" prop="score" width="200" align="center"> |
||||||
|
</el-table-column> |
||||||
|
<el-table-column |
||||||
|
label="赋分规则" |
||||||
|
prop="ruleDesc" |
||||||
|
show-overflow-tooltip |
||||||
|
> |
||||||
|
</el-table-column> |
||||||
|
<el-table-column |
||||||
|
label="因素权重" |
||||||
|
prop="weight" |
||||||
|
width="100" |
||||||
|
align="center" |
||||||
|
/> |
||||||
|
<el-table-column |
||||||
|
label="开启状态" |
||||||
|
width="100" |
||||||
|
> |
||||||
|
<template #default="{ row }"> |
||||||
|
<el-tag type="success" v-if="row.status === true" |
||||||
|
>开启</el-tag |
||||||
|
> |
||||||
|
<el-tag type="danger" v-if="row.status === false" |
||||||
|
>关闭</el-tag |
||||||
|
> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
<el-table-column label="最后更新时间" prop="updateTime" width="180" /> |
||||||
|
<el-table-column label="操作" width="160"> |
||||||
|
<template #default="{ row }"> |
||||||
|
<el-button type="primary" link @click="handleEdit(row)" |
||||||
|
>编辑</el-button |
||||||
|
> |
||||||
|
<el-button type="danger" link @click="handleDelete(row)" |
||||||
|
>删除</el-button |
||||||
|
> |
||||||
|
</template> |
||||||
|
</el-table-column> |
||||||
|
</el-table> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<el-dialog |
||||||
|
v-model="show" |
||||||
|
:title="mode === 'add' ? '新增赋分规则' : '编辑赋分规则'" |
||||||
|
width="600" |
||||||
|
> |
||||||
|
<el-form label-width="120" ref="formRef" :model="formData"> |
||||||
|
<el-form-item |
||||||
|
label="父级节点" |
||||||
|
:rules="{ |
||||||
|
required: true, |
||||||
|
message: '请选择父级节点', |
||||||
|
}" |
||||||
|
prop="pid" |
||||||
|
> |
||||||
|
<el-tree-select |
||||||
|
class="flex-1" |
||||||
|
v-model="formData.pid" |
||||||
|
:data="treeOptions" |
||||||
|
clearable |
||||||
|
node-key="id" |
||||||
|
:props="{ |
||||||
|
label: 'riskName', |
||||||
|
}" |
||||||
|
:default-expanded-keys="[MENU_ROOT_ID]" |
||||||
|
placeholder="请选择父级节点" |
||||||
|
check-strictly |
||||||
|
filterable |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item |
||||||
|
label="风险因素" |
||||||
|
prop="riskName" |
||||||
|
:rules="{ |
||||||
|
required: true, |
||||||
|
message: '请输入风险因素', |
||||||
|
}" |
||||||
|
> |
||||||
|
<el-input |
||||||
|
v-model="formData.riskName" |
||||||
|
placeholder="请输入" |
||||||
|
clearable |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="因素分值" prop="score"> |
||||||
|
<el-input |
||||||
|
v-model="formData.score" |
||||||
|
placeholder="请输入序号" |
||||||
|
type="number" |
||||||
|
clearable |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="赋分规则" prop="ruleDesc"> |
||||||
|
<el-input |
||||||
|
v-model="formData.ruleDesc" |
||||||
|
placeholder="请输入序号" |
||||||
|
type="textarea" |
||||||
|
clearable |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="因素权重" prop="weight"> |
||||||
|
<el-input |
||||||
|
v-model="formData.weight" |
||||||
|
placeholder="请输入序号" |
||||||
|
type="number" |
||||||
|
clearable |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item label="序号" prop="sort"> |
||||||
|
<el-input |
||||||
|
v-model="formData.sortId" |
||||||
|
placeholder="请输入序号" |
||||||
|
type="number" |
||||||
|
clearable |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
<el-form-item |
||||||
|
label="状态" |
||||||
|
prop="status" |
||||||
|
> |
||||||
|
<el-switch |
||||||
|
v-model="formData.status" |
||||||
|
inline-prompt |
||||||
|
active-text="开启" |
||||||
|
inactive-text="关闭" |
||||||
|
:active-value="true" |
||||||
|
:inactive-value="false" |
||||||
|
/> |
||||||
|
</el-form-item> |
||||||
|
</el-form> |
||||||
|
<footer class="flex end"> |
||||||
|
<el-button @click="show = false">取消</el-button> |
||||||
|
<el-button type="primary" @click="submit">确定</el-button> |
||||||
|
</footer> |
||||||
|
</el-dialog> |
||||||
|
</template> |
||||||
|
<script lang="ts" setup> |
||||||
|
import { BASE_PATH } from "@/api/request"; |
||||||
|
import { calculateScore } from "@/api/work/negative"; |
||||||
|
import { MENU_ROOT_ID } from "@/enums/appEnums"; |
||||||
|
import { |
||||||
|
listRiskScoreRuleTree, |
||||||
|
addRiskScoreRule, |
||||||
|
updateRiskScoreRule, |
||||||
|
delRiskScoreRule |
||||||
|
} from "@/api/sensitivePerception/riskScoreRule"; |
||||||
|
import feedback from "@/utils/feedback"; |
||||||
|
|
||||||
|
const scoreRules = ref([]); |
||||||
|
const treeOptions = ref([ |
||||||
|
{ |
||||||
|
id: MENU_ROOT_ID, |
||||||
|
riskName: "顶级", |
||||||
|
children: [], |
||||||
|
}, |
||||||
|
]); |
||||||
|
|
||||||
|
function getList() { |
||||||
|
listRiskScoreRuleTree().then((data) => { |
||||||
|
scoreRules.value = data; |
||||||
|
treeOptions.value[0].children = data; |
||||||
|
}); |
||||||
|
} |
||||||
|
getList(); |
||||||
|
|
||||||
|
const show = ref(false); |
||||||
|
const formData = ref({ |
||||||
|
status: 0 |
||||||
|
}); |
||||||
|
const formRef = ref(); |
||||||
|
|
||||||
|
const mode = ref<string>("add"); |
||||||
|
watch(mode, (val) => { |
||||||
|
if (val === "add") { |
||||||
|
formData.value = {}; |
||||||
|
formRef.value.resetFields(); |
||||||
|
} |
||||||
|
}); |
||||||
|
async function submit() { |
||||||
|
await formRef.value.validate(); |
||||||
|
if (mode.value === "add") { |
||||||
|
await addRiskScoreRule(formData.value); |
||||||
|
const parentCode = formData.value.parentCode; |
||||||
|
formData.value = {}; |
||||||
|
formRef.value.resetFields(); |
||||||
|
formData.value.parentCode = parentCode; |
||||||
|
} else { |
||||||
|
await updateRiskScoreRule(formData.value); |
||||||
|
} |
||||||
|
show.value = false; |
||||||
|
getList(); |
||||||
|
} |
||||||
|
|
||||||
|
function handleAdd() { |
||||||
|
show.value = true; |
||||||
|
mode.value = "add"; |
||||||
|
} |
||||||
|
|
||||||
|
function handleEdit(row) { |
||||||
|
show.value = true; |
||||||
|
mode.value = "edit"; |
||||||
|
formData.value = {...row}; |
||||||
|
} |
||||||
|
|
||||||
|
const handleDelete = async (row) => { |
||||||
|
await feedback.confirm(`确定要删除 "${row.name}"?`); |
||||||
|
await delRiskScoreRule(row.id); |
||||||
|
getList(); |
||||||
|
feedback.msgSuccess("删除成功"); |
||||||
|
}; |
||||||
|
|
||||||
|
function getScoreRange(row) { |
||||||
|
const sorceSet = new Set(); |
||||||
|
row.children.forEach((item) => { |
||||||
|
if (item.score) { |
||||||
|
sorceSet.add(item.score); |
||||||
|
} |
||||||
|
item.children.forEach((j) => { |
||||||
|
if (j.score) { |
||||||
|
sorceSet.add(j.score); |
||||||
|
} |
||||||
|
}); |
||||||
|
}); |
||||||
|
if (sorceSet.size === 0) { |
||||||
|
return '' |
||||||
|
} |
||||||
|
if (sorceSet.size === 1) { |
||||||
|
return sorceSet.values().next().value |
||||||
|
} |
||||||
|
const min = Math.min(...sorceSet); |
||||||
|
const max = Math.max(...sorceSet); |
||||||
|
return `${min}-${max}` |
||||||
|
} |
||||||
|
|
||||||
|
const loading = ref(false) |
||||||
|
async function handleCalculate() { |
||||||
|
await feedback.confirm("确定要重新计算风险指数?"); |
||||||
|
loading.value = true |
||||||
|
await calculateScore() |
||||||
|
feedback.msgSuccess("风险指数计算完成"); |
||||||
|
loading.value = false |
||||||
|
} |
||||||
|
</script> |
||||||
|
<style lang="scss" scoped> |
||||||
|
.file-link { |
||||||
|
font-size: 16px; |
||||||
|
text-decoration: none; |
||||||
|
color: #19257d; |
||||||
|
padding: 0 8px; |
||||||
|
border-radius: 8px; |
||||||
|
&:hover { |
||||||
|
background-color: #eee; |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
||||||
Loading…
Reference in new issue