diff --git a/test-track/frontend/src/business/case/components/BaseEditItemComponent.vue b/test-track/frontend/src/business/case/components/BaseEditItemComponent.vue
index 4b0bbbe6d6..adb6b09f50 100644
--- a/test-track/frontend/src/business/case/components/BaseEditItemComponent.vue
+++ b/test-track/frontend/src/business/case/components/BaseEditItemComponent.vue
@@ -205,6 +205,13 @@ export default {
});
},
getTranslateOption(item) {
+ if (Array.isArray(item)) {
+ let arr = [];
+ item.forEach((v) => {
+ arr.push(v.system ? this.$t(v.text) : v.text);
+ });
+ return arr.join(" ");
+ }
return item.system ? this.$t(item.text) : item.text;
},
getCustomText() {
@@ -216,15 +223,34 @@ export default {
) {
options = this.memberOptions;
}
- if (options.length > 0) {
- let option = options.find((item) => {
- if (this.contentObject.content.value) {
- return item.value == this.contentObject.content.value;
- }
- return item.value == this.contentObject.content.defaultValue;
- });
- if (option) {
- return this.getTranslateOption(option);
+ if (options && options.length > 0) {
+ let tempValue = this.contentObject.content.value && this.contentObject.content.value.length > 0
+ ? this.contentObject.content.value
+ : this.contentObject.content.defaultValue;
+ if(!tempValue || Array.isArray(tempValue) && tempValue.length <= 0){
+ return this.$t("case.none");
+ }
+ if (Array.isArray(tempValue) && tempValue.length > 0) {
+ let arr = [];
+ tempValue.forEach((v) => {
+ let temp = options.find((o) => {
+ return o.value == v;
+ });
+ if(temp){
+ if(Array.isArray(temp)){
+ arr.push(...temp);
+ }
+ else{
+ arr.push(temp);
+ }
+ }
+ });
+ return this.getTranslateOption(arr);
+ } else {
+ let temp = options.find((o) => {
+ return o.value == tempValue;
+ });
+ return this.getTranslateOption(temp);
}
}
@@ -237,7 +263,11 @@ export default {
? this.$t("case.none")
: this.contentObject.content.defaultValue;
}
- return "";
+
+ return this.contentObject.content.defaultValue === "" ||
+ this.contentObject.content.defaultValue == null
+ ? this.$t("case.none")
+ : this.contentObject.content.defaultValue;
},
getStoryPlatform() {
let demandOptions = this.contentObject.content.demandOptions || [];
@@ -246,7 +276,7 @@ export default {
return item.value === this.contentObject.content.demandId;
});
if (demand) {
- return demand.platform;
+ return this.handleDemandOptionPlatform(demand);
}
}
return "";
@@ -261,11 +291,33 @@ export default {
if (demand.value === "other") {
return this.$t("test_track.case.other");
}
- return demand.label;
+ return this.handleDemandOptionLabel(demand);
}
}
return "";
},
+ handleDemandOptionPlatform(data) {
+ if (data.platform) {
+ return data.platform;
+ }
+ if (data.label) {
+ let arr = data.label.split(": ");
+ if (arr && arr.length > 1) {
+ return arr[0];
+ }
+ }
+ return "";
+ },
+ handleDemandOptionLabel(data) {
+ if (data.label) {
+ let arr = data.label.split(": ");
+ if (arr && arr.length > 1) {
+ return arr[1];
+ }
+ return data.label;
+ }
+ return "";
+ },
clickContent() {
if (this.contentClickEvent) {
this.selfEditable = true;
diff --git a/test-track/frontend/src/business/case/components/TestCaseEdit.vue b/test-track/frontend/src/business/case/components/TestCaseEdit.vue
index 258dc0fb06..b06eac76e6 100644
--- a/test-track/frontend/src/business/case/components/TestCaseEdit.vue
+++ b/test-track/frontend/src/business/case/components/TestCaseEdit.vue
@@ -1661,6 +1661,14 @@ export default {
margin-left: px2rem(8);
margin-right: px2rem(8);
cursor: pointer;
+ max-width: 800px;
+ /* 文本不会换行显示 */
+ white-space: nowrap;
+ /* 超出盒子部分隐藏 */
+ overflow: hidden;
+ /* 文本超出的部分打点显示 */
+ text-overflow: ellipsis;
+
}
.case-name-hover:hover {
cursor: pointer;
diff --git a/test-track/frontend/src/business/case/components/case/CaseBaseInfo.vue b/test-track/frontend/src/business/case/components/case/CaseBaseInfo.vue
index 26e38842fa..3e8c4f13b9 100644
--- a/test-track/frontend/src/business/case/components/case/CaseBaseInfo.vue
+++ b/test-track/frontend/src/business/case/components/case/CaseBaseInfo.vue
@@ -227,11 +227,11 @@
>