Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
罗鑫霖
/
vion-tools
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3b05a470
authored
Apr 10, 2024
by
Tianqing Liu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 优化数据重跑功能UI
1 parent
0b60252a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
1 deletions
src/views/DataRerun/DataRerun.vue
src/views/DataRerun/DataRerun.vue
View file @
3b05a47
<
template
>
<a-form
:model=
"queryForm"
layout=
"inline"
:label-col=
"
{ style: { width: '70px' } }">
<a-form
class=
"data-return-form"
:model=
"queryForm"
layout=
"inline"
:label-col=
"
{ style: { width: '70px' } }">
<a-form-item
label=
"类型:"
>
<a-select
style=
"width: 176px"
v-model:value=
"queryForm.dataType"
>
<a-select-option
:value=
"1"
>
全店重跑
</a-select-option>
<a-select-option
:value=
"2"
>
分类重跑
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"集团:"
>
<a-select
v-model:value=
"queryForm.account_id"
style=
"width: 280px"
...
...
@@ -28,6 +34,7 @@
style=
"width: 200px"
mode=
"multiple"
:maxTagCount=
"1"
:disabled=
"queryForm.dataType === 2"
:options=
"showedProgressList"
>
<template
#
dropdownRender=
"
{ menuNode: menu }">
...
...
@@ -50,6 +57,7 @@
</a-form-item>
<a-form-item>
<a-button
type=
"primary"
@
click=
"confirmSearch"
>
开始
</a-button>
<!--<a-button type="primary" style="margin-left: 10px" @click="confirmSearch2">数据重跑</a-button>-->
</a-form-item>
</a-form>
...
...
@@ -130,6 +138,8 @@ export default {
const
queryForm
=
reactive
(
{
dataType
:
1
,
account_id
:
[],
plaza_id
:
[],
scheduleTypeList
:
[],
...
...
@@ -285,12 +295,52 @@ export default {
}
const
confirmSearch
=
function
()
{
if
(
queryForm
.
dataType
===
1
)
{
resultList
.
value
=
[]
informationList
.
value
=
[]
for
(
const
scheduleType
of
queryForm
.
scheduleTypeList
)
{
initializeWebSocket
(
scheduleType
)
}
}
else
{
// 分类重跑
confirmSearch2
()
}
}
// 新需求:数据重跑
const
initializeWebSocket2
=
function
(
scheduleType
)
{
if
(
webSocketMap
[
scheduleType
]
!==
undefined
)
{
webSocketMap
[
scheduleType
].
close
()
}
// const targetUrl = `${window._socketUrl}/recal/schedule/${scheduleType}`
const
targetUrl
=
''
webSocketMap
[
scheduleType
]
=
new
WebSocket
(
targetUrl
)
webSocketMap
[
scheduleType
].
onopen
=
()
=>
{
// 查询条件
queryData
(
scheduleType
)
}
webSocketMap
[
scheduleType
].
onmessage
=
function
(
event
)
{
let
message
=
JSON
.
parse
(
event
.
data
)
dealMessage
(
message
)
if
(
message
.
stepCount
===
1
)
{
webSocketMap
[
scheduleType
].
close
()
}
}
}
const
confirmSearch2
=
function
()
{
resultList
.
value
=
[]
informationList
.
value
=
[]
for
(
const
scheduleType
of
queryForm
.
scheduleTypeList
)
{
initializeWebSocket2
(
scheduleType
)
}
}
const
selectAll
=
function
()
{
...
...
@@ -329,6 +379,8 @@ export default {
confirmSearch
,
selectAll
,
clearAll
,
confirmSearch2
,
}
}
}
...
...
@@ -336,4 +388,9 @@ export default {
<
style
lang=
"less"
scoped
>
@import
"./DataRerun.less"
;
.data-return-form
{
/deep/.ant-form-item
{
margin-bottom
:
10px
;
}
}
</
style
>
Write
Preview
Markdown
is supported
Attach a file
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 post a comment