项目清单单选
This commit is contained in:
@@ -194,6 +194,7 @@
|
||||
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
||||
fontWeight: 'bold', height: '48px'}"
|
||||
@selection-change="selectProjectChange"
|
||||
@select="handleSelectionChange"
|
||||
ref="projectSelection"
|
||||
>
|
||||
<el-table-column
|
||||
@@ -297,6 +298,7 @@
|
||||
:header-cell-style="{background: '#f5f1f1', color: '#333333', fontSize: '16px',
|
||||
fontWeight: 'bold', height: '48px'}"
|
||||
@selection-change="selectListChange"
|
||||
@select="handleSelectionChanges"
|
||||
ref="listSelection"
|
||||
>
|
||||
<el-table-column
|
||||
@@ -457,13 +459,18 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
// 表格勾选
|
||||
handleSelectionChange(val) {
|
||||
// 单选
|
||||
if (val.length > 1) {
|
||||
this.$refs.table.clearSelection();
|
||||
this.$refs.table.toggleRowSelection(val.pop());
|
||||
handleSelectionChange(selection, val) {
|
||||
if (selection.length > 1) {
|
||||
let del_row = selection.shift();
|
||||
this.$refs.projectSelection.toggleRowSelection(del_row, false);
|
||||
// this.$refs.listSelection.toggleRowSelection(del_row, false);
|
||||
}
|
||||
},
|
||||
handleSelectionChanges(selection, val) {
|
||||
if (selection.length > 1) {
|
||||
let del_row = selection.shift();
|
||||
this.$refs.listSelection.toggleRowSelection(del_row, false);
|
||||
}
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
handleTabs(type) {
|
||||
this.active = type;
|
||||
@@ -624,24 +631,10 @@ export default {
|
||||
},
|
||||
//清单勾选框数据
|
||||
selectListChange(data) {
|
||||
// 单选
|
||||
if (data.length > 1) {
|
||||
this.$refs.listSelection.clearSelection();
|
||||
this.$refs.listSelection.toggleRowSelection(data.pop());
|
||||
}
|
||||
this.multipleSelection = data
|
||||
|
||||
this.selectedList = data;
|
||||
},
|
||||
//项目勾选框数据
|
||||
selectProjectChange(data) {
|
||||
// 单选
|
||||
if (data.length > 1) {
|
||||
this.$refs.projectSelection.clearSelection();
|
||||
this.$refs.projectSelection.toggleRowSelection(data.pop());
|
||||
}
|
||||
this.multipleSelection = data
|
||||
|
||||
this.selectProject = data;
|
||||
},
|
||||
//提交事件
|
||||
@@ -757,7 +750,9 @@ export default {
|
||||
line-height: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-table__header-wrapper .el-checkbox {
|
||||
display: none;
|
||||
}
|
||||
/deep/ .el-drawer__container {
|
||||
.prc-content-border {
|
||||
border: none;
|
||||
|
||||
Reference in New Issue
Block a user