fix(测试跟踪): 缺陷列表自定义字段点击排序报错
--bug=1015617 --user=李玉号 【测试跟踪】缺陷模版添加自定义字段,字段类型“输入框”或者“日期时间选择器”,使用该模版添加缺陷后,缺陷列表,点击该字段排序报错sql https://www.tapd.cn/55049933/s/1217533
This commit is contained in:
parent
d4c4558360
commit
92c9057500
|
@ -133,11 +133,13 @@ export function _findIndexByKey(components, key) {
|
||||||
return components.findIndex(co => co.key === 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') {
|
if (field.type === 'select' || field.type === 'radio' || field.type === 'member') {
|
||||||
// 修改标识
|
// 修改标识
|
||||||
return 'custom_single-' + field.id;
|
return 'custom_single-' + field.id;
|
||||||
} else if (field.type === 'multipleSelect' || field.type === 'checkbox' || field.type === 'multipleMember') {
|
} else if (field.type === 'multipleSelect' || field.type === 'checkbox' || field.type === 'multipleMember') {
|
||||||
return 'custom_multiple-' + field.id;
|
return 'custom_multiple-' + field.id;
|
||||||
|
} else {
|
||||||
|
return 'custom-' + field.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -177,7 +177,7 @@
|
||||||
:fields-width="fieldsWidth"
|
:fields-width="fieldsWidth"
|
||||||
:label="field.system ? $t(systemFiledMap[field.name]) :field.name"
|
:label="field.system ? $t(systemFiledMap[field.name]) :field.name"
|
||||||
:min-width="120"
|
:min-width="120"
|
||||||
:column-key="field.columnKey ? field.columnKey : generateFilterColumnKey(field)"
|
:column-key="field.columnKey ? field.columnKey : generateColumnKey(field)"
|
||||||
:prop="field.name">
|
:prop="field.name">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<span v-if="field.name === '用例等级'">
|
<span v-if="field.name === '用例等级'">
|
||||||
|
@ -277,7 +277,7 @@ import {getGraphByCondition} from "@/network/graph";
|
||||||
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
|
||||||
import ListItemDeleteConfirm from "@/business/components/common/components/ListItemDeleteConfirm";
|
import ListItemDeleteConfirm from "@/business/components/common/components/ListItemDeleteConfirm";
|
||||||
import {
|
import {
|
||||||
generateFilterColumnKey,
|
generateColumnKey,
|
||||||
getAdvSearchCustomField
|
getAdvSearchCustomField
|
||||||
} from "@/business/components/common/components/search/custom-component";
|
} from "@/business/components/common/components/search/custom-component";
|
||||||
import MsSearch from "@/business/components/common/components/search/MsSearch";
|
import MsSearch from "@/business/components/common/components/search/MsSearch";
|
||||||
|
@ -1241,7 +1241,7 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
generateFilterColumnKey,
|
generateColumnKey,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -136,7 +136,7 @@
|
||||||
:fields-width="fieldsWidth"
|
:fields-width="fieldsWidth"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
:label="field.system ? $t(systemNameMap[field.name]) :field.name"
|
:label="field.system ? $t(systemNameMap[field.name]) :field.name"
|
||||||
:column-key="generateFilterColumnKey(field)"
|
:column-key="generateColumnKey(field)"
|
||||||
:prop="field.name">
|
:prop="field.name">
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<span v-if="field.name === '状态'">
|
<span v-if="field.name === '状态'">
|
||||||
|
@ -198,7 +198,7 @@ import {getProjectMember} from "@/network/user";
|
||||||
import {LOCAL} from "@/common/js/constants";
|
import {LOCAL} from "@/common/js/constants";
|
||||||
import {TEST_TRACK_ISSUE_LIST} from "@/business/components/common/components/search/search-components";
|
import {TEST_TRACK_ISSUE_LIST} from "@/business/components/common/components/search/search-components";
|
||||||
import {
|
import {
|
||||||
generateFilterColumnKey,
|
generateColumnKey,
|
||||||
getAdvSearchCustomField
|
getAdvSearchCustomField
|
||||||
} from "@/business/components/common/components/search/custom-component";
|
} from "@/business/components/common/components/search/custom-component";
|
||||||
import MsMarkDownText from "@/business/components/track/case/components/MsMarkDownText";
|
import MsMarkDownText from "@/business/components/track/case/components/MsMarkDownText";
|
||||||
|
@ -293,7 +293,7 @@ export default {
|
||||||
this.getMaintainerOptions();
|
this.getMaintainerOptions();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
generateFilterColumnKey,
|
generateColumnKey,
|
||||||
tableDoLayout() {
|
tableDoLayout() {
|
||||||
if (this.$refs.table) this.$refs.table.doLayout();
|
if (this.$refs.table) this.$refs.table.doLayout();
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue