|
|
@@ -10,6 +10,45 @@
|
|
|
</div>
|
|
|
<div id="map-container" class="map-container"></div>
|
|
|
<ShipInfo :shipInfos="shipInfos"></ShipInfo>
|
|
|
+ <div class="df aic jcsb">
|
|
|
+ <div class="container-title">船员信息</div>
|
|
|
+ <el-button type="primary" @click="goToCrewDetail()">新增船员</el-button>
|
|
|
+ </div>
|
|
|
+ <el-table border :data="crewList" stripe style="width: 1000px">
|
|
|
+ <el-table-column align="center" type="index" label="序号" width="80" />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="crewName"
|
|
|
+ label="船员姓名"
|
|
|
+ min-width="120"
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ prop="crewCertExpiryDate"
|
|
|
+ label="有效期"
|
|
|
+ min-width="120"
|
|
|
+ >
|
|
|
+ <template v-slot="scope">
|
|
|
+ {{ subTimeStr(scope.row.crewCertExpiryDate) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="center" label="详情" min-width="120">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button type="primary" text @click="goToCrewDetail(scope.row)">
|
|
|
+ 详情
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div class="df aic jcfe mt40 mr20">
|
|
|
+ <el-pagination
|
|
|
+ :current-page="crewCurrentPage"
|
|
|
+ @current-change="crewPageChange"
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :total="crewTotal"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
<div class="container-title">船舶图片</div>
|
|
|
<div v-if="medias.length" class="medias-content df ffw">
|
|
|
<div class="pic-container">
|
|
|
@@ -74,6 +113,8 @@ import md5 from "md5";
|
|
|
import api from "../../apis/fetch";
|
|
|
import { useRoute } from "vue-router";
|
|
|
import _ from "lodash";
|
|
|
+import { subTimeStr } from "../../utils/utils";
|
|
|
+
|
|
|
const route = useRoute();
|
|
|
let shipInfos = ref([{}]);
|
|
|
let medias = ref([]);
|
|
|
@@ -95,7 +136,40 @@ async function getShipDetail(shipCode) {
|
|
|
shipCoors.value = data.result.shipCoors;
|
|
|
shipInfos.value = [data.result];
|
|
|
initMap();
|
|
|
+ getCrewList();
|
|
|
}
|
|
|
+let crewCurrentPage = ref(1);
|
|
|
+let crewTotal = ref(0);
|
|
|
+let crewList = ref([]);
|
|
|
+async function getCrewList() {
|
|
|
+ let { data } = await api.getCrewList({
|
|
|
+ shipCode: route.query.shipCode,
|
|
|
+ currentPage: crewCurrentPage.value,
|
|
|
+ size: 10,
|
|
|
+ });
|
|
|
+ if (data.status === 0) {
|
|
|
+ crewList.value = data.result;
|
|
|
+ crewTotal.value = data.total;
|
|
|
+ } else {
|
|
|
+ crewList.value = [];
|
|
|
+ crewTotal.value = 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+function crewPageChange(e) {
|
|
|
+ crewCurrentPage.value = e;
|
|
|
+ getCrewList();
|
|
|
+}
|
|
|
+
|
|
|
+function goToCrewDetail(item) {
|
|
|
+ router.push({
|
|
|
+ path: "/crewManage/crewDetail",
|
|
|
+ query: {
|
|
|
+ shipCode: route.query.shipCode,
|
|
|
+ shipCrewId: item ? item.id : "",
|
|
|
+ },
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
let currentUrl = ref("");
|
|
|
let mediaModal = ref(false);
|
|
|
let modalType = ref(1);
|