fix(缺陷管理): 修复缺陷管理数字类型自定义字段却当做string处理导致组件不识别的问题

--bug=1036852 --user=宋天阳 【缺陷管理】编辑修改缺陷中 数字类型字段失败 https://www.tapd.cn/55049933/s/1472180;--bug=1036381 --user=宋天阳 【缺陷管理】修改缺陷管理的数字类型的自定义字段失败 https://www.tapd.cn/55049933/s/1472179
This commit is contained in:
song-tianyang 2024-03-09 15:03:55 +08:00 committed by Craftsman
parent a2407c5713
commit 5250909719
5 changed files with 12 additions and 1 deletions

View File

@ -202,6 +202,10 @@
const { t } = useI18n(); const { t } = useI18n();
const { openDeleteModal } = useModal(); const { openDeleteModal } = useModal();
const emit = defineEmits<{
(e: 'submit'): void;
}>();
const props = defineProps<{ const props = defineProps<{
visible: boolean; visible: boolean;
detailId: string; // id detailId: string; // id
@ -276,6 +280,8 @@
detail.customFields.forEach((item) => { detail.customFields.forEach((item) => {
if (item.type === 'MULTIPLE_SELECT') { if (item.type === 'MULTIPLE_SELECT') {
tmpObj[item.id] = JSON.parse(item.value); tmpObj[item.id] = JSON.parse(item.value);
} else if (item.type === 'INT') {
tmpObj[item.id] = Number(item.value);
} else { } else {
tmpObj[item.id] = item.value; tmpObj[item.id] = item.value;
} }
@ -306,6 +312,7 @@
function updateSuccess() { function updateSuccess() {
detailDrawerRef.value?.initDetail(); detailDrawerRef.value?.initDetail();
emit('submit');
} }
const contentTabList = computed(() => { const contentTabList = computed(() => {

View File

@ -588,6 +588,8 @@
tmpObj[item.id] = ''; tmpObj[item.id] = '';
} else if (item.type === 'MULTIPLE_SELECT') { } else if (item.type === 'MULTIPLE_SELECT') {
tmpObj[item.id] = JSON.parse(item.value); tmpObj[item.id] = JSON.parse(item.value);
} else if (item.type === 'INT') {
tmpObj[item.id] = Number(item.value);
} else { } else {
tmpObj[item.id] = item.value; tmpObj[item.id] = item.value;
} }

View File

@ -108,6 +108,7 @@
:table-data="propsRes.data" :table-data="propsRes.data"
:page-change="propsEvent.pageChange" :page-change="propsEvent.pageChange"
:pagination="propsRes.msPagination!" :pagination="propsRes.msPagination!"
@submit="fetchData"
/> />
<DeleteModal <DeleteModal
:id="currentDeleteObj.id" :id="currentDeleteObj.id"

View File

@ -191,7 +191,7 @@
const deleteHandler = (node: MsTreeNodeData) => { const deleteHandler = (node: MsTreeNodeData) => {
openModal({ openModal({
type: 'error', type: 'error',
title: t('caseManagement.featureCase.deleteTipTitle', { name: node.name }), title: t('caseManagement.featureCase.moduleDeleteTipTitle', { name: node.name }),
content: t('caseManagement.featureCase.deleteCaseTipContent'), content: t('caseManagement.featureCase.deleteCaseTipContent'),
okText: t('caseManagement.featureCase.deleteConfirm'), okText: t('caseManagement.featureCase.deleteConfirm'),
okButtonProps: { okButtonProps: {

View File

@ -25,6 +25,7 @@ export default {
'caseManagement.featureCase.renameSuccess': '重命名成功', 'caseManagement.featureCase.renameSuccess': '重命名成功',
'caseManagement.featureCase.nameNotNullTip': '名称不能为空', 'caseManagement.featureCase.nameNotNullTip': '名称不能为空',
'caseManagement.featureCase.deleteTipTitle': '是否删除 {name} 用例 ', 'caseManagement.featureCase.deleteTipTitle': '是否删除 {name} 用例 ',
'caseManagement.featureCase.moduleDeleteTipTitle': '是否删除 {name} 模块 ',
'caseManagement.featureCase.deleteCaseTipContent': '删除后,此节点下的所有资源都会被删除,请谨慎操作。', 'caseManagement.featureCase.deleteCaseTipContent': '删除后,此节点下的所有资源都会被删除,请谨慎操作。',
'caseManagement.featureCase.deleteConfirm': '确认删除', 'caseManagement.featureCase.deleteConfirm': '确认删除',
'caseManagement.featureCase.deleteSuccess': '删除成功', 'caseManagement.featureCase.deleteSuccess': '删除成功',