|
|
@@ -11,7 +11,7 @@
|
|
|
:width="600"
|
|
|
:closeFunc="handleCloseFunc"
|
|
|
>
|
|
|
- <!-- @cancel="handleCloseFunc" -->
|
|
|
+ <!-- @cancel="handleCloseFunc" -->
|
|
|
<div class="pt-20px">
|
|
|
<BasicForm @register="registerForm">
|
|
|
<template #file>
|
|
|
@@ -23,7 +23,7 @@
|
|
|
:beforeUpload="handleBeforeUpload"
|
|
|
@remove="handleRemove"
|
|
|
>
|
|
|
- <a-button type="primary">{{ t('layout.e57.e57upload') }}</a-button>
|
|
|
+ <a-button :disabled="loading" type="primary">{{ t('layout.e57.e57upload') }}</a-button>
|
|
|
</Upload>
|
|
|
</template>
|
|
|
<template #objType>
|
|
|
@@ -52,7 +52,7 @@
|
|
|
import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
import type { UploadProps } from 'ant-design-vue';
|
|
|
const loading = ref(false);
|
|
|
- let intervalBox = null
|
|
|
+ let intervalBox = null;
|
|
|
const fileList = ref<UploadProps['fileList']>([]);
|
|
|
const { t } = useI18n();
|
|
|
const isObjCheck = ref(false);
|
|
|
@@ -127,7 +127,7 @@
|
|
|
const [register, { closeModal }] = useModalInner((data) => {
|
|
|
data && onDataReceive();
|
|
|
fileList.value = [];
|
|
|
- intervalBox && clearInterval(intervalBox);//清除interval定时器
|
|
|
+ intervalBox && clearInterval(intervalBox); //清除interval定时器
|
|
|
loading.value = false;
|
|
|
resetFields();
|
|
|
isObjCheck.value = false;
|
|
|
@@ -150,7 +150,7 @@
|
|
|
let isloding = false;
|
|
|
const handleSubmit = async () => {
|
|
|
console.log('handleOk1');
|
|
|
- intervalBox && clearInterval(intervalBox);//清除interval定时器
|
|
|
+ intervalBox && clearInterval(intervalBox); //清除interval定时器
|
|
|
if (isloding) return;
|
|
|
const data = await validate();
|
|
|
const isObj = Number(isObjCheck.value) ? 1 : 0;
|
|
|
@@ -158,7 +158,10 @@
|
|
|
return createMessage.error(t('layout.e57.e57upload') + t('layout.e57.e57name'));
|
|
|
try {
|
|
|
isloding = true;
|
|
|
- await relevanceE57({ newFileName: newFileName.value, isObj, title: data.title }, onUploadProgress);
|
|
|
+ await relevanceE57(
|
|
|
+ { newFileName: newFileName.value, isObj, title: data.title },
|
|
|
+ onUploadProgress,
|
|
|
+ );
|
|
|
closeModal();
|
|
|
createMessage.success(t('layout.e57.e57Success'));
|
|
|
emit('success');
|
|
|
@@ -185,10 +188,11 @@
|
|
|
complete.value = 0;
|
|
|
// onUploadProgress()
|
|
|
intervalBox = setInterval(() => {
|
|
|
- getUserInfo().then(res => {});
|
|
|
- }, 1000*60*60)
|
|
|
+ getUserInfo().then((res) => {});
|
|
|
+ }, 1000 * 60 * 60);
|
|
|
try {
|
|
|
- newFileName.value = (await getUploadUrl({ fileName: file.name, file }, onUploadProgress)) || '';
|
|
|
+ newFileName.value =
|
|
|
+ (await getUploadUrl({ fileName: file.name, file }, onUploadProgress)) || '';
|
|
|
loading.value = false;
|
|
|
} catch (error) {
|
|
|
console.log('fileerror', error);
|
|
|
@@ -209,7 +213,7 @@
|
|
|
const handleCancel = () => {};
|
|
|
const handleCloseFunc = () => {
|
|
|
console.log('handleCloseFunc');
|
|
|
- if( loading.value){
|
|
|
+ if (loading.value) {
|
|
|
createConfirm({
|
|
|
iconType: 'warning',
|
|
|
title: () => h('span', t('sys.app.logoutTip')),
|
|
|
@@ -248,3 +252,10 @@
|
|
|
},
|
|
|
});
|
|
|
</script>
|
|
|
+<style lang="less">
|
|
|
+ .ant-upload-disabled {
|
|
|
+ .ant-btn ant-btn-primary {
|
|
|
+ background: #98afc7 !important;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|