Commit f6b6cdd2 authored by zL's avatar zL

修复一个隐藏bug

parent cbc0c0ed
...@@ -311,7 +311,7 @@ export default class editTemplate extends Vue { ...@@ -311,7 +311,7 @@ export default class editTemplate extends Vue {
this.existingEvidenceList[0] && this.existingEvidenceList[0] &&
this.checkId !== this.existingEvidenceList[0].id this.checkId !== this.existingEvidenceList[0].id
) )
return; return false;
if (this.existingEvidenceList.length > 0 && !this.ShowPastData) if (this.existingEvidenceList.length > 0 && !this.ShowPastData)
this.existingEvidenceList[0].name = newVal; this.existingEvidenceList[0].name = newVal;
} }
...@@ -425,10 +425,11 @@ export default class editTemplate extends Vue { ...@@ -425,10 +425,11 @@ export default class editTemplate extends Vue {
url: GO_URLS.proof, url: GO_URLS.proof,
}); });
if (res) { if (res) {
// 第一步
this.templateName = res.data.name; this.templateName = res.data.name;
if (state === 1) { if (state === 1 || state === 0) {
// 增量存证进入,先获取所有的增量存证列表,再获取当前增量存证数据 // 增量存证进入,先获取所有的增量存证列表,再获取当前增量存证数据
this.expandTheList(res.data.hash); await this.expandTheList(res.data.hash);
this.getincrement(this.checkId); this.getincrement(this.checkId);
} else if (state === 2) { } else if (state === 2) {
// 切换至原始存证的数据 // 切换至原始存证的数据
...@@ -467,6 +468,7 @@ export default class editTemplate extends Vue { ...@@ -467,6 +468,7 @@ export default class editTemplate extends Vue {
url: GO_URLS.incrementId + `/` + id, url: GO_URLS.incrementId + `/` + id,
}); });
if (res) { if (res) {
// 第三步
if ( if (
res.data.status === 2 || res.data.status === 2 ||
res.data.status === 4 || res.data.status === 4 ||
...@@ -738,14 +740,14 @@ export default class editTemplate extends Vue { ...@@ -738,14 +740,14 @@ export default class editTemplate extends Vue {
}, },
}); });
if (res) { if (res) {
this.existingEvidenceList = res.data.results; // 第二步
var firstData = { var firstData = {
name: this.templateName, name: this.templateName,
id: this.personalTemplateId, id: this.personalTemplateId,
hash: hash, hash: hash,
}; };
this.existingEvidenceList.push(firstData); res.data.results.push(firstData);
this.existingEvidenceList = res.data.results;
for (let index = 0; index < this.existingEvidenceList.length; index++) { for (let index = 0; index < this.existingEvidenceList.length; index++) {
const element = this.existingEvidenceList[index]; const element = this.existingEvidenceList[index];
if (this.checkId === element.id) { if (this.checkId === element.id) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment