Merge branch 'v1.8' of https://github.com/metersphere/metersphere into v1.8
This commit is contained in:
commit
b918df0e15
|
@ -142,7 +142,7 @@ public class TestCaseDataListener extends EasyExcelListener<TestCaseExcelData> {
|
||||||
public void saveData() {
|
public void saveData() {
|
||||||
|
|
||||||
//excel中用例都有错误时就返回,只要有用例可用于更新或者插入就不返回
|
//excel中用例都有错误时就返回,只要有用例可用于更新或者插入就不返回
|
||||||
if (!errList.isEmpty() && list.size() == 0 && updateList.size() == 0) {
|
if (!errList.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,6 +231,13 @@ public class TestCaseDataListener extends EasyExcelListener<TestCaseExcelData> {
|
||||||
*/
|
*/
|
||||||
public String modifyTagPattern(TestCaseExcelData data){
|
public String modifyTagPattern(TestCaseExcelData data){
|
||||||
String tags = data.getTags();
|
String tags = data.getTags();
|
||||||
|
try {
|
||||||
|
if (StringUtils.isNotBlank(tags)) {
|
||||||
|
JSONArray.parse(tags);
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
return "[]";
|
||||||
|
} catch (Exception e) {
|
||||||
if (tags != null) {
|
if (tags != null) {
|
||||||
Stream<String> stringStream = Arrays.stream(tags.split("[,;,;]")); //当标签值以中英文的逗号和分号分隔时才能正确解析
|
Stream<String> stringStream = Arrays.stream(tags.split("[,;,;]")); //当标签值以中英文的逗号和分号分隔时才能正确解析
|
||||||
List<String> tagList = stringStream.map(tag -> tag = "\"" + tag + "\"")
|
List<String> tagList = stringStream.map(tag -> tag = "\"" + tag + "\"")
|
||||||
|
@ -238,8 +245,9 @@ public class TestCaseDataListener extends EasyExcelListener<TestCaseExcelData> {
|
||||||
String modifiedTags = StringUtils.join(tagList, ",");
|
String modifiedTags = StringUtils.join(tagList, ",");
|
||||||
modifiedTags = "[" + modifiedTags + "]";
|
modifiedTags = "[" + modifiedTags + "]";
|
||||||
return modifiedTags;
|
return modifiedTags;
|
||||||
}else {
|
} else {
|
||||||
return null;
|
return "[]";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,11 +133,16 @@
|
||||||
this.data.forEach(node => {
|
this.data.forEach(node => {
|
||||||
buildTree(node, {path: ''});
|
buildTree(node, {path: ''});
|
||||||
});
|
});
|
||||||
this.$emit('setModuleOptions', this.data);
|
|
||||||
this.$emit('setNodeTree', this.data);
|
this.$emit('setNodeTree', this.data);
|
||||||
if (this.$refs.nodeTree) {
|
if (this.$refs.nodeTree) {
|
||||||
this.$refs.nodeTree.filter(this.condition.filterText);
|
this.$refs.nodeTree.filter(this.condition.filterText);
|
||||||
}
|
}
|
||||||
|
let moduleOptions = [];
|
||||||
|
this.data.forEach(node => {
|
||||||
|
buildNodePath(node, {path: ''}, moduleOptions);
|
||||||
|
});
|
||||||
|
this.moduleOptions = moduleOptions;
|
||||||
|
this.$emit('setModuleOptions', moduleOptions);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue