Pārlūkot izejas kodu

新增 返回;样式更新

wangzhihui 4 gadi atpakaļ
vecāks
revīzija
70e60dad6f

+ 4 - 0
src/App.vue

@@ -171,4 +171,8 @@ export default {
   height: 100%;
   line-height: 100%;
 }
+
+.pointer {
+  cursor: pointer;
+}
 </style>

+ 16 - 6
src/views/cargoOwnerManage/cargoOwnerDetail.vue

@@ -1,7 +1,12 @@
 <template>
   <div class="line-container-p18">
     <i class="el-icon-arrow-left"></i>
-    <div class="dib go-back ml8">返回货主列表</div>
+    <div
+      class="dib go-back ml8"
+      @click="router.replace('/cargoOwnerManage/cargoOwnerList')"
+    >
+      返回货主列表
+    </div>
   </div>
   <div class="container-title">货主信息</div>
   <div class="line-container-p24 df aic">
@@ -90,14 +95,14 @@
       <el-table-column
         prop="transStatus"
         label="船舶状态"
-        min-width="200"
+        min-width="100"
         align="center"
       ></el-table-column>
 
       <el-table-column
         prop="createTime"
         label="备注"
-        min-width="200"
+        min-width="100"
         align="center"
       ></el-table-column>
       <el-table-column label="操作" min-width="80" align="center">
@@ -140,6 +145,7 @@ export default {
     let status = ref(1);
     let term = ref();
     let currentPage = ref(1);
+    const tableData = ref();
     async function getUserDetail() {
       let res = await api.getUserDetail({
         userId: route.query.userId,
@@ -152,9 +158,7 @@ export default {
         console.log(res);
       }
     }
-    getUserDetail();
-    getVoyageList();
-    const tableData = ref([]);
+
     async function getVoyageList() {
       tableData.value = [];
       let res = await api.getVoyageList({
@@ -193,6 +197,11 @@ export default {
       });
     }
 
+    onMounted(() => {
+      getUserDetail();
+      getVoyageList();
+    });
+
     return {
       userName,
       contactName,
@@ -206,6 +215,7 @@ export default {
       voyageDetail,
       pageChange,
       tableData,
+      router,
     };
   },
 };

+ 10 - 0
src/views/shipInfo/shipDetail.vue

@@ -1,4 +1,13 @@
 <template>
+  <div class="line-container-p18">
+    <i class="el-icon-arrow-left"></i>
+    <div
+      class="dib go-back ml8 pointer"
+      @click="router.replace('/shipInfo/shipList')"
+    >
+      返回船舶列表
+    </div>
+  </div>
   <div class="container-title">船舶信息</div>
   <div class="line-container-p18">
     <div class="line">
@@ -124,6 +133,7 @@ export default {
       dialogVisible,
       dialogImageUrl,
       userDetail,
+      router,
     };
   },
 };

+ 11 - 0
src/views/shipOwnerManage/shipOwnerDetail.vue

@@ -1,4 +1,14 @@
 <template>
+  <div class="line-container-p18">
+    <i class="el-icon-arrow-left"></i>
+    <div
+      class="dib go-back ml8 pointer"
+      @click="router.replace('/shipOwnerManage/shipOwnerList')"
+    >
+      返回船东列表
+    </div>
+  </div>
+
   <div class="container-title">船东信息</div>
   <div class="line-container-p18">
     <div class="line">
@@ -273,6 +283,7 @@ export default {
       submitChange,
       change,
       cancelChange,
+      router,
     };
   },
 };

+ 12 - 1
src/views/voyage/voyageDetail.vue

@@ -1,7 +1,16 @@
 <template>
   <div class="line-container-p18">
     <i class="el-icon-arrow-left"></i>
-    <div class="dib go-back ml8">返回航次列表</div>
+    <div
+      class="dib go-back ml8 pointer"
+      @click="router.replace('/voyage/voyageList')"
+    >
+      返回航次列表
+    </div>
+  </div>
+
+  <div class="container-title">航次信息</div>
+  <div class="line-container-p18">
     <div class="line">
       <div class="info-line">
         <div class="info-line-title">航次名称</div>
@@ -305,6 +314,7 @@ import { onMounted, reactive, ref, toRefs } from "_vue@3.2.20@vue";
 import api from "../../apis/fetch";
 import { useRoute } from "vue-router";
 import _ from "lodash";
+import router from "../../router";
 import { ElNotification } from "element-plus";
 
 export default {
@@ -459,6 +469,7 @@ export default {
       finishVoyage,
       openVideoModal,
       previewSrcList,
+      router,
     };
   },
 };