项目清单单选

This commit is contained in:
宋伟佳
2021-10-09 15:31:09 +08:00
parent fdef700e1d
commit d82440e435
@@ -194,6 +194,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"
@select="handleSelectionChange"
ref="projectSelection" ref="projectSelection"
> >
<el-table-column <el-table-column
@@ -297,6 +298,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"
@select="handleSelectionChanges"
ref="listSelection" ref="listSelection"
> >
<el-table-column <el-table-column
@@ -457,13 +459,18 @@ export default {
}, },
methods: { methods: {
// 表格勾选 // 表格勾选
handleSelectionChange(val) { handleSelectionChange(selection, val) {
// 单选 if (selection.length > 1) {
if (val.length > 1) { let del_row = selection.shift();
this.$refs.table.clearSelection(); this.$refs.projectSelection.toggleRowSelection(del_row, false);
this.$refs.table.toggleRowSelection(val.pop()); // 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) { handleTabs(type) {
this.active = type; this.active = type;
@@ -624,24 +631,10 @@ export default {
}, },
//清单勾选框数据 //清单勾选框数据
selectListChange(data) { selectListChange(data) {
// 单选
if (data.length > 1) {
this.$refs.listSelection.clearSelection();
this.$refs.listSelection.toggleRowSelection(data.pop());
}
this.multipleSelection = data
this.selectedList = data; this.selectedList = data;
}, },
//项目勾选框数据 //项目勾选框数据
selectProjectChange(data) { selectProjectChange(data) {
// 单选
if (data.length > 1) {
this.$refs.projectSelection.clearSelection();
this.$refs.projectSelection.toggleRowSelection(data.pop());
}
this.multipleSelection = data
this.selectProject = data; this.selectProject = data;
}, },
//提交事件 //提交事件
@@ -757,7 +750,9 @@ export default {
line-height: 10px; line-height: 10px;
} }
} }
/deep/ .el-table__header-wrapper .el-checkbox {
display: none;
}
/deep/ .el-drawer__container { /deep/ .el-drawer__container {
.prc-content-border { .prc-content-border {
border: none; border: none;