Browse Source

fit: 个人风险指数赋分

main
wxc 1 year ago
parent
commit
11b0abb1d2
  1. 2
      src/components/negative/approve.vue
  2. 115
      src/views/sensitivePerception/PoliceNegative.vue
  3. 6
      src/views/system/Police.vue

2
src/components/negative/approve.vue

@ -1,5 +1,5 @@
<template>
<el-dialog title="办结审批" v-model="show">
<el-dialog :title="negative.extensionApplyFlag ? `办结审批`: `申请延期审批`" v-model="show">
<el-form
label-position="top"
ref="formRef"

115
src/views/sensitivePerception/PoliceNegative.vue

@ -215,7 +215,14 @@
</el-col>
<el-col :span="18">
<el-row>
<el-col :span="12" class="mb-20" v-if="negativeInfo.jcj110BusinessSize || negativeInfo.jcj110Size">
<el-col
:span="12"
class="mb-20"
v-if="
negativeInfo.jcj110BusinessSize ||
negativeInfo.jcj110Size
"
>
<description-pair
label1="110接处警量"
label2="问题数"
@ -225,7 +232,13 @@
:value2="negativeInfo.jcj110Size"
/>
</el-col>
<el-col :span="12" v-if="negativeInfo.jcj122BusinessSize || negativeInfo.jcj122Size">
<el-col
:span="12"
v-if="
negativeInfo.jcj122BusinessSize ||
negativeInfo.jcj122Size
"
>
<description-pair
label1="122接处警量"
label2="问题数"
@ -250,33 +263,31 @@
</el-row>
</el-col>
<el-col :span="8">
<h5>风险指数</h5>
<h5 style="margin-bottom: 0">风险指数</h5>
<div class="flex center">
<el-progress
type="dashboard"
:percentage="78"
:percentage="score"
:stroke-width="16"
:width="230"
color="#DC6231"
>
<div style="line-height: 64px" class="mt-40">
<span
style="
font-weight: 600;
font-size: 60px;
color: #e87749;
"
>78</span
:width="220"
:color="colors"
>
<span style="font-size: 18px; color: #999"
></span
<div
:type="getType()"
class="score-progress-body"
>
<div>
<span class="score-progress_score color">{{ score }}</span>
<span></span>
</div>
<div style="font-size: 14px" class="mb-10">
<div style="font-size: 14px" class="mb-16">
分险指标值
</div>
<div style="color: #e87749; font-size: 28px">
中风险
<div
class="score-progress_title color"
>
{{ getScoreLabel() }}
</div>
</div>
</el-progress>
</div>
@ -504,12 +515,13 @@ const radarOption = ref({
},
],
label: {
show: true
}
show: true,
},
},
],
});
const score = ref(0);
async function getProfileData() {
loading.value = true;
negativeQuery.value.idCode = activeRow.value.idCode;
@ -518,14 +530,15 @@ async function getProfileData() {
beginTime: time.value.length ? time.value[0] : "",
endTime: time.value.length ? time.value[1] : "",
});
score.value = data.score
console.log(data.expression);
policeInfo.value = data.policeInfo;
negativeInfo.value = data.negativeInfo;
problemSourcesPieOptions.value.series[0].data = data.problemSourcesList;
businessTypePieOptions.value.series[0].data = data.businessTypeList;
radarOption.value.radar.indicator = data.problemTypeRadarIndicator
radarOption.value.series[0].data[0].value = data.problemTypeRadarData
radarOption.value.radar.indicator = data.problemTypeRadarIndicator;
radarOption.value.series[0].data[0].value = data.problemTypeRadarData;
loading.value = false;
}
@ -549,9 +562,61 @@ function handleAction(row) {
negativeShow.value = true;
activeNegativeId.value = row.id;
}
const colors = [
{ color: "var(--success-color)", percentage: 60 },
{ color: "#DC6231", percentage: 80 },
{ color: "var(--danger-color)", percentage: 100 },
];
function getType() {
if (score.value < 60) {
return "success";
}
if (score.value < 60) {
return "warning";
}
return "danger";
}
function getScoreLabel() {
if (score.value < 60) {
return "低风险";
}
if (score.value < 60) {
return "中风险";
}
return "高风险";
}
</script>
<style lang="scss" scoped>
.col {
--label-width: 60px;
}
.score-progress-body {
text-align: center;
font-size: 18px;
.score-progress_score {
font-size: 60px;
line-height: 84px;
}
.score-progress_title {
font-size: 26px;
line-height: 22px;
}
&[type=success] {
.color {
color: var(--success-color);
}
}
&[type=wraning] {
.color {
color: #e87749;
}
}
&[type=danger] {
.color {
color: var(--danger-color);
}
}
}
</style>

6
src/views/system/Police.vue

@ -118,7 +118,7 @@
target="__blank"
style="padding: 8px"
v-perms="['police:import']"
>数字督察警员权限导入模板</a
>数字督察警员权限导入模板下载</a
>
</div>
<div>
@ -138,7 +138,7 @@
<template #default="{ row }">
<div class="row mt-10">
<div class="col col-6">
<label>角色</label>
<label>业务条线</label>
<span>{{
getDictLable(
dict.policeRole,
@ -403,7 +403,7 @@
<el-option value="副职">副职</el-option>
</el-select>
</el-form-item>
<el-form-item label="角色" prop="policeRole">
<el-form-item label="业务条线" prop="policeRole">
<el-select
clearable
v-model="form.policeRole"

Loading…
Cancel
Save