|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-button type="primary" @click="handleClick">
|
|
|
+ <el-button type="primary" @click="handleClick" :text="isText">
|
|
|
{{ btnText }}
|
|
|
</el-button>
|
|
|
<el-dialog
|
|
|
@@ -121,9 +121,17 @@
|
|
|
v-if="crewForm.crewExamRecViewUrl"
|
|
|
type="primary"
|
|
|
class="mr20"
|
|
|
+ @click="
|
|
|
+ downloadBlobFile(
|
|
|
+ crewForm.crewExamRecViewUrl,
|
|
|
+ {},
|
|
|
+ crewForm.crewName + '健康检查表'
|
|
|
+ )
|
|
|
+ "
|
|
|
>
|
|
|
下载船员体检表
|
|
|
</el-button>
|
|
|
+ <div v-else>暂无</div>
|
|
|
<el-upload
|
|
|
v-if="!disabled"
|
|
|
:action="store.state.baseurl + '/ship/crew/uploadCert'"
|
|
|
@@ -150,13 +158,15 @@
|
|
|
import { ref } from "vue";
|
|
|
import store from "@/store";
|
|
|
import api from "../apis/fetch";
|
|
|
+import downloadBlobFile from "utils/downloadBlobFile";
|
|
|
const props = defineProps({
|
|
|
btnText: {
|
|
|
type: String,
|
|
|
default: "新增船员",
|
|
|
},
|
|
|
+
|
|
|
crewId: {
|
|
|
- type: String,
|
|
|
+ type: [String, Number],
|
|
|
default: "",
|
|
|
},
|
|
|
shipCode: {
|
|
|
@@ -175,6 +185,10 @@ const props = defineProps({
|
|
|
type: Boolean,
|
|
|
default: false,
|
|
|
},
|
|
|
+ isText: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false,
|
|
|
+ },
|
|
|
});
|
|
|
const emit = defineEmits(["onSubmit"]);
|
|
|
const dialogVisible = ref(false);
|
|
|
@@ -262,7 +276,13 @@ const handleSubmit = () => {
|
|
|
shipCode: props.shipCode,
|
|
|
shipCrewId: props.crewId,
|
|
|
});
|
|
|
+
|
|
|
if (data.status === 0) {
|
|
|
+ ElNotification.success({
|
|
|
+ title: "成功",
|
|
|
+ duration: 2000,
|
|
|
+ message: data.msg,
|
|
|
+ });
|
|
|
emit("onSubmit");
|
|
|
dialogVisible.value = false;
|
|
|
} else {
|