fix(Data Source): The relationship management fields in the table should be consistent with the table structure fields.

This commit is contained in:
dataeaseShu
2025-12-03 10:29:12 +08:00
committed by dataeaseShu
parent 4ca1adba25
commit 36d637fc4e
4 changed files with 32 additions and 7 deletions
+4 -2
View File
@@ -26,7 +26,9 @@
"edit_prompt_word": "Edit prompt word",
"all_236_terms": "Export all {msg} {type} prompt records?",
"export_hint": "Export all {type} prompts?",
"prompt_word_name_de": "Do you want to delete the prompt word: {msg}?"
"prompt_word_name_de": "Do you want to delete the prompt word: {msg}?",
"disable_field": "Disable Field",
"to_disable_it": "This field has a configured table relationship. If disabled, the relationship will be invalid. Are you sure you want to disable it?"
},
"training": {
"effective_data_sources": "Effective data sources",
@@ -798,4 +800,4 @@
"modelType": {
"llm": "Large Language Model"
}
}
}
+4 -2
View File
@@ -26,7 +26,9 @@
"edit_prompt_word": "프롬프트 편집",
"all_236_terms": "모든 {msg}개의 {type} 프롬프트 기록을 내보내시겠습니까?",
"export_hint": "모든 {type} 프롬프트를 내보내시겠습니까?",
"prompt_word_name_de": "프롬프트를 삭제하시겠습니까: {msg}?"
"prompt_word_name_de": "프롬프트를 삭제하시겠습니까: {msg}?",
"disable_field": "필드 비활성화",
"to_disable_it": "이 필드에는 테이블 관계가 설정되어 있습니다. 비활성화하면 관계가 유효하지 않게 됩니다. 비활성화하시겠습니까?"
},
"training": {
"effective_data_sources": "유효한 데이터 소스",
@@ -798,4 +800,4 @@
"modelType": {
"llm": "대형 언어 모델"
}
}
}
+4 -2
View File
@@ -26,7 +26,9 @@
"edit_prompt_word": "编辑提示词",
"all_236_terms": "是否导出全部 {msg} 条{type}提示词?",
"export_hint": "是否导出全部{type}提示词?",
"prompt_word_name_de": "是否删除提示词:{msg}?"
"prompt_word_name_de": "是否删除提示词:{msg}?",
"disable_field": "禁用字段",
"to_disable_it": "该字段已配置表关联关系,若禁用后,关联关系将失效,确定禁用?"
},
"training": {
"effective_data_sources": "生效数据源",
@@ -798,4 +800,4 @@
"modelType": {
"llm": "大语言模型"
}
}
}
+20 -1
View File
@@ -211,7 +211,7 @@ const editField = (row: any) => {
fieldDialog.value = true
}
const changeStatus = (row: any) => {
const setStatus = (row: any) => {
currentField.value = row
datasourceApi.saveField(currentField.value).then(() => {
closeField()
@@ -223,6 +223,25 @@ const changeStatus = (row: any) => {
})
}
const changeStatus = (row: any) => {
if (!row.checked) {
row.checked = true
ElMessageBox.confirm(t('prompt.disable_field'), {
type: 'warning',
confirmButtonType: 'primary',
tip: t('prompt.to_disable_it'),
confirmButtonText: t('common.confirm2'),
cancelButtonText: t('common.cancel'),
autofocus: false,
}).then(() => {
row.checked = false
setStatus(row)
})
return
}
setStatus(row)
}
const emits = defineEmits(['back', 'refresh'])
const back = () => {
emits('back')