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
04e79534
Commit
04e79534
authored
Mar 12, 2018
by
杨柠瑞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
issues 23
parent
b581ade8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
11 deletions
+38
-11
HmComplexTable.vue
src/views/haomo/components/tables/HmComplexTable.vue
+35
-9
index.vue
src/views/haomo/components/tables/index.vue
+3
-2
No files found.
src/views/haomo/components/tables/HmComplexTable.vue
View file @
04e79534
...
@@ -13,11 +13,22 @@
...
@@ -13,11 +13,22 @@
</span>
</span>
<!-- end 过滤条件 -->
<!-- end 过滤条件 -->
<el-button-group
v-if=
"buttonGroup"
>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"el-icon-search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"el-icon-search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
:loading=
"downloadLoading"
v-waves
icon=
"el-icon-download"
v-if=
"isShowExport"
@
click=
"handleDownload"
>
导出
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
:loading=
"downloadLoading"
v-waves
icon=
"el-icon-download"
v-if=
"isShowExport"
@
click=
"handleDownload"
>
导出
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"el-icon-plus"
v-if=
"isShowNewButton"
@
click=
"openDialog('newData')"
>
新建
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"el-icon-plus"
v-if=
"isShowNewButton"
@
click=
"openDialog('newData')"
>
新建
</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-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>
</el-button-group>
<span
v-if=
"!buttonGroup"
>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"el-icon-search"
@
click=
"handleFilter"
>
搜索
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
:loading=
"downloadLoading"
v-waves
icon=
"el-icon-download"
v-if=
"isShowExport"
@
click=
"handleDownload"
>
导出
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
v-waves
icon=
"el-icon-plus"
v-if=
"isShowNewButton"
@
click=
"openDialog('newData')"
>
新建
</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>
</span>
</div>
</div>
<!-- end 过滤 -->
<!-- end 过滤 -->
...
@@ -176,12 +187,23 @@
...
@@ -176,12 +187,23 @@
* },
* },
* "newData": { // 新建按钮的配置
* "newData": { // 新建按钮的配置
* isShow: false, // 默认不显示新建按钮
* isShow: false, // 默认不显示新建按钮
* showUserColumns: [], // 新建表单的Columns配置
* showUserColumns: [], // 新建表单的Columns配置
,详情参考Form组件
* formSchema: {}, // 新建表单的schema配置
* formSchema: {}, // 新建表单的schema配置
* showUserButtons: ['提交', '取消'], // 新建表单的显示按钮
* showUserButtons: ['提交', '取消'], // 新建表单的显示按钮
* formConfirm() {}, // 新建的提交回调
* formConfirm() {}, // 新建的提交回调
* formCancel() {} // 新建的取消回调
* formCancel() {} // 新建的取消回调
* },
* },
* "editData": { // 编辑按钮的配置
* isShow: false, // 默认不显示编辑按钮
* showUserColumns: [], // 编辑表单的Columns配置,详情参考Form组件
* formSchema: {}, // 编辑表单的schema配置
* showUserButtons: ['提交', '取消'], // 编辑表单的显示按钮
* formConfirm() {}, // 编辑的提交回调
* formCancel() {} // 编辑的取消回调
* },
* showRefresh: false, //默认不显示刷新按钮
* showDeleteButton: false, //默认不显示删除按钮
* buttonGroup: false //默认不以按钮组的方式呈现button
* }
* }
*/
*/
options
:
{
options
:
{
...
@@ -222,7 +244,8 @@
...
@@ -222,7 +244,8 @@
showUserButtons
:
[],
// from弹窗显示按钮
showUserButtons
:
[],
// from弹窗显示按钮
tableId
:
''
,
tableId
:
''
,
isShowRefresh
:
false
isShowRefresh
:
false
,
buttonGroup
:
false
}
}
},
},
computed
:
{
computed
:
{
...
@@ -332,6 +355,9 @@
...
@@ -332,6 +355,9 @@
if
(
self
.
options
.
showDeleteButton
)
{
// 判断是否显示刷新按钮
if
(
self
.
options
.
showDeleteButton
)
{
// 判断是否显示刷新按钮
self
.
isShowDeleteButton
=
self
.
options
.
showDeleteButton
self
.
isShowDeleteButton
=
self
.
options
.
showDeleteButton
}
}
if
(
self
.
options
.
buttonGroup
)
{
// 设置按钮是否以按钮组呈现
self
.
buttonGroup
=
self
.
options
.
buttonGroup
}
console
.
log
(
request
.
defaults
)
console
.
log
(
request
.
defaults
)
console
.
log
(
`request.defaults.baseURL:
${
request
.
defaults
.
baseURL
}
`
)
console
.
log
(
`request.defaults.baseURL:
${
request
.
defaults
.
baseURL
}
`
)
},
},
...
@@ -390,13 +416,13 @@
...
@@ -390,13 +416,13 @@
formConfirm
()
{
formConfirm
()
{
this
.
options
.
newData
.
formConfirm
()
this
.
options
.
newData
.
formConfirm
()
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
self
.
getList
()
this
.
getList
()
},
},
// 表单的取消
// 表单的取消
formCancel
()
{
formCancel
()
{
this
.
options
.
newData
.
formCancel
()
this
.
options
.
newData
.
formCancel
()
this
.
dialogFormVisible
=
false
this
.
dialogFormVisible
=
false
self
.
getList
()
this
.
getList
()
},
},
// 删除过滤条件为空的filter
// 删除过滤条件为空的filter
deleteFilter
(
filters
)
{
deleteFilter
(
filters
)
{
...
...
src/views/haomo/components/tables/index.vue
View file @
04e79534
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
},
},
newData
:
{
newData
:
{
isShow
:
true
,
isShow
:
true
,
showUserColumns
:
[{
name
:
'username'
,
widgetType
:
1
}],
showUserColumns
:
[{
name
:
'username'
,
widgetType
:
1
}
,
{
name
:
'loginid'
,
widgetType
:
1
},
{
name
:
'type'
,
widgetType
:
1
}
],
formSchema
:
schema
[
'HmUser'
],
formSchema
:
schema
[
'HmUser'
],
showUserButtons
:
[
'提交'
,
'取消'
],
showUserButtons
:
[
'提交'
,
'取消'
],
formConfirm
()
{
formConfirm
()
{
...
@@ -62,7 +62,8 @@
...
@@ -62,7 +62,8 @@
},
},
showRefresh
:
true
,
showRefresh
:
true
,
showExport
:
true
,
showExport
:
true
,
showDeleteButton
:
true
showDeleteButton
:
true
,
buttonGroup
:
false
}
}
},
},
methods
:
{}
methods
:
{}
...
...
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