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
0175906b
Commit
0175906b
authored
Aug 06, 2025
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 'master'
Dev See merge request
!68
parents
5530d0d1
473240f9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
155 additions
and
1 deletions
+155
-1
src/api/podUsOrder.ts
+8
-0
src/assets/images/brush-no.png
+0
-0
src/components/NavMenu.vue
+109
-0
src/views/Home.vue
+1
-1
src/views/order/podUs/index.vue
+37
-0
No files found.
src/api/podUsOrder.ts
View file @
0175906b
...
...
@@ -535,3 +535,11 @@ export function rejectToApi(params: {
params
,
)
}
// 状态推送
export
function
statusPushApi
(
params
:
(
string
|
number
)[])
{
return
axios
.
post
<
never
,
BaseRespData
<
never
>>
(
`factory/podJomallOrderUs/statusPush`
,
params
,
)
}
src/assets/images/brush-no.png
0 → 100644
View file @
0175906b
1.27 KB
src/components/NavMenu.vue
View file @
0175906b
...
...
@@ -111,6 +111,16 @@
<ArrowRight
/>
</el-icon>
</div>
<!-- 右侧工具栏 -->
<div
class=
"tool_warper"
>
<div
title=
"格式工具"
style=
"cursor: pointer"
@
click=
"formatDrawer = true"
>
<img
src=
"../assets/images/brush-no.png"
width=
"24"
height=
"24"
/>
</div>
</div>
</div>
<el-dialog
v-model=
"dialogVisible"
...
...
@@ -157,6 +167,45 @@
</span>
</
template
>
</el-dialog>
<span>
<el-drawer
v-model=
"formatDrawer"
class=
"format-drawer"
title=
"格式工具"
direction=
"rtl"
size=
"45%"
>
<el-input
v-model=
"textareaT"
style=
"width: 100%"
:rows=
"10"
type=
"textarea"
placeholder=
"请输入"
@
input=
"confimTools"
/>
<div
style=
"
margin-top: 10px;
height: 250px;
overflow: auto;
border: 1px solid #ddd;
padding: 10px;
"
>
{{ newTextareaT }}
</div>
<
template
#
footer
>
<span
style=
"display: flex; justify-content: center"
>
<el-button
size=
"medium"
@
click=
"formatDrawer = false"
>
取 消
</el-button>
<el-button
size=
"medium"
type=
"primary"
@
click=
"copy"
>
拷 贝
</el-button>
</span>
</
template
>
</el-drawer>
</span>
</template>
<
script
setup
lang=
"ts"
>
import
{
...
...
@@ -205,6 +254,9 @@ const menuList = reactive(Menu)
const
userStore
=
userUserStore
()
const
userInfo
=
userStore
.
user
const
dialogVisible
=
ref
(
false
)
const
formatDrawer
=
ref
(
false
)
const
textareaT
=
ref
(
''
)
const
newTextareaT
=
ref
(
''
)
// 密码form
const
[
passwordForm
,
resetPasswordForm
]
=
useValue
<
PasswordForm
>
(
{}
as
PasswordForm
,
...
...
@@ -396,6 +448,43 @@ const ensureActiveTabVisible = () => {
})
}
// 格式工具输入
const
confimTools
=
(
v
:
string
)
=>
{
// 先处理结尾的多个空格,只保留一个
let
text
=
v
.
replace
(
/
\s
+$/
,
' '
)
// 处理开头的多个空格,只保留一个
text
=
text
.
replace
(
/^
\s
+/
,
' '
)
// 将多个连续空格替换为单个空格
text
=
text
.
replace
(
/
\s
+/g
,
' '
)
// 然后将所有空格和换行符替换为逗号
text
=
text
.
replace
(
/
(\s
|
[\r\n])
/g
,
','
)
// 如果结尾是逗号,则删除
if
(
text
.
slice
(
-
1
)
===
','
)
{
newTextareaT
.
value
=
text
.
slice
(
0
,
-
1
)
}
else
{
newTextareaT
.
value
=
text
}
}
const
copy
=
()
=>
{
const
oInput
=
document
.
createElement
(
'input'
)
oInput
.
value
=
newTextareaT
.
value
document
.
body
.
appendChild
(
oInput
)
oInput
.
select
()
// 选择对象
document
.
execCommand
(
'Copy'
)
// 执行浏览器复制命令
oInput
.
className
=
'oInput'
oInput
.
style
.
display
=
'none'
document
.
body
.
removeChild
(
oInput
)
ElMessage
({
message
:
'复制成功'
,
type
:
'success'
,
})
}
// 监听路由变化,自动添加标签
watch
(
()
=>
route
.
path
,
...
...
@@ -537,4 +626,24 @@ onUnmounted(() => {
display
:
flex
;
align-items
:
center
;
}
.tool_warper
{
position
:
absolute
;
top
:
50px
;
right
:
0
;
bottom
:
0
;
width
:
40px
;
background
:
#001529
;
z-index
:
9999
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
}
::v-deep
(
.el-drawer.rtl
)
{
height
:
80%
!important
;
top
:
15%
;
right
:
40px
;
}
</
style
>
src/views/Home.vue
View file @
0175906b
...
...
@@ -20,7 +20,7 @@ import NavMenu from '@/components/NavMenu.vue'
.container
{
flex
:
1
;
padding
:
0
10px
10px
;
padding
:
0
50px
10px
10px
;
background-color
:
#f6f6f6
;
overflow
:
hidden
;
}
...
...
src/views/order/podUs/index.vue
View file @
0175906b
...
...
@@ -572,6 +572,9 @@
</ElDropdown>
</span>
<span
v-if=
"status === 'COMPLETE'"
class=
"item"
>
<ElButton
type=
"warning"
@
click=
"statusPush"
>
状态推送
</ElButton>
</span>
<span
v-if=
"status === 'COMPLETE'"
class=
"item"
>
<ElButton
type=
"success"
@
click=
"exportData"
>
导出
</ElButton>
</span>
</ElFormItem>
...
...
@@ -2229,6 +2232,7 @@ import {
getgetInterceptStateGroupList
,
interceptUpdateApi
,
rejectToApi
,
statusPushApi
,
}
from
'@/api/podUsOrder'
import
{
BaseRespData
}
from
'@/types/api'
...
...
@@ -4718,6 +4722,39 @@ const interceptChange = async (status: boolean) => {
}
}
// 状态推送
const
statusPush
=
async
()
=>
{
if
(
selection
.
value
.
length
===
0
)
{
return
ElMessage
.
warning
(
'请选择数据'
)
}
try
{
await
ElMessageBox
.
confirm
(
'是否确认状态推送?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}
)
}
catch
{
return
}
const
loading
=
ElLoading
.
service
({
fullscreen
:
true
,
text
:
'操作中...'
,
background
:
'rgba(0, 0, 0, 0.3)'
,
}
)
try
{
const
res
=
await
statusPushApi
(
selection
.
value
.
map
((
item
)
=>
item
.
id
))
if
(
res
.
code
!==
200
)
return
ElMessage
.
success
(
'操作成功'
)
search
()
loadTabData
()
}
catch
(
e
)
{
resultInfo
.
value
=
[]
console
.
error
(
e
)
}
finally
{
loading
.
close
()
}
}
useRouter
().
beforeEach
((
to
,
from
,
next
)
=>
{
handleBeforeRouteLeave
(
to
,
from
,
next
)
}
)
...
...
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