Browse Source

fix: 完善单位问题画像、个人问题画像

main
wxc 1 year ago
parent
commit
463ae6de51
  1. 15
      src/components/datav/chart-bar.vue
  2. 15
      src/utils/util.ts
  3. 14
      src/views/datav/Gobal.vue
  4. 488
      src/views/sensitivePerception/DepartNegative.vue
  5. 463
      src/views/sensitivePerception/PoliceNegative.vue

15
src/components/datav/chart-bar.vue

@ -8,9 +8,10 @@
class="flex v-center bar-item between" class="flex v-center bar-item between"
v-for="item in data" v-for="item in data"
:size="size" :size="size"
:style="{'--label-width': `${labelWidth}px`}"
> >
<span class="bar-item-name mr-10">{{ item.label }}</span> <span class="bar-item-label mr-10">{{ item.label }}</span>
<div class="bar-item_content mr-16"> <div class="bar-item_content mr-16" >
<div <div
class="bar-item_content-bar" class="bar-item_content-bar"
:style="{ :style="{
@ -59,6 +60,10 @@ const props = defineProps({
color: { color: {
type: Object, type: Object,
default: "linear-gradient(270deg, #63e700 0%, #19674c 100%)" default: "linear-gradient(270deg, #63e700 0%, #19674c 100%)"
},
labelWidth: {
type: Number,
default: 80
} }
}); });
@ -123,12 +128,12 @@ function getColor(val) {
height: 25px; height: 25px;
font-size: 12px; font-size: 12px;
} }
.bar-item-name { .bar-item-label {
width: 19%;
text-align: right; text-align: right;
width: var(--label-width);
} }
.bar-item_content { .bar-item_content {
width: 55%; width: calc(100% - var(--label-width) - 80px);
.bar-item_content-bar { .bar-item_content-bar {
width: 0; width: 0;
height: 9px; height: 9px;

15
src/utils/util.ts

@ -369,3 +369,18 @@ export function getInvolveProblem(json) {
} }
return JSON.parse(json).map(item => item.dictLabel).join(' ') return JSON.parse(json).map(item => item.dictLabel).join(' ')
} }
export function getGenderFromIdCode(idCode) {
// 检查身份证号码是否有效(长度为18位)
if (!idCode || idCode.length !== 18) {
return "";
}
// 获取第17位数字
const genderCode = parseInt(idCode.charAt(16), 10);
// 检查是否为数字
if (isNaN(genderCode)) {
return "";
}
// 根据第17位数字判断性别
return genderCode % 2 === 0 ? "女" : "男";
}

14
src/views/datav/Gobal.vue

@ -387,49 +387,49 @@ const option1 = ref({
const data1 = [ const data1 = [
{ {
name: "开福分局", label: "开福分局",
value: 97, value: 97,
unit: "%", unit: "%",
numerator: 97, numerator: 97,
denominator: 100, denominator: 100,
}, },
{ {
name: "芙蓉分局", label: "芙蓉分局",
value: 90, value: 90,
unit: "%", unit: "%",
numerator: 90, numerator: 90,
denominator: 100, denominator: 100,
}, },
{ {
name: "岳麓分局", label: "岳麓分局",
value: 85, value: 85,
unit: "%", unit: "%",
numerator: 85, numerator: 85,
denominator: 100, denominator: 100,
}, },
{ {
name: "雨花分局", label: "雨花分局",
value: 80, value: 80,
unit: "%", unit: "%",
numerator: 80, numerator: 80,
denominator: 100, denominator: 100,
}, },
{ {
name: "望城分局", label: "望城分局",
value: 71, value: 71,
unit: "%", unit: "%",
numerator: 71, numerator: 71,
denominator: 100, denominator: 100,
}, },
{ {
name: "浏阳市局", label: "浏阳市局",
value: 66, value: 66,
unit: "%", unit: "%",
numerator: 66, numerator: 66,
denominator: 100, denominator: 100,
}, },
{ {
name: "长沙县局", label: "长沙县局",
value: 62, value: 62,
unit: "%", unit: "%",
numerator: 62, numerator: 62,

488
src/views/sensitivePerception/DepartNegative.vue

@ -19,7 +19,7 @@
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="三级单位"> <el-form-item label="单位">
<depart-tree-select <depart-tree-select
v-model="query.departId" v-model="query.departId"
:check-strictly="false" :check-strictly="false"
@ -83,7 +83,11 @@
align="center" align="center"
width="160" width="160"
/> />
<el-table-column label="风险指数" align="center" width="160">
<template #default="{ row }">
<span>/</span>
</template>
</el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template #default="{ row }"> <template #default="{ row }">
<el-button <el-button
@ -112,7 +116,13 @@
</div> </div>
</div> </div>
<el-dialog title="单位问题画像" v-model="show" width="85vw" top="2vh"> <el-dialog
title="单位问题画像"
v-model="show"
width="85vw"
top="1vh"
style="margin: 1vh auto"
>
<header class="flex center v-center gap"> <header class="flex center v-center gap">
<label>统计范围</label> <label>统计范围</label>
<div style="width: 320px"> <div style="width: 320px">
@ -124,203 +134,223 @@
</div> </div>
<el-button type="primary" @click="getProfileData">查询</el-button> <el-button type="primary" @click="getProfileData">查询</el-button>
</header> </header>
<main v-loading="loading"> <el-scrollbar
<el-row class="mb-20"> max-height="calc(98vh - 120px)"
<el-col :span="8"> v-loading="loading"
<h5>单位情况</h5> element-loading-text="单位问题画像加载中..."
<div class="row"> >
<div class="col col-24"> <main>
<label>单位名称</label> <el-row class="mb-20">
<span>{{ departInfo.name }}</span> <el-col :span="8">
</div> <h5>单位情况</h5>
<div class="col col-24"> <div class="row">
<label>所长</label> <div class="col col-24">
<span>{{ departInfo.mainRole }}</span> <label>单位名称</label>
</div> <span>{{ departInfo.name }}</span>
<div class="col col-24">
<label>副所长</label>
<span>
<span
v-for="item in departInfo.deputyRole"
:key="item"
>{{ item }}</span
>
</span>
</div>
</div>
<el-row>
<el-col :span="12">
<description-pair
label1="民警总人数"
label2="问题涉及民警数"
:value1="departInfo.policeSize"
:value2="departInfo.policeSize"
size="large"
/>
</el-col>
<el-col :span="12">
<description-pair
label1="协辅警人数"
label2="问题涉及协辅警数"
:value1="departInfo.auxSize"
:value2="departInfo.policeSize"
size="large"
/>
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<h5>问题情况</h5>
<el-row
class="flex v-center"
style="height: calc(100% - 76px)"
>
<el-col :span="6" class="text-center">
<div class="text-primary" style="font-size: 34px">
{{ activeRow.verifySize }}
</div> </div>
<div>问题总数</div> <div class="col col-24">
</el-col> <label>所长</label>
<el-col :span="18"> <span>{{ departInfo.mainRole }}</span>
<el-row>
<el-col :span="12">
<description-pair
label1="110接处警量"
label2="问题数"
:value1="negativeInfo.jcjBusinessSize"
:value2="negativeInfo.jcjSize"
/>
</el-col>
<el-col :span="12">
<description-pair
label1="执法办案"
label2="问题数"
:value1="negativeInfo.zfbaBusinessSize"
:value2="negativeInfo.zfbaSize"
/>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<h5>风险指数</h5>
<div class="flex center">
<el-progress
type="dashboard"
:percentage="78"
:stroke-width="16"
:width="250"
color="#DC6231"
>
<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"
></span
>
</div> </div>
<div style="font-size: 14px" class="mb-10"> <div class="col col-24">
分险指标值 <label>副所长</label>
<span>
<span
v-for="item in departInfo.deputyRole"
:key="item"
>{{ item }}</span
>
</span>
</div> </div>
<div style="color: #e87749; font-size: 28px"> </div>
中风险 <el-row>
</div> <el-col :span="12">
</el-progress> <description-pair
</div> label1="民警总人数"
</el-col> label2="问题涉及民警数"
</el-row> :value1="departInfo.policeSize"
<el-row class="mb-20"> :value2="departInfo.policeSize"
<el-col :span="8"> size="large"
<h5>问题来源占比</h5> />
</el-col>
<el-col :span="12">
<description-pair
label1="协辅警人数"
label2="问题涉及协辅警数"
:value1="departInfo.auxSize"
:value2="departInfo.policeSize"
size="large"
/>
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<h5>问题情况</h5>
<el-row
class="flex v-center"
style="height: calc(100% - 76px)"
>
<el-col :span="6" class="text-center">
<div
class="text-primary"
style="font-size: 34px"
>
{{ activeRow.verifySize }}
</div>
<div>问题总数</div>
</el-col>
<el-col :span="18">
<el-row>
<el-col :span="12">
<description-pair
label1="110接处警量"
label2="问题数"
:value1="
negativeInfo.jcjBusinessSize
"
:value2="negativeInfo.jcjSize"
/>
</el-col>
<el-col :span="12">
<description-pair
label1="执法办案"
label2="问题数"
:value1="
negativeInfo.zfbaBusinessSize
"
:value2="negativeInfo.zfbaSize"
/>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<h5>风险指数</h5>
<div class="flex center">
<el-progress
type="dashboard"
:percentage="78"
:stroke-width="16"
:width="250"
color="#DC6231"
>
<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"
></span
>
</div>
<div style="font-size: 14px" class="mb-10">
分险指标值
</div>
<div style="color: #e87749; font-size: 28px">
中风险
</div>
</el-progress>
</div>
</el-col>
</el-row>
<el-row class="mb-20">
<el-col :span="8">
<h5>问题来源占比</h5>
<v-charts
style="height: 320px"
:option="problemSourcesPieOptions"
autoresize
/>
</el-col>
<el-col :span="8">
<h5>业务类型占比</h5>
<v-charts
style="height: 320px"
:option="businessTypePieOptions"
autoresize
/>
</el-col>
<el-col :span="8">
<h5>风险问题构成</h5>
<v-charts
style="height: 320px"
:option="radarOption"
autoresize
/>
</el-col>
</el-row>
<el-row class="mb-20">
<el-col :span="8">
<h5>个人问题排名</h5>
<datav-chart-bar
size="small"
:data="policeBarList"
:color="colors"
/>
</el-col>
<el-col :span="8">
<h5>突出问题排名</h5>
<datav-chart-bar size="small" :data="problemTypeBarList" :color="colors" />
</el-col>
<el-col :span="8">
<h5>单位问题标签</h5>
</el-col>
</el-row>
<div style="margin-top: 60px">
<h5>问题变化趋势</h5>
<v-charts <v-charts
style="height: 320px" style="height: 320px"
:option="problemSourcesPieOptions" :option="barOption"
autoresize autoresize
/> />
</el-col> <div></div>
<el-col :span="8"> </div>
<h5>业务类型占比</h5> <h5>问题清单</h5>
<v-charts <el-table :data="negativeList">
style="height: 320px" <el-table-column label="发现时间" prop="discoveryTime" />
:option="businessTypePieOptions" <el-table-column label="问题来源" prop="problemSources" />
autoresize <el-table-column label="业务类别" prop="businessTypeName" />
<el-table-column
label="涉及单位"
prop="involveDepartName"
/> />
</el-col> <el-table-column
<el-col :span="8"> label="核查情况"
<h5>风险问题构成</h5> prop="checkStatusName"
</el-col> width="140"
</el-row> align="center"
<el-row class="mb-20">
<el-col :span="8">
<h5>个人问题排名</h5>
<datav-chart-bar
size="small"
:data="policeBarList"
:color="colors"
/> />
</el-col> <el-table-column label="操作" width="160">
<el-col :span="8"> <template #default="{ row }">
<h5>突出问题排名</h5> <el-button
<datav-chart-bar size="small" :data="[]" /> type="primary"
</el-col> link
<el-col :span="8"> @click="handleAction(row)"
<h5>单位问题标签</h5> >查看详情</el-button
<datav-chart-bar size="small" :data="[]" /> >
</el-col> </template>
</el-row> </el-table-column>
<div style="margin-top: 60px"> </el-table>
<h5>问题变化趋势</h5> <div class="flex end mt-8">
<v-charts <el-pagination
style="height: 320px" @size-change="getNegativeList"
:option="barOption" @current-change="getNegativeList"
autoresize :current-page="negativeQuery.current"
/> :page-sizes="[10, 20, 50]"
<div></div> :page-size="negativeQuery.size"
</div> v-model:current-page="negativeQuery.current"
<h5>问题清单</h5> layout="total, sizes, prev, pager, next"
<el-table :data="negativeList"> :total="negativeTotal"
<el-table-column label="发现时间" prop="discoveryTime" /> >
<el-table-column label="问题来源" prop="problemSources" /> </el-pagination>
<el-table-column label="业务类别" prop="businessTypeName" /> </div>
<el-table-column label="涉及单位" prop="involveDepartName" /> </main>
<el-table-column </el-scrollbar>
label="核查情况"
prop="checkStatusName"
width="140"
align="center"
/>
<el-table-column label="操作" width="160">
<template #default="{ row }">
<el-button
type="primary"
link
@click="handleAction(row)"
>查看详情</el-button
>
</template>
</el-table-column>
</el-table>
<div class="flex end mt-8">
<el-pagination
@size-change="getNegativeList"
@current-change="getNegativeList"
:current-page="negativeQuery.current"
:page-sizes="[10, 20, 50]"
:page-size="negativeQuery.size"
v-model:current-page="negativeQuery.current"
layout="total, sizes, prev, pager, next"
:total="negativeTotal"
>
</el-pagination>
</div>
</main>
</el-dialog> </el-dialog>
<negative-dialog <negative-dialog
@ -445,13 +475,34 @@ watch(activeRow, async () => {
moment().format("YYYY-MM-DD HH:mm:ss"), moment().format("YYYY-MM-DD HH:mm:ss"),
]; ];
await getProfileData(); await getProfileData();
listNegativeMonthly(row.departId).then((data) => { listNegativeMonthly(activeRow.value.departId).then((data) => {
barOption.value.xAxis.data = data.months; barOption.value.xAxis.data = data.months;
barOption.value.series[0].data = data.values; barOption.value.series[0].data = data.values;
}); });
}); });
const time = ref([]); const time = ref([]);
const radarOption = ref({
radar: {
indicator: [],
},
series: [
{
type: "radar",
data: [
{
value: [],
},
],
label: {
show: true
}
},
],
});
const problemTypeBarList = ref([])
async function getProfileData() { async function getProfileData() {
loading.value = true; loading.value = true;
negativeQuery.value.involveDepartId = activeRow.value.departId; negativeQuery.value.involveDepartId = activeRow.value.departId;
@ -467,6 +518,11 @@ async function getProfileData() {
businessTypePieOptions.value.series[0].data = data.businessTypeList; businessTypePieOptions.value.series[0].data = data.businessTypeList;
policeBarList.value = data.policeBarList; policeBarList.value = data.policeBarList;
radarOption.value.radar.indicator = data.problemTypeRadarIndicator
radarOption.value.series[0].data[0].value = data.problemTypeRadarData
problemTypeBarList.value = data.problemTypeBarList
loading.value = false; loading.value = false;
} }
@ -483,54 +539,6 @@ const colors = [
{ color: "#E8684A ", percentage: 80 }, { color: "#E8684A ", percentage: 80 },
]; ];
const barList = [
{
label: "张三",
value: 67,
},
{
label: "李四",
value: 80,
},
{
label: "王五",
value: 40,
},
{
label: "王五",
value: 40,
},
{
label: "王五",
value: 10,
},
];
const radarOption = {
radar: {
// shape: 'circle',
indicator: [
{ name: "内部管理", max: 6500 },
{ name: "涉及监督", max: 6500 },
{ name: "记录作风", max: 30000 },
{ name: "警保卫工作", max: 38000 },
{ name: "执法办案", max: 52000 },
{ name: "专项工作", max: 25000 },
],
},
series: [
{
name: "Budget vs spending",
type: "radar",
data: [
{
value: [4200, 3000, 20000, 35000, 50000, 18000],
},
],
},
],
};
const negativeShow = ref(false); const negativeShow = ref(false);
const activeNegativeId = ref(""); const activeNegativeId = ref("");
function handleAction(row) { function handleAction(row) {

463
src/views/sensitivePerception/PoliceNegative.vue

@ -50,7 +50,7 @@
</div> </div>
</div> </div>
</header> </header>
<div class="table-container"> <div class="table-container" v-loading="mainLoading">
<el-table :data="list"> <el-table :data="list">
<el-table-column label="姓名" prop="name" /> <el-table-column label="姓名" prop="name" />
<el-table-column label="性别"> <el-table-column label="性别">
@ -85,6 +85,11 @@
width="120" width="120"
align="center" align="center"
/> />
<el-table-column label="风险指数" align="center" width="160">
<template #default="{ row }">
<span>/</span>
</template>
</el-table-column>
<el-table-column label="操作" width="160"> <el-table-column label="操作" width="160">
<template #default="{ row }"> <template #default="{ row }">
<el-button <el-button
@ -113,7 +118,13 @@
</div> </div>
</div> </div>
<el-dialog title="个人问题画像" v-model="show" width="85vw" top="2vh"> <el-dialog
title="个人问题画像"
v-model="show"
width="85vw"
top="1vh"
style="margin: 1vh auto"
>
<header class="flex center v-center gap"> <header class="flex center v-center gap">
<label>统计范围</label> <label>统计范围</label>
<div style="width: 320px"> <div style="width: 320px">
@ -125,184 +136,217 @@
</div> </div>
<el-button type="primary" @click="getProfileData">查询</el-button> <el-button type="primary" @click="getProfileData">查询</el-button>
</header> </header>
<main v-loading="loading"> <el-scrollbar
<el-row class="mb-20"> max-height="calc(98vh - 120px)"
<el-col :span="8"> v-loading="loading"
<h5>民警基本情况</h5> element-loading-text="个人问题画像加载中..."
<el-row> >
<el-col :span="6"> <main>
<img src="/imgs/police.jpeg" /> <el-row class="mb-20">
</el-col> <el-col :span="8">
<el-col :span="18"> <h5>民警基本情况</h5>
<div class="row"> <el-row>
<div class="col col-12"> <el-col :span="6">
<label>姓名</label> <img src="/favicon.png" />
<span>{{ policeInfo.name }}</span> </el-col>
<el-col :span="18">
<div class="row">
<div class="col col-12">
<label>姓名</label>
<span>{{ policeInfo.name }}</span>
</div>
<div class="col col-12">
<label>性别</label>
<span>{{
getGenderFromIdCode(
policeInfo.idCode
)
}}</span>
</div>
<div class="col col-24">
<label>所属单位</label>
<span>
<span
>{{
activeRow.parentDepartName
? activeRow.parentDepartName +
"/"
: activeRow.parentDepartName
}}{{
activeRow.departName
}}</span
>
</span>
</div>
<div class="col col-12">
<label>警号</label>
<span>{{ policeInfo.empNo }}</span>
</div>
<div class="col col-12">
<label>任职年份</label>
<span>{{
policeInfo.employmentDate || "/"
}}</span>
</div>
<div class="col col-12">
<label>手机号</label>
<span>{{
policeInfo.mobile || "/"
}}</span>
</div>
</div> </div>
<div class="col col-12"> </el-col>
<label>性别</label> </el-row>
<span>{{ </el-col>
getGenderFromIdCode(policeInfo.idCode) <el-col :span="8">
}}</span> <h5>问题情况</h5>
</div> <el-row
<div class="col col-24"> class="flex v-center"
<label>所属单位</label> style="height: calc(100% - 76px)"
<span> >
<span <el-col :span="6" class="text-center">
>{{ <div
activeRow.parentDepartName class="text-primary"
? activeRow.parentDepartName + style="font-size: 34px"
"/" >
: activeRow.parentDepartName {{ activeRow.verifySize }}
}}{{ activeRow.departName }}</span
>
</span>
</div> </div>
<div class="col col-12"> <div>问题总数</div>
<label>警号</label> </el-col>
<span>{{ policeInfo.empNo }}</span> <el-col :span="18">
<el-row>
<el-col :span="12">
<description-pair
label1="110接处警量"
label2="问题数"
:value1="
negativeInfo.jcjBusinessSize
"
:value2="negativeInfo.jcjSize"
/>
</el-col>
<el-col :span="12">
<description-pair
label1="执法办案"
label2="问题数"
:value1="
negativeInfo.zfbaBusinessSize
"
:value2="negativeInfo.zfbaSize"
/>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<h5>风险指数</h5>
<div class="flex center">
<el-progress
type="dashboard"
:percentage="78"
:stroke-width="16"
:width="250"
color="#DC6231"
>
<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"
></span
>
</div> </div>
<div class="col col-12"> <div style="font-size: 14px" class="mb-10">
<label>任职年份</label> 分险指标值
<span>{{ policeInfo.employmentDate }}</span>
</div> </div>
<div class="col col-12"> <div style="color: #e87749; font-size: 28px">
<label>手机号</label> 中风险
<span>{{ policeInfo.mobile }}</span>
</div> </div>
</div> </el-progress>
</el-col> </div>
</el-row> </el-col>
</el-col> </el-row>
<el-col :span="8"> <el-row class="mb-20">
<h5>问题情况</h5> <el-col :span="8">
<el-row <h5>问题来源占比</h5>
class="flex v-center" <v-charts
style="height: calc(100% - 76px)" style="height: 320px"
> :option="problemSourcesPieOptions"
<el-col :span="6" class="text-center"> autoresize
<div class="text-primary" style="font-size: 34px"> />
{{ activeRow.verifySize }} </el-col>
</div> <el-col :span="8">
<div>问题总数</div> <h5>业务类型占比</h5>
</el-col> <v-charts
<el-col :span="18"> style="height: 320px"
<el-row> :option="businessTypePieOptions"
<el-col :span="12"> autoresize
<description-pair />
label1="110接处警量" </el-col>
label2="问题数" <el-col :span="8">
:value1="negativeInfo.jcjBusinessSize" <h5>风险问题构成</h5>
:value2="negativeInfo.jcjSize" <v-charts
/> style="height: 320px"
</el-col> :option="radarOption"
<el-col :span="12"> autoresize
<description-pair />
label1="执法办案" </el-col>
label2="问题数" </el-row>
:value1="negativeInfo.zfbaBusinessSize"
:value2="negativeInfo.zfbaSize"
/>
</el-col>
</el-row>
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<h5>风险指数</h5>
<div class="flex center">
<el-progress
type="dashboard"
:percentage="78"
:stroke-width="16"
:width="250"
color="#DC6231"
>
<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"
></span
>
</div>
<div style="font-size: 14px" class="mb-10">
分险指标值
</div>
<div style="color: #e87749; font-size: 28px">
中风险
</div>
</el-progress>
</div>
</el-col>
</el-row>
<el-row class="mb-20">
<el-col :span="8">
<h5>问题来源占比</h5>
<v-charts
style="height: 320px"
:option="problemSourcesPieOptions"
autoresize
/>
</el-col>
<el-col :span="8">
<h5>业务类型占比</h5>
<v-charts
style="height: 320px"
:option="businessTypePieOptions"
autoresize
/>
</el-col>
<el-col :span="8">
<h5>风险问题构成</h5>
</el-col>
</el-row>
<h5>问题变化趋势</h5> <h5>问题变化趋势</h5>
<v-charts style="height: 320px" :option="barOption" autoresize /> <v-charts
<div></div> style="height: 320px"
<h5>问题清单</h5> :option="barOption"
<el-table :data="negativeList"> autoresize
<el-table-column label="发现时间" prop="discoveryTime" />
<el-table-column label="问题来源" prop="problemSources" />
<el-table-column label="业务类别" prop="businessTypeName" />
<el-table-column label="涉及单位" prop="involveDepartName" />
<el-table-column
label="核查情况"
prop="checkStatusName"
width="140"
align="center"
/> />
<el-table-column label="操作" width="160"> <div></div>
<template #default="{ row }"> <h5>问题清单</h5>
<el-button <el-table :data="negativeList">
type="primary" <el-table-column label="发现时间" prop="discoveryTime" />
link <el-table-column label="问题来源" prop="problemSources" />
@click="handleAction(row)" <el-table-column label="业务类别" prop="businessTypeName" />
>查看详情</el-button <el-table-column
> label="涉及单位"
</template> prop="involveDepartName"
</el-table-column> />
</el-table> <el-table-column
<div class="flex end mt-8"> label="核查情况"
<el-pagination prop="checkStatusName"
@size-change="getNegativeList" width="140"
@current-change="getNegativeList" align="center"
:current-page="negativeQuery.current" />
:page-sizes="[10, 20, 50]" <el-table-column label="操作" width="160">
:page-size="negativeQuery.size" <template #default="{ row }">
v-model:current-page="negativeQuery.current" <el-button
layout="total, sizes, prev, pager, next" type="primary"
:total="negativeTotal" link
> @click="handleAction(row)"
</el-pagination> >查看详情</el-button
</div> >
</main> </template>
</el-table-column>
</el-table>
<div class="flex end mt-8">
<el-pagination
@size-change="getNegativeList"
@current-change="getNegativeList"
:current-page="negativeQuery.current"
:page-sizes="[10, 20, 50]"
:page-size="negativeQuery.size"
v-model:current-page="negativeQuery.current"
layout="total, sizes, prev, pager, next"
:total="negativeTotal"
>
</el-pagination>
</div>
</main>
</el-scrollbar>
</el-dialog> </el-dialog>
<negative-dialog <negative-dialog
@ -320,7 +364,7 @@ import {
listNegativeMonthly, listNegativeMonthly,
} from "@/api/sensitivePerception/profilePolice"; } from "@/api/sensitivePerception/profilePolice";
import { InspectCase } from "@/enums/dictEnums"; import { InspectCase } from "@/enums/dictEnums";
import { getDictLable } from "@/utils/util"; import { getDictLable, getGenderFromIdCode } from "@/utils/util";
import moment from "moment"; import moment from "moment";
import useCatchStore from "@/stores/modules/catch"; import useCatchStore from "@/stores/modules/catch";
@ -338,10 +382,13 @@ const query = ref({
const list = ref<any[]>([]); const list = ref<any[]>([]);
const total = ref(0); const total = ref(0);
const mainLoading = ref(false);
function getList() { function getList() {
mainLoading.value = true;
listPoliceNegative(query.value).then((data) => { listPoliceNegative(query.value).then((data) => {
list.value = data.records; list.value = data.records;
total.value = data.total; total.value = data.total;
mainLoading.value = false;
}); });
} }
@ -426,13 +473,33 @@ watch(activeRow, async () => {
moment().format("YYYY-MM-DD HH:mm:ss"), moment().format("YYYY-MM-DD HH:mm:ss"),
]; ];
await getProfileData(); await getProfileData();
listNegativeMonthly(row.idCode).then((data) => { listNegativeMonthly(activeRow.value.idCode).then((data) => {
barOption.value.xAxis.data = data.months; barOption.value.xAxis.data = data.months;
barOption.value.series[0].data = data.values; barOption.value.series[0].data = data.values;
}); });
}) });
const time = ref([]); const time = ref([]);
const radarOption = ref({
radar: {
indicator: [],
},
series: [
{
type: "radar",
data: [
{
value: [],
},
],
label: {
show: true
}
},
],
});
async function getProfileData() { async function getProfileData() {
loading.value = true; loading.value = true;
negativeQuery.value.idCode = activeRow.value.idCode; negativeQuery.value.idCode = activeRow.value.idCode;
@ -447,6 +514,8 @@ async function getProfileData() {
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.series[0].data[0].value = data.problemTypeRadarData
loading.value = false; loading.value = false;
} }
@ -464,48 +533,6 @@ function getNegativeList() {
}); });
} }
const radarOption = {
radar: {
// shape: 'circle',
indicator: [
{ name: "内部管理", max: 6500 },
{ name: "涉及监督", max: 6500 },
{ name: "记录作风", max: 30000 },
{ name: "警保卫工作", max: 38000 },
{ name: "执法办案", max: 52000 },
{ name: "专项工作", max: 25000 },
],
},
series: [
{
name: "Budget vs spending",
type: "radar",
data: [
{
value: [4200, 3000, 20000, 35000, 50000, 18000],
},
],
},
],
};
function getGenderFromIdCode(idCode) {
// 18
if (!idCode || idCode.length !== 18) {
return "";
}
// 17
const genderCode = parseInt(idCode.charAt(16), 10);
//
if (isNaN(genderCode)) {
return "";
}
// 17
return genderCode % 2 === 0 ? "女" : "男";
}
const negativeShow = ref(false); const negativeShow = ref(false);
const activeNegativeId = ref(""); const activeNegativeId = ref("");
function handleAction(row) { function handleAction(row) {

Loading…
Cancel
Save