---用户管理,网元管理等中英文

This commit is contained in:
lai
2023-11-08 11:21:39 +08:00
parent 8e467b95a2
commit 1bc9358d30
37 changed files with 582 additions and 404 deletions

View File

@@ -39,7 +39,7 @@ let state = reactive<{
/**下载文件 */
function fnDownload() {
const key = 'downloadFile';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
const filePath = state.downloadFilePath;
if (!filePath) return;
downloadFile(filePath).then(res => {
@@ -64,7 +64,7 @@ function fnDownload() {
/**下载切片文件 */
function fnDownloadChunk() {
const key = 'downloadFileChunk';
message.loading({ content: '请稍等...', key });
message.loading({ content: t('common.loading'), key });
const filePath = state.downloadFilePath;
downloadFileChunk(filePath, 5).then(blob => {
console.log(blob);
@@ -103,11 +103,11 @@ function fnBeforeUpload(file: FileType) {
/**上传文件 */
function fnUpload(up: UploadRequestOption) {
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要上传文件吗?`,
onOk() {
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
state.loading = true;
let formData = new FormData();
formData.append('file', up.file);
@@ -132,11 +132,11 @@ function fnUploadChunk(up: UploadRequestOption) {
const fileData = up.file as File;
const item = state.fileList.find(f => f.name === fileData.name);
Modal.confirm({
title: '提示',
title: t('common.tipTitle'),
content: `确认要上传文件吗?`,
onOk() {
// 发送请求
const hide = message.loading('请稍等...', 0);
const hide = message.loading(t('common.loading'), 0);
uploadFileChunk(fileData, 4, 'default').then(res => {
hide();
if (res.code === 200) {