12309
This commit is contained in:
parent
6628970dde
commit
d703bd2a4a
@ -1,51 +1,87 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
import { parseStrEmpty } from "@/utils/ruoyi";
|
|
||||||
|
|
||||||
// 查询 列表
|
// 获取列表数据
|
||||||
export function BAApplyList(data,query) {
|
export const getVisitList = (data, params) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/bussiness/Apply/list',
|
url: '/visiting/visit/list',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
params: query,
|
params,
|
||||||
data: data,
|
data,
|
||||||
isEncrypt: false
|
isEncrypt: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 查询详情
|
|
||||||
export function getBAApplyInfo(query) {
|
// 新增访问记录
|
||||||
|
export const addVisit = (data) => {
|
||||||
|
return request({
|
||||||
|
url: '/visiting/visit/add',
|
||||||
|
method: 'post',
|
||||||
|
data,
|
||||||
|
isEncrypt: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取访问详情
|
||||||
|
export const getVisitInfo = (id) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/bussiness/Apply/info?id=' + query,
|
|
||||||
method: 'get',
|
method: 'get',
|
||||||
// params: query
|
url: '/visiting/visit/info',
|
||||||
|
params: {
|
||||||
|
id: id
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增
|
// 更新访问内容
|
||||||
|
export const updateVisit = (data) => {
|
||||||
export function createBAApply(data) {
|
|
||||||
return request({
|
return request({
|
||||||
url: '/bussiness/Apply/add',
|
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
url: '/visiting/visit/edit',
|
||||||
data: data,
|
data: data,
|
||||||
isEncrypt: false
|
isEncrypt: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改
|
// 取消访问记录
|
||||||
export function editBAApply(data) {
|
export const deleteVisit = (id) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/bussiness/Apply/edit',
|
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
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
|
isEncrypt: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除
|
// 获取历史上访列表
|
||||||
export function deleteBAApply(id) {
|
export const getHistoryList = (code) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/bussiness/Apply/remove?ids=' + id,
|
method: 'get',
|
||||||
method: 'post',
|
url: '/visiting/visit/list_visitor_history',
|
||||||
|
params: {
|
||||||
|
id_card: code
|
||||||
|
},
|
||||||
isEncrypt: false
|
isEncrypt: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 导出访问记录
|
||||||
|
export const exportVisit = () => {
|
||||||
|
return request({
|
||||||
|
method: 'post',
|
||||||
|
url: '/visiting/visit/export'
|
||||||
|
})
|
||||||
|
}
|
@ -38,7 +38,8 @@ export function addMenu(data) {
|
|||||||
return request({
|
return request({
|
||||||
url: '/system/menu',
|
url: '/system/menu',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: data
|
data: data,
|
||||||
|
isEncrypt:false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,6 +7,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
defineOptions({
|
||||||
|
name:'DividerHeader'
|
||||||
|
})
|
||||||
const {title} = defineProps(['title'])
|
const {title} = defineProps(['title'])
|
||||||
</script>
|
</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>
|
<template>
|
||||||
<el-dialog :title="upload.title" v-model="isShow" width="400px" append-to-body>
|
<el-dialog :title="upload.title" v-model="isShow" width="400px" append-to-body>
|
||||||
<el-upload
|
<el-upload
|
||||||
|
ref="uploadRef"
|
||||||
:limit="1"
|
:limit="1"
|
||||||
accept=".xlsx, .xls"
|
accept=".xlsx, .xls"
|
||||||
:headers="upload.headers"
|
:headers="upload.headers"
|
||||||
@ -9,6 +10,7 @@
|
|||||||
:on-progress="handleFileUploadProgress"
|
:on-progress="handleFileUploadProgress"
|
||||||
:on-success="handleFileSuccess"
|
:on-success="handleFileSuccess"
|
||||||
:auto-upload="false"
|
:auto-upload="false"
|
||||||
|
name="importFile"
|
||||||
drag
|
drag
|
||||||
>
|
>
|
||||||
<el-icon class="el-icon--upload">
|
<el-icon class="el-icon--upload">
|
||||||
@ -17,10 +19,10 @@
|
|||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
<template #tip>
|
<template #tip>
|
||||||
<div class="el-upload__tip text-center">
|
<div class="el-upload__tip text-center">
|
||||||
<div class="el-upload__tip">
|
<!-- <div class="el-upload__tip">-->
|
||||||
<el-checkbox v-model="upload.updateSupport" />
|
<!-- <el-checkbox v-model="upload.updateSupport"/>-->
|
||||||
是否更新已经存在的用户数据
|
<!-- 是否更新已经存在的用户数据-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||||
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
|
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
|
||||||
@click="importTemplate">下载模板
|
@click="importTemplate">下载模板
|
||||||
@ -38,14 +40,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<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 isShow = ref(false); // 控制弹窗显示/隐藏
|
||||||
|
const fileList = ref([])
|
||||||
const upload = ref({
|
const upload = ref({
|
||||||
title: '用户导入',
|
title: '用户导入',
|
||||||
url: 'upload_url_here', // 文件上传的API接口
|
url: import.meta.env.VITE_APP_BASE_API + '/visiting/visit/import', // 文件上传的API接口
|
||||||
isUploading: false,
|
isUploading: false,
|
||||||
headers: {}, // 如果需要传递额外的headers
|
headers: {Authorization: 'Bearer ' + getToken()}, // 如果需要传递额外的headers
|
||||||
updateSupport: false, // 更新现有用户
|
updateSupport: false, // 更新现有用户
|
||||||
});
|
});
|
||||||
const TemplateDownUrl = ref('/导入模版.xlsx'); // 控制弹窗显示/隐藏
|
const TemplateDownUrl = ref('/导入模版.xlsx'); // 控制弹窗显示/隐藏
|
||||||
@ -59,23 +67,27 @@ const showupload = () => {
|
|||||||
defineExpose({showupload})
|
defineExpose({showupload})
|
||||||
// 提交上传的表单
|
// 提交上传的表单
|
||||||
const submitFileForm = () => {
|
const submitFileForm = () => {
|
||||||
console.log("提交文件...");
|
console.log('提交文件...');
|
||||||
// 上传逻辑:你可以在这里触发上传文件的逻辑
|
// 上传逻辑:你可以在这里触发上传文件的逻辑
|
||||||
|
proxy.$refs['uploadRef'].submit();
|
||||||
isShow.value = false; // 上传后关闭弹窗
|
isShow.value = false; // 上传后关闭弹窗
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 下载模板操作 */
|
/** 下载模板操作 */
|
||||||
function importTemplate() {
|
function importTemplate() {
|
||||||
window.open(TemplateDownUrl.value, '_blank');
|
window.open(TemplateDownUrl.value, '_blank');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 进度回调
|
// 进度回调
|
||||||
const handleFileUploadProgress = (progressEvent) => {
|
const handleFileUploadProgress = (progressEvent) => {
|
||||||
console.log("上传进度:", progressEvent);
|
console.log('上传进度:', progressEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
// 上传成功的回调
|
// 上传成功的回调
|
||||||
const handleFileSuccess = (response, file, fileList) => {
|
const handleFileSuccess = (response, file, fileList) => {
|
||||||
console.log("上传成功:", response);
|
console.log('上传成功:', response);
|
||||||
// 上传成功后,可以触发父组件的事件来刷新数据
|
// 上传成功后,可以触发父组件的事件来刷新数据
|
||||||
emit('getList');
|
proxy.$refs['uploadRef'].handleRemove(file);
|
||||||
|
emit('refresh');
|
||||||
};
|
};
|
||||||
</script>
|
</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>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<!-- 使用修改密码弹框组件 -->
|
|
||||||
<ChangePasswordDialog
|
|
||||||
ref="showDialogBtnRef"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import ChangePasswordDialog from '@/components/ChangePassword/ChangePasswordDialog.vue';
|
|
||||||
import {PasswordIsOverTime} from "@/api/system/user";
|
|
||||||
|
|
||||||
const {proxy} = getCurrentInstance();
|
const {proxy} = getCurrentInstance();
|
||||||
|
|
||||||
@ -18,11 +11,6 @@ const showDialogBtnRef = ref()
|
|||||||
|
|
||||||
const form = ref({})
|
const form = ref({})
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
PasswordIsOverTime().then(res => {
|
|
||||||
if(res.data){
|
|
||||||
showDialogBtnRef.value.showDialog()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -31,9 +31,9 @@
|
|||||||
<!--用户数据-->
|
<!--用户数据-->
|
||||||
<el-col :span="20" :xs="24">
|
<el-col :span="20" :xs="24">
|
||||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="88px">
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="88px">
|
||||||
<el-form-item label="姓名" prop="userName">
|
<el-form-item label="姓名" prop="nickName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.userName"
|
v-model="queryParams.nickName"
|
||||||
placeholder="请输入姓名"
|
placeholder="请输入姓名"
|
||||||
clearable
|
clearable
|
||||||
style="width: 240px"
|
style="width: 240px"
|
||||||
@ -167,7 +167,7 @@
|
|||||||
v-if="columns[0].visible"/>
|
v-if="columns[0].visible"/>
|
||||||
<el-table-column label="姓名" align="center" key="userName" prop="userName"
|
<el-table-column label="姓名" align="center" key="userName" prop="userName"
|
||||||
v-if="columns[1].visible" :show-overflow-tooltip="true"/>
|
v-if="columns[1].visible" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="登录账号" align="center" key="loginName" prop="loginName"
|
<el-table-column label="登录账号" align="center" key="userName" prop="userName"
|
||||||
v-if="columns[2].visible" :show-overflow-tooltip="true"/>
|
v-if="columns[2].visible" :show-overflow-tooltip="true"/>
|
||||||
<el-table-column label="单位" align="center" key="unitName" prop="unitName"
|
<el-table-column label="单位" align="center" key="unitName" prop="unitName"
|
||||||
v-if="columns[3].visible" :show-overflow-tooltip="true"/>
|
v-if="columns[3].visible" :show-overflow-tooltip="true"/>
|
||||||
@ -197,11 +197,13 @@
|
|||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['system:user:edit']"></el-button>
|
v-hasPermi="['system:user:edit']"></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="删除" placement="top" v-if="scope.row.userId !== 1 && queryParams.delFlag !== '2'">
|
<el-tooltip content="删除" placement="top"
|
||||||
|
v-if="scope.row.userId !== 1 && queryParams.delFlag !== '2'">
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['system:user:remove']"></el-button>
|
v-hasPermi="['system:user:remove']"></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="彻底删除" placement="top" v-if="scope.row.userId !== 1 && queryParams.delFlag === '2'">
|
<el-tooltip content="彻底删除" placement="top"
|
||||||
|
v-if="scope.row.userId !== 1 && queryParams.delFlag === '2'">
|
||||||
<el-button link type="danger" icon="Delete" @click="handleBackDelete(scope.row)"
|
<el-button link type="danger" icon="Delete" @click="handleBackDelete(scope.row)"
|
||||||
v-hasPermi="['system:user:remove']"></el-button>
|
v-hasPermi="['system:user:remove']"></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
@ -237,8 +239,8 @@
|
|||||||
<el-form :model="form" :rules="rules" ref="userRef" label-width="80px">
|
<el-form :model="form" :rules="rules" ref="userRef" label-width="80px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12" v-if="form.userId == undefined">
|
<el-col :span="12" v-if="form.userId == undefined">
|
||||||
<el-form-item label="登录账号" prop="loginName">
|
<el-form-item label="登录账号" prop="userName">
|
||||||
<el-input v-model="form.loginName" placeholder="请输入登录账号" maxlength="30"/>
|
<el-input v-model="form.userName" placeholder="请输入登录账号" maxlength="30"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" v-if="form.userId == undefined">
|
<el-col :span="12" v-if="form.userId == undefined">
|
||||||
@ -248,8 +250,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="姓名" prop="userName">
|
<el-form-item label="姓名" prop="nickName">
|
||||||
<el-input v-model="form.userName" placeholder="请输入姓名" maxlength="30"/>
|
<el-input v-model="form.nickName" placeholder="请输入姓名" maxlength="30"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -353,7 +355,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<span style="font-size: 14px;color:red">提示:</span>
|
<span style="font-size: 14px;color:red">提示:</span>
|
||||||
<span style="font-size: 14px;">法警归属部门必须选法警部,辅警归属部门必须选辅警部,法警负责人角色必须选法警(辅警)负责人,分管领导角色必须选单位领导</span>
|
<span
|
||||||
|
style="font-size: 14px;">法警归属部门必须选法警部,辅警归属部门必须选辅警部,法警负责人角色必须选法警(辅警)负责人,分管领导角色必须选单位领导</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
@ -407,30 +410,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="User">
|
<script setup>
|
||||||
import {getToken} from "@/utils/auth";
|
import {getToken} from '@/utils/auth';
|
||||||
import { listDept} from "@/api/system/dept";
|
import {listDept} from '@/api/system/dept';
|
||||||
import { getUserProfile } from "@/api/system/user";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
changeUserStatus,
|
|
||||||
listUser,
|
|
||||||
listDelUser,
|
|
||||||
DelrealRemove,
|
|
||||||
resetUserPwd,
|
|
||||||
delUser,
|
|
||||||
getUser,
|
|
||||||
updateUser,
|
|
||||||
addUser,
|
addUser,
|
||||||
deptTreeSelect
|
changeUserStatus,
|
||||||
} from "@/api/system/user";
|
DelrealRemove,
|
||||||
import {Plus} from "@element-plus/icons-vue";
|
delUser,
|
||||||
import {ElMessage} from "element-plus";
|
deptTreeSelect,
|
||||||
import PageEnum from "@/enum/PageEnum.js";
|
getUser,
|
||||||
|
getUserProfile,
|
||||||
|
listDelUser,
|
||||||
|
listUser,
|
||||||
|
resetUserPwd,
|
||||||
|
updateUser
|
||||||
|
} from '@/api/system/user';
|
||||||
|
import PageEnum from '@/enum/PageEnum.js';
|
||||||
|
import {useRouter} from 'vue-router';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const {proxy} = getCurrentInstance();
|
const {proxy} = getCurrentInstance();
|
||||||
const {sys_normal_disable, sys_user_sex} = proxy.useDict("sys_normal_disable", "sys_user_sex");
|
const {sys_normal_disable, sys_user_sex} = proxy.useDict('sys_normal_disable', 'sys_user_sex');
|
||||||
|
|
||||||
const userList = ref([]);
|
const userList = ref([]);
|
||||||
const open = ref(false);
|
const open = ref(false);
|
||||||
@ -441,9 +442,9 @@
|
|||||||
const single = ref(true);
|
const single = ref(true);
|
||||||
const multiple = ref(true);
|
const multiple = ref(true);
|
||||||
const total = ref(0);
|
const total = ref(0);
|
||||||
const title = ref("");
|
const title = ref('');
|
||||||
const dateRange = ref([]);
|
const dateRange = ref([]);
|
||||||
const deptName = ref("");
|
const deptName = ref('');
|
||||||
const deptOptions = ref(undefined);
|
const deptOptions = ref(undefined);
|
||||||
const deptOptionsEdit = ref(undefined);
|
const deptOptionsEdit = ref(undefined);
|
||||||
|
|
||||||
@ -459,15 +460,15 @@
|
|||||||
// 是否显示弹出层(用户导入)
|
// 是否显示弹出层(用户导入)
|
||||||
open: false,
|
open: false,
|
||||||
// 弹出层标题(用户导入)
|
// 弹出层标题(用户导入)
|
||||||
title: "",
|
title: '',
|
||||||
// 是否禁用上传
|
// 是否禁用上传
|
||||||
isUploading: false,
|
isUploading: false,
|
||||||
// 是否更新已经存在的用户数据
|
// 是否更新已经存在的用户数据
|
||||||
updateSupport: 0,
|
updateSupport: 0,
|
||||||
// 设置上传的请求头部
|
// 设置上传的请求头部
|
||||||
headers: {Authorization: "Bearer " + getToken()},
|
headers: {Authorization: 'Bearer ' + getToken()},
|
||||||
// 上传的地址
|
// 上传的地址
|
||||||
url: import.meta.env.VITE_APP_BASE_API + "/system/user/importData"
|
url: import.meta.env.VITE_APP_BASE_API + '/system/user/importData'
|
||||||
});
|
});
|
||||||
// 列显隐信息
|
// 列显隐信息
|
||||||
const columns = ref([
|
const columns = ref([
|
||||||
@ -493,38 +494,38 @@
|
|||||||
status: undefined,
|
status: undefined,
|
||||||
delFlag: undefined,
|
delFlag: undefined,
|
||||||
deptId: undefined,
|
deptId: undefined,
|
||||||
|
nickName: undefined,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
userName: [{required: true, message: "姓名不能为空", trigger: "blur"}, {
|
userName: [{required: true, message: '姓名不能为空', trigger: 'blur'}, {
|
||||||
min: 2,
|
min: 2,
|
||||||
max: 20,
|
max: 20,
|
||||||
message: "姓名长度必须介于 2 和 20 之间",
|
message: '姓名长度必须介于 2 和 20 之间',
|
||||||
trigger: "blur"
|
trigger: 'blur'
|
||||||
}],
|
}],
|
||||||
loginName: [{required: true, message: "登录账号不能为空", trigger: "blur"}],
|
loginName: [{required: true, message: '登录账号不能为空', trigger: 'blur'}],
|
||||||
unitId: [{required: true, message: "所属单位不能为空", trigger: "blur"}],
|
unitId: [{required: true, message: '所属单位不能为空', trigger: 'blur'}],
|
||||||
deptId: [{required: true, message: "归属部门不能为空", trigger: "blur"}],
|
deptId: [{required: true, message: '归属部门不能为空', trigger: 'blur'}],
|
||||||
password: [{required: true, message: "登录密码不能为空", trigger: "blur"}, {
|
password: [{required: true, message: '登录密码不能为空', trigger: 'blur'}, {
|
||||||
min: 5,
|
min: 5,
|
||||||
max: 20,
|
max: 20,
|
||||||
message: "登录密码长度必须介于 5 和 20 之间",
|
message: '登录密码长度必须介于 5 和 20 之间',
|
||||||
trigger: "blur"
|
trigger: 'blur'
|
||||||
}, {pattern: /^[^<>"'|\\]+$/, message: "不能包含非法字符:< > \" ' \\\ |", trigger: "blur"}],
|
}, {pattern: /^[^<>"'|\\]+$/, message: '不能包含非法字符:< > " \' \\\ |', trigger: 'blur'}],
|
||||||
email: [{required: true, message: "人员编号不能为空", trigger: ["blur"]}],
|
email: [{required: true, message: '人员编号不能为空', trigger: ['blur']}],
|
||||||
postIds: [{required: true, message: "岗位不能为空", trigger: ["change"]}],
|
postIds: [{required: true, message: '岗位不能为空', trigger: ['change']}],
|
||||||
roleIds:[{required: true, message: "角色不能为空", trigger: "blur"}],
|
roleIds: [{required: true, message: '角色不能为空', trigger: 'blur'}],
|
||||||
phonenumber: [{pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur"}],
|
phonenumber: [{pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: '请输入正确的手机号码', trigger: 'blur'}],
|
||||||
identityCard: [
|
identityCard: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: "身份证号不能为空",
|
message: '身份证号不能为空',
|
||||||
trigger: "blur"
|
trigger: 'blur'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
|
pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,
|
||||||
message: "请输入正确的身份证号",
|
message: '请输入正确的身份证号',
|
||||||
trigger: "blur"
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -539,7 +540,7 @@
|
|||||||
};
|
};
|
||||||
/** 根据名称筛选部门树 */
|
/** 根据名称筛选部门树 */
|
||||||
watch(deptName, val => {
|
watch(deptName, val => {
|
||||||
proxy.$refs["deptTreeRef"].filter(val);
|
proxy.$refs['deptTreeRef'].filter(val);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@ -572,13 +573,14 @@
|
|||||||
defaultexpandedkeys.value = deptOptions.value.map(item => item.id);
|
defaultexpandedkeys.value = deptOptions.value.map(item => item.id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询部门列表 */
|
/** 查询部门列表 */
|
||||||
function getDeptList() {
|
function getDeptList() {
|
||||||
listDept().then(res => {
|
listDept().then(res => {
|
||||||
UnitOptions.value = res.data.filter(
|
UnitOptions.value = res.data.filter(
|
||||||
item => item.isUnit === true
|
item => item.isUnit === true
|
||||||
);
|
);
|
||||||
const data = proxy.handleTree(UnitOptions.value, "deptId");
|
const data = proxy.handleTree(UnitOptions.value, 'deptId');
|
||||||
UnitOptions.value = data
|
UnitOptions.value = data
|
||||||
// console.log(UnitOptions.value)
|
// console.log(UnitOptions.value)
|
||||||
// const buildHierarchy = (data, parentId = 0) => {
|
// const buildHierarchy = (data, parentId = 0) => {
|
||||||
@ -595,6 +597,7 @@
|
|||||||
// UnitOptions.value = buildHierarchy(data)
|
// UnitOptions.value = buildHierarchy(data)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 查询用户列aa表 */
|
/** 查询用户列aa表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
if (!queryParams.value.unitId) {
|
if (!queryParams.value.unitId) {
|
||||||
@ -659,7 +662,7 @@
|
|||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
function resetQuery() {
|
function resetQuery() {
|
||||||
dateRange.value = [];
|
dateRange.value = [];
|
||||||
proxy.resetForm("queryRef");
|
proxy.resetForm('queryRef');
|
||||||
queryParams.value.unitId = undefined;
|
queryParams.value.unitId = undefined;
|
||||||
proxy.$refs.deptTreeRef.setCurrentKey(null);
|
proxy.$refs.deptTreeRef.setCurrentKey(null);
|
||||||
handleQuery();
|
handleQuery();
|
||||||
@ -673,17 +676,18 @@
|
|||||||
return delUser(userIds);
|
return delUser(userIds);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
getList();
|
getList();
|
||||||
proxy.$modal.msgSuccess("删除成功");
|
proxy.$modal.msgSuccess('删除成功');
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 撤销删除按钮操作 */
|
/** 撤销删除按钮操作 */
|
||||||
function handleBackDelete(row) {
|
function handleBackDelete(row) {
|
||||||
const userIds = row.userId;
|
const userIds = row.userId;
|
||||||
const userName = row.userName || usernames.value;
|
const userName = row.userName || usernames.value;
|
||||||
proxy.$modal.confirm('用户有业务数据,是否确认彻底删除用户姓名为"' + userName + '"的数据项?删除后将删除此用户所有关联业务数据').then(function () {
|
proxy.$modal.confirm('用户有业务数据,是否确认彻底删除用户姓名为"' + userName + '"的数据项?删除后将删除此用户所有关联业务数据').then(function () {
|
||||||
DelrealRemove(userIds).then(response => {
|
DelrealRemove(userIds).then(response => {
|
||||||
proxy.$modal.msgSuccess("删除成功");
|
proxy.$modal.msgSuccess('删除成功');
|
||||||
open.value = false;
|
open.value = false;
|
||||||
handleQuery();
|
handleQuery();
|
||||||
});
|
});
|
||||||
@ -695,30 +699,30 @@
|
|||||||
|
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
function handleExport() {
|
function handleExport() {
|
||||||
proxy.download("system/user/export", {
|
proxy.download('system/user/export', {
|
||||||
...queryParams.value,
|
...queryParams.value,
|
||||||
}, `user_${new Date().getTime()}.xlsx`);
|
}, `user_${new Date().getTime()}.xlsx`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 用户状态修改 */
|
/** 用户状态修改 */
|
||||||
function handleStatusChange(row) {
|
function handleStatusChange(row) {
|
||||||
let text = row.status === "0" ? "启用" : "停用";
|
let text = row.status === '0' ? '启用' : '停用';
|
||||||
proxy.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function () {
|
proxy.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function () {
|
||||||
return changeUserStatus(row.userId, row.status);
|
return changeUserStatus(row.userId, row.status);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
proxy.$modal.msgSuccess(text + "成功");
|
proxy.$modal.msgSuccess(text + '成功');
|
||||||
}).catch(function () {
|
}).catch(function () {
|
||||||
row.status = row.status === "0" ? "1" : "0";
|
row.status = row.status === '0' ? '1' : '0';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 更多操作 */
|
/** 更多操作 */
|
||||||
function handleCommand(command, row) {
|
function handleCommand(command, row) {
|
||||||
switch (command) {
|
switch (command) {
|
||||||
case "handleResetPwd":
|
case 'handleResetPwd':
|
||||||
handleResetPwd(row);
|
handleResetPwd(row);
|
||||||
break;
|
break;
|
||||||
case "handleAuthRole":
|
case 'handleAuthRole':
|
||||||
handleAuthRole(row);
|
handleAuthRole(row);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -729,17 +733,17 @@
|
|||||||
/** 跳转角色分配 */
|
/** 跳转角色分配 */
|
||||||
function handleAuthRole(row) {
|
function handleAuthRole(row) {
|
||||||
const userId = row.userId;
|
const userId = row.userId;
|
||||||
router.push("/system/user-auth/role/" + userId);
|
router.push('/system/user-auth/role/' + userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置密码按钮操作 */
|
/** 重置密码按钮操作 */
|
||||||
function handleResetPwd(row) {
|
function handleResetPwd(row) {
|
||||||
proxy.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
|
proxy.$prompt('请输入"' + row.userName + '"的新密码', '提示', {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: '取消',
|
||||||
closeOnClickModal: false,
|
closeOnClickModal: false,
|
||||||
inputPattern: /^.{5,20}$/,
|
inputPattern: /^.{5,20}$/,
|
||||||
inputErrorMessage: "登录密码长度必须介于 5 和 20 之间",
|
inputErrorMessage: '登录密码长度必须介于 5 和 20 之间',
|
||||||
// inputValidator: (value) => {
|
// inputValidator: (value) => {
|
||||||
// if (/<|>|"|'|\||\\/.test(value)) {
|
// if (/<|>|"|'|\||\\/.test(value)) {
|
||||||
// return "不能包含非法字符:< > \" ' \\\ |"
|
// return "不能包含非法字符:< > \" ' \\\ |"
|
||||||
@ -748,7 +752,7 @@
|
|||||||
inputValidator: (value) => {
|
inputValidator: (value) => {
|
||||||
// 检查非法字符
|
// 检查非法字符
|
||||||
if (/<|>|"|'|\||\\/.test(value)) {
|
if (/<|>|"|'|\||\\/.test(value)) {
|
||||||
return "不能包含非法字符:< > \" ' \\\ |";
|
return '不能包含非法字符:< > " \' \\\ |';
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查密码强度:是否包含字母、数字和特殊字符
|
// 检查密码强度:是否包含字母、数字和特殊字符
|
||||||
@ -757,7 +761,7 @@
|
|||||||
const hasSpecialChar = /[!@#$%^&*(),.?":{}|<>]/.test(value);
|
const hasSpecialChar = /[!@#$%^&*(),.?":{}|<>]/.test(value);
|
||||||
|
|
||||||
if (!hasLetter || !hasNumber || !hasSpecialChar) {
|
if (!hasLetter || !hasNumber || !hasSpecialChar) {
|
||||||
return "密码必须包含英文、数字、特殊字符!";
|
return '密码必须包含英文、数字、特殊字符!';
|
||||||
}
|
}
|
||||||
|
|
||||||
return true; // 返回true,表示验证通过
|
return true; // 返回true,表示验证通过
|
||||||
@ -765,11 +769,11 @@
|
|||||||
}).then(({value}) => {
|
}).then(({value}) => {
|
||||||
const rowdata = {
|
const rowdata = {
|
||||||
userId: row.userId,
|
userId: row.userId,
|
||||||
loginName:row.loginName
|
userName: row.userName
|
||||||
}
|
}
|
||||||
resetUserPwd(rowdata, value).then(response => {
|
resetUserPwd(rowdata, value).then(response => {
|
||||||
// proxy.$modal.msgSuccess("修改成功,新密码是:" + value);
|
// proxy.$modal.msgSuccess("修改成功,新密码是:" + value);
|
||||||
proxy.$modal.msgSuccess("修改成功");
|
proxy.$modal.msgSuccess('修改成功');
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
});
|
});
|
||||||
@ -785,13 +789,13 @@
|
|||||||
|
|
||||||
/** 导入按钮操作 */
|
/** 导入按钮操作 */
|
||||||
function handleImport() {
|
function handleImport() {
|
||||||
upload.title = "用户导入";
|
upload.title = '用户导入';
|
||||||
upload.open = true;
|
upload.open = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 下载模板操作 */
|
/** 下载模板操作 */
|
||||||
function importTemplate() {
|
function importTemplate() {
|
||||||
proxy.download("system/user/importTemplate", {}, `user_template_${new Date().getTime()}.xlsx`);
|
proxy.download('system/user/importTemplate', {}, `user_template_${new Date().getTime()}.xlsx`);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**文件上传中处理 */
|
/**文件上传中处理 */
|
||||||
@ -802,14 +806,14 @@
|
|||||||
const handleFileSuccess = (response, file, fileList) => {
|
const handleFileSuccess = (response, file, fileList) => {
|
||||||
upload.open = false;
|
upload.open = false;
|
||||||
upload.isUploading = false;
|
upload.isUploading = false;
|
||||||
proxy.$refs["uploadRef"].handleRemove(file);
|
proxy.$refs['uploadRef'].handleRemove(file);
|
||||||
proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", {dangerouslyUseHTMLString: true});
|
proxy.$alert('<div style=\'overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;\'>' + response.msg + '</div>', '导入结果', {dangerouslyUseHTMLString: true});
|
||||||
getList();
|
getList();
|
||||||
};
|
};
|
||||||
|
|
||||||
/** 提交上传文件 */
|
/** 提交上传文件 */
|
||||||
function submitFileForm() {
|
function submitFileForm() {
|
||||||
proxy.$refs["uploadRef"].submit();
|
proxy.$refs['uploadRef'].submit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置操作表单 */
|
/** 重置操作表单 */
|
||||||
@ -823,12 +827,12 @@
|
|||||||
phonenumber: undefined,
|
phonenumber: undefined,
|
||||||
email: undefined,
|
email: undefined,
|
||||||
sex: undefined,
|
sex: undefined,
|
||||||
status: "0",
|
status: '0',
|
||||||
remark: undefined,
|
remark: undefined,
|
||||||
postIds: [],
|
postIds: [],
|
||||||
roleIds: []
|
roleIds: []
|
||||||
};
|
};
|
||||||
proxy.resetForm("userRef");
|
proxy.resetForm('userRef');
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
@ -846,7 +850,7 @@
|
|||||||
postOptions.value = response.posts;
|
postOptions.value = response.posts;
|
||||||
roleOptions.value = response.roles;
|
roleOptions.value = response.roles;
|
||||||
|
|
||||||
title.value = "添加用户";
|
title.value = '添加用户';
|
||||||
form.value.password = initPassword.value;
|
form.value.password = initPassword.value;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -862,8 +866,8 @@
|
|||||||
form.value.postIds = response.postIds;
|
form.value.postIds = response.postIds;
|
||||||
form.value.roleIds = response.roleIds;
|
form.value.roleIds = response.roleIds;
|
||||||
open.value = true;
|
open.value = true;
|
||||||
title.value = "修改用户";
|
title.value = '修改用户';
|
||||||
form.password = "";
|
form.password = '';
|
||||||
|
|
||||||
listDept().then(res => {
|
listDept().then(res => {
|
||||||
deptOptionsEdit.value = res.data.filter(
|
deptOptionsEdit.value = res.data.filter(
|
||||||
@ -879,18 +883,18 @@
|
|||||||
|
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
function submitForm() {
|
function submitForm() {
|
||||||
proxy.$refs["userRef"].validate(valid => {
|
proxy.$refs['userRef'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (form.value.userId != undefined) {
|
if (form.value.userId != undefined) {
|
||||||
form.value.password = null
|
form.value.password = null
|
||||||
updateUser(form.value).then(response => {
|
updateUser(form.value).then(response => {
|
||||||
proxy.$modal.msgSuccess("修改成功");
|
proxy.$modal.msgSuccess('修改成功');
|
||||||
open.value = false;
|
open.value = false;
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addUser(form.value).then(response => {
|
addUser(form.value).then(response => {
|
||||||
proxy.$modal.msgSuccess("新增成功");
|
proxy.$modal.msgSuccess('新增成功');
|
||||||
open.value = false;
|
open.value = false;
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
@ -906,6 +910,11 @@
|
|||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
:deep().el-select__selected-item{margin-right: 10px;}
|
:deep().el-select__selected-item {
|
||||||
:deep().el-tag{max-width: 300px!important;}
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep().el-tag {
|
||||||
|
max-width: 300px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -45,7 +45,7 @@ export default defineConfig(({mode, command}) => {
|
|||||||
'/dev-api': {
|
'/dev-api': {
|
||||||
// target: 'http://192.168.3.10:18066', //耗子本地
|
// 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,
|
changeOrigin: true,
|
||||||
rewrite: (p) => p.replace(/^\/dev-api/, ''),
|
rewrite: (p) => p.replace(/^\/dev-api/, ''),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user