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
90a0dc8d
Commit
90a0dc8d
authored
Jun 30, 2021
by
水落(YangLei)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 组件优化
parent
7aa0fe42
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
30 deletions
+38
-30
src/components/index.js
src/components/index.js
+2
-1
src/components/table/my_item.vue
src/components/table/my_item.vue
+1
-4
src/pages/system/view/log/login_log/index.vue
src/pages/system/view/log/login_log/index.vue
+26
-16
src/pages/system/view/organization/usermanagement/User.vue
src/pages/system/view/organization/usermanagement/User.vue
+7
-7
src/pages/user/components/info.vue
src/pages/user/components/info.vue
+0
-1
src/plugins/index.js
src/plugins/index.js
+2
-1
No files found.
src/components/index.js
View file @
90a0dc8d
import
Table
from
'
./table/index.vue
'
;
import
WhiteCard
from
'
./white_card/index.vue
'
;
import
Upload
from
'
./upload/index.vue
'
;
import
MyFormItem
from
'
./table/my_item.vue
'
;
export
{
Table
,
WhiteCard
,
Upload
};
export
{
Table
,
WhiteCard
,
Upload
,
MyFormItem
};
src/components/table/my_item.vue
View file @
90a0dc8d
<
template
>
<a-col
v-bind=
"span"
>
<a-form-model-item
v-bind=
"layout"
>
<slot
/>
<slot
class=
"tw-w-full"
/>
</a-form-model-item>
</a-col>
</
template
>
...
...
@@ -16,6 +16,3 @@ export default {
},
};
</
script
>
<
style
>
</
style
>
\ No newline at end of file
src/pages/system/view/log/login_log/index.vue
View file @
90a0dc8d
<
template
>
<my-table
url=
"/api/v1/logger/login"
rowKey=
"logId"
ref=
"table"
>
<template
#search
="
{query}">
<a-form-model-item
label=
"开始时间"
>
<a-date-picker
show-time
v-model=
"query.startTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
</a-form-model-item>
<a-form-model-item
label=
"结束时间"
>
<a-date-picker
show-time
v-model=
"query.endTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
</a-form-model-item>
<a-form-model-item
label=
"登录用户"
>
<my-form-item
label=
"开始时间"
>
<a-date-picker
class=
"tw-w-full"
show-time
v-model=
"query.startTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
</my-form-item>
<my-form-item
label=
"结束时间"
>
<a-date-picker
class=
"tw-w-full"
show-time
v-model=
"query.endTime"
valueFormat=
"YYYY-MM-DD HH:mm:ss"
/>
</my-form-item>
<my-form-item
label=
"登录用户"
>
<a-input
v-model=
"query.userId"
/>
</
a-form-model
-item>
<
a-form-model
-item
label=
"登录IP"
>
</
my-form
-item>
<
my-form
-item
label=
"登录IP"
>
<a-input
v-model=
"query.loginIp"
/>
</
a-form-model
-item>
<
a-form-model
-item
label=
"事件类型"
>
<a-select
v-model=
"query.loginType"
style=
"width: 170px"
allowClear
>
</
my-form
-item>
<
my-form
-item
label=
"事件类型"
>
<a-select
v-model=
"query.loginType"
allowClear
>
<a-select-option
value=
"LOGIN"
>
登录系统
</a-select-option>
<a-select-option
value=
"LOGOUT"
>
退出系统
</a-select-option>
</a-select>
</
a-form-model
-item>
<
a-form-model
-item
label=
"事件状态"
>
<a-select
v-model=
"query.isSuccess"
style=
"width: 170px"
allowClear
>
</
my-form
-item>
<
my-form
-item
label=
"事件状态"
>
<a-select
v-model=
"query.isSuccess"
allowClear
>
<a-select-option
value=
"0"
>
失败
</a-select-option>
<a-select-option
value=
"1"
>
成功
</a-select-option>
</a-select>
</
a-form-model
-item>
</
my-form
-item>
</
template
>
<a-table-column
title=
"用户Id"
data-index=
"userId"
/>
<a-table-column
title=
"登录用户"
data-index=
"userName"
/>
...
...
src/pages/system/view/organization/usermanagement/User.vue
View file @
90a0dc8d
...
...
@@ -4,12 +4,12 @@
<Form
ref=
"form"
/>
</
template
>
<
template
#search=
"{ query }"
>
<
MyFormModelI
tem
label=
"归属部门"
>
<
my-form-i
tem
label=
"归属部门"
>
<OrganizationTree
v-model=
"query.orgId"
/>
</
MyFormModelI
tem>
<
MyFormModelI
tem
label=
"账号"
>
</
my-form-i
tem>
<
my-form-i
tem
label=
"账号"
>
<a-input
placeholder=
"Basic usage"
v-model=
"query.loginId"
/>
</
MyFormModelI
tem>
</
my-form-i
tem>
</
template
>
<a-table-column
title=
"账号"
data-index=
"loginId"
/>
...
...
@@ -31,10 +31,10 @@
<
script
>
import
Form
from
'
./form.vue
'
;
import
PopconfirmDelete
from
'
@/components/popconfirm_delete/index.vue
'
;
import
MyFormModelItem
from
'
@/components/table/my_item.vue
'
;
import
OrganizationTree
from
'
../components/OrganizationTree.vue
'
;
export
default
{
components
:
{
Form
,
PopconfirmDelete
,
OrganizationTree
,
MyFormModelItem
},
components
:
{
Form
,
PopconfirmDelete
,
OrganizationTree
},
data
()
{
return
{
addBtn
:
{
width
:
600
,
onOk
:
()
=>
this
.
$refs
[
'
form
'
]?.
submit
()
},
...
...
src/pages/user/components/info.vue
View file @
90a0dc8d
...
...
@@ -53,7 +53,6 @@ export default {
},
watch
:
{
'
$store.state.userInfo
'
(
userInfo
)
{
console
.
log
(
'
userInfo
'
);
this
.
form
.
userName
=
userInfo
.
userName
;
this
.
form
.
fixedPhone
=
userInfo
.
fixedPhone
;
this
.
form
.
mobilePhone
=
userInfo
.
mobilePhone
;
...
...
src/plugins/index.js
View file @
90a0dc8d
import
VueI18nPlugin
from
'
./vueI18nPlugin
'
;
import
AuthorityPlugin
from
'
./authorityPlugin
'
;
import
TabsPagePlugin
from
'
./tabsPagePlugin
'
;
import
{
Table
,
WhiteCard
,
Upload
}
from
'
@/components
'
;
import
{
Table
,
WhiteCard
,
Upload
,
MyFormItem
}
from
'
@/components
'
;
const
Plugins
=
{
install
:
function
(
Vue
)
{
...
...
@@ -11,6 +11,7 @@ const Plugins = {
Vue
.
component
(
'
my-table
'
,
Table
);
Vue
.
component
(
'
my-card
'
,
WhiteCard
);
Vue
.
component
(
'
my-upload
'
,
Upload
);
Vue
.
component
(
'
my-form-item
'
,
MyFormItem
);
},
};
export
default
Plugins
;
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