Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
electron-printer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhuzhequan
electron-printer
Commits
4964d56c
Commit
4964d56c
authored
Jul 10, 2026
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:添加操作日志
parent
90fd3ed3
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
49 additions
and
19 deletions
+49
-19
src/config/index.js
+3
-1
src/server/entity/function.js
+25
-8
src/server/routes/index.js
+2
-0
src/utils/download-api.js
+0
-0
src/utils/download-typesetting.js
+1
-1
src/views/dtf-batch-detail/detail.vue
+11
-2
src/views/dtf-list/index.vue
+7
-7
No files found.
src/config/index.js
View file @
4964d56c
...
...
@@ -54,7 +54,9 @@ export const pathMap = {
replenishmentComposingDesignImages
:
"factory/podOrderOperation/replenishmentComposingDesignImages"
,
//获取单个批次号信息
podOrderBatchDownload
:
"factory/podOrderBatchDownload/get"
podOrderBatchDownload
:
"factory/podOrderBatchDownload/get"
,
//操作日志
getPodOrderLog
:
"factory/podOrderLog/getPodOrderLog"
};
// 操作单状态枚举
export
const
statusMap
=
{
...
...
src/server/entity/function.js
View file @
4964d56c
...
...
@@ -686,7 +686,7 @@ export default {
});
res
.
send
(
data
);
}
catch
(
error
)
{
console
.
log
(
"
checkInventory
"
,
error
);
console
.
log
(
"
productionConfig
"
,
error
);
res
.
json
({
code
:
500
,
msg
:
error
});
}
},
...
...
@@ -703,7 +703,7 @@ export default {
});
res
.
send
(
data
);
}
catch
(
error
)
{
console
.
log
(
"
checkInventory
"
,
error
);
console
.
log
(
"
productionConfigUpdate
"
,
error
);
res
.
json
({
code
:
500
,
msg
:
error
});
}
},
...
...
@@ -720,7 +720,7 @@ export default {
});
res
.
send
(
data
);
}
catch
(
error
)
{
console
.
log
(
"
checkInventory
"
,
error
);
console
.
log
(
"
productionSoftware
"
,
error
);
res
.
json
({
code
:
500
,
msg
:
error
});
}
},
...
...
@@ -738,7 +738,7 @@ export default {
});
res
.
send
(
data
);
}
catch
(
error
)
{
console
.
log
(
"
checkInventory
"
,
error
);
console
.
log
(
"
listMaterialsByBatch
"
,
error
);
res
.
json
({
code
:
500
,
msg
:
error
});
}
},
...
...
@@ -756,7 +756,7 @@ export default {
});
res
.
send
(
data
);
}
catch
(
error
)
{
console
.
log
(
"
checkInventory
"
,
error
);
console
.
log
(
"
psReComposingDesignImages
"
,
error
);
res
.
json
({
code
:
500
,
msg
:
error
});
}
},
...
...
@@ -773,7 +773,7 @@ export default {
});
res
.
send
(
data
);
}
catch
(
error
)
{
console
.
log
(
"
checkInventory
"
,
error
);
console
.
log
(
"
listOperationByBatch
"
,
error
);
res
.
json
({
code
:
500
,
msg
:
error
});
}
},
...
...
@@ -805,7 +805,7 @@ export default {
const
result
=
await
downloadDTFFiles
(
files
[
0
].
url
,
targetDir
);
res
.
json
({
code
:
200
,
data
:
result
});
}
catch
(
error
)
{
console
.
log
(
"
checkInventory
"
,
error
);
console
.
log
(
"
replenishmentComposingDesignImages
"
,
error
);
res
.
json
({
code
:
500
,
msg
:
error
});
}
},
...
...
@@ -822,7 +822,24 @@ export default {
res
.
json
({
code
:
200
,
data
});
}
catch
(
error
)
{
console
.
log
(
"checkInventory"
,
error
);
console
.
log
(
"podOrderBatchDownload"
,
error
);
res
.
json
({
code
:
500
,
msg
:
error
});
}
},
getPodOrderLog
:
async
(
req
,
res
)
=>
{
env
=
getHostApi
().
apiApiHost
;
const
token
=
req
.
headers
[
"jwt-token"
];
const
{
id
}
=
req
.
body
;
let
url
=
pathMap
[
"getPodOrderLog"
];
try
{
let
{
data
}
=
await
axios
.
get
(
`
${
env
}
/
${
url
}
?id=
${
id
}
`
,
{
headers
:
{
"jwt-token"
:
token
}
});
res
.
json
({
code
:
200
,
data
});
}
catch
(
error
)
{
console
.
log
(
"getPodOrderLog"
,
error
);
res
.
json
({
code
:
500
,
msg
:
error
});
}
}
...
...
src/server/routes/index.js
View file @
4964d56c
...
...
@@ -81,6 +81,8 @@ autoRegisterRouter(
autoRegisterRouter
(
router
,
"podOrderBatchDownload"
,
fn
.
podOrderBatchDownload
);
//根据批次分页查询操作单
autoRegisterRouter
(
router
,
"listOperationByBatch"
,
fn
.
listOperationByBatch
);
//操作日志
autoRegisterRouter
(
router
,
"getPodOrderLog"
,
fn
.
getPodOrderLog
);
// 根据生产单号查询详情
autoRegisterRouter
(
router
,
"findByPodProductionNo"
,
fn
.
findByPodProductionNo
);
...
...
src/utils/download
.
api.js
→
src/utils/download
-
api.js
View file @
4964d56c
File moved
src/utils/download-typesetting.js
View file @
4964d56c
const
{
ipcMain
,
BrowserWindow
}
=
require
(
"electron"
);
const
path
=
require
(
"path"
);
const
{
getHostApi
}
=
require
(
"@/server/utils/store"
);
const
{
batchDownloadByStr
}
=
require
(
"./
utils/
download-core"
);
const
{
batchDownloadByStr
}
=
require
(
"./download-core"
);
/* ===================== 原有命名逻辑(完全保留) ===================== */
function
formatTime
()
{
...
...
src/views/dtf-batch-detail/detail.vue
View file @
4964d56c
...
...
@@ -193,8 +193,17 @@ export default {
return
[{
url
:
trimmed
}];
}
},
openLogDialog
()
{
this
.
logVisible
=
true
;
async
openLogDialog
(
item
)
{
try
{
const
{
data
}
=
await
this
.
$api
.
post
(
pathMap
[
"getPodOrderLog"
],
item
.
id
);
this
.
logList
=
data
;
this
.
logVisible
=
true
;
}
catch
(
error
)
{
console
.
log
(
error
);
}
},
changeActive
(
item
)
{
const
index
=
this
.
selection
.
indexOf
(
item
.
id
);
...
...
src/views/dtf-list/index.vue
View file @
4964d56c
...
...
@@ -15,7 +15,7 @@ import {
submitTypesettingDownload
,
getTypesettingDownloadStatus
,
onTypesettingStatusChange
}
from
"@/
api/download.
api"
;
}
from
"@/
utils/download-
api"
;
export
default
{
name
:
"design-dtf"
,
...
...
@@ -39,7 +39,7 @@ export default {
templateBatchArrangeNum
:
""
,
templateId
:
""
,
isDownloading
:
false
,
resTypesettingis
Downloading
:
false
,
Type
Downloading
:
false
,
dtfSetting
:
getDTFSetting
(),
removeStatusListener
:
null
,
// 保存取消监听函数
...
...
@@ -243,7 +243,7 @@ export default {
//提交手动排版
async
submit
()
{
if
(
this
.
resTypesettingis
Downloading
)
{
if
(
this
.
Type
Downloading
)
{
this
.
$message
.
warning
(
"其他排版下载中,请等待完成后再操作"
);
return
;
}
...
...
@@ -251,7 +251,7 @@ export default {
return
this
.
$message
.
error
(
"请选择排版宽度"
);
}
try
{
this
.
resTypesettingis
Downloading
=
true
;
this
.
Type
Downloading
=
true
;
if
(
this
.
dtfSetting
.
widthStrategy
==
3
&&
this
.
radio
==
60
)
{
this
.
$confirm
(
"由于排版设置中选择“按更大规格排版”仅适用于40+2,选60时,默认超60的规格不排版"
,
...
...
@@ -293,7 +293,7 @@ export default {
this
.
fetchBatchList
(
this
.
searchForm
);
}
catch
(
error
)
{
console
.
log
(
error
);
this
.
resTypesettingis
Downloading
=
false
;
this
.
Type
Downloading
=
false
;
}
},
...
...
@@ -359,7 +359,7 @@ export default {
*/
handleDownloadStatus
(
type
,
status
)
{
const
statusKey
=
type
===
"material"
?
"isDownloading"
:
"
resTypesettingis
Downloading"
;
type
===
"material"
?
"isDownloading"
:
"
Type
Downloading"
;
this
[
statusKey
]
=
status
.
isRunning
;
if
(
!
status
.
isRunning
&&
status
.
result
)
{
...
...
@@ -381,7 +381,7 @@ export default {
const
res
=
await
getDownloadStatus
();
const
resTypesetting
=
await
getTypesettingDownloadStatus
();
this
.
isDownloading
=
res
.
data
.
isRunning
;
this
.
resTypesettingis
Downloading
=
resTypesetting
.
data
.
isRunning
;
this
.
Type
Downloading
=
resTypesetting
.
data
.
isRunning
;
}
catch
(
err
)
{
console
.
error
(
"同步下载状态失败"
,
err
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment