From 1a58c36d56383bc20affc3627e497390fef907ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B5=A9=E7=8E=AE?= Date: Mon, 28 Jun 2021 14:59:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B2=97=E4=BD=8D=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/organization.js | 26 ++++++++++ .../jobmanagement/JobManagement.vue | 45 +++++++++++++++++ .../view/organization/jobmanagement/form.vue | 49 +++++++++++++++++++ .../view/organization/jobmanagement/index.js | 3 ++ src/router/config.js | 9 +++- src/utils/requestUtil.js | 5 ++ 6 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 src/api/organization.js create mode 100644 src/pages/system/view/organization/jobmanagement/JobManagement.vue create mode 100644 src/pages/system/view/organization/jobmanagement/form.vue create mode 100644 src/pages/system/view/organization/jobmanagement/index.js diff --git a/src/api/organization.js b/src/api/organization.js new file mode 100644 index 0000000..db07227 --- /dev/null +++ b/src/api/organization.js @@ -0,0 +1,26 @@ +import { delReq, getReq, postReq, putReq } from '@/utils'; + +// export function delMenuApi(id) { +// return delReq(`/api/v1/menus/${id}`); +// } + +// export function getMenuDataApi() { +// return getReq('/api/v1/menus'); +// } + +// export function addMenuApi(data) { +// return postReq('/api/v1/menus', data); +// } + +function addJobsApi(data) { + return postReq('/api/v1/jobs', data); +} + +function updateJobsApi(data) { + return putReq('/api/v1/jobs', data); +} + +export default { + add: addJobsApi, + update: updateJobsApi, +}; diff --git a/src/pages/system/view/organization/jobmanagement/JobManagement.vue b/src/pages/system/view/organization/jobmanagement/JobManagement.vue new file mode 100644 index 0000000..55c4e51 --- /dev/null +++ b/src/pages/system/view/organization/jobmanagement/JobManagement.vue @@ -0,0 +1,45 @@ + + \ No newline at end of file diff --git a/src/pages/system/view/organization/jobmanagement/form.vue b/src/pages/system/view/organization/jobmanagement/form.vue new file mode 100644 index 0000000..98fab55 --- /dev/null +++ b/src/pages/system/view/organization/jobmanagement/form.vue @@ -0,0 +1,49 @@ + + + diff --git a/src/pages/system/view/organization/jobmanagement/index.js b/src/pages/system/view/organization/jobmanagement/index.js new file mode 100644 index 0000000..199f40f --- /dev/null +++ b/src/pages/system/view/organization/jobmanagement/index.js @@ -0,0 +1,3 @@ +import JobManagement from './JobManagement'; + +export default JobManagement; diff --git a/src/router/config.js b/src/router/config.js index a8a15b9..0c1462f 100644 --- a/src/router/config.js +++ b/src/router/config.js @@ -73,7 +73,14 @@ const options = { { path: 'organization_management', name: '组织管理', - component: () => import('@/pages/system/view/organization'), + component: BlankTemplateView, + children: [ + { + path: 'job_management', + name: '岗位管理', + component: () => import('@/pages/system/view/organization/jobmanagement'), + }, + ], }, { path: 'user_management', diff --git a/src/utils/requestUtil.js b/src/utils/requestUtil.js index bb0ad29..db07c9e 100644 --- a/src/utils/requestUtil.js +++ b/src/utils/requestUtil.js @@ -145,6 +145,10 @@ function postReq(url, data, config) { return request(url, METHOD.POST, data, config); } +function putReq(url, data, config) { + return request(url, METHOD.PUT, data, config); +} + export { METHOD, request, @@ -156,4 +160,5 @@ export { delReq, getReq, postReq, + putReq, }; -- GitLab