Browse Source

fix: 完善导入警员权限

main
sjh 1 year ago committed by wxc
parent
commit
7be0269c99
  1. 8
      src/api/datav.ts
  2. 1
      src/layout/components/Aside.vue
  3. 16
      src/utils/feedback.ts
  4. 50
      src/views/data/Ajhc.vue
  5. 3
      src/views/datav/CaseVerif.vue
  6. 228
      src/views/datav/MailVisits.vue
  7. 77
      src/views/sensitivePerception/ModelClueTask.vue
  8. 59
      src/views/system/Police.vue

8
src/api/datav.ts

@ -6,6 +6,14 @@ export function getCaseVerifData(times) {
});
}
export function getMailVisitsData(times) {
return request.get({
url: `/datav/mailVisits?beginTime=${times[0]}&endTime=${times[1]}`
});
}
export function getRightsComfortData(times) {
return request.get({
url: `/datav/rightsComfort?beginTime=${times[0]}&endTime=${times[1]}`

1
src/layout/components/Aside.vue

@ -62,7 +62,6 @@
<script setup>
import { MenuEnum } from "@/enums/appEnums";
import useUserStore from "@/stores/modules/user";
const asideCollapse = ref(false);
const userStore = useUserStore();
const routes = computed(() => userStore.routes);

16
src/utils/feedback.ts

@ -19,15 +19,25 @@ export class Feedback {
}
// 错误消息
msgError(msg: string) {
ElMessage.error(msg)
ElMessage.error({
message: msg,
type: 'error',
duration: 5000
})
}
// 成功消息
msgSuccess(msg: string) {
ElMessage.success(msg)
ElMessage.success({
message: msg,
type: 'success'
})
}
// 警告消息
msgWarning(msg: string) {
ElMessage.warning(msg)
ElMessage.warning({
message: msg,
type: 'warning'
})
}
// 弹出提示
alert(msg: string) {

50
src/views/data/Ajhc.vue

@ -122,12 +122,7 @@
<el-table-column label="业务类别" prop="businessTypeName" />
<el-table-column label="涉嫌问题" prop="involveProblem" />
<el-table-column label="涉及警种" prop="policeTypeName" />
<el-table-column label="涉及单位" show-overflow-tooltip>
<template #default="{ row }">
<span>{{ row.secondDepartName }}</span>
<span>{{ row.thirdDepartName }}</span>
</template>
</el-table-column>
<el-table-column label="涉及单位" prop="involveDepartName" />
<el-table-column
label="具体内容"
prop="thingDesc"
@ -145,6 +140,7 @@
</el-table-column>
<el-table-column label="操作" width="200">
<template #default="{ row }">
<template
v-if="
row.distributionState ===
@ -230,11 +226,7 @@
prop="discoveryTime"
show-overflow-tooltip
/>
<el-table-column
label="问题发生时间"
prop="happenTime"
show-overflow-tooltip
/>
<el-table-column label="问题发生时间" prop="happenTime" show-overflow-tooltip />
<el-table-column
label="问题来源"
prop="problemSources"
@ -253,12 +245,10 @@
<el-table-column label="业务类别" prop="businessTypeName" />
<el-table-column label="涉嫌问题" prop="involveProblem" />
<el-table-column label="涉及警种" prop="policeTypeName" />
<el-table-column label="涉及单位" show-overflow-tooltip>
<template #default="{ row }">
<span>{{ row.secondDepartName }}</span>
<span>{{ row.thirdDepartName }}</span>
</template>
</el-table-column>
<el-table-column
label="涉及单位"
prop="involveDepartName"
/>
<el-table-column
label="具体内容"
prop="thingDesc"
@ -266,6 +256,7 @@
/>
<el-table-column label="操作" width="140">
<template #default="{ row }">
<el-button
type="info"
link
@ -333,7 +324,10 @@
</el-form-item>
</el-form>
<footer class="flex end mt-20">
<el-button type="primary" size="large" @click="handleSubmit"
<el-button
type="primary"
size="large"
@click="handleSubmit"
>确认下发</el-button
>
</footer>
@ -356,7 +350,7 @@ const catchStore = useCatchStore();
const dict = catchStore.getDicts([
"distributionState",
"timeLimit",
"approvalFlow",
"approvalFlow"
]);
const query = ref({
@ -405,7 +399,7 @@ function handleShowDistributeDialog() {
distributeShow.value = true;
}
const form = ref({});
const formRef = ref();
const formRef = ref()
function handleRemoveDistribute(row) {
distributeList.value.splice(
@ -417,14 +411,14 @@ function handleRemoveDistribute(row) {
}
async function handleSubmit() {
await formRef.value.validate();
form.value.data = distributeList.value;
await distributeCaseVerif(form.value);
form.value = {};
distributeShow.value = false;
distributeListShow.value = false;
feedback.msgSuccess("下发成功");
getList();
await formRef.value.validate()
form.value.data = distributeList.value
await distributeCaseVerif(form.value)
form.value = {}
distributeShow.value = false
distributeListShow.value = false
feedback.msgSuccess('下发成功')
getList()
}
</script>
<style lang="scss" scoped>

3
src/views/datav/CaseVerif.vue

@ -23,6 +23,7 @@
size="large"
/>
</datav-tab-item>
</datav-tabs>
</datav-card>
<datav-card title="案件问题性质">
@ -136,6 +137,7 @@
</div>
</el-scrollbar>
</template>
<script setup>
import vCharts from "vue-echarts";
import changshaMap from "@/assets/data/changsha.json";
@ -371,6 +373,7 @@ const option4 = {
const activeTab = ref("1");
</script>
<style lang="scss" scoped>
@import "@/style/datav.scss";
</style>

228
src/views/datav/MailVisits.vue

@ -10,7 +10,7 @@
<el-col :span="8">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
6259
{{ overview.firstMail }}
</div>
<div class="descriptions_label">
初信初访
@ -20,7 +20,7 @@
<el-col :span="8">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
988
{{ overview.secondMail }}
</div>
<div class="descriptions_label">
重复信访
@ -30,7 +30,7 @@
<el-col :span="8">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
2120
{{ overview.leaderReceiveMail }}
</div>
<div class="descriptions_label">
领导接访
@ -38,18 +38,72 @@
</div>
</el-col>
</el-row>
<datav-card >
<datav-tabs v-model="activeTab">
<datav-tab-item label="分县市局" name="1">
<datav-tabs
v-model="activeMailTab"
type="bottom-button"
>
<datav-tab-item label="初信初访" name="1">
<datav-chart-bar
sub-title="办结率"
:data="data1"
:data="fxsjFirstMailList"
size="large"
/>
<div class="flex tab-title flex center mt-20" style="margin-bottom: 20px">
<div class="tab-title-item active">
初信初访
</div>
<div class="tab-title-item">重复信访</div>
<div class="tab-title-item">领导接访</div>
</div>
</datav-tab-item>
<datav-tab-item label="重复信访" name="2">
<datav-chart-bar
:data="fxsjRepeatMailList"
:max="11"
size="large"
/>
</datav-tab-item>
<datav-tab-item label="领导接访" name="3">
<datav-chart-bar
:data="fxsjLeaderViewMailList"
:max="11"
size="large"
/>
</datav-tab-item>
</datav-tabs>
</datav-tab-item>
<datav-tab-item label="部委支队" name="2">
<datav-tabs
v-model="activeTab"
type="bottom-button"
>
<datav-tab-item label="初信初访" name="1">
<datav-chart-bar
:data="bwzdFirstMailList"
size="large"
/>
</datav-tab-item>
<datav-tab-item label="重复信访" name="2">
<datav-chart-bar
:data="bwzdRepeatMailList"
:max="11"
size="large"
/>
</datav-tab-item>
<datav-tab-item label="领导接访" name="3">
<datav-chart-bar
:data="bwzdLeaderViewMailList"
:max="11"
size="large"
/>
</datav-tab-item>
</datav-tabs>
</datav-tab-item>
</datav-tabs>
</datav-card>
</datav-card>
<datav-card title="信访问题类型">
<v-charts
style="height: 300px"
@ -65,27 +119,27 @@
</div>
<div class="flex gap-42">
<datav-statistic
:value="7247"
:value="overview.total"
title="信访总件数"
style="width: 20%"
/>
<datav-statistic
:value="562"
:value="overview.countryMail"
title="国家信访"
style="width: 20%"
/>
<datav-statistic
:value="1463"
:value="overview.policeMail"
title="公安部信访"
style="width: 20%"
/>
<datav-statistic
:value="5153"
:value="overview.commissionerMail"
title="局长信箱"
style="width: 20%"
/>
<datav-statistic
:value="39"
:value="overview.numMail"
title="12337信访"
style="width: 20%"
/>
@ -109,7 +163,7 @@
<el-col :span="8">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
25
{{ overview.leaderViewMail }}
</div>
<div class="descriptions_label">
领导督办
@ -119,7 +173,7 @@
<el-col :span="8">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
21
{{ overview.tangleMail }}
</div>
<div class="descriptions_label">
缠访闹访
@ -129,7 +183,7 @@
<el-col :span="8">
<div class="descriptions_cell text-center">
<div class="descriptions_content">
126
{{ overview.massMail }}
</div>
<div class="descriptions_label">
群体集访
@ -137,18 +191,74 @@
</div>
</el-col>
</el-row>
<!-- <datav-chart-bar-->
<!-- sub-title="数量"-->
<!-- :data="data3"-->
<!-- :max="7"-->
<!-- />-->
<datav-card >
<datav-tabs v-model="activeTabRight">
<datav-tab-item label="分县市局" name="1">
<datav-tabs
v-model="activeMailTabRight"
type="bottom-button"
>
<datav-tab-item label="领导督办" name="1">
<datav-chart-bar
sub-title="数量"
:data="data3"
:max="7"
:data="fxsjFirstMailList"
size="large"
/>
<div class="flex tab-title flex center mt-20" style="margin-bottom: 20px">
<div class="tab-title-item active">
领导督办
</div>
<div class="tab-title-item">缠访闹访</div>
<div class="tab-title-item">群体集访</div>
</div>
</datav-tab-item>
<datav-tab-item label="缠访闹访" name="2">
<datav-chart-bar
:data="fxsjRepeatMailList"
:max="11"
size="large"
/>
</datav-tab-item>
<datav-tab-item label="群体集访" name="3">
<datav-chart-bar
:data="jsdwBarList"
:max="11"
size="large"
/>
</datav-tab-item>
</datav-tabs>
</datav-tab-item>
<datav-tab-item label="部委支队" name="2">
<datav-tabs
v-model="activeMailTabRight"
type="bottom-button"
>
<datav-tab-item label="领导督办" name="1">
<datav-chart-bar
:data="fxsjFirstMailList"
size="large"
/>
</datav-tab-item>
<datav-tab-item label="缠访闹访" name="2">
<datav-chart-bar
:data="fxsjRepeatMailList"
:max="11"
size="large"
/>
</datav-tab-item>
<datav-tab-item label="群体集访" name="3">
<datav-chart-bar
:data="jsdwBarList"
:max="11"
size="large"
/>
</datav-tab-item>
</datav-tabs>
</datav-tab-item>
</datav-tabs>
</datav-card>
</datav-card>
<datav-card title="追责问责情况">
<v-charts
@ -163,10 +273,14 @@
</div>
</el-scrollbar>
</template>
<script setup>
import vCharts from "vue-echarts";
import changshaMap from "@/assets/data/changsha.json";
import * as echarts from "echarts/core";
import {getMailVisitsData} from "@/api/datav";
import moment from "moment/moment.js";
echarts.registerMap("changsha", changshaMap);
const option = {
@ -311,8 +425,6 @@ const data1 = [
numerator: 641,
denominator: 720,
},
{
name: "望城分局",
value: 85,
@ -443,6 +555,58 @@ const option3 = {
},
],
};
const activeTab = ref("1");
const activeMailTab = ref("1");
const activeTabRight=ref("1");
const activeMailTabRight=ref("1");
//
const overview = ref({
total: 0,
countryMail: 0,
policeMail: 0,
commissionerMail: 0,
numMail: 0,
firstMail: 0,
secondMail: 0,
leaderReceiveMail: 0,
leaderViewMail: 0,
tangleMail: 0,
massMail: 0,
});
//
const fxsjFirstMailList = ref([]);
const fxsjRepeatMailList = ref([]);
const fxsjLeaderViewMailList= ref([]);
//
const bwzdFirstMailList = ref([]);
const bwzdRepeatMailList = ref([]);
const bwzdLeaderViewMailList= ref([]);
const time = ref([
moment().startOf("year").format("YYYY-MM-DD"),
moment().format("YYYY-MM-DD"),
]);
function getData() {
getMailVisitsData(time.value).then((data) => {
overview.value = data.overview;
fxsjFirstMailList.value = data.fxsjFirstMailList;
fxsjRepeatMailList.value = data.fxsjRepeatMailList;
fxsjLeaderViewMailList.value = data.fxsjLeaderViewMailList;
bwzdFirstMailList.value = data.bwzdFirstMailList;
bwzdRepeatMailList.value = data.bwzdRepeatMailList;
bwzdLeaderViewMailList.value = data.bwzdLeaderViewMailList;
});
}
watch(time, () => {
getData();
})
onMounted(() => {
getData();
});
</script>
<style lang="scss" scoped>
@import "@/style/datav.scss";

77
src/views/sensitivePerception/ModelClueTask.vue

@ -62,16 +62,32 @@
prop="size"
align="center"
/>
<el-table-column label="办结数量" align="center" />
<el-table-column label="查实数量" align="center" />
<el-table-column label="涉及单位数" align="center" />
<el-table-column label="涉及人数" align="center" />
<el-table-column
label="办结数量"
align="center"
prop="completedSize"
/>
<el-table-column
label="查实数量"
align="center"
prop="verifySize"
/>
<el-table-column
label="涉及单位数"
align="center"
prop="departSize"
/>
<el-table-column
label="涉及人数"
align="center"
prop="personalSize"
/>
<el-table-column label="操作" width="200">
<template #default="{ row }">
<el-button
type="primary"
link
@click="handleRemoveManuel(row)"
@click="handleStatisticsShow(row.id)"
>任务统计</el-button
>
</template>
@ -96,7 +112,51 @@
</el-row>
</div>
<el-dialog></el-dialog>
<el-dialog title="任务统计" v-model="statisticsShow" width="80vw">
<div style="min-height: 500px">
<div class="table-container">
<el-table :data="list">
<el-table-column
label="单位名称"
prop="taskName"
width="200"
show-overflow-tooltip
/>
<el-table-column
label="问题数量"
prop="modelName"
width="200"
show-overflow-tooltip
/>
<el-table-column
label="办结数量"
prop="distributionTime"
width="200"
/>
<el-table-column
label="问题条数"
prop="size"
align="center"
/>
<el-table-column
label="办结率"
align="center"
prop="completedSize"
/>
<el-table-column
label="查实数量"
align="center"
prop="verifySize"
/>
<el-table-column
label="涉及人数"
align="center"
prop="personalSize"
/>
</el-table>
</div>
</div>
</el-dialog>
</template>
<script lang="ts" setup>
import { listModelClueTask } from "@/api/sensitivePerception/modelClueTask";
@ -126,6 +186,11 @@ function reset() {
query.value = {};
getList();
}
const statisticsShow = ref(false);
async function handleStatisticsShow(id) {
statisticsShow.value = true;
}
</script>
<style lang="scss" scoped>
</style>

59
src/views/system/Police.vue

@ -78,7 +78,7 @@
</el-row>
</el-form>
<div class="mb-25 flex between">
<div>
<div class="flex gap">
<el-button
type="primary"
@click="handleAdd"
@ -89,6 +89,37 @@
</template>
新增警员</el-button
>
<el-upload
:multiple="false"
:show-file-list="false"
:action="`${BASE_PATH}/police/import`"
:headers="{ Authorization: getToken() }"
:before-upload="beforeUpload"
@success="handleSuccess"
@error="handleError"
accept="application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
v-perms="['police:import']"
>
<el-button
type="primary"
>
<template #icon>
<icon name="el-icon-Upload" />
</template>
导入警员</el-button
>
</el-upload>
<a
class="link"
:href="`${BASE_PATH}/templates/数字督察警员权限导入模板.xlsx`"
target="__blank"
style="padding: 8px"
v-perms="['police:import']"
>数字督察警员权限导入模板</a
>
</div>
<div>
<el-button type="primary" @click="getList">
@ -445,6 +476,8 @@
</el-dialog>
</template>
<script setup>
import { BASE_PATH } from "@/api/request";
import { getToken } from "@/utils/token";
import { UserFilled } from "@element-plus/icons-vue";
import {
listPolice,
@ -584,6 +617,30 @@ async function handleDel(row) {
feedback.msgSuccess("操作成功");
getList();
}
import { ElLoading } from "element-plus";
let importLoading;
function beforeUpload() {
importLoading = ElLoading.service({
lock: true,
text: "数据导入中",
background: "rgba(0, 0, 0, 0.7)",
});
}
function handleSuccess(result) {
console.log('handleSuccess', result)
importLoading.close();
if (result.code !== 200) {
feedback.msgError(result.message);
return
}
getList()
}
function handleError(result) {
console.log(result)
importLoading.close();
feedback.msgError(result.message || "上传失败!");
}
</script>
<style lang="scss" scoped>
</style>
Loading…
Cancel
Save