Bladeren bron

新增 审核异常船舶

王智慧 3 jaren geleden
bovenliggende
commit
57364440ab
2 gewijzigde bestanden met toevoegingen van 39 en 8 verwijderingen
  1. 4 0
      src/apis/fetch.js
  2. 35 8
      src/views/shipManage/shipDetail.vue

+ 4 - 0
src/apis/fetch.js

@@ -152,4 +152,8 @@ export default {
   getSecurityCheckShipList(data) {
     return $http("/security/check/ship/list", data);
   },
+  // 审核异常船舶
+  auditAbnormalShip(data) {
+    return $http("/ship/audit/abnormal", data);
+  },
 };

+ 35 - 8
src/views/shipManage/shipDetail.vue

@@ -32,6 +32,15 @@
               @click="openMediaModal(item.downloadUrl, 1, '图片查看')"
             ></el-image>
           </div>
+          <el-button
+            v-if="item.audit == 0"
+            style="display: block; margin: 0 auto"
+            size="small"
+            type="primary"
+            @click="auditAbnormalShip(item.id)"
+          >
+            审核通过
+          </el-button>
         </div>
         <div :class="['s-line', index % 2 == 0 ? '' : 'top210px']"></div>
         <div class="point"></div>
@@ -193,6 +202,24 @@ function initMap() {
   // map.value.add([shipCoorsPolyline.value, mediaCoorsPolyline.value]);
   // map.value.setFitView();
 }
+async function auditAbnormalShip(mediaId) {
+  let { data } = await api.auditAbnormalShip({
+    mediaId,
+    shipCode: route.query.shipCode,
+  });
+  if (data.status == 0) {
+    ElMessage({
+      message: data.msg,
+      type: "success",
+    });
+    getShipDetail(route.query.shipCode);
+  } else {
+    ElMessage({
+      message: data.msg,
+      type: "error",
+    });
+  }
+}
 onMounted(() => {
   getShipDetail(route.query.shipCode);
 });
@@ -200,7 +227,7 @@ onMounted(() => {
 <style scoped>
 .medias-content {
   width: 100%;
-  height: 600px;
+  height: 620px;
   background: #f7f7f7;
   border-radius: 2px;
 }
@@ -222,7 +249,7 @@ onMounted(() => {
 }
 .box {
   position: absolute;
-  height: 240px;
+  height: 260px;
   width: var(--box-width);
   border: 5px solid #dddddd;
   transition: all 0.5s;
@@ -233,7 +260,7 @@ onMounted(() => {
 .point {
   position: relative;
   left: 93px;
-  top: 258px;
+  top: 268px;
   width: 16px;
   height: 16px;
   background-image: url(../../assets/blue-circle.png);
@@ -242,7 +269,7 @@ onMounted(() => {
 .s-line {
   position: absolute;
   left: 100px;
-  top: 242px;
+  top: 262px;
   height: 20px;
   border-left: 2px dashed;
   box-sizing: border-box;
@@ -253,21 +280,21 @@ onMounted(() => {
   position: relative;
   bottom: 30px;
   left: 111px;
-  top: 249px;
+  top: 259px;
   height: 3px;
   width: 100px;
   background-color: #dddddd;
 }
 
 .bottom-box {
-  top: 290px;
+  top: 300px;
 }
 .top210px {
-  top: 270px;
+  top: 280px;
 }
 
 .box:hover {
-  transform: scale(1.2);
+  transform: scale(1.1);
 }
 
 .card-note {