Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VueElementTemplate
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄瑜
VueElementTemplate
Commits
d26ead50
Commit
d26ead50
authored
Feb 22, 2018
by
高天阳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
面板添加详情
parent
4d57370d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
17 deletions
+24
-17
HmComplexPanel.vue
src/views/haomo/components/panel/HmComplexPanel.vue
+17
-11
index.vue
src/views/haomo/components/panel/index.vue
+7
-6
No files found.
src/views/haomo/components/panel/HmComplexPanel.vue
View file @
d26ead50
...
...
@@ -8,11 +8,8 @@
</div>
<div
:style=
"hmPanelHeight"
:class=
"hmContentClass"
>
<span>
{{
hmContentText
}}
</span>
<!--
<el-form
:data=
"detail"
label-width=
"110px"
status-icon
style=
"width:80%;margin:0 auto"
>
-->
<!--
<el-form-item
v-for=
"(column,index) in showColumns"
:key=
"index"
:label=
"column.name"
>
-->
<!--
<div>
{{
detail
[
column
.
codeCamel
]
}}
</div>
-->
<!--
</el-form-item>
-->
<!--
</el-form>
-->
<hm-complex-detail
:schema=
"schema['HmUser']"
:tableId=
"userId"
:columns=
"showFields"
>
</hm-complex-detail>
</div>
</el-card>
</el-col>
...
...
@@ -20,6 +17,8 @@
</
template
>
<
script
>
import
HmComplexDetail
from
'../details/HmComplexDetail.vue'
import
schema
from
'../../schemas/hm_org_schema'
import
_
from
'lodash'
import
request
from
'@/utils/request'
...
...
@@ -28,7 +27,9 @@
// 继承其他组件
extends
:
{},
// 使用其它组件
components
:
{},
components
:
{
'hm-complex-detail'
:
HmComplexDetail
},
props
:
{
/**
* 组件所使用的表定义schema。表定义schema,请使用 model2codejs 从pdm文件生成schema。
...
...
@@ -68,23 +69,23 @@
* 在详情页需要传入用户的id用来带出用户信息
* */
userId
:
{
type
:
null
,
type
:
String
,
required
:
true
},
hmTitle
:
{
type
:
null
,
type
:
String
,
required
:
false
},
hmTitleClass
:
{
type
:
null
,
type
:
String
,
required
:
false
},
hmContentClass
:
{
type
:
null
,
type
:
String
,
required
:
false
},
hmContentText
:
{
type
:
null
,
type
:
String
,
required
:
false
},
hmStyle
:
{
...
...
@@ -98,6 +99,10 @@
hmCollapse
:
{
type
:
null
,
required
:
false
},
showFields
:
{
type
:
Object
,
required
:
false
}
},
data
()
{
...
...
@@ -112,6 +117,7 @@
filters
:
{
},
created
()
{
this
.
schema
=
schema
this
.
getList
()
this
.
init
()
},
...
...
src/views/haomo/components/panel/index.vue
View file @
d26ead50
<
template
>
<div>
<hm-complex-panel
:schema=
"schema['HmUser']"
:userId=
"userId"
:hmTitle=
"hmTitle"
:hmTitleClass=
"hmTitleClass"
:hmContentText=
"hmContentText"
:hmStyle=
"hmStyle"
:hmPanelHeight=
"hmPanelHeight"
:hmCollapse=
"collapses"
>
</hm-complex-panel>
<hm-complex-panel
:schema=
"schema['HmUser']"
:userId=
"userId"
:hmTitle=
"titleBak"
:hmContentClass=
"hmContentClass"
:showFields=
"showFields"
:hmContentText=
"hmContentTextBak"
:hmStyle=
"styleBak"
:hmPanelHeight=
"panelHeightBak"
:hmCollapse=
"collapseBak"
>
:hmStyle=
"styleBak"
:hmPanelHeight=
"panelHeightBak"
:hmCollapse=
"collapseBak"
>
</hm-complex-panel>
<hm-complex-panel
:schema=
"schema['HmUser']"
:userId=
"userId2"
:hmTitle=
"hmTitle"
:hmTitleClass=
"hmTitleClass"
:showFields=
"showFields2"
:hmContentText=
"hmContentText"
:hmStyle=
"hmStyle"
:hmPanelHeight=
"hmPanelHeight"
:hmCollapse=
"collapses"
>
</hm-complex-panel>
</div>
</
template
>
...
...
@@ -33,6 +33,7 @@
created
()
{
this
.
schema
=
schema
this
.
userId
=
'0e26566e953449a7a7500c34be39fd26'
this
.
userId2
=
'1efff63125954583b0ac5a9c252b9041'
this
.
hmTitle
=
'面版名称'
this
.
hmTitleClass
=
'center'
this
.
hmContentClass
=
'center'
...
...
@@ -47,11 +48,11 @@
}
this
.
collapses
=
12
this
.
showFields
=
[
'username'
,
'loginid'
,
'password'
,
'mobile'
,
'email'
]
this
.
showFields2
=
[
'mobile'
,
'loginid'
]
this
.
titleBak
=
'测试面板'
this
.
hmContentTextBak
=
'我测试一下'
this
.
styleBak
=
{
width
:
'100%'
,
background
:
'#f56c6c
'
,
marginTop
:
'20px
'
,
marginBottom
:
'20px'
}
this
.
panelHeightBak
=
{
...
...
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