fix(测试跟踪): 日期自定义字段列表显示带了准确时间

--bug=1026910 --user=陈建星 【测试跟踪】自定义字段时间类型-用例列表显示和详情页显示格式不一致 https://www.tapd.cn/55049933/s/1386702
This commit is contained in:
jianxing 2023-06-27 10:28:54 +08:00 committed by f2c-ci-robot[bot]
parent 2969f6f15f
commit 63b65fc6b8
1 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import {CUSTOM_TABLE_HEADER} from "./default-table-header";
import {updateCustomFieldTemplate} from "../api/custom-field-template"; import {updateCustomFieldTemplate} from "../api/custom-field-template";
import i18n from "../i18n"; import i18n from "../i18n";
import Sortable from 'sortablejs' import Sortable from 'sortablejs'
import {datetimeFormat} from "fit2cloud-ui/src/filters/time"; import {dateFormat, datetimeFormat} from "fit2cloud-ui/src/filters/time";
import {hasLicense} from "../utils/permission"; import {hasLicense} from "../utils/permission";
import {getUUID, humpToLine} from "./index"; import {getUUID, humpToLine} from "./index";
import {CUSTOM_FIELD_TYPE_OPTION, SYSTEM_FIELD_NAME_MAP} from "./table-constants"; import {CUSTOM_FIELD_TYPE_OPTION, SYSTEM_FIELD_NAME_MAP} from "./table-constants";
@ -648,8 +648,10 @@ export function getCustomFieldValue(row, field, members) {
val += i + ' '; val += i + ' ';
}); });
return val; return val;
} else if (field.type === 'datetime' || field.type === 'date') { } else if (field.type === 'datetime') {
return datetimeFormat(item.value); return datetimeFormat(item.value);
} else if (field.type === 'date') {
return dateFormat(item.value);
} else if (['richText', 'textarea'].indexOf(field.type) > -1) { } else if (['richText', 'textarea'].indexOf(field.type) > -1) {
return item.textValue; return item.textValue;
} }