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
4fbb5e26
Commit
4fbb5e26
authored
Jul 02, 2026
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:修改card样式
parent
587836ed
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
74 additions
and
38 deletions
+74
-38
src/components/LogList.vue
+3
-2
src/views/dtf-batch-detail/detail.vue
+27
-33
src/views/dtf-list/index.vue
+44
-3
No files found.
src/components/LogList.vue
View file @
4fbb5e26
...
@@ -16,8 +16,9 @@
...
@@ -16,8 +16,9 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
script
setup
lang
=
"ts"
>
<
script
>
export
default
{
export
default
{
name
:
"LogList"
,
props
:
{
props
:
{
logList
:
{
logList
:
{
default
:
()
=>
[],
default
:
()
=>
[],
...
@@ -26,7 +27,7 @@ export default {
...
@@ -26,7 +27,7 @@ export default {
}
}
}
;
}
;
<
/script
>
<
/script
>
<
style
lang
=
"
sc
ss"
scoped
>
<
style
lang
=
"
le
ss"
scoped
>
.
log
-
list
{
.
log
-
list
{
height
:
500
px
;
height
:
500
px
;
overflow
:
auto
;
overflow
:
auto
;
...
...
src/views/dtf-batch-detail/detail.vue
View file @
4fbb5e26
...
@@ -3,12 +3,13 @@ import BaseCard from "@/components/BaseCard.vue";
...
@@ -3,12 +3,13 @@ import BaseCard from "@/components/BaseCard.vue";
import
DTFhead
from
"./components/detailHead.vue"
;
import
DTFhead
from
"./components/detailHead.vue"
;
import
DetailDialog
from
"@/components/detailDialog.vue"
;
import
DetailDialog
from
"@/components/detailDialog.vue"
;
const
{
remote
}
=
require
(
"electron"
);
const
{
remote
}
=
require
(
"electron"
);
import
LogList
from
"@//components/LogList.vue"
;
const
{
Menu
}
=
remote
;
const
{
Menu
}
=
remote
;
import
dayjs
from
"dayjs"
;
import
dayjs
from
"dayjs"
;
export
default
{
export
default
{
name
:
"dtf-batch-detail"
,
name
:
"dtf-batch-detail"
,
components
:
{
BaseCard
,
DTFhead
,
DetailDialog
},
components
:
{
BaseCard
,
DTFhead
,
DetailDialog
,
LogList
},
props
:
{
props
:
{
user
:
{
user
:
{
default
:
()
=>
({
default
:
()
=>
({
...
@@ -119,7 +120,11 @@ export default {
...
@@ -119,7 +120,11 @@ export default {
setProductMark
(
tagsId
)
{},
setProductMark
(
tagsId
)
{},
parseImageAry
(
tagsId
)
{},
parseImageAry
(
tagsId
)
{},
openLogDialog
(
tagsId
)
{},
openLogDialog
(
tagsId
)
{
console
.
log
(
999
);
this
.
logVisible
=
true
;
},
changeActive
(
item
)
{
changeActive
(
item
)
{
item
.
active
=
!
item
.
active
;
item
.
active
=
!
item
.
active
;
},
},
...
@@ -253,17 +258,6 @@ export default {
...
@@ -253,17 +258,6 @@ export default {
<
template
#
operations
>
<
template
#
operations
>
<div
class=
"flex-row flex-row-gap6"
>
<div
class=
"flex-row flex-row-gap6"
>
<div
<div
v-if=
"
item?.productMark === 'custom_normal' ||
item?.productMark === 'normal'
"
class=
"product-mark-badge"
:title=
"`类型:$
{setProductMark(item?.productMark)}类`"
>
{{
setProductMark
(
item
?.
productMark
)
}}
</div>
<div
v-if=
"item.customizedQuantity"
class=
"quantity-badge"
class=
"quantity-badge"
:class=
"
:class=
"
item.customizedQuantity === 1
item.customizedQuantity === 1
...
@@ -276,23 +270,20 @@ export default {
...
@@ -276,23 +270,20 @@ export default {
>
>
{{
item
.
customizedQuantity
===
1
?
"单"
:
"多"
}}
{{
item
.
customizedQuantity
===
1
?
"单"
:
"多"
}}
</div>
</div>
<
el-icon
<
i
name=
"caozuorizhi
"
class=
"el-icon-tickets quantity-badge
"
style=
"
width: 28px; height: 28px
"
style=
"
background-color: #41c792;
"
@
click
.
stop=
"openLogDialog(item)"
@
click
.
stop=
"openLogDialog(item)"
title=
"操作日志"
>
>
<template
#
title
>
</i>
<title>
操作日志
</title>
<i
</
template
>
style=
"background-color: #2183fe;"
</el-icon>
class=
"el-icon-search quantity-badge"
<el-icon
name=
"chakanxiangqing"
@
click
.
stop=
"handleViewDetail(item)"
@
click
.
stop=
"handleViewDetail(item)"
title=
"查看详情"
>
>
<
template
#
title
>
</i>
<title>
查看详情
</title>
</
template
>
</el-icon>
</div>
</div>
</
template
>
</
template
>
<
template
#
info
>
<
template
#
info
>
...
@@ -397,18 +388,18 @@ export default {
...
@@ -397,18 +388,18 @@ export default {
</div>
</div>
</div>
</div>
<el-dialog
<el-dialog
v-model
=
"logVisible"
:visible
.
sync
=
"logVisible"
title=
"操作日志"
title=
"操作日志"
width=
"1000px"
width=
"1000px"
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
>
>
<LogList
:log-list=
"logList"
/>
<LogList
v-if=
"logList.length"
:log-list=
"logList"
/>
<div
v-
if=
"!logList.length"
class=
"empty-content"
>
暂无数据
</div>
<div
v-
else
class=
"empty-content"
>
暂无数据
</div>
</el-dialog>
</el-dialog>
<DetailDialog
<DetailDialog
:show
.
sync=
"detailVisible"
:show
.
sync=
"detailVisible"
:img-url=
"''"
:img-url=
"''"
:info=
"
''
"
:info=
"
{}
"
></DetailDialog>
></DetailDialog>
</div>
</div>
</template>
</template>
...
@@ -483,11 +474,14 @@ export default {
...
@@ -483,11 +474,14 @@ export default {
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
.quantity-badge
{
.quantity-badge
{
background-color
:
#f56c6c
;
width
:
28px
;
height
:
28px
;
color
:
#fff
;
color
:
#fff
;
padding
:
5px
8px
;
border-radius
:
4px
;
border-radius
:
4px
;
font-size
:
12px
;
font-size
:
16px
;
line-height
:
28px
;
text-align
:
center
;
margin-left
:
5px
;
}
}
.multiple-quantity-badge-color
{
.multiple-quantity-badge-color
{
...
...
src/views/dtf-list/index.vue
View file @
4fbb5e26
...
@@ -98,10 +98,51 @@ export default {
...
@@ -98,10 +98,51 @@ export default {
]
]
};
};
},
},
mounted
()
{},
mounted
()
{
this
.
fetchBatchList
();
// 开启5分钟轮询
this
.
pollTimer
=
setInterval
(()
=>
{
this
.
fetchBatchList
();
},
5
*
60
*
1000
);
// 监听下载结果
ipcRenderer
.
on
(
"download:success"
,
(
_
,
batchNum
)
=>
{
this
.
$message
.
success
(
`批次
${
batchNum
}
素材下载完成`
);
});
ipcRenderer
.
on
(
"download:error"
,
(
_
,
{
batchArrangeNum
,
msg
})
=>
{
this
.
$message
.
error
(
`批次
${
batchArrangeNum
}
下载失败:
${
msg
}
`
);
});
},
beforeDestroy
()
{
clearInterval
(
this
.
pollTimer
);
ipcRenderer
.
removeAllListeners
(
"download:success"
);
ipcRenderer
.
removeAllListeners
(
"download:error"
);
},
methods
:
{
methods
:
{
loadData
()
{
async
fetchBatchList
()
{
// 请求列表接口
// 先判断:有下载任务在跑,本轮直接跳过
const
status
=
ipcRenderer
.
sendSync
(
"download:getStatus"
);
if
(
status
.
isRunning
)
return
;
try
{
// const res = await getBatchListApi();
let
res
;
if
(
res
.
code
===
200
)
{
this
.
tableData
=
res
.
data
||
[];
this
.
autoHandleDownload
();
}
}
catch
(
err
)
{
console
.
error
(
"批次列表拉取失败"
,
err
);
}
},
autoHandleDownload
()
{
// 1. 过滤出 status 为“是”的批次
const
finishList
=
this
.
tableData
.
filter
(
item
=>
item
.
status
===
"是"
);
if
(
finishList
.
length
===
0
)
return
;
// 2. 直接发给主进程,主进程会自动校验本地文件、过滤已存在的批次
ipcRenderer
.
sendSync
(
"download:addTasks"
,
finishList
);
},
},
handleSelect
(
rows
)
{
handleSelect
(
rows
)
{
console
.
log
(
"选中行"
,
rows
);
console
.
log
(
"选中行"
,
rows
);
...
...
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