fix(测试跟踪): 自定义字段显示问题
--bug=1024252 --user=宋昌昌 【测试跟踪】自定义字段非必填是,显示的“暂无”,字号和颜色不对 https://www.tapd.cn/55049933/s/1350587
This commit is contained in:
parent
8133c72873
commit
2dd7c7093f
|
@ -215,12 +215,6 @@ CREATE TABLE IF NOT EXISTS `file_attachment_metadata`
|
||||||
CHARACTER SET = utf8mb4
|
CHARACTER SET = utf8mb4
|
||||||
COLLATE = utf8mb4_general_ci;
|
COLLATE = utf8mb4_general_ci;
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
-- V129_2-0-0_test_case_report_api_base_count
|
|
||||||
ALTER TABLE `test_plan_report_content`
|
|
||||||
ADD COLUMN `api_base_count` LONGTEXT COMMENT 'request (JSON format)';
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- V1_2-0-0_load_test_remember_environment
|
-- V1_2-0-0_load_test_remember_environment
|
||||||
ALTER TABLE `load_test`
|
ALTER TABLE `load_test`
|
||||||
|
|
|
@ -110,7 +110,7 @@
|
||||||
<div
|
<div
|
||||||
id="custom-div"
|
id="custom-div"
|
||||||
v-else-if="contentObject.content && contentObject.contentType === 'CUSTOM'"
|
v-else-if="contentObject.content && contentObject.contentType === 'CUSTOM'"
|
||||||
:class="getCustomComponentType()"
|
:class="getCustomComponentClass"
|
||||||
@click="handleReadTextClick"
|
@click="handleReadTextClick"
|
||||||
@mouseenter="mouseEnterEvent"
|
@mouseenter="mouseEnterEvent"
|
||||||
>
|
>
|
||||||
|
@ -143,6 +143,7 @@ export default {
|
||||||
selfEditable: false,
|
selfEditable: false,
|
||||||
hoverEditable: false,
|
hoverEditable: false,
|
||||||
memberOptions: [],
|
memberOptions: [],
|
||||||
|
isCustomNone: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
@ -176,19 +177,7 @@ export default {
|
||||||
edit() {
|
edit() {
|
||||||
return this.editable;
|
return this.editable;
|
||||||
},
|
},
|
||||||
},
|
getCustomComponentClass() {
|
||||||
mounted() {
|
|
||||||
if (
|
|
||||||
this.contentObject.content &&
|
|
||||||
this.contentObject.content.type &&
|
|
||||||
(this.contentObject.content.type === "member" ||
|
|
||||||
this.contentObject.content.type === "multipleMember")
|
|
||||||
) {
|
|
||||||
this.getMemberOptions();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getCustomComponentType() {
|
|
||||||
let type = "select";
|
let type = "select";
|
||||||
let curType = this.contentObject.content.type || "";
|
let curType = this.contentObject.content.type || "";
|
||||||
//select
|
//select
|
||||||
|
@ -211,11 +200,23 @@ export default {
|
||||||
type = "select";
|
type = "select";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (this.getCustomText() === this.$t("case.none")) {
|
if (this.isCustomNone) {
|
||||||
type = type + ' custom-empty';
|
type = type + ' custom-empty';
|
||||||
}
|
}
|
||||||
return type;
|
return type;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
if (
|
||||||
|
this.contentObject.content &&
|
||||||
|
this.contentObject.content.type &&
|
||||||
|
(this.contentObject.content.type === "member" ||
|
||||||
|
this.contentObject.content.type === "multipleMember")
|
||||||
|
) {
|
||||||
|
this.getMemberOptions();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
getMemberOptions() {
|
getMemberOptions() {
|
||||||
getProjectMemberOption().then((r) => {
|
getProjectMemberOption().then((r) => {
|
||||||
let tempMemberOptions = r.data || [];
|
let tempMemberOptions = r.data || [];
|
||||||
|
@ -256,7 +257,10 @@ export default {
|
||||||
? this.contentObject.content.value
|
? this.contentObject.content.value
|
||||||
: this.contentObject.content.defaultValue;
|
: this.contentObject.content.defaultValue;
|
||||||
if(!tempValue || Array.isArray(tempValue) && tempValue.length <= 0){
|
if(!tempValue || Array.isArray(tempValue) && tempValue.length <= 0){
|
||||||
|
this.isCustomNone = true;
|
||||||
return this.$t("case.none");
|
return this.$t("case.none");
|
||||||
|
} else {
|
||||||
|
this.isCustomNone = false;
|
||||||
}
|
}
|
||||||
if (Array.isArray(tempValue) && tempValue.length > 0) {
|
if (Array.isArray(tempValue) && tempValue.length > 0) {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
|
@ -286,16 +290,24 @@ export default {
|
||||||
this.contentObject.content.type === "input" ||
|
this.contentObject.content.type === "input" ||
|
||||||
this.contentObject.content.type === "richText"
|
this.contentObject.content.type === "richText"
|
||||||
) {
|
) {
|
||||||
return this.contentObject.content.defaultValue === "" ||
|
if (this.contentObject.content.defaultValue === "" ||
|
||||||
this.contentObject.content.defaultValue == null
|
this.contentObject.content.defaultValue == null) {
|
||||||
? this.$t("case.none")
|
this.isCustomNone = true;
|
||||||
: this.contentObject.content.defaultValue;
|
return this.$t("case.none");
|
||||||
|
} else {
|
||||||
|
this.isCustomNone = false;
|
||||||
|
return this.contentObject.content.defaultValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.contentObject.content.defaultValue === "" ||
|
if (this.contentObject.content.defaultValue === "" ||
|
||||||
this.contentObject.content.defaultValue == null
|
this.contentObject.content.defaultValue == null) {
|
||||||
? this.$t("case.none")
|
this.isCustomNone = true;
|
||||||
: this.contentObject.content.defaultValue;
|
return this.$t("case.none");
|
||||||
|
} else {
|
||||||
|
this.isCustomNone = false;
|
||||||
|
return this.contentObject.content.defaultValue;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getStoryPlatform() {
|
getStoryPlatform() {
|
||||||
let demandOptions = this.contentObject.content.demandOptions || [];
|
let demandOptions = this.contentObject.content.demandOptions || [];
|
||||||
|
|
Loading…
Reference in New Issue