fix(测试跟踪): 缺陷列表自定义字段点击排序报错

--bug=1015617 --user=李玉号
【测试跟踪】缺陷模版添加自定义字段,字段类型“输入框”或者“日期时间选择器”,使用该模版添加缺陷后,缺陷列表,点击该字段排序报错sql
https://www.tapd.cn/55049933/s/1217533
This commit is contained in:
shiziyuan9527 2022-08-02 15:15:22 +08:00 committed by jianxing
parent d4c4558360
commit 92c9057500
3 changed files with 9 additions and 7 deletions

View File

@ -133,11 +133,13 @@ export function _findIndexByKey(components, key) {
return components.findIndex(co => co.key === key);
}
export function generateFilterColumnKey(field) {
export function generateColumnKey(field) {
if (field.type === 'select' || field.type === 'radio' || field.type === 'member') {
// 修改标识
return 'custom_single-' + field.id;
} else if (field.type === 'multipleSelect' || field.type === 'checkbox' || field.type === 'multipleMember') {
return 'custom_multiple-' + field.id;
} else {
return 'custom-' + field.id;
}
}

View File

@ -177,7 +177,7 @@
:fields-width="fieldsWidth"
:label="field.system ? $t(systemFiledMap[field.name]) :field.name"
:min-width="120"
:column-key="field.columnKey ? field.columnKey : generateFilterColumnKey(field)"
:column-key="field.columnKey ? field.columnKey : generateColumnKey(field)"
:prop="field.name">
<template v-slot="scope">
<span v-if="field.name === '用例等级'">
@ -277,7 +277,7 @@ import {getGraphByCondition} from "@/network/graph";
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
import ListItemDeleteConfirm from "@/business/components/common/components/ListItemDeleteConfirm";
import {
generateFilterColumnKey,
generateColumnKey,
getAdvSearchCustomField
} from "@/business/components/common/components/search/custom-component";
import MsSearch from "@/business/components/common/components/search/MsSearch";
@ -1241,7 +1241,7 @@ export default {
});
}
},
generateFilterColumnKey,
generateColumnKey,
}
};
</script>

View File

@ -136,7 +136,7 @@
:fields-width="fieldsWidth"
min-width="120"
:label="field.system ? $t(systemNameMap[field.name]) :field.name"
:column-key="generateFilterColumnKey(field)"
:column-key="generateColumnKey(field)"
:prop="field.name">
<template v-slot="scope">
<span v-if="field.name === '状态'">
@ -198,7 +198,7 @@ import {getProjectMember} from "@/network/user";
import {LOCAL} from "@/common/js/constants";
import {TEST_TRACK_ISSUE_LIST} from "@/business/components/common/components/search/search-components";
import {
generateFilterColumnKey,
generateColumnKey,
getAdvSearchCustomField
} from "@/business/components/common/components/search/custom-component";
import MsMarkDownText from "@/business/components/track/case/components/MsMarkDownText";
@ -293,7 +293,7 @@ export default {
this.getMaintainerOptions();
},
methods: {
generateFilterColumnKey,
generateColumnKey,
tableDoLayout() {
if (this.$refs.table) this.$refs.table.doLayout();
},