Przeglądaj źródła

弹窗-行单击选中

jingbb 10 miesięcy temu
rodzic
commit
a7461bb38f

+ 11 - 1
src/views/production/Popup/ClassNamePopup.vue

@@ -22,6 +22,7 @@
             :scroll="{ x: 800, y: 300 }"
             :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
             @change="handleTableChange"
+            :customRow ="clickRow"
             >
             </a-table>
         </a-form-model>
@@ -128,7 +129,16 @@
               this.selectedRowKeys = selectedRowKeys;
               this.selectedRows = selectionRows;
             },
-
+            clickRow(record, index){
+              return {
+                on: {
+                  click: () => {
+                    this.selectedRowKeys.push(index)
+                    this.selectedRows.push(record)
+                  },
+                }
+              }       
+           },
         }
       }
   </script>

+ 11 - 1
src/views/production/Popup/OperatorsPopup.vue

@@ -22,6 +22,7 @@
             :scroll="{ x: 800, y: 300 }"
             :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
             @change="handleTableChange"
+            :customRow ="clickRow"
             >
             </a-table>
         </a-form-model>
@@ -128,7 +129,16 @@
               this.selectedRowKeys = selectedRowKeys;
               this.selectedRows = selectionRows;
             },
-
+            clickRow(record, index){
+              return {
+                on: {
+                  click: () => {
+                    this.selectedRowKeys.push(index)
+                    this.selectedRows.push(record)
+                  },
+                }
+              }       
+           },
         }
       }
   </script>

+ 11 - 1
src/views/production/Popup/deparmentPopup.vue

@@ -22,6 +22,7 @@
             :scroll="{ x: 800, y: 300 }"
             :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
             @change="handleTableChange"
+            :customRow ="clickRow"
             >
             </a-table>
         </a-form-model>
@@ -128,7 +129,16 @@
               this.selectedRowKeys = selectedRowKeys;
               this.selectedRows = selectionRows;
             },
-
+            clickRow(record, index){
+              return {
+                on: {
+                  click: () => {
+                    this.selectedRowKeys.push(index)
+                    this.selectedRows.push(record)
+                  },
+                }
+              }       
+           },
         }
       }
   </script>

+ 11 - 1
src/views/production/Popup/inventoryPopup.vue

@@ -23,6 +23,7 @@
             :scroll="{ x: 800, y: 300 }"
             :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
             @change="handleTableChange"
+            :customRow ="clickRow"
             >
             </a-table>
         </a-form-model>
@@ -152,7 +153,16 @@
               this.selectedRowKeys = selectedRowKeys;
               this.selectedRows = selectionRows;
             },
-
+            clickRow(record, index){
+              return {
+                on: {
+                  click: () => {
+                    this.selectedRowKeys.push(index)
+                    this.selectedRows.push(record)
+                  },
+                }
+              }       
+           },
         }
       }
   </script>

+ 11 - 1
src/views/production/Popup/inventoryTypePopup.vue

@@ -22,6 +22,7 @@
             :scroll="{ x: 800, y: 300 }"
             :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
             @change="handleTableChange"
+            :customRow ="clickRow"
             >
             </a-table>
         </a-form-model>
@@ -107,7 +108,16 @@
               this.selectedRowKeys = selectedRowKeys;
               this.selectedRows = selectionRows;
             },
-
+            clickRow(record, index){
+              return {
+                on: {
+                  click: () => {
+                    this.selectedRowKeys.push(index)
+                    this.selectedRows.push(record)
+                  },
+                }
+              }       
+           },
         }
       }
   </script>

+ 11 - 1
src/views/production/Popup/organizationPopup.vue

@@ -22,6 +22,7 @@
             :scroll="{ x: 800, y: 300 }"
             :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
             @change="handleTableChange"
+            :customRow ="clickRow"
             >
             </a-table>
         </a-form-model>
@@ -127,7 +128,16 @@
               this.selectedRowKeys = selectedRowKeys;
               this.selectedRows = selectionRows;
             },
-
+            clickRow(record, index){
+              return {
+                on: {
+                  click: () => {
+                    this.selectedRowKeys.push(index)
+                    this.selectedRows.push(record)
+                  },
+                }
+              }       
+           },
         }
       }
   </script>

+ 11 - 1
src/views/production/Popup/projectPopup.vue

@@ -22,6 +22,7 @@
             :scroll="{ x: 800, y: 300 }"
             :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
             @change="handleTableChange"
+            :customRow ="clickRow"
             >
             </a-table>
         </a-form-model>
@@ -134,7 +135,16 @@
               this.selectedRowKeys = selectedRowKeys;
               this.selectedRows = selectionRows;
             },
-
+            clickRow(record, index){
+              return {
+                on: {
+                  click: () => {
+                    this.selectedRowKeys.push(index)
+                    this.selectedRows.push(record)
+                  },
+                }
+              }       
+           },
         }
       }
   </script>