Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
source-trace-manage-go
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tracing
source-trace-manage-go
Commits
ce3637e7
Commit
ce3637e7
authored
Oct 30, 2020
by
zL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交更改
parent
48bab46c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
27 deletions
+47
-27
IncrementalDataList.vue
src/components/newProductList/IncrementalDataList.vue
+41
-9
newProductList.vue
src/entry/sy/views/category/newProductList.vue
+0
-17
mutations.ts
src/store/mutations.ts
+3
-0
state.ts
src/store/state.ts
+1
-0
types.ts
src/store/types.ts
+2
-1
No files found.
src/components/newProductList/IncrementalDataList.vue
View file @
ce3637e7
...
...
@@ -28,7 +28,9 @@
</div>
<span
class=
"content-number"
>
{{
serialNumber
(
index
)
}}
</span>
</li>
<li
class=
"content-name"
@
click=
"showProduct(item)"
>
{{
item
.
name
}}
</li>
<li
class=
"content-name"
@
click=
"showProduct(item, index)"
>
{{
item
.
name
}}
</li>
<li
class=
"content-time"
>
{{
item
.
update_time
|
formatTime
}}
</li>
<li
class=
"content-chain"
>
<div
class=
"content-the-above-link"
v-if=
"item.status === 2"
>
...
...
@@ -173,7 +175,10 @@
]"
></i>
</li>
<li
class=
"incremental-name"
@
click=
"enterDetails(item2, item)"
>
<li
class=
"incremental-name"
@
click=
"enterDetails(item2, item, index)"
>
{{
item2
.
name
}}
</li>
<li
class=
"incremental-time"
>
{{
item2
.
update_time
|
formatTime
}}
</li>
...
...
@@ -210,6 +215,7 @@
<
script
>
import
{
downloadQrCode
,
getQR
,
openChainBrowser
}
from
"@/utils/app/common"
;
import
{
GO_URLS
}
from
"@/config/URLS"
;
export
default
{
data
()
{
return
{
...
...
@@ -223,6 +229,12 @@ export default {
watch
:
{
getInfoList
:
function
(
newv
,
oldv
)
{
this
.
expandTheListIndex
=
-
1
;
if
(
this
.
$store
.
state
.
theAnchor
!=
-
1
)
{
this
.
expandTheList
(
newv
[
this
.
$store
.
state
.
theAnchor
],
this
.
$store
.
state
.
theAnchor
);
}
},
},
computed
:
{
...
...
@@ -241,11 +253,11 @@ export default {
};
},
},
created
()
{},
methods
:
{
// 进入详情页
enterDetails
(
item2
,
item
)
{
enterDetails
(
item2
,
item
,
index
)
{
if
(
item2
.
status
===
1
)
return
false
;
this
.
$store
.
commit
(
"setTheAnchor"
,
index
);
this
.
$router
.
push
({
path
:
"/editTemplate"
,
query
:
{
...
...
@@ -256,11 +268,26 @@ export default {
});
},
// 展开增量数据列表
expandTheList
(
item
,
index
)
{
this
.
$emit
(
"expandTheList"
,
item
,
index
);
setTimeout
(()
=>
{
async
expandTheList
(
item
,
index
)
{
if
(
this
.
expandTheListIndex
===
index
)
{
console
.
log
(
"满足判断"
);
this
.
expandTheListIndex
=
-
1
;
return
false
;
}
const
res
=
await
this
.
$ajax
({
type
:
"post"
,
url
:
GO_URLS
.
incrementList
,
params
:
{
base_hash
:
item
.
hash
,
page
:
1
,
page_size
:
10
,
},
});
if
(
res
)
{
let
list
=
res
.
data
.
results
;
this
.
$store
.
commit
(
"setIncrementList"
,
{
list
,
index
});
this
.
expandTheListIndex
=
index
;
}
,
300
);
}
},
// 打开区块链浏览器
handleChain
(
item
)
{
...
...
@@ -299,8 +326,13 @@ export default {
document
.
removeEventListener
(
"mousedown"
,
this
.
onHindMenu
);
},
// 进入详情页
showProduct
(
item
)
{
showProduct
(
item
,
index
)
{
if
(
item
.
status
===
1
||
item
.
status
===
3
)
return
false
;
if
(
item
.
increment_num
>
0
)
{
this
.
$store
.
commit
(
"setTheAnchor"
,
index
);
}
else
{
this
.
$store
.
commit
(
"setTheAnchor"
,
-
1
);
}
this
.
$router
.
push
({
path
:
"/editTemplate"
,
query
:
{
...
...
src/entry/sy/views/category/newProductList.vue
View file @
ce3637e7
...
...
@@ -47,7 +47,6 @@
<IncrementalDataList
@
increment=
"incrementOperation"
@
delete-goods=
"deleteGoodsShow"
@
expandTheList=
"expandTheList"
@
upload=
"upload"
@
delete-incremental=
"deleteTheIncremental"
@
incremental-chain=
"incrementalOnChain"
...
...
@@ -238,22 +237,6 @@ export default {
this
.
Copydetails
=
item
;
this
.
isShowCopy
=
true
;
},
// 展开增量更新列表
async
expandTheList
(
item
,
index
)
{
const
res
=
await
this
.
$ajax
({
type
:
"post"
,
url
:
GO_URLS
.
incrementList
,
params
:
{
base_hash
:
item
.
hash
,
page
:
1
,
page_size
:
10
,
},
});
if
(
res
)
{
let
list
=
res
.
data
.
results
;
this
.
$store
.
commit
(
"setIncrementList"
,
{
list
,
index
});
}
},
// 增量存证上链
incrementalOnChain
(
item2
,
item
)
{
this
.
isShowToChainDialog
=
true
;
...
...
src/store/mutations.ts
View file @
ce3637e7
...
...
@@ -45,6 +45,9 @@ const mutations: MutationTree<StateTypes> = {
setTemplateNum
(
state
,
num
)
{
state
.
templateNum
=
num
;
},
setTheAnchor
(
state
,
num
)
{
state
.
theAnchor
=
num
}
};
export
default
mutations
;
src/store/state.ts
View file @
ce3637e7
...
...
@@ -13,6 +13,7 @@ const state: StateTypes = {
existingEvidenceList
:
[],
userInfos
:
{},
templateNum
:
0
,
//模板数量
theAnchor
:
-
1
};
export
default
state
;
src/store/types.ts
View file @
ce3637e7
...
...
@@ -11,6 +11,7 @@ export interface StateTypes {
page
:
number
// 存证当前页码
existingEvidenceList
:
any
userInfos
:
object
,
// 用户信息
templateNum
:
number
// 模板数量
templateNum
:
number
,
// 模板数量
theAnchor
:
number
//用于记录增量列表的展开
}
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