|
@@ -34,50 +34,51 @@
|
|
|
</el-descriptions>
|
|
</el-descriptions>
|
|
|
|
|
|
|
|
<el-descriptions
|
|
<el-descriptions
|
|
|
- title=""
|
|
|
|
|
- column="7"
|
|
|
|
|
- border
|
|
|
|
|
- class="queue-status-box"
|
|
|
|
|
- >
|
|
|
|
|
- <el-descriptions-item label="总任务数">
|
|
|
|
|
- <el-tag type="info">{{ stats['总任务数'] }}</el-tag>
|
|
|
|
|
- </el-descriptions-item>
|
|
|
|
|
-
|
|
|
|
|
- <el-descriptions-item label="待处理">
|
|
|
|
|
- <el-tag type="warning">{{ stats['待处理'] }}</el-tag>
|
|
|
|
|
- </el-descriptions-item>
|
|
|
|
|
-
|
|
|
|
|
- <el-descriptions-item label="处理中">
|
|
|
|
|
- <el-tag type="primary">{{ stats['处理中'] }}</el-tag>
|
|
|
|
|
- </el-descriptions-item>
|
|
|
|
|
-
|
|
|
|
|
- <el-descriptions-item label="成功">
|
|
|
|
|
- <el-tag type="success">{{ stats['成功'] }}</el-tag>
|
|
|
|
|
- </el-descriptions-item>
|
|
|
|
|
-
|
|
|
|
|
- <el-descriptions-item label="失败">
|
|
|
|
|
- <el-tag type="danger">{{ stats['失败'] }}</el-tag>
|
|
|
|
|
- </el-descriptions-item>
|
|
|
|
|
-
|
|
|
|
|
- <el-descriptions-item label="操作">
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="danger"
|
|
|
|
|
- size="small"
|
|
|
|
|
- @click="stopQueueclick"
|
|
|
|
|
- :loading="isLoading"
|
|
|
|
|
- :disabled="isLoading"
|
|
|
|
|
- >停止处理
|
|
|
|
|
- </el-button>
|
|
|
|
|
- <el-button
|
|
|
|
|
- type="primary"
|
|
|
|
|
- size="small"
|
|
|
|
|
- @click="handleViewQueue"
|
|
|
|
|
- :loading="isLoading"
|
|
|
|
|
- >
|
|
|
|
|
- 任务列表
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </el-descriptions-item>
|
|
|
|
|
- </el-descriptions>
|
|
|
|
|
|
|
+ title=""
|
|
|
|
|
+ column="7"
|
|
|
|
|
+ border
|
|
|
|
|
+ class="queue-status-box"
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-descriptions-item label="总任务数">
|
|
|
|
|
+ <el-tag type="info">{{ stats['总任务数'] }}</el-tag>
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-descriptions-item label="待处理">
|
|
|
|
|
+ <el-tag type="warning">{{ stats['待处理'] }}</el-tag>
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-descriptions-item label="处理中">
|
|
|
|
|
+ <el-tag type="primary">{{ stats['处理中'] }}</el-tag>
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-descriptions-item label="成功">
|
|
|
|
|
+ <el-tag type="success">{{ stats['成功'] }}</el-tag>
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-descriptions-item label="失败">
|
|
|
|
|
+ <el-tag type="danger">{{ stats['失败'] }}</el-tag>
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+
|
|
|
|
|
+ <el-descriptions-item label="操作">
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="danger"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ @click="stopQueueclick"
|
|
|
|
|
+ :loading="isLoading"
|
|
|
|
|
+ :disabled="isLoading"
|
|
|
|
|
+ >停止处理
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ @click="handleViewQueue"
|
|
|
|
|
+ :loading="isLoading"
|
|
|
|
|
+ >
|
|
|
|
|
+ 任务列表
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ </el-descriptions>
|
|
|
|
|
+
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
v-model="queueDialogVisible"
|
|
v-model="queueDialogVisible"
|
|
|
:before-close="queueDialog"
|
|
:before-close="queueDialog"
|
|
@@ -162,14 +163,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 右侧描述信息,固定高度,可滚动 -->
|
|
<!-- 右侧描述信息,固定高度,可滚动 -->
|
|
|
- <div
|
|
|
|
|
- style="width: 350px; white-space: pre-wrap; overflow-y: auto; max-height: 63vh; border: 1px solid #f0f0f0; padding: 10px;"
|
|
|
|
|
- >
|
|
|
|
|
- {{ activeDescription }}
|
|
|
|
|
|
|
+ <div style="width: 350px; white-space: pre-wrap; overflow-y: auto; max-height: 63vh; border: 1px solid #f0f0f0; padding: 10px;">
|
|
|
|
|
+ <span style="color: red;">文生图提示词</span>
|
|
|
|
|
+ {{ activeDescription }}
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<br />
|
|
<br />
|
|
|
- 图片路径:<span>{{ path_image_url }}</span>
|
|
|
|
|
|
|
+ <span>{{ path_image_url }}</span>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
@@ -209,15 +209,11 @@
|
|
|
>
|
|
>
|
|
|
<el-table-column type="selection" width="50" align="center" />
|
|
<el-table-column type="selection" width="50" align="center" />
|
|
|
<el-table-column prop="id" label="ID" width="60" align="center"/>
|
|
<el-table-column prop="id" label="ID" width="60" align="center"/>
|
|
|
- <!-- <el-table-column prop="created_time" label="日期" width="160" align="center"/> -->
|
|
|
|
|
- <!-- <el-table-column prop="width" label="宽度" width="70" align="center"/>
|
|
|
|
|
- <el-table-column prop="height" label="高度" width="70" align="center"/> -->
|
|
|
|
|
- <el-table-column label="原图尺码" width="100" align="center">
|
|
|
|
|
|
|
+ <el-table-column label="原图尺码" width="120" align="center">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
{{ row.width }} x {{ row.height }}
|
|
{{ row.width }} x {{ row.height }}
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
-
|
|
|
|
|
<el-table-column label="状态" width="90">
|
|
<el-table-column label="状态" width="90">
|
|
|
<template #default="{ row }">
|
|
<template #default="{ row }">
|
|
|
<el-tag type="success" v-if="row.is_processed === 1">已出图</el-tag>
|
|
<el-tag type="success" v-if="row.is_processed === 1">已出图</el-tag>
|
|
@@ -281,6 +277,8 @@
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
|
|
|
|
|
|
<el-descriptions-item label="操作">
|
|
<el-descriptions-item label="操作">
|
|
|
|
|
+ <el-button type="primary" @click="imgtotext" :loading="isLoading">执行图生文</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="texttoimg" :loading="isLoading">执行文生图</el-button>
|
|
|
<el-button type="primary" @click="handleSelected" :loading="isLoading" :disabled="isLoading">执行选择任务</el-button>
|
|
<el-button type="primary" @click="handleSelected" :loading="isLoading" :disabled="isLoading">执行选择任务</el-button>
|
|
|
<el-button type="primary" @click="handleAll" :loading="isLoading">执行全部任务</el-button>
|
|
<el-button type="primary" @click="handleAll" :loading="isLoading">执行全部任务</el-button>
|
|
|
</el-descriptions-item>
|
|
</el-descriptions-item>
|
|
@@ -497,10 +495,10 @@ const handleSizeChange = (val) => {
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
//---------------选择框----------------
|
|
//---------------选择框----------------
|
|
|
-const filterStatus = ref('全部') // 默认值为“全部”
|
|
|
|
|
|
|
+const filterStatus = ref('全部')
|
|
|
const handleFilterChange = () => {
|
|
const handleFilterChange = () => {
|
|
|
- console.log('当前选择状态:', filterStatus.value);
|
|
|
|
|
- page.value = 1; // 切换筛选条件时重置页码
|
|
|
|
|
|
|
+ // console.log('当前选择状态:', filterStatus.value);
|
|
|
|
|
+ page.value = 1;
|
|
|
fetchPreviewImages();
|
|
fetchPreviewImages();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -512,7 +510,7 @@ const _resrow = ref('')
|
|
|
const record_deleteRow = async (row) => {
|
|
const record_deleteRow = async (row) => {
|
|
|
getPreviewSubDirslist()
|
|
getPreviewSubDirslist()
|
|
|
_resrow.value = row;
|
|
_resrow.value = row;
|
|
|
- page.value = 1; // 打开时默认从第一页开始
|
|
|
|
|
|
|
+ page.value = 1;
|
|
|
mlinventoryVisible.value = true;
|
|
mlinventoryVisible.value = true;
|
|
|
|
|
|
|
|
const res = await Template();
|
|
const res = await Template();
|
|
@@ -526,7 +524,6 @@ const record_deleteRow = async (row) => {
|
|
|
//打包zip
|
|
//打包zip
|
|
|
const packRow = async (row) => {
|
|
const packRow = async (row) => {
|
|
|
isLoading.value = true;
|
|
isLoading.value = true;
|
|
|
-
|
|
|
|
|
try {
|
|
try {
|
|
|
// 请求预览图接口获取图片路径
|
|
// 请求预览图接口获取图片路径
|
|
|
const res = await getPreviewimg({
|
|
const res = await getPreviewimg({
|
|
@@ -534,15 +531,12 @@ const packRow = async (row) => {
|
|
|
page: 1,
|
|
page: 1,
|
|
|
limit: 9999
|
|
limit: 9999
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
if (res.code !== 0 || !res.data || res.data.length === 0) {
|
|
if (res.code !== 0 || !res.data || res.data.length === 0) {
|
|
|
ElMessage.warning('未找到出图记录');
|
|
ElMessage.warning('未找到出图记录');
|
|
|
isLoading.value = false;
|
|
isLoading.value = false;
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
const imagePaths = res.data
|
|
const imagePaths = res.data
|
|
|
- // .map(item => item.custom_image_url || item.new_image_url)
|
|
|
|
|
.map(item => item.custom_image_url)
|
|
.map(item => item.custom_image_url)
|
|
|
.filter(path => path && path.trim() !== '');
|
|
.filter(path => path && path.trim() !== '');
|
|
|
|
|
|
|
@@ -551,14 +545,12 @@ const packRow = async (row) => {
|
|
|
isLoading.value = false;
|
|
isLoading.value = false;
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// 发起打包请求
|
|
// 发起打包请求
|
|
|
const packRes = await packImagess({ paths: imagePaths });
|
|
const packRes = await packImagess({ paths: imagePaths });
|
|
|
|
|
|
|
|
if (packRes.code === 0 && packRes.download_url) {
|
|
if (packRes.code === 0 && packRes.download_url) {
|
|
|
ElMessage.success('打包成功,正在下载...');
|
|
ElMessage.success('打包成功,正在下载...');
|
|
|
-
|
|
|
|
|
- // 自动触发浏览器下载 zip 文件
|
|
|
|
|
|
|
+ // 自动触发浏览器下载 zip 文件
|
|
|
let url = packRes.download_url.replace('127.0.0.1', '20.0.16.128');
|
|
let url = packRes.download_url.replace('127.0.0.1', '20.0.16.128');
|
|
|
const link = document.createElement('a');
|
|
const link = document.createElement('a');
|
|
|
link.href = url;
|
|
link.href = url;
|
|
@@ -573,7 +565,6 @@ const packRow = async (row) => {
|
|
|
ElMessage.error('打包请求异常');
|
|
ElMessage.error('打包请求异常');
|
|
|
console.error(err);
|
|
console.error(err);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
isLoading.value = false;
|
|
isLoading.value = false;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -581,12 +572,10 @@ const packRow = async (row) => {
|
|
|
|
|
|
|
|
const imageList = ref([]);
|
|
const imageList = ref([]);
|
|
|
const _oldrow = ref('');
|
|
const _oldrow = ref('');
|
|
|
-
|
|
|
|
|
//点击当前行
|
|
//点击当前行
|
|
|
const handleRowClick = async (row) => {
|
|
const handleRowClick = async (row) => {
|
|
|
console.log("当前行信息",row)
|
|
console.log("当前行信息",row)
|
|
|
_oldrow.value = row
|
|
_oldrow.value = row
|
|
|
-
|
|
|
|
|
const res = await getlsit({ path: row['path'] });
|
|
const res = await getlsit({ path: row['path'] });
|
|
|
if (res.data === null) {
|
|
if (res.data === null) {
|
|
|
imageList.value = [];
|
|
imageList.value = [];
|
|
@@ -607,8 +596,6 @@ const mlcloseDialog = () => {
|
|
|
mlinventoryVisible.value = false
|
|
mlinventoryVisible.value = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* 点击查看图片显示
|
|
* 点击查看图片显示
|
|
|
*/
|
|
*/
|
|
@@ -616,35 +603,25 @@ const activeDescription = ref('');
|
|
|
const path_image_url = ref('');
|
|
const path_image_url = ref('');
|
|
|
const new_image_url = ref('');
|
|
const new_image_url = ref('');
|
|
|
const showDescDialog = ref(false);
|
|
const showDescDialog = ref(false);
|
|
|
-
|
|
|
|
|
const showDescription = (img, type) => {
|
|
const showDescription = (img, type) => {
|
|
|
new_image_url.value = ''
|
|
new_image_url.value = ''
|
|
|
path_image_url.value = ''
|
|
path_image_url.value = ''
|
|
|
- console.log(img)
|
|
|
|
|
- console.log(type)
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- if (type === 'new') {
|
|
|
|
|
- new_image_url.value = img.new_image_url || '';
|
|
|
|
|
- path_image_url.value = img.new_image_url || '暂无说明';
|
|
|
|
|
- activeDescription.value = "文生图提示词:" + "\n" + "\n" + img.chinese_description + "\n" + "\n" + img.english_description + "\n" + "\n" + img.img_name || '暂无说明';
|
|
|
|
|
- // new_image_url.value = img.custom_image_url || '';
|
|
|
|
|
- // path_image_url.value = img.custom_image_url || '暂无说明';
|
|
|
|
|
- // activeDescription.value = "文生图提示词:" + "\n" + "\n" + img.chinese_description + "\n" + "\n" + img.english_description + "\n" + "\n" + img.img_name || '暂无说明';
|
|
|
|
|
- }else if (type === 'custom'){
|
|
|
|
|
- new_image_url.value = img.custom_image_url || '';
|
|
|
|
|
- path_image_url.value = img.custom_image_url || '暂无说明';
|
|
|
|
|
- activeDescription.value = "文生图提示词:" + "\n" + "\n" + img.chinese_description + "\n" + "\n" + img.english_description + "\n" + "\n" + img.img_name || '暂无说明';
|
|
|
|
|
- } else if (type === 'old') {
|
|
|
|
|
- new_image_url.value = img.path || '';
|
|
|
|
|
- path_image_url.value = img.path || '暂无说明';
|
|
|
|
|
- activeDescription.value = '暂无说明';
|
|
|
|
|
- // activeDescription.value = "图生文提示词:" + "\n" + "\n" + img.old_description"";
|
|
|
|
|
- }else{
|
|
|
|
|
|
|
+ if (type === 'new') {
|
|
|
|
|
+ new_image_url.value = img.new_image_url || '';
|
|
|
|
|
+ path_image_url.value = "新图片路径:" + img.new_image_url || '图片未生成';
|
|
|
|
|
+ activeDescription.value = "\n" + "\n" + img.chinese_description + "\n" + "\n" + img.english_description + "\n" + "\n" + img.img_name || '暂无说明';
|
|
|
|
|
+ }else if (type === 'custom'){
|
|
|
|
|
+ new_image_url.value = img.custom_image_url || '';
|
|
|
|
|
+ path_image_url.value = "新图片路径:" + img.custom_image_url || '图片未生成';
|
|
|
|
|
+ activeDescription.value = "\n" + "\n" + img.chinese_description + "\n" + "\n" + img.english_description + "\n" + "\n" + img.img_name || '暂无说明';
|
|
|
|
|
+ } else if (type === 'old') {
|
|
|
|
|
+ new_image_url.value = img.path || '';
|
|
|
|
|
+ path_image_url.value = "原图片路径:" + img.path || '暂无说明';
|
|
|
|
|
+ activeDescription.value = '';
|
|
|
|
|
+ }else{
|
|
|
console.log('无')
|
|
console.log('无')
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- showDescDialog.value = true;
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ showDescDialog.value = true;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const hideDescription = () => {
|
|
const hideDescription = () => {
|
|
@@ -655,57 +632,75 @@ const hideDescription = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- // --------------------- 更新图片列表方法 ---------------------
|
|
|
|
|
- const updateImageList = async () => {
|
|
|
|
|
- const res = await getlsit({ path: _oldrow.value['path'] })
|
|
|
|
|
- if (res.data === null) {
|
|
|
|
|
- imageList.value = []
|
|
|
|
|
- } else {
|
|
|
|
|
- imageList.value = res.data.map(item => ({
|
|
|
|
|
- chinese_description: item.chinese_description,
|
|
|
|
|
- new_image_url: item.new_image_url,
|
|
|
|
|
- custom_image_url: item.custom_image_url,
|
|
|
|
|
- size: item.size
|
|
|
|
|
- }))
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// --------------------- 更新图片列表方法 ---------------------
|
|
|
|
|
+const updateImageList = async () => {
|
|
|
|
|
+const res = await getlsit({ path: _oldrow.value['path'] })
|
|
|
|
|
+ if (res.data === null) {
|
|
|
|
|
+ imageList.value = []
|
|
|
|
|
+ } else {
|
|
|
|
|
+ imageList.value = res.data.map(item => ({
|
|
|
|
|
+ chinese_description: item.chinese_description,
|
|
|
|
|
+ new_image_url: item.new_image_url,
|
|
|
|
|
+ custom_image_url: item.custom_image_url,
|
|
|
|
|
+ size: item.size
|
|
|
|
|
+ }))
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
const _parh = ref('')
|
|
const _parh = ref('')
|
|
|
const SelectionChange = (rows) => {
|
|
const SelectionChange = (rows) => {
|
|
|
console.log(rows)
|
|
console.log(rows)
|
|
|
// 提取所有选中项的 path 数组
|
|
// 提取所有选中项的 path 数组
|
|
|
_parh.value = rows.map(item => item.path);
|
|
_parh.value = rows.map(item => item.path);
|
|
|
- console.log('选中的图片路径:', _parh.value);
|
|
|
|
|
|
|
+ // console.log('选中的图片路径:', _parh.value);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
const isLoading = ref(false)
|
|
const isLoading = ref(false)
|
|
|
const num = ref(1)
|
|
const num = ref(1)
|
|
|
|
|
+//执行图生文、选择执行选择图片,没有选择执行当前页图片处理
|
|
|
|
|
+const imgtotext = () => {
|
|
|
|
|
+ if(_parh.value){
|
|
|
|
|
+ processImages(toRaw(_parh.value),'图生文');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ const allPaths = toRaw(tableData_lsit.value).map(item => item.path);
|
|
|
|
|
+ processImages(allPaths,'图生文');
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+//执行文生图、选择执行选择图片,没有选择执行当前页图片处理
|
|
|
|
|
+const texttoimg = () => {
|
|
|
|
|
+ if(_parh.value){
|
|
|
|
|
+ processImages(toRaw(_parh.value),'文生图');
|
|
|
|
|
+ }else{
|
|
|
|
|
+ const allPaths = toRaw(tableData_lsit.value).map(item => item.path);
|
|
|
|
|
+ processImages(allPaths,'文生图');
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+//执行选择任务
|
|
|
const handleSelected = () => {
|
|
const handleSelected = () => {
|
|
|
processImages(toRaw(_parh.value));
|
|
processImages(toRaw(_parh.value));
|
|
|
};
|
|
};
|
|
|
-
|
|
|
|
|
|
|
+//执行全部任务
|
|
|
const handleAll = () => {
|
|
const handleAll = () => {
|
|
|
const allPaths = toRaw(tableData_lsit.value).map(item => item.path);
|
|
const allPaths = toRaw(tableData_lsit.value).map(item => item.path);
|
|
|
processImages(allPaths);
|
|
processImages(allPaths);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-const processImages = async (files) => {
|
|
|
|
|
|
|
+const processImages = async (files,type) => {
|
|
|
if (!Array.isArray(files) || files.length === 0) {
|
|
if (!Array.isArray(files) || files.length === 0) {
|
|
|
ElMessage.warning('请选择要处理的图片')
|
|
ElMessage.warning('请选择要处理的图片')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
// 限制尺寸校验放外面更合理
|
|
// 限制尺寸校验放外面更合理
|
|
|
if (width.value >= 1024 || height.value >= 1024) {
|
|
if (width.value >= 1024 || height.value >= 1024) {
|
|
|
ElMessage.warning('尺寸不可超过1024')
|
|
ElMessage.warning('尺寸不可超过1024')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
isLoading.value = true
|
|
isLoading.value = true
|
|
|
let successCount = 0
|
|
let successCount = 0
|
|
|
const failList = []
|
|
const failList = []
|
|
|
const payload = {
|
|
const payload = {
|
|
|
|
|
+ type:type,
|
|
|
prompt: textareaContent.value,
|
|
prompt: textareaContent.value,
|
|
|
batch:files,
|
|
batch:files,
|
|
|
num:num.value,
|
|
num:num.value,
|
|
@@ -714,19 +709,13 @@ const processImages = async (files) => {
|
|
|
}
|
|
}
|
|
|
try {
|
|
try {
|
|
|
const res = await imageToText(payload)
|
|
const res = await imageToText(payload)
|
|
|
-
|
|
|
|
|
} catch (e) {
|
|
} catch (e) {
|
|
|
failList.push(`第 ${batchStart + i + 1} 张 第 ${j + 1} 次`)
|
|
failList.push(`第 ${batchStart + i + 1} 张 第 ${j + 1} 次`)
|
|
|
}
|
|
}
|
|
|
- // 设定每 batch 执行的图片数量(如 20 张)
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
ElMessage.success(`共处理 ${files.length} 张 * ${num.value} 次,共 ${files.length * num.value} 次`)
|
|
ElMessage.success(`共处理 ${files.length} 张 * ${num.value} 次,共 ${files.length * num.value} 次`)
|
|
|
-
|
|
|
|
|
if (failList.length > 0) {
|
|
if (failList.length > 0) {
|
|
|
console.warn('失败列表:', failList)
|
|
console.warn('失败列表:', failList)
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
isLoading.value = false
|
|
isLoading.value = false
|
|
|
}
|
|
}
|
|
|
|
|
|