Browse Source

1、警员中心新增警员照片上传,新增详情页面展示。在个人问题库展示警员照片;

2、修复用户管理/编辑用户异常的问题,以及去掉角色必填项校验;

3、黄赌情警台账功能;
main
wxc 11 months ago
parent
commit
092c64051f
  1. 9
      src/api/books.ts
  2. 2
      src/components/icon/index.vue
  3. 4
      src/style/element.scss
  4. 298
      src/views/books/Hdjq.vue
  5. 58
      src/views/system/Police.vue
  6. 54
      src/views/system/User.vue
  7. 2
      src/views/work/Done.vue
  8. 15
      src/views/work/Query.vue
  9. 2
      src/views/work/Todo.vue

9
src/api/books.ts

@ -0,0 +1,9 @@
import request from "./request";
export function listNegativeHdjq(query) {
return request.get({
url: `/negative/books/hdjq`,
query
});
}

2
src/components/icon/index.vue

@ -20,7 +20,7 @@ export default defineComponent({
}
},
setup(props) {
if (props.name.indexOf(EL_ICON_PREFIX) === 0) {
if (props.name && props.name.indexOf(EL_ICON_PREFIX) === 0) {
// el-icon
return () =>
createVNode(

4
src/style/element.scss

@ -7,10 +7,8 @@
.el-select {
min-width: 80px;
.el-select__input {
min-width: 100px;
}
}
.el-select-dropdown .el-select-dropdown__wrap {
max-height: 380px;
}

298
src/views/books/Hdjq.vue

@ -0,0 +1,298 @@
<template>
<div class="container">
<header>
<el-form :label-width="120">
<el-row>
<el-col :span="6">
<el-form-item label="报警时间">
<date-time-range-picker-ext
v-model="query.discoveryTime"
/>
</el-form-item>
</el-col>
</el-row>
<div class="form-row flex">
<label class="text-center">基本信息</label>
<div class="flex wrap query-box">
<el-input
placeholder="问题编号 / 样本源头编号"
v-model="query.originId"
clearable
style="width: 200px"
/>
<el-input
placeholder="警情编号"
v-model="query.caseNumber"
clearable
style="width: 200px"
/>
<el-input
placeholder="问题简要描述"
v-model="query.thingDesc"
clearable
style="width: 260px"
/>
<el-input
placeholder="期数"
style="width: 146px"
v-model="query.reportNumber"
clearable
/>
<div style="width: 180px">
<depart-tree-select
v-model="query.involveDepartId"
placeholder="涉及单位"
/>
</div>
</div>
</div>
<div class="form-row flex">
<label class="text-center">核查情况</label>
<div class="flex wrap query-box">
<div style="width: 200px">
<depart-tree-select
v-model="query.handleDepartId"
placeholder="办理单位"
/>
</div>
<el-select
style="width: 120px"
placeholder="是否整改"
clearable
v-model="query.isRectifyCode"
>
<el-option
v-for="item in dict.isRectify"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
<div class="flex gap-4">
<el-select
v-model="query.blameKey"
style="width: 90px"
@change="delete query.blameValue"
>
<el-option value="name" label="姓名" />
<el-option value="empNo" label="警号" />
<el-option value="idCode" label="身份证" />
</el-select>
<el-input
placeholder="问责人员(民警、辅警)"
v-model="query.blameValue"
clearable
style="width: 190px"
/>
</div>
</div>
</div>
<div class="form-row flex">
<label class="text-center">其他选项</label>
<div class="flex wrap query-box">
<el-select
style="width: 200px"
placeholder="流程阶段"
clearable
v-model="query.flowKey"
>
<el-option
v-for="item in flowNodes"
:key="item.flowKey"
:label="item.flowName"
:value="item.flowKey"
/>
</el-select>
<el-select
style="width: 120px"
placeholder="办理状态"
clearable
v-model="query.processingStatus"
multiple
>
<el-option
v-for="item in dict.processingStatus"
:key="item.id"
:label="item.dictLabel"
:value="item.dictValue"
/>
</el-select>
<el-select
style="width: 146px"
placeholder="自查或他查"
clearable
v-model="query.crtDepartLevel"
>
<el-option label="他查" :value="0" />
<el-option label="自查" :value="2" />
</el-select>
</div>
</div>
</el-form>
<div class="flex between mt-20 mb-26">
<el-button type="primary" @click="handleExport"
>数据导出</el-button
>
<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>
<main>
<div class="table-container" v-loading="loading">
<el-table :data="list" ref="tableRef">
<el-table-column
label="期数"
prop="reportNumber"
width="80"
/>
<el-table-column
label="涉及单位"
prop="involveDepartName"
width="160"
show-overflow-tooltip
/>
<el-table-column
label="办理单位"
show-overflow-tooltip
width="160"
>
<template #default="{ row }">
<span
>{{ row.handleSecondDepartName
}}{{ row.handleThreeDepartName }}</span
>
</template>
</el-table-column>
<el-table-column
label="报警时间"
prop="discoveryTime"
width="150"
/>
<el-table-column
label="警情编号"
prop="caseNumber"
width="220"
show-overflow-tooltip
/>
<el-table-column label="自查或他查" width="100" align="center">
<template #default="{ row }">
<span >{{ row.crtDepartLevel === 0? '他查' : '自查' }}</span>
</template>
</el-table-column>
<el-table-column
label="问题简要描述"
prop="thingDesc"
show-overflow-tooltip
/>
<el-table-column label="办理状态" width="110">
<template #default="{ row }">
<el-tag
:type="
row.processingStatus ===
ProcessingStatus.COMPLETED
? 'success'
: 'primary'
"
v-if="row.processingStatus"
>{{
getDictLable(
dict.processingStatus,
row.processingStatus
)
}}</el-tag
>
</template>
</el-table-column>
<el-table-column label="操作" width="120">
<template #default="{ row }">
<el-button
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="[10, 20, 50]"
:page-size="query.size"
v-model:current-page="query.current"
layout="total, sizes, prev, pager, next"
:total="total"
>
</el-pagination>
</div>
</main>
</div>
<negative-dialog
v-model="show"
:id="activeNegativeId"
@close="show = false"
ref="negativeDialogRef"
/>
</template>
<script setup>
import { ProcessingStatus } from "@/enums/flowEnums";
import { listNegativeHdjq } from "@/api/books";
import { getDictLable } from "@/utils/util";
import useCatchStore from "@/stores/modules/catch";
const catchStore = useCatchStore();
const dict = catchStore.getDicts([
"businessType",
"inspectCase",
"isRectify",
"processingStatus",
"suspectProblem",
"policeType",
"specialSupervision",
]);
const query = ref({
current: 1,
size: 10,
});
const list = ref([]);
const total = ref(0);
const loading = ref(false);
function getList() {
loading.value = true;
listNegativeHdjq(query.value).then((data) => {
list.value = data.records;
total.value = data.total;
loading.value = false;
});
}
onMounted(() => {
getList();
});
const show = ref(false);
const activeNegativeId = ref("");
function handleAction(row) {
show.value = true;
activeNegativeId.value = row.id;
}
</script>
<style lang="scss" scoped>
</style>

58
src/views/system/Police.vue

@ -319,14 +319,8 @@
width="600"
>
<el-form :model="form" :label-width="120" ref="fomrRef">
<!-- <el-form-item label="头像" prop="avatarUrl">
<el-avatar
shape="square"
:size="50"
:src="form.avatarUrl"
:icon="UserFilled"
/>
</el-form-item> -->
<el-row :gutter="20">
<el-col :span="18">
<el-form-item
label="姓名"
prop="name"
@ -369,6 +363,24 @@
style="width: 280px"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-upload
:action="`${BASE_PATH}/file/upload`"
:headers="{ Authorization: getToken() }"
:show-file-list="false"
@success="handleUploadImgSuccess"
accept="image/*"
>
<img v-if="form.img" :src="`${BASE_PATH}/file/stream/${form.avatarUrl}`" class="depart-img" />
<div class="flex v-center center column upload-action" v-else>
<icon :size="16" name="el-icon-Plus" />
<span>上传照片</span>
</div>
</el-upload>
</el-col>
</el-row>
<el-form-item
label="所属单位"
prop="orgId"
@ -519,8 +531,8 @@
</el-dialog>
</template>
<script setup>
import { BASE_PATH } from "@/api/request";
import { getToken } from "@/utils/token";
import { BASE_PATH } from "@/api/request";
import { UserFilled } from "@element-plus/icons-vue";
import {
listPolice,
@ -664,7 +676,6 @@ function beforeUpload() {
});
}
function handleSuccess(result) {
console.log("handleSuccess", result);
importLoading.close();
if (result.code !== 200) {
feedback.msgError(result.message);
@ -692,18 +703,37 @@ const delFormRef = ref();
async function handleDel(row) {
await delFormRef.value.validate();
let reason = delFormData.value.option
if (delFormData.value.option === '其他') {
reason = delFormData.value.delReason
let reason = delFormData.value.option;
if (delFormData.value.option === "其他") {
reason = delFormData.value.delReason;
}
await delPolice(delFormData.value.id, {
reason: delFormData.value.delReason,
});
feedback.msgSuccess("操作成功");
delDialog.value = false;
delFormData.value = {}
delFormData.value = {};
getList();
}
function handleUploadImgSuccess(result, file) {
if (result.code !== 200) {
feedback.msgError('上传失败')
return
}
form.value.avatarUrl = result.data.filePath
}
</script>
<style lang="scss" scoped>
.upload-action {
width: 98px;
height: 126px;
background: rgba(0, 0, 0, 0.04);
border-radius: 8px;
border: 1px solid rgba(0, 0, 0, 0.15);
}
.depart-img {
width: 98px;
height: 126px;
}
</style>

54
src/views/system/User.vue

@ -131,22 +131,30 @@
width="600"
>
<el-form :label-width="120" ref="formRef" :model="form">
<el-form-item label="登录名" :rules="{
<el-form-item
label="登录名"
:rules="{
required: true,
message: '请輸入登录名',
trigger: ['blur'],
}" prop="userName">
}"
prop="userName"
>
<el-input
v-model="form.userName"
placeholder="请输入登录名"
:disabled="mode === 'edit'"
/>
</el-form-item>
<el-form-item label="姓名" :rules="{
<el-form-item
label="姓名"
:rules="{
required: true,
message: '请輸入姓名',
trigger: ['blur'],
}" prop="nickName">
}"
prop="nickName"
>
<el-input v-model="form.nickName" placeholder="请输入姓名" />
</el-form-item>
<el-form-item label="邮箱">
@ -155,11 +163,15 @@
<el-form-item label="手机号">
<el-input v-model="form.mobile" placeholder="请输入手机号" />
</el-form-item>
<el-form-item label="管理员类型" :rules="{
<el-form-item
label="管理员类型"
:rules="{
required: true,
message: '请选择管理员类型',
trigger: ['blur'],
}" prop="userType">
}"
prop="userType"
>
<el-select
v-model="form.userType"
placeholder="请选择管理员类型"
@ -168,11 +180,7 @@
<el-option value="admin" label="普通管理员" />
</el-select>
</el-form-item>
<el-form-item label="角色" :rules="{
required: true,
message: '请选择角色',
trigger: ['blur'],
}" prop="roleIds">
<el-form-item label="角色" prop="roleIds">
<el-select
v-model="form.roleIds"
placeholder="请选择角色"
@ -194,11 +202,16 @@
placeholder="请输入用户描述"
/>
</el-form-item>
<el-form-item label="用戶密码" v-if="mode === 'add'" :rules="{
<el-form-item
label="用戶密码"
v-if="mode === 'add'"
:rules="{
required: true,
message: '请输入用户密码',
trigger: ['blur'],
}" prop="password">
}"
prop="password"
>
<el-input
type="password"
v-model="form.password"
@ -244,7 +257,7 @@ getList();
const show = ref(false);
const mode = ref("add");
const form = ref({
password: '123456'
password: "123456",
});
const formRef = ref(null);
function handleEdit(row) {
@ -270,7 +283,7 @@ function submit() {
} else {
addUser(form.value).then(() => {
show.value = false;
form.value = {}
form.value = {};
getList();
feedback.msgSuccess("操作成功");
});
@ -280,20 +293,17 @@ function submit() {
}
watch(mode, (val) => {
if (val === 'add') {
if (val === "add") {
form.value = {
password: '123456'
}
password: "123456",
};
}
})
});
function handleShowAdd() {
mode.value = "add";
show.value = true;
}
</script>
<style lang="scss" scoped>
</style>

2
src/views/work/Done.vue

@ -60,6 +60,8 @@
v-model="query.problemSourcesCode"
clearable
filterable
multiple
collapse-tags
style="width: 180px"
placeholder="问题来源"
/>

15
src/views/work/Query.vue

@ -60,7 +60,9 @@
v-model="query.problemSourcesCode"
clearable
filterable
style="width: 180px"
multiple
collapse-tags
style="width: 200px"
placeholder="问题来源"
/>
<el-select
@ -274,7 +276,7 @@
getInvolveProblem(
row.involveProblem,
dict.suspectProblem
) || '/'
) || "/"
}}</span>
</div>
</div>
@ -756,7 +758,6 @@
>
</footer>
</el-dialog>
</template>
<script setup>
import moment from "moment";
@ -766,7 +767,7 @@ import {
negativeExport,
delNegative,
updateNegative,
transferTodo
transferTodo,
} from "@/api/work/negative";
import { getDictLable, formatTimeText, getInvolveProblem } from "@/utils/util";
import feedback from "@/utils/feedback";
@ -928,13 +929,11 @@ async function handleTransferTodo(row) {
getList();
}
const negativeDialogRef = ref()
const negativeDialogRef = ref();
function handleSpotCheck(row) {
activeNegativeId.value = row.id;
show.value = true;
negativeDialogRef.value.spotCheck()
negativeDialogRef.value.spotCheck();
}
</script>
<style lang="scss" scoped>

2
src/views/work/Todo.vue

@ -60,6 +60,8 @@
v-model="query.problemSourcesCode"
clearable
filterable
multiple
collapse-tags
style="width: 180px"
placeholder="问题来源"
/>

Loading…
Cancel
Save