|
|
@@ -67,14 +67,20 @@
|
|
|
class="upload-demo"
|
|
|
:action="this.$store.state.fydi"
|
|
|
:show-file-list="false"
|
|
|
+ :on-success="upFYDISuccess"
|
|
|
+ :before-upload="beforeFYDI"
|
|
|
>
|
|
|
- <el-button class="mr20" size="middle" type="primary"
|
|
|
+ <el-button
|
|
|
+ class="mr20"
|
|
|
+ size="medium"
|
|
|
+ type="primary"
|
|
|
+ :loading="isUpLoading"
|
|
|
>上传FYDI指数</el-button
|
|
|
>
|
|
|
</el-upload>
|
|
|
<el-button
|
|
|
class="mr20"
|
|
|
- size="middle"
|
|
|
+ size="medium"
|
|
|
type="primary"
|
|
|
@click="voyageAddDialogVisible = true"
|
|
|
>添加航次</el-button
|
|
|
@@ -636,6 +642,29 @@ export default {
|
|
|
|
|
|
let sortradio = ref(0);
|
|
|
|
|
|
+ let isUpLoading = ref(false);
|
|
|
+ function upFYDISuccess(e) {
|
|
|
+ console.log(e);
|
|
|
+ if (e.status == 0) {
|
|
|
+ ElNotification.success({
|
|
|
+ title: "成功",
|
|
|
+ duration: 2000,
|
|
|
+ message: e.msg,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ ElNotification.error({
|
|
|
+ title: "失败",
|
|
|
+ duration: 2000,
|
|
|
+ message: e.msg,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ isUpLoading.value = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ function beforeFYDI() {
|
|
|
+ isUpLoading.value = true;
|
|
|
+ }
|
|
|
+
|
|
|
getVoyageList();
|
|
|
onMounted(() => {});
|
|
|
|
|
|
@@ -665,6 +694,9 @@ export default {
|
|
|
selectDischargeProt,
|
|
|
clear,
|
|
|
sortradio,
|
|
|
+ upFYDISuccess,
|
|
|
+ beforeFYDI,
|
|
|
+ isUpLoading,
|
|
|
};
|
|
|
},
|
|
|
};
|