|
|
@@ -26,6 +26,7 @@
|
|
|
import { defineComponent, reactive, ref, watch } from 'vue';
|
|
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
|
import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
|
|
|
+ import { useI18n } from '/@/hooks/web/useI18n';
|
|
|
// import { BasicTable, useTable, BasicColumn, FormSchema } from '/@/components/Table';
|
|
|
// import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
// import { checkUserAddAble } from '/@/api/corporation/modal';
|
|
|
@@ -40,23 +41,23 @@
|
|
|
// downloadByBase64,
|
|
|
// downloadByOnlineUrl,
|
|
|
} from '/@/utils/file/download';
|
|
|
-
|
|
|
+ const { t } = useI18n();
|
|
|
const schemas: FormSchema[] = [
|
|
|
{
|
|
|
field: 'sceneName',
|
|
|
- label: '场景名称:',
|
|
|
+ label: t('routes.scenes.sceneName') + ':',
|
|
|
component: 'Input',
|
|
|
slot: 'label',
|
|
|
},
|
|
|
{
|
|
|
field: 'process',
|
|
|
- label: '下载进度:',
|
|
|
+ label: t('routes.scenes.process') + ':',
|
|
|
component: 'Input',
|
|
|
slot: 'process',
|
|
|
},
|
|
|
{
|
|
|
field: 'status',
|
|
|
- label: '状态:',
|
|
|
+ label: t('component.upload.fileStatue') + ':',
|
|
|
component: 'Input',
|
|
|
slot: 'status',
|
|
|
},
|
|
|
@@ -76,7 +77,7 @@
|
|
|
const downloadInfo = reactive<Recordable>({});
|
|
|
downloadInfo.timer = null;
|
|
|
downloadInfo.process = 0;
|
|
|
- downloadInfo.status = '下载中';
|
|
|
+ downloadInfo.status = t('component.upload.downloadState');
|
|
|
downloadInfo.isDownloaded = false;
|
|
|
|
|
|
const [registerForm, { setFieldsValue }] = useForm({
|
|
|
@@ -97,7 +98,7 @@
|
|
|
console.log('Data Received', data, data.num);
|
|
|
downloadInfo.timer = null;
|
|
|
downloadInfo.process = 0;
|
|
|
- downloadInfo.status = '下载中';
|
|
|
+ downloadInfo.status = t('component.upload.downloadState');
|
|
|
downloadInfo.isDownloaded = false;
|
|
|
setFieldsValue({
|
|
|
...data,
|
|
|
@@ -124,13 +125,13 @@
|
|
|
const percent = res.percent && Math.round(res.percent);
|
|
|
downloadInfo.process = percent;
|
|
|
if (res.status === 1000) {
|
|
|
- downloadInfo.status = '获取中';
|
|
|
+ downloadInfo.status = t('component.upload.getting');
|
|
|
}
|
|
|
if (res.status === 1002 && res.url?.length > 0) {
|
|
|
cancelDownload();
|
|
|
finishDowloadUrl.value = res.url;
|
|
|
downloadInfo.isDownloaded = true;
|
|
|
- downloadInfo.status = '获取成功';
|
|
|
+ downloadInfo.status = t('component.upload.gettingSuccess');
|
|
|
handleSubmit();
|
|
|
}
|
|
|
}, 2000);
|