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> <template>
<el-dialog title="办结审批" v-model="show"> <el-dialog :title="negative.extensionApplyFlag ? `办结审批`: `申请延期审批`" v-model="show">
<el-form <el-form
label-position="top" label-position="top"
ref="formRef" ref="formRef"

115
src/views/sensitivePerception/PoliceNegative.vue

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

6
src/views/system/Police.vue

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

Loading…
Cancel
Save