Commit 8d13a70e by qinjianhui

fix:下载素材提示修改

parent b51eec5f
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -60,8 +60,8 @@ function submitTask(params) { ...@@ -60,8 +60,8 @@ function submitTask(params) {
}) })
.finally(() => { .finally(() => {
taskState.isRunning = false; taskState.isRunning = false;
taskState.currentBatchNo = "";
broadcastStatus(); broadcastStatus();
taskState.currentBatchNo = "";
}); });
return { return {
......
...@@ -56,6 +56,7 @@ function broadcastStatus() { ...@@ -56,6 +56,7 @@ function broadcastStatus() {
if (!win.isDestroyed()) { if (!win.isDestroyed()) {
win.webContents.send("download-typesetting:status", { win.webContents.send("download-typesetting:status", {
isRunning: taskState.isRunning, isRunning: taskState.isRunning,
currentBatchNo: taskState.currentBatchNo,
result: taskState.latestResult result: taskState.latestResult
}); });
} }
...@@ -98,9 +99,9 @@ function submitTask(params) { ...@@ -98,9 +99,9 @@ function submitTask(params) {
}; };
}) })
.finally(() => { .finally(() => {
// 释放锁
taskState.isRunning = false; taskState.isRunning = false;
broadcastStatus(); broadcastStatus();
taskState.currentBatchNo = "";
}); });
return { return {
......
...@@ -94,9 +94,8 @@ export default { ...@@ -94,9 +94,8 @@ export default {
if (!this.podOrderProductIds.length) { if (!this.podOrderProductIds.length) {
return this.$message.warning("请选择操作单"); return this.$message.warning("请选择操作单");
} }
console.log(1111)
try { try {
let res = await this.$api.post( const res = await this.$api.post(
pathMap["downloadBySubOrderNumber"]["OP"], pathMap["downloadBySubOrderNumber"]["OP"],
{ {
ids: this.podOrderProductIds, ids: this.podOrderProductIds,
...@@ -109,9 +108,15 @@ export default { ...@@ -109,9 +108,15 @@ export default {
) )
} }
); );
console.log(77, res); if (res.code === 200) {
this.$message.success(
`批次号:${this.curBatchArrangeNum},素材下载成功`
);
} else {
this.$message.error(res.msg || "下载失败");
}
} catch (error) { } catch (error) {
this.$message.error(error); this.$message.error(error.message || "下载失败");
} }
}, },
getDataInfo() { getDataInfo() {
......
...@@ -377,7 +377,8 @@ export default { ...@@ -377,7 +377,8 @@ export default {
this[statusKey] = status.isRunning; this[statusKey] = status.isRunning;
if (!status.isRunning && status.result) { if (!status.isRunning && status.result) {
const { success, failed, currentBatchNo } = status.result; const { success, failed } = status.result;
const { currentBatchNo } = status;
this.$message.success( this.$message.success(
`批次号:${currentBatchNo},下载完成:成功 ${success.length} 个,失败 ${failed.length} 个` `批次号:${currentBatchNo},下载完成:成功 ${success.length} 个,失败 ${failed.length} 个`
); );
......
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