diff --git a/ruoyi-ui/src/api/base/group.js b/ruoyi-ui/src/api/base/group.js
new file mode 100644
index 000000000..666132b54
--- /dev/null
+++ b/ruoyi-ui/src/api/base/group.js
@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询考勤组管理列表
+export function listGroup(query) {
+ return request({
+ url: '/base/group/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询考勤组管理详细
+export function getGroup(id) {
+ return request({
+ url: '/base/group/' + id,
+ method: 'get'
+ })
+}
+
+// 新增考勤组管理
+export function addGroup(data) {
+ return request({
+ url: '/base/group',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改考勤组管理
+export function updateGroup(data) {
+ return request({
+ url: '/base/group',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除考勤组管理
+export function delGroup(id) {
+ return request({
+ url: '/base/group/' + id,
+ method: 'delete'
+ })
+}
+
+// 导出考勤组管理
+export function exportGroup(query) {
+ return request({
+ url: '/base/group/export',
+ method: 'get',
+ params: query
+ })
+}
\ No newline at end of file
diff --git a/ruoyi-ui/src/api/base/record.js b/ruoyi-ui/src/api/base/record.js
new file mode 100644
index 000000000..bfa766dc3
--- /dev/null
+++ b/ruoyi-ui/src/api/base/record.js
@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询考勤记录列表
+export function listRecord(query) {
+ return request({
+ url: '/base/record/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询考勤记录详细
+export function getRecord(id) {
+ return request({
+ url: '/base/record/' + id,
+ method: 'get'
+ })
+}
+
+// 新增考勤记录
+export function addRecord(data) {
+ return request({
+ url: '/base/record',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改考勤记录
+export function updateRecord(data) {
+ return request({
+ url: '/base/record',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除考勤记录
+export function delRecord(id) {
+ return request({
+ url: '/base/record/' + id,
+ method: 'delete'
+ })
+}
+
+// 导出考勤记录
+export function exportRecord(query) {
+ return request({
+ url: '/base/record/export',
+ method: 'get',
+ params: query
+ })
+}
\ No newline at end of file
diff --git a/ruoyi-ui/src/api/system/user.js b/ruoyi-ui/src/api/system/user.js
index 7f8db39ee..c654c5c9a 100644
--- a/ruoyi-ui/src/api/system/user.js
+++ b/ruoyi-ui/src/api/system/user.js
@@ -1,127 +1,135 @@
-import request from '@/utils/request'
-import { praseStrEmpty } from "@/utils/ruoyi";
-
-// 查询用户列表
-export function listUser(query) {
- return request({
- url: '/system/user/list',
- method: 'get',
- params: query
- })
-}
-
-// 查询用户详细
-export function getUser(userId) {
- return request({
- url: '/system/user/' + praseStrEmpty(userId),
- method: 'get'
- })
-}
-
-// 新增用户
-export function addUser(data) {
- return request({
- url: '/system/user',
- method: 'post',
- data: data
- })
-}
-
-// 修改用户
-export function updateUser(data) {
- return request({
- url: '/system/user',
- method: 'put',
- data: data
- })
-}
-
-// 删除用户
-export function delUser(userId) {
- return request({
- url: '/system/user/' + userId,
- method: 'delete'
- })
-}
-
-// 导出用户
-export function exportUser(query) {
- return request({
- url: '/system/user/export',
- method: 'get',
- params: query
- })
-}
-
-// 用户密码重置
-export function resetUserPwd(userId, password) {
- const data = {
- userId,
- password
- }
- return request({
- url: '/system/user/resetPwd',
- method: 'put',
- data: data
- })
-}
-
-// 用户状态修改
-export function changeUserStatus(userId, status) {
- const data = {
- userId,
- status
- }
- return request({
- url: '/system/user/changeStatus',
- method: 'put',
- data: data
- })
-}
-
-// 查询用户个人信息
-export function getUserProfile() {
- return request({
- url: '/system/user/profile',
- method: 'get'
- })
-}
-
-// 修改用户个人信息
-export function updateUserProfile(data) {
- return request({
- url: '/system/user/profile',
- method: 'put',
- data: data
- })
-}
-
-// 用户密码重置
-export function updateUserPwd(oldPassword, newPassword) {
- const data = {
- oldPassword,
- newPassword
- }
- return request({
- url: '/system/user/profile/updatePwd',
- method: 'put',
- params: data
- })
-}
-
-// 用户头像上传
-export function uploadAvatar(data) {
- return request({
- url: '/system/user/profile/avatar',
- method: 'post',
- data: data
- })
-}
-
-// 下载用户导入模板
-export function importTemplate() {
- return request({
- url: '/system/user/importTemplate',
- method: 'get'
- })
-}
+import request from '@/utils/request'
+import { praseStrEmpty } from "@/utils/ruoyi";
+
+// 查询用户列表
+export function listUser(query) {
+ return request({
+ url: '/system/user/list',
+ method: 'get',
+ params: query
+ })
+}
+
+// 查询用户详细
+export function getUser(userId) {
+ return request({
+ url: '/system/user/' + praseStrEmpty(userId),
+ method: 'get'
+ })
+}
+
+// 新增用户
+export function addUser(data) {
+ return request({
+ url: '/system/user',
+ method: 'post',
+ data: data
+ })
+}
+
+// 修改用户
+export function updateUser(data) {
+ return request({
+ url: '/system/user',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除用户
+export function delUser(userId) {
+ return request({
+ url: '/system/user/' + userId,
+ method: 'delete'
+ })
+}
+
+// 导出用户
+export function exportUser(query) {
+ return request({
+ url: '/system/user/export',
+ method: 'get',
+ params: query
+ })
+}
+
+// 用户密码重置
+export function resetUserPwd(userId, password) {
+ const data = {
+ userId,
+ password
+ }
+ return request({
+ url: '/system/user/resetPwd',
+ method: 'put',
+ data: data
+ })
+}
+
+// 用户状态修改
+export function changeUserStatus(userId, status) {
+ const data = {
+ userId,
+ status
+ }
+ return request({
+ url: '/system/user/changeStatus',
+ method: 'put',
+ data: data
+ })
+}
+
+// 查询用户个人信息
+export function getUserProfile() {
+ return request({
+ url: '/system/user/profile',
+ method: 'get'
+ })
+}
+
+// 修改用户个人信息
+export function updateUserProfile(data) {
+ return request({
+ url: '/system/user/profile',
+ method: 'put',
+ data: data
+ })
+}
+
+// 用户密码重置
+export function updateUserPwd(oldPassword, newPassword) {
+ const data = {
+ oldPassword,
+ newPassword
+ }
+ return request({
+ url: '/system/user/profile/updatePwd',
+ method: 'put',
+ params: data
+ })
+}
+
+// 用户头像上传
+export function uploadAvatar(data) {
+ return request({
+ url: '/system/user/profile/avatar',
+ method: 'post',
+ data: data
+ })
+}
+
+// 下载用户导入模板
+export function importTemplate() {
+ return request({
+ url: '/system/user/importTemplate',
+ method: 'get'
+ })
+}
+
+// 查询用户
+export function userSelect() {
+ return request({
+ url: '/system/user/userSelect',
+ method: 'get'
+ })
+}
diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js
index fbd3d6d31..f3d3de881 100644
--- a/ruoyi-ui/src/main.js
+++ b/ruoyi-ui/src/main.js
@@ -1,70 +1,100 @@
-import Vue from 'vue'
-
-import Cookies from 'js-cookie'
-
-import 'normalize.css/normalize.css' // a modern alternative to CSS resets
-
-import Element from 'element-ui'
-import './assets/styles/element-variables.scss'
-
-import '@/assets/styles/index.scss' // global css
-import '@/assets/styles/ruoyi.scss' // ruoyi css
-import App from './App'
-import store from './store'
-import router from './router'
-import permission from './directive/permission'
-
-import './assets/icons' // icon
-import './permission' // permission control
-import { getDicts } from "@/api/system/dict/data";
-import { getConfigKey } from "@/api/system/config";
-import { parseTime, resetForm, addDateRange, selectDictLabel, download } from "@/utils/ruoyi";
-import Pagination from "@/components/Pagination";
-
-// 全局方法挂载
-Vue.prototype.getDicts = getDicts
-Vue.prototype.getConfigKey = getConfigKey
-Vue.prototype.parseTime = parseTime
-Vue.prototype.resetForm = resetForm
-Vue.prototype.addDateRange = addDateRange
-Vue.prototype.selectDictLabel = selectDictLabel
-Vue.prototype.download = download
-
-Vue.prototype.msgSuccess = function (msg) {
- this.$message({ showClose: true, message: msg, type: "success" });
-}
-
-Vue.prototype.msgError = function (msg) {
- this.$message({ showClose: true, message: msg, type: "error" });
-}
-
-Vue.prototype.msgInfo = function (msg) {
- this.$message.info(msg);
-}
-
-// 全局组件挂载
-Vue.component('Pagination', Pagination)
-
-Vue.use(permission)
-
-/**
- * If you don't want to use mock-server
- * you want to use MockJs for mock api
- * you can execute: mockXHR()
- *
- * Currently MockJs will be used in the production environment,
- * please remove it before going online! ! !
- */
-
-Vue.use(Element, {
- size: Cookies.get('size') || 'medium' // set element-ui default size
-})
-
-Vue.config.productionTip = false
-
-new Vue({
- el: '#app',
- router,
- store,
- render: h => h(App)
-})
+import Vue from 'vue'
+
+import Cookies from 'js-cookie'
+
+import 'normalize.css/normalize.css' // a modern alternative to CSS resets
+
+import Element from 'element-ui'
+import './assets/styles/element-variables.scss'
+
+import '@/assets/styles/index.scss' // global css
+import '@/assets/styles/ruoyi.scss' // ruoyi css
+import App from './App'
+import store from './store'
+import router from './router'
+import permission from './directive/permission'
+
+import './assets/icons' // icon
+import './permission' // permission control
+import { getDicts } from "@/api/system/dict/data";
+import { getConfigKey } from "@/api/system/config";
+import { parseTime, resetForm, addDateRange, selectDictLabel, download } from "@/utils/ruoyi";
+import Pagination from "@/components/Pagination";
+
+// 全局方法挂载
+Vue.prototype.getDicts = getDicts
+Vue.prototype.getConfigKey = getConfigKey
+Vue.prototype.parseTime = parseTime
+Vue.prototype.resetForm = resetForm
+Vue.prototype.addDateRange = addDateRange
+Vue.prototype.selectDictLabel = selectDictLabel
+Vue.prototype.download = download
+
+Vue.prototype.msgSuccess = function (msg) {
+ this.$message({ showClose: true, message: msg, type: "success" });
+}
+
+Vue.prototype.msgError = function (msg) {
+ this.$message({ showClose: true, message: msg, type: "error" });
+}
+
+Vue.prototype.msgInfo = function (msg) {
+ this.$message.info(msg);
+}
+
+// 全局组件挂载
+Vue.component('Pagination', Pagination)
+
+Vue.use(permission)
+
+
+function formatDateByDate(date, fmt) {
+ date = new Date(date);
+ if (typeof(fmt) === "undefined") {
+ fmt = "yyyy-MM-dd HH:mm:ss";
+ }
+ if (/(y+)/.test(fmt)) {
+ fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
+ }
+ let o = {
+ 'M+': date.getMonth() + 1,
+ 'd+': date.getDate(),
+ 'H+': date.getHours(),
+ 'm+': date.getMinutes(),
+ 's+': date.getSeconds()
+ }
+ for (let k in o) {
+ if (new RegExp(`(${k})`).test(fmt)) {
+ let str = o[k] + ''
+ fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? str : ('00' + str).substr(str.length));
+ }
+ }
+ return fmt
+};
+
+//定义一个时间过滤器
+Vue.filter("FormatDateByDate", function(date, fmt) {
+ return formatDateByDate(date, fmt);
+});
+
+/**
+ * If you don't want to use mock-server
+ * you want to use MockJs for mock api
+ * you can execute: mockXHR()
+ *
+ * Currently MockJs will be used in the production environment,
+ * please remove it before going online! ! !
+ */
+
+Vue.use(Element, {
+ size: Cookies.get('size') || 'medium' // set element-ui default size
+})
+
+Vue.config.productionTip = false
+
+new Vue({
+ el: '#app',
+ router,
+ store,
+ render: h => h(App)
+})
diff --git a/ruoyi-ui/src/views/base/group/index.vue b/ruoyi-ui/src/views/base/group/index.vue
new file mode 100644
index 000000000..03a4e98a9
--- /dev/null
+++ b/ruoyi-ui/src/views/base/group/index.vue
@@ -0,0 +1,443 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+ 修改
+
+
+ 删除
+
+
+ 导出
+
+
+
+
+
+
+ {{scope.$index + 1}}
+
+
+
+
+
+
+
+
+
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ruoyi-ui/src/views/base/record/index.vue b/ruoyi-ui/src/views/base/record/index.vue
new file mode 100644
index 000000000..0f32ed2b7
--- /dev/null
+++ b/ruoyi-ui/src/views/base/record/index.vue
@@ -0,0 +1,524 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+
+ 修改
+
+
+
+ 删除
+
+
+
+ 导出
+
+
+
+
+
+
+
+ {{scope.$index + 1}}
+
+
+
+
+
+
+
+
+
+ {{ scope.row.workDate | formatDateByDate('yyyy-MM-dd') }}
+
+
+
+
+
+ {{ scope.row.punchDate | formatDateByDate('yyyy-MM-dd') }}
+
+
+
+
+
+
+
+ {{ scope.row.punchTime | formatDateByDate('HH:mm:ss') }}
+
+
+
+
+
+
+
+
+ 修改
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index eeebe16ac..ab5512e9d 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -20,7 +20,6 @@
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
- :default-expand-all="isExpand"
@node-click="handleNodeClick"
/>
@@ -135,8 +134,8 @@
-
-
+
+
@@ -202,8 +201,8 @@
-
-
+
+
@@ -222,8 +221,8 @@
-
-
+
+
@@ -281,6 +280,18 @@
+
+
+
+
+
+
+
@@ -371,6 +382,8 @@ export default {
postOptions: [],
// 角色选项
roleOptions: [],
+ // 考勤组选项
+ groupOptions: [],
// 表单参数
form: {},
defaultProps: {
@@ -404,10 +417,10 @@ export default {
// 表单校验
rules: {
userName: [
- { required: true, message: "用户名称不能为空", trigger: "blur" }
+ { required: true, message: "用户账号不能为空", trigger: "blur" }
],
nickName: [
- { required: true, message: "用户昵称不能为空", trigger: "blur" }
+ { required: true, message: "用户姓名不能为空", trigger: "blur" }
],
deptId: [
{ required: true, message: "归属部门不能为空", trigger: "blur" }
@@ -503,6 +516,7 @@ export default {
this.form = {
userId: undefined,
deptId: undefined,
+ groupId: undefined,
userName: undefined,
nickName: undefined,
password: undefined,
@@ -540,6 +554,7 @@ export default {
getUser().then(response => {
this.postOptions = response.posts;
this.roleOptions = response.roles;
+ this.groupOptions = response.groups;
this.open = true;
this.title = "添加用户";
this.form.password = this.initPassword;
@@ -554,6 +569,7 @@ export default {
this.form = response.data;
this.postOptions = response.posts;
this.roleOptions = response.roles;
+ this.groupOptions = response.groups;
this.form.postIds = response.postIds;
this.form.roleIds = response.roleIds;
this.open = true;
diff --git a/ruoyi-ui/src/views/system/user/profile/userInfo.vue b/ruoyi-ui/src/views/system/user/profile/userInfo.vue
index 2e8ef99d9..833df1bcd 100644
--- a/ruoyi-ui/src/views/system/user/profile/userInfo.vue
+++ b/ruoyi-ui/src/views/system/user/profile/userInfo.vue
@@ -1,80 +1,80 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- 男
- 女
-
-
-
- 保存
- 关闭
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 男
+ 女
+
+
+
+ 保存
+ 关闭
+
+
+
+
+