Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
take_order
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
和慭琛
take_order
Commits
1f24b7fe
Commit
1f24b7fe
authored
May 12, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新拍照项保留图片
parent
fee2dee1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
11 deletions
+28
-11
list.vue
take-order/pages/photo/list.vue
+28
-11
No files found.
take-order/pages/photo/list.vue
View file @
1f24b7fe
...
@@ -148,7 +148,6 @@
...
@@ -148,7 +148,6 @@
const
data
=
cache
.
getCache
(
this
.
systemId
)
const
data
=
cache
.
getCache
(
this
.
systemId
)
const
globalData
=
getApp
().
globalData
const
globalData
=
getApp
().
globalData
if
(
!
globalData
.
cacheUpdate
)
{
// 无需更新,读取缓存
if
(
!
globalData
.
cacheUpdate
)
{
// 无需更新,读取缓存
this
.
loading
=
false
this
.
loading
=
false
this
.
handleData
(
data
.
result
)
this
.
handleData
(
data
.
result
)
...
@@ -174,21 +173,39 @@
...
@@ -174,21 +173,39 @@
title
:
res
.
result
.
error_msg
title
:
res
.
result
.
error_msg
})
})
}
else
{
}
else
{
const
data
=
{
that
.
diffData
(
res
.
result
)
classify_id
:
this
.
classifyId
,
system_id
:
this
.
systemId
,
brand_id
:
this
.
brandId
,
loadTime
:
Date
.
now
(),
result
:
res
.
result
}
cache
.
setCache
(
this
.
systemId
,
data
)
that
.
handleData
(
res
.
result
)
}
}
}
}
})
})
},
},
diffData
:
function
(
result
)
{
const
data
=
cache
.
getCache
(
this
.
systemId
)
if
(
data
)
{
// 只更新拍照项,不更新拍照的图片
const
lists
=
data
.
result
.
map
(
v
=>
v
.
list
)
const
photoLists
=
lists
[
0
].
concat
(
lists
[
1
])
result
.
forEach
(
a
=>
{
a
.
list
.
forEach
(
b
=>
{
const
row
=
photoLists
.
find
(
v
=>
v
.
_id
===
b
.
_id
)
if
(
row
&&
row
.
imageList
.
length
>
0
)
{
b
.
imageList
=
row
.
imageList
}
})
})
}
const
cacheData
=
{
classify_id
:
this
.
classifyId
,
system_id
:
this
.
systemId
,
brand_id
:
this
.
brandId
,
loadTime
:
Date
.
now
(),
result
:
result
}
cache
.
setCache
(
this
.
systemId
,
cacheData
)
this
.
handleData
(
result
)
},
handleData
:
function
(
result
)
{
handleData
:
function
(
result
)
{
this
.
activeTop
=
0
this
.
activeTop
=
0
const
globalData
=
getApp
().
globalData
const
globalData
=
getApp
().
globalData
...
...
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