diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js new file mode 100644 index 0000000..f7cf021 --- /dev/null +++ b/src/router/modules/attendance.js @@ -0,0 +1,55 @@ +/* Layout */ +import Layout from '../../views/layout/Layout' + +export const attendanceRouters = [ + { + path: '/attendance', + component: Layout, + redirect: '/atd', + name: 'Atd', + meta: { + title: '考勤统计', + icon: 'task', // 图标 + permission: ['/attendance']// 权限名称 + }, + children: [ + { + path: '/listReport', + name: 'ListReport', + component: () => import('@/views/attendance/listReport'), + meta: { title: '查询报表数据', icon: 'function', permission: ['/listReport'] } + }, + { + path: '/makeReport', + name: 'MakeReport', + component: () => import('@/views/attendance/makeReport'), + meta: { title: '生成考勤报表', icon: 'function', permission: ['/makeReport'] } + } + ] + }, + { + path: '/atdSetting', + component: Layout, + redirect: '/atdSetting', + name: 'AtdSetting', + meta: { + title: '考勤设置', + icon: 'task', // 图标 + permission: ['/atdSetting']// 权限名称 + }, + children: [ + { + path: '/regular', + name: 'Regular', + component: () => import('@/views/attendance/regular'), + meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + }, + { + path: '/specialDay', + name: 'SpecialDay', + component: () => import('@/views/attendance/specialDay'), + meta: { title: '特殊考勤日管理', icon: 'function', permission: ['/specialDay'] } + } + ] + } +] diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js new file mode 100644 index 0000000..f7cf021 --- /dev/null +++ b/src/router/modules/attendance.js @@ -0,0 +1,55 @@ +/* Layout */ +import Layout from '../../views/layout/Layout' + +export const attendanceRouters = [ + { + path: '/attendance', + component: Layout, + redirect: '/atd', + name: 'Atd', + meta: { + title: '考勤统计', + icon: 'task', // 图标 + permission: ['/attendance']// 权限名称 + }, + children: [ + { + path: '/listReport', + name: 'ListReport', + component: () => import('@/views/attendance/listReport'), + meta: { title: '查询报表数据', icon: 'function', permission: ['/listReport'] } + }, + { + path: '/makeReport', + name: 'MakeReport', + component: () => import('@/views/attendance/makeReport'), + meta: { title: '生成考勤报表', icon: 'function', permission: ['/makeReport'] } + } + ] + }, + { + path: '/atdSetting', + component: Layout, + redirect: '/atdSetting', + name: 'AtdSetting', + meta: { + title: '考勤设置', + icon: 'task', // 图标 + permission: ['/atdSetting']// 权限名称 + }, + children: [ + { + path: '/regular', + name: 'Regular', + component: () => import('@/views/attendance/regular'), + meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + }, + { + path: '/specialDay', + name: 'SpecialDay', + component: () => import('@/views/attendance/specialDay'), + meta: { title: '特殊考勤日管理', icon: 'function', permission: ['/specialDay'] } + } + ] + } +] diff --git a/src/views/accessPermission/listDoorPermission.vue b/src/views/accessPermission/listDoorPermission.vue index 6d47c38..158aca0 100644 --- a/src/views/accessPermission/listDoorPermission.vue +++ b/src/views/accessPermission/listDoorPermission.vue @@ -127,6 +127,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getDoorPermissionList().then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js new file mode 100644 index 0000000..f7cf021 --- /dev/null +++ b/src/router/modules/attendance.js @@ -0,0 +1,55 @@ +/* Layout */ +import Layout from '../../views/layout/Layout' + +export const attendanceRouters = [ + { + path: '/attendance', + component: Layout, + redirect: '/atd', + name: 'Atd', + meta: { + title: '考勤统计', + icon: 'task', // 图标 + permission: ['/attendance']// 权限名称 + }, + children: [ + { + path: '/listReport', + name: 'ListReport', + component: () => import('@/views/attendance/listReport'), + meta: { title: '查询报表数据', icon: 'function', permission: ['/listReport'] } + }, + { + path: '/makeReport', + name: 'MakeReport', + component: () => import('@/views/attendance/makeReport'), + meta: { title: '生成考勤报表', icon: 'function', permission: ['/makeReport'] } + } + ] + }, + { + path: '/atdSetting', + component: Layout, + redirect: '/atdSetting', + name: 'AtdSetting', + meta: { + title: '考勤设置', + icon: 'task', // 图标 + permission: ['/atdSetting']// 权限名称 + }, + children: [ + { + path: '/regular', + name: 'Regular', + component: () => import('@/views/attendance/regular'), + meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + }, + { + path: '/specialDay', + name: 'SpecialDay', + component: () => import('@/views/attendance/specialDay'), + meta: { title: '特殊考勤日管理', icon: 'function', permission: ['/specialDay'] } + } + ] + } +] diff --git a/src/views/accessPermission/listDoorPermission.vue b/src/views/accessPermission/listDoorPermission.vue index 6d47c38..158aca0 100644 --- a/src/views/accessPermission/listDoorPermission.vue +++ b/src/views/accessPermission/listDoorPermission.vue @@ -127,6 +127,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getDoorPermissionList().then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listStaffPermission.vue b/src/views/accessPermission/listStaffPermission.vue index 3cbdb6c..25b9526 100644 --- a/src/views/accessPermission/listStaffPermission.vue +++ b/src/views/accessPermission/listStaffPermission.vue @@ -20,7 +20,7 @@
{{ doorName }}门禁员工授权列表
- 导出授权记录 + 导出授权记录 新增员工授权
@@ -175,6 +175,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getStaffPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js new file mode 100644 index 0000000..f7cf021 --- /dev/null +++ b/src/router/modules/attendance.js @@ -0,0 +1,55 @@ +/* Layout */ +import Layout from '../../views/layout/Layout' + +export const attendanceRouters = [ + { + path: '/attendance', + component: Layout, + redirect: '/atd', + name: 'Atd', + meta: { + title: '考勤统计', + icon: 'task', // 图标 + permission: ['/attendance']// 权限名称 + }, + children: [ + { + path: '/listReport', + name: 'ListReport', + component: () => import('@/views/attendance/listReport'), + meta: { title: '查询报表数据', icon: 'function', permission: ['/listReport'] } + }, + { + path: '/makeReport', + name: 'MakeReport', + component: () => import('@/views/attendance/makeReport'), + meta: { title: '生成考勤报表', icon: 'function', permission: ['/makeReport'] } + } + ] + }, + { + path: '/atdSetting', + component: Layout, + redirect: '/atdSetting', + name: 'AtdSetting', + meta: { + title: '考勤设置', + icon: 'task', // 图标 + permission: ['/atdSetting']// 权限名称 + }, + children: [ + { + path: '/regular', + name: 'Regular', + component: () => import('@/views/attendance/regular'), + meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + }, + { + path: '/specialDay', + name: 'SpecialDay', + component: () => import('@/views/attendance/specialDay'), + meta: { title: '特殊考勤日管理', icon: 'function', permission: ['/specialDay'] } + } + ] + } +] diff --git a/src/views/accessPermission/listDoorPermission.vue b/src/views/accessPermission/listDoorPermission.vue index 6d47c38..158aca0 100644 --- a/src/views/accessPermission/listDoorPermission.vue +++ b/src/views/accessPermission/listDoorPermission.vue @@ -127,6 +127,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getDoorPermissionList().then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listStaffPermission.vue b/src/views/accessPermission/listStaffPermission.vue index 3cbdb6c..25b9526 100644 --- a/src/views/accessPermission/listStaffPermission.vue +++ b/src/views/accessPermission/listStaffPermission.vue @@ -20,7 +20,7 @@
{{ doorName }}门禁员工授权列表
- 导出授权记录 + 导出授权记录 新增员工授权
@@ -175,6 +175,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getStaffPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listVisitorPermission.vue b/src/views/accessPermission/listVisitorPermission.vue index 2bf34e5..ddda124 100644 --- a/src/views/accessPermission/listVisitorPermission.vue +++ b/src/views/accessPermission/listVisitorPermission.vue @@ -17,7 +17,7 @@
{{ doorName }}门禁访客授权列表
- 导出授权记录 + 导出授权记录 新增访客授权
@@ -166,6 +166,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getVisitorPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js new file mode 100644 index 0000000..f7cf021 --- /dev/null +++ b/src/router/modules/attendance.js @@ -0,0 +1,55 @@ +/* Layout */ +import Layout from '../../views/layout/Layout' + +export const attendanceRouters = [ + { + path: '/attendance', + component: Layout, + redirect: '/atd', + name: 'Atd', + meta: { + title: '考勤统计', + icon: 'task', // 图标 + permission: ['/attendance']// 权限名称 + }, + children: [ + { + path: '/listReport', + name: 'ListReport', + component: () => import('@/views/attendance/listReport'), + meta: { title: '查询报表数据', icon: 'function', permission: ['/listReport'] } + }, + { + path: '/makeReport', + name: 'MakeReport', + component: () => import('@/views/attendance/makeReport'), + meta: { title: '生成考勤报表', icon: 'function', permission: ['/makeReport'] } + } + ] + }, + { + path: '/atdSetting', + component: Layout, + redirect: '/atdSetting', + name: 'AtdSetting', + meta: { + title: '考勤设置', + icon: 'task', // 图标 + permission: ['/atdSetting']// 权限名称 + }, + children: [ + { + path: '/regular', + name: 'Regular', + component: () => import('@/views/attendance/regular'), + meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + }, + { + path: '/specialDay', + name: 'SpecialDay', + component: () => import('@/views/attendance/specialDay'), + meta: { title: '特殊考勤日管理', icon: 'function', permission: ['/specialDay'] } + } + ] + } +] diff --git a/src/views/accessPermission/listDoorPermission.vue b/src/views/accessPermission/listDoorPermission.vue index 6d47c38..158aca0 100644 --- a/src/views/accessPermission/listDoorPermission.vue +++ b/src/views/accessPermission/listDoorPermission.vue @@ -127,6 +127,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getDoorPermissionList().then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listStaffPermission.vue b/src/views/accessPermission/listStaffPermission.vue index 3cbdb6c..25b9526 100644 --- a/src/views/accessPermission/listStaffPermission.vue +++ b/src/views/accessPermission/listStaffPermission.vue @@ -20,7 +20,7 @@
{{ doorName }}门禁员工授权列表
- 导出授权记录 + 导出授权记录 新增员工授权
@@ -175,6 +175,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getStaffPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listVisitorPermission.vue b/src/views/accessPermission/listVisitorPermission.vue index 2bf34e5..ddda124 100644 --- a/src/views/accessPermission/listVisitorPermission.vue +++ b/src/views/accessPermission/listVisitorPermission.vue @@ -17,7 +17,7 @@
{{ doorName }}门禁访客授权列表
- 导出授权记录 + 导出授权记录 新增访客授权
@@ -166,6 +166,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getVisitorPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue new file mode 100644 index 0000000..58aa8f3 --- /dev/null +++ b/src/views/attendance/editRemarks.vue @@ -0,0 +1,328 @@ + + + + + diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js new file mode 100644 index 0000000..f7cf021 --- /dev/null +++ b/src/router/modules/attendance.js @@ -0,0 +1,55 @@ +/* Layout */ +import Layout from '../../views/layout/Layout' + +export const attendanceRouters = [ + { + path: '/attendance', + component: Layout, + redirect: '/atd', + name: 'Atd', + meta: { + title: '考勤统计', + icon: 'task', // 图标 + permission: ['/attendance']// 权限名称 + }, + children: [ + { + path: '/listReport', + name: 'ListReport', + component: () => import('@/views/attendance/listReport'), + meta: { title: '查询报表数据', icon: 'function', permission: ['/listReport'] } + }, + { + path: '/makeReport', + name: 'MakeReport', + component: () => import('@/views/attendance/makeReport'), + meta: { title: '生成考勤报表', icon: 'function', permission: ['/makeReport'] } + } + ] + }, + { + path: '/atdSetting', + component: Layout, + redirect: '/atdSetting', + name: 'AtdSetting', + meta: { + title: '考勤设置', + icon: 'task', // 图标 + permission: ['/atdSetting']// 权限名称 + }, + children: [ + { + path: '/regular', + name: 'Regular', + component: () => import('@/views/attendance/regular'), + meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + }, + { + path: '/specialDay', + name: 'SpecialDay', + component: () => import('@/views/attendance/specialDay'), + meta: { title: '特殊考勤日管理', icon: 'function', permission: ['/specialDay'] } + } + ] + } +] diff --git a/src/views/accessPermission/listDoorPermission.vue b/src/views/accessPermission/listDoorPermission.vue index 6d47c38..158aca0 100644 --- a/src/views/accessPermission/listDoorPermission.vue +++ b/src/views/accessPermission/listDoorPermission.vue @@ -127,6 +127,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getDoorPermissionList().then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listStaffPermission.vue b/src/views/accessPermission/listStaffPermission.vue index 3cbdb6c..25b9526 100644 --- a/src/views/accessPermission/listStaffPermission.vue +++ b/src/views/accessPermission/listStaffPermission.vue @@ -20,7 +20,7 @@
{{ doorName }}门禁员工授权列表
- 导出授权记录 + 导出授权记录 新增员工授权
@@ -175,6 +175,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getStaffPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listVisitorPermission.vue b/src/views/accessPermission/listVisitorPermission.vue index 2bf34e5..ddda124 100644 --- a/src/views/accessPermission/listVisitorPermission.vue +++ b/src/views/accessPermission/listVisitorPermission.vue @@ -17,7 +17,7 @@
{{ doorName }}门禁访客授权列表
- 导出授权记录 + 导出授权记录 新增访客授权
@@ -166,6 +166,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getVisitorPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue new file mode 100644 index 0000000..58aa8f3 --- /dev/null +++ b/src/views/attendance/editRemarks.vue @@ -0,0 +1,328 @@ + + + + + diff --git a/src/views/attendance/editSpecialDay.vue b/src/views/attendance/editSpecialDay.vue new file mode 100644 index 0000000..b416ddc --- /dev/null +++ b/src/views/attendance/editSpecialDay.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js new file mode 100644 index 0000000..f7cf021 --- /dev/null +++ b/src/router/modules/attendance.js @@ -0,0 +1,55 @@ +/* Layout */ +import Layout from '../../views/layout/Layout' + +export const attendanceRouters = [ + { + path: '/attendance', + component: Layout, + redirect: '/atd', + name: 'Atd', + meta: { + title: '考勤统计', + icon: 'task', // 图标 + permission: ['/attendance']// 权限名称 + }, + children: [ + { + path: '/listReport', + name: 'ListReport', + component: () => import('@/views/attendance/listReport'), + meta: { title: '查询报表数据', icon: 'function', permission: ['/listReport'] } + }, + { + path: '/makeReport', + name: 'MakeReport', + component: () => import('@/views/attendance/makeReport'), + meta: { title: '生成考勤报表', icon: 'function', permission: ['/makeReport'] } + } + ] + }, + { + path: '/atdSetting', + component: Layout, + redirect: '/atdSetting', + name: 'AtdSetting', + meta: { + title: '考勤设置', + icon: 'task', // 图标 + permission: ['/atdSetting']// 权限名称 + }, + children: [ + { + path: '/regular', + name: 'Regular', + component: () => import('@/views/attendance/regular'), + meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + }, + { + path: '/specialDay', + name: 'SpecialDay', + component: () => import('@/views/attendance/specialDay'), + meta: { title: '特殊考勤日管理', icon: 'function', permission: ['/specialDay'] } + } + ] + } +] diff --git a/src/views/accessPermission/listDoorPermission.vue b/src/views/accessPermission/listDoorPermission.vue index 6d47c38..158aca0 100644 --- a/src/views/accessPermission/listDoorPermission.vue +++ b/src/views/accessPermission/listDoorPermission.vue @@ -127,6 +127,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getDoorPermissionList().then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listStaffPermission.vue b/src/views/accessPermission/listStaffPermission.vue index 3cbdb6c..25b9526 100644 --- a/src/views/accessPermission/listStaffPermission.vue +++ b/src/views/accessPermission/listStaffPermission.vue @@ -20,7 +20,7 @@
{{ doorName }}门禁员工授权列表
- 导出授权记录 + 导出授权记录 新增员工授权
@@ -175,6 +175,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getStaffPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listVisitorPermission.vue b/src/views/accessPermission/listVisitorPermission.vue index 2bf34e5..ddda124 100644 --- a/src/views/accessPermission/listVisitorPermission.vue +++ b/src/views/accessPermission/listVisitorPermission.vue @@ -17,7 +17,7 @@
{{ doorName }}门禁访客授权列表
- 导出授权记录 + 导出授权记录 新增访客授权
@@ -166,6 +166,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getVisitorPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue new file mode 100644 index 0000000..58aa8f3 --- /dev/null +++ b/src/views/attendance/editRemarks.vue @@ -0,0 +1,328 @@ + + + + + diff --git a/src/views/attendance/editSpecialDay.vue b/src/views/attendance/editSpecialDay.vue new file mode 100644 index 0000000..b416ddc --- /dev/null +++ b/src/views/attendance/editSpecialDay.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/views/attendance/listReport.vue b/src/views/attendance/listReport.vue new file mode 100644 index 0000000..92a5c6a --- /dev/null +++ b/src/views/attendance/listReport.vue @@ -0,0 +1,305 @@ + + + + + + diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js new file mode 100644 index 0000000..f7cf021 --- /dev/null +++ b/src/router/modules/attendance.js @@ -0,0 +1,55 @@ +/* Layout */ +import Layout from '../../views/layout/Layout' + +export const attendanceRouters = [ + { + path: '/attendance', + component: Layout, + redirect: '/atd', + name: 'Atd', + meta: { + title: '考勤统计', + icon: 'task', // 图标 + permission: ['/attendance']// 权限名称 + }, + children: [ + { + path: '/listReport', + name: 'ListReport', + component: () => import('@/views/attendance/listReport'), + meta: { title: '查询报表数据', icon: 'function', permission: ['/listReport'] } + }, + { + path: '/makeReport', + name: 'MakeReport', + component: () => import('@/views/attendance/makeReport'), + meta: { title: '生成考勤报表', icon: 'function', permission: ['/makeReport'] } + } + ] + }, + { + path: '/atdSetting', + component: Layout, + redirect: '/atdSetting', + name: 'AtdSetting', + meta: { + title: '考勤设置', + icon: 'task', // 图标 + permission: ['/atdSetting']// 权限名称 + }, + children: [ + { + path: '/regular', + name: 'Regular', + component: () => import('@/views/attendance/regular'), + meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + }, + { + path: '/specialDay', + name: 'SpecialDay', + component: () => import('@/views/attendance/specialDay'), + meta: { title: '特殊考勤日管理', icon: 'function', permission: ['/specialDay'] } + } + ] + } +] diff --git a/src/views/accessPermission/listDoorPermission.vue b/src/views/accessPermission/listDoorPermission.vue index 6d47c38..158aca0 100644 --- a/src/views/accessPermission/listDoorPermission.vue +++ b/src/views/accessPermission/listDoorPermission.vue @@ -127,6 +127,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getDoorPermissionList().then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listStaffPermission.vue b/src/views/accessPermission/listStaffPermission.vue index 3cbdb6c..25b9526 100644 --- a/src/views/accessPermission/listStaffPermission.vue +++ b/src/views/accessPermission/listStaffPermission.vue @@ -20,7 +20,7 @@
{{ doorName }}门禁员工授权列表
- 导出授权记录 + 导出授权记录 新增员工授权
@@ -175,6 +175,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getStaffPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listVisitorPermission.vue b/src/views/accessPermission/listVisitorPermission.vue index 2bf34e5..ddda124 100644 --- a/src/views/accessPermission/listVisitorPermission.vue +++ b/src/views/accessPermission/listVisitorPermission.vue @@ -17,7 +17,7 @@
{{ doorName }}门禁访客授权列表
- 导出授权记录 + 导出授权记录 新增访客授权
@@ -166,6 +166,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getVisitorPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue new file mode 100644 index 0000000..58aa8f3 --- /dev/null +++ b/src/views/attendance/editRemarks.vue @@ -0,0 +1,328 @@ + + + + + diff --git a/src/views/attendance/editSpecialDay.vue b/src/views/attendance/editSpecialDay.vue new file mode 100644 index 0000000..b416ddc --- /dev/null +++ b/src/views/attendance/editSpecialDay.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/views/attendance/listReport.vue b/src/views/attendance/listReport.vue new file mode 100644 index 0000000..92a5c6a --- /dev/null +++ b/src/views/attendance/listReport.vue @@ -0,0 +1,305 @@ + + + + + + diff --git a/src/views/attendance/makeReport.vue b/src/views/attendance/makeReport.vue new file mode 100644 index 0000000..7e4da1b --- /dev/null +++ b/src/views/attendance/makeReport.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js new file mode 100644 index 0000000..f7cf021 --- /dev/null +++ b/src/router/modules/attendance.js @@ -0,0 +1,55 @@ +/* Layout */ +import Layout from '../../views/layout/Layout' + +export const attendanceRouters = [ + { + path: '/attendance', + component: Layout, + redirect: '/atd', + name: 'Atd', + meta: { + title: '考勤统计', + icon: 'task', // 图标 + permission: ['/attendance']// 权限名称 + }, + children: [ + { + path: '/listReport', + name: 'ListReport', + component: () => import('@/views/attendance/listReport'), + meta: { title: '查询报表数据', icon: 'function', permission: ['/listReport'] } + }, + { + path: '/makeReport', + name: 'MakeReport', + component: () => import('@/views/attendance/makeReport'), + meta: { title: '生成考勤报表', icon: 'function', permission: ['/makeReport'] } + } + ] + }, + { + path: '/atdSetting', + component: Layout, + redirect: '/atdSetting', + name: 'AtdSetting', + meta: { + title: '考勤设置', + icon: 'task', // 图标 + permission: ['/atdSetting']// 权限名称 + }, + children: [ + { + path: '/regular', + name: 'Regular', + component: () => import('@/views/attendance/regular'), + meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + }, + { + path: '/specialDay', + name: 'SpecialDay', + component: () => import('@/views/attendance/specialDay'), + meta: { title: '特殊考勤日管理', icon: 'function', permission: ['/specialDay'] } + } + ] + } +] diff --git a/src/views/accessPermission/listDoorPermission.vue b/src/views/accessPermission/listDoorPermission.vue index 6d47c38..158aca0 100644 --- a/src/views/accessPermission/listDoorPermission.vue +++ b/src/views/accessPermission/listDoorPermission.vue @@ -127,6 +127,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getDoorPermissionList().then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listStaffPermission.vue b/src/views/accessPermission/listStaffPermission.vue index 3cbdb6c..25b9526 100644 --- a/src/views/accessPermission/listStaffPermission.vue +++ b/src/views/accessPermission/listStaffPermission.vue @@ -20,7 +20,7 @@
{{ doorName }}门禁员工授权列表
- 导出授权记录 + 导出授权记录 新增员工授权
@@ -175,6 +175,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getStaffPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listVisitorPermission.vue b/src/views/accessPermission/listVisitorPermission.vue index 2bf34e5..ddda124 100644 --- a/src/views/accessPermission/listVisitorPermission.vue +++ b/src/views/accessPermission/listVisitorPermission.vue @@ -17,7 +17,7 @@
{{ doorName }}门禁访客授权列表
- 导出授权记录 + 导出授权记录 新增访客授权
@@ -166,6 +166,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getVisitorPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue new file mode 100644 index 0000000..58aa8f3 --- /dev/null +++ b/src/views/attendance/editRemarks.vue @@ -0,0 +1,328 @@ + + + + + diff --git a/src/views/attendance/editSpecialDay.vue b/src/views/attendance/editSpecialDay.vue new file mode 100644 index 0000000..b416ddc --- /dev/null +++ b/src/views/attendance/editSpecialDay.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/views/attendance/listReport.vue b/src/views/attendance/listReport.vue new file mode 100644 index 0000000..92a5c6a --- /dev/null +++ b/src/views/attendance/listReport.vue @@ -0,0 +1,305 @@ + + + + + + diff --git a/src/views/attendance/makeReport.vue b/src/views/attendance/makeReport.vue new file mode 100644 index 0000000..7e4da1b --- /dev/null +++ b/src/views/attendance/makeReport.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/src/views/attendance/regular.vue b/src/views/attendance/regular.vue new file mode 100644 index 0000000..0fac7f8 --- /dev/null +++ b/src/views/attendance/regular.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js new file mode 100644 index 0000000..f7cf021 --- /dev/null +++ b/src/router/modules/attendance.js @@ -0,0 +1,55 @@ +/* Layout */ +import Layout from '../../views/layout/Layout' + +export const attendanceRouters = [ + { + path: '/attendance', + component: Layout, + redirect: '/atd', + name: 'Atd', + meta: { + title: '考勤统计', + icon: 'task', // 图标 + permission: ['/attendance']// 权限名称 + }, + children: [ + { + path: '/listReport', + name: 'ListReport', + component: () => import('@/views/attendance/listReport'), + meta: { title: '查询报表数据', icon: 'function', permission: ['/listReport'] } + }, + { + path: '/makeReport', + name: 'MakeReport', + component: () => import('@/views/attendance/makeReport'), + meta: { title: '生成考勤报表', icon: 'function', permission: ['/makeReport'] } + } + ] + }, + { + path: '/atdSetting', + component: Layout, + redirect: '/atdSetting', + name: 'AtdSetting', + meta: { + title: '考勤设置', + icon: 'task', // 图标 + permission: ['/atdSetting']// 权限名称 + }, + children: [ + { + path: '/regular', + name: 'Regular', + component: () => import('@/views/attendance/regular'), + meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + }, + { + path: '/specialDay', + name: 'SpecialDay', + component: () => import('@/views/attendance/specialDay'), + meta: { title: '特殊考勤日管理', icon: 'function', permission: ['/specialDay'] } + } + ] + } +] diff --git a/src/views/accessPermission/listDoorPermission.vue b/src/views/accessPermission/listDoorPermission.vue index 6d47c38..158aca0 100644 --- a/src/views/accessPermission/listDoorPermission.vue +++ b/src/views/accessPermission/listDoorPermission.vue @@ -127,6 +127,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getDoorPermissionList().then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listStaffPermission.vue b/src/views/accessPermission/listStaffPermission.vue index 3cbdb6c..25b9526 100644 --- a/src/views/accessPermission/listStaffPermission.vue +++ b/src/views/accessPermission/listStaffPermission.vue @@ -20,7 +20,7 @@
{{ doorName }}门禁员工授权列表
- 导出授权记录 + 导出授权记录 新增员工授权
@@ -175,6 +175,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getStaffPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listVisitorPermission.vue b/src/views/accessPermission/listVisitorPermission.vue index 2bf34e5..ddda124 100644 --- a/src/views/accessPermission/listVisitorPermission.vue +++ b/src/views/accessPermission/listVisitorPermission.vue @@ -17,7 +17,7 @@
{{ doorName }}门禁访客授权列表
- 导出授权记录 + 导出授权记录 新增访客授权
@@ -166,6 +166,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getVisitorPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue new file mode 100644 index 0000000..58aa8f3 --- /dev/null +++ b/src/views/attendance/editRemarks.vue @@ -0,0 +1,328 @@ + + + + + diff --git a/src/views/attendance/editSpecialDay.vue b/src/views/attendance/editSpecialDay.vue new file mode 100644 index 0000000..b416ddc --- /dev/null +++ b/src/views/attendance/editSpecialDay.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/views/attendance/listReport.vue b/src/views/attendance/listReport.vue new file mode 100644 index 0000000..92a5c6a --- /dev/null +++ b/src/views/attendance/listReport.vue @@ -0,0 +1,305 @@ + + + + + + diff --git a/src/views/attendance/makeReport.vue b/src/views/attendance/makeReport.vue new file mode 100644 index 0000000..7e4da1b --- /dev/null +++ b/src/views/attendance/makeReport.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/src/views/attendance/regular.vue b/src/views/attendance/regular.vue new file mode 100644 index 0000000..0fac7f8 --- /dev/null +++ b/src/views/attendance/regular.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/views/attendance/specialDay.vue b/src/views/attendance/specialDay.vue new file mode 100644 index 0000000..5ab4934 --- /dev/null +++ b/src/views/attendance/specialDay.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js new file mode 100644 index 0000000..f7cf021 --- /dev/null +++ b/src/router/modules/attendance.js @@ -0,0 +1,55 @@ +/* Layout */ +import Layout from '../../views/layout/Layout' + +export const attendanceRouters = [ + { + path: '/attendance', + component: Layout, + redirect: '/atd', + name: 'Atd', + meta: { + title: '考勤统计', + icon: 'task', // 图标 + permission: ['/attendance']// 权限名称 + }, + children: [ + { + path: '/listReport', + name: 'ListReport', + component: () => import('@/views/attendance/listReport'), + meta: { title: '查询报表数据', icon: 'function', permission: ['/listReport'] } + }, + { + path: '/makeReport', + name: 'MakeReport', + component: () => import('@/views/attendance/makeReport'), + meta: { title: '生成考勤报表', icon: 'function', permission: ['/makeReport'] } + } + ] + }, + { + path: '/atdSetting', + component: Layout, + redirect: '/atdSetting', + name: 'AtdSetting', + meta: { + title: '考勤设置', + icon: 'task', // 图标 + permission: ['/atdSetting']// 权限名称 + }, + children: [ + { + path: '/regular', + name: 'Regular', + component: () => import('@/views/attendance/regular'), + meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + }, + { + path: '/specialDay', + name: 'SpecialDay', + component: () => import('@/views/attendance/specialDay'), + meta: { title: '特殊考勤日管理', icon: 'function', permission: ['/specialDay'] } + } + ] + } +] diff --git a/src/views/accessPermission/listDoorPermission.vue b/src/views/accessPermission/listDoorPermission.vue index 6d47c38..158aca0 100644 --- a/src/views/accessPermission/listDoorPermission.vue +++ b/src/views/accessPermission/listDoorPermission.vue @@ -127,6 +127,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getDoorPermissionList().then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listStaffPermission.vue b/src/views/accessPermission/listStaffPermission.vue index 3cbdb6c..25b9526 100644 --- a/src/views/accessPermission/listStaffPermission.vue +++ b/src/views/accessPermission/listStaffPermission.vue @@ -20,7 +20,7 @@
{{ doorName }}门禁员工授权列表
- 导出授权记录 + 导出授权记录 新增员工授权
@@ -175,6 +175,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getStaffPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listVisitorPermission.vue b/src/views/accessPermission/listVisitorPermission.vue index 2bf34e5..ddda124 100644 --- a/src/views/accessPermission/listVisitorPermission.vue +++ b/src/views/accessPermission/listVisitorPermission.vue @@ -17,7 +17,7 @@
{{ doorName }}门禁访客授权列表
- 导出授权记录 + 导出授权记录 新增访客授权
@@ -166,6 +166,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getVisitorPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue new file mode 100644 index 0000000..58aa8f3 --- /dev/null +++ b/src/views/attendance/editRemarks.vue @@ -0,0 +1,328 @@ + + + + + diff --git a/src/views/attendance/editSpecialDay.vue b/src/views/attendance/editSpecialDay.vue new file mode 100644 index 0000000..b416ddc --- /dev/null +++ b/src/views/attendance/editSpecialDay.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/views/attendance/listReport.vue b/src/views/attendance/listReport.vue new file mode 100644 index 0000000..92a5c6a --- /dev/null +++ b/src/views/attendance/listReport.vue @@ -0,0 +1,305 @@ + + + + + + diff --git a/src/views/attendance/makeReport.vue b/src/views/attendance/makeReport.vue new file mode 100644 index 0000000..7e4da1b --- /dev/null +++ b/src/views/attendance/makeReport.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/src/views/attendance/regular.vue b/src/views/attendance/regular.vue new file mode 100644 index 0000000..0fac7f8 --- /dev/null +++ b/src/views/attendance/regular.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/views/attendance/specialDay.vue b/src/views/attendance/specialDay.vue new file mode 100644 index 0000000..5ab4934 --- /dev/null +++ b/src/views/attendance/specialDay.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index 61ecaf5..808c0ee 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -75,6 +75,22 @@ permission: '/statistics' }, { + title: '识别记录', + context: '', + icon: 'log', + color: '#34bfa3', + path: '/record', + permission: '/record' + }, + { + title: '设备管理', + context: '', + icon: 'chart-pie', + color: '#d87a80', + path: '/device', + permission: '/device' + }, + { title: '登录日志', context: '', icon: 'log', diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js new file mode 100644 index 0000000..f7cf021 --- /dev/null +++ b/src/router/modules/attendance.js @@ -0,0 +1,55 @@ +/* Layout */ +import Layout from '../../views/layout/Layout' + +export const attendanceRouters = [ + { + path: '/attendance', + component: Layout, + redirect: '/atd', + name: 'Atd', + meta: { + title: '考勤统计', + icon: 'task', // 图标 + permission: ['/attendance']// 权限名称 + }, + children: [ + { + path: '/listReport', + name: 'ListReport', + component: () => import('@/views/attendance/listReport'), + meta: { title: '查询报表数据', icon: 'function', permission: ['/listReport'] } + }, + { + path: '/makeReport', + name: 'MakeReport', + component: () => import('@/views/attendance/makeReport'), + meta: { title: '生成考勤报表', icon: 'function', permission: ['/makeReport'] } + } + ] + }, + { + path: '/atdSetting', + component: Layout, + redirect: '/atdSetting', + name: 'AtdSetting', + meta: { + title: '考勤设置', + icon: 'task', // 图标 + permission: ['/atdSetting']// 权限名称 + }, + children: [ + { + path: '/regular', + name: 'Regular', + component: () => import('@/views/attendance/regular'), + meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + }, + { + path: '/specialDay', + name: 'SpecialDay', + component: () => import('@/views/attendance/specialDay'), + meta: { title: '特殊考勤日管理', icon: 'function', permission: ['/specialDay'] } + } + ] + } +] diff --git a/src/views/accessPermission/listDoorPermission.vue b/src/views/accessPermission/listDoorPermission.vue index 6d47c38..158aca0 100644 --- a/src/views/accessPermission/listDoorPermission.vue +++ b/src/views/accessPermission/listDoorPermission.vue @@ -127,6 +127,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getDoorPermissionList().then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listStaffPermission.vue b/src/views/accessPermission/listStaffPermission.vue index 3cbdb6c..25b9526 100644 --- a/src/views/accessPermission/listStaffPermission.vue +++ b/src/views/accessPermission/listStaffPermission.vue @@ -20,7 +20,7 @@
{{ doorName }}门禁员工授权列表
- 导出授权记录 + 导出授权记录 新增员工授权
@@ -175,6 +175,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getStaffPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listVisitorPermission.vue b/src/views/accessPermission/listVisitorPermission.vue index 2bf34e5..ddda124 100644 --- a/src/views/accessPermission/listVisitorPermission.vue +++ b/src/views/accessPermission/listVisitorPermission.vue @@ -17,7 +17,7 @@
{{ doorName }}门禁访客授权列表
- 导出授权记录 + 导出授权记录 新增访客授权
@@ -166,6 +166,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getVisitorPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue new file mode 100644 index 0000000..58aa8f3 --- /dev/null +++ b/src/views/attendance/editRemarks.vue @@ -0,0 +1,328 @@ + + + + + diff --git a/src/views/attendance/editSpecialDay.vue b/src/views/attendance/editSpecialDay.vue new file mode 100644 index 0000000..b416ddc --- /dev/null +++ b/src/views/attendance/editSpecialDay.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/views/attendance/listReport.vue b/src/views/attendance/listReport.vue new file mode 100644 index 0000000..92a5c6a --- /dev/null +++ b/src/views/attendance/listReport.vue @@ -0,0 +1,305 @@ + + + + + + diff --git a/src/views/attendance/makeReport.vue b/src/views/attendance/makeReport.vue new file mode 100644 index 0000000..7e4da1b --- /dev/null +++ b/src/views/attendance/makeReport.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/src/views/attendance/regular.vue b/src/views/attendance/regular.vue new file mode 100644 index 0000000..0fac7f8 --- /dev/null +++ b/src/views/attendance/regular.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/views/attendance/specialDay.vue b/src/views/attendance/specialDay.vue new file mode 100644 index 0000000..5ab4934 --- /dev/null +++ b/src/views/attendance/specialDay.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index 61ecaf5..808c0ee 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -75,6 +75,22 @@ permission: '/statistics' }, { + title: '识别记录', + context: '', + icon: 'log', + color: '#34bfa3', + path: '/record', + permission: '/record' + }, + { + title: '设备管理', + context: '', + icon: 'chart-pie', + color: '#d87a80', + path: '/device', + permission: '/device' + }, + { title: '登录日志', context: '', icon: 'log', diff --git a/src/views/deviceManage/syncRecord.vue b/src/views/deviceManage/syncRecord.vue index 82f0d0a..ba97c98 100644 --- a/src/views/deviceManage/syncRecord.vue +++ b/src/views/deviceManage/syncRecord.vue @@ -6,6 +6,7 @@ v-model="timeRange" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" + value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" size="small" class="my-datepick" @@ -79,6 +80,7 @@ }, watch: { timeRange(val) { + console.log('timeRange', val) if (val && val.length > 0) { if (typeof val[0] !== 'string') { val[0] = val[0].format('YYYY-MM-DD HH:mm:ss') @@ -104,12 +106,14 @@ if (end.valueOf() - s.valueOf() > (7 * 24 * 60 * 60 * 1000)) { this.$message.warning('日期范围不能大于7天') end = moment(s).add(7, 'days').format('YYYY-MM-DD 23:59:59') - s = s.format('yyyy-MM-DD 00:00:00') + s = s.format('YYYY-MM-DD 00:00:00') + console.log('end', end, 's', s) } if (s.valueOf() - end.valueOf() > (7 * 24 * 60 * 60 * 1000)) { this.$message.warning('日期范围不能大于7天') end = moment(s).subtract(7, 'days').format('YYYY-MM-DD 00:00:00') s = s.format('YYYY-MM-DD 23:59:59') + console.log('end', end, 's', s) } this.timeRange = [s, end] } diff --git a/README.md b/README.md index 21499d1..241cbf2 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# 虹膜综合管理平台(红外测温版)系统前端 +# 虹膜综合管理平台(红外测温版)加考勤系统前端 > 虹膜综合管理平台WEB前端 ,目前包含门禁和注册两大模块 -> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计 +> 系统分为登录模块、人员管理、设备管理、到访策略管理、门禁管理、门禁授权、数据查询、数据统计、考勤信息管理 > 系统管理模块包括资源管理、角色管理、组织结构管理、字典管理、区域管理、用户管理、日志管理。 diff --git a/config/dev.env.js b/config/dev.env.js index c21f267..bc033b0 100644 --- a/config/dev.env.js +++ b/config/dev.env.js @@ -6,6 +6,6 @@ // 将两个配置对象合并,最终结果是 NODE_ENV:‘"development"' module.exports = merge(prodEnv, { NODE_ENV: '"development"', - // BASE_API: '"http://139.198.16.38:20005"' - BASE_API: '"http://192.168.0.225:8093"' + BASE_API: '"http://139.198.16.38:20005"' + // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/api/attendance.js b/src/api/attendance.js new file mode 100644 index 0000000..c7e9922 --- /dev/null +++ b/src/api/attendance.js @@ -0,0 +1,123 @@ +/** + * 设备管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +export function makeReport() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 获取考勤规则 +export function getRegular() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 保存考勤规则 +export function updateRegular(params) { + return request({ + url: 'device/listAll', + method: 'post', + params + }) +} +// 批量导入特殊考勤日 +export function batchImportSpecialDay(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'irisCollect/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} + +// 模板下载 +export function downloadTemplate(deviceType) { + return request({ + url: 'device/model', + method: 'get', + params: { + deviceType: deviceType + } + }) +} + +// 添加特殊考勤日 +export function addSpecialDay(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} +// 修改特殊考勤日 +export function updateSpecialDay(params) { + return request({ + url: 'device/update', + method: 'post', + params + }) +} +// 删除特殊考勤日 +export function delSpecialDay(ids) { + return request({ + url: 'device/delete', + method: 'post', + params: { + ids: ids + }, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function getSpecialDayList() { + return request({ + url: 'device/list', + method: 'get' + }) +} +// 批量导出 +export function batchExportDevice(params) { + return request({ + url: 'device/batchExport', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} +// 添加考勤备注 +export function addRemarks(params) { + return request({ + url: 'device/add', + method: 'post', + params + }) +} + +// 获取已备注列表 +export function getRemarksList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + +// 获取可备注的类型 +export function getRemarksTypeList(params) { + return request({ + url: 'remarks/list', + method: 'get', + params + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 4e01b02..7e250ba 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -4,6 +4,17 @@ import request from '@/utils/request' import qs from 'qs' +// 查询员工照片 +export function getPersonPhoto(personId) { + return request({ + url: '/person/getPhoto', + method: 'get', + params: { + personId: personId + } + }) +} + // 查询员工列表 export function getPersonListAll(params) { return request({ diff --git a/src/main.js b/src/main.js index 3e00bc4..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -64,6 +64,9 @@ import VCharts from 'v-charts' Vue.use(VCharts) +// 配置是否启用考勤功能 +export const attendanceEnable = true + new Vue({ el: '#app', router, diff --git a/src/router/index.js b/src/router/index.js index fcd1ef5..733af54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import { baseRoutes } from './modules/base' import { systemRouters } from './modules/system' import { accessRouters } from './modules/access' +import { attendanceRouters } from './modules/attendance' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) @@ -73,6 +74,7 @@ export const asyncRouterMap = [ ...accessRouters, ...baseRoutes, + ...attendanceRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js new file mode 100644 index 0000000..f7cf021 --- /dev/null +++ b/src/router/modules/attendance.js @@ -0,0 +1,55 @@ +/* Layout */ +import Layout from '../../views/layout/Layout' + +export const attendanceRouters = [ + { + path: '/attendance', + component: Layout, + redirect: '/atd', + name: 'Atd', + meta: { + title: '考勤统计', + icon: 'task', // 图标 + permission: ['/attendance']// 权限名称 + }, + children: [ + { + path: '/listReport', + name: 'ListReport', + component: () => import('@/views/attendance/listReport'), + meta: { title: '查询报表数据', icon: 'function', permission: ['/listReport'] } + }, + { + path: '/makeReport', + name: 'MakeReport', + component: () => import('@/views/attendance/makeReport'), + meta: { title: '生成考勤报表', icon: 'function', permission: ['/makeReport'] } + } + ] + }, + { + path: '/atdSetting', + component: Layout, + redirect: '/atdSetting', + name: 'AtdSetting', + meta: { + title: '考勤设置', + icon: 'task', // 图标 + permission: ['/atdSetting']// 权限名称 + }, + children: [ + { + path: '/regular', + name: 'Regular', + component: () => import('@/views/attendance/regular'), + meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + }, + { + path: '/specialDay', + name: 'SpecialDay', + component: () => import('@/views/attendance/specialDay'), + meta: { title: '特殊考勤日管理', icon: 'function', permission: ['/specialDay'] } + } + ] + } +] diff --git a/src/views/accessPermission/listDoorPermission.vue b/src/views/accessPermission/listDoorPermission.vue index 6d47c38..158aca0 100644 --- a/src/views/accessPermission/listDoorPermission.vue +++ b/src/views/accessPermission/listDoorPermission.vue @@ -127,6 +127,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getDoorPermissionList().then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listStaffPermission.vue b/src/views/accessPermission/listStaffPermission.vue index 3cbdb6c..25b9526 100644 --- a/src/views/accessPermission/listStaffPermission.vue +++ b/src/views/accessPermission/listStaffPermission.vue @@ -20,7 +20,7 @@
{{ doorName }}门禁员工授权列表
- 导出授权记录 + 导出授权记录 新增员工授权
@@ -175,6 +175,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getStaffPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/accessPermission/listVisitorPermission.vue b/src/views/accessPermission/listVisitorPermission.vue index 2bf34e5..ddda124 100644 --- a/src/views/accessPermission/listVisitorPermission.vue +++ b/src/views/accessPermission/listVisitorPermission.vue @@ -17,7 +17,7 @@
{{ doorName }}门禁访客授权列表
- 导出授权记录 + 导出授权记录 新增访客授权
@@ -166,6 +166,9 @@ // 获取门禁授权数据 fetchData(isNowPage = true) { this.listLoading = true + if (!isNowPage) { // 是否显示当前页,否则跳转第一页 + this.listQuery.offset = 1 + } getVisitorPermissionByDoor(this.listQuery).then(response => { this.list = response.data.rows this.total = parseInt(response.data.total) diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue new file mode 100644 index 0000000..58aa8f3 --- /dev/null +++ b/src/views/attendance/editRemarks.vue @@ -0,0 +1,328 @@ + + + + + diff --git a/src/views/attendance/editSpecialDay.vue b/src/views/attendance/editSpecialDay.vue new file mode 100644 index 0000000..b416ddc --- /dev/null +++ b/src/views/attendance/editSpecialDay.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/src/views/attendance/listReport.vue b/src/views/attendance/listReport.vue new file mode 100644 index 0000000..92a5c6a --- /dev/null +++ b/src/views/attendance/listReport.vue @@ -0,0 +1,305 @@ + + + + + + diff --git a/src/views/attendance/makeReport.vue b/src/views/attendance/makeReport.vue new file mode 100644 index 0000000..7e4da1b --- /dev/null +++ b/src/views/attendance/makeReport.vue @@ -0,0 +1,84 @@ + + + + + diff --git a/src/views/attendance/regular.vue b/src/views/attendance/regular.vue new file mode 100644 index 0000000..0fac7f8 --- /dev/null +++ b/src/views/attendance/regular.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/views/attendance/specialDay.vue b/src/views/attendance/specialDay.vue new file mode 100644 index 0000000..5ab4934 --- /dev/null +++ b/src/views/attendance/specialDay.vue @@ -0,0 +1,260 @@ + + + + + diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index 61ecaf5..808c0ee 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -75,6 +75,22 @@ permission: '/statistics' }, { + title: '识别记录', + context: '', + icon: 'log', + color: '#34bfa3', + path: '/record', + permission: '/record' + }, + { + title: '设备管理', + context: '', + icon: 'chart-pie', + color: '#d87a80', + path: '/device', + permission: '/device' + }, + { title: '登录日志', context: '', icon: 'log', diff --git a/src/views/deviceManage/syncRecord.vue b/src/views/deviceManage/syncRecord.vue index 82f0d0a..ba97c98 100644 --- a/src/views/deviceManage/syncRecord.vue +++ b/src/views/deviceManage/syncRecord.vue @@ -6,6 +6,7 @@ v-model="timeRange" :picker-options="pickerOptions" :default-time="['00:00:00', '23:59:59']" + value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" size="small" class="my-datepick" @@ -79,6 +80,7 @@ }, watch: { timeRange(val) { + console.log('timeRange', val) if (val && val.length > 0) { if (typeof val[0] !== 'string') { val[0] = val[0].format('YYYY-MM-DD HH:mm:ss') @@ -104,12 +106,14 @@ if (end.valueOf() - s.valueOf() > (7 * 24 * 60 * 60 * 1000)) { this.$message.warning('日期范围不能大于7天') end = moment(s).add(7, 'days').format('YYYY-MM-DD 23:59:59') - s = s.format('yyyy-MM-DD 00:00:00') + s = s.format('YYYY-MM-DD 00:00:00') + console.log('end', end, 's', s) } if (s.valueOf() - end.valueOf() > (7 * 24 * 60 * 60 * 1000)) { this.$message.warning('日期范围不能大于7天') end = moment(s).subtract(7, 'days').format('YYYY-MM-DD 00:00:00') s = s.format('YYYY-MM-DD 23:59:59') + console.log('end', end, 's', s) } this.timeRange = [s, end] } diff --git a/src/views/memberManage/addPerson.vue b/src/views/memberManage/addPerson.vue index da6fca2..159e1cf 100644 --- a/src/views/memberManage/addPerson.vue +++ b/src/views/memberManage/addPerson.vue @@ -1,12 +1,12 @@