瀏覽代碼

修复 获取数据前清空

wangzhihui 4 年之前
父節點
當前提交
c46ab4bb36
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/views/voyage/voyageList.vue

+ 2 - 2
src/views/voyage/voyageList.vue

@@ -195,6 +195,7 @@ export default {
     let total = ref();
     let status = ref(1);
     async function getVoyageList() {
+      tableData.value = [];
       let res = await api.getVoyageList({
         cargoOwnerId: 0,
         shipId: 0,
@@ -203,7 +204,7 @@ export default {
         currentPage: currentPage.value,
         size: 10,
       });
-
+      term.value = "";
       if (res.data.status == 0) {
         tableData.value = res.data.result;
       } else {
@@ -214,7 +215,6 @@ export default {
       }
     }
     function changeVoyageType(s) {
-      tableData.value = [];
       term.value = "";
       currentPage.value = 1;
       currentbtn.value = s == 1;