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
|
||||
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
|
||||
ALTER TABLE `load_test`
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
<div
|
||||
id="custom-div"
|
||||
v-else-if="contentObject.content && contentObject.contentType === 'CUSTOM'"
|
||||
:class="getCustomComponentType()"
|
||||
:class="getCustomComponentClass"
|
||||
@click="handleReadTextClick"
|
||||
@mouseenter="mouseEnterEvent"
|
||||
>
|
||||
|
@ -143,6 +143,7 @@ export default {
|
|||
selfEditable: false,
|
||||
hoverEditable: false,
|
||||
memberOptions: [],
|
||||
isCustomNone: false
|
||||
};
|
||||
},
|
||||
props: {
|
||||
|
@ -176,19 +177,7 @@ export default {
|
|||
edit() {
|
||||
return this.editable;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (
|
||||
this.contentObject.content &&
|
||||
this.contentObject.content.type &&
|
||||
(this.contentObject.content.type === "member" ||
|
||||
this.contentObject.content.type === "multipleMember")
|
||||
) {
|
||||
this.getMemberOptions();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getCustomComponentType() {
|
||||
getCustomComponentClass() {
|
||||
let type = "select";
|
||||
let curType = this.contentObject.content.type || "";
|
||||
//select
|
||||
|
@ -211,11 +200,23 @@ export default {
|
|||
type = "select";
|
||||
break;
|
||||
}
|
||||
if (this.getCustomText() === this.$t("case.none")) {
|
||||
if (this.isCustomNone) {
|
||||
type = type + ' custom-empty';
|
||||
}
|
||||
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() {
|
||||
getProjectMemberOption().then((r) => {
|
||||
let tempMemberOptions = r.data || [];
|
||||
|
@ -256,7 +257,10 @@ export default {
|
|||
? this.contentObject.content.value
|
||||
: this.contentObject.content.defaultValue;
|
||||
if(!tempValue || Array.isArray(tempValue) && tempValue.length <= 0){
|
||||
this.isCustomNone = true;
|
||||
return this.$t("case.none");
|
||||
} else {
|
||||
this.isCustomNone = false;
|
||||
}
|
||||
if (Array.isArray(tempValue) && tempValue.length > 0) {
|
||||
let arr = [];
|
||||
|
@ -286,16 +290,24 @@ export default {
|
|||
this.contentObject.content.type === "input" ||
|
||||
this.contentObject.content.type === "richText"
|
||||
) {
|
||||
return this.contentObject.content.defaultValue === "" ||
|
||||
this.contentObject.content.defaultValue == null
|
||||
? this.$t("case.none")
|
||||
: this.contentObject.content.defaultValue;
|
||||
if (this.contentObject.content.defaultValue === "" ||
|
||||
this.contentObject.content.defaultValue == null) {
|
||||
this.isCustomNone = true;
|
||||
return this.$t("case.none");
|
||||
} else {
|
||||
this.isCustomNone = false;
|
||||
return this.contentObject.content.defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
return this.contentObject.content.defaultValue === "" ||
|
||||
this.contentObject.content.defaultValue == null
|
||||
? this.$t("case.none")
|
||||
: this.contentObject.content.defaultValue;
|
||||
if (this.contentObject.content.defaultValue === "" ||
|
||||
this.contentObject.content.defaultValue == null) {
|
||||
this.isCustomNone = true;
|
||||
return this.$t("case.none");
|
||||
} else {
|
||||
this.isCustomNone = false;
|
||||
return this.contentObject.content.defaultValue;
|
||||
}
|
||||
},
|
||||
getStoryPlatform() {
|
||||
let demandOptions = this.contentObject.content.demandOptions || [];
|
||||
|
|
Loading…
Reference in New Issue