|
@@ -119,24 +119,32 @@
|
|
|
{{ subTimeStr(scope.row.endValidTime) }}
|
|
{{ subTimeStr(scope.row.endValidTime) }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column align="center" label="详情" min-width="120">
|
|
|
|
|
|
|
+ <el-table-column align="center" label="操作" width="160">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
- <el-button
|
|
|
|
|
- v-if="certType == 6"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- text
|
|
|
|
|
- @click="goToShipOwnerDetail(scope.row.id)"
|
|
|
|
|
- >
|
|
|
|
|
- 详情
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- v-else
|
|
|
|
|
- type="primary"
|
|
|
|
|
- text
|
|
|
|
|
- @click="goToShipDetail(scope.row.shipCode)"
|
|
|
|
|
- >
|
|
|
|
|
- 详情
|
|
|
|
|
- </el-button>
|
|
|
|
|
|
|
+ <div v-if="certType == 6">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ text
|
|
|
|
|
+ @click="goToShipOwnerDetail(scope.row.id)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 详情
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button type="primary" text @click="handleEdit(scope.row)">
|
|
|
|
|
+ 更新
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-else>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ text
|
|
|
|
|
+ @click="goToShipDetail(scope.row.shipCode)"
|
|
|
|
|
+ >
|
|
|
|
|
+ 详情
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button type="primary" text @click="handleEdit(scope.row)">
|
|
|
|
|
+ 更新
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -195,6 +203,11 @@ const nextMonthStr = ref(getMonthName(1));
|
|
|
const nextNextMonthStr = ref(getMonthName(2));
|
|
const nextNextMonthStr = ref(getMonthName(2));
|
|
|
const nextNextNextMonthStr = ref(getMonthName(3));
|
|
const nextNextNextMonthStr = ref(getMonthName(3));
|
|
|
async function getCertList() {
|
|
async function getCertList() {
|
|
|
|
|
+ const loading = ElLoading.service({
|
|
|
|
|
+ lock: true,
|
|
|
|
|
+ text: "正在获取数据...",
|
|
|
|
|
+ background: "rgba(0, 0, 0, 0.7)",
|
|
|
|
|
+ });
|
|
|
let { data } = await api.getCertList({
|
|
let { data } = await api.getCertList({
|
|
|
type: type.value,
|
|
type: type.value,
|
|
|
certType: certType.value,
|
|
certType: certType.value,
|
|
@@ -202,6 +215,7 @@ async function getCertList() {
|
|
|
currentPage: currentPage.value,
|
|
currentPage: currentPage.value,
|
|
|
size: 10,
|
|
size: 10,
|
|
|
});
|
|
});
|
|
|
|
|
+ loading.close();
|
|
|
if (data.status == 0) {
|
|
if (data.status == 0) {
|
|
|
total.value = data.total;
|
|
total.value = data.total;
|
|
|
tableData.value = data.result;
|
|
tableData.value = data.result;
|
|
@@ -250,6 +264,19 @@ function changeSelect(e) {
|
|
|
validType.value = e;
|
|
validType.value = e;
|
|
|
getCertList();
|
|
getCertList();
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+async function handleEdit(row) {
|
|
|
|
|
+ const postData = {
|
|
|
|
|
+ certType: certType.value,
|
|
|
|
|
+ };
|
|
|
|
|
+ if (certType.value == 6) {
|
|
|
|
|
+ postData["shipOwnerId"] = row.id;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ postData["certValidityPeriodId"] = row.id;
|
|
|
|
|
+ }
|
|
|
|
|
+ let { data } = await api.getCertProcessDetail(postData);
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+}
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
getCertList();
|
|
getCertList();
|
|
|
getCertListType();
|
|
getCertListType();
|