diff --git a/config/dev.env.js b/config/dev.env.js index bc033b0..3d7e78f 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://localhost:8093"' // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/config/dev.env.js b/config/dev.env.js index bc033b0..3d7e78f 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://localhost:8093"' // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/App.vue b/src/App.vue index 721d3a3..d716c90 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,3 +9,8 @@ name: 'App' } + diff --git a/config/dev.env.js b/config/dev.env.js index bc033b0..3d7e78f 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://localhost:8093"' // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/App.vue b/src/App.vue index 721d3a3..d716c90 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,3 +9,8 @@ name: 'App' } + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/config/dev.env.js b/config/dev.env.js index bc033b0..3d7e78f 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://localhost:8093"' // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/App.vue b/src/App.vue index 721d3a3..d716c90 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,3 +9,8 @@ name: 'App' } + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 7e250ba..4143c81 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -112,6 +112,17 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } +// 批量导入 +export function batchImportPerson(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'person/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} export function saveIris(params) { const formData = new FormData() diff --git a/config/dev.env.js b/config/dev.env.js index bc033b0..3d7e78f 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://localhost:8093"' // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/App.vue b/src/App.vue index 721d3a3..d716c90 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,3 +9,8 @@ name: 'App' } + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 7e250ba..4143c81 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -112,6 +112,17 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } +// 批量导入 +export function batchImportPerson(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'person/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} export function saveIris(params) { const formData = new FormData() diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js index f7cf021..b444af2 100644 --- a/src/router/modules/attendance.js +++ b/src/router/modules/attendance.js @@ -39,10 +39,10 @@ }, children: [ { - path: '/regular', - name: 'Regular', - component: () => import('@/views/attendance/regular'), - meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + path: '/atdRules', + name: 'AtdRules', + component: () => import('@/views/attendance/atdRules'), + meta: { title: '考勤规则', icon: 'function', permission: ['/atdRules'] } }, { path: '/specialDay', diff --git a/config/dev.env.js b/config/dev.env.js index bc033b0..3d7e78f 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://localhost:8093"' // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/App.vue b/src/App.vue index 721d3a3..d716c90 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,3 +9,8 @@ name: 'App' } + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 7e250ba..4143c81 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -112,6 +112,17 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } +// 批量导入 +export function batchImportPerson(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'person/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} export function saveIris(params) { const formData = new FormData() diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js index f7cf021..b444af2 100644 --- a/src/router/modules/attendance.js +++ b/src/router/modules/attendance.js @@ -39,10 +39,10 @@ }, children: [ { - path: '/regular', - name: 'Regular', - component: () => import('@/views/attendance/regular'), - meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + path: '/atdRules', + name: 'AtdRules', + component: () => import('@/views/attendance/atdRules'), + meta: { title: '考勤规则', icon: 'function', permission: ['/atdRules'] } }, { path: '/specialDay', diff --git a/src/views/attendance/atdRules.vue b/src/views/attendance/atdRules.vue new file mode 100644 index 0000000..3965d01 --- /dev/null +++ b/src/views/attendance/atdRules.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/config/dev.env.js b/config/dev.env.js index bc033b0..3d7e78f 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://localhost:8093"' // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/App.vue b/src/App.vue index 721d3a3..d716c90 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,3 +9,8 @@ name: 'App' } + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 7e250ba..4143c81 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -112,6 +112,17 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } +// 批量导入 +export function batchImportPerson(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'person/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} export function saveIris(params) { const formData = new FormData() diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js index f7cf021..b444af2 100644 --- a/src/router/modules/attendance.js +++ b/src/router/modules/attendance.js @@ -39,10 +39,10 @@ }, children: [ { - path: '/regular', - name: 'Regular', - component: () => import('@/views/attendance/regular'), - meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + path: '/atdRules', + name: 'AtdRules', + component: () => import('@/views/attendance/atdRules'), + meta: { title: '考勤规则', icon: 'function', permission: ['/atdRules'] } }, { path: '/specialDay', diff --git a/src/views/attendance/atdRules.vue b/src/views/attendance/atdRules.vue new file mode 100644 index 0000000..3965d01 --- /dev/null +++ b/src/views/attendance/atdRules.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue index 58aa8f3..c474ee1 100644 --- a/src/views/attendance/editRemarks.vue +++ b/src/views/attendance/editRemarks.vue @@ -1,19 +1,18 @@ + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 7e250ba..4143c81 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -112,6 +112,17 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } +// 批量导入 +export function batchImportPerson(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'person/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} export function saveIris(params) { const formData = new FormData() diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js index f7cf021..b444af2 100644 --- a/src/router/modules/attendance.js +++ b/src/router/modules/attendance.js @@ -39,10 +39,10 @@ }, children: [ { - path: '/regular', - name: 'Regular', - component: () => import('@/views/attendance/regular'), - meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + path: '/atdRules', + name: 'AtdRules', + component: () => import('@/views/attendance/atdRules'), + meta: { title: '考勤规则', icon: 'function', permission: ['/atdRules'] } }, { path: '/specialDay', diff --git a/src/views/attendance/atdRules.vue b/src/views/attendance/atdRules.vue new file mode 100644 index 0000000..3965d01 --- /dev/null +++ b/src/views/attendance/atdRules.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue index 58aa8f3..c474ee1 100644 --- a/src/views/attendance/editRemarks.vue +++ b/src/views/attendance/editRemarks.vue @@ -1,19 +1,18 @@ + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 7e250ba..4143c81 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -112,6 +112,17 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } +// 批量导入 +export function batchImportPerson(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'person/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} export function saveIris(params) { const formData = new FormData() diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js index f7cf021..b444af2 100644 --- a/src/router/modules/attendance.js +++ b/src/router/modules/attendance.js @@ -39,10 +39,10 @@ }, children: [ { - path: '/regular', - name: 'Regular', - component: () => import('@/views/attendance/regular'), - meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + path: '/atdRules', + name: 'AtdRules', + component: () => import('@/views/attendance/atdRules'), + meta: { title: '考勤规则', icon: 'function', permission: ['/atdRules'] } }, { path: '/specialDay', diff --git a/src/views/attendance/atdRules.vue b/src/views/attendance/atdRules.vue new file mode 100644 index 0000000..3965d01 --- /dev/null +++ b/src/views/attendance/atdRules.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue index 58aa8f3..c474ee1 100644 --- a/src/views/attendance/editRemarks.vue +++ b/src/views/attendance/editRemarks.vue @@ -1,19 +1,18 @@ + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 7e250ba..4143c81 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -112,6 +112,17 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } +// 批量导入 +export function batchImportPerson(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'person/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} export function saveIris(params) { const formData = new FormData() diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js index f7cf021..b444af2 100644 --- a/src/router/modules/attendance.js +++ b/src/router/modules/attendance.js @@ -39,10 +39,10 @@ }, children: [ { - path: '/regular', - name: 'Regular', - component: () => import('@/views/attendance/regular'), - meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + path: '/atdRules', + name: 'AtdRules', + component: () => import('@/views/attendance/atdRules'), + meta: { title: '考勤规则', icon: 'function', permission: ['/atdRules'] } }, { path: '/specialDay', diff --git a/src/views/attendance/atdRules.vue b/src/views/attendance/atdRules.vue new file mode 100644 index 0000000..3965d01 --- /dev/null +++ b/src/views/attendance/atdRules.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue index 58aa8f3..c474ee1 100644 --- a/src/views/attendance/editRemarks.vue +++ b/src/views/attendance/editRemarks.vue @@ -1,19 +1,18 @@ + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 7e250ba..4143c81 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -112,6 +112,17 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } +// 批量导入 +export function batchImportPerson(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'person/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} export function saveIris(params) { const formData = new FormData() diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js index f7cf021..b444af2 100644 --- a/src/router/modules/attendance.js +++ b/src/router/modules/attendance.js @@ -39,10 +39,10 @@ }, children: [ { - path: '/regular', - name: 'Regular', - component: () => import('@/views/attendance/regular'), - meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + path: '/atdRules', + name: 'AtdRules', + component: () => import('@/views/attendance/atdRules'), + meta: { title: '考勤规则', icon: 'function', permission: ['/atdRules'] } }, { path: '/specialDay', diff --git a/src/views/attendance/atdRules.vue b/src/views/attendance/atdRules.vue new file mode 100644 index 0000000..3965d01 --- /dev/null +++ b/src/views/attendance/atdRules.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue index 58aa8f3..c474ee1 100644 --- a/src/views/attendance/editRemarks.vue +++ b/src/views/attendance/editRemarks.vue @@ -1,19 +1,18 @@ - - diff --git a/config/dev.env.js b/config/dev.env.js index bc033b0..3d7e78f 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://localhost:8093"' // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/App.vue b/src/App.vue index 721d3a3..d716c90 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,3 +9,8 @@ name: 'App' } + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 7e250ba..4143c81 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -112,6 +112,17 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } +// 批量导入 +export function batchImportPerson(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'person/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} export function saveIris(params) { const formData = new FormData() diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js index f7cf021..b444af2 100644 --- a/src/router/modules/attendance.js +++ b/src/router/modules/attendance.js @@ -39,10 +39,10 @@ }, children: [ { - path: '/regular', - name: 'Regular', - component: () => import('@/views/attendance/regular'), - meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + path: '/atdRules', + name: 'AtdRules', + component: () => import('@/views/attendance/atdRules'), + meta: { title: '考勤规则', icon: 'function', permission: ['/atdRules'] } }, { path: '/specialDay', diff --git a/src/views/attendance/atdRules.vue b/src/views/attendance/atdRules.vue new file mode 100644 index 0000000..3965d01 --- /dev/null +++ b/src/views/attendance/atdRules.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue index 58aa8f3..c474ee1 100644 --- a/src/views/attendance/editRemarks.vue +++ b/src/views/attendance/editRemarks.vue @@ -1,19 +1,18 @@ - - diff --git a/src/views/attendance/specialDay.vue b/src/views/attendance/specialDay.vue index 5ab4934..8f7a301 100644 --- a/src/views/attendance/specialDay.vue +++ b/src/views/attendance/specialDay.vue @@ -18,7 +18,6 @@
数据列表
- 新增 批量导入 - 模板下载 + + 删除 + 新增 +
- + @@ -50,7 +52,6 @@ @@ -73,12 +74,13 @@ + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 7e250ba..4143c81 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -112,6 +112,17 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } +// 批量导入 +export function batchImportPerson(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'person/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} export function saveIris(params) { const formData = new FormData() diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js index f7cf021..b444af2 100644 --- a/src/router/modules/attendance.js +++ b/src/router/modules/attendance.js @@ -39,10 +39,10 @@ }, children: [ { - path: '/regular', - name: 'Regular', - component: () => import('@/views/attendance/regular'), - meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + path: '/atdRules', + name: 'AtdRules', + component: () => import('@/views/attendance/atdRules'), + meta: { title: '考勤规则', icon: 'function', permission: ['/atdRules'] } }, { path: '/specialDay', diff --git a/src/views/attendance/atdRules.vue b/src/views/attendance/atdRules.vue new file mode 100644 index 0000000..3965d01 --- /dev/null +++ b/src/views/attendance/atdRules.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue index 58aa8f3..c474ee1 100644 --- a/src/views/attendance/editRemarks.vue +++ b/src/views/attendance/editRemarks.vue @@ -1,19 +1,18 @@ - - diff --git a/src/views/attendance/specialDay.vue b/src/views/attendance/specialDay.vue index 5ab4934..8f7a301 100644 --- a/src/views/attendance/specialDay.vue +++ b/src/views/attendance/specialDay.vue @@ -18,7 +18,6 @@
数据列表
- 新增 批量导入 - 模板下载 + + 删除 + 新增 +
- + @@ -50,7 +52,6 @@ @@ -73,12 +74,13 @@ + + diff --git a/config/dev.env.js b/config/dev.env.js index bc033b0..3d7e78f 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://localhost:8093"' // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/App.vue b/src/App.vue index 721d3a3..d716c90 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,3 +9,8 @@ name: 'App' } + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 7e250ba..4143c81 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -112,6 +112,17 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } +// 批量导入 +export function batchImportPerson(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'person/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} export function saveIris(params) { const formData = new FormData() diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js index f7cf021..b444af2 100644 --- a/src/router/modules/attendance.js +++ b/src/router/modules/attendance.js @@ -39,10 +39,10 @@ }, children: [ { - path: '/regular', - name: 'Regular', - component: () => import('@/views/attendance/regular'), - meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + path: '/atdRules', + name: 'AtdRules', + component: () => import('@/views/attendance/atdRules'), + meta: { title: '考勤规则', icon: 'function', permission: ['/atdRules'] } }, { path: '/specialDay', diff --git a/src/views/attendance/atdRules.vue b/src/views/attendance/atdRules.vue new file mode 100644 index 0000000..3965d01 --- /dev/null +++ b/src/views/attendance/atdRules.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue index 58aa8f3..c474ee1 100644 --- a/src/views/attendance/editRemarks.vue +++ b/src/views/attendance/editRemarks.vue @@ -1,19 +1,18 @@ - - diff --git a/src/views/attendance/specialDay.vue b/src/views/attendance/specialDay.vue index 5ab4934..8f7a301 100644 --- a/src/views/attendance/specialDay.vue +++ b/src/views/attendance/specialDay.vue @@ -18,7 +18,6 @@
数据列表
- 新增 批量导入 - 模板下载 + + 删除 + 新增 +
- + @@ -50,7 +52,6 @@ @@ -73,12 +74,13 @@ + + diff --git a/src/views/memberManage/addPerson.vue b/src/views/memberManage/addPerson.vue index 159e1cf..875f90e 100644 --- a/src/views/memberManage/addPerson.vue +++ b/src/views/memberManage/addPerson.vue @@ -118,21 +118,21 @@ - + - + - + @@ -211,12 +211,13 @@ if (!Number(value)) { callback(new Error('请输入0-20之间的数字')) } else { - if (value < (this.personForm.ext.annualLeave ? this.personForm.ext.annualLeave : 0) || value > 20) { + var min = this.personForm.ext.annualLeave !== '' ? this.personForm.ext.annualLeave : 0 + if (parseFloat(value) < parseFloat(min) || parseFloat(value) > 20) { callback(new Error('请输入0-20之间且不小于剩余年假天数的值')) } else { if (value.indexOf('.') !== -1) { if (value.split('.')[1].length > 1) { - callback(new Error('只能是一位小数,如5.0或5.5')) + callback(new Error('最多一位小数')) } else { if (value.split('.')[1] !== '0' && value.split('.')[1] !== '5') { callback(new Error('只能是整数或整数加减0.5的值')) @@ -243,12 +244,13 @@ if (!Number(value)) { callback(new Error('请输入数字')) } else { - if (value < 0 || value > (this.personForm.ext.initAnnualLeave ? this.personForm.ext.initAnnualLeave : 20)) { + var max = this.personForm.ext.initAnnualLeave !== '' ? this.personForm.ext.initAnnualLeave : 20 + if (parseFloat(value) < 0 || parseFloat(value) > parseFloat(max)) { callback(new Error('请输入0-20之间且不大于年假天数的值')) } else { if (value.indexOf('.') !== -1) { if (value.split('.')[1].length > 1) { - callback(new Error('只能是一位小数,如5.0或5.5')) + callback(new Error('最多一位小数')) } else { if (value.split('.')[1] !== '0' && value.split('.')[1] !== '5') { callback(new Error('只能是整数或整数加减0.5的值')) diff --git a/config/dev.env.js b/config/dev.env.js index bc033b0..3d7e78f 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://localhost:8093"' // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/App.vue b/src/App.vue index 721d3a3..d716c90 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,3 +9,8 @@ name: 'App' } + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 7e250ba..4143c81 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -112,6 +112,17 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } +// 批量导入 +export function batchImportPerson(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'person/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} export function saveIris(params) { const formData = new FormData() diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js index f7cf021..b444af2 100644 --- a/src/router/modules/attendance.js +++ b/src/router/modules/attendance.js @@ -39,10 +39,10 @@ }, children: [ { - path: '/regular', - name: 'Regular', - component: () => import('@/views/attendance/regular'), - meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + path: '/atdRules', + name: 'AtdRules', + component: () => import('@/views/attendance/atdRules'), + meta: { title: '考勤规则', icon: 'function', permission: ['/atdRules'] } }, { path: '/specialDay', diff --git a/src/views/attendance/atdRules.vue b/src/views/attendance/atdRules.vue new file mode 100644 index 0000000..3965d01 --- /dev/null +++ b/src/views/attendance/atdRules.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue index 58aa8f3..c474ee1 100644 --- a/src/views/attendance/editRemarks.vue +++ b/src/views/attendance/editRemarks.vue @@ -1,19 +1,18 @@ - - diff --git a/src/views/attendance/specialDay.vue b/src/views/attendance/specialDay.vue index 5ab4934..8f7a301 100644 --- a/src/views/attendance/specialDay.vue +++ b/src/views/attendance/specialDay.vue @@ -18,7 +18,6 @@
数据列表
- 新增 批量导入 - 模板下载 + + 删除 + 新增 +
- + @@ -50,7 +52,6 @@ @@ -73,12 +74,13 @@ + + diff --git a/src/views/memberManage/addPerson.vue b/src/views/memberManage/addPerson.vue index 159e1cf..875f90e 100644 --- a/src/views/memberManage/addPerson.vue +++ b/src/views/memberManage/addPerson.vue @@ -118,21 +118,21 @@ - + - + - + @@ -211,12 +211,13 @@ if (!Number(value)) { callback(new Error('请输入0-20之间的数字')) } else { - if (value < (this.personForm.ext.annualLeave ? this.personForm.ext.annualLeave : 0) || value > 20) { + var min = this.personForm.ext.annualLeave !== '' ? this.personForm.ext.annualLeave : 0 + if (parseFloat(value) < parseFloat(min) || parseFloat(value) > 20) { callback(new Error('请输入0-20之间且不小于剩余年假天数的值')) } else { if (value.indexOf('.') !== -1) { if (value.split('.')[1].length > 1) { - callback(new Error('只能是一位小数,如5.0或5.5')) + callback(new Error('最多一位小数')) } else { if (value.split('.')[1] !== '0' && value.split('.')[1] !== '5') { callback(new Error('只能是整数或整数加减0.5的值')) @@ -243,12 +244,13 @@ if (!Number(value)) { callback(new Error('请输入数字')) } else { - if (value < 0 || value > (this.personForm.ext.initAnnualLeave ? this.personForm.ext.initAnnualLeave : 20)) { + var max = this.personForm.ext.initAnnualLeave !== '' ? this.personForm.ext.initAnnualLeave : 20 + if (parseFloat(value) < 0 || parseFloat(value) > parseFloat(max)) { callback(new Error('请输入0-20之间且不大于年假天数的值')) } else { if (value.indexOf('.') !== -1) { if (value.split('.')[1].length > 1) { - callback(new Error('只能是一位小数,如5.0或5.5')) + callback(new Error('最多一位小数')) } else { if (value.split('.')[1] !== '0' && value.split('.')[1] !== '5') { callback(new Error('只能是整数或整数加减0.5的值')) diff --git a/src/views/memberManage/addPersonIris.vue b/src/views/memberManage/addPersonIris.vue index 1228fed..e78b02b 100644 --- a/src/views/memberManage/addPersonIris.vue +++ b/src/views/memberManage/addPersonIris.vue @@ -120,21 +120,21 @@ - + - + - + @@ -228,12 +228,13 @@ if (!Number(value)) { callback(new Error('请输入0-20之间的数字')) } else { - if (value < (this.personForm.ext.annualLeave ? this.personForm.ext.annualLeave : 0) || value > 20) { + var min = this.personForm.ext.annualLeave !== '' ? this.personForm.ext.annualLeave : 0 + if (parseFloat(value) < parseFloat(min) || parseFloat(value) > 20) { callback(new Error('请输入0-20之间且不小于剩余年假天数的值')) } else { if (value.indexOf('.') !== -1) { if (value.split('.')[1].length > 1) { - callback(new Error('只能是一位小数,如5.0或5.5')) + callback(new Error('最多一位小数')) } else { if (value.split('.')[1] !== '0' && value.split('.')[1] !== '5') { callback(new Error('只能是整数或整数加减0.5的值')) @@ -260,12 +261,13 @@ if (!Number(value)) { callback(new Error('请输入数字')) } else { - if (value < 0 || value > (this.personForm.ext.initAnnualLeave ? this.personForm.ext.initAnnualLeave : 20)) { + var max = this.personForm.ext.initAnnualLeave !== '' ? this.personForm.ext.initAnnualLeave : 20 + if (parseFloat(value) < 0 || parseFloat(value) > parseFloat(max)) { callback(new Error('请输入0-20之间且不大于年假天数的值')) } else { if (value.indexOf('.') !== -1) { if (value.split('.')[1].length > 1) { - callback(new Error('只能是一位小数,如5.0或5.5')) + callback(new Error('最多一位小数')) } else { if (value.split('.')[1] !== '0' && value.split('.')[1] !== '5') { callback(new Error('只能是整数或整数加减0.5的值')) diff --git a/config/dev.env.js b/config/dev.env.js index bc033b0..3d7e78f 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://localhost:8093"' // BASE_API: '"http://192.168.0.18:8093"' }) diff --git a/src/App.vue b/src/App.vue index 721d3a3..d716c90 100644 --- a/src/App.vue +++ b/src/App.vue @@ -9,3 +9,8 @@ name: 'App' } + diff --git a/src/api/attendance.js b/src/api/attendance.js index c7e9922..f0df672 100644 --- a/src/api/attendance.js +++ b/src/api/attendance.js @@ -4,23 +4,43 @@ import request from '@/utils/request' import qs from 'qs' -export function makeReport() { +export function makeReport(params) { return request({ - url: 'device/list', + url: 'makeReport/make', + method: 'get', + timeout: 120000, + params, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} + +// 获取报表数据查询页的部门列表数据 +export function getDeptList() { + return request({ + url: 'report/deptList', method: 'get' }) } -// 获取考勤规则 -export function getRegular() { + +// 获取报表数据列表 +export function getReportList(params) { return request({ - url: 'device/list', + url: 'report/list', + method: 'get', + params + }) +} +// 获取考勤规则 +export function getAtdRules() { + return request({ + url: 'AtdRules/list', method: 'get' }) } // 保存考勤规则 -export function updateRegular(params) { +export function updateAtdRules(params) { return request({ - url: 'device/listAll', + url: 'AtdRules/update', method: 'post', params }) @@ -30,28 +50,26 @@ const param = new FormData() param.append('file', fileobj) return request({ - url: 'irisCollect/batchImport', + url: 'specialDay/batchImport', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param }) } -// 模板下载 -export function downloadTemplate(deviceType) { +// 获取特殊考勤日 +export function getSpecialDayList(params) { return request({ - url: 'device/model', + url: 'specialDay/list', method: 'get', - params: { - deviceType: deviceType - } + params }) } // 添加特殊考勤日 export function addSpecialDay(params) { return request({ - url: 'device/add', + url: 'specialDay/add', method: 'post', params }) @@ -59,7 +77,7 @@ // 修改特殊考勤日 export function updateSpecialDay(params) { return request({ - url: 'device/update', + url: 'specialDay/update', method: 'post', params }) @@ -67,7 +85,7 @@ // 删除特殊考勤日 export function delSpecialDay(ids) { return request({ - url: 'device/delete', + url: 'specialDay/delete', method: 'post', params: { ids: ids @@ -78,16 +96,10 @@ }) } -export function getSpecialDayList() { - return request({ - url: 'device/list', - method: 'get' - }) -} // 批量导出 -export function batchExportDevice(params) { +export function batchExportReport(params) { return request({ - url: 'device/batchExport', + url: 'report/batchExport', method: 'get', timeout: 120000, params, @@ -97,7 +109,7 @@ // 添加考勤备注 export function addRemarks(params) { return request({ - url: 'device/add', + url: 'remarks/add', method: 'post', params }) @@ -113,11 +125,38 @@ } // 获取可备注的类型 -export function getRemarksTypeList(params) { +export function getEnabledTypeList(params) { return request({ - url: 'remarks/list', + url: 'remarks/enabledTypeList', method: 'get', params }) } +// 删除备注 +export function delRemarks(params) { + return request({ + url: 'remarks/delete', + method: 'post', + params + }) +} + +export function syncAndGenerate(params) { + return request({ + url: 'sync/syncAndGenerate', + method: 'post', + params, + paramsSerializer: params => { + return qs.stringify(params, { indices: false }) + } + }) +} + +export function initAnnualLeave() { + return request({ + url: 'report/initAnnualLeave', + method: 'get' + }) +} + diff --git a/src/api/person.js b/src/api/person.js index 7e250ba..4143c81 100644 --- a/src/api/person.js +++ b/src/api/person.js @@ -112,6 +112,17 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } +// 批量导入 +export function batchImportPerson(fileobj) { + const param = new FormData() + param.append('file', fileobj) + return request({ + url: 'person/batchImport', + method: 'post', + headers: { 'Content-Type': 'multipart/form-data' }, + data: param + }) +} export function saveIris(params) { const formData = new FormData() diff --git a/src/router/modules/attendance.js b/src/router/modules/attendance.js index f7cf021..b444af2 100644 --- a/src/router/modules/attendance.js +++ b/src/router/modules/attendance.js @@ -39,10 +39,10 @@ }, children: [ { - path: '/regular', - name: 'Regular', - component: () => import('@/views/attendance/regular'), - meta: { title: '考勤规则', icon: 'function', permission: ['/regular'] } + path: '/atdRules', + name: 'AtdRules', + component: () => import('@/views/attendance/atdRules'), + meta: { title: '考勤规则', icon: 'function', permission: ['/atdRules'] } }, { path: '/specialDay', diff --git a/src/views/attendance/atdRules.vue b/src/views/attendance/atdRules.vue new file mode 100644 index 0000000..3965d01 --- /dev/null +++ b/src/views/attendance/atdRules.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/views/attendance/editRemarks.vue b/src/views/attendance/editRemarks.vue index 58aa8f3..c474ee1 100644 --- a/src/views/attendance/editRemarks.vue +++ b/src/views/attendance/editRemarks.vue @@ -1,19 +1,18 @@ - - diff --git a/src/views/attendance/specialDay.vue b/src/views/attendance/specialDay.vue index 5ab4934..8f7a301 100644 --- a/src/views/attendance/specialDay.vue +++ b/src/views/attendance/specialDay.vue @@ -18,7 +18,6 @@
数据列表
- 新增 批量导入 - 模板下载 + + 删除 + 新增 +
- + @@ -50,7 +52,6 @@ @@ -73,12 +74,13 @@ + + diff --git a/src/views/memberManage/addPerson.vue b/src/views/memberManage/addPerson.vue index 159e1cf..875f90e 100644 --- a/src/views/memberManage/addPerson.vue +++ b/src/views/memberManage/addPerson.vue @@ -118,21 +118,21 @@ - + - + - + @@ -211,12 +211,13 @@ if (!Number(value)) { callback(new Error('请输入0-20之间的数字')) } else { - if (value < (this.personForm.ext.annualLeave ? this.personForm.ext.annualLeave : 0) || value > 20) { + var min = this.personForm.ext.annualLeave !== '' ? this.personForm.ext.annualLeave : 0 + if (parseFloat(value) < parseFloat(min) || parseFloat(value) > 20) { callback(new Error('请输入0-20之间且不小于剩余年假天数的值')) } else { if (value.indexOf('.') !== -1) { if (value.split('.')[1].length > 1) { - callback(new Error('只能是一位小数,如5.0或5.5')) + callback(new Error('最多一位小数')) } else { if (value.split('.')[1] !== '0' && value.split('.')[1] !== '5') { callback(new Error('只能是整数或整数加减0.5的值')) @@ -243,12 +244,13 @@ if (!Number(value)) { callback(new Error('请输入数字')) } else { - if (value < 0 || value > (this.personForm.ext.initAnnualLeave ? this.personForm.ext.initAnnualLeave : 20)) { + var max = this.personForm.ext.initAnnualLeave !== '' ? this.personForm.ext.initAnnualLeave : 20 + if (parseFloat(value) < 0 || parseFloat(value) > parseFloat(max)) { callback(new Error('请输入0-20之间且不大于年假天数的值')) } else { if (value.indexOf('.') !== -1) { if (value.split('.')[1].length > 1) { - callback(new Error('只能是一位小数,如5.0或5.5')) + callback(new Error('最多一位小数')) } else { if (value.split('.')[1] !== '0' && value.split('.')[1] !== '5') { callback(new Error('只能是整数或整数加减0.5的值')) diff --git a/src/views/memberManage/addPersonIris.vue b/src/views/memberManage/addPersonIris.vue index 1228fed..e78b02b 100644 --- a/src/views/memberManage/addPersonIris.vue +++ b/src/views/memberManage/addPersonIris.vue @@ -120,21 +120,21 @@ - + - + - + @@ -228,12 +228,13 @@ if (!Number(value)) { callback(new Error('请输入0-20之间的数字')) } else { - if (value < (this.personForm.ext.annualLeave ? this.personForm.ext.annualLeave : 0) || value > 20) { + var min = this.personForm.ext.annualLeave !== '' ? this.personForm.ext.annualLeave : 0 + if (parseFloat(value) < parseFloat(min) || parseFloat(value) > 20) { callback(new Error('请输入0-20之间且不小于剩余年假天数的值')) } else { if (value.indexOf('.') !== -1) { if (value.split('.')[1].length > 1) { - callback(new Error('只能是一位小数,如5.0或5.5')) + callback(new Error('最多一位小数')) } else { if (value.split('.')[1] !== '0' && value.split('.')[1] !== '5') { callback(new Error('只能是整数或整数加减0.5的值')) @@ -260,12 +261,13 @@ if (!Number(value)) { callback(new Error('请输入数字')) } else { - if (value < 0 || value > (this.personForm.ext.initAnnualLeave ? this.personForm.ext.initAnnualLeave : 20)) { + var max = this.personForm.ext.initAnnualLeave !== '' ? this.personForm.ext.initAnnualLeave : 20 + if (parseFloat(value) < 0 || parseFloat(value) > parseFloat(max)) { callback(new Error('请输入0-20之间且不大于年假天数的值')) } else { if (value.indexOf('.') !== -1) { if (value.split('.')[1].length > 1) { - callback(new Error('只能是一位小数,如5.0或5.5')) + callback(new Error('最多一位小数')) } else { if (value.split('.')[1] !== '0' && value.split('.')[1] !== '5') { callback(new Error('只能是整数或整数加减0.5的值')) diff --git a/src/views/memberManage/listStaff.vue b/src/views/memberManage/listStaff.vue index 62809ed..65cfd72 100644 --- a/src/views/memberManage/listStaff.vue +++ b/src/views/memberManage/listStaff.vue @@ -31,6 +31,20 @@
数据列表
+ 初始化剩余年假 + + + 批量导入 + + 导出记录 删除 新增 @@ -42,10 +56,10 @@ - +