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
993f09c9
Commit
993f09c9
authored
Apr 28, 2020
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
13a79154
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
297 additions
and
42 deletions
+297
-42
iview-admin/src/components/tables/tables.vue
+1
-1
iview-admin/src/router/routers.js
+32
-3
iview-admin/src/store/module/meta.js
+7
-1
iview-admin/src/store/module/metainfo/appinfo.js
+73
-0
iview-admin/src/store/module/metainfo/roleinfo.js
+64
-0
iview-admin/src/store/module/metainfo/userinfo.js
+2
-0
iview-admin/src/view/appinfo/appinfo_page.vue
+47
-0
iview-admin/src/view/components/tables/biztables.vue
+2
-2
iview-admin/src/view/components/tables/forms/childs/uploads.vue
+20
-33
iview-admin/src/view/components/tables/forms/forms.vue
+2
-2
iview-admin/src/view/roleinfo/roleinfo_page.vue
+47
-0
No files found.
iview-admin/src/components/tables/tables.vue
View file @
993f09c9
...
@@ -253,7 +253,7 @@ export default {
...
@@ -253,7 +253,7 @@ export default {
{
{
props
:
{
props
:
{
type
:
btninfo
.
type
,
type
:
btninfo
.
type
,
disabled
:
params
.
row
.
isSystem
&&
btninfo
.
key
==
"delete"
?
true
:
false
disabled
:
params
.
row
.
isSystem
&&
(
btninfo
.
key
==
"delete"
||
btninfo
.
key
==
"edit"
)
?
true
:
false
},
},
on
:
{
on
:
{
click
:
()
=>
{
click
:
()
=>
{
...
...
iview-admin/src/router/routers.js
View file @
993f09c9
...
@@ -51,6 +51,35 @@ export default [
...
@@ -51,6 +51,35 @@ export default [
]
]
},
},
{
{
path
:
'/app'
,
name
:
'app'
,
meta
:
{
icon
:
'ios-settings'
,
title
:
'应用管理'
},
component
:
Main
,
children
:
[
{
path
:
'app_info'
,
name
:
'app_info'
,
meta
:
{
icon
:
'ios-man'
,
title
:
'应用信息'
},
component
:
()
=>
import
(
'@/view/appinfo/appinfo_page.vue'
)
},
{
path
:
'route_info'
,
name
:
'route_info_page'
,
meta
:
{
icon
:
'md-clipboard'
,
title
:
'路由信息'
},
component
:
()
=>
import
(
'@/view/roleinfo/roleinfo_page.vue'
)
}
]
},
{
path
:
'/user'
,
path
:
'/user'
,
name
:
'user'
,
name
:
'user'
,
meta
:
{
meta
:
{
...
@@ -69,13 +98,13 @@ export default [
...
@@ -69,13 +98,13 @@ export default [
component
:
()
=>
import
(
'@/view/userinfo/userinfo_page.vue'
)
component
:
()
=>
import
(
'@/view/userinfo/userinfo_page.vue'
)
},
},
{
{
path
:
'
update_paste_page
'
,
path
:
'
role_info
'
,
name
:
'
update_paste
_page'
,
name
:
'
role_info
_page'
,
meta
:
{
meta
:
{
icon
:
'md-clipboard'
,
icon
:
'md-clipboard'
,
title
:
'角色信息'
title
:
'角色信息'
},
},
component
:
()
=>
import
(
'@/view/
update/update-past
e.vue'
)
component
:
()
=>
import
(
'@/view/
roleinfo/roleinfo_pag
e.vue'
)
}
}
]
]
},
},
...
...
iview-admin/src/store/module/meta.js
View file @
993f09c9
import
{
btnAuthFilter
,
setToken
,
getToken
}
from
'@/libs/util'
import
{
btnAuthFilter
,
setToken
,
getToken
}
from
'@/libs/util'
import
userinfo
from
"./metainfo/userinfo"
import
userinfo
from
"./metainfo/userinfo"
import
dicinfo
from
"./metainfo/dict"
import
dicinfo
from
"./metainfo/dict"
import
roleinfo
from
'./metainfo/roleinfo'
;
import
appinfo
from
'./metainfo/appinfo'
;
export
default
{
export
default
{
state
:
{
state
:
{
dict_info
:
dicinfo
,
user_info
:
userinfo
,
user_info
:
userinfo
,
dict_info
:
dicinfo
role_info
:
roleinfo
,
app_info
:
appinfo
,
},
},
mutations
:
{
mutations
:
{
},
},
getters
:
{
getters
:
{
user_info
:
(
state
,
getters
,
{
user
})
=>
btnAuthFilter
(
state
.
user_info
,
user
),
//定义一个函数添加权限控制逻辑
user_info
:
(
state
,
getters
,
{
user
})
=>
btnAuthFilter
(
state
.
user_info
,
user
),
//定义一个函数添加权限控制逻辑
role_info
:
(
state
,
getters
,
{
user
})
=>
btnAuthFilter
(
state
.
role_info
,
user
),
//定义一个函数添加权限控制逻辑
app_info
:
(
state
,
getters
,
{
user
})
=>
btnAuthFilter
(
state
.
app_info
,
user
),
//定义一个函数添加权限控制逻辑
dict_info
:
state
=>
state
.
dict_info
dict_info
:
state
=>
state
.
dict_info
},
},
actions
:
{
actions
:
{
...
...
iview-admin/src/store/module/metainfo/appinfo.js
0 → 100644
View file @
993f09c9
export
default
{
bizCode
:
"appinfo"
,
name
:
"用户信息维护"
,
list
:
[
{
title
:
'APPKEY'
,
key
:
'appkey'
,
sortable
:
true
,
insearch
:
false
},
//slot--自定义列 insearch--是否快速查询
{
title
:
'名称'
,
key
:
'name'
,
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
:
'created_at'
,
slot
:
'created_at'
},
{
title
:
'操作'
,
key
:
'handle'
,
button
:
[
//这个数组中内容,需要按照权限字符串,在服务端构造
]
}
],
"form"
:
{
name
:
"xxx"
,
main
:
[
{
"title"
:
"关键信息"
,
ctls
:[
{
"type"
:
"input"
,
"label"
:
"昵称"
,
"prop"
:
"name"
,
"placeHolder"
:
"请输入昵称"
,
"style"
:
""
,
rules
:
[{
"required"
:
true
,
"message"
:
' '
,
"trigger"
:
'blur'
},]
},
{
"type"
:
"input"
,
"label"
:
"邮件"
,
"prop"
:
"domainName"
,
"placeHolder"
:
"请输入邮件"
,
"style"
:
""
,
rules
:
[{
"required"
:
true
,
"message"
:
' '
,
"trigger"
:
'blur'
},]
},
{
"type"
:
"input"
,
"label"
:
"帐户"
,
"prop"
:
"backend"
,
"placeHolder"
:
"请输入帐户名"
,
"style"
:
""
,
rules
:
[{
"required"
:
true
,
"message"
:
' '
,
"trigger"
:
'blur'
},]
},
]
}
],
lists
:
[
{
title
:
"子列表"
,
bizCode
:
"xxx"
}
]
},
"search"
:
{
name
:
"search"
,
main
:
[
{
"title"
:
"基本信息"
,
"key"
:
"baseinfo"
,
ctls
:
[
{
"type"
:
"input"
,
"label"
:
"昵称"
,
"prop"
:
"name"
,
"placeHolder"
:
"请输入昵称"
,
"style"
:
""
,
rules
:
[{
"required"
:
true
,
"message"
:
' '
,
"trigger"
:
'blur'
},]
},
{
"type"
:
"input"
,
"label"
:
"邮件"
,
"prop"
:
"domainName"
,
"placeHolder"
:
"请输入邮件"
,
"style"
:
""
,
rules
:
[{
"required"
:
true
,
"message"
:
' '
,
"trigger"
:
'blur'
},]
},
{
"type"
:
"input"
,
"label"
:
"帐户"
,
"prop"
:
"backend"
,
"placeHolder"
:
"请输入帐户名"
,
"style"
:
""
,
rules
:
[{
"required"
:
true
,
"message"
:
' '
,
"trigger"
:
'blur'
},]
},
// {"type":"select","refModel":"auth.role","isMulti":true,"label":"角色","prop":"roles","labelField":"name","valueField":"id","style":""},
]
}
]
},
"auths"
:
{
"add"
:
[
{
"icon"
:
"ios-add-circle-outline"
,
"title"
:
"新增"
,
"type"
:
"text"
,
"key"
:
"create"
,
"isOnGrid"
:
true
},
{
"icon"
:
"ios-square-outline"
,
"title"
:
"保存"
,
"type"
:
"text"
,
"key"
:
"save"
,
"isOnForm"
:
true
},
{
"icon"
:
"ios-cloud-download-outline"
,
"title"
:
"下载"
,
"type"
:
"text"
,
"key"
:
"export"
,
"isOnGrid"
:
true
},
],
"edit"
:
[
{
"icon"
:
"ios-create-outline"
,
"title"
:
"修改"
,
"type"
:
"text"
,
"key"
:
"edit"
,
"isInRow"
:
true
}
],
"delete"
:
[
{
"icon"
:
"ios-trash-outline"
,
"title"
:
"删除"
,
"type"
:
"text"
,
"key"
:
"deletes"
,
"isOnGrid"
:
true
},
{
"icon"
:
"ios-trash-outline"
,
"title"
:
"删除"
,
"type"
:
"text"
,
"key"
:
"delete"
,
"isInRow"
:
true
},
],
"common"
:
[
{
"icon"
:
"ios-undo-outline"
,
"title"
:
"取消"
,
"type"
:
"text"
,
"key"
:
"cancel"
,
"isOnForm"
:
true
},
{
"icon"
:
"ios-undo-outline"
,
"title"
:
"取消"
,
"type"
:
"text"
,
"key"
:
"cancel-search"
,
"isInSearch"
:
true
},
{
"icon"
:
"ios-search-outline"
,
"title"
:
"搜索"
,
"type"
:
"text"
,
"key"
:
"start-search"
,
"isInSearch"
:
true
},
{
"icon"
:
"ios-search-outline"
,
"title"
:
"高级"
,
"type"
:
"text"
,
"key"
:
"adv-search"
,
"isOnGrid"
:
true
},
],
}
}
iview-admin/src/store/module/metainfo/roleinfo.js
0 → 100644
View file @
993f09c9
export
default
{
bizCode
:
"roleinfo"
,
name
:
"用户信息维护"
,
list
:
[
{
title
:
'编码'
,
key
:
'code'
,
sortable
:
true
,
insearch
:
true
},
{
title
:
'角色'
,
key
:
'name'
,
sortable
:
true
,
insearch
:
true
},
//slot--自定义列 insearch--是否快速查询
{
title
:
'是否系统'
,
key
:
'isSystem'
,
sortable
:
false
,
insearch
:
false
,
slot
:
'isSystem'
},
{
title
:
'创建时间'
,
key
:
'created_at'
,
insearch
:
false
,
slot
:
'created_at'
},
{
title
:
'操作'
,
key
:
'handle'
,
button
:
[
//这个数组中内容,需要按照权限字符串,在服务端构造
]
}
],
"form"
:
{
name
:
"xxx"
,
main
:
[
{
"title"
:
"基本信息"
,
ctls
:
[
{
"type"
:
"input"
,
"label"
:
"编码"
,
"prop"
:
"code"
,
"placeHolder"
:
"请输入角色编码"
,
"style"
:
""
,
rules
:
[{
"required"
:
true
,
"message"
:
' '
,
"trigger"
:
'blur'
},]
},
{
"type"
:
"input"
,
"label"
:
"名称"
,
"prop"
:
"name"
,
"placeHolder"
:
"请输入角色名称"
,
"style"
:
""
,
rules
:
[{
"required"
:
true
,
"message"
:
' '
,
"trigger"
:
'blur'
},]
},
]
},
],
lists
:
[
]
},
"search"
:
{
name
:
"search"
,
main
:
[
{
"title"
:
"基本信息"
,
"key"
:
"baseinfo"
,
ctls
:
[
{
"type"
:
"input"
,
"label"
:
"编码"
,
"prop"
:
"code"
,
"placeHolder"
:
"请输入角色编码"
,
"style"
:
""
,
rules
:
[]
},
{
"type"
:
"input"
,
"label"
:
"名称"
,
"prop"
:
"name"
,
"placeHolder"
:
"请输入角色名称"
,
"style"
:
""
,
rules
:
[]
},
]
}
]
},
"auths"
:
{
"add"
:
[
{
"icon"
:
"ios-add-circle-outline"
,
"title"
:
"新增"
,
"type"
:
"text"
,
"key"
:
"create"
,
"isOnGrid"
:
true
},
{
"icon"
:
"ios-square-outline"
,
"title"
:
"保存"
,
"type"
:
"text"
,
"key"
:
"save"
,
"isOnForm"
:
true
},
// { "icon": "ios-cloud-download-outline", "title": "下载", "type": "text", "key": "export", "isOnGrid": true },
],
"edit"
:
[
{
"icon"
:
"ios-create-outline"
,
"title"
:
"修改"
,
"type"
:
"text"
,
"key"
:
"edit"
,
"isInRow"
:
true
}
],
"delete"
:
[
{
"icon"
:
"ios-trash-outline"
,
"title"
:
"删除"
,
"type"
:
"text"
,
"key"
:
"delete"
,
"isInRow"
:
true
},
],
"common"
:
[
{
"icon"
:
"ios-undo-outline"
,
"title"
:
"取消"
,
"type"
:
"text"
,
"key"
:
"cancel"
,
"isOnForm"
:
true
},
{
"icon"
:
"ios-undo-outline"
,
"title"
:
"取消"
,
"type"
:
"text"
,
"key"
:
"cancel-search"
,
"isInSearch"
:
true
},
{
"icon"
:
"ios-search-outline"
,
"title"
:
"搜索"
,
"type"
:
"text"
,
"key"
:
"start-search"
,
"isInSearch"
:
true
},
{
"icon"
:
"ios-search-outline"
,
"title"
:
"高级"
,
"type"
:
"text"
,
"key"
:
"adv-search"
,
"isOnGrid"
:
true
},
],
}
}
iview-admin/src/store/module/metainfo/userinfo.js
View file @
993f09c9
...
@@ -22,8 +22,10 @@ export default {
...
@@ -22,8 +22,10 @@ export default {
{
{
"title"
:
"关键信息"
,
"title"
:
"关键信息"
,
ctls
:[
ctls
:[
{
"type"
:
"switch"
,
"label"
:
"是否管理员"
,
"prop"
:
"isAdmin"
,
"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/appinfo/appinfo_page.vue
0 → 100644
View file @
993f09c9
<
template
>
<div>
<BizTable
ref=
"bt"
:formatCol=
"formatCol"
metaName=
"app_info"
packageName=
"common"
isMulti
></BizTable>
</div>
</
template
>
<
script
>
import
BizTable
from
"../components/tables/biztables"
;
export
default
{
name
:
"appinfo_page"
,
data
()
{
return
{};
},
components
:
{
BizTable
},
methods
:
{
// onnew() {
// this.$refs.bt.setFormCtlVisable("userName", true);
// },
// onedit() {
// this.$refs.bt.setFormCtlVisable("userName", false);
// },
formatCol
(
row
,
key
,
index
)
{
// if (key == "roleName") {
// let rolestr = row.Roles.map(item => item.name).join(",");
// row.roles = row.Roles.map(item => item.id);
// return `
<
span
>
$
{
rolestr
}
<
/span>`
;
// }
// if (key == "isAdmin" || key == "isSuper") {
// return `
<
span
>
$
{
row
[
key
]
?
"是"
:
"否"
}
<
/span>`
;
// }
if
(
key
==
"created_at"
)
{
return
`<span>
${
new
Date
(
row
[
key
]).
toLocaleString
()}
</span>`
;
}
return
row
[
key
];
}
}
};
</
script
>
<
style
>
</
style
>
iview-admin/src/view/components/tables/biztables.vue
View file @
993f09c9
<
template
>
<
template
>
<div>
<div>
<Card
style=
"height:100%"
>
<Card
style=
"height:100%"
>
<Drawer
placement=
"right"
:closable=
"false"
v-model=
"showsearch"
width=
"600"
>
<Drawer
placement=
"right"
:closable=
"false"
:mask-closable=
"false"
v-model=
"showsearch"
width=
"600"
>
<Forms
ref=
"searchform"
:fminfo=
"searchinfo"
style=
"height:100%"
>
<Forms
ref=
"searchform"
:fminfo=
"searchinfo"
style=
"height:100%"
>
<template
v-slot:default=
"slotProps"
>
<template
v-slot:default=
"slotProps"
>
<Button
<Button
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
</div>
</div>
</div>
</div>
<!-- <Button style="margin: 10px 0;" type="primary" @click="exportExcel">导出为Csv文件</Button> -->
<!-- <Button style="margin: 10px 0;" type="primary" @click="exportExcel">导出为Csv文件</Button> -->
<Drawer
placement=
"right"
:closable=
"false"
v-model=
"showedform"
width=
"70"
>
<Drawer
placement=
"right"
:closable=
"false"
:mask-closable=
"false"
v-model=
"showedform"
width=
"70"
>
<Forms
ref=
"edform"
:fminfo=
"forminfo"
style=
"height:100%"
>
<Forms
ref=
"edform"
:fminfo=
"forminfo"
style=
"height:100%"
>
<
template
v-slot:default=
"slotProps"
>
<
template
v-slot:default=
"slotProps"
>
<Button
<Button
...
...
iview-admin/src/view/components/tables/forms/childs/uploads.vue
View file @
993f09c9
...
@@ -98,30 +98,26 @@ export default {
...
@@ -98,30 +98,26 @@ export default {
//to do --添加修改时已经有逻辑,fileList中没有
//to do --添加修改时已经有逻辑,fileList中没有
const
fileList
=
this
.
uploadList
;
const
fileList
=
this
.
uploadList
;
this
.
uploadList
.
splice
(
fileList
.
indexOf
(
file
),
1
);
this
.
uploadList
.
splice
(
fileList
.
indexOf
(
file
),
1
);
let
cresults
=
this
.
result
.
split
(
","
)
let
cresults
=
this
.
result
.
split
(
","
);
let
cs
=
cresults
.
filter
(
r
=>
{
let
cs
=
cresults
.
filter
(
r
=>
{
return
r
!=
file
.
url
return
r
!=
file
.
url
;
})
})
;
this
.
result
=
cs
.
join
(
","
)
this
.
result
=
cs
.
join
(
","
);
this
.
$emit
(
'change'
,
this
.
result
)
this
.
$emit
(
"change"
,
this
.
result
);
},
},
handleSuccess
(
res
,
file
,
fileList
)
{
handleSuccess
(
res
,
file
,
fileList
)
{
// var xml= this.loadXML(res);
// var xml= this.loadXML(res);
// this.result=xml.documentElement.getElementsByTagName("Location")[0].textContent;
// this.result=xml.documentElement.getElementsByTagName("Location")[0].textContent;
//解析filelist,构造逗号分隔的文件列表
//解析filelist,构造逗号分隔的文件列表
console
.
log
(
"/////////////////////////////////////////"
,
fileList
);
console
.
log
(
"/////////////////////////////////////////"
,
fileList
);
let
mps
=
fileList
.
map
(
item
=>
{
let
xml
=
this
.
loadXML
(
res
);
if
(
item
.
status
==
"finished"
)
{
let
tmp
=
xml
.
documentElement
.
getElementsByTagName
(
"Location"
)[
0
].
textContent
;
if
(
item
.
response
)
{
let
upstrs
=
this
.
uploadList
.
map
(
it
=>
{
let
xml
=
this
.
loadXML
(
item
.
response
);
return
it
.
url
;
let
tmp
=
xml
.
documentElement
.
getElementsByTagName
(
"Location"
)[
0
]
.
textContent
;
return
tmp
;
}
}
});
});
mps
.
push
(
this
.
result
);
upstrs
.
push
(
tmp
)
this
.
result
=
mps
.
join
(
","
);
this
.
result
=
upstrs
.
join
(
","
)
console
.
log
(
"upload..."
,
this
.
result
)
this
.
$emit
(
"change"
,
this
.
result
);
this
.
$emit
(
"change"
,
this
.
result
);
},
},
handleFormatError
(
file
)
{
handleFormatError
(
file
)
{
...
@@ -146,7 +142,7 @@ export default {
...
@@ -146,7 +142,7 @@ export default {
title
:
"Up to five pictures can be uploaded."
title
:
"Up to five pictures can be uploaded."
});
});
}
}
//
this.result = "";
this
.
result
=
""
;
var
myDate
=
new
Date
();
var
myDate
=
new
Date
();
var
key
=
var
key
=
"zc_"
+
"zc_"
+
...
@@ -207,24 +203,15 @@ export default {
...
@@ -207,24 +203,15 @@ export default {
value
:
function
(
v
)
{
value
:
function
(
v
)
{
this
.
result
=
v
;
this
.
result
=
v
;
//打开窗口,给vaue属性赋予值
//打开窗口,给vaue属性赋予值
this
.
$refs
.
upload
.
file
List
=
[];
this
.
upload
List
=
[];
if
(
this
.
result
&&
this
.
result
!=
""
)
{
if
(
this
.
result
&&
this
.
result
!=
""
)
{
console
.
log
(
">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>."
);
console
.
log
(
">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>."
);
console
.
log
(
this
.
result
);
let
i
=
10
;
let
i
=
10
;
this
.
result
.
split
(
","
).
forEach
(
item
=>
{
this
.
result
.
split
(
","
).
forEach
(
item
=>
{
let
sb
=
this
.
uploadList
.
some
(
s
=>
{
this
.
uploadList
.
push
({
name
:
i
++
,
url
:
item
,
status
:
"finished"
});
if
(
s
.
url
)
{
return
s
.
url
==
item
;
}
});
if
(
!
sb
)
{
this
.
uploadList
.
push
({
name
:
i
++
,
url
:
item
,
status
:
"finished"
});
}
});
});
}
else
{
}
this
.
uploadList
=
[]
}
}
}
}
}
};
};
...
...
iview-admin/src/view/components/tables/forms/forms.vue
View file @
993f09c9
...
@@ -11,8 +11,8 @@
...
@@ -11,8 +11,8 @@
<TabPane
label=
"表单信息"
name=
"main"
>
<TabPane
label=
"表单信息"
name=
"main"
>
<template
v-for=
"group in forminfo.main"
>
<template
v-for=
"group in forminfo.main"
>
<Divider
orientation=
"left"
:key=
"group.title"
>
{{
group
.
title
}}
</Divider>
<Divider
orientation=
"left"
:key=
"group.title"
>
{{
group
.
title
}}
</Divider>
<Row
type=
"flex"
justify=
"start"
align=
"top"
:key=
"'r'+group.title"
>
<Row
type=
"flex"
justify=
"start"
:key=
"'r'+group.title"
>
<Col
:xs=
"2"
:sm=
"4"
:md=
"6"
:lg=
"8"
v-for=
"ctl in group.ctls"
:key=
"ctl.prop"
>
<Col
:xs=
"2"
:sm=
"4"
:md=
"6"
:lg=
"8"
v-for=
"ctl in group.ctls"
:key=
"ctl.prop"
>
<FormItem
v-if=
"ctlVisable[ctl.prop]"
:label=
"ctl.label"
:prop=
"ctl.prop"
>
<FormItem
v-if=
"ctlVisable[ctl.prop]"
:label=
"ctl.label"
:prop=
"ctl.prop"
>
<template
v-if=
"ctl.type=='input'"
>
<template
v-if=
"ctl.type=='input'"
>
<input
v-model=
"formModel[ctl.prop]"
>
<input
v-model=
"formModel[ctl.prop]"
>
...
...
iview-admin/src/view/roleinfo/roleinfo_page.vue
0 → 100644
View file @
993f09c9
<
template
>
<div>
<BizTable
ref=
"bt"
:formatCol=
"formatCol"
metaName=
"role_info"
packageName=
"auth"
isMulti
></BizTable>
</div>
</
template
>
<
script
>
import
BizTable
from
"../components/tables/biztables"
;
export
default
{
name
:
"roleinfo_page"
,
data
()
{
return
{};
},
components
:
{
BizTable
},
methods
:
{
// onnew() {
// this.$refs.bt.setFormCtlVisable("userName", true);
// },
// onedit() {
// this.$refs.bt.setFormCtlVisable("userName", false);
// },
formatCol
(
row
,
key
,
index
)
{
// if (key == "roleName") {
// let rolestr = row.Roles.map(item => item.name).join(",");
// row.roles = row.Roles.map(item => item.id);
// return `
<
span
>
$
{
rolestr
}
<
/span>`
;
// }
// if (key == "isAdmin" || key == "isSuper") {
// return `
<
span
>
$
{
row
[
key
]
?
"是"
:
"否"
}
<
/span>`
;
// }
if
(
key
==
"created_at"
)
{
return
`<span>
${
new
Date
(
row
[
key
]).
toLocaleString
()}
</span>`
;
}
return
row
[
key
];
}
}
};
</
script
>
<
style
>
</
style
>
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