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
Show 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
...
...
@@ -110,7 +110,7 @@
:prop=
"column.codeCamel"
:sortable=
"column.isSort"
:width=
"column.width"
:show-overflow-tooltip=
"showOverflowTooltip"
>
<template
slot-scope=
"scope"
>
<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>
</
template
>
</el-table-column>
...
...
@@ -472,6 +472,7 @@
init
()
{
const
self
=
this
self
.
operationWidth
=
0
// 处理要显示的列
if
(
!
self
.
columns
||
!
self
.
columns
.
length
)
{
_
.
each
(
self
.
schema
[
'columns'
],
function
(
column
)
{
...
...
@@ -513,7 +514,6 @@
delete
filters
[
tableName
][
'isShow'
]
self
.
$set
(
self
.
listQuery
,
'filters'
,
filters
)
}
if
(
!
request
.
defaults
.
baseURL
)
{
request
.
defaults
.
baseURL
=
'/org/api'
}
...
...
@@ -567,33 +567,37 @@
request
(
self
.
schema
.
modelUnderscorePlural
,
{
params
:
params
}).
then
(
resp
=>
{
let
respList
=
[]
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
)
{
self
.
l
ist
=
[]
respL
ist
=
[]
_
.
each
(
resp
.
data
,
function
(
item
,
index
)
{
self
.
l
ist
.
push
(
item
.
superior
)
respL
ist
.
push
(
item
.
superior
)
})
}
else
{
self
.
list
=
resp
.
data
respList
=
_
.
cloneDeep
(
resp
.
data
)
}
self
.
total
=
parseInt
(
resp
.
headers
.
total
)
// 数据处理
if
(
self
.
options
&&
self
.
options
.
dataProcessing
)
{
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
)
{
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
.
listLoading
=
false
})
return
false
}
// 数据库字段转化显示
if
(
self
.
options
&&
self
.
options
.
changeValue
)
{
self
.
list
=
self
.
changeValue
(
self
.
l
ist
)
respList
=
self
.
changeValue
(
respL
ist
)
}
self
.
total
=
parseInt
(
resp
.
headers
.
total
)
self
.
list
=
respList
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