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
27e32c51
Commit
27e32c51
authored
May 07, 2021
by
wcmoon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 解决增量更新丢失prehash 和basehash 问题
parent
71439ea4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
17 deletions
+28
-17
Index.vue
src/entry/czt/components/category/Index.vue
+1
-1
editTemplate.vue
src/entry/czt/views/template/editTemplate.vue
+27
-16
No files found.
src/entry/czt/components/category/Index.vue
View file @
27e32c51
...
...
@@ -203,6 +203,6 @@ export default class Template extends Vue {
}
.col_right--show {
display: block;
overflow-y:
scroll
;
overflow-y:
auto
;
}
</
style
>
src/entry/czt/views/template/editTemplate.vue
View file @
27e32c51
...
...
@@ -274,6 +274,8 @@ export default class editTemplate extends Vue {
];
// 所有文件类型
public
inputAccept
:
string
=
"application/pdf"
;
public
files
=
[];
public
prehash
=
''
;
public
basehash
=
''
;
// 系统模板>建立个人模板or建立存证
// 个人模板>建立存证or更新模板
// 建立存证>保存存证or保存模板
...
...
@@ -445,21 +447,32 @@ export default class editTemplate extends Vue {
this
.
localData
=
res
.
data
.
note
;
this
.
files
=
[];
if
(
res
.
data
.
detail
!==
""
)
{
let
data
=
JSON
.
parse
(
res
.
data
.
detail
)[
0
];
for
(
let
i
=
0
;
i
<
this
.
allTypes
.
length
;
i
++
)
{
if
(
this
.
allTypes
[
i
][
0
]
===
data
.
label
)
{
this
.
fileType
=
this
.
allTypes
[
i
][
1
];
break
;
}
}
data
.
data
?.
forEach
((
item
:
any
)
=>
{
if
(
item
.
label
===
"上链原因"
)
{
this
.
reason
=
item
.
data
.
value
;
let
data
=
JSON
.
parse
(
res
.
data
.
detail
);
let
root
:
any
=
[];
data
.
forEach
((
item
:
any
)
=>
{
if
(
item
.
label
===
'ext'
)
{
root
.
push
(
item
);
}
else
{
const
hashes
:
string
[]
=
item
.
data
?.
map
((
i
:
any
)
=>
i
.
value
);
this
.
getUploadedFiles
(
hashes
);
let
i
:
number
;
for
(
i
=
0
;
i
<
this
.
allTypes
.
length
;
i
++
)
{
if
(
this
.
allTypes
[
i
][
0
]
===
item
.
label
)
{
this
.
fileType
=
this
.
allTypes
[
i
][
1
];
break
;
}
}
if
(
i
<
4
)
{
item
.
data
?.
forEach
((
subItem
:
any
)
=>
{
if
(
subItem
.
label
===
"上链原因"
)
{
this
.
reason
=
subItem
.
data
.
value
;
}
else
{
const
hashes
:
string
[]
=
subItem
.
data
?.
map
((
i
:
any
)
=>
i
.
value
);
this
.
getUploadedFiles
(
hashes
);
}
});
}
}
});
})
this
.
rootUnitList
=
formatTemplateApi2Local
(
root
);
}
else
{
this
.
rootUnitList
=
[];
}
...
...
@@ -552,7 +565,6 @@ export default class editTemplate extends Vue {
var
newDetail
=
new
Array
();
newDetail
=
formatApiJson
(
this
.
rootUnitList
);
console
.
log
(
newDetail
);
// return;
// return
...
...
@@ -592,8 +604,7 @@ export default class editTemplate extends Vue {
note
:
this
.
localData
,
},
});
console
.
log
(
JSON
.
stringify
(
newDetail
));
if
(
res
)
{
this
.
$message
({
message
:
"编辑成功"
,
...
...
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