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 9dacf737
authored
Sep 04, 2024
by
Tianqing Liu
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat: 增加批次功能,回显优化
1 parent
28b0a08b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
src/views/batchesResult/batchesResult.vue
src/views/batchesResult/batchesResult.vue
View file @
9dacf73
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
<a-input-number
v-model:value=
"queryForm.maxNum"
:min=
"queryForm.maxNum||0"
:max=
"100000000"
style=
"width: 140px"
/>
<a-input-number
v-model:value=
"queryForm.maxNum"
:min=
"queryForm.maxNum||0"
:max=
"100000000"
style=
"width: 140px"
/>
</a-form-item>
</a-form-item>
<a-form-item
label=
"批次ID:"
style=
"padding: 5px 0"
>
<a-form-item
label=
"批次ID:"
style=
"padding: 5px 0"
>
<a-input
v-model:value=
"queryForm.batchId"
style=
"width: 240px"
/>
<a-input
v-model:value=
"queryForm.batchId"
style=
"width: 240px"
:allowClear=
"true"
/>
</a-form-item>
</a-form-item>
<a-form-item
style=
"padding: 5px 0"
>
<a-form-item
style=
"padding: 5px 0"
>
<a-button
type=
"primary"
@
click=
"clickSearch"
:loading=
"isLoading"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"clickSearch"
:loading=
"isLoading"
>
查询
</a-button>
...
@@ -134,6 +134,7 @@
...
@@ -134,6 +134,7 @@
batchId
:
''
,
batchId
:
''
,
})
})
const
searchCondition
=
ref
({})
const
searchCondition
=
ref
({})
// 回显数据
if
(
window
.
localStorage
.
getItem
(
'searchCondition'
))
{
if
(
window
.
localStorage
.
getItem
(
'searchCondition'
))
{
searchCondition
.
value
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'searchCondition'
));
searchCondition
.
value
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'searchCondition'
));
queryForm
.
startTime
=
searchCondition
.
value
.
startTime
;
queryForm
.
startTime
=
searchCondition
.
value
.
startTime
;
...
@@ -141,7 +142,7 @@
...
@@ -141,7 +142,7 @@
queryForm
.
minNum
=
searchCondition
.
value
.
minNum
||
0
;
queryForm
.
minNum
=
searchCondition
.
value
.
minNum
||
0
;
queryForm
.
maxNum
=
searchCondition
.
value
.
maxNum
||
100000
;
queryForm
.
maxNum
=
searchCondition
.
value
.
maxNum
||
100000
;
queryForm
.
date
=
searchCondition
.
value
.
date
;
queryForm
.
date
=
searchCondition
.
value
.
date
;
queryForm
.
batchId
=
searchCondition
.
value
.
batch
I
d
||
''
queryForm
.
batchId
=
searchCondition
.
value
.
batch
_i
d
||
''
}
}
const
onPageNumChange
=
function
(
num
)
{
const
onPageNumChange
=
function
(
num
)
{
pageNum
.
value
=
num
pageNum
.
value
=
num
...
@@ -271,7 +272,7 @@
...
@@ -271,7 +272,7 @@
maxNum
:
rawData
.
maxNum
,
maxNum
:
rawData
.
maxNum
,
pageNum
:
pageNum
.
value
,
pageNum
:
pageNum
.
value
,
pageSize
:
pageSize
.
value
,
pageSize
:
pageSize
.
value
,
batchId
:
rawData
.
batchId
,
batchId
:
rawData
.
batchId
||
''
,
})
})
// 用于localStorage存储
// 用于localStorage存储
const
storageData
=
filterEmptyValueInObject
({
const
storageData
=
filterEmptyValueInObject
({
...
@@ -283,12 +284,13 @@
...
@@ -283,12 +284,13 @@
maxNum
:
rawData
.
maxNum
,
maxNum
:
rawData
.
maxNum
,
startTime
:
rawData
.
startTime
,
startTime
:
rawData
.
startTime
,
endTime
:
rawData
.
endTime
,
endTime
:
rawData
.
endTime
,
batchId
:
rawData
.
batchId
,
})
})
let
searchCondition
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'searchCondition'
));
let
searchCondition
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'searchCondition'
));
let
newSearchCondition
=
{
let
newSearchCondition
=
{
...
searchCondition
,
...
searchCondition
,
...
storageData
,
...
storageData
,
// 写在上面,会被filterEmptyValueInObject方法过滤
batch_id
:
rawData
.
batchId
||
''
,
}
}
window
.
localStorage
.
setItem
(
'searchCondition'
,
JSON
.
stringify
(
newSearchCondition
))
window
.
localStorage
.
setItem
(
'searchCondition'
,
JSON
.
stringify
(
newSearchCondition
))
batchesResultApi
.
getBatchesResultList
(
data
).
then
(
batchesResultApi
.
getBatchesResultList
(
data
).
then
(
...
...
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