Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
fukai
vue-gjjs
Commits
c3644195
Commit
c3644195
authored
Jun 21, 2021
by
潘际乾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
表格多选
parent
ccf3c122
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
6 deletions
+44
-6
IStreamTable.vue
src/components/IStreamTable.vue
+31
-2
Inftrnps.vue
src/views/Business/Trnrel/Inftrnps.vue
+13
-4
No files found.
src/components/IStreamTable.vue
View file @
c3644195
<
template
>
<
template
>
<div
class=
"eContainer-table-block"
>
<div
class=
"eContainer-table-block"
>
<el-table
:data=
"tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
style=
"width: 100%"
class=
"eContainer-table"
:header-cell-style=
"
{background: 'eef1f6', color: '#606266'}">
<el-table
:data=
"tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)"
style=
"width: 100%"
class=
"eContainer-table"
@
selection-change=
"handleSelectionChange"
:row-key=
"getRowKey"
:header-cell-style=
"
{background: 'eef1f6', color: '#606266'}">
<el-table-column
type=
"selection"
width=
"55"
v-if=
"showSelection"
:reserve-selection=
"true"
></el-table-column>
<el-table-column
<el-table-column
v-for=
"(item, key) in tableColumns"
v-for=
"(item, key) in tableColumns"
:key=
"key"
:key=
"key"
...
@@ -40,6 +46,10 @@ export default {
...
@@ -40,6 +46,10 @@ export default {
return
[];
return
[];
},
},
},
},
showSelection
:
{
type
:
Boolean
,
default
:
false
}
},
},
computed
:
{
computed
:
{
tableColumns
()
{
tableColumns
()
{
...
@@ -84,7 +94,26 @@ export default {
...
@@ -84,7 +94,26 @@ export default {
},
},
currentChange
(
currentPage
)
{
currentChange
(
currentPage
)
{
this
.
currentPage
=
currentPage
;
this
.
currentPage
=
currentPage
;
}
},
handleSelectionChange
(
val
)
{
this
.
$emit
(
"multipleSelect"
,
this
.
getSelectedRowIndex
(
val
))
},
getRowKey
(
row
)
{
return
row
[
'1'
]
},
getSelectedRowIndex
(
val
)
{
const
indexArr
=
[]
for
(
let
j
=
0
;
j
<
val
.
length
;
j
++
)
{
const
v
=
val
[
j
];
for
(
let
i
=
0
;
i
<
this
.
tableData
.
length
;
i
++
)
{
const
data
=
this
.
tableData
[
i
];
if
(
v
[
1
]
===
data
[
1
])
{
indexArr
.
push
(
i
)
}
}
}
return
indexArr
}
}
}
};
};
</
script
>
</
script
>
...
...
src/views/Business/Trnrel/Inftrnps.vue
View file @
c3644195
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
<c-button
size=
"small"
type=
"primary"
disabled=
"disabled"
@
click=
"onImgmodHisimg"
>
<c-button
size=
"small"
type=
"primary"
disabled=
"disabled"
@
click=
"onImgmodHisimg"
>
Old.img
Old.img
</c-button>
</c-button>
<c-button
size=
"small"
type=
"primary"
disabled=
"d
isabled"
@
click=
"onRelrow"
>
<c-button
size=
"small"
type=
"primary"
:disabled=
"relrowD
isabled"
@
click=
"onRelrow"
>
Release
Release
</c-button>
</c-button>
<c-button
size=
"small"
type=
"primary"
disabled=
"disabled"
@
click=
"onReprow"
>
<c-button
size=
"small"
type=
"primary"
disabled=
"disabled"
@
click=
"onReprow"
>
...
@@ -221,7 +221,7 @@
...
@@ -221,7 +221,7 @@
</el-col>
-->
</el-col>
-->
<!--
<p>
{{
model
.
trncorco
.
trnstm
}}
</p>
-->
<!--
<p>
{{
model
.
trncorco
.
trnstm
}}
</p>
-->
<c-istream-table
:list=
"stmData.data"
:columns=
"stmData.columns"
>
<c-istream-table
:list=
"stmData.data"
:columns=
"stmData.columns"
:showSelection=
"true"
v-on:multipleSelect=
"multipleSelect"
>
<el-table-column
<el-table-column
prop=
"display"
prop=
"display"
label=
"Display"
label=
"Display"
...
@@ -272,10 +272,19 @@ export default {
...
@@ -272,10 +272,19 @@ export default {
],
],
data
:
[
data
:
[
]
]
}
},
relrowDisabled
:
true
,
multipleSelection
:
[]
}
}
},
},
methods
:{...
Event
},
methods
:{
multipleSelect
(
val
)
{
// TODO 根据Status判断按钮是否禁用
this
.
relrowDisabled
=
!
(
val
.
length
>
0
);
this
.
multipleSelection
=
val
;
},
...
Event
},
created
:
function
(){
created
:
function
(){
},
},
computed
:{
computed
:{
...
...
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