diff --git a/hb_client/src/api/employee.js b/hb_client/src/api/employee.js
index 16ba451..9823969 100644
--- a/hb_client/src/api/employee.js
+++ b/hb_client/src/api/employee.js
@@ -1,6 +1,12 @@
import request from '@/utils/request'
-
+export function getEmployeeList(query) {
+ return request({
+ url: '/hrm/employee/',
+ method: 'get',
+ params: query
+ })
+}
export function getEmployee(id) {
return request({
url: `/hrm/employee/${id}/`,
diff --git a/hb_client/src/router/index.js b/hb_client/src/router/index.js
index 73cade3..29004a4 100644
--- a/hb_client/src/router/index.js
+++ b/hb_client/src/router/index.js
@@ -403,6 +403,36 @@ export const asyncRoutes = [
]
},
+
+ {
+ path: '/personnel',
+ component: Layout,
+ redirect: '/personnel/user',
+ name: 'personnel',
+ meta: { title: '人员管理', icon: 'example', perms: ['personnel_set'] },
+ children: [
+ {
+ path: 'user',
+ name: 'user',
+ component: () => import('@/views/personnel/user'),
+ meta: { title: '人员列表', icon: 'example', perms: ['user_manage'] }
+ },
+ {
+ path: 'personnel',
+ name: 'personnel',
+ component: () => import('@/views/personnel/user'),
+ meta: { title: '考勤列表', icon: 'example', perms: ['user_manage'] }
+ } ,{
+ path: 'userupdate',
+ name: 'userupdate',
+ component: () => import('@/views/personnel/userupdate'),
+ meta: { title: '人员信息详情', icon: 'employee', perms: ['employee_detail'] },
+ hidden: true
+ },
+
+ ]
+ }
+ ,
{
path: '/inm',
component: Layout,
@@ -544,13 +574,7 @@ export const asyncRoutes = [
meta: { title: '用户管理', icon: 'user', perms: ['user_manage'] }
}
,
- {
- path: 'userupdate',
- name: 'userupdate',
- component: () => import('@/views/system/userupdate'),
- meta: { title: '人员信息详情', icon: 'employee', perms: ['employee_detail'] },
- hidden: true
- },
+
{
path: 'organization',
name: 'Organization',
diff --git a/hb_client/src/views/personnel/user.vue b/hb_client/src/views/personnel/user.vue
new file mode 100644
index 0000000..8af611c
--- /dev/null
+++ b/hb_client/src/views/personnel/user.vue
@@ -0,0 +1,263 @@
+
+
+
+
+
+ 用户
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ {{ scope.row.number }}
+
+
+ {{ scope.row.name }}
+
+
+
+
+
+
+
+
+ {{ scope.row.dept_.name }}
+
+
+
+
+ 编辑
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/hb_client/src/views/personnel/userupdate.vue b/hb_client/src/views/personnel/userupdate.vue
new file mode 100644
index 0000000..bba0d14
--- /dev/null
+++ b/hb_client/src/views/personnel/userupdate.vue
@@ -0,0 +1,283 @@
+
+
+
+
+
+ 基础信息
+
+ {{userDate.name}}
+ {{userDate.username}}
+
+
+ {{item}}
+
+ {{userDate.phone}}
+
+
+
+ 详细信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 返回
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hb_client/src/views/system/user.vue b/hb_client/src/views/system/user.vue
index af18416..84d08fa 100644
--- a/hb_client/src/views/system/user.vue
+++ b/hb_client/src/views/system/user.vue
@@ -130,7 +130,7 @@
-
+
@@ -320,7 +320,13 @@ export default {
});
},
handleEdit(scope) {
- this.$router.push({name:"userupdate",params:{id:scope.row.employee_user}})
+ this.user = Object.assign({}, scope.row); // copy obj
+
+ this.dialogType = "update";
+ this.dialogVisible = true;
+ this.$nextTick(() => {
+ this.$refs["Form"].clearValidate();
+ });
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
@@ -343,7 +349,7 @@ export default {
async confirm(form) {
this.$refs[form].validate(valid => {
if (valid) {
- const isEdit = this.dialogType === "edit";
+ const isEdit = this.dialogType === "update";
if (isEdit) {
updateUser(this.user.id, this.user).then(res => {
this.getList();