Commit 4d172979 authored by zL's avatar zL

修复一个已知bug

parent 0ecd8019
...@@ -307,6 +307,7 @@ export default class editTemplate extends Vue { ...@@ -307,6 +307,7 @@ export default class editTemplate extends Vue {
// 建立存证>保存存证or保存模板 // 建立存证>保存存证or保存模板
@Watch("templateName") @Watch("templateName")
public onChange(newVal: number, oldVal: number) { public onChange(newVal: number, oldVal: number) {
if ( if (
this.existingEvidenceList[0] && this.existingEvidenceList[0] &&
this.checkId !== this.existingEvidenceList[0].id this.checkId !== this.existingEvidenceList[0].id
...@@ -428,7 +429,7 @@ export default class editTemplate extends Vue { ...@@ -428,7 +429,7 @@ export default class editTemplate extends Vue {
this.templateName = res.data.name; this.templateName = res.data.name;
if (state === 1) { if (state === 1) {
// 增量存证进入,先获取所有的增量存证列表,再获取当前增量存证数据 // 增量存证进入,先获取所有的增量存证列表,再获取当前增量存证数据
this.expandTheList(res.data.hash); this.expandTheList(res.data.hash,res.data.name);
this.getincrement(this.checkId); this.getincrement(this.checkId);
} else if (state === 2) { } else if (state === 2) {
// 切换至原始存证的数据 // 切换至原始存证的数据
...@@ -446,7 +447,7 @@ export default class editTemplate extends Vue { ...@@ -446,7 +447,7 @@ export default class editTemplate extends Vue {
this.displayData = res.data.detail; this.displayData = res.data.detail;
this.ShowPastData = true; this.ShowPastData = true;
if (res.data.increment_num > 0) { if (res.data.increment_num > 0) {
this.expandTheList(res.data.hash); this.expandTheList(res.data.hash,res.data.name);
} }
} else { } else {
if (res.data.detail !== "") { if (res.data.detail !== "") {
...@@ -727,7 +728,7 @@ export default class editTemplate extends Vue { ...@@ -727,7 +728,7 @@ export default class editTemplate extends Vue {
this.isModifyTitleShow = true; this.isModifyTitleShow = true;
} }
// 新增增量数据列表的请求 // 新增增量数据列表的请求
async expandTheList(hash: string) { async expandTheList(hash: string,name:string) {
const res = await this.$ajax({ const res = await this.$ajax({
type: "post", type: "post",
url: GO_URLS.incrementList, url: GO_URLS.incrementList,
...@@ -739,8 +740,10 @@ export default class editTemplate extends Vue { ...@@ -739,8 +740,10 @@ export default class editTemplate extends Vue {
}); });
if (res) { if (res) {
this.existingEvidenceList = res.data.results; this.existingEvidenceList = res.data.results;
var firstData = { var firstData = {
name: this.templateName, name: name,
id: this.personalTemplateId, id: this.personalTemplateId,
hash: hash, hash: hash,
}; };
...@@ -755,6 +758,8 @@ export default class editTemplate extends Vue { ...@@ -755,6 +758,8 @@ export default class editTemplate extends Vue {
} }
// 切换数据显示 // 切换数据显示
public DataHandover(item: any, index: number) { public DataHandover(item: any, index: number) {
if (item.status === 1) return false; if (item.status === 1) return false;
if (this.checkId === item.id) return false; if (this.checkId === item.id) return false;
this.checkId = item.id; this.checkId = item.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