Browse Source

refactor(ship): 更新船舶信息和船东详情页面

- 修改 ShipInfo 组件中的证书更新 URL
- 更新船东详情页面的按钮功能和显示
- 调整船东详情页面的布局和内容
wzg 9 tháng trước cách đây
mục cha
commit
20e433a4be

+ 1 - 1
src/components/ShipInfo.vue

@@ -299,7 +299,7 @@
             "
             :actionUrl="
               shipInfos[currentIndex].code
-                ? store.state.updateCertsUrl
+                ? store.state.shipCertUpdateUrl
                 : store.state.addCertsUrl
             "
             :disabled="disabled"

+ 13 - 2
src/views/shipManage/shipDetail.vue

@@ -29,7 +29,7 @@
     <el-table-column
       align="center"
       prop="expiryAt"
-      label="有效期"
+      label="适任证书有效期"
       min-width="120"
     >
       <template v-slot="scope">
@@ -39,7 +39,9 @@
     <el-table-column align="center" label="详情" min-width="120">
       <template #default="scope">
         <div class="df aic jcc">
-          <el-button type="primary">查看详情</el-button>
+          <el-button type="primary" @click="shipOwnerDetail(scope.row.id)">
+            查看详情
+          </el-button>
         </div>
       </template>
     </el-table-column>
@@ -301,6 +303,15 @@ async function auditAbnormalShip(mediaId) {
   }
 }
 
+async function shipOwnerDetail(shipOwnerId) {
+  router.push({
+    path: "/shipOwnerManage/shipOwnerDetail",
+    query: {
+      shipOwnerId,
+    },
+  });
+}
+
 async function deleteCrew(shipCrewId) {
   ElMessageBox.confirm("是否删除该船员信息?", "提示", {
     confirmButtonText: "确定",

+ 5 - 2
src/views/shipOwnerManage/shipOwnerDetail.vue

@@ -262,7 +262,6 @@
       :params="{ type: 2, shipOwnerId: shipOwnerForm.shipOwnerId }"
       @onUploadFileList="handleHealthSuccess"
       @onRemoveFileList="handleHealthRemove"
-      :limit="2"
       upload-text="点击上传"
     />
 
@@ -277,10 +276,14 @@
       :params="{ type: 3, shipOwnerId: shipOwnerForm.shipOwnerId }"
       @onUploadFileList="handleServiceSuccess"
       @onRemoveFileList="handleServiceRemove"
-      :limit="2"
       upload-text="点击上传"
     />
   </div>
+  <div class="container-title df aic jcsb pr20">
+    船舶信息
+    <el-button type="primary">添加船舶</el-button>
+  </div>
+  <div class="line-container-p24"></div>
 
   <div class="df jcc mt30 mb30" v-if="!route.query.shipOwnerId">
     <el-button @click="router.replace('/shipOwnerManage/shipOwnerList')">