Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
factory_front
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
qinjianhui
factory_front
Commits
f262d51d
Commit
f262d51d
authored
Apr 01, 2026
by
qinjianhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 操作单卡片布局添加鼠标右键功能
parent
5050bb2e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
src/views/order/factoryOrderNew/component/CardLayout.vue
+59
-0
No files found.
src/views/order/factoryOrderNew/component/CardLayout.vue
View file @
f262d51d
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
:key=
"item.id"
:key=
"item.id"
class=
"card-grid-item"
class=
"card-grid-item"
@
click=
"handleCardClick(item)"
@
click=
"handleCardClick(item)"
@
contextmenu
.
prevent=
"(e: MouseEvent) => rightClick(e)"
>
>
<CommonCard
<CommonCard
:card-item=
"item"
:card-item=
"item"
...
@@ -228,6 +229,21 @@
...
@@ -228,6 +229,21 @@
<div
v-if=
"!logList.length"
class=
"empty-content"
>
暂无数据
</div>
<div
v-if=
"!logList.length"
class=
"empty-content"
>
暂无数据
</div>
</el-dialog>
</el-dialog>
</div>
</div>
<RightClickMenu
ref=
"rightMenuRef"
:show-copy-count=
"false"
:show-copy-sub-shop-number=
"false"
@
on-change=
"rightChange"
>
<
template
#
default
>
<div
class=
"menu-item"
@
click=
"rightChange('order-number')"
>
复制订单号
</div>
<div
class=
"menu-item"
@
click=
"rightChange('operationNo')"
>
复制操作单号
</div>
</
template
>
</RightClickMenu>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
...
@@ -239,6 +255,7 @@ import usePageList from '@/utils/hooks/usePageList'
...
@@ -239,6 +255,7 @@ import usePageList from '@/utils/hooks/usePageList'
import
{
operateOrderListData
}
from
'@/types/api/factoryOrderNew'
import
{
operateOrderListData
}
from
'@/types/api/factoryOrderNew'
import
type
{
LogListData
}
from
'@/types/api/order'
import
type
{
LogListData
}
from
'@/types/api/order'
import
LogList
from
'@/components/LogList.vue'
import
LogList
from
'@/components/LogList.vue'
import
RightClickMenu
from
'@/components/RightClickMenu.vue'
import
platformJson
from
'../../../../json/platform.json'
import
platformJson
from
'../../../../json/platform.json'
const
props
=
defineProps
<
{
const
props
=
defineProps
<
{
...
@@ -276,6 +293,7 @@ const {
...
@@ -276,6 +293,7 @@ const {
const
selectedItems
=
ref
<
operateOrderListData
[]
>
([])
const
selectedItems
=
ref
<
operateOrderListData
[]
>
([])
const
logVisible
=
ref
(
false
)
const
logVisible
=
ref
(
false
)
const
logList
=
ref
<
LogListData
[]
>
([])
const
logList
=
ref
<
LogListData
[]
>
([])
const
rightMenuRef
=
ref
()
const
isSelected
=
(
item
:
operateOrderListData
)
=>
const
isSelected
=
(
item
:
operateOrderListData
)
=>
selectedItems
.
value
.
some
((
s
)
=>
s
.
id
===
item
.
id
)
selectedItems
.
value
.
some
((
s
)
=>
s
.
id
===
item
.
id
)
...
@@ -299,6 +317,47 @@ const copyText = (text: string) => {
...
@@ -299,6 +317,47 @@ const copyText = (text: string) => {
ElMessage
.
success
(
'复制成功'
)
ElMessage
.
success
(
'复制成功'
)
}
}
const
rightClick
=
(
e
:
MouseEvent
)
=>
{
rightMenuRef
.
value
?.
setPosition
({
x
:
e
.
clientX
,
y
:
e
.
clientY
,
})
}
const
rightChange
=
(
code
:
string
)
=>
{
if
(
code
===
'select-all'
)
{
selectedItems
.
value
=
[...(
cardData
.
value
as
operateOrderListData
[])]
emit
(
'selection-change'
,
[...
selectedItems
.
value
])
}
else
if
(
code
===
'cancel-select'
)
{
selectedItems
.
value
=
[]
emit
(
'selection-change'
,
[])
}
else
if
(
code
===
'copy_shopNumber'
)
{
const
str
=
(
cardData
.
value
as
operateOrderListData
[])
.
map
((
item
)
=>
item
.
shopNumber
)
.
filter
(
Boolean
)
.
join
(
','
)
if
(
!
str
)
return
ElMessage
.
warning
(
'当前数据没有店铺单号'
)
navigator
.
clipboard
.
writeText
(
str
)
ElMessage
.
success
(
'复制成功'
)
}
else
if
(
code
===
'order-number'
)
{
const
str
=
cardData
.
value
.
map
((
item
)
=>
(
item
as
operateOrderListData
)?.
podOrderNo
)
.
filter
(
Boolean
)
.
join
(
','
)
if
(
!
str
)
return
ElMessage
.
warning
(
'当前数据没有订单号'
)
navigator
.
clipboard
.
writeText
(
str
)
ElMessage
.
success
(
'复制成功'
)
}
else
if
(
code
===
'operationNo'
)
{
const
str
=
cardData
.
value
.
map
((
item
)
=>
(
item
as
operateOrderListData
)?.
operationNo
)
.
filter
(
Boolean
)
.
join
(
','
)
if
(
!
str
)
return
ElMessage
.
warning
(
'当前数据没有操作单号'
)
navigator
.
clipboard
.
writeText
(
str
)
ElMessage
.
success
(
'复制成功'
)
}
}
const
openLogDialog
=
async
(
item
:
operateOrderListData
)
=>
{
const
openLogDialog
=
async
(
item
:
operateOrderListData
)
=>
{
if
(
!
item
.
podOrderId
)
return
if
(
!
item
.
podOrderId
)
return
try
{
try
{
...
...
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