Commit ce7a2bfb by qinjianhui

fix: 问题修改

parent be92fa13
...@@ -45,7 +45,7 @@ export default { ...@@ -45,7 +45,7 @@ export default {
craftType: { label: "工艺类型", value: "" }, craftType: { label: "工艺类型", value: "" },
standardDesignImage: { label: "规范素材", value: "" }, standardDesignImage: { label: "规范素材", value: "" },
createTime: { label: "创建时间", value: "" }, createTime: { label: "创建时间", value: "" },
layoutStatus: { label: "排版状态", value: "" }, batchLayoutStatus: { label: "排版状态", value: "" },
status: { label: "操作单状态", value: "" } status: { label: "操作单状态", value: "" }
}, },
platformJson: platformJson, platformJson: platformJson,
......
...@@ -97,10 +97,9 @@ export default { ...@@ -97,10 +97,9 @@ export default {
slotName: "batchLayoutStatus" slotName: "batchLayoutStatus"
}, },
{ {
prop: "failReason", prop: "spDescription",
label: "处理详情", label: "处理详情",
width: 300, width: 300
slotName: "failReason"
}, },
{ {
label: "排版参数", label: "排版参数",
...@@ -180,7 +179,10 @@ export default { ...@@ -180,7 +179,10 @@ export default {
}); });
if (res.code === 200) { if (res.code === 200) {
this.tableList = res.data.records || []; this.tableList = (res.data.records || []).map(row => ({
...row,
batchLayoutStatus: row.batchLayoutStatus || ""
}));
this.pageInfo.total = res.data.total; this.pageInfo.total = res.data.total;
} }
...@@ -312,20 +314,22 @@ export default { ...@@ -312,20 +314,22 @@ export default {
{ skipLoading: true } { skipLoading: true }
); );
const list = res.code === 200 ? res.data.records || [] : []; const list = res.code === 200 ? res.data.records || [] : [];
return list[0] || null; const row = list[0];
if (!row) return null;
return {
...row,
batchLayoutStatus: row.batchLayoutStatus || ""
};
} catch { } catch {
return null; return null;
} }
}, },
checkTaskStatus(task, batch) { checkTaskStatus(task, batch) {
if (batch && [3, 5].includes(batch.batchLayoutStatus)) { if (batch && [3, 4, 5].includes(batch.batchLayoutStatus)) {
task.step = "downloading"; task.step = "downloading";
task.progress = "排版完成,正在下载素材..."; task.progress = "排版完成,正在下载素材...";
this.doComposingDownload(task.id); this.doComposingDownload(task.id);
} else if (batch && batch.batchLayoutStatus === 4) {
task.step = "error";
task.progress = "排版失败:" + (batch?.failReason || "未知原因");
} else { } else {
task.progress = "排版处理中,等待完成后自动下载..."; task.progress = "排版处理中,等待完成后自动下载...";
this.ensureComposingPoll(); this.ensureComposingPoll();
...@@ -620,16 +624,13 @@ export default { ...@@ -620,16 +624,13 @@ export default {
</template> </template>
<template #batchLayoutStatus="scope"> <template #batchLayoutStatus="scope">
<el-tag <el-tag
:type="batchLayoutStatusList[scope.row?.batchLayoutStatus].type" v-if="batchLayoutStatusList[scope.row?.batchLayoutStatus]"
:type="batchLayoutStatusList[scope.row.batchLayoutStatus].type"
>{{ >{{
batchLayoutStatusList[scope.row?.batchLayoutStatus].label batchLayoutStatusList[scope.row.batchLayoutStatus].label
}}</el-tag }}</el-tag
> >
</template> <span v-else>-</span>
<template #failReason="scope">
<div style="white-space: pre-line">
<span v-html="scope.row?.failReason"></span>
</div>
</template> </template>
<template #operation="scope"> <template #operation="scope">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment