| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192 |
- <template>
- <div class="full-container-p24">
- <div class="mb30" style="margin-left: 200px">
- <el-button-group class="mr30">
- <el-button
- size="large"
- :type="type == 1 ? 'primary' : ''"
- @click="(currentPage = 1), (type = 1), getCertList()"
- >
- 当月
- </el-button>
- <el-button
- size="large"
- :type="type == 2 ? 'primary' : ''"
- @click="(currentPage = 1), (type = 2), getCertList()"
- >
- 下月
- </el-button>
- </el-button-group>
- </div>
- <div class="df">
- <div class="btns mr20 mt50">
- <div>
- <el-button
- size="large"
- :type="certType == 0 ? 'primary' : ''"
- @click="(currentPage = 1), (certType = 0), getCertList()"
- class="btn"
- >
- 船舶主要项目页
- </el-button>
- </div>
- <div>
- <el-button
- size="large"
- :type="certType == 1 ? 'primary' : ''"
- @click="(currentPage = 1), (certType = 1), getCertList()"
- class="btn"
- >
- 船舶国籍证书
- </el-button>
- </div>
- <div>
- <el-button
- size="large"
- :type="certType == 2 ? 'primary' : ''"
- @click="(currentPage = 1), (certType = 2), getCertList()"
- class="btn"
- >
- 内河船舶适航证书
- </el-button>
- </div>
- <div>
- <el-button
- size="large"
- :type="certType == 3 ? 'primary' : ''"
- @click="(currentPage = 1), (certType = 3), getCertList()"
- class="btn"
- >
- 船舶年审合格证书
- </el-button>
- </div>
- <div>
- <el-button
- size="large"
- :type="certType == 4 ? 'primary' : ''"
- @click="(currentPage = 1), (certType = 4), getCertList()"
- class="btn"
- >
- 内河船舶最低安全配员证书
- </el-button>
- </div>
- </div>
- <div>
- <el-table border :data="tableData" stripe style="width: 1000px">
- <el-table-column
- align="center"
- type="index"
- label="序号"
- width="80"
- />
- <el-table-column
- align="center"
- prop="shipname"
- label="船名"
- min-width="120"
- />
- <el-table-column
- align="center"
- prop="shipOwnerName"
- label="船东姓名"
- min-width="120"
- />
- <el-table-column
- align="center"
- prop="shipOwnerPhone"
- label="手机号"
- min-width="140"
- />
- <el-table-column
- align="center"
- prop="endValidTime"
- label="有效期"
- min-width="120"
- >
- <template v-slot="scope">
- {{ subTimeStr(scope.row.endValidTime) }}
- </template>
- </el-table-column>
- <el-table-column align="center" label="详情" min-width="120">
- <template #default="scope">
- <el-button
- type="primary"
- text
- @click="goToDetail(scope.row.shipCode)"
- >
- 详情
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <div class="df aic jcfe mt40 mr20">
- <el-pagination
- :current-page="currentPage"
- @current-change="pageChange"
- background
- layout="prev, pager, next"
- :total="total"
- />
- </div>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- import { ref, h, reactive, toRefs, onMounted } from "vue";
- import { ElNotification, ElMessageBox, ElMessage } from "element-plus";
- import store from "../../store";
- import router from "../../router";
- 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 type = ref(1);
- let certType = ref(0);
- let tableData = ref([]);
- let total = ref(0);
- let currentPage = ref(1);
- async function getCertList() {
- let { data } = await api.getCertList({
- type: type.value,
- certType: certType.value,
- currentPage: currentPage.value,
- size: 10,
- });
- if (data.status == 0) {
- total.value = data.total;
- tableData.value = data.result;
- } else {
- total.value = 0;
- tableData.value = [];
- }
- }
- function pageChange(e) {
- currentPage.value = e;
- getCertList();
- }
- function goToDetail(shipCode) {
- router.push({
- path: "/shipManage/shipDetail",
- query: {
- shipCode,
- },
- });
- }
- onMounted(() => {
- getCertList();
- });
- </script>
- <style scoped>
- .btn {
- height: 50px;
- width: 180px;
- border-radius: 0;
- }
- </style>
|