feat(mmsmapping): 添加ICD索引配置人工确认功能
- 新增IndexConfirmTarget、IndexConfirmLabelItem、IndexConfirmGroup等接口定义 - 添加buildIndexConfirmDataApi和buildIndexSelectionApi两个API方法 - 实现MappingConfirmDialog组件用于人工确认索引配置 - 将解析ICD流程分为候选数据获取和人工确认两个步骤 - 添加确认弹窗的验证逻辑和状态管理 - 更新页面重置逻辑以清除确认相关状态 - 修改请求配置面板显示确认按钮和相应操作 - 移除原有的自动生成默认索引选择的工具函数
This commit is contained in:
@@ -3,18 +3,29 @@
|
||||
<div class="panel-header">
|
||||
<div>
|
||||
<h2 class="panel-title">请求配置</h2>
|
||||
<p class="panel-description">这里直接编辑 request.indexSelection,默认值会在选择 ICD 文件后自动生成。</p>
|
||||
<p class="panel-description">这里展示并可继续编辑经人工确认后生成的 request.indexSelection。</p>
|
||||
</div>
|
||||
<div class="panel-actions">
|
||||
<el-button
|
||||
v-if="showConfirmButton"
|
||||
type="primary"
|
||||
plain
|
||||
:disabled="!canConfirm"
|
||||
@click="emit('confirm-config')"
|
||||
>
|
||||
{{ confirmButtonText }}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="showGenerateButton"
|
||||
type="primary"
|
||||
:icon="Connection"
|
||||
:loading="isSubmitting"
|
||||
:disabled="!canGenerate"
|
||||
@click="emit('generate')"
|
||||
>
|
||||
生成映射
|
||||
</el-button>
|
||||
</div>
|
||||
<el-button
|
||||
v-if="showGenerateButton"
|
||||
type="primary"
|
||||
:icon="Connection"
|
||||
:loading="isSubmitting"
|
||||
:disabled="!canGenerate"
|
||||
@click="emit('generate')"
|
||||
>
|
||||
生成映射
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div class="panel-content">
|
||||
@@ -28,7 +39,7 @@
|
||||
:disabled="isSubmitting"
|
||||
:rows="18"
|
||||
resize="none"
|
||||
placeholder="ICD 解析完成后,这里会自动填充 request.indexSelection,可继续直接编辑。"
|
||||
placeholder="人工确认完成后,这里会自动回填 request.indexSelection,仍可继续直接编辑。"
|
||||
@update:model-value="value => emit('update:indexSelectionJson', String(value || ''))"
|
||||
/>
|
||||
</div>
|
||||
@@ -51,12 +62,16 @@ defineProps<{
|
||||
canGenerate: boolean
|
||||
jsonError: string
|
||||
showGenerateButton: boolean
|
||||
showConfirmButton: boolean
|
||||
confirmButtonText: string
|
||||
canConfirm: boolean
|
||||
hasDefaultJson: boolean
|
||||
emptyDescription: string
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
(event: 'update:indexSelectionJson', value: string): void
|
||||
(event: 'confirm-config'): void
|
||||
(event: 'generate'): void
|
||||
}>()
|
||||
</script>
|
||||
@@ -86,6 +101,12 @@ const emit = defineEmits<{
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.panel-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.panel-title {
|
||||
margin: 0;
|
||||
font-size: 22px;
|
||||
@@ -156,5 +177,9 @@ const emit = defineEmits<{
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.panel-actions {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user