Compare commits

...

2 Commits

Author SHA1 Message Date
XaoLi717
6f9a2e3f2a bug修复 2024-10-10 17:47:43 +08:00
XaoLi717
6803dcbec6 bug修复 2024-10-10 17:42:39 +08:00

View File

@ -115,6 +115,7 @@ import axios from "axios";
import {ref} from "vue"; import {ref} from "vue";
import {integer} from "vue-types"; import {integer} from "vue-types";
import {getConfigKey} from "@/api/infra/config"; import {getConfigKey} from "@/api/infra/config";
import {config} from '@/config/axios/config'
defineOptions({ name: 'UploadFile' }) defineOptions({ name: 'UploadFile' })
const colors = [ const colors = [
@ -204,10 +205,10 @@ const SyncFiles = async () => {
for (const Name of fileList.value) { for (const Name of fileList.value) {
const fName = Name as UploadUserFile & {page?: number,lodTxt?: String}; const fName = Name as UploadUserFile & {page?: number,lodTxt?: String};
fName.lodTxt="10%" fName.lodTxt="10%"
if (fName.page==100){ // if (fName.page==100){
fName.lodTxt="完成" // fName.lodTxt=""
continue // continue
} // }
// //
await delay(100); await delay(100);
fName.page = 20; fName.page = 20;
@ -254,7 +255,8 @@ const SyncFiles = async () => {
const add = addMap[fileExt] || ''; // const add = addMap[fileExt] || ''; //
fName.page = 90; fName.page = 90;
fName.lodTxt="90%" fName.lodTxt="90%"
const response = await axios.post(`http://192.168.1.15:8000/${add}?path=${filePath}`); // console.log(`${config.ai_url}/${add}?path=${filePath}`)
const response = await axios.post(`${config.ai_url}/${add}?path=${filePath}`);
upDing.value=false upDing.value=false
console.log("response",response) console.log("response",response)
await delay(100); await delay(100);
@ -435,6 +437,10 @@ const handleFileSuccess: UploadProps['onSuccess'] = (res: any): void => {
if (uploadList.value.length == uploadNumber.value) { if (uploadList.value.length == uploadNumber.value) {
fileList.value.push(...uploadList.value) fileList.value.push(...uploadList.value)
MysqlUrl.value.push(...uploadList.value) MysqlUrl.value.push(...uploadList.value)
const updatedFileStatus = [...props.fileStatus];
updatedFileStatus.push(10);
emit('update:fileStatus', updatedFileStatus);
// console.log("updatedFileStatus",updatedFileStatus)
// console.log("fileList.value",fileList.value) // console.log("fileList.value",fileList.value)
// console.log("MysqlUrl.value",MysqlUrl.value) // console.log("MysqlUrl.value",MysqlUrl.value)
uploadList.value = [] uploadList.value = []