Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
ce928c61
Commit
ce928c61
authored
Apr 29, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
993f09c9
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
92 additions
and
55 deletions
+92
-55
iview-admin/src/components/tables/tables.vue
+53
-33
iview-admin/src/router/routers.js
+29
-0
iview-admin/src/store/module/metainfo/appinfo.js
+1
-1
iview-admin/src/store/module/metainfo/userinfo.js
+3
-6
iview-admin/src/view/components/tables/biztables.vue
+3
-12
iview-admin/src/view/login/login.less
+1
-1
iview-admin/src/view/login/login.vue
+2
-2
No files found.
iview-admin/src/components/tables/tables.vue
View file @
ce928c61
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
<div>
<div>
<div
v-if=
"searchable && searchPlace === 'top'"
class=
"search-con search-con-top"
>
<div
v-if=
"searchable && searchPlace === 'top'"
class=
"search-con search-con-top"
>
<Select
v-model=
"searchKey"
clearable
placeholder=
"搜索关键字"
class=
"search-col"
>
<Select
v-model=
"searchKey"
clearable
placeholder=
"搜索关键字"
class=
"search-col"
>
<Option
<Option
v-for=
"item in searchcols"
v-for=
"item in searchcols"
v-if=
"item.key !== 'handle'"
v-if=
"item.key !== 'handle'"
:value=
"item.key"
:value=
"item.key"
:key=
"`search-col-$
{item.key}`"
:key=
"`search-col-$
{item.key}`"
...
@@ -17,15 +17,15 @@
...
@@ -17,15 +17,15 @@
v-model=
"searchValue"
v-model=
"searchValue"
/>
/>
<Button
@
click=
"handleSearch"
class=
"search-btn"
type=
"text"
>
<Button
@
click=
"handleSearch"
class=
"search-btn"
type=
"text"
>
<Icon
type=
"ios-locate-outline"
/>
搜索
<Icon
type=
"ios-locate-outline"
/>
搜索
</Button>
</Button>
<span
style=
"position:absolute;right:100px;"
>
<span
style=
"position:absolute;right:100px;"
>
<slot
name=
"tblbtnarea"
>
<slot
name=
"tblbtnarea"
>
<Button
@
click=
"advSearch"
class=
"search-btn"
type=
"text"
>
<Button
@
click=
"advSearch"
class=
"search-btn"
type=
"text"
>
<Icon
type=
"ios-search-outline"
/>
高级
<Icon
type=
"ios-search-outline"
/>
高级
</Button>
</Button>
</slot>
</slot>
</span>
</span>
</div>
</div>
<Table
<Table
ref=
"tablesMain"
ref=
"tablesMain"
...
@@ -54,8 +54,8 @@
...
@@ -54,8 +54,8 @@
@
on-row-dblclick=
"onRowDblclick"
@
on-row-dblclick=
"onRowDblclick"
@
on-expand=
"onExpand"
@
on-expand=
"onExpand"
>
>
<template
v-for=
"cl in tmplcols"
slot-scope=
"
{ row, index }" :slot="cl.key">
<template
v-for=
"cl in tmplcols"
slot-scope=
"
{ row, index }" :slot="cl.key">
<div
:key=
"'tml'+cl.prop"
v-html=
"formatCol(row,cl.key,index)"
></div>
<div
:key=
"'tml'+cl.prop"
v-html=
"formatCol(row,cl.key,index)"
></div>
</
template
>
</
template
>
<slot
name=
"header"
slot=
"header"
></slot>
<slot
name=
"header"
slot=
"header"
></slot>
<slot
name=
"footer"
slot=
"footer"
></slot>
<slot
name=
"footer"
slot=
"footer"
></slot>
...
@@ -92,10 +92,10 @@ export default {
...
@@ -92,10 +92,10 @@ export default {
return
[];
return
[];
}
}
},
},
formatCol
:{
formatCol
:
{
type
:
Function
,
type
:
Function
,
default
(){
default
()
{
return
(
row
,
key
,
index
)
=>
row
[
key
]
return
(
row
,
key
,
index
)
=>
row
[
key
];
}
}
},
},
columns
:
{
columns
:
{
...
@@ -115,7 +115,10 @@ export default {
...
@@ -115,7 +115,10 @@ export default {
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
},
},
isMulti
:
{
type
:
Boolean
,
default
:
false
},
border
:
{
border
:
{
type
:
Boolean
,
type
:
Boolean
,
default
:
false
default
:
false
...
@@ -189,8 +192,8 @@ export default {
...
@@ -189,8 +192,8 @@ export default {
};
};
},
},
methods
:
{
methods
:
{
advSearch
(){
advSearch
()
{
this
.
$emit
(
"on-adv-search"
)
this
.
$emit
(
"on-adv-search"
);
},
},
suportEdit
(
item
,
index
)
{
suportEdit
(
item
,
index
)
{
item
.
render
=
(
h
,
params
)
=>
{
item
.
render
=
(
h
,
params
)
=>
{
...
@@ -253,7 +256,11 @@ export default {
...
@@ -253,7 +256,11 @@ export default {
{
{
props
:
{
props
:
{
type
:
btninfo
.
type
,
type
:
btninfo
.
type
,
disabled
:
params
.
row
.
isSystem
&&
(
btninfo
.
key
==
"delete"
||
btninfo
.
key
==
"edit"
)?
true
:
false
disabled
:
params
.
row
.
isSystem
&&
(
btninfo
.
key
==
"delete"
||
btninfo
.
key
==
"edit"
)
?
true
:
false
},
},
on
:
{
on
:
{
click
:
()
=>
{
click
:
()
=>
{
...
@@ -283,13 +290,24 @@ export default {
...
@@ -283,13 +290,24 @@ export default {
return
item
;
return
item
;
},
},
handleColumns
(
columns
)
{
handleColumns
(
columns
)
{
this
.
insideColumns
=
columns
.
map
((
item
,
index
)
=>
{
this
.
insideColumns
=
columns
.
map
((
item
,
index
)
=>
{
let
res
=
item
;
let
res
=
item
;
if
(
res
.
editable
)
res
=
this
.
suportEdit
(
res
,
index
);
if
(
res
.
editable
)
res
=
this
.
suportEdit
(
res
,
index
);
if
(
res
.
key
===
"handle"
)
res
=
this
.
surportHandle
(
res
);
if
(
res
.
key
===
"handle"
)
res
=
this
.
surportHandle
(
res
);
return
res
;
return
res
;
});
});
if
(
this
.
isMulti
)
{
let
ft
=
this
.
insideColumns
.
filter
(
it
=>
{
it
.
type
==
"selection"
;
});
if
(
!
ft
||
(
ft
&&
ft
.
length
==
0
))
{
this
.
insideColumns
.
unshift
({
type
:
"selection"
,
width
:
60
,
align
:
"center"
});
}
}
},
},
setDefaultSearchKey
()
{
setDefaultSearchKey
()
{
this
.
searchKey
=
this
.
searchKey
=
...
@@ -306,12 +324,12 @@ export default {
...
@@ -306,12 +324,12 @@ export default {
// this.insideTableData = this.value.filter(
// this.insideTableData = this.value.filter(
// item => item[this.searchKey].indexOf(this.searchValue) > -1
// item => item[this.searchKey].indexOf(this.searchValue) > -1
// );
// );
if
(
this
.
searchKey
&&
this
.
searchKey
!=
""
)
{
if
(
this
.
searchKey
&&
this
.
searchKey
!=
""
)
{
let
eobj
=
{};
let
eobj
=
{};
eobj
[
this
.
searchKey
]
=
this
.
searchValue
eobj
[
this
.
searchKey
]
=
this
.
searchValue
;
this
.
$emit
(
"on-rapid-query"
,
eobj
)
this
.
$emit
(
"on-rapid-query"
,
eobj
);
}
else
{
}
else
{
this
.
$emit
(
"on-rapid-query"
,
null
)
this
.
$emit
(
"on-rapid-query"
,
null
);
}
}
},
},
handleTableData
()
{
handleTableData
()
{
...
@@ -373,13 +391,15 @@ export default {
...
@@ -373,13 +391,15 @@ export default {
this
.
setDefaultSearchKey
();
this
.
setDefaultSearchKey
();
this
.
handleTableData
();
this
.
handleTableData
();
},
},
computed
:{
computed
:
{
searchcols
:
function
()
{
searchcols
:
function
()
{
return
this
.
columns
?
this
.
columns
.
filter
(
item
=>
item
.
insearch
):[]
return
this
.
columns
?
this
.
columns
.
filter
(
item
=>
item
.
insearch
)
:
[];
},
},
tmplcols
(){
tmplcols
()
{
let
rtns
=
this
.
columns
.
filter
(
item
=>
{
return
item
.
slot
&&
item
.
slot
!=
""
})
let
rtns
=
this
.
columns
.
filter
(
item
=>
{
return
rtns
return
item
.
slot
&&
item
.
slot
!=
""
;
});
return
rtns
;
}
}
}
}
};
};
...
...
iview-admin/src/router/routers.js
View file @
ce928c61
...
@@ -51,6 +51,35 @@ export default [
...
@@ -51,6 +51,35 @@ export default [
]
]
},
},
{
{
path
:
'/tanent'
,
name
:
'tanent'
,
meta
:
{
icon
:
'ios-settings'
,
title
:
'租户中心'
},
component
:
Main
,
children
:
[
{
path
:
'account_info'
,
name
:
'account_info'
,
meta
:
{
icon
:
'md-clipboard'
,
title
:
'帐户信息'
},
component
:
()
=>
import
(
'@/view/roleinfo/roleinfo_page.vue'
)
},
{
path
:
'tanents_info'
,
name
:
'tanents_info'
,
meta
:
{
icon
:
'ios-man'
,
title
:
'租户信息'
},
component
:
()
=>
import
(
'@/view/appinfo/appinfo_page.vue'
)
}
]
},
{
path
:
'/app'
,
path
:
'/app'
,
name
:
'app'
,
name
:
'app'
,
meta
:
{
meta
:
{
...
...
iview-admin/src/store/module/metainfo/appinfo.js
View file @
ce928c61
...
@@ -5,7 +5,7 @@ export default {
...
@@ -5,7 +5,7 @@ export default {
{
title
:
'APPKEY'
,
key
:
'appkey'
,
sortable
:
true
,
insearch
:
false
},
//slot--自定义列 insearch--是否快速查询
{
title
:
'APPKEY'
,
key
:
'appkey'
,
sortable
:
true
,
insearch
:
false
},
//slot--自定义列 insearch--是否快速查询
{
title
:
'名称'
,
key
:
'name'
,
sortable
:
true
,
insearch
:
true
},
//slot--自定义列 insearch--是否快速查询
{
title
:
'名称'
,
key
:
'name'
,
sortable
:
true
,
insearch
:
true
},
//slot--自定义列 insearch--是否快速查询
{
title
:
'域名'
,
key
:
'domainName'
,
sortable
:
true
,
insearch
:
true
},
//slot--自定义列 insearch--是否快速查询
{
title
:
'域名'
,
key
:
'domainName'
,
sortable
:
true
,
insearch
:
true
},
//slot--自定义列 insearch--是否快速查询
{
title
:
'
后端
'
,
key
:
'backend'
,
sortable
:
true
,
insearch
:
true
},
//slot--自定义列 insearch--是否快速查询
{
title
:
'
服务
'
,
key
:
'backend'
,
sortable
:
true
,
insearch
:
true
},
//slot--自定义列 insearch--是否快速查询
{
title
:
'创建时间'
,
key
:
'created_at'
,
slot
:
'created_at'
},
{
title
:
'创建时间'
,
key
:
'created_at'
,
slot
:
'created_at'
},
{
{
title
:
'操作'
,
title
:
'操作'
,
...
...
iview-admin/src/store/module/metainfo/userinfo.js
View file @
ce928c61
...
@@ -6,7 +6,8 @@ export default {
...
@@ -6,7 +6,8 @@ export default {
{
title
:
'昵称'
,
key
:
'nickName'
,
sortable
:
true
,
insearch
:
true
},
{
title
:
'昵称'
,
key
:
'nickName'
,
sortable
:
true
,
insearch
:
true
},
{
title
:
'角色'
,
key
:
'roleName'
,
sortable
:
false
,
insearch
:
false
,
slot
:
'roleName'
},
{
title
:
'角色'
,
key
:
'roleName'
,
sortable
:
false
,
insearch
:
false
,
slot
:
'roleName'
},
{
title
:
'是否超管'
,
key
:
'isSuper'
,
sortable
:
false
,
insearch
:
false
,
slot
:
'isSuper'
},
{
title
:
'是否超管'
,
key
:
'isSuper'
,
sortable
:
false
,
insearch
:
false
,
slot
:
'isSuper'
},
{
title
:
'是否管理员'
,
key
:
'isAdmin'
,
sortable
:
false
,
insearch
:
false
,
slot
:
'isAdmin'
},
{
title
:
'是否租户'
,
key
:
'isAdmin'
,
sortable
:
false
,
insearch
:
false
,
slot
:
'isAdmin'
},
{
title
:
'是否启用'
,
key
:
'isEnabled'
,
sortable
:
false
,
insearch
:
false
,
slot
:
'isEnabled'
},
{
title
:
'邮件'
,
key
:
'mail'
,
editable
:
true
,
insearch
:
true
},
{
title
:
'邮件'
,
key
:
'mail'
,
editable
:
true
,
insearch
:
true
},
{
title
:
'创建时间'
,
key
:
'created_at'
,
slot
:
'created_at'
},
{
title
:
'创建时间'
,
key
:
'created_at'
,
slot
:
'created_at'
},
{
{
...
@@ -22,12 +23,8 @@ export default {
...
@@ -22,12 +23,8 @@ export default {
{
{
"title"
:
"关键信息"
,
"title"
:
"关键信息"
,
ctls
:[
ctls
:[
{
"type"
:
"switch"
,
"label"
:
"是否启用"
,
"prop"
:
"isEnabled"
,
"opentext"
:
"是"
,
"closetext"
:
"否"
,
"trurcolor"
:
""
,
"falsecolor"
:
""
,
"placeHolder"
:
""
,
"style"
:
""
},
{
"type"
:
"switch"
,
"label"
:
"是否管理员"
,
"prop"
:
"isAdmin"
,
"opentext"
:
"是"
,
"closetext"
:
"否"
,
"trurcolor"
:
""
,
"falsecolor"
:
""
,
"placeHolder"
:
"请输入单次使用消耗的宝币数"
,
"style"
:
""
},
{
"type"
:
"input"
,
"label"
:
"帐户"
,
"prop"
:
"userName"
,
"placeHolder"
:
"请输入帐户名"
,
"style"
:
""
,
rules
:
[{
"required"
:
true
,
"message"
:
' '
,
"trigger"
:
'blur'
},]
},
{
"type"
:
"input"
,
"label"
:
"帐户"
,
"prop"
:
"userName"
,
"placeHolder"
:
"请输入帐户名"
,
"style"
:
""
,
rules
:
[{
"required"
:
true
,
"message"
:
' '
,
"trigger"
:
'blur'
},]
},
]
]
},
},
{
{
...
...
iview-admin/src/view/components/tables/biztables.vue
View file @
ce928c61
...
@@ -29,6 +29,7 @@
...
@@ -29,6 +29,7 @@
@
on-select=
"onsels"
@
on-select=
"onsels"
@
on-adv-search=
"advsearch"
@
on-adv-search=
"advsearch"
:formatCol=
"formatCol"
:formatCol=
"formatCol"
:isMulti=
"isMulti"
>
>
<
template
v-slot:tblbtnarea=
"slotProps"
>
<
template
v-slot:tblbtnarea=
"slotProps"
>
<Button
<Button
...
@@ -43,6 +44,7 @@
...
@@ -43,6 +44,7 @@
<div
style=
"text-align:center"
>
<div
style=
"text-align:center"
>
<Page
<Page
:total=
"pageInfo.total"
:total=
"pageInfo.total"
:page-size-opts=
"[15,30,50,100,200,500]"
:current
.
sync=
"pageInfo.pageNo"
:current
.
sync=
"pageInfo.pageNo"
:page-size=
"pageInfo.pageSize"
:page-size=
"pageInfo.pageSize"
show-sizer
show-sizer
...
@@ -360,18 +362,7 @@ export default {
...
@@ -360,18 +362,7 @@ export default {
this
.
fetchData
();
this
.
fetchData
();
},
},
created
()
{
created
()
{
if
(
this
.
isMulti
&&
this
.
metainfo
)
{
let
ft
=
this
.
metainfo
[
"list"
].
filter
(
it
=>
{
it
.
type
==
"selection"
;
});
if
(
!
ft
||
(
ft
&&
ft
.
length
==
0
))
{
this
.
metainfo
[
"list"
].
unshift
({
type
:
"selection"
,
width
:
60
,
align
:
"center"
});
}
}
},
},
computed
:
{
computed
:
{
searchinfo
()
{
searchinfo
()
{
...
...
iview-admin/src/view/login/login.less
View file @
ce928c61
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
right: 160px;
right: 160px;
top: 50%;
top: 50%;
transform: translateY(-60%);
transform: translateY(-60%);
width: 3
0
0px;
width: 3
5
0px;
&-header{
&-header{
font-size: 16px;
font-size: 16px;
font-weight: 300;
font-weight: 300;
...
...
iview-admin/src/view/login/login.vue
View file @
ce928c61
...
@@ -5,10 +5,10 @@
...
@@ -5,10 +5,10 @@
<
template
>
<
template
>
<div
class=
"login"
>
<div
class=
"login"
>
<div
class=
"login-con"
>
<div
class=
"login-con"
>
<Card
icon=
"log-in"
title=
"欢迎登录"
:bordered=
"false"
>
<Card
icon=
"log-in"
title=
"欢迎登录"
:bordered=
"false"
style=
"border-radius:0px"
>
<div
class=
"form-con"
>
<div
class=
"form-con"
>
<login-form
@
on-success-valid=
"handleSubmit"
></login-form>
<login-form
@
on-success-valid=
"handleSubmit"
></login-form>
<p
class=
"login-tip"
>
输入任意用户名和密码即可
</p>
<p
class=
"login-tip"
>
注册
</p>
</div>
</div>
</Card>
</Card>
</div>
</div>
...
...
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