cfofpp il y a 6 mois
Parent
commit
4fd3f70f84

+ 3 - 1
src/views/distributionnetwork/secure/reason-for-cancellation/index.vue

@@ -307,7 +307,9 @@ export default {
         );
       }
       // 记录选择的行
-      this.selectedRows = [selectedRows[selectedRows.length - 1]];
+      this.selectedRows = selectedRows[selectedRows.length - 1]
+        ? [selectedRows[selectedRows.length - 1]]
+        : [];
     },
     /** 修改按钮操作 */
     handleUpdate(row, title) {

+ 3 - 1
src/views/distributionnetwork/secure/reason-for-the-plan/index.vue

@@ -304,7 +304,9 @@ export default {
         );
       }
       // 记录选择的行
-      this.selectedRows = [selectedRows[selectedRows.length - 1]];
+      this.selectedRows = selectedRows[selectedRows.length - 1]
+        ? [selectedRows[selectedRows.length - 1]]
+        : [];
     },
     /** 修改按钮操作 */
     handleUpdate(row, title) {