diff --git a/src/api/staff.js b/src/api/staff.js index c93eb7d..5d07c63 100644 --- a/src/api/staff.js +++ b/src/api/staff.js @@ -51,3 +51,11 @@ data }) } + +export function editPerson(data) { + return request({ + url: 'staff/update', + method: 'post', + data + }) +} diff --git a/src/api/staff.js b/src/api/staff.js index c93eb7d..5d07c63 100644 --- a/src/api/staff.js +++ b/src/api/staff.js @@ -51,3 +51,11 @@ data }) } + +export function editPerson(data) { + return request({ + url: 'staff/update', + method: 'post', + data + }) +} diff --git a/src/router/index.js b/src/router/index.js index 962bef4..819c610 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -12,6 +12,7 @@ import { deviceRouters } from './modules/device' import { staffRouters } from './modules/staff' import { carRouters } from './modules/car' +import { visitorRouters } from './modules/visitor' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) * alwaysShow: true if set true, will always show the root menu, whatever its child routes length @@ -74,6 +75,7 @@ ...deviceRouters, ...staffRouters, ...carRouters, + ...visitorRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/api/staff.js b/src/api/staff.js index c93eb7d..5d07c63 100644 --- a/src/api/staff.js +++ b/src/api/staff.js @@ -51,3 +51,11 @@ data }) } + +export function editPerson(data) { + return request({ + url: 'staff/update', + method: 'post', + data + }) +} diff --git a/src/router/index.js b/src/router/index.js index 962bef4..819c610 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -12,6 +12,7 @@ import { deviceRouters } from './modules/device' import { staffRouters } from './modules/staff' import { carRouters } from './modules/car' +import { visitorRouters } from './modules/visitor' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) * alwaysShow: true if set true, will always show the root menu, whatever its child routes length @@ -74,6 +75,7 @@ ...deviceRouters, ...staffRouters, ...carRouters, + ...visitorRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/staff.js b/src/router/modules/staff.js index 173ccf5..e25e841 100644 --- a/src/router/modules/staff.js +++ b/src/router/modules/staff.js @@ -16,17 +16,23 @@ }, children: [ { + path: '/staff/add', + name: 'StaffAdd', + component: () => import('@/views/staff/staffAdd'), + meta: { title: '人员登记', icon: '', permission: ['/staff/add'], keepAlive: true } + }, + { path: '/staff/list', name: 'StaffList', component: () => import('@/views/staff/staffList'), meta: { title: '人员列表', icon: '', permission: ['/staff/list'], keepAlive: true } }, { - path: '/staff/add', - name: 'StaffAdd', + path: '/staff/edit', + name: 'StaffEdit', + component: () => import('@/views/staff/staffEdit'), hidden: true, - component: () => import('@/views/staff/staffAdd'), - meta: { title: '人员登记', icon: '', permission: ['/staff/add'], keepAlive: true } + meta: { title: '人员编辑', icon: '', permission: ['/staff/edit'], keepAlive: true } } ] } diff --git a/src/api/staff.js b/src/api/staff.js index c93eb7d..5d07c63 100644 --- a/src/api/staff.js +++ b/src/api/staff.js @@ -51,3 +51,11 @@ data }) } + +export function editPerson(data) { + return request({ + url: 'staff/update', + method: 'post', + data + }) +} diff --git a/src/router/index.js b/src/router/index.js index 962bef4..819c610 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -12,6 +12,7 @@ import { deviceRouters } from './modules/device' import { staffRouters } from './modules/staff' import { carRouters } from './modules/car' +import { visitorRouters } from './modules/visitor' /** * hidden: true if `hidden:true` will not show in the sidebar(default is false) * alwaysShow: true if set true, will always show the root menu, whatever its child routes length @@ -74,6 +75,7 @@ ...deviceRouters, ...staffRouters, ...carRouters, + ...visitorRouters, ...systemRouters, { path: '*', redirect: '/404', hidden: true } ] diff --git a/src/router/modules/staff.js b/src/router/modules/staff.js index 173ccf5..e25e841 100644 --- a/src/router/modules/staff.js +++ b/src/router/modules/staff.js @@ -16,17 +16,23 @@ }, children: [ { + path: '/staff/add', + name: 'StaffAdd', + component: () => import('@/views/staff/staffAdd'), + meta: { title: '人员登记', icon: '', permission: ['/staff/add'], keepAlive: true } + }, + { path: '/staff/list', name: 'StaffList', component: () => import('@/views/staff/staffList'), meta: { title: '人员列表', icon: '', permission: ['/staff/list'], keepAlive: true } }, { - path: '/staff/add', - name: 'StaffAdd', + path: '/staff/edit', + name: 'StaffEdit', + component: () => import('@/views/staff/staffEdit'), hidden: true, - component: () => import('@/views/staff/staffAdd'), - meta: { title: '人员登记', icon: '', permission: ['/staff/add'], keepAlive: true } + meta: { title: '人员编辑', icon: '', permission: ['/staff/edit'], keepAlive: true } } ] } diff --git a/src/views/staff/captureIris.vue b/src/views/staff/captureIris.vue index 042238c..e2c06dd 100644 --- a/src/views/staff/captureIris.vue +++ b/src/views/staff/captureIris.vue @@ -1,6 +1,6 @@