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
c6e33134
Commit
c6e33134
authored
Apr 24, 2018
by
杨柠瑞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coding
parent
62f6c900
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
16 deletions
+20
-16
HmComplexTable.vue
src/views/haomo/components/tables/HmComplexTable.vue
+20
-16
No files found.
src/views/haomo/components/tables/HmComplexTable.vue
View file @
c6e33134
...
@@ -96,11 +96,11 @@
...
@@ -96,11 +96,11 @@
<el-button
class=
"filter-item"
:style=
"titleButtonStyle"
type=
"primary"
v-waves
icon=
"el-icon-close"
v-if=
"multipleSelection.length"
@
click=
"BatchRemove"
>
批量删除
</el-button>
<el-button
class=
"filter-item"
:style=
"titleButtonStyle"
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>
<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>
<!-- end 过滤 -->
<!-- end 过滤 -->
<!-- 表格 -->
<!-- 表格 -->
<el-table
:data=
"list"
v-loading=
"listLoading"
element-loading-text=
"给我一点时间"
border
fit
highlight-current-row
:cell-style=
"cellStyle"
ref=
"multipleTable"
<el-table
:data=
"list"
v-loading=
"listLoading"
element-loading-text=
"给我一点时间"
border
fit
highlight-current-row
:cell-style=
"cellStyle"
ref=
"multipleTable"
:style=
"tableStyle"
@
selection-change=
"handleSelectionChange"
@
sort-change=
"sortChange"
@
current-change=
"tableCurrentChange"
>
:style=
"tableStyle"
@
selection-change=
"handleSelectionChange"
@
sort-change=
"sortChange"
@
current-change=
"tableCurrentChange"
>
...
@@ -110,7 +110,7 @@
...
@@ -110,7 +110,7 @@
:prop=
"column.codeCamel"
:sortable=
"column.isSort"
:width=
"column.width"
:show-overflow-tooltip=
"showOverflowTooltip"
>
:prop=
"column.codeCamel"
:sortable=
"column.isSort"
:width=
"column.width"
:show-overflow-tooltip=
"showOverflowTooltip"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"(scope.row[column.codeCamel] !== false && scope.row[column.codeCamel] !== true )&& !column.render"
>
{{
scope
.
row
[
column
.
codeCamel
]
}}
</span>
<span
v-if=
"(scope.row[column.codeCamel] !== false && scope.row[column.codeCamel] !== true )&& !column.render"
>
{{
scope
.
row
[
column
.
codeCamel
]
}}
</span>
<el-checkbox
v-if=
"(scope.row[column.codeCamel] === false || scope.row[column.codeCamel] === true) && !column.render"
v-model=
"scope.row[column.codeCamel]"
></el-checkbox>
<el-checkbox
v-if=
"(scope.row[column.codeCamel] === false || scope.row[column.codeCamel] === true) && !column.render"
v-model=
"scope.row[column.codeCamel]"
@
change=
"column.checkbox(scope)"
></el-checkbox>
<span
v-if=
'column.render'
v-html=
"column.render(scope)"
></span>
<span
v-if=
'column.render'
v-html=
"column.render(scope)"
></span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -151,9 +151,9 @@
...
@@ -151,9 +151,9 @@
:relates=
"HmComplexForm.formRelates"
>
:relates=
"HmComplexForm.formRelates"
>
</hm-complex-form>
</hm-complex-form>
</el-dialog>
</el-dialog>
<!-- end 弹窗 -->
<!-- end 弹窗 -->
</div>
</div>
</template>
</template>
...
@@ -166,7 +166,7 @@
...
@@ -166,7 +166,7 @@
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'
import
HmFullCalendar
from
'../calendar/HmFullCalendar.vue'
/**
/**
* 毫末科技的表格组件.
* 毫末科技的表格组件.
*
*
...
@@ -472,6 +472,7 @@
...
@@ -472,6 +472,7 @@
init
()
{
init
()
{
const
self
=
this
const
self
=
this
self
.
operationWidth
=
0
// 处理要显示的列
// 处理要显示的列
if
(
!
self
.
columns
||
!
self
.
columns
.
length
)
{
if
(
!
self
.
columns
||
!
self
.
columns
.
length
)
{
_
.
each
(
self
.
schema
[
'columns'
],
function
(
column
)
{
_
.
each
(
self
.
schema
[
'columns'
],
function
(
column
)
{
...
@@ -513,7 +514,6 @@
...
@@ -513,7 +514,6 @@
delete
filters
[
tableName
][
'isShow'
]
delete
filters
[
tableName
][
'isShow'
]
self
.
$set
(
self
.
listQuery
,
'filters'
,
filters
)
self
.
$set
(
self
.
listQuery
,
'filters'
,
filters
)
}
}
if
(
!
request
.
defaults
.
baseURL
)
{
if
(
!
request
.
defaults
.
baseURL
)
{
request
.
defaults
.
baseURL
=
'/org/api'
request
.
defaults
.
baseURL
=
'/org/api'
}
}
...
@@ -567,33 +567,37 @@
...
@@ -567,33 +567,37 @@
request
(
self
.
schema
.
modelUnderscorePlural
,
{
request
(
self
.
schema
.
modelUnderscorePlural
,
{
params
:
params
params
:
params
}).
then
(
resp
=>
{
}).
then
(
resp
=>
{
let
respList
=
[]
if
(
resp
.
data
.
length
!==
0
&&
resp
.
data
[
0
].
superior
!==
undefined
&&
resp
.
data
[
0
].
includes
!==
undefined
&&
if
(
resp
.
data
.
length
!==
0
&&
resp
.
data
[
0
].
superior
!==
undefined
&&
resp
.
data
[
0
].
includes
!==
undefined
&&
resp
.
data
[
0
].
refers
!==
undefined
&&
resp
.
data
[
0
].
relates
!==
undefined
)
{
resp
.
data
[
0
].
refers
!==
undefined
&&
resp
.
data
[
0
].
relates
!==
undefined
)
{
self
.
l
ist
=
[]
respL
ist
=
[]
_
.
each
(
resp
.
data
,
function
(
item
,
index
)
{
_
.
each
(
resp
.
data
,
function
(
item
,
index
)
{
self
.
l
ist
.
push
(
item
.
superior
)
respL
ist
.
push
(
item
.
superior
)
})
})
}
else
{
}
else
{
self
.
list
=
resp
.
data
respList
=
_
.
cloneDeep
(
resp
.
data
)
}
}
self
.
total
=
parseInt
(
resp
.
headers
.
total
)
// 数据处理
// 数据处理
if
(
self
.
options
&&
self
.
options
.
dataProcessing
)
{
if
(
self
.
options
&&
self
.
options
.
dataProcessing
)
{
console
.
log
(
'NO-[object Promise]'
)
console
.
log
(
'NO-[object Promise]'
)
self
.
l
ist
=
self
.
options
.
dataProcessing
(
resp
.
data
,
params
,
self
.
definedOperate
)
respL
ist
=
self
.
options
.
dataProcessing
(
resp
.
data
,
params
,
self
.
definedOperate
)
}
}
if
(
self
.
options
&&
self
.
options
.
promiseProcessing
)
{
if
(
self
.
options
&&
self
.
options
.
promiseProcessing
)
{
self
.
options
.
promiseProcessing
(
resp
.
data
,
params
,
self
.
definedOperate
).
then
(
function
(
dataList
)
{
self
.
options
.
promiseProcessing
(
resp
.
data
,
params
,
self
.
definedOperate
).
then
(
function
(
dataList
)
{
if
(
self
.
options
&&
self
.
options
.
changeValue
)
{
respList
=
self
.
changeValue
(
respList
)
}
self
.
list
=
dataList
self
.
list
=
dataList
self
.
listLoading
=
false
})
})
return
false
}
}
// 数据库字段转化显示
// 数据库字段转化显示
if
(
self
.
options
&&
self
.
options
.
changeValue
)
{
if
(
self
.
options
&&
self
.
options
.
changeValue
)
{
self
.
list
=
self
.
changeValue
(
self
.
l
ist
)
respList
=
self
.
changeValue
(
respL
ist
)
}
}
self
.
list
=
respList
self
.
total
=
parseInt
(
resp
.
headers
.
total
)
self
.
listLoading
=
false
self
.
listLoading
=
false
})
})
},
},
...
...
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