Browse Source

对比优化

wyh 1 year ago
parent
commit
a9b0ce1c70
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/views/module_kzks/projectCostList/ProjectCostList.vue

+ 10 - 0
src/views/module_kzks/projectCostList/ProjectCostList.vue

@@ -166,6 +166,7 @@
         :rowSelection="{
         :rowSelection="{
           selectedRowKeys: selectedRowKeys,
           selectedRowKeys: selectedRowKeys,
           onChange: onSelectChange,
           onChange: onSelectChange,
+          onSelect: onSelect,
           getCheckboxProps: (record) => ({
           getCheckboxProps: (record) => ({
             props: {
             props: {
               disabled: record.id == 'amount', // 禁选的条件为:合计行不可选
               disabled: record.id == 'amount', // 禁选的条件为:合计行不可选
@@ -826,6 +827,15 @@ import ProjectImportListModal from '../projectImportList/modules/ProjectImportLi
         this.selectedRowKeys = selectedRowKeys;
         this.selectedRowKeys = selectedRowKeys;
         this.selectionRows = selectionRows;
         this.selectionRows = selectionRows;
       },
       },
+      onSelect(record, selected, selectedRows, nativeEvent){
+        console.log(record, selected, selectedRows, nativeEvent)
+        console.log(record.children)
+        if (record.children == undefined) {
+          // 选中二级,一级禁选
+        } else {
+          // 选中一级,二级禁选
+        }
+      }
 
 
     }
     }
   }
   }