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
d90077fe
Commit
d90077fe
authored
Jul 01, 2021
by
陈浩玮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组件修改
parent
68b039f8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
43 deletions
+48
-43
src/components/table/drawer.vue
src/components/table/drawer.vue
+16
-11
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
No files found.
src/components/table/drawer.vue
View file @
d90077fe
<
template
>
<
template
>
<a-drawer
<a-drawer
placement=
"right"
placement=
"right"
:visible=
"v
isibl
e"
:visible=
"v
alu
e"
:drawerStyle=
"drawerStyle"
:drawerStyle=
"drawerStyle"
:bodyStyle=
"bodyStyle"
:bodyStyle=
"bodyStyle"
destroyOnClose
destroyOnClose
:width=
"600"
v-bind=
"$attrs"
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"
>
<div
class=
"tw-overflow-y-auto tw-h-full"
>
<slot
/>
<slot
/>
</div>
</div>
</div>
</div>
<template>
<template>
<a-divider
/>
<a-divider
/>
<a-space>
<a-space
class=
"tw-justify-end"
>
<slot
name=
"footer"
>
<a-button
@
click=
"cancel"
>
取消
</a-button>
<a-button
@
click=
"cancel"
>
取消
</a-button>
<slot
name=
"footer"
>
<a-button
type=
"primary"
@
click=
"ok"
:loading=
"loading"
>
确认
</a-button>
<a-button
type=
"primary"
@
click=
"ok"
:loading=
"loading"
>
确认
</a-button>
</slot>
</slot>
</a-space>
</a-space>
...
@@ -29,6 +32,11 @@ export default {
...
@@ -29,6 +32,11 @@ export default {
props
:
{
props
:
{
oncancel
:
Function
,
oncancel
:
Function
,
onok
:
Function
,
onok
:
Function
,
value
:
Boolean
,
},
model
:
{
prop
:
'
value
'
,
event
:
'
change
'
,
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -48,15 +56,12 @@ export default {
...
@@ -48,15 +56,12 @@ export default {
};
};
},
},
methods
:
{
methods
:
{
show
()
{
this
.
visiable
=
true
;
},
hidden
()
{
this
.
visiable
=
false
;
},
cancel
()
{
cancel
()
{
this
.
oncancel
&&
this
.
oncancel
();
this
.
oncancel
&&
this
.
oncancel
();
this
.
visiable
=
false
;
this
.
$emit
(
'
change
'
,
false
);
},
onClose
()
{
this
.
cancel
();
},
},
async
ok
()
{
async
ok
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
...
...
src/components/table/index.vue
View file @
d90077fe
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
</div>
</div>
<template
v-if=
"!noFooter"
>
<template
v-if=
"!noFooter"
>
<a-divider
/>
<a-divider
/>
<a-space>
<a-space
class=
"tw-justify-end"
>
<a-button
@
click=
"addVisible = false"
>
取消
</a-button>
<a-button
@
click=
"addVisible = false"
>
取消
</a-button>
<a-button
type=
"primary"
@
click=
"submit"
:loading=
"submitLoading"
>
确认
</a-button>
<a-button
type=
"primary"
@
click=
"submit"
:loading=
"submitLoading"
>
确认
</a-button>
</a-space>
</a-space>
...
...
src/pages/system/view/organization/usermanagement/User.vue
View file @
d90077fe
<
template
>
<
template
>
<div>
<my-table
url=
"/api/v1/users"
rowKey=
"userId"
ref=
"table"
>
<my-table
url=
"/api/v1/users"
rowKey=
"userId"
ref=
"table"
>
<template
#drawer
>
<Form
ref=
"form"
/>
</
template
>
<template
#search
="
{ query }">
<template
#search
="
{ query }">
<my-form-item
label=
"归属部门"
>
<my-form-item
label=
"归属部门"
>
<OrganizationTree
v-model=
"query.orgId"
/>
<OrganizationTree
v-model=
"query.orgId"
/>
...
@@ -12,7 +10,7 @@
...
@@ -12,7 +10,7 @@
</my-form-item>
</my-form-item>
</
template
>
</
template
>
<
template
#buttons
>
<
template
#buttons
>
<a-button
type=
"primary
"
>
新增
</a-button>
<a-button
type=
"primary"
@
click=
"onAdd
"
>
新增
</a-button>
</
template
>
</
template
>
<a-table-column
title=
"账号"
data-index=
"loginId"
/>
<a-table-column
title=
"账号"
data-index=
"loginId"
/>
...
@@ -24,13 +22,12 @@
...
@@ -24,13 +22,12 @@
<a-table-column
title=
"是否锁定"
data-index=
"isLockedName"
/>
<a-table-column
title=
"是否锁定"
data-index=
"isLockedName"
/>
<a-table-column
title=
"操作"
>
<a-table-column
title=
"操作"
>
<
template
#default=
"row"
>
<
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"
/>
<ActionButton
:buttons=
"buttons"
:row=
"row"
/>
</
template
>
</
template
>
</a-table-column>
</a-table-column>
</my-table>
</my-table>
<Form
ref=
"form"
/>
</div>
</template>
</template>
<
script
>
<
script
>
import
Form
from
'
./form.vue
'
;
import
Form
from
'
./form.vue
'
;
...
@@ -103,6 +100,9 @@ export default {
...
@@ -103,6 +100,9 @@ export default {
refreshTable
()
{
refreshTable
()
{
this
.
$refs
[
'
table
'
]?.
getData
();
this
.
$refs
[
'
table
'
]?.
getData
();
},
},
onAdd
()
{
this
.
$refs
[
'
form
'
]?.
open
();
},
// view(data, type) {
// view(data, type) {
// this.$refs['table']?.show({ type });
// this.$refs['table']?.show({ type });
// this.$nextTick(() => {
// this.$nextTick(() => {
...
...
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