Commit ce7a2bfb by qinjianhui

fix: 问题修改

parent be92fa13
......@@ -45,7 +45,7 @@ export default {
craftType: { label: "工艺类型", value: "" },
standardDesignImage: { label: "规范素材", value: "" },
createTime: { label: "创建时间", value: "" },
layoutStatus: { label: "排版状态", value: "" },
batchLayoutStatus: { label: "排版状态", value: "" },
status: { label: "操作单状态", value: "" }
},
platformJson: platformJson,
......
......@@ -97,10 +97,9 @@ export default {
slotName: "batchLayoutStatus"
},
{
prop: "failReason",
prop: "spDescription",
label: "处理详情",
width: 300,
slotName: "failReason"
width: 300
},
{
label: "排版参数",
......@@ -180,7 +179,10 @@ export default {
});
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;
}
......@@ -312,20 +314,22 @@ export default {
{ skipLoading: true }
);
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 {
return null;
}
},
checkTaskStatus(task, batch) {
if (batch && [3, 5].includes(batch.batchLayoutStatus)) {
if (batch && [3, 4, 5].includes(batch.batchLayoutStatus)) {
task.step = "downloading";
task.progress = "排版完成,正在下载素材...";
this.doComposingDownload(task.id);
} else if (batch && batch.batchLayoutStatus === 4) {
task.step = "error";
task.progress = "排版失败:" + (batch?.failReason || "未知原因");
} else {
task.progress = "排版处理中,等待完成后自动下载...";
this.ensureComposingPoll();
......@@ -620,16 +624,13 @@ export default {
</template>
<template #batchLayoutStatus="scope">
<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
>
</template>
<template #failReason="scope">
<div style="white-space: pre-line">
<span v-html="scope.row?.failReason"></span>
</div>
<span v-else>-</span>
</template>
<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