From d69fefcfd961cb04783ef8f79d2661e030458d0a Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 23 Jul 2024 16:17:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AD=97=E6=AE=B5=E4=B8=A5=E9=87=8D?= =?UTF-8?q?=E7=A8=8B=E5=BA=A6=E7=AD=9B=E9=80=89=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1044347 --user=宋昌昌 【缺陷管理】项目集成jira-缺陷列表-三方平台的严重程度字段-筛选未返回符合数据 https://www.tapd.cn/55049933/s/1552881 --- frontend/src/utils/index.ts | 3 ++- frontend/src/views/bug-management/index.vue | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/src/utils/index.ts b/frontend/src/utils/index.ts index 95af3c03e0..c5ee172d64 100644 --- a/frontend/src/utils/index.ts +++ b/frontend/src/utils/index.ts @@ -903,7 +903,7 @@ export function getCustomFieldIndex(field: CustomFieldItem) { // 表格自定义字段转column export function customFieldToColumns(customFields: CustomFieldItem[]) { return customFields.map((field) => { - const { fieldName, fieldKey, fieldId } = field; + const { fieldName, fieldKey, fieldId, options, platformOptionJson } = field; const column: MsTableColumnData = { title: fieldName, dataIndex: ['handleUser', 'status'].includes(fieldId) ? fieldKey : getCustomFieldIndex(field), @@ -911,6 +911,7 @@ export function customFieldToColumns(customFields: CustomFieldItem[]) { showDrag: true, showInTable: true, width: 200, + options: options || JSON.parse(platformOptionJson), }; return column; }); diff --git a/frontend/src/views/bug-management/index.vue b/frontend/src/views/bug-management/index.vue index 7e8f719761..0ca1310d56 100644 --- a/frontend/src/views/bug-management/index.vue +++ b/frontend/src/views/bug-management/index.vue @@ -167,7 +167,6 @@ import { useRoute } from 'vue-router'; import { useIntervalFn } from '@vueuse/core'; import { Message, TableData } from '@arco-design/web-vue'; - import { cloneDeep } from 'lodash-es'; import { MsAdvanceFilter, timeSelectOptions } from '@/components/pure/ms-advance-filter'; import { BackEndEnum, FilterFormItem, FilterResult, FilterType } from '@/components/pure/ms-advance-filter/type'; @@ -784,12 +783,14 @@ async function getColumnHeaders() { try { customColumns = await getCustomFieldColumns(); + console.log(customColumns); customColumns.forEach((item) => { + // 目前自定义字段的过滤只支持严重程度 if (item.title === '严重程度' || item.title === 'Bug Degree') { item.showInTable = true; item.slotName = 'severity'; item.filterConfig = { - options: cloneDeep(unref(severityFilterOptions.value)) || [], + options: item.options || [], labelKey: 'text', }; } else {