Commit 9996bd58 authored by zL's avatar zL

bug修复

parent a502fbc7
...@@ -599,17 +599,21 @@ export default class editTemplate extends Vue { ...@@ -599,17 +599,21 @@ export default class editTemplate extends Vue {
} }
// 更新普通存证 // 更新普通存证
public async updateTemplate() { public async updateTemplate() {
// return;
await this.fileHandler(); await this.fileHandler();
var newDetail = new Array(); var newDetail = new Array();
newDetail = formatApiJson(this.rootUnitList); newDetail = formatApiJson(this.rootUnitList);
// return if (typeof newDetail[1].label === "undefined") {
newDetail.splice(1, 1);
// newDetail[1].splice(1, 1);
}
// 更新ext数据 // 更新ext数据
for (let index = 0; index < newDetail.length; index++) { for (let index = 0; index < newDetail.length; index++) {
const element = newDetail[index]; const element = newDetail[index];
if (element.data && element.data.length === 0) {
newDetail.splice(index, 1);
}
if (element.label === "ext") { if (element.label === "ext") {
for (let index2 = 0; index2 < element.data.length; index2++) { for (let index2 = 0; index2 < element.data.length; index2++) {
const element2 = element.data[index2]; const element2 = element.data[index2];
...@@ -628,6 +632,7 @@ export default class editTemplate extends Vue { ...@@ -628,6 +632,7 @@ export default class editTemplate extends Vue {
} }
} }
// return;
if (JSON.parse(this.localData).evidenceName !== this.templateName) { if (JSON.parse(this.localData).evidenceName !== this.templateName) {
var newdata = JSON.parse(this.localData); var newdata = JSON.parse(this.localData);
newdata.evidenceName = this.templateName; newdata.evidenceName = this.templateName;
......
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