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 12c302e2
authored
Apr 11, 2024
by
Tianqing Liu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 优化数据重跑功能
1 parent
43acc8b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
14 deletions
src/views/DataRerun/DataRerun.vue
src/views/DataRerun/DataRerunApi.js
src/views/DataRerun/DataRerun.vue
View file @
12c302e
...
...
@@ -2,8 +2,10 @@
<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-option
:value=
"1"
>
全店重跑
</a-select-option>
</a-select>
</a-form-item>
<a-form-item
label=
"集团:"
>
...
...
@@ -34,7 +36,7 @@
style=
"width: 200px"
mode=
"multiple"
:maxTagCount=
"1"
:disabled=
"queryForm.dataType ===
2
"
:disabled=
"queryForm.dataType ===
1
"
:options=
"showedProgressList"
>
<template
#
dropdownRender=
"
{ menuNode: menu }">
...
...
@@ -61,17 +63,20 @@
</a-form-item>
</a-form>
<div
class=
"result-wrapper-2"
>
<el-row
v-for=
"item in resultList"
style=
"padding: 2px 0"
>
<el-col
:span=
"3"
>
{{ progressMap[item.scheduleType] + ':' }}
</el-col>
<el-col
:span=
"21"
>
<el-progress
:text-inside=
"true"
:stroke-width=
"26"
:percentage=
"item?.progress"
/>
</el-col>
<!--新的日志-->
<div
v-if=
"queryForm.dataType === 1"
class=
"card-container"
>
<a-card
title=
"全店重跑日志"
style=
"width: 600px"
>
<el-row
v-for=
"item in msgLogList"
style=
"padding: 2px 0;"
>
<el-col
:span=
"8"
>
{{ item.name + ':' }}
</el-col>
<el-col
:span=
"16"
>
<a-tag>
{{ item.status }}
</a-tag>
</el-col>
</el-row>
</a-card>
</div>
<InformationDisplay
:data=
"informationList"
:key=
"informationList"
></InformationDisplay>
<InformationDisplay
v-else
:data=
"informationList"
:key=
"informationList"
></InformationDisplay>
</template>
<
script
>
...
...
@@ -139,7 +144,7 @@ export default {
const
queryForm
=
reactive
(
{
dataType
:
1
,
dataType
:
2
,
account_id
:
[],
plaza_id
:
[],
...
...
@@ -296,7 +301,7 @@ export default {
}
const
confirmSearch
=
function
()
{
if
(
queryForm
.
dataType
===
1
)
{
if
(
queryForm
.
dataType
===
2
)
{
resultList
.
value
=
[]
informationList
.
value
=
[]
for
(
const
scheduleType
of
queryForm
.
scheduleTypeList
)
...
...
@@ -311,6 +316,7 @@ export default {
// 新需求:数据重跑
const
msgLogList
=
ref
([])
const
confirmSearch2
=
function
()
{
if
(
queryForm
.
account_id
.
length
<
1
)
{
ElMessage
({
...
...
@@ -320,6 +326,7 @@ export default {
return
}
msgLogList
.
value
=
[]
for
(
const
mallId
of
queryForm
.
account_id
)
{
// 请求接口
const
rawData
=
toRaw
(
queryForm
)
...
...
@@ -328,13 +335,30 @@ export default {
startDate
:
formatDate
(
rawData
.
startDate
)
+
' '
+
'00:00:00'
,
endDate
:
formatDate
(
rawData
.
endDate
)
+
' '
+
'00:00:00'
,
}
msgLogList
.
value
.
push
(
getLogMsgList
(
mallId
))
dataRerunApi
.
getResult2
(
params
).
then
(
(
r
)
=>
{
console
.
log
(
'getResult2'
,
r
)
// msgLogList.value.push(getLogMsgList(r.data.id), '完成')
}
)
}
}
const
getLogMsgList
=
function
(
id
,
text
=
'开始'
)
{
const
targetMall
=
plazaList
.
value
.
find
(
item
=>
item
.
value
===
id
)
if
(
targetMall
)
{
return
{
name
:
targetMall
.
label
,
status
:
text
,
}
}
else
{
return
{
name
:
'未知'
,
status
:
'-'
}
}
}
const
selectAll
=
function
()
{
queryForm
.
scheduleTypeList
=
[]
...
...
@@ -374,6 +398,7 @@ export default {
clearAll
,
confirmSearch2
,
msgLogList
,
}
}
}
...
...
@@ -381,6 +406,13 @@ export default {
<
style
lang=
"less"
scoped
>
@import
"./DataRerun.less"
;
.card-container
{
display
:
flex
;
justify-content
:
center
;
/deep/.ant-card-body
{
height
:
370px
;
}
}
.data-return-form
{
/deep/.ant-form-item
{
margin-bottom
:
10px
;
...
...
src/views/DataRerun/DataRerunApi.js
View file @
12c302e
...
...
@@ -27,7 +27,7 @@ class DataRerunApi {
return
axiosInstance
.
request
(
{
method
:
'GET'
,
url
:
`/
btool/
allData/reCal`
,
url
:
`/allData/reCal`
,
params
:
data
}
)
...
...
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