Explorar o código

更新 货主详情-跳转航次列表参数

wangzhihui %!s(int64=4) %!d(string=hai) anos
pai
achega
b0b893df16
Modificáronse 1 ficheiros con 12 adicións e 9 borrados
  1. 12 9
      src/views/cargoOwnerManage/cargoOwnerDetail.vue

+ 12 - 9
src/views/cargoOwnerManage/cargoOwnerDetail.vue

@@ -102,7 +102,7 @@
       <el-table-column label="操作" min-width="80" align="center">
         <template v-slot="scope">
           <el-button
-            @click="voyageDetail(scope.row, tableData)"
+            @click="voyageDetail(scope.row.id, tableData)"
             type="text"
             size="small"
           >
@@ -144,11 +144,11 @@ export default {
         userId: route.query.userId,
       });
       if (res.data.status == 0) {
-        console.log(res.data.result.userName);
-
         userName.value = res.data.result.userName;
         contactName.value = res.data.result.contactName;
         userPhone.value = res.data.result.userPhone;
+      } else {
+        console.log(res);
       }
     }
     getUserDetail();
@@ -163,10 +163,11 @@ export default {
         currentPage: currentPage.value,
         size: 10,
       });
-
-      tableData.value = res.data.result;
-
-      console.log(res);
+      if (res.data.status == 0) {
+        tableData.value = res.data.result;
+      } else {
+        console.log(res);
+      }
     }
     function changeVoyageType(s) {
       currentbtn.value = s == 1;
@@ -179,10 +180,12 @@ export default {
       getVoyageList();
     }
 
-    function voyageDetail() {
+    function voyageDetail(id) {
       router.push({
         path: "/voyage/voyageDetail",
-        query: {},
+        query: {
+          id,
+        },
       });
     }