refactor(imWorkOrder): 优化工单分类和目标类型的展示逻辑
将工单分类和目标类型的格式化逻辑抽离到model文件中,统一处理字典映射展示,替换原有的硬编码空值占位,同时修复列表页和详情页的展示不一致问题
This commit is contained in:
@@ -17,9 +17,11 @@
|
||||
<n-descriptions-item label="工单ID">{{ formValue.orderId }}</n-descriptions-item>
|
||||
<n-descriptions-item label="状态">{{ statusLabel }}</n-descriptions-item>
|
||||
<n-descriptions-item label="提交人ID">{{ formValue.userId }}</n-descriptions-item>
|
||||
<n-descriptions-item label="分类">{{ formValue.category || '-' }}</n-descriptions-item>
|
||||
<n-descriptions-item label="分类">{{
|
||||
categoryLabelOf(formValue.type, formValue.category)
|
||||
}}</n-descriptions-item>
|
||||
<n-descriptions-item label="目标类型">{{
|
||||
formValue.targetType || '-'
|
||||
targetTypeLabel(formValue.targetType)
|
||||
}}</n-descriptions-item>
|
||||
<n-descriptions-item label="目标摘要">{{
|
||||
formValue.targetSummary || '-'
|
||||
@@ -67,7 +69,7 @@
|
||||
import { computed, ref } from 'vue';
|
||||
import { useDictStore } from '@/store/modules/dict';
|
||||
import { View } from '@/api/imWorkOrder';
|
||||
import { newState, State } from './model';
|
||||
import { categoryLabelOf, newState, State, targetTypeLabel } from './model';
|
||||
import { useProjectSettingStore } from '@/store/modules/projectSetting';
|
||||
import { adaModalWidth } from '@/utils/hotgo';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user