Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
Starter Web Vue
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
product
kim3-web-vue
Starter Web Vue
Commits
1a58c36d
Commit
1a58c36d
authored
Jun 28, 2021
by
陈浩玮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
岗位管理
parent
7ebe2e6e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
136 additions
and
1 deletion
+136
-1
src/api/organization.js
src/api/organization.js
+26
-0
src/pages/system/view/organization/jobmanagement/JobManagement.vue
.../system/view/organization/jobmanagement/JobManagement.vue
+45
-0
src/pages/system/view/organization/jobmanagement/form.vue
src/pages/system/view/organization/jobmanagement/form.vue
+49
-0
src/pages/system/view/organization/jobmanagement/index.js
src/pages/system/view/organization/jobmanagement/index.js
+3
-0
src/router/config.js
src/router/config.js
+8
-1
src/utils/requestUtil.js
src/utils/requestUtil.js
+5
-0
No files found.
src/api/organization.js
0 → 100644
View file @
1a58c36d
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
,
};
src/pages/system/view/organization/jobmanagement/JobManagement.vue
0 → 100644
View file @
1a58c36d
<
template
>
<my-table
url=
"/api/v1/jobs"
rowKey=
"jobId"
:addBtn=
"addBtn"
ref=
"table"
>
<template
#add
>
<Form
ref=
"form"
/>
</
template
>
<
template
#search=
"{ query }"
>
<a-form-model-item
label=
"名称"
>
<a-input
v-model=
"query.jobName"
/>
</a-form-model-item>
</
template
>
<a-table-column
title=
"名称"
data-index=
"jobName"
/>
<a-table-column
title=
"描述"
data-index=
"jobDescription"
/>
<a-table-column
title=
"操作"
>
<
template
#default=
"row"
>
<a
@
click=
"() => view(row)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<PopconfirmDelete
:url=
"`/api/v1/roles/$
{row.roleId}`" :cb="refreshTable" />
</
template
>
</a-table-column>
</my-table>
</template>
<
script
>
import
Form
from
'
./form.vue
'
;
import
PopconfirmDelete
from
'
@/components/popconfirm_delete/index.vue
'
;
export
default
{
components
:
{
Form
,
PopconfirmDelete
},
data
()
{
return
{
addBtn
:
{
width
:
600
,
onOk
:
()
=>
this
.
$refs
[
'
form
'
]?.
submit
()
},
};
},
methods
:
{
refreshTable
()
{
this
.
$refs
[
'
table
'
]?.
getData
();
},
view
(
data
,
type
)
{
this
.
$refs
[
'
table
'
]?.
showAdd
();
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'
form
'
].
setData
(
data
,
type
);
});
},
},
};
</
script
>
\ No newline at end of file
src/pages/system/view/organization/jobmanagement/form.vue
0 → 100644
View file @
1a58c36d
<
template
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
>
<a-form-model-item
label=
"名称"
>
<a-input
v-model=
"form.jobName"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"描述"
>
<a-textarea
v-model=
"form.jobDescription"
:disabled=
"isView"
:rows=
"4"
/>
</a-form-model-item>
</a-form-model>
</
template
>
<
script
>
import
JobsApi
from
'
@/api/organization
'
;
export
default
{
data
()
{
return
{
type
:
0
,
form
:
{},
rules
:
{},
checkedKeys
:
[],
};
},
computed
:
{
isAdd
()
{
return
this
.
type
===
0
;
},
isEdit
()
{
return
this
.
type
===
1
;
},
isView
()
{
return
this
.
type
===
2
;
},
},
methods
:
{
submit
()
{
if
(
this
.
isEdit
)
{
return
JobsApi
.
add
({
...
this
.
form
});
}
if
(
this
.
isAdd
)
{
return
JobsApi
.
update
({
...
this
.
form
});
}
},
setData
(
data
,
type
)
{
this
.
form
=
data
;
this
.
type
=
type
;
},
},
};
</
script
>
src/pages/system/view/organization/jobmanagement/index.js
0 → 100644
View file @
1a58c36d
import
JobManagement
from
'
./JobManagement
'
;
export
default
JobManagement
;
src/router/config.js
View file @
1a58c36d
...
@@ -73,7 +73,14 @@ const options = {
...
@@ -73,7 +73,14 @@ const options = {
{
{
path
:
'
organization_management
'
,
path
:
'
organization_management
'
,
name
:
'
组织管理
'
,
name
:
'
组织管理
'
,
component
:
()
=>
import
(
'
@/pages/system/view/organization
'
),
component
:
BlankTemplateView
,
children
:
[
{
path
:
'
job_management
'
,
name
:
'
岗位管理
'
,
component
:
()
=>
import
(
'
@/pages/system/view/organization/jobmanagement
'
),
},
],
},
},
{
{
path
:
'
user_management
'
,
path
:
'
user_management
'
,
...
...
src/utils/requestUtil.js
View file @
1a58c36d
...
@@ -145,6 +145,10 @@ function postReq(url, data, config) {
...
@@ -145,6 +145,10 @@ function postReq(url, data, config) {
return
request
(
url
,
METHOD
.
POST
,
data
,
config
);
return
request
(
url
,
METHOD
.
POST
,
data
,
config
);
}
}
function
putReq
(
url
,
data
,
config
)
{
return
request
(
url
,
METHOD
.
PUT
,
data
,
config
);
}
export
{
export
{
METHOD
,
METHOD
,
request
,
request
,
...
@@ -156,4 +160,5 @@ export {
...
@@ -156,4 +160,5 @@ export {
delReq
,
delReq
,
getReq
,
getReq
,
postReq
,
postReq
,
putReq
,
};
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment