Explorar el Código

更新 开航时间;显示传播位置

wzg hace 2 años
padre
commit
853b0f998a
Se han modificado 1 ficheros con 24 adiciones y 4 borrados
  1. 24 4
      src/views/voyage/voyageDetail.vue

+ 24 - 4
src/views/voyage/voyageDetail.vue

@@ -315,7 +315,7 @@
               class="info-line-text"
               v-model="item.setSailTime"
               type="datetime"
-              @change="calExpectedArrivalTime"
+              @change="calExpectedArrivalTime(item.id, index)"
               format="YYYY/MM/DD HH:mm"
               value-format="YYYY/MM/DD HH:mm:ss"
               placeholder="开航时间"
@@ -2126,6 +2126,26 @@ function initMap() {
 
     let marker = new AMap.Marker({
       content,
+      zIndex: 10,
+      position: new AMap.LngLat(i.longitude, i.latitude),
+      offset: new AMap.Pixel(-75, i.audit == 1 ? -195 : -30),
+    });
+    if (i.audit == 1) {
+      marker.on("click", () => {
+        openMediaModal(i.viewUrl, 1, "航次图片", i);
+      });
+    }
+
+    markers.push(marker);
+  }
+  for (let i of coordinates.value) {
+    let content = `<div style='width:160px'>
+        <img src='https://frontend-1255802371.cos.ap-shanghai.myqcloud.com/green-circle.png' style='display:block;width:20px;height:20px;margin:6px auto'/
+      </div>`;
+
+    let marker = new AMap.Marker({
+      content,
+      zIndex: 5,
       position: new AMap.LngLat(i.longitude, i.latitude),
       offset: new AMap.Pixel(-75, i.audit == 1 ? -195 : -30),
     });
@@ -2431,10 +2451,10 @@ let poundParams = ref({
   voyageId: route.query.id,
   type: 2,
 });
-async function calExpectedArrivalTime() {
+async function calExpectedArrivalTime(voyageDetailId, index) {
   let res = await api.calExpectedArrivalTime({
-    voyageId: route.query.id,
-    setSailTime: voyage.value.setSailTime,
+    voyageDetailId,
+    setSailTime: voyage.value.voyageDetails[index].setSailTime,
   });
   if (res.data.status == 0) {
     voyage.value.expectedArrivalTime = res.data.result;