12309
This commit is contained in:
parent
6628970dde
commit
d703bd2a4a
@ -1,51 +1,87 @@
|
||||
import request from '@/utils/request'
|
||||
import { parseStrEmpty } from "@/utils/ruoyi";
|
||||
|
||||
// 查询 列表
|
||||
export function BAApplyList(data,query) {
|
||||
return request({
|
||||
url: '/bussiness/Apply/list',
|
||||
method: 'post',
|
||||
params: query,
|
||||
data: data,
|
||||
isEncrypt: false
|
||||
})
|
||||
}
|
||||
// 查询详情
|
||||
export function getBAApplyInfo(query) {
|
||||
return request({
|
||||
url: '/bussiness/Apply/info?id=' + query,
|
||||
method: 'get',
|
||||
// params: query
|
||||
})
|
||||
// 获取列表数据
|
||||
export const getVisitList = (data, params) => {
|
||||
return request({
|
||||
url: '/visiting/visit/list',
|
||||
method: 'post',
|
||||
params,
|
||||
data,
|
||||
isEncrypt: false
|
||||
})
|
||||
}
|
||||
|
||||
// 新增
|
||||
|
||||
export function createBAApply(data) {
|
||||
return request({
|
||||
url: '/bussiness/Apply/add',
|
||||
method: 'post',
|
||||
data: data,
|
||||
isEncrypt: false
|
||||
})
|
||||
// 新增访问记录
|
||||
export const addVisit = (data) => {
|
||||
return request({
|
||||
url: '/visiting/visit/add',
|
||||
method: 'post',
|
||||
data,
|
||||
isEncrypt: false
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function editBAApply(data) {
|
||||
return request({
|
||||
url: '/bussiness/Apply/edit',
|
||||
method: 'post',
|
||||
data: data,
|
||||
isEncrypt: false
|
||||
})
|
||||
// 获取访问详情
|
||||
export const getVisitInfo = (id) => {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/visiting/visit/info',
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteBAApply(id) {
|
||||
return request({
|
||||
url: '/bussiness/Apply/remove?ids=' + id,
|
||||
method: 'post',
|
||||
isEncrypt: false
|
||||
})
|
||||
// 更新访问内容
|
||||
export const updateVisit = (data) => {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/visiting/visit/edit',
|
||||
data: data,
|
||||
isEncrypt: false
|
||||
})
|
||||
}
|
||||
|
||||
// 取消访问记录
|
||||
export const deleteVisit = (id) => {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/visiting/visit/remove',
|
||||
params: {
|
||||
ids: id
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 获取来访登记列表
|
||||
export const getRegisterList = () => {
|
||||
return request({
|
||||
url: '/visiting/visit/list_register_visitors',
|
||||
method: 'get',
|
||||
params: {
|
||||
// since: dayjs().format('YYYY-MM-DD')
|
||||
since: '2024-12-24'
|
||||
},
|
||||
isEncrypt: false
|
||||
})
|
||||
}
|
||||
|
||||
// 获取历史上访列表
|
||||
export const getHistoryList = (code) => {
|
||||
return request({
|
||||
method: 'get',
|
||||
url: '/visiting/visit/list_visitor_history',
|
||||
params: {
|
||||
id_card: code
|
||||
},
|
||||
isEncrypt: false
|
||||
})
|
||||
}
|
||||
|
||||
// 导出访问记录
|
||||
export const exportVisit = () => {
|
||||
return request({
|
||||
method: 'post',
|
||||
url: '/visiting/visit/export'
|
||||
})
|
||||
}
|
@ -38,7 +38,8 @@ export function addMenu(data) {
|
||||
return request({
|
||||
url: '/system/menu',
|
||||
method: 'post',
|
||||
data: data
|
||||
data: data,
|
||||
isEncrypt:false
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
defineOptions({
|
||||
name:'DividerHeader'
|
||||
})
|
||||
const {title} = defineProps(['title'])
|
||||
</script>
|
||||
|
||||
|
@ -1,249 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 表单区域 -->
|
||||
<el-form ref="queryParamsRef" :inline="true" :model="queryParams">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="相关领域">
|
||||
<el-select v-model="queryParams.casetype" style="width: 15vw;" @change="getLists" clearable>
|
||||
<el-option
|
||||
v-for="item in nj_anjian_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="来访类别">
|
||||
<el-select v-model="queryParams.casetype" style="width: 15vw;" @change="getLists" clearable>
|
||||
<el-option
|
||||
v-for="item in nj_anjian_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="级别">
|
||||
<el-select v-model="queryParams.casetype" style="width: 15vw;" @change="getLists" clearable>
|
||||
<el-option
|
||||
v-for="item in nj_anjian_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getLists">
|
||||
<el-icon class="me-1">
|
||||
<Search />
|
||||
</el-icon>
|
||||
查询
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="handleRest(queryParamsRef)">
|
||||
<el-icon class="me-1">
|
||||
<Refresh />
|
||||
</el-icon>
|
||||
重置
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-divider class="mt-0" />
|
||||
|
||||
<el-row class="mb-3" :gutter="10">
|
||||
<el-col :span="1.5">
|
||||
<el-space>
|
||||
<el-button plain type="primary" @click="AddEditRegistVisitRef.showAddCase()">
|
||||
<el-icon class="me-2">
|
||||
<Plus />
|
||||
</el-icon>
|
||||
新增
|
||||
</el-button>
|
||||
</el-space>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="info" plain icon="Upload" @click="uploadRef.showupload()">导入</el-button>
|
||||
<Upload ref="uploadRef" @getList="getLists" />
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 表格区域 -->
|
||||
<el-table
|
||||
ref="CaseTableRef"
|
||||
v-loading="loading"
|
||||
:data="CaseTables"
|
||||
@row-dblclick="handleRowDblClick"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column label="日期" prop="name" />
|
||||
<el-table-column label="上访人" prop="name" />
|
||||
<el-table-column label="电话" prop="casetype" />
|
||||
<el-table-column label="身份证号码" prop="unitname" />
|
||||
<el-table-column label="反映事项" prop="state">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="nj_anjian_status" :value="scope.row.state" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否重点对象" prop="state">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="nj_anjian_status" :value="scope.row.state" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="级别" prop="state" width="80">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="nj_anjian_status" :value="scope.row.state" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处理情况" prop="depname"/>
|
||||
<el-table-column fixed="right" align="center" label="操作" width="240">
|
||||
<template #default="scope">
|
||||
<!-- <el-button link size="small" type="warning">
|
||||
<el-icon class="me-1">
|
||||
<UserFilled />
|
||||
</el-icon>
|
||||
上访人管理
|
||||
</el-button> -->
|
||||
<el-button link size="small" type="primary" @click="AddEditRegistVisitRef.showEditCase(scope.row)">
|
||||
<el-icon class="me-1">
|
||||
<Edit />
|
||||
</el-icon>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button link size="small" type="warning" @click="AddEditRegistVisitRef.showEditCase(scope.row)">
|
||||
<el-icon class="me-1">
|
||||
<Edit />
|
||||
</el-icon>
|
||||
详情
|
||||
</el-button>
|
||||
<el-button link size="small" type="danger" @click="deleteCase(scope.row)">
|
||||
<el-icon class="me-1">
|
||||
<Delete />
|
||||
</el-icon>
|
||||
取消
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="paging.pageNum"
|
||||
v-model:limit="paging.pageSize"
|
||||
@pagination="getLists"
|
||||
/>
|
||||
<AddEditRegistVisit ref="AddEditRegistVisitRef" @getList="getLists" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ElMessageBox } from "element-plus";
|
||||
import AddEditRegistVisit from "./components/AddEditRegistVisit.vue";
|
||||
import Upload from "./components/upload.vue"; // 引入上传组件
|
||||
import { getCurrentInstance } from "vue";
|
||||
|
||||
import PageEnum from "@/enum/PageEnum.js";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { nj_anjian_type, nj_anjian_status } = proxy.useDict("nj_anjian_type", "nj_anjian_status");
|
||||
|
||||
const isShow = ref(true);
|
||||
const queryParamsRef = ref();
|
||||
const deleteStatus = ref(true);
|
||||
const AddEditRegistVisitRef = ref();
|
||||
const uploadRef = ref();
|
||||
const upload = ref({});
|
||||
|
||||
const loading = ref(false);
|
||||
|
||||
const paging = ref({
|
||||
pageNum: 1,
|
||||
pageSize: PageEnum.SIZE,
|
||||
});
|
||||
const queryParams = ref({
|
||||
name: "",
|
||||
casecode: "",
|
||||
brief: "",
|
||||
state: "1,2",
|
||||
});
|
||||
|
||||
const total = ref(0);
|
||||
const CaseTables = ref([
|
||||
{
|
||||
name: "1",
|
||||
},
|
||||
{
|
||||
name: "2",
|
||||
},
|
||||
]);
|
||||
|
||||
onMounted(() => {
|
||||
getLists();
|
||||
});
|
||||
|
||||
// 获取案件列表
|
||||
const getLists = async () => {
|
||||
// loading.value = true
|
||||
// await getCaseInfoList(queryParams.value, paging.value).then(res => {
|
||||
// CaseTables.value = res.rows
|
||||
// total.value = res.total
|
||||
// loading.value = false
|
||||
// })
|
||||
};
|
||||
|
||||
// 双击行时的事件处理函数
|
||||
const handleRowDblClick = (row) => {
|
||||
console.log("双击的行数据:", row);
|
||||
AddEditRegistVisitRef.value.showAddCase(row)
|
||||
// 在这里可以进行进一步的处理,比如打开编辑框或查看详情等
|
||||
};
|
||||
|
||||
const deleteCase = async (row) => {
|
||||
ElMessageBox.confirm("确定删除?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
// deleteCaseInfo(row.caseCaseinfoId).then((res) => {
|
||||
// getLists();
|
||||
// });
|
||||
})
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
// proxy.download("system/user/export", {
|
||||
// ...queryParams.value,
|
||||
// }, `user_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
// 重置搜索调解
|
||||
const handleRest = (formEl) => {
|
||||
queryParams.value = {
|
||||
name: "",
|
||||
casecode: "",
|
||||
brief: "",
|
||||
state: "1,2",
|
||||
};
|
||||
getLists();
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
@ -0,0 +1,384 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
v-model="isShow"
|
||||
title="来访登记"
|
||||
:destroy-on-close="true"
|
||||
size="50%"
|
||||
:close-on-press-escape="false"
|
||||
:close-on-click-modal="false"
|
||||
:show-close="false"
|
||||
>
|
||||
<template
|
||||
v-if="showRegistrationList"
|
||||
>
|
||||
<el-button type="primary" @click="showFormHandle">新增来访登记</el-button>
|
||||
<div class="el-collapse">
|
||||
<div class="items" v-for="item in registerList" :key="item.jwCheckinloginId">
|
||||
<span>{{ item.name }} - {{ item.sfzId }}</span>
|
||||
<div>
|
||||
<el-button :icon="ArrowRight" circle @click="carryHandle(item)"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<el-form
|
||||
ref="queryParamsRef"
|
||||
:model="queryParams"
|
||||
label-width="auto"
|
||||
label-position="left"
|
||||
require-asterisk-position="right"
|
||||
:rules="rules"
|
||||
:disabled="isView"
|
||||
v-if="showRegistration"
|
||||
>
|
||||
<DividerHeader title="基本信息"/>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="姓名" required prop="visitorName">
|
||||
<el-input placeholder="请填写上访人姓名" v-model="queryParams.visitorName"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="上访时间">
|
||||
<el-date-picker
|
||||
v-model="queryParams.visitTime"
|
||||
type="datetime"
|
||||
placeholder="请选择上访时间"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="电话">
|
||||
<el-input placeholder="请填写上访人电话号码" v-model="queryParams.visitorMobile"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工作单位或住址">
|
||||
<el-input placeholder="请填写上访人工作单位或住址" v-model="queryParams.visitorContact"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="19">
|
||||
<el-form-item label="身份证号码">
|
||||
<el-input
|
||||
placeholder="请填写上访人身份证号码"
|
||||
v-model="queryParams.visitorCode"
|
||||
type="number"
|
||||
@change="idCardChangeHandle"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<!-- @click="visitHistoryRef.showVisitHistory(queryForm.sfzId)" -->
|
||||
<el-button
|
||||
type="primary"
|
||||
:disabled="viewHistoryDisable"
|
||||
@click="visitHistoryRef.showVisitHistory(queryParams.visitorCode)"
|
||||
>
|
||||
历史信访记录
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<DividerHeader title="上访情况"/>
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="来访类型" required prop="type">
|
||||
<el-select
|
||||
v-model="queryParams.type"
|
||||
placeholder="请选择来访类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in visit_type"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:key="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12"></el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="反映事项" required label-position="top" prop="demand">
|
||||
<el-input
|
||||
placeholder="请填写反映事项"
|
||||
type="textarea"
|
||||
v-model="queryParams.demand"
|
||||
:autosize="{ minRows: 3, maxRows: 9999 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="答复口径" required label-position="top" prop="reply">
|
||||
<el-input
|
||||
placeholder="请填写答复口径"
|
||||
type="textarea"
|
||||
v-model="queryParams.reply"
|
||||
:autosize="{ minRows: 3, maxRows: 9999 }"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="相关领域" label-position="top">
|
||||
<el-select
|
||||
v-model="queryParams.field"
|
||||
placeholder="请选择领域"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in visit_field"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:key="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="答复形式" label-position="top">
|
||||
<el-select
|
||||
v-model="queryParams.replyType"
|
||||
placeholder="请选择答复形式"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in visit_reply_type"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:key="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否重点人员" label-position="top">
|
||||
<el-radio-group v-model="queryParams.isKeyPerson">
|
||||
<el-radio-button
|
||||
v-for="item in boolean_yes_no"
|
||||
:value="item.value"
|
||||
:key="item.label"
|
||||
:label="item.label"
|
||||
/>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="级别" label-position="top">
|
||||
<el-select
|
||||
v-model="queryParams.level"
|
||||
placeholder="请选择来访级别"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in visit_level"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
:key="item.label"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="updateHandle(queryParamsRef)" v-if="isEdit">提交</el-button>
|
||||
<el-button type="primary" @click="createHandle(queryParamsRef)" v-if="isCreate">提交</el-button>
|
||||
<el-button @click="changeShowStatus">关闭</el-button>
|
||||
</template>
|
||||
</el-drawer>
|
||||
|
||||
<VisitHistory ref="visitHistoryRef"/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {getCurrentInstance, useTemplateRef} from 'vue';
|
||||
import {addVisit, getRegisterList, getVisitInfo, updateVisit} from '@/api/RegistVisitApi/RegistVisitApi.js';
|
||||
import dayjs from 'dayjs';
|
||||
import DividerHeader from '@/components/DividerHeader/DividerHeader.vue';
|
||||
import {ArrowRight} from '@element-plus/icons-vue';
|
||||
import VisitHistory from '@/views/PoliceWork/RegisterVisit/components/VisitHistory.vue';
|
||||
|
||||
defineOptions({
|
||||
name: 'AddEditRegisterVisit'
|
||||
})
|
||||
|
||||
const {proxy} = getCurrentInstance();
|
||||
const {
|
||||
boolean_yes_no,
|
||||
visit_level,
|
||||
visit_reply_type,
|
||||
visit_field,
|
||||
visit_type,
|
||||
} = proxy.useDict('boolean_yes_no', 'visit_level', 'visit_field', 'visit_type', 'visit_reply_type')
|
||||
|
||||
const emit = defineEmits(['refresh'])
|
||||
|
||||
const queryParamsRef = useTemplateRef('queryParamsRef')
|
||||
const visitHistoryRef = useTemplateRef('visitHistoryRef')
|
||||
|
||||
const isShow = ref(false)
|
||||
const isEdit = ref(false)
|
||||
const isView = ref(false)
|
||||
const isCreate = ref(false)
|
||||
const showRegistrationList = ref(true)
|
||||
const showRegistration = ref(false)
|
||||
|
||||
// 控制查看历史数据按钮状态
|
||||
const viewHistoryDisable = ref(true)
|
||||
|
||||
const defaultParams = {
|
||||
// 姓名
|
||||
visitorName: '',
|
||||
// 上访时间
|
||||
visitTime: '',
|
||||
// 电话
|
||||
visitorMobile: '',
|
||||
// 工作单位或住址
|
||||
visitorContact: '',
|
||||
// 身份证号码
|
||||
visitorCode: '',
|
||||
// 反映事项
|
||||
demand: '',
|
||||
// 来访类型
|
||||
type: '',
|
||||
// 相关领域
|
||||
field: '',
|
||||
// 答复口径
|
||||
reply: '',
|
||||
// 答复形式
|
||||
replyType: '',
|
||||
// 是否重点人员
|
||||
isKeyPerson: '1',
|
||||
// 级别
|
||||
level: ''
|
||||
}
|
||||
const queryParams = ref({...defaultParams})
|
||||
const registerList = ref([])
|
||||
|
||||
const rules = reactive({
|
||||
visitorName: [{required: true, message: '请填写来访人姓名', trigger: 'blur'}],
|
||||
type: [{required: true, message: '请填写电话', trigger: 'blur'}],
|
||||
demand: {required: true, message: '请填写反映事项', trigger: 'blur'},
|
||||
reply: {required: true, message: '请填写答复口径', trigger: 'blur'}
|
||||
})
|
||||
|
||||
// 变更显示状态
|
||||
const changeShowStatus = () => {
|
||||
isShow.value = !isShow.value
|
||||
if (!isShow.value) {
|
||||
queryParams.value = {...defaultParams}
|
||||
isEdit.value = false;
|
||||
isView.value = false;
|
||||
isCreate.value = false;
|
||||
showRegistrationList.value = true;
|
||||
showRegistration.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
// 显示新增来访登记抽屉
|
||||
const showAddRegisterVisit = async () => {
|
||||
changeShowStatus()
|
||||
await getRegisterVisitList()
|
||||
}
|
||||
|
||||
// 显示编辑来访登记抽屉
|
||||
const showEditRegisterVisit = async (row) => {
|
||||
changeShowStatus()
|
||||
showRegistrationList.value = false;
|
||||
showRegistration.value = true;
|
||||
isEdit.value = true;
|
||||
await getDetail(row)
|
||||
}
|
||||
|
||||
// 显示详情
|
||||
const showDetail = async (row) => {
|
||||
changeShowStatus()
|
||||
showRegistrationList.value = false;
|
||||
showRegistration.value = true;
|
||||
isView.value = true;
|
||||
await getDetail(row)
|
||||
}
|
||||
defineExpose({showAddRegisterVisit, showEditRegisterVisit, showDetail})
|
||||
|
||||
const showFormHandle = () => {
|
||||
isCreate.value = true;
|
||||
showRegistrationList.value = false;
|
||||
showRegistration.value = true;
|
||||
}
|
||||
|
||||
const carryHandle = (row) => {
|
||||
isCreate.value = true;
|
||||
showRegistrationList.value = false;
|
||||
showRegistration.value = true;
|
||||
queryParams.value = {
|
||||
...queryParams.value,
|
||||
visitorName: row.name,
|
||||
visitorCode: row.sfzId,
|
||||
visitTime: dayjs().format('YYYY-MM-DD hh:mm:ss'),
|
||||
visitorContact: row.address
|
||||
}
|
||||
idCardChangeHandle(row.sfzId)
|
||||
}
|
||||
|
||||
// 获取来访登记列表
|
||||
const getRegisterVisitList = async () => {
|
||||
const res = await getRegisterList()
|
||||
registerList.value = res.data
|
||||
console.log(res.data)
|
||||
}
|
||||
|
||||
// 获取详情
|
||||
const getDetail = async (row) => {
|
||||
const res = await getVisitInfo(row.visitId)
|
||||
queryParams.value = res.data;
|
||||
queryParams.value.visitTime = dayjs(res.data.visitTime).format('YYYY-MM-DD hh:mm:ss')
|
||||
idCardChangeHandle(res.data.visitorCode)
|
||||
console.log(res)
|
||||
}
|
||||
|
||||
// 新增来访登记
|
||||
const createHandle = async (elForm) => {
|
||||
if (!elForm) return
|
||||
await elForm.validate(async (valid, fields) => {
|
||||
if (valid) {
|
||||
await addVisit(queryParams.value)
|
||||
changeShowStatus()
|
||||
emit('refresh')
|
||||
console.log(queryParams.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 修改来访登记
|
||||
const updateHandle = async (elForm) => {
|
||||
if (!elForm) return
|
||||
await elForm.validate(async (valid, fields) => {
|
||||
if (valid) {
|
||||
await updateVisit(queryParams.value)
|
||||
changeShowStatus()
|
||||
emit('refresh')
|
||||
console.log(queryParams.value)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 身份证输入框失去焦点后的事件
|
||||
const idCardChangeHandle = (value) => {
|
||||
viewHistoryDisable.value = !value;
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.el-collapse {
|
||||
.items {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid var(--el-collapse-border-color);
|
||||
}
|
||||
}
|
||||
</style>
|
@ -0,0 +1,63 @@
|
||||
<template>
|
||||
<el-drawer
|
||||
v-model="isShow"
|
||||
title="历史上访记录"
|
||||
:destroy-on-close="true"
|
||||
size="50%"
|
||||
:close-on-press-escape="false"
|
||||
:close-on-click-modal="false"
|
||||
:show-close="false"
|
||||
>
|
||||
|
||||
<el-table
|
||||
:data="tableData"
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-table-column label="接待场所" prop="policeareaId" width="180"/>
|
||||
<el-table-column label="执勤法警" prop="adduserId" width="180"/>
|
||||
<el-table-column label="来访人" prop="name" width="180"/>
|
||||
<el-table-column label="来访日期" prop="checkintime" width="180"/>
|
||||
<el-table-column label="信访情况" prop="checkininfo" width="180"/>
|
||||
</el-table>
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="changeShowStatus">关闭</el-button>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {getHistoryList} from '@/api/RegistVisitApi/RegistVisitApi.js';
|
||||
|
||||
defineOptions({
|
||||
name: 'VisitHistory'
|
||||
})
|
||||
|
||||
const isShow = ref(false);
|
||||
const loading = ref(false)
|
||||
|
||||
const visitorCode = ref('')
|
||||
const tableData = ref([])
|
||||
// 变更显示状态
|
||||
const changeShowStatus = () => {
|
||||
isShow.value = !isShow.value
|
||||
if (!isShow.value) {
|
||||
visitorCode.value = '';
|
||||
tableData.value = [];
|
||||
}
|
||||
}
|
||||
|
||||
const showVisitHistory = async (code) => {
|
||||
changeShowStatus()
|
||||
visitorCode.value = code;
|
||||
const res = await getHistoryList(code)
|
||||
console.log(res)
|
||||
tableData.value = res.data
|
||||
}
|
||||
|
||||
defineExpose({showVisitHistory});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<el-dialog :title="upload.title" v-model="isShow" width="400px" append-to-body>
|
||||
<el-upload
|
||||
ref="uploadRef"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
@ -9,21 +10,22 @@
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
name="importFile"
|
||||
drag
|
||||
>
|
||||
<el-icon class="el-icon--upload">
|
||||
<upload-filled />
|
||||
<upload-filled/>
|
||||
</el-icon>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip text-center">
|
||||
<div class="el-upload__tip">
|
||||
<el-checkbox v-model="upload.updateSupport" />
|
||||
是否更新已经存在的用户数据
|
||||
</div>
|
||||
<!-- <div class="el-upload__tip">-->
|
||||
<!-- <el-checkbox v-model="upload.updateSupport"/>-->
|
||||
<!-- 是否更新已经存在的用户数据-->
|
||||
<!-- </div>-->
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
|
||||
@click="importTemplate">下载模板
|
||||
@click="importTemplate">下载模板
|
||||
</el-link>
|
||||
</div>
|
||||
</template>
|
||||
@ -38,14 +40,20 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {ref, defineProps} from 'vue';
|
||||
import {getCurrentInstance, ref} from 'vue';
|
||||
import {getToken} from '@/utils/auth.js';
|
||||
|
||||
const {proxy} = getCurrentInstance();
|
||||
const emit = defineEmits(['refresh'])
|
||||
const uploadRef = ref('')
|
||||
|
||||
const isShow = ref(false); // 控制弹窗显示/隐藏
|
||||
const fileList = ref([])
|
||||
const upload = ref({
|
||||
title: '用户导入',
|
||||
url: 'upload_url_here', // 文件上传的API接口
|
||||
url: import.meta.env.VITE_APP_BASE_API + '/visiting/visit/import', // 文件上传的API接口
|
||||
isUploading: false,
|
||||
headers: {}, // 如果需要传递额外的headers
|
||||
headers: {Authorization: 'Bearer ' + getToken()}, // 如果需要传递额外的headers
|
||||
updateSupport: false, // 更新现有用户
|
||||
});
|
||||
const TemplateDownUrl = ref('/导入模版.xlsx'); // 控制弹窗显示/隐藏
|
||||
@ -59,23 +67,27 @@ const showupload = () => {
|
||||
defineExpose({showupload})
|
||||
// 提交上传的表单
|
||||
const submitFileForm = () => {
|
||||
console.log("提交文件...");
|
||||
console.log('提交文件...');
|
||||
// 上传逻辑:你可以在这里触发上传文件的逻辑
|
||||
proxy.$refs['uploadRef'].submit();
|
||||
isShow.value = false; // 上传后关闭弹窗
|
||||
};
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
|
||||
/** 下载模板操作 */
|
||||
function importTemplate() {
|
||||
window.open(TemplateDownUrl.value, '_blank');
|
||||
}
|
||||
}
|
||||
|
||||
// 进度回调
|
||||
const handleFileUploadProgress = (progressEvent) => {
|
||||
console.log("上传进度:", progressEvent);
|
||||
console.log('上传进度:', progressEvent);
|
||||
};
|
||||
|
||||
// 上传成功的回调
|
||||
const handleFileSuccess = (response, file, fileList) => {
|
||||
console.log("上传成功:", response);
|
||||
console.log('上传成功:', response);
|
||||
// 上传成功后,可以触发父组件的事件来刷新数据
|
||||
emit('getList');
|
||||
proxy.$refs['uploadRef'].handleRemove(file);
|
||||
emit('refresh');
|
||||
};
|
||||
</script>
|
164
src/views/PoliceWork/RegisterVisit/index.vue
Normal file
164
src/views/PoliceWork/RegisterVisit/index.vue
Normal file
@ -0,0 +1,164 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-row class="mb-3">
|
||||
<el-col :span="24">
|
||||
<el-space>
|
||||
<el-button type="primary" plain @click="AddEditRegisterVisitRef.showAddRegisterVisit()">
|
||||
<el-icon class="me-2">
|
||||
<Plus/>
|
||||
</el-icon>
|
||||
新增
|
||||
</el-button>
|
||||
<el-button type="warning" plain @click="handleExport()">
|
||||
<el-icon class="me-2">
|
||||
<Download/>
|
||||
</el-icon>
|
||||
导出
|
||||
</el-button>
|
||||
<el-button type="info" plain @click="uploadRef.showupload()">
|
||||
<el-icon class="me-2">
|
||||
<Upload/>
|
||||
</el-icon>
|
||||
导入
|
||||
</el-button>
|
||||
<upload ref="uploadRef" @refresh="getLists" />
|
||||
</el-space>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 表格区域 -->
|
||||
<el-table
|
||||
ref="tableDataRef"
|
||||
v-loading="loading"
|
||||
:data="tableData"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<el-table-column label="日期" prop="visitTime" width="230">
|
||||
<template #default="scope">
|
||||
{{ dayjs(scope.row.visitTime).format('YYYY-MM-DD hh:mm:ss') }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上访人" prop="visitorName" width="150"/>
|
||||
<el-table-column label="电话" prop="visitorMobile" width="200"/>
|
||||
<el-table-column label="工作单位或住址" prop="visitorContact" width="230"/>
|
||||
<el-table-column label="身份证号码" prop="visitorCode" width="230"/>
|
||||
<el-table-column label="反映事项" prop="demand" width="230"/>
|
||||
<el-table-column label="历史信访" prop="state" width="230"/>
|
||||
<el-table-column label="处理情况" prop="reply" width="230"/>
|
||||
<el-table-column label="答复形式" prop="replyType" width="230">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="visit_reply_type" :value="scope.row.replyType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="remark" width="230"/>
|
||||
<el-table-column fixed="right" align="center" label="操作" width="240">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" type="primary"
|
||||
@click="AddEditRegisterVisitRef.showEditRegisterVisit(scope.row)">
|
||||
<el-icon class="me-1">
|
||||
<Edit/>
|
||||
</el-icon>
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button link size="small" type="warning"
|
||||
@click="AddEditRegisterVisitRef.showDetail(scope.row)">
|
||||
<el-icon class="me-1">
|
||||
<View/>
|
||||
</el-icon>
|
||||
详情
|
||||
</el-button>
|
||||
<el-button link size="small" type="danger" @click="deleteHandle(scope.row)">
|
||||
<el-icon class="me-1">
|
||||
<Delete/>
|
||||
</el-icon>
|
||||
取消
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="paging.pageNum"
|
||||
v-model:limit="paging.pageSize"
|
||||
@pagination="getLists"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<AddEditRegisterVisit ref="AddEditRegisterVisitRef" @refresh="getLists"/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {getCurrentInstance, useTemplateRef} from 'vue';
|
||||
import PageEnum from '@/enum/PageEnum.js';
|
||||
import {ElMessageBox} from 'element-plus';
|
||||
import AddEditRegisterVisit from '@/views/PoliceWork/RegisterVisit/components/AddEditRegisterVisit.vue';
|
||||
import {deleteVisit, exportVisit, getVisitList} from '@/api/RegistVisitApi/RegistVisitApi.js';
|
||||
import DictTag from '@/components/DictTag/index.vue';
|
||||
import dayjs from 'dayjs';
|
||||
import Upload from '@/views/PoliceWork/RegisterVisit/components/upload.vue';
|
||||
|
||||
|
||||
const {proxy} = getCurrentInstance();
|
||||
const {visit_reply_type} = proxy.useDict('visit_reply_type');
|
||||
|
||||
const loading = ref(false);
|
||||
|
||||
const paging = ref({
|
||||
pageNum: 1,
|
||||
pageSize: PageEnum.SIZE,
|
||||
});
|
||||
const queryParams = ref({
|
||||
name: '',
|
||||
});
|
||||
|
||||
const tableDataRef = useTemplateRef('tableDataRef')
|
||||
const AddEditRegisterVisitRef = useTemplateRef('AddEditRegisterVisitRef')
|
||||
const uploadRef = useTemplateRef('uploadRef')
|
||||
|
||||
const total = ref(0);
|
||||
const tableData = ref([
|
||||
{
|
||||
name: '1'
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
getLists();
|
||||
});
|
||||
|
||||
// 获取案件列表
|
||||
const getLists = async () => {
|
||||
const res = await getVisitList(queryParams.value, paging.value)
|
||||
tableData.value = res.rows;
|
||||
total.value = res.total
|
||||
};
|
||||
|
||||
const deleteHandle = (row) => {
|
||||
ElMessageBox.confirm('确定取消?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then(async () => {
|
||||
await deleteVisit(row.visitId)
|
||||
await getLists()
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
};
|
||||
|
||||
const handleExport = async () => {
|
||||
// await exportVisit()
|
||||
proxy.download('visiting/visit/export', {
|
||||
...queryParams.value,
|
||||
}, `user_${new Date().getTime()}.xlsx`);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
|
@ -1,16 +1,9 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!-- 使用修改密码弹框组件 -->
|
||||
<ChangePasswordDialog
|
||||
ref="showDialogBtnRef"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import ChangePasswordDialog from '@/components/ChangePassword/ChangePasswordDialog.vue';
|
||||
import {PasswordIsOverTime} from "@/api/system/user";
|
||||
|
||||
const {proxy} = getCurrentInstance();
|
||||
|
||||
@ -18,11 +11,6 @@ const showDialogBtnRef = ref()
|
||||
|
||||
const form = ref({})
|
||||
onMounted(() => {
|
||||
PasswordIsOverTime().then(res => {
|
||||
if(res.data){
|
||||
showDialogBtnRef.value.showDialog()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
</script>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -45,7 +45,7 @@ export default defineConfig(({mode, command}) => {
|
||||
'/dev-api': {
|
||||
// target: 'http://192.168.3.10:18066', //耗子本地
|
||||
|
||||
target: 'http://106.15.139.36:18066', //36 VPN 转发到 3 上
|
||||
target: 'http://106.15.139.36:18067', //36 VPN 转发到 3 上
|
||||
|
||||
changeOrigin: true,
|
||||
rewrite: (p) => p.replace(/^\/dev-api/, ''),
|
||||
|
Loading…
x
Reference in New Issue
Block a user