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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/main.js b/src/main.js index 1a0ba3d..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -65,7 +65,7 @@ Vue.use(VCharts) // 配置是否启用考勤功能 -export const attendanceEnable = false +export const attendanceEnable = true new Vue({ el: '#app', 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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/main.js b/src/main.js index 1a0ba3d..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -65,7 +65,7 @@ Vue.use(VCharts) // 配置是否启用考勤功能 -export const attendanceEnable = false +export const attendanceEnable = true new Vue({ el: '#app', 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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/main.js b/src/main.js index 1a0ba3d..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -65,7 +65,7 @@ Vue.use(VCharts) // 配置是否启用考勤功能 -export const attendanceEnable = false +export const attendanceEnable = true new Vue({ el: '#app', 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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/main.js b/src/main.js index 1a0ba3d..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -65,7 +65,7 @@ Vue.use(VCharts) // 配置是否启用考勤功能 -export const attendanceEnable = false +export const attendanceEnable = true new Vue({ el: '#app', 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/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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/main.js b/src/main.js index 1a0ba3d..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -65,7 +65,7 @@ Vue.use(VCharts) // 配置是否启用考勤功能 -export const attendanceEnable = false +export const attendanceEnable = true new Vue({ el: '#app', 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/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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/main.js b/src/main.js index 1a0ba3d..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -65,7 +65,7 @@ Vue.use(VCharts) // 配置是否启用考勤功能 -export const attendanceEnable = false +export const attendanceEnable = true new Vue({ el: '#app', 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/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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/main.js b/src/main.js index 1a0ba3d..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -65,7 +65,7 @@ Vue.use(VCharts) // 配置是否启用考勤功能 -export const attendanceEnable = false +export const attendanceEnable = true new Vue({ el: '#app', 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/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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/main.js b/src/main.js index 1a0ba3d..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -65,7 +65,7 @@ Vue.use(VCharts) // 配置是否启用考勤功能 -export const attendanceEnable = false +export const attendanceEnable = true new Vue({ el: '#app', 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/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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/main.js b/src/main.js index 1a0ba3d..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -65,7 +65,7 @@ Vue.use(VCharts) // 配置是否启用考勤功能 -export const attendanceEnable = false +export const attendanceEnable = true new Vue({ el: '#app', 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/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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/main.js b/src/main.js index 1a0ba3d..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -65,7 +65,7 @@ Vue.use(VCharts) // 配置是否启用考勤功能 -export const attendanceEnable = false +export const attendanceEnable = true new Vue({ el: '#app', 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/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/doorManage/controlDoor.vue b/src/views/doorManage/controlDoor.vue index dc19d8e..a931668 100644 --- a/src/views/doorManage/controlDoor.vue +++ b/src/views/doorManage/controlDoor.vue @@ -107,6 +107,10 @@ }, // 保存数据 saveData: function() { + if(this.doorForm.beginDateTime >= this.doorForm.endDateTime){ + this.$message.warning("生效时间必须小于失效时间") + return + } this.updateData() }, // 修改数据 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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/main.js b/src/main.js index 1a0ba3d..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -65,7 +65,7 @@ Vue.use(VCharts) // 配置是否启用考勤功能 -export const attendanceEnable = false +export const attendanceEnable = true new Vue({ el: '#app', 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/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/doorManage/controlDoor.vue b/src/views/doorManage/controlDoor.vue index dc19d8e..a931668 100644 --- a/src/views/doorManage/controlDoor.vue +++ b/src/views/doorManage/controlDoor.vue @@ -107,6 +107,10 @@ }, // 保存数据 saveData: function() { + if(this.doorForm.beginDateTime >= this.doorForm.endDateTime){ + this.$message.warning("生效时间必须小于失效时间") + return + } this.updateData() }, // 修改数据 diff --git a/src/views/memberManage/addIris.vue b/src/views/memberManage/addIris.vue index e65e74c..d450107 100644 --- a/src/views/memberManage/addIris.vue +++ b/src/views/memberManage/addIris.vue @@ -21,7 +21,8 @@ image_zy1: '', image_yy1: '' }, - iframeMsg: '' + iframeMsg: '', + type: '' // 跳转类型 } }, mounted() { @@ -33,9 +34,6 @@ if (this.$route.query.personId) { this.irisForm.personId = this.$route.query.personId } - if (this.$route.query.idCardNo) { - this.irisForm.idCardNo = this.$route.query.idCardNo - } // console.log(this.irisForm) }, activated() { @@ -89,7 +87,13 @@ if (response.code === 200) { this.$message.success('保存虹膜成功') this.resetForm() - this.$router.push({ path: '/staff' }) + if(this.type === 'staff') { + this.$router.push({ path: '/staff' }) + } + if(this.type === 'visitor') { + this.$router.push({ path: '/visitor' }) + } + } }) } 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/access.js b/src/api/access.js index 54dda50..156c1c4 100644 --- a/src/api/access.js +++ b/src/api/access.js @@ -30,14 +30,15 @@ }) } // 新增授权 -export function addPermission(params) { +export function addPermission(form) { return request({ url: 'acsPermission/add', method: 'post', - params, - paramsSerializer: params => { - return qs.stringify(params, { indices: false }) - } + params: { + doorCode: form.doorCode, + strategyId: form.strategyId + }, + data: form.personList }) } 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/main.js b/src/main.js index 1a0ba3d..c9354d4 100644 --- a/src/main.js +++ b/src/main.js @@ -65,7 +65,7 @@ Vue.use(VCharts) // 配置是否启用考勤功能 -export const attendanceEnable = false +export const attendanceEnable = true new Vue({ el: '#app', 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/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/doorManage/controlDoor.vue b/src/views/doorManage/controlDoor.vue index dc19d8e..a931668 100644 --- a/src/views/doorManage/controlDoor.vue +++ b/src/views/doorManage/controlDoor.vue @@ -107,6 +107,10 @@ }, // 保存数据 saveData: function() { + if(this.doorForm.beginDateTime >= this.doorForm.endDateTime){ + this.$message.warning("生效时间必须小于失效时间") + return + } this.updateData() }, // 修改数据 diff --git a/src/views/memberManage/addIris.vue b/src/views/memberManage/addIris.vue index e65e74c..d450107 100644 --- a/src/views/memberManage/addIris.vue +++ b/src/views/memberManage/addIris.vue @@ -21,7 +21,8 @@ image_zy1: '', image_yy1: '' }, - iframeMsg: '' + iframeMsg: '', + type: '' // 跳转类型 } }, mounted() { @@ -33,9 +34,6 @@ if (this.$route.query.personId) { this.irisForm.personId = this.$route.query.personId } - if (this.$route.query.idCardNo) { - this.irisForm.idCardNo = this.$route.query.idCardNo - } // console.log(this.irisForm) }, activated() { @@ -89,7 +87,13 @@ if (response.code === 200) { this.$message.success('保存虹膜成功') this.resetForm() - this.$router.push({ path: '/staff' }) + if(this.type === 'staff') { + this.$router.push({ path: '/staff' }) + } + if(this.type === 'visitor') { + this.$router.push({ path: '/visitor' }) + } + } }) } diff --git a/src/views/memberManage/addPerson.vue b/src/views/memberManage/addPerson.vue index 7b3b1a3..159e1cf 100644 --- a/src/views/memberManage/addPerson.vue +++ b/src/views/memberManage/addPerson.vue @@ -1,6 +1,6 @@