更改多个项目或清单选择问题 修复ref相同导致的bug
This commit is contained in:
@@ -305,7 +305,7 @@
|
|||||||
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
||||||
fontWeight: 'bold', height: '48px'}"
|
fontWeight: 'bold', height: '48px'}"
|
||||||
@selection-change="selectListChange"
|
@selection-change="selectListChange"
|
||||||
ref="selection"
|
ref="listSelection"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
@@ -535,8 +535,8 @@ export default {
|
|||||||
selectListChange(data) {
|
selectListChange(data) {
|
||||||
// 单选
|
// 单选
|
||||||
if (data.length > 1) {
|
if (data.length > 1) {
|
||||||
this.$refs.selection.clearSelection()
|
this.$refs.listSelection.clearSelection()
|
||||||
this.$refs.selection.toggleRowSelection(data.pop())
|
this.$refs.listSelection.toggleRowSelection(data.pop())
|
||||||
}
|
}
|
||||||
this.multipleSelection = data
|
this.multipleSelection = data
|
||||||
|
|
||||||
|
|||||||
@@ -179,7 +179,7 @@
|
|||||||
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
||||||
fontWeight: 'bold', height: '48px'}"
|
fontWeight: 'bold', height: '48px'}"
|
||||||
@selection-change="selectProjectChange"
|
@selection-change="selectProjectChange"
|
||||||
ref="selection"
|
ref="projectSelection"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
@@ -282,7 +282,7 @@
|
|||||||
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
||||||
fontWeight: 'bold', height: '48px'}"
|
fontWeight: 'bold', height: '48px'}"
|
||||||
@selection-change="selectListChange"
|
@selection-change="selectListChange"
|
||||||
ref="selection"
|
ref="listSelection"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
@@ -594,8 +594,8 @@ export default {
|
|||||||
selectListChange(data) {
|
selectListChange(data) {
|
||||||
// 单选
|
// 单选
|
||||||
if (data.length > 1) {
|
if (data.length > 1) {
|
||||||
this.$refs.selection.clearSelection()
|
this.$refs.listSelection.clearSelection()
|
||||||
this.$refs.selection.toggleRowSelection(data.pop())
|
this.$refs.listSelection.toggleRowSelection(data.pop())
|
||||||
}
|
}
|
||||||
this.multipleSelection = data
|
this.multipleSelection = data
|
||||||
|
|
||||||
@@ -605,8 +605,8 @@ export default {
|
|||||||
selectProjectChange(data) {
|
selectProjectChange(data) {
|
||||||
// 单选
|
// 单选
|
||||||
if (data.length > 1) {
|
if (data.length > 1) {
|
||||||
this.$refs.selection.clearSelection()
|
this.$refs.projectSelection.clearSelection()
|
||||||
this.$refs.selection.toggleRowSelection(data.pop())
|
this.$refs.projectSelection.toggleRowSelection(data.pop())
|
||||||
}
|
}
|
||||||
this.multipleSelection = data
|
this.multipleSelection = data
|
||||||
|
|
||||||
|
|||||||
@@ -178,7 +178,7 @@
|
|||||||
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
||||||
fontWeight: 'bold', height: '48px'}"
|
fontWeight: 'bold', height: '48px'}"
|
||||||
@selection-change="selectProjectChange"
|
@selection-change="selectProjectChange"
|
||||||
ref="selection"
|
ref="projectSelection"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
@@ -281,7 +281,7 @@
|
|||||||
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
||||||
fontWeight: 'bold', height: '48px'}"
|
fontWeight: 'bold', height: '48px'}"
|
||||||
@selection-change="selectListChange"
|
@selection-change="selectListChange"
|
||||||
ref="selection"
|
ref="listSelection"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
type="selection"
|
type="selection"
|
||||||
@@ -593,8 +593,8 @@ export default {
|
|||||||
selectListChange(data) {
|
selectListChange(data) {
|
||||||
// 单选
|
// 单选
|
||||||
if (data.length > 1) {
|
if (data.length > 1) {
|
||||||
this.$refs.selection.clearSelection()
|
this.$refs.listSelection.clearSelection()
|
||||||
this.$refs.selection.toggleRowSelection(data.pop())
|
this.$refs.listSelection.toggleRowSelection(data.pop())
|
||||||
}
|
}
|
||||||
this.multipleSelection = data
|
this.multipleSelection = data
|
||||||
|
|
||||||
@@ -604,8 +604,8 @@ export default {
|
|||||||
selectProjectChange(data) {
|
selectProjectChange(data) {
|
||||||
// 单选
|
// 单选
|
||||||
if (data.length > 1) {
|
if (data.length > 1) {
|
||||||
this.$refs.selection.clearSelection()
|
this.$refs.projectSelection.clearSelection()
|
||||||
this.$refs.selection.toggleRowSelection(data.pop())
|
this.$refs.projectSelection.toggleRowSelection(data.pop())
|
||||||
}
|
}
|
||||||
this.multipleSelection = data
|
this.multipleSelection = data
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user