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
60ab4acc
Commit
60ab4acc
authored
Jul 01, 2021
by
陈浩玮
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/chw' into 'master'
Feature/chw See merge request product/kim3-web-vue/starter-web-vue!19
parents
e133766b
eea69e87
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
53 deletions
+65
-53
src/components/table/drawer.vue
src/components/table/drawer.vue
+17
-13
src/components/table/index.vue
src/components/table/index.vue
+1
-1
src/pages/system/view/organization/usermanagement/User.vue
src/pages/system/view/organization/usermanagement/User.vue
+31
-31
src/pages/system/view/organization/usermanagement/form.vue
src/pages/system/view/organization/usermanagement/form.vue
+16
-8
No files found.
src/components/table/drawer.vue
View file @
60ab4acc
<
template
>
<a-drawer
placement=
"right"
:visible=
"v
isibl
e"
:visible=
"v
alu
e"
:drawerStyle=
"drawerStyle"
:bodyStyle=
"bodyStyle"
destroyOnClose
:width=
"600"
v-bind=
"$attrs"
v-on=
"$listeners"
@
close=
"onClose"
>
<div
class=
"tw-overflow-y-hidden"
>
<div
class=
"tw-overflow-y-hidden
tw-flex-1
"
>
<div
class=
"tw-overflow-y-auto tw-h-full"
>
<slot
/>
</div>
</div>
<template>
<a-divider
/>
<a-space>
<a-space
class=
"tw-justify-end"
>
<a-button
@
click=
"cancel"
>
取消
</a-button>
<slot
name=
"footer"
>
<a-button
@
click=
"cancel"
>
取消
</a-button>
<a-button
type=
"primary"
@
click=
"ok"
:loading=
"loading"
>
确认
</a-button>
</slot>
</a-space>
...
...
@@ -29,10 +32,14 @@ export default {
props
:
{
oncancel
:
Function
,
onok
:
Function
,
value
:
Boolean
,
},
model
:
{
prop
:
'
value
'
,
event
:
'
change
'
,
},
data
()
{
return
{
visiable
:
false
,
loading
:
false
,
drawerStyle
:
{
display
:
'
flex
'
,
...
...
@@ -48,21 +55,18 @@ export default {
};
},
methods
:
{
show
()
{
this
.
visiable
=
true
;
},
hidden
()
{
this
.
visiable
=
false
;
},
cancel
()
{
this
.
oncancel
&&
this
.
oncancel
();
this
.
visiable
=
false
;
this
.
$emit
(
'
change
'
,
false
);
},
onClose
()
{
this
.
cancel
();
},
async
ok
()
{
this
.
loading
=
true
;
await
(
this
.
onok
&&
this
.
onok
());
this
.
loading
=
false
;
this
.
visiable
=
false
;
this
.
$emit
(
'
change
'
,
false
)
;
},
},
};
...
...
src/components/table/index.vue
View file @
60ab4acc
...
...
@@ -63,7 +63,7 @@
</div>
<template
v-if=
"!noFooter"
>
<a-divider
/>
<a-space>
<a-space
class=
"tw-justify-end"
>
<a-button
@
click=
"addVisible = false"
>
取消
</a-button>
<a-button
type=
"primary"
@
click=
"submit"
:loading=
"submitLoading"
>
确认
</a-button>
</a-space>
...
...
src/pages/system/view/organization/usermanagement/User.vue
View file @
60ab4acc
<
template
>
<my-table
url=
"/api/v1/users"
rowKey=
"userId"
ref=
"table"
>
<template
#drawer
>
<Form
ref=
"form"
/>
</
template
>
<
template
#search=
"{ query }"
>
<my-form-item
label=
"归属部门"
>
<OrganizationTree
v-model=
"query.orgId"
/>
</my-form-item>
<my-form-item
label=
"账号"
>
<a-input
placeholder=
"Basic usage"
v-model=
"query.loginId"
/>
</my-form-item>
</
template
>
<
template
#buttons
>
<a-button
type=
"primary"
>
新增
</a-button>
</
template
>
<a-table-column
title=
"账号"
data-index=
"loginId"
/>
<a-table-column
title=
"姓名"
data-index=
"userName"
/>
<a-table-column
title=
"职称"
data-index=
"userTitleName"
/>
<a-table-column
title=
"移动电话"
data-index=
"mobilePhone"
/>
<a-table-column
title=
"固定电话"
data-index=
"fixedPhone"
/>
<a-table-column
title=
"电子邮箱"
data-index=
"userEmail"
/>
<a-table-column
title=
"是否锁定"
data-index=
"isLockedName"
/>
<a-table-column
title=
"操作"
>
<
template
#default=
"row"
>
<!--
<a
@
click=
"() => view(row, 1)"
>
编辑
</a>
<a-divider
type=
"vertical"
/>
<PopconfirmDelete
:url=
"`/api/v1/jobs/$
{row.jobId}`" :cb="refreshTable" /> -->
<ActionButton
:buttons=
"buttons"
:row=
"row"
/>
<div>
<my-table
url=
"/api/v1/users"
rowKey=
"userId"
ref=
"table"
>
<template
#search
="
{ query }">
<my-form-item
label=
"归属部门"
>
<OrganizationTree
v-model=
"query.orgId"
/>
</my-form-item>
<my-form-item
label=
"账号"
>
<a-input
placeholder=
"Basic usage"
v-model=
"query.loginId"
/>
</my-form-item>
</
template
>
<
template
#buttons
>
<a-button
type=
"primary"
@
click=
"onAdd"
>
新增
</a-button>
</
template
>
</a-table-column>
</my-table>
<a-table-column
title=
"账号"
data-index=
"loginId"
/>
<a-table-column
title=
"姓名"
data-index=
"userName"
/>
<a-table-column
title=
"职称"
data-index=
"userTitleName"
/>
<a-table-column
title=
"移动电话"
data-index=
"mobilePhone"
/>
<a-table-column
title=
"固定电话"
data-index=
"fixedPhone"
/>
<a-table-column
title=
"电子邮箱"
data-index=
"userEmail"
/>
<a-table-column
title=
"是否锁定"
data-index=
"isLockedName"
/>
<a-table-column
title=
"操作"
>
<
template
#default=
"row"
>
<ActionButton
:buttons=
"buttons"
:row=
"row"
/>
</
template
>
</a-table-column>
</my-table>
<Form
ref=
"form"
/>
</div>
</template>
<
script
>
import
Form
from
'
./form.vue
'
;
...
...
@@ -103,6 +100,9 @@ export default {
refreshTable
()
{
this
.
$refs
[
'
table
'
]?.
getData
();
},
onAdd
()
{
this
.
$refs
[
'
form
'
]?.
open
();
},
// view(data, type) {
// this.$refs['table']?.show({ type });
// this.$nextTick(() => {
...
...
src/pages/system/view/organization/usermanagement/form.vue
View file @
60ab4acc
<
template
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model-item
label=
"名称"
prop=
"jobName"
>
<a-input
v-model=
"form.jobName"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"描述"
prop=
"jobDescription"
>
<a-textarea
v-model=
"form.jobDescription"
:disabled=
"isView"
:rows=
"4"
/>
</a-form-model-item>
</a-form-model>
<Drawer
ref=
"drawerRef"
v-model=
"visible"
>
<a-form-model
layout=
"vertical"
:model=
"form"
:rules=
"rules"
ref=
"DrawerForm"
>
<a-form-model-item
label=
"名称"
prop=
"jobName"
>
<a-input
v-model=
"form.jobName"
:disabled=
"isView"
/>
</a-form-model-item>
<a-form-model-item
label=
"描述"
prop=
"jobDescription"
>
<a-textarea
v-model=
"form.jobDescription"
:disabled=
"isView"
:rows=
"4"
/>
</a-form-model-item>
</a-form-model>
</Drawer>
</
template
>
<
script
>
import
Drawer
from
'
@/components/table/drawer.vue
'
;
import
JobsApi
from
'
@/api/organization
'
;
import
FormMixin
from
'
@/components/FormMixin
'
;
export
default
{
components
:
{
Drawer
},
mixins
:
[
FormMixin
],
data
()
{
return
{
visible
:
false
,
rules
:
{
jobName
:
[{
required
:
true
,
message
:
'
Please select Activity zone
'
,
trigger
:
'
change
'
}],
jobDescription
:
[
...
...
@@ -25,6 +30,9 @@ export default {
};
},
methods
:
{
open
()
{
this
.
visible
=
true
;
},
add
()
{
return
JobsApi
.
addJobs
({
...
this
.
form
});
},
...
...
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