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
a9718883
Commit
a9718883
authored
Apr 03, 2018
by
杨柠瑞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coding
parent
963b386d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
35 deletions
+51
-35
HmComplexTable.vue
src/views/haomo/components/tables/HmComplexTable.vue
+43
-35
index.vue
src/views/haomo/components/tables/index.vue
+8
-0
No files found.
src/views/haomo/components/tables/HmComplexTable.vue
View file @
a9718883
...
@@ -95,6 +95,7 @@
...
@@ -95,6 +95,7 @@
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"el-icon-refresh"
v-if=
"isShowRefresh"
@
click=
"refreshList"
>
刷新
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"el-icon-refresh"
v-if=
"isShowRefresh"
@
click=
"refreshList"
>
刷新
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"el-icon-close"
v-if=
"multipleSelection.length"
@
click=
"BatchRemove"
>
批量删除
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"el-icon-close"
v-if=
"multipleSelection.length"
@
click=
"BatchRemove"
>
批量删除
</el-button>
</span>
</span>
<hm-full-calendar
style=
"display: inline;margin-left: 10px;"
:schema=
"HmFullCalendar.calendarSchema"
:demoEvents=
"HmFullCalendar.demoEvents"
v-if=
"HmFullCalendar.calendarSchema"
></hm-full-calendar>
</el-form>
</el-form>
</div>
</div>
...
@@ -136,14 +137,13 @@
...
@@ -136,14 +137,13 @@
<!-- @TODO 补充详情弹窗 -->
<!-- @TODO 补充详情弹窗 -->
<el-dialog
:title=
"dialogName"
:visible
.
sync=
"dialogFormVisible"
:close-on-click-modal=
"closeOnClickModal"
width=
"dialogWidth"
v-if=
"dialogFormVisible"
>
<el-dialog
:title=
"dialogName"
:visible
.
sync=
"dialogFormVisible"
:close-on-click-modal=
"closeOnClickModal"
width=
"dialogWidth"
v-if=
"dialogFormVisible"
>
<hm-complex-form
:schema=
"formSchema"
<hm-complex-form
:schema=
"HmComplexForm.formSchema"
:columns=
"showUserColumns"
:columns=
"HmComplexForm.showUserColumns"
:buttons=
"showUserButtons"
:buttons=
"HmComplexForm.showUserButtons"
:layout=
"layout"
:layout=
"HmComplexForm.layout"
:tableId=
"tableId"
:tableId=
"HmComplexForm.tableId"
:tips=
"formTips"
:tips=
"HmComplexForm.formTips"
:formStyle=
"formStyle"
:formStyle=
"HmComplexForm.formStyle"
>
ref=
"selectfood"
>
</hm-complex-form>
</hm-complex-form>
</el-dialog>
</el-dialog>
...
@@ -160,6 +160,7 @@
...
@@ -160,6 +160,7 @@
import
*
as
excel
from
'@/vendor/Export2Excel'
import
*
as
excel
from
'@/vendor/Export2Excel'
import
{
Button
,
Table
,
TableColumn
,
Pagination
,
Loading
}
from
'element-ui'
import
{
Button
,
Table
,
TableColumn
,
Pagination
,
Loading
}
from
'element-ui'
import
HmComplexForm
from
'../forms/HmComplexForm.vue'
import
HmComplexForm
from
'../forms/HmComplexForm.vue'
import
HmFullCalendar
from
'../calendar/HmFullCalendar.vue'
/**
/**
* 毫末科技的表格组件.
* 毫末科技的表格组件.
...
@@ -178,7 +179,8 @@
...
@@ -178,7 +179,8 @@
'el-table'
:
Table
,
'el-table'
:
Table
,
'el-table-column'
:
TableColumn
,
'el-table-column'
:
TableColumn
,
'el-pagination'
:
Pagination
,
'el-pagination'
:
Pagination
,
'hm-complex-form'
:
HmComplexForm
'hm-complex-form'
:
HmComplexForm
,
'hm-full-calendar'
:
HmFullCalendar
},
},
// 混入公共对象
// 混入公共对象
mixins
:
[],
mixins
:
[],
...
@@ -361,14 +363,17 @@
...
@@ -361,14 +363,17 @@
isShowEditDataButton
:
false
,
// 是否显示编辑
isShowEditDataButton
:
false
,
// 是否显示编辑
isShowDeleteButton
:
false
,
// 是否显示删除
isShowDeleteButton
:
false
,
// 是否显示删除
isShowExport
:
false
,
// 是否显示导出按钮
isShowExport
:
false
,
// 是否显示导出按钮
formSchema
:
{},
// form弹窗的Schema定义
HmComplexForm
:
{
// 设置form组件
showUserColumns
:
[],
// form弹窗的Columns定义
formSchema
:
{},
// form弹窗的Schema定义
showUserButtons
:
[],
// from弹窗显示按钮,
showUserColumns
:
[],
// form弹窗的Columns定义
layout
:
{
left
:
0
,
middle
:
24
,
right
:
0
},
// form弹窗的布局方式
showUserButtons
:
[],
// from弹窗显示按钮,
tableId
:
''
,
layout
:
{
left
:
0
,
middle
:
24
,
right
:
0
},
// form弹窗的布局方式
formTips
:
''
,
tableId
:
''
,
formStyle
:
''
,
formTips
:
''
,
showOverflowTooltip
:
false
,
formStyle
:
''
},
showOverflowTooltip
:
false
,
// 设置当内容过长被隐藏时显示 tooltip
HmFullCalendar
:
{},
//
isShowRefresh
:
false
,
isShowRefresh
:
false
,
buttonGroup
:
false
,
buttonGroup
:
false
,
...
@@ -611,29 +616,29 @@
...
@@ -611,29 +616,29 @@
self
.
userDefined
.
definedDetail
(
true
,
data
)
self
.
userDefined
.
definedDetail
(
true
,
data
)
return
false
return
false
}
}
self
.
tableId
=
''
self
.
HmComplexForm
.
tableId
=
''
if
(
type
===
'editData'
)
{
if
(
type
===
'editData'
)
{
self
.
dialogName
=
'编辑'
self
.
dialogName
=
'编辑'
if
(
self
.
options
.
editData
.
showUserButtons
)
{
if
(
self
.
options
.
editData
.
showUserButtons
)
{
self
.
showUserButtons
=
self
.
options
.
editData
.
showUserButtons
self
.
showUserButtons
=
self
.
options
.
editData
.
showUserButtons
}
}
self
.
tableId
=
data
.
id
self
.
HmComplexForm
.
tableId
=
data
.
id
self
.
showUserColumns
=
self
.
options
.
editData
.
showUserColumns
self
.
HmComplexForm
.
showUserColumns
=
self
.
options
.
editData
.
showUserColumns
self
.
formSchema
=
self
.
options
.
editData
.
formSchema
self
.
HmComplexForm
.
formSchema
=
self
.
options
.
editData
.
formSchema
self
.
layout
=
self
.
options
.
editData
.
layout
self
.
HmComplexForm
.
layout
=
self
.
options
.
editData
.
layout
self
.
formTips
=
self
.
options
.
editData
.
tips
self
.
HmComplexForm
.
formTips
=
self
.
options
.
editData
.
tips
self
.
formStyle
=
self
.
options
.
editData
.
formStyle
self
.
HmComplexForm
.
formStyle
=
self
.
options
.
editData
.
formStyle
}
}
if
(
type
===
'newData'
)
{
if
(
type
===
'newData'
)
{
self
.
dialogName
=
'新建'
self
.
dialogName
=
'新建'
if
(
self
.
options
.
newData
.
showUserButtons
)
{
if
(
self
.
options
.
newData
.
showUserButtons
)
{
self
.
showUserButtons
=
self
.
options
.
newData
.
showUserButtons
self
.
showUserButtons
=
self
.
options
.
newData
.
showUserButtons
}
}
self
.
showUserColumns
=
self
.
options
.
newData
.
showUserColumns
self
.
HmComplexForm
.
showUserColumns
=
self
.
options
.
newData
.
showUserColumns
self
.
formSchema
=
self
.
options
.
newData
.
formSchema
self
.
HmComplexForm
.
formSchema
=
self
.
options
.
newData
.
formSchema
self
.
layout
=
self
.
options
.
newData
.
layout
self
.
HmComplexForm
.
layout
=
self
.
options
.
newData
.
layout
self
.
formTips
=
self
.
options
.
newData
.
tips
self
.
HmComplexForm
.
formTips
=
self
.
options
.
newData
.
tips
self
.
formStyle
=
self
.
options
.
newData
.
formStyle
self
.
HmComplexForm
.
formStyle
=
self
.
options
.
newData
.
formStyle
}
}
if
(
type
===
'detail'
)
{
if
(
type
===
'detail'
)
{
self
.
dialogName
=
'详情'
self
.
dialogName
=
'详情'
...
@@ -641,12 +646,12 @@
...
@@ -641,12 +646,12 @@
if
(
self
.
options
.
detailData
.
showUserButtons
)
{
if
(
self
.
options
.
detailData
.
showUserButtons
)
{
self
.
showUserButtons
=
self
.
options
.
detailData
.
showUserButtons
self
.
showUserButtons
=
self
.
options
.
detailData
.
showUserButtons
}
}
self
.
showUserColumns
=
self
.
options
.
showDetail
.
showUserColumns
self
.
HmComplexForm
.
showUserColumns
=
self
.
options
.
showDetail
.
showUserColumns
self
.
formSchema
=
self
.
options
.
showDetail
.
formSchema
self
.
HmComplexForm
.
formSchema
=
self
.
options
.
showDetail
.
formSchema
self
.
layout
=
self
.
options
.
showDetail
.
layout
self
.
HmComplexForm
.
layout
=
self
.
options
.
showDetail
.
layout
self
.
formTips
=
self
.
options
.
showDetail
.
tips
self
.
HmComplexForm
.
formTips
=
self
.
options
.
showDetail
.
tips
self
.
formStyle
=
self
.
options
.
showDetail
.
formStyle
self
.
HmComplexForm
.
formStyle
=
self
.
options
.
showDetail
.
formStyle
self
.
tableId
=
data
.
id
self
.
HmComplexForm
.
tableId
=
data
.
id
}
}
self
.
dialogFormVisible
=
true
self
.
dialogFormVisible
=
true
...
@@ -784,6 +789,9 @@
...
@@ -784,6 +789,9 @@
if
(
self
.
options
.
showOverflowTooltip
)
{
// 当内容过长被隐藏时显示 tooltip
if
(
self
.
options
.
showOverflowTooltip
)
{
// 当内容过长被隐藏时显示 tooltip
self
.
showOverflowTooltip
=
self
.
options
.
showOverflowTooltip
self
.
showOverflowTooltip
=
self
.
options
.
showOverflowTooltip
}
}
if
(
self
.
options
.
HmFullCalendar
)
{
// 当内容过长被隐藏时显示 tooltip
self
.
HmFullCalendar
=
self
.
options
.
HmFullCalendar
}
},
},
handleSelectionChange
(
val
)
{
handleSelectionChange
(
val
)
{
this
.
multipleSelection
=
val
this
.
multipleSelection
=
val
...
...
src/views/haomo/components/tables/index.vue
View file @
a9718883
...
@@ -82,6 +82,14 @@
...
@@ -82,6 +82,14 @@
showDetail
:
{
showDetail
:
{
isShow
:
true
isShow
:
true
},
},
HmFullCalendar
:
{
calendarSchema
:
schema
[
'HmUser'
],
demoEvents
:
{
title
:
'username'
,
start
:
'createTime'
,
end
:
'lastUpdateTime'
}
},
showRefresh
:
true
,
showRefresh
:
true
,
showExport
:
true
,
showExport
:
true
,
showDeleteButton
:
true
,
showDeleteButton
:
true
,
...
...
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