Commit eaf3d836 by qinjianhui

fix: DTF生产排版状态修改

parent 21dfe9ee
...@@ -285,13 +285,14 @@ export default { ...@@ -285,13 +285,14 @@ export default {
></el-form-item> ></el-form-item>
<el-form-item label="操作单排版状态"> <el-form-item label="操作单排版状态">
<el-select <el-select
v-model="searchForm.layout" v-model="searchForm.operationLayoutStatus"
placeholder="请选择" placeholder="请选择"
clearable clearable
style="width: 120px;" style="width: 120px;"
> >
<el-option label="排版成功" :value="true"></el-option> <el-option label="未排版" :value="0"></el-option>
<el-option label="排版失败" :value="false"> </el-option> </el-select <el-option label="可生产" :value="1"> </el-option>
<el-option label="无法生产" :value="2"> </el-option> </el-select
></el-form-item> ></el-form-item>
<el-form-item> <el-form-item>
......
...@@ -49,12 +49,17 @@ export default { ...@@ -49,12 +49,17 @@ export default {
status: { label: "操作单状态", value: "" } status: { label: "操作单状态", value: "" }
}, },
platformJson: platformJson, platformJson: platformJson,
layoutStatus: { layoutStatusList: {
1: { label: "待排版", type: "warning" }, 1: { label: "待排版", type: "warning" },
2: { label: "排版中", type: "info" }, 2: { label: "排版中", type: "info" },
3: { label: "排版成功", type: "success" }, 3: { label: "处理完成", type: "success" },
4: { label: "排版失败", type: "danger" }, 4: { label: "部分排版完成", type: "warning" },
5: { label: "部分成功", type: "success" } 5: { label: "有异常", type: "danger" }
},
operationLayoutStatusMap: {
0: { label: "未排版", type: "warning" },
1: { label: "可生产", type: "success" },
2: { label: "无法生产", type: "danger" }
} }
}; };
}, },
...@@ -266,8 +271,8 @@ export default { ...@@ -266,8 +271,8 @@ export default {
> >
<div style="min-height: 22px;">{{ item.label }}</div> <div style="min-height: 22px;">{{ item.label }}</div>
<div style="min-height: 22px;" v-if="item.label == '排版状态'"> <div style="min-height: 22px;" v-if="item.label == '排版状态'">
<el-tag :type="layoutStatus[item.value]?.type">{{ <el-tag :type="layoutStatusList[item.value]?.type">{{
layoutStatus[item.value]?.label layoutStatusList[item.value]?.label
}}</el-tag> }}</el-tag>
</div> </div>
<div v-else style="min-height: 22px;"> <div v-else style="min-height: 22px;">
...@@ -303,24 +308,18 @@ export default { ...@@ -303,24 +308,18 @@ export default {
</span> </span>
</template> </template>
<template #top_right> <template #top_right>
<el-tooltip <div v-if="item.operationLayoutStatus">
v-if="item.layout" <el-tag
effect="light" :type="
content="排版完成" operationLayoutStatusMap[item.operationLayoutStatus]?.type
placement="bottom" "
>
<div
style="
background-color: #f0f9eb;
color: #6fc844;
border-radius: 4px;
padding:5px;
font-size: 20px;
"
> >
{{
</div> operationLayoutStatusMap[item.operationLayoutStatus]
</el-tooltip> ?.label
}}
</el-tag>
</div>
</template> </template>
<template #images> <template #images>
......
...@@ -4,7 +4,11 @@ const { getUser } = require("@/server/utils/store"); ...@@ -4,7 +4,11 @@ const { getUser } = require("@/server/utils/store");
export default { export default {
data() { data() {
return { return {
searchForm: { batchArrangeNumber: "", layoutStatus: "", startTime: "" }, searchForm: {
batchArrangeNumber: "",
batchLayoutStatus: [],
startTime: ""
},
userData: getUser() userData: getUser()
}; };
}, },
...@@ -79,15 +83,16 @@ export default { ...@@ -79,15 +83,16 @@ export default {
></el-form-item> ></el-form-item>
<el-form-item label="排版状态"> <el-form-item label="排版状态">
<el-select <el-select
v-model="searchForm.layoutStatus" v-model="searchForm.batchLayoutStatus"
placeholder="请选择排版状态" placeholder="请选择排版状态"
clearable clearable
multiple
> >
<el-option label="待排版" :value="1"></el-option> <el-option label="待排版" :value="1"></el-option>
<el-option label="排版中" :value="2"> </el-option> <el-option label="排版中" :value="2"> </el-option>
<el-option label="排版成功" :value="3"> </el-option> <el-option label="处理完成" :value="3"> </el-option>
<el-option label="排版失败" :value="4"> </el-option> <el-option label="部分排版完成" :value="4"> </el-option>
<el-option label="部分成功" :value="5"> </el-option> <el-option label="有异常" :value="5"> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="时间范围"> <el-form-item label="时间范围">
......
...@@ -93,12 +93,12 @@ export default { ...@@ -93,12 +93,12 @@ export default {
{ {
label: "排版状态", label: "排版状态",
width: 140, width: 140,
prop: "layoutStatus", prop: "batchLayoutStatus",
slotName: "layoutStatus" slotName: "batchLayoutStatus"
}, },
{ {
prop: "failReason", prop: "failReason",
label: "失败原因", label: "处理详情",
width: 300, width: 300,
slotName: "failReason" slotName: "failReason"
}, },
...@@ -114,12 +114,12 @@ export default { ...@@ -114,12 +114,12 @@ export default {
prop: "operation" prop: "operation"
} }
], ],
layoutStatus: { batchLayoutStatusList: {
1: { label: "待排版", type: "warning" }, 1: { label: "待排版", type: "warning" },
2: { label: "排版中", type: "info" }, 2: { label: "排版中", type: "info" },
3: { label: "排版成功", type: "success" }, 3: { label: "处理完成", type: "success" },
4: { label: "排版失败", type: "danger" }, 4: { label: "部分排版完成", type: "warning" },
5: { label: "部分成功", type: "success" } 5: { label: "有异常", type: "danger" }
} }
}; };
}, },
...@@ -173,7 +173,11 @@ export default { ...@@ -173,7 +173,11 @@ export default {
params = { ...params, ...value }; params = { ...params, ...value };
} }
const res = await this.$api.post(pathMap["productionSoftware"], params); const res = await this.$api.post(pathMap["productionSoftware"], {
...params,
timeRange: undefined,
batchLayoutStatus: value?.batchLayoutStatus?.join(",")
});
if (res.code === 200) { if (res.code === 200) {
this.tableList = res.data.records || []; this.tableList = res.data.records || [];
...@@ -241,7 +245,7 @@ export default { ...@@ -241,7 +245,7 @@ export default {
this.$message.warning("其他排版下载中,请等待完成后再操作"); this.$message.warning("其他排版下载中,请等待完成后再操作");
return; return;
} }
if (![2].includes(value.layoutStatus)) { if (![2].includes(value.batchLayoutStatus)) {
this.dialogVisible = true; this.dialogVisible = true;
this.radio = ""; this.radio = "";
this.templateBatchArrangeNum = value.batchArrangeNum; this.templateBatchArrangeNum = value.batchArrangeNum;
...@@ -315,11 +319,11 @@ export default { ...@@ -315,11 +319,11 @@ export default {
}, },
checkTaskStatus(task, batch) { checkTaskStatus(task, batch) {
if (batch && [3, 5].includes(batch.layoutStatus)) { if (batch && [3, 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.layoutStatus === 4) { } else if (batch && batch.batchLayoutStatus === 4) {
task.step = "error"; task.step = "error";
task.progress = "排版失败:" + (batch?.failReason || "未知原因"); task.progress = "排版失败:" + (batch?.failReason || "未知原因");
} else { } else {
...@@ -580,10 +584,13 @@ export default { ...@@ -580,10 +584,13 @@ export default {
scope.row.batchArrangeNum scope.row.batchArrangeNum
}}</a> }}</a>
</template> </template>
<template #layoutStatus="scope"> <template #batchLayoutStatus="scope">
<el-tag :type="layoutStatus[scope.row?.layoutStatus].type">{{ <el-tag
layoutStatus[scope.row?.layoutStatus].label :type="batchLayoutStatusList[scope.row?.batchLayoutStatus].type"
}}</el-tag> >{{
batchLayoutStatusList[scope.row?.batchLayoutStatus].label
}}</el-tag
>
</template> </template>
<template #failReason="scope"> <template #failReason="scope">
<div style="white-space: pre-line"> <div style="white-space: pre-line">
...@@ -603,14 +610,14 @@ export default { ...@@ -603,14 +610,14 @@ export default {
> >
<el-button <el-button
type="text" type="text"
:disabled="scope.row.layoutStatus == 2" :disabled="scope.row.batchLayoutStatus == 2"
class="btn flex btnBox" class="btn flex btnBox"
@click="changeTypesetting(scope.row)" @click="changeTypesetting(scope.row)"
><img ><img
src="../../assets/typesetting.png" src="../../assets/typesetting.png"
width="30" width="30"
height="30" height="30"
:class="{ disabled: scope.row.layoutStatus == 2 }" :class="{ disabled: scope.row.batchLayoutStatus == 2 }"
/> />
<div>排版</div> <div>排版</div>
</el-button> </el-button>
......
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