first commit
This commit is contained in:
340
src/views/visit/blackList/index.vue
Normal file
340
src/views/visit/blackList/index.vue
Normal file
@@ -0,0 +1,340 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="88px">
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input
|
||||
v-model="queryParams.phone"
|
||||
placeholder="请输入联系电话"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号码" prop="idcard">
|
||||
<el-input
|
||||
v-model="queryParams.idcard"
|
||||
placeholder="请输入身份证号码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="车牌号码" prop="carNo">
|
||||
<el-input
|
||||
v-model="queryParams.carNo"
|
||||
placeholder="请输入车牌号码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:blackList:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:blackList:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:blackList:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:blackList:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="blackListList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!--
|
||||
<el-table-column label="人员Id" align="center" prop="id" />
|
||||
-->
|
||||
<el-table-column label="姓名" align="center" prop="name" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||
<el-table-column label="性别" align="center" prop="sex">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="身份证号" align="center" prop="idcard" />
|
||||
<el-table-column label="车牌号码" align="center" prop="carNo" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:blackList:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:blackList:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改黑名单管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="650px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="姓名" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入姓名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="性别" prop="sex">
|
||||
<el-select v-model="form.sex" placeholder="请选择用户性别">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_user_sex"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入联系电话" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" >
|
||||
<el-form-item label="身份证号" prop="idcard">
|
||||
<el-input v-model="form.idcard" placeholder="请输入身份证号码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<el-form-item label="车牌号码" prop="carNo">
|
||||
<el-input v-model="form.carNo" placeholder="请输入车牌号码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listBlackList, getBlackList, delBlackList, addBlackList, updateBlackList } from "@/api/system/blackList";
|
||||
|
||||
export default {
|
||||
name: "BlackList",
|
||||
dicts: ['sys_user_sex'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 黑名单管理表格数据
|
||||
blackListList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
phone: null,
|
||||
sex: null,
|
||||
idcard: null,
|
||||
carNo: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: "姓名不能为空", trigger: "blur" }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: "联系电话不能为空", trigger: "blur" },
|
||||
{ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,message: "请输入正确的手机号码",trigger: "blur"}
|
||||
],
|
||||
idcard: [
|
||||
{ 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: "请输入正确的身份证号码",trigger: "blur"}
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询黑名单管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listBlackList(this.queryParams).then(response => {
|
||||
this.blackListList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
sex: null,
|
||||
idcard: null,
|
||||
carNo: null,
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加黑名单管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getBlackList(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改黑名单管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateBlackList(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addBlackList(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除黑名单管理编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delBlackList(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/blackList/export', {
|
||||
...this.queryParams
|
||||
}, `blackList_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
458
src/views/visit/peopleRecord/index.vue
Normal file
458
src/views/visit/peopleRecord/index.vue
Normal file
@@ -0,0 +1,458 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
||||
<el-form-item label="姓名">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入来访人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="时间">
|
||||
<el-date-picker clearable
|
||||
v-model="showDate"
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@change="dateChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:peopleRecord:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:peopleRecord:export']"
|
||||
>导出</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="peopleRecordList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="姓名" align="center" prop="name" min-width="100"></el-table-column>
|
||||
<el-table-column label="设备序列号" align="center" prop="sequence" min-width="100" />
|
||||
<el-table-column label="被访人" align="center" prop="peopleName" min-width="100" />
|
||||
<el-table-column label="来访时间" align="center" prop="startTime" min-width="100">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="离开时间" align="center" prop="endTime" min-width="100">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.endTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="识别时间" align="center" prop="showDate" min-width="100">
|
||||
<template v-slot="scope">
|
||||
<span>{{ parseTime(scope.row.showDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="识别主体姓名" align="center" prop="admitName" min-width="100">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.admitName }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备序列号" align="center" prop="deviceNo" min-width="100"/>
|
||||
<el-table-column label="识别模式" align="center" prop="recMode" min-width="100">
|
||||
<template v-slot="scope">
|
||||
<template v-if="scope.row.recMode=='1'">
|
||||
人像识别
|
||||
</template>
|
||||
<template v-if="scope.row.recMode=='2'">
|
||||
刷卡识别
|
||||
</template>
|
||||
<template v-if="scope.row.recMode=='3'">
|
||||
人卡合一
|
||||
</template>
|
||||
<template v-if="scope.row.recMode=='4'">
|
||||
人证比对
|
||||
</template>
|
||||
<template v-if="scope.row.recMode=='7'">
|
||||
密码识别
|
||||
</template>
|
||||
<template v-if="scope.row.recMode=='8'">
|
||||
二维码识别
|
||||
</template>
|
||||
<template v-if="scope.row.recMode=='10'">
|
||||
二维码识别
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="现场照url" align="center" prop="filePath" >
|
||||
<template v-slot="scope">
|
||||
<el-image style="width: 80px; height: 80px" :src="scope.row.filePath" fit="cover"
|
||||
:preview-src-list="[scope.row.filePath]"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="人员比对结果" align="center" prop="type" min-width="100">
|
||||
<template v-slot="scope">
|
||||
<template v-if="scope.row.type=='1'">
|
||||
比对成功
|
||||
</template>
|
||||
<template v-if="scope.row.type=='2'">
|
||||
比对失败
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="识别卡号" align="center" prop="cardNo" min-width="100"/>
|
||||
<el-table-column label="设备名称" align="center" prop="deviceName" min-width="100">
|
||||
<template v-slot="scope">
|
||||
<template v-if="scope.row.equipment!=null" >
|
||||
{{scope.row.equipment.name}}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="有效日期" align="center" prop="permissionTimeType" min-width="100">
|
||||
<template v-slot="scope">
|
||||
<template v-if="scope.row.passTimeType=='1'">
|
||||
有效期内
|
||||
</template>
|
||||
<template v-if="scope.row.passTimeType=='2'">
|
||||
有效期外
|
||||
</template>
|
||||
<template v-if="scope.row.passTimeType=='3'">
|
||||
未进行有效期判断
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="有效时间段" align="center" prop="passTimeType" min-width="100">
|
||||
<template v-slot="scope">
|
||||
<template v-if="scope.row.passTimeType=='1'">
|
||||
时间段内
|
||||
</template>
|
||||
<template v-if="scope.row.passTimeType=='2'">
|
||||
时间段外
|
||||
</template>
|
||||
<template v-if="scope.row.passTimeType=='3'">
|
||||
未进行时间段判断
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:peopleRecord:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改人员识别记录对话框 -->
|
||||
<!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="人员id" prop="peopleId">
|
||||
<el-input v-model="form.peopleId" placeholder="请输入人员id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备id" prop="equipmentId">
|
||||
<el-input v-model="form.equipmentId" placeholder="请输入设备id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备内网ip" prop="deviceIp">
|
||||
<el-input v-model="form.deviceIp" placeholder="请输入设备内网ip" />
|
||||
</el-form-item>
|
||||
<el-form-item label="人员guid 或者STRANGERBABY" prop="admitGuid">
|
||||
<el-input v-model="form.admitGuid" placeholder="请输入人员guid 或者STRANGERBABY" />
|
||||
</el-form-item>
|
||||
<el-form-item label="识别模式,1:人像识别, 2:刷卡识别 ,3:人卡合一 4,人证比对 7:密码识别 8 二维码识别" prop="recMode">
|
||||
<el-input v-model="form.recMode" placeholder="请输入识别模式,1:人像识别, 2:刷卡识别 ,3:人卡合一 4,人证比对 7:密码识别 8 二维码识别" />
|
||||
</el-form-item>
|
||||
<el-form-item label="现场照url" prop="filePath">
|
||||
<el-input v-model="form.filePath" placeholder="请输入现场照url" />
|
||||
</el-form-item>
|
||||
<el-form-item label="识别记录时间戳" prop="showTime">
|
||||
<el-input v-model="form.showTime" placeholder="请输入识别记录时间戳" />
|
||||
</el-form-item>
|
||||
<el-form-item label="识别记录时间" prop="showDate">
|
||||
<el-date-picker clearable
|
||||
v-model="form.showDate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择识别记录时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="识别分数" prop="recScore">
|
||||
<el-input v-model="form.recScore" placeholder="请输入识别分数" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备序列号" prop="deviceNo">
|
||||
<el-input v-model="form.deviceNo" placeholder="请输入设备序列号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="软件版本号" prop="deviceVersion">
|
||||
<el-input v-model="form.deviceVersion" placeholder="请输入软件版本号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备来源" prop="source">
|
||||
<el-input v-model="form.source" placeholder="请输入设备来源" />
|
||||
</el-form-item>
|
||||
<el-form-item label="识别卡号" prop="cardNo">
|
||||
<el-input v-model="form.cardNo" placeholder="请输入识别卡号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
<el-input v-model="form.deviceName" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="结果" prop="result">
|
||||
<el-input v-model="form.result" placeholder="请输入结果" />
|
||||
</el-form-item>
|
||||
<el-form-item label="保留字段" prop="storageId">
|
||||
<el-input v-model="form.storageId" placeholder="请输入保留字段" />
|
||||
</el-form-item>
|
||||
<el-form-item label="当前时间戳" prop="timestamp">
|
||||
<el-input v-model="form.timestamp" placeholder="请输入当前时间戳" />
|
||||
</el-form-item>
|
||||
<el-form-item label="识别主体姓名" prop="admitName">
|
||||
<el-input v-model="form.admitName" placeholder="请输入识别主体姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPeopleRecord, getPeopleRecord, delPeopleRecord, addPeopleRecord, updatePeopleRecord,queryVisitorRecordList,deleteVisitorRecordList } from "@/api/system/peopleRecord";
|
||||
import {alllistEquipment} from "@/api/system/equipment";
|
||||
import {listSysPeople} from "@/api/system/sysPeople";
|
||||
|
||||
export default {
|
||||
name: "PeopleRecord",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
showDate:[],
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 人员识别记录表格数据
|
||||
peopleRecordList: [],
|
||||
equipmentOptions:[],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
peopleId: null,
|
||||
equipmentId: null,
|
||||
deviceIp: null,
|
||||
admitGuid: null,
|
||||
recMode: null,
|
||||
filePath: null,
|
||||
showTime: null,
|
||||
showDate: null,
|
||||
aliveType: null,
|
||||
recScore: null,
|
||||
deviceNo: null,
|
||||
deviceVersion: null,
|
||||
source: null,
|
||||
type: null,
|
||||
cardNo: null,
|
||||
deviceName: null,
|
||||
recType: null,
|
||||
result: null,
|
||||
permissionTimeType: null,
|
||||
passTimeType: null,
|
||||
recModeType: null,
|
||||
storageId: null,
|
||||
timestamp: null,
|
||||
admitName: null,
|
||||
//flag:this.$route.query.flag,
|
||||
},
|
||||
queryParams1: {
|
||||
bigtype: 2,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
flag:this.$route.query.flag,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getOptions();
|
||||
},
|
||||
methods: {
|
||||
/** 查询选项列表 */
|
||||
getOptions() {
|
||||
this.equipmentOptions = []
|
||||
alllistEquipment(this.queryParams1).then(response => {
|
||||
this.equipmentOptions = response.data
|
||||
})
|
||||
},
|
||||
dateChange(e){;
|
||||
this.queryParams.startTimeTxt = this.parseTime(e[0], '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
this.queryParams.endTimeTxt = this.parseTime(e[1], '{y}-{m}-{d} {h}:{i}:{s}');
|
||||
|
||||
},
|
||||
/** 查询人员识别记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
queryVisitorRecordList(this.queryParams).then(response => {
|
||||
this.peopleRecordList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
peopleId: null,
|
||||
equipmentId: null,
|
||||
deviceIp: null,
|
||||
admitGuid: null,
|
||||
recMode: null,
|
||||
filePath: null,
|
||||
showTime: null,
|
||||
showDate: null,
|
||||
aliveType: null,
|
||||
recScore: null,
|
||||
deviceNo: null,
|
||||
deviceVersion: null,
|
||||
source: null,
|
||||
type: null,
|
||||
cardNo: null,
|
||||
deviceName: null,
|
||||
recType: null,
|
||||
result: null,
|
||||
permissionTimeType: null,
|
||||
passTimeType: null,
|
||||
recModeType: null,
|
||||
storageId: null,
|
||||
timestamp: null,
|
||||
admitName: null,
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加人员识别记录";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getPeopleRecord(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改人员识别记录";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePeopleRecord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPeopleRecord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids.join(',');
|
||||
this.$modal.confirm('是否确认删除人员识别记录编号为"' + ids + '"的数据项?').then(function() {
|
||||
return deleteVisitorRecordList({ids:ids});
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/peopleRecord/export', {
|
||||
...this.queryParams
|
||||
}, `peopleRecord_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
352
src/views/visit/signOut/index.vue
Normal file
352
src/views/visit/signOut/index.vue
Normal file
@@ -0,0 +1,352 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="身份证号" prop="idcard">
|
||||
<el-input
|
||||
v-model="queryParams.idcard"
|
||||
placeholder="请输入身份证号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="visitorList" @selection-change="handleSelectionChange">
|
||||
<el-table-column label="名称" align="center" prop="name" />
|
||||
<el-table-column label="手机号" align="center" prop="phone" />
|
||||
<el-table-column label="身份证号" align="center" prop="idcard" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-connection"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>签离</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { queryVisitorUnsigned, updateState, delVisitor, addVisitor, updateVisitor } from "@/api/system/signOut";
|
||||
import logoImg from '@/assets/images/example.png'
|
||||
import {branchTreeSelect} from "@/api/system/sysBranch";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import {listSysPeople} from "@/api/system/sysPeople";
|
||||
import urlImg from '@/assets/images/ewm.png';
|
||||
import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
|
||||
|
||||
|
||||
|
||||
export default {
|
||||
name: "Visitor",
|
||||
dicts: ['sys_user_sex','vis_info_type'],
|
||||
components: {Treeselect,ElImageViewer },
|
||||
data() {
|
||||
return {
|
||||
showViewer: false, // 显示查看器
|
||||
url:urlImg,
|
||||
logo: logoImg,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 访客信息表格数据
|
||||
visitorList: [],
|
||||
// 部门树选项
|
||||
branchOptions: [],
|
||||
peopleOptions:[],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
sex: null,
|
||||
avatar: null,
|
||||
userId: null,
|
||||
deptId: null,
|
||||
startTime: null,
|
||||
},
|
||||
queryParams1: {
|
||||
branchId: undefined,
|
||||
},
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: "来访人不能为空", trigger: "blur" }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: "来访人联系电话不能为空", trigger: "blur" }
|
||||
],
|
||||
startTime: [
|
||||
{ required: true, message: "预约时间不能为空", trigger: "blur" }
|
||||
],
|
||||
endTime: [
|
||||
{ required: true, message: "结束时间不能为空", trigger: "blur" }
|
||||
],
|
||||
userId: [
|
||||
{ required: true, message: "被访人不能为空", trigger: "blur" }
|
||||
],
|
||||
deptId: [
|
||||
{ required: true, message: "园区/公司不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
//给一个默认行
|
||||
itemData: [],
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 监听deptId
|
||||
'form.deptId': 'getPeople'
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getOptions();
|
||||
},
|
||||
methods: {
|
||||
/** 查询访客信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
queryVisitorUnsigned(this.queryParams).then(response => {
|
||||
this.visitorList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 查询选项列表 */
|
||||
getOptions() {
|
||||
this.branchOptions = []
|
||||
branchTreeSelect().then(response => {
|
||||
this.branchOptions = response.data
|
||||
})
|
||||
},
|
||||
/** 查询选项列表 */
|
||||
getPeople() {
|
||||
this.queryParams1.branchId=this.form.deptId;
|
||||
this.peopleOptions = []
|
||||
listSysPeople(this.queryParams1).then(response => {
|
||||
this.peopleOptions = response.rows
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
sex: null,
|
||||
avatar: null,
|
||||
idcard: null,
|
||||
carNo: null,
|
||||
userId: null,
|
||||
deptId: null,
|
||||
flag: null,
|
||||
startTime: null,
|
||||
endTime: null,
|
||||
matter: null,
|
||||
res: null,
|
||||
guid: null,
|
||||
faceGuid: null,
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 转换树数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.label,
|
||||
isDisabled: false,
|
||||
children: node.children
|
||||
};
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加访客信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
let that = this;
|
||||
that.$confirm('是否签离?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
updateState({type:'2',id:row.id}).then(res => {
|
||||
that.$message({
|
||||
type: 'success',
|
||||
message: '签离成功!'
|
||||
});
|
||||
that.getList();
|
||||
})
|
||||
}).catch(() => {
|
||||
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.itemList=this.itemData;
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateVisitor(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addVisitor(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除访客信息编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delVisitor(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/visitor/export', {
|
||||
...this.queryParams
|
||||
}, `visitor_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
// 增加一行
|
||||
addRow(length) {
|
||||
if (this.itemData == undefined) {
|
||||
this.itemData = new Array();
|
||||
}
|
||||
let obj = {};
|
||||
obj.avatar = "";
|
||||
obj.name = "";
|
||||
obj.phone = "";
|
||||
this.itemData.push(obj);
|
||||
},
|
||||
// 删除一行
|
||||
deleteRow(index) {
|
||||
this.itemData.splice(index, 1)
|
||||
|
||||
},
|
||||
handleEwm(){
|
||||
this.showViewer = true
|
||||
},
|
||||
// 关闭查看器
|
||||
closeViewer() {
|
||||
this.showViewer = false
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.card_list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.published-div {
|
||||
position: absolute;
|
||||
top: 70px;
|
||||
right: 150px;
|
||||
}
|
||||
.el-button--mini.is-circle {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
.el-col-8 {
|
||||
height: 60px;
|
||||
}
|
||||
.el-select {
|
||||
width: 100%;
|
||||
}
|
||||
.el-date-editor.el-input, .el-date-editor.el-input__inner {
|
||||
width: 100%;
|
||||
}
|
||||
.el-table .cell .el-upload{
|
||||
line-height: 80px;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
.el-table .cell .el-upload-list--picture-card .el-upload-list__item {
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
border: 1px solid #c0ccda;
|
||||
border-radius: 6px;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
margin: 0 8px 8px 0;
|
||||
display: inline-block;
|
||||
}
|
||||
</style>
|
||||
1316
src/views/visit/visitor/index.vue
Normal file
1316
src/views/visit/visitor/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
80
src/views/visit/visitorExamine/RoleAuthModal.vue
Normal file
80
src/views/visit/visitorExamine/RoleAuthModal.vue
Normal file
@@ -0,0 +1,80 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-checkbox v-model="menuExpand" @change="handleTreeExpand">展开/折叠</el-checkbox>
|
||||
<el-checkbox v-model="menuNodeAll" @change="handleTreeNodeAll">全选/全不选</el-checkbox>
|
||||
<el-tree
|
||||
class="tree-border"
|
||||
:data="menuOptions"
|
||||
show-checkbox
|
||||
ref="authRef"
|
||||
node-key="id"
|
||||
empty-text="加载中,请稍候"
|
||||
:props="defaultProps"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'RoleAuthModal',
|
||||
props: {
|
||||
// 源策略选项
|
||||
menuOptions: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
menuExpand: false,
|
||||
menuNodeAll: false,
|
||||
pointIds: [],
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 获取树权限 */
|
||||
getAuthScope(id) {
|
||||
const pointIds = id.split(",")
|
||||
this.$nextTick(() => {
|
||||
pointIds.forEach((v) => {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.authRef.setChecked(v, true, false)
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
/** 树权限(展开/折叠) */
|
||||
handleTreeExpand(value) {
|
||||
let treeList = this.menuOptions
|
||||
for (let i = 0; i < treeList.length; i++) {
|
||||
this.$refs.authRef.store.nodesMap[treeList[i].id].expanded = value
|
||||
}
|
||||
},
|
||||
/** 树权限(全选/全不选) */
|
||||
handleTreeNodeAll(value) {
|
||||
this.$refs.authRef.setCheckedNodes(value ? this.menuOptions : [])
|
||||
},
|
||||
/** 所有权限节点数据 */
|
||||
getAllCheckedKeys() {
|
||||
// 目前被选中的节点
|
||||
let checkedKey = this.$refs.authRef.getCheckedNodes()
|
||||
let checkedKeys =[];
|
||||
if(checkedKey.length>0){
|
||||
for(let i=0;i<checkedKey.length;i++){
|
||||
if(checkedKey[i].type=='1'){
|
||||
checkedKeys.push(checkedKey[i].id);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 半选中的节点
|
||||
let halfCheckedKeys = this.$refs.authRef.getHalfCheckedKeys()
|
||||
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys)
|
||||
return checkedKeys
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
1088
src/views/visit/visitorExamine/index.vue
Normal file
1088
src/views/visit/visitorExamine/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
302
src/views/visit/visitorRegister/index.vue
Normal file
302
src/views/visit/visitorRegister/index.vue
Normal file
@@ -0,0 +1,302 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="用户名" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.userName"
|
||||
placeholder="请输入用户名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input
|
||||
v-model="queryParams.phone"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:register:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:register:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:register:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:register:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="registerList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键id" align="center" prop="id" />-->
|
||||
<el-table-column label="用户名" align="center" prop="userName" />
|
||||
<el-table-column label="用户昵称" align="center" prop="nickName" />
|
||||
<el-table-column label="用户手机号" align="center" prop="phone" />
|
||||
<el-table-column label="微信公众号用户id" align="center" prop="openid" />
|
||||
<!-- <el-table-column label="删除状态 0.否;1.是" align="center" prop="deleteState" />-->
|
||||
<!-- <el-table-column label="创建人" align="center" prop="createdBy" />-->
|
||||
<el-table-column label="创建时间" align="center" prop="createdTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="更新人" align="center" prop="updatedBy" />-->
|
||||
<!-- <el-table-column label="更新时间" align="center" prop="updatedTime" width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ parseTime(scope.row.updatedTime, '{y}-{m}-{d}') }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:register:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:register:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改访客注册对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
||||
<el-col :span="24" >
|
||||
<el-form-item label="用户名" prop="userName">
|
||||
<el-input v-model="form.userName" placeholder="请输入用户名" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<el-form-item label="用户昵称" prop="nickName">
|
||||
<el-input v-model="form.nickName" placeholder="请输入用户昵称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<el-form-item label="用户手机号" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入用户手机号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24" >
|
||||
<el-form-item label="微信公众号用户id" prop="openid">
|
||||
<el-input v-model="form.openid" placeholder="请输入微信公众号用户id" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRegister, getRegister, delRegister, addRegister, updateRegister } from "@/api/visitor/register";
|
||||
|
||||
export default {
|
||||
name: "Register",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 访客注册表格数据
|
||||
registerList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userName: null,
|
||||
nickName: null,
|
||||
phone: null,
|
||||
openid: null,
|
||||
deleteState: null,
|
||||
createdBy: null,
|
||||
createdTime: null,
|
||||
updatedBy: null,
|
||||
updatedTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询访客注册列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRegister(this.queryParams).then(response => {
|
||||
this.registerList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
userName: null,
|
||||
nickName: null,
|
||||
phone: null,
|
||||
openid: null,
|
||||
deleteState: null,
|
||||
createdBy: null,
|
||||
createdTime: null,
|
||||
updatedBy: null,
|
||||
updatedTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加访客注册";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getRegister(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改访客注册";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateRegister(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRegister(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除访客注册编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delRegister(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/register/export', {
|
||||
...this.queryParams
|
||||
}, `register_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
329
src/views/visit/visitorSetting/index.vue
Normal file
329
src/views/visit/visitorSetting/index.vue
Normal file
@@ -0,0 +1,329 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--部门数据-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-container">
|
||||
<el-input
|
||||
v-model="branchName"
|
||||
placeholder="请输入部门名称"
|
||||
clearable
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="treeOptions"
|
||||
:props="defaultProps"
|
||||
:expand-on-click-node="false"
|
||||
:filter-node-method="filterNode"
|
||||
ref="treeRef"
|
||||
node-key="id"
|
||||
highlight-current
|
||||
@node-click="handleNodeClick"
|
||||
:default-expanded-keys="nodeKey">
|
||||
<!-- <span slot-scope="{ node, data }">
|
||||
<el-tooltip class="item" effect="dark" :content="node.label" placement="right">
|
||||
<span class="custom-tree-node">{{ node.label }}</span>
|
||||
</el-tooltip>
|
||||
</span> -->
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="部门名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入部门名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-if="refreshTable" v-loading="loading" :data="sysBranchList" :indent="30" row-key="id" :default-expand-all="isExpandAll" :tree-props="{children: 'children', hasChildren: 'hasChildren'}" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="部门名称" align="left" prop="name" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="是否审核" align="center" prop="isExamine">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.examine">是</template>
|
||||
<template v-else>否</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="250" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.examine" @change="changeExamine(scope.row,$event)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- <pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listSysBranch,branchTreeSelect,updateSysBranch } from "@/api/system/sysBranch";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import { listRules} from "@/api/system/rule";
|
||||
import {deptTreeSelect} from "@/api/system/user";
|
||||
|
||||
export default {
|
||||
name: "SysBranch",
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 选中数组名称
|
||||
idNames: [],
|
||||
// 部门树选项
|
||||
branchOptions: [],
|
||||
treeOptions: [],
|
||||
// 空间树选项
|
||||
spaceOptions: [],
|
||||
ruleOptions: [],
|
||||
nodeKey: [],
|
||||
ladderRule: [],
|
||||
// 部门名称
|
||||
branchId: undefined,
|
||||
branchName: undefined,
|
||||
deptOptions: undefined,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 部门管理表格数据
|
||||
sysBranchList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 是否展开,默认全部展开
|
||||
isExpandAll: true,
|
||||
// 重新渲染表格状态
|
||||
refreshTable: true,
|
||||
defaultProps: {
|
||||
children: 'children',
|
||||
label: 'label'
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
id: null,
|
||||
name: null,
|
||||
leader: null,
|
||||
phone: null,
|
||||
parentId: null,
|
||||
level: null,
|
||||
ancestors: null,
|
||||
spaceId: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: "部门名称不能为空", trigger: "blur" }
|
||||
],
|
||||
parentId: [
|
||||
{ required: true, message: "上级部门不能为空", trigger: "change" }
|
||||
],
|
||||
phone:[
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: "请输入正确的手机号码",
|
||||
trigger: "blur"
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
// 根据名称筛选部门树
|
||||
branchName(val) {
|
||||
this.$refs.treeRef.filter(val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getOptions()
|
||||
this.getList();
|
||||
this.getDeptTree();
|
||||
},
|
||||
methods: {
|
||||
/** 查询部门下拉树结构 */
|
||||
getDeptTree() {
|
||||
deptTreeSelect().then(response => {
|
||||
this.deptOptions = response.data;
|
||||
});
|
||||
},
|
||||
changeExamine(row,e){
|
||||
console.log(e);
|
||||
let obj = {
|
||||
id:row.id,
|
||||
isExamine:e ? '1' : '0'
|
||||
};
|
||||
let flag = row.examine //保存点击之后v-modeld的值(true,false)
|
||||
row.examine = !row.examine //保持switch点击前的状态
|
||||
let that = this;
|
||||
if(e){
|
||||
this.$modal.confirm('确定要审核?').then(function() {
|
||||
flag ? row.examine = true : row.showState = false // 这一步很重要,row.showState会根据flag的值开启或关闭开关
|
||||
updateSysBranch(obj).then(res => {
|
||||
that.$modal.msgSuccess("审核成功");
|
||||
that.getList();
|
||||
});
|
||||
})
|
||||
}else{
|
||||
this.$modal.confirm('确定取消审核?').then(function() {
|
||||
flag ? row.examine = true : row.examine = false // 这一步很重要,row.showState会根据flag的值开启或关闭开关
|
||||
updateSysBranch(obj).then(res => {
|
||||
that.$modal.msgSuccess("取消成功");
|
||||
that.getList();
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
/** 查询部门管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSysBranch(this.queryParams).then(response => {
|
||||
this.sysBranchList = this.handleTree(response.data, "id");
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 查询选项列表 */
|
||||
getOptions() {
|
||||
this.treeOptions = []
|
||||
branchTreeSelect().then(response => {
|
||||
this.treeOptions = response.data
|
||||
this.nodeKey.push(this.treeOptions[0].id)
|
||||
}),
|
||||
/* this.spaceOptions = []
|
||||
spaceTreeSelect().then(response => {
|
||||
this.spaceOptions = response.data
|
||||
}) */
|
||||
this.ruleOptions = []
|
||||
listRules().then(response => {
|
||||
this.ruleOptions = response.data
|
||||
})
|
||||
},
|
||||
/** 转换树数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.name,
|
||||
isDisabled: false,
|
||||
children: node.children
|
||||
};
|
||||
},
|
||||
/** 转换树数据结构 */
|
||||
normalizer1(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children;
|
||||
}
|
||||
return {
|
||||
id: node.id,
|
||||
label: node.label,
|
||||
isDisabled: false,
|
||||
children: node.children
|
||||
};
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
name: null,
|
||||
leader: null,
|
||||
phone: null,
|
||||
parentId: null,
|
||||
level: null,
|
||||
ancestors: null,
|
||||
spaceId: null,
|
||||
remark: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
/** 多选框选中数据 */
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.idNames = selection.map(item => item.name)
|
||||
this.single = selection.length !== 1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 筛选节点 */
|
||||
filterNode(value, data) {
|
||||
if (!value) return true
|
||||
return data.label.indexOf(value) !== -1
|
||||
},
|
||||
/** 节点单击事件 */
|
||||
handleNodeClick(data) {
|
||||
this.queryParams.id = data.id
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 展开/折叠操作 */
|
||||
toggleExpandAll() {
|
||||
this.refreshTable = false;
|
||||
this.isExpandAll = !this.isExpandAll;
|
||||
this.$nextTick(() => {
|
||||
this.refreshTable = true;
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-tree{
|
||||
overflow: auto;
|
||||
height:720px;
|
||||
}
|
||||
.custom-tree-node{
|
||||
font-size:14px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user