From 64cd8cce4d080dc897bdc270313275fdee3652bb Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 16 Jul 2020 12:03:07 +0800 Subject: [PATCH] employee ability education qualification complete --- client/src/api/ability.js | 16 +- client/src/api/education.js | 16 +- client/src/api/employee.js | 7 + client/src/api/qualification.js | 16 +- client/src/router/index.js | 8 +- client/src/utils/index.js | 3 - client/src/views/ability/ability.vue | 185 ++++++++++++ client/src/views/ability/abilityform.vue | 263 ++++++++++++++++ client/src/views/education/education.vue | 149 +++++++++ client/src/views/education/educationform.vue | 129 ++++++++ client/src/views/employee/employee.vue | 2 +- .../views/employee/employeedetailupdate.vue | 282 ++++++++++++++++++ client/src/views/employee/employeeupdate.vue | 126 ++------ client/src/views/employee/qualification.vue | 168 ----------- .../src/views/implementrule/implementrule.vue | 25 +- .../implementrule/implementrulecreate.vue | 12 +- .../implementrule/implementruleupdate.vue | 12 +- .../src/views/qualification/qualification.vue | 205 +++++++++++++ .../views/qualification/qualificationform.vue | 161 ++++++++++ client/src/views/system/dict.vue | 15 +- server/apps/certset/serializers.py | 4 +- server/apps/certset/views.py | 2 +- .../migrations/0005_auto_20200713_1143.py | 18 ++ .../migrations/0006_auto_20200713_1639.py | 23 ++ .../migrations/0007_auto_20200713_1644.py | 23 ++ .../migrations/0008_auto_20200713_1741.py | 21 ++ .../migrations/0009_auto_20200715_0924.py | 34 +++ .../0010_delete_historicalability.py | 16 + .../migrations/0011_auto_20200715_1648.py | 23 ++ .../migrations/0012_auto_20200716_1200.py | 18 ++ server/apps/employee/models.py | 20 +- server/apps/employee/serializers.py | 50 +++- server/apps/employee/views.py | 12 +- .../migrations/0023_auto_20200715_1608.py | 23 ++ .../migrations/0024_auto_20200716_0927.py | 27 ++ server/apps/system/models.py | 11 +- server/apps/system/permission_data.py | 2 +- server/apps/system/serializers.py | 10 +- server/apps/system/views.py | 11 +- 39 files changed, 1795 insertions(+), 353 deletions(-) create mode 100644 client/src/views/ability/ability.vue create mode 100644 client/src/views/ability/abilityform.vue create mode 100644 client/src/views/education/education.vue create mode 100644 client/src/views/education/educationform.vue create mode 100644 client/src/views/employee/employeedetailupdate.vue delete mode 100644 client/src/views/employee/qualification.vue create mode 100644 client/src/views/qualification/qualification.vue create mode 100644 client/src/views/qualification/qualificationform.vue create mode 100644 server/apps/employee/migrations/0005_auto_20200713_1143.py create mode 100644 server/apps/employee/migrations/0006_auto_20200713_1639.py create mode 100644 server/apps/employee/migrations/0007_auto_20200713_1644.py create mode 100644 server/apps/employee/migrations/0008_auto_20200713_1741.py create mode 100644 server/apps/employee/migrations/0009_auto_20200715_0924.py create mode 100644 server/apps/employee/migrations/0010_delete_historicalability.py create mode 100644 server/apps/employee/migrations/0011_auto_20200715_1648.py create mode 100644 server/apps/employee/migrations/0012_auto_20200716_1200.py create mode 100644 server/apps/system/migrations/0023_auto_20200715_1608.py create mode 100644 server/apps/system/migrations/0024_auto_20200716_0927.py diff --git a/client/src/api/ability.js b/client/src/api/ability.js index 13becc6..f573ae5 100644 --- a/client/src/api/ability.js +++ b/client/src/api/ability.js @@ -1,32 +1,32 @@ import request from '@/utils/request' -export function getUserDetailList(query) { +export function getAbilityList(query) { return request({ - url: '/employee/userdetail/', + url: '/employee/ability/', method: 'get', params: query }) } -export function createUserDetail(data) { +export function createAbility(data) { return request({ - url: '/employee/userdetail/', + url: '/employee/ability/', method: 'post', data }) } -export function updateUserDetail(id, data) { +export function updateAbility(id, data) { return request({ - url: `/employee/userdetail/${id}/`, + url: `/employee/ability/${id}/`, method: 'put', data }) } -export function deleteUserDetail(id) { +export function deleteAbility(id) { return request({ - url: `/employee/userdetail/${id}/`, + url: `/employee/ability/${id}/`, method: 'delete' }) } \ No newline at end of file diff --git a/client/src/api/education.js b/client/src/api/education.js index 13becc6..d32e131 100644 --- a/client/src/api/education.js +++ b/client/src/api/education.js @@ -1,32 +1,32 @@ import request from '@/utils/request' -export function getUserDetailList(query) { +export function getEducationList(query) { return request({ - url: '/employee/userdetail/', + url: '/employee/education/', method: 'get', params: query }) } -export function createUserDetail(data) { +export function createEducation(data) { return request({ - url: '/employee/userdetail/', + url: '/employee/education/', method: 'post', data }) } -export function updateUserDetail(id, data) { +export function updateEducation(id, data) { return request({ - url: `/employee/userdetail/${id}/`, + url: `/employee/education/${id}/`, method: 'put', data }) } -export function deleteUserDetail(id) { +export function deleteEducation(id) { return request({ - url: `/employee/userdetail/${id}/`, + url: `/employee/education/${id}/`, method: 'delete' }) } \ No newline at end of file diff --git a/client/src/api/employee.js b/client/src/api/employee.js index 32a3920..6271453 100644 --- a/client/src/api/employee.js +++ b/client/src/api/employee.js @@ -15,6 +15,13 @@ export function createEmployee(data) { data }) } +export function getEmployee(id, data) { + return request({ + url: `/employee/employee/${id}/`, + method: 'get', + data + }) +} export function updateEmployee(id, data) { return request({ diff --git a/client/src/api/qualification.js b/client/src/api/qualification.js index 13becc6..44b6cd9 100644 --- a/client/src/api/qualification.js +++ b/client/src/api/qualification.js @@ -1,32 +1,32 @@ import request from '@/utils/request' -export function getUserDetailList(query) { +export function getQualificationList(query) { return request({ - url: '/employee/userdetail/', + url: '/employee/qualification/', method: 'get', params: query }) } -export function createUserDetail(data) { +export function createQualification(data) { return request({ - url: '/employee/userdetail/', + url: '/employee/qualification/', method: 'post', data }) } -export function updateUserDetail(id, data) { +export function updateQualification(id, data) { return request({ - url: `/employee/userdetail/${id}/`, + url: `/employee/qualification/${id}/`, method: 'put', data }) } -export function deleteUserDetail(id) { +export function deleteQualification(id) { return request({ - url: `/employee/userdetail/${id}/`, + url: `/employee/qualification/${id}/`, method: 'delete' }) } \ No newline at end of file diff --git a/client/src/router/index.js b/client/src/router/index.js index f10f0fc..37a62d2 100644 --- a/client/src/router/index.js +++ b/client/src/router/index.js @@ -72,10 +72,10 @@ export const asyncRoutes = [ path: 'employee', name: 'Employee', component: () => import('@/views/employee/employee'), - meta: { title: '人员信息', icon: 'example', perms: ['employee_manage'] } + meta: { title: '人员信息', icon: 'example', perms: ['employee_view'] } }, { - path: 'employee/update', + path: 'employee/update/:id', name: 'EmployeeUpdate', component: () => import('@/views/employee/employeeupdate'), meta: { title: '人员信息变更', icon: 'example', perms: ['employee_update'] }, @@ -84,8 +84,8 @@ export const asyncRoutes = [ { path: 'qualification', name: 'Qualification', - component: () => import('@/views/employee/qualification'), - meta: { title: '注册资格', icon: 'example', perms: ['qualification_manage'] } + component: () => import('@/views/qualification/qualification'), + meta: { title: '注册资格', icon: 'example', perms: ['qualification_view'] } }, ] }, diff --git a/client/src/utils/index.js b/client/src/utils/index.js index 722c202..5c35ba4 100644 --- a/client/src/utils/index.js +++ b/client/src/utils/index.js @@ -357,9 +357,6 @@ export function genTree(data) { const map = {} data.forEach(item => { item.label = item.name - if(item.fullname){ - item.label = item.fullname - } item.value = item.id map[item.id] = item }) diff --git a/client/src/views/ability/ability.vue b/client/src/views/ability/ability.vue new file mode 100644 index 0000000..0d0c123 --- /dev/null +++ b/client/src/views/ability/ability.vue @@ -0,0 +1,185 @@ + + diff --git a/client/src/views/ability/abilityform.vue b/client/src/views/ability/abilityform.vue new file mode 100644 index 0000000..81b070a --- /dev/null +++ b/client/src/views/ability/abilityform.vue @@ -0,0 +1,263 @@ + + \ No newline at end of file diff --git a/client/src/views/education/education.vue b/client/src/views/education/education.vue new file mode 100644 index 0000000..c84f032 --- /dev/null +++ b/client/src/views/education/education.vue @@ -0,0 +1,149 @@ + + diff --git a/client/src/views/education/educationform.vue b/client/src/views/education/educationform.vue new file mode 100644 index 0000000..c340249 --- /dev/null +++ b/client/src/views/education/educationform.vue @@ -0,0 +1,129 @@ + + \ No newline at end of file diff --git a/client/src/views/employee/employee.vue b/client/src/views/employee/employee.vue index fb176f6..855ae47 100644 --- a/client/src/views/employee/employee.vue +++ b/client/src/views/employee/employee.vue @@ -155,7 +155,7 @@ export default { // this.$router.push({path:"/certset/implementrule/create"}) // }, handleUpdate(scope) { - this.$router.push({path:"/employee/employee/update",query:{id:scope.row.id}}) + this.$router.push({name:"EmployeeUpdate",params:{id:scope.row.id}}) }, handleDelete(scope) { deleteEmployee(scope.row.id).then(res=>{ diff --git a/client/src/views/employee/employeedetailupdate.vue b/client/src/views/employee/employeedetailupdate.vue new file mode 100644 index 0000000..26a3a29 --- /dev/null +++ b/client/src/views/employee/employeedetailupdate.vue @@ -0,0 +1,282 @@ + + + \ No newline at end of file diff --git a/client/src/views/employee/employeeupdate.vue b/client/src/views/employee/employeeupdate.vue index 1bf387d..469fc37 100644 --- a/client/src/views/employee/employeeupdate.vue +++ b/client/src/views/employee/employeeupdate.vue @@ -1,109 +1,45 @@ \ No newline at end of file diff --git a/client/src/views/employee/qualification.vue b/client/src/views/employee/qualification.vue deleted file mode 100644 index cf5e3a0..0000000 --- a/client/src/views/employee/qualification.vue +++ /dev/null @@ -1,168 +0,0 @@ - - diff --git a/client/src/views/implementrule/implementrule.vue b/client/src/views/implementrule/implementrule.vue index cf5e3a0..4202794 100644 --- a/client/src/views/implementrule/implementrule.vue +++ b/client/src/views/implementrule/implementrule.vue @@ -52,27 +52,34 @@ max-height="600" > - + - + - - + + - - + + - - + + - +