修复前端启动报错
This commit is contained in:
parent
113229449c
commit
fd10dd061b
|
@ -5,11 +5,11 @@ NODE_ENV=development
|
|||
# VUE_APP_BASE_URL='http://localhost:10001'
|
||||
# VUE_APP_API_BASE_URL='http://localhost:8080'
|
||||
#北京服务器配置
|
||||
# VUE_APP_BASE_URL='http://192.168.1.211:80/brichat'
|
||||
# VUE_APP_API_BASE_URL='http://192.168.1.211:80/brichat'
|
||||
VUE_APP_BASE_URL='http://192.168.1.211:80/brichat'
|
||||
VUE_APP_API_BASE_URL='http://192.168.1.211:80/brichat'
|
||||
#武汉公司服务器
|
||||
VUE_APP_BASE_URL='http://192.168.8.253:80/brichat'
|
||||
VUE_APP_API_BASE_URL='http://192.168.8.253:80/brichat'
|
||||
# VUE_APP_BASE_URL='http://192.168.8.253:80/brichat'
|
||||
# VUE_APP_API_BASE_URL='http://192.168.8.253:80/brichat'
|
||||
#总部服务器配置
|
||||
# VUE_APP_BASE_URL='http://192.168.0.33:80/brichat'
|
||||
# VUE_APP_API_BASE_URL='http://192.168.0.33:80/brichat'
|
||||
|
|
|
@ -5,11 +5,11 @@ NODE_ENV=production
|
|||
# VUE_APP_BASE_URL='http://localhost:10001'
|
||||
# VUE_APP_API_BASE_URL='http://localhost:10001'
|
||||
#北京服务器
|
||||
# VUE_APP_BASE_URL='http://192.168.1.211:80/brichat'
|
||||
# VUE_APP_API_BASE_URL='http://192.168.1.211:80/brichat'
|
||||
VUE_APP_BASE_URL='http://192.168.1.211:80/brichat'
|
||||
VUE_APP_API_BASE_URL='http://192.168.1.211:80/brichat'
|
||||
#武汉公司服务器
|
||||
VUE_APP_BASE_URL='http://192.168.8.253:80/brichat'
|
||||
VUE_APP_API_BASE_URL='http://192.168.8.253:80/brichat'
|
||||
#总部服务器
|
||||
# VUE_APP_BASE_URL='http://192.168.8.253:80/brichat'
|
||||
# VUE_APP_API_BASE_URL='http://192.168.8.253:80/brichat'
|
||||
# 总部服务器
|
||||
# VUE_APP_BASE_URL='http://192.168.0.33:80/brichat'
|
||||
# VUE_APP_API_BASE_URL='http://192.168.0.33:80/brichat'
|
|
@ -1,5 +1,8 @@
|
|||
import { add } from 'lodash'
|
||||
import { editDept } from '../api/departmentManagement'
|
||||
|
||||
export default {
|
||||
vabI18n:{
|
||||
vabI18n: {
|
||||
role: {
|
||||
index: 'Index',
|
||||
name: 'Username',
|
||||
|
@ -27,9 +30,9 @@ export default {
|
|||
edit: 'Edit',
|
||||
delete: 'Delete',
|
||||
stopGenerating: 'Stop Generating',
|
||||
placeEnter:'Please enter your question...',
|
||||
placeEnterChart:'Please enter your question...',
|
||||
placeEnterDiag:'Please enter your question...',
|
||||
placeEnter: 'Please enter your question...',
|
||||
placeEnterChart: 'Please enter your question...',
|
||||
placeEnterDiag: 'Please enter your question...',
|
||||
placeholder: 'Enter your message...',
|
||||
you: 'You',
|
||||
assistant: 'AI Assistant',
|
||||
|
@ -42,8 +45,8 @@ export default {
|
|||
think: 'Thought Process',
|
||||
like: 'Like',
|
||||
dislike: 'Dislike',
|
||||
cancel:'Cancel',
|
||||
send:'Send',
|
||||
cancel: 'Cancel',
|
||||
send: 'Send',
|
||||
},
|
||||
personal: {
|
||||
title: 'Personal Center',
|
||||
|
@ -99,11 +102,11 @@ export default {
|
|||
confirmNewPasswordPlaceholder: 'Please re-enter new password',
|
||||
changePasswordDialogTitle: 'Change Password',
|
||||
pleaseConfirmNewPassword: 'Please confirm the new password',
|
||||
passwordNoEqual:'Entered passwords differ!',
|
||||
passwordNoEqual: 'Entered passwords differ!',
|
||||
},
|
||||
HistoryRecords: {
|
||||
queryTime: 'Question Time:',
|
||||
range:'to',
|
||||
range: 'to',
|
||||
chatType: 'Chat Type',
|
||||
chatTypePlaceholder: 'Please select chat type',
|
||||
keyword: 'Keyword',
|
||||
|
@ -152,7 +155,7 @@ export default {
|
|||
},
|
||||
HistoryDetails: {
|
||||
title: 'Conversation Details',
|
||||
count:'',
|
||||
count: '',
|
||||
messageCount: ' messages',
|
||||
exportMarkdown: 'Export as Markdown',
|
||||
user: 'User',
|
||||
|
@ -172,11 +175,11 @@ export default {
|
|||
scopeOptions: {
|
||||
noFrozen: 'Only active users',
|
||||
onlyFrozen: 'Only frozen users',
|
||||
all: 'All users'
|
||||
all: 'All users',
|
||||
},
|
||||
searchButton: 'Search',
|
||||
addButton: 'Add',
|
||||
deleteButton: 'Delete'
|
||||
deleteButton: 'Delete',
|
||||
},
|
||||
table: {
|
||||
serialNumber: 'No.',
|
||||
|
@ -194,12 +197,12 @@ export default {
|
|||
operations: 'Operations',
|
||||
edit: 'Edit',
|
||||
delete: 'Delete',
|
||||
noData: 'No data'
|
||||
noData: 'No data',
|
||||
},
|
||||
confirm: {
|
||||
deleteSingle: 'Are you sure to delete this item?',
|
||||
deleteMultiple: 'Are you sure to delete selected items?',
|
||||
noSelection: 'No rows selected'
|
||||
noSelection: 'No rows selected',
|
||||
},
|
||||
message: {
|
||||
deleteSuccess: 'Delete successfully',
|
||||
|
@ -207,26 +210,26 @@ export default {
|
|||
getRolesSuccess: 'Get role list successfully',
|
||||
getRolesFailed: 'Failed to get role list',
|
||||
getDeptFailed: 'Failed to get department',
|
||||
getAuxFailed: 'Failed to get additional columns'
|
||||
}
|
||||
getAuxFailed: 'Failed to get additional columns',
|
||||
},
|
||||
},
|
||||
knowledge: {
|
||||
title: 'My Knowledge Base has ',
|
||||
titleEnd:' items',
|
||||
titleEnd: ' items',
|
||||
newBtn: 'New Knowledge Base',
|
||||
empty: 'No knowledge base data',
|
||||
loading: 'Loading...',
|
||||
error: 'Failed to get knowledge base information, please check your network connection and try again',
|
||||
|
||||
|
||||
card: {
|
||||
noDescription: 'No description',
|
||||
docCount: 'Documents',
|
||||
wordCount: 'Words',
|
||||
createTime: 'Created: ',
|
||||
updateTime: 'Updated: ',
|
||||
unknownTime: '--'
|
||||
unknownTime: '--',
|
||||
},
|
||||
|
||||
|
||||
dialog: {
|
||||
createTitle: 'Create Knowledge Base',
|
||||
editTitle: 'Edit Knowledge Base',
|
||||
|
@ -239,26 +242,26 @@ export default {
|
|||
createSuccess: 'Created successfully',
|
||||
createFail: 'Created failed',
|
||||
updateSuccess: 'Updated successfully',
|
||||
updateFail:'Updated failed',
|
||||
updateFail: 'Updated failed',
|
||||
deleteSuccess: 'Deleted successfully',
|
||||
deleteFail: 'Delete failed',
|
||||
|
||||
|
||||
rules: {
|
||||
nameRequired: 'Please enter name',
|
||||
nameMaxLength: 'Name cannot exceed 50 characters'
|
||||
}
|
||||
nameMaxLength: 'Name cannot exceed 50 characters',
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
dropdown: {
|
||||
edit: 'Edit',
|
||||
delete: 'Delete'
|
||||
delete: 'Delete',
|
||||
},
|
||||
|
||||
|
||||
deleteConfirm: {
|
||||
title: 'Confirm Deletion',
|
||||
message: 'Are you sure to delete this knowledge base? All related documents will be cleared',
|
||||
confirm: 'Confirm',
|
||||
cancel: 'Cancel'
|
||||
cancel: 'Cancel',
|
||||
},
|
||||
document: {
|
||||
title: 'Document Management',
|
||||
|
@ -266,7 +269,7 @@ export default {
|
|||
title: '{name}',
|
||||
description: 'Dataset Document Management - ',
|
||||
descriptionEnd: ' file in total',
|
||||
descriptionEnds: ' files in total'
|
||||
descriptionEnds: ' files in total',
|
||||
},
|
||||
table: {
|
||||
index: 'No.',
|
||||
|
@ -279,45 +282,46 @@ export default {
|
|||
available: 'Available',
|
||||
indexing: 'Indexing',
|
||||
error: 'Error',
|
||||
unknown: 'Unknown'
|
||||
}
|
||||
unknown: 'Unknown',
|
||||
},
|
||||
},
|
||||
buttons: {
|
||||
search: 'Search',
|
||||
refresh: 'Refresh',
|
||||
upload: 'Upload',
|
||||
batchDelete: 'Batch Delete ',
|
||||
batchDeleteConfrim:'Batch Delete Confirm',
|
||||
batchDeleteConfrim: 'Batch Delete Confirm',
|
||||
preview: 'Preview',
|
||||
download: 'Download',
|
||||
rename: 'Rename',
|
||||
delete: 'Delete'
|
||||
delete: 'Delete',
|
||||
},
|
||||
search: {
|
||||
placeholder: 'Enter keywords to search'
|
||||
placeholder: 'Enter keywords to search',
|
||||
},
|
||||
uploadDialog: {
|
||||
title: 'Upload Files',
|
||||
indexingTechnique: 'Indexing Technique',
|
||||
indexingOptions: {
|
||||
highQuality: 'High Quality',
|
||||
economy: 'Economy'
|
||||
economy: 'Economy',
|
||||
},
|
||||
preProcessingRules: 'Pre-processing Rules',
|
||||
ruleOptions: {
|
||||
removeSpaces: 'Remove extra spaces',
|
||||
removeUrls: 'Remove URLs/Emails'
|
||||
removeUrls: 'Remove URLs/Emails',
|
||||
},
|
||||
segmentation: 'Segmentation Rules',
|
||||
separatorPlaceholder: 'Separator (default: ###)',
|
||||
maxTokens: 'Max Tokens',
|
||||
selectFile:'Select the file',
|
||||
fileTip: 'Multiple selection supported, max 100MB per file. Accepted formats: TXT, MD, MARKDOWN, MDX, PDF, HTML, HTM, XLSX, XLS, DOCX, CSV, VTT, PROPERTIES',
|
||||
selectFile: 'Select the file',
|
||||
fileTip:
|
||||
'Multiple selection supported, max 100MB per file. Accepted formats: TXT, MD, MARKDOWN, MDX, PDF, HTML, HTM, XLSX, XLS, DOCX, CSV, VTT, PROPERTIES',
|
||||
cancel: 'Cancel',
|
||||
upload: 'Start Upload'
|
||||
upload: 'Start Upload',
|
||||
},
|
||||
preview: {
|
||||
title: 'File Preview'
|
||||
title: 'File Preview',
|
||||
},
|
||||
renameDialog: {
|
||||
title: 'Rename File',
|
||||
|
@ -325,27 +329,27 @@ export default {
|
|||
placeholder: 'Enter new file name',
|
||||
cancel: 'Cancel',
|
||||
confirm: 'Confirm',
|
||||
deleteconfirm:'Delete Confirm',
|
||||
deleteconfirm: 'Delete Confirm',
|
||||
},
|
||||
messages: {
|
||||
FilenamecantEmpty:'Filename cannot be empty',
|
||||
uploadSuccess:'Upload successfully',
|
||||
FilenamecantEmpty: 'Filename cannot be empty',
|
||||
uploadSuccess: 'Upload successfully',
|
||||
deleteConfirm: 'Are you sure to delete this file? This action cannot be undone!',
|
||||
batchDeleteConfirm: 'Are you sure to delete selected ',
|
||||
batchDeleteConfirmEnd:' files? This action cannot be undone!',
|
||||
batchDeleteConfirmEnd: ' files? This action cannot be undone!',
|
||||
deleteSuccess: 'File ',
|
||||
deleteSuccessEnd: ' has been deleted',
|
||||
deleteing:'Deleting...',
|
||||
deleteSuccessOk:'Delete success',
|
||||
deleteing: 'Deleting...',
|
||||
deleteSuccessOk: 'Delete success',
|
||||
batchDeleteSuccess: 'Successfully deleted {count} files',
|
||||
uploadSuccessEnd: ' files processed successfully',
|
||||
renameSuccess: 'File renamed successfully',
|
||||
noFileSelected: 'Please select files to delete',
|
||||
noUploadFile: 'Please select at least one file',
|
||||
loading: 'Loading...',
|
||||
NoKnowError:'Unknown error',
|
||||
getFileContentFailed:'Failed to get file content',
|
||||
uploadLoading:'Uploading...'
|
||||
NoKnowError: 'Unknown error',
|
||||
getFileContentFailed: 'Failed to get file content',
|
||||
uploadLoading: 'Uploading...',
|
||||
},
|
||||
errors: {
|
||||
deleteFailed: 'Delete failed: ',
|
||||
|
@ -354,9 +358,170 @@ export default {
|
|||
renameFailed: 'Rename failed: ',
|
||||
fetchFailed: 'Failed to get document list: ',
|
||||
previewFailed: 'Preview failed: ',
|
||||
downloadFailed: 'Download failed: '
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
downloadFailed: 'Download failed: ',
|
||||
},
|
||||
},
|
||||
},
|
||||
KnowledgeManagement: {
|
||||
query: {
|
||||
nameFilter: 'Registration Name/Name',
|
||||
deptFilter: 'Select Department',
|
||||
roleFilter: 'Select Role',
|
||||
search: 'Search',
|
||||
add: 'Add',
|
||||
},
|
||||
table: {
|
||||
noData: 'No Data',
|
||||
operation: 'Operation',
|
||||
bindDataset: 'Bind Knowledge Base',
|
||||
columns: {
|
||||
index: 'Index',
|
||||
name: 'Registration Name',
|
||||
displayName: 'Name',
|
||||
department: 'Department',
|
||||
roles: 'Roles',
|
||||
datasets: 'Knowledge Base',
|
||||
},
|
||||
},
|
||||
pagination: {
|
||||
pageSize: 'Page Size',
|
||||
total: 'Total',
|
||||
},
|
||||
filter: {
|
||||
tableFields: 'Table Field Filter & Sort',
|
||||
},
|
||||
fullscreen: 'Fullscreen',
|
||||
collapseQuery: 'Collapse Query Area',
|
||||
expandQuery: 'Expand Query Area',
|
||||
addUser: 'Add User',
|
||||
deleteUser: 'Delete User',
|
||||
confirmDelete: 'Are you sure you want to delete?',
|
||||
errorFetchingData: 'Error fetching data',
|
||||
message: {
|
||||
getRolesSuccess: 'Get role list success',
|
||||
getRolesFailed: 'Get role list failed',
|
||||
getDeptsFailed: 'Get department list failed',
|
||||
},
|
||||
bindDataset: {
|
||||
title: 'Bind Knowledge Base',
|
||||
user: 'User',
|
||||
boundDatasets: 'Bound Knowledge',
|
||||
addDatasets: 'Add Knowledge',
|
||||
selectDatasets: 'Please select the knowledge bases to bind',
|
||||
removeDataset: 'Remove Knowledge Base',
|
||||
cancel: 'Cancel',
|
||||
confirm: 'Confirm',
|
||||
pleaseSelect: 'Please select the knowledge bases to bind',
|
||||
bindSuccess: 'Bind successful',
|
||||
unbindSuccess: 'Unbind successful',
|
||||
bindFail: 'Binding failed',
|
||||
unbindFail: 'Unbinding failed',
|
||||
fetchFail: 'Failed to fetch dataset list',
|
||||
},
|
||||
},
|
||||
DictionaryManagement: {
|
||||
add: 'Add',
|
||||
index: 'Index',
|
||||
addDic: 'Add Dictionary Category',
|
||||
addDicDetail: 'Add Dictionary Detail',
|
||||
editDic: 'Edit Dictionary',
|
||||
dictionaryKey: 'Dictionary Key',
|
||||
dictionaryValue: 'Dictionary Value',
|
||||
parentDictionary: 'Parent Dictionary',
|
||||
remark: 'Remark',
|
||||
allow: 'Allow',
|
||||
notAllow: 'Not Allow',
|
||||
operation: 'Operation',
|
||||
confirm: 'Confirm',
|
||||
cancel: 'Cancel',
|
||||
pleaseEnterRemark: 'Please Enter Remark',
|
||||
editable: 'Editable',
|
||||
edit: 'Edit',
|
||||
delete: 'Delete',
|
||||
searchPlaceholder: 'Please enter dictionary name',
|
||||
noData: 'No data',
|
||||
dialogTitleAdd: 'Add Dictionary',
|
||||
dialogTitleEdit: 'Edit Dictionary',
|
||||
confirmDelete: 'Are you sure you want to delete this dictionary item?',
|
||||
deleteSuccess: 'Delete successful',
|
||||
deleteFail: 'Delete failed',
|
||||
saveSuccess: 'Save successful',
|
||||
saveFail: 'Save failed',
|
||||
batchDeleteSuccess: 'Batch delete successful',
|
||||
batchDeleteFail: 'Batch delete failed',
|
||||
refreshCache: 'Refresh Cache',
|
||||
refreshCacheSuccess: 'Cache refreshed successfully',
|
||||
refreshCacheFail: 'Cache refresh failed',
|
||||
dictionaryCategory: 'Dictionary Category',
|
||||
dictionaryKeyError: 'Please enter a dictionary key',
|
||||
dictionaryValueError: 'Please enter a dictionary value',
|
||||
selecteditable: 'Please select whether it is editable',
|
||||
parentDictionaryError: 'Please select a parent dictionary(leave blank for root node)',
|
||||
numberdescription: 'The numerical value in parentheses is the ID value',
|
||||
diclengtherror: 'Dictionary key length cannot exceed 50 characters',
|
||||
dicvalueerror: 'Dictionary value length cannot exceed 50 characters',
|
||||
alldic: 'All dictionaries',
|
||||
getdicfail: 'Failed to get dictionary data',
|
||||
getdicTreefail: 'Failed to get dictionary tree data',
|
||||
rootNode: 'Root node',
|
||||
selectDicCate: 'Please select a dictionary category first',
|
||||
updateFail: 'Update failed',
|
||||
addFail: 'Add failed',
|
||||
},
|
||||
ApiKeyManagement: {
|
||||
searchPlaceholder: 'Please enter the API key name',
|
||||
enterApiValue: 'Please enter the API key value',
|
||||
createBy: 'Created By',
|
||||
placeCreateby: 'Please enter the creator',
|
||||
search: 'Search',
|
||||
index: 'Index',
|
||||
createTime: 'Creation Time',
|
||||
updateBy: 'Updated By',
|
||||
updateTime: 'Update Time',
|
||||
edit: 'Edit',
|
||||
delete: 'Delete',
|
||||
add: 'Add',
|
||||
batchDelete: 'Batch Delete',
|
||||
refreshCache: 'Refresh Cache',
|
||||
copy: 'Copy',
|
||||
noData: 'No Data',
|
||||
dialogTitleAdd: 'Add API Key',
|
||||
dialogTitleEdit: 'Edit API Key',
|
||||
confirmDelete: 'Are you sure you want to delete this API key?',
|
||||
deleteSuccess: 'Delete Successful',
|
||||
deleteFail: 'Delete Failed',
|
||||
saveSuccess: 'Save Successful',
|
||||
saveFail: 'Save Failed',
|
||||
batchDeleteSuccess: 'Batch Delete Successful',
|
||||
batchDeleteFail: 'Batch Delete Failed',
|
||||
dictionaryKey: 'API Key Name',
|
||||
dictionaryValue: 'API Key Value',
|
||||
show: 'Show',
|
||||
hide: 'Hide',
|
||||
operation: 'Operation',
|
||||
remark: 'Remark',
|
||||
enterRemark: 'Please enter the remark',
|
||||
maskValue: '******',
|
||||
confirm: 'Confirm',
|
||||
cancel: 'Cancel',
|
||||
refreshCacheSuccess: 'Cache refreshed successfully',
|
||||
refreshCacheFail: 'Cache refresh failed',
|
||||
copySuccess: 'Copied Successfully',
|
||||
copyFail: 'Copy Failed',
|
||||
dictionaryKeyLength: 'API Key Name length must be between 1 and 255 characters',
|
||||
dictionaryValueLength: 'API Key Value length must be between 1 and 255 characters',
|
||||
getApiKeysFail: 'Get API Key List Failed',
|
||||
confirmDeleteApiKey: 'This operation will permanently delete the API key, are you sure?',
|
||||
Tip: 'Tip',
|
||||
selectDeleteData: 'Please select the data to be deleted',
|
||||
confirmDeleteApiKeys: 'This operation will permanently delete selected ',
|
||||
confirmDeleteApiKeysEnd:' API key, are you sure?',
|
||||
confirmDeleteApiKeysEndPlural:' API keys, are you sure?',
|
||||
confirmRefreshCache: 'This operation will refresh Redis cache, reloading all API keys, are you sure?',
|
||||
updateSuccess: 'Update Successfully',
|
||||
updateFail: 'Update Failed',
|
||||
addSuccess: 'Add Successfully',
|
||||
addFail:'Add Failed'
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -27,9 +27,9 @@ export default {
|
|||
edit: '編輯',
|
||||
delete: '刪除',
|
||||
stopGenerating: '停止生成',
|
||||
placeEnter:'輸入您的問題...',
|
||||
placeEnterChart:'請輸入您的圖表報告問題...',
|
||||
placeEnterDiag:'請輸入您的診斷代碼查詢問題...',
|
||||
placeEnter: '輸入您的問題...',
|
||||
placeEnterChart: '請輸入您的圖表報告問題...',
|
||||
placeEnterDiag: '請輸入您的診斷代碼查詢問題...',
|
||||
placeholder: '請輸入消息內容...',
|
||||
you: '你',
|
||||
assistant: 'AI助手',
|
||||
|
@ -42,8 +42,8 @@ export default {
|
|||
think: '思考過程',
|
||||
like: '讚',
|
||||
dislike: '踩',
|
||||
cancel:'取消',
|
||||
send:'發送',
|
||||
cancel: '取消',
|
||||
send: '發送',
|
||||
},
|
||||
personal: {
|
||||
title: '個人中心',
|
||||
|
@ -100,11 +100,11 @@ export default {
|
|||
confirmNewPasswordPlaceholder: '請再次輸入新密碼',
|
||||
changePasswordDialogTitle: '修改密碼',
|
||||
pleaseConfirmNewPassword: '請確認新密碼',
|
||||
passwordNoEqual:'兩次輸入的密碼不一致',
|
||||
passwordNoEqual: '兩次輸入的密碼不一致',
|
||||
},
|
||||
HistoryRecords: {
|
||||
queryTime: '提問時間:',
|
||||
range:'至',
|
||||
range: '至',
|
||||
chatType: '聊天類型',
|
||||
chatTypePlaceholder: '請選擇聊天類型',
|
||||
keyword: '問題關鍵字',
|
||||
|
@ -153,7 +153,7 @@ export default {
|
|||
},
|
||||
HistoryDetails: {
|
||||
title: '會話詳情',
|
||||
count:'共',
|
||||
count: '共',
|
||||
messageCount: ' 條對話',
|
||||
exportMarkdown: '匯出為 Markdown',
|
||||
user: '使用者',
|
||||
|
@ -161,7 +161,7 @@ export default {
|
|||
thinking: '思考過程',
|
||||
expand: '展開',
|
||||
collapse: '收起',
|
||||
}
|
||||
},
|
||||
},
|
||||
userManagement: {
|
||||
title: '用戶管理',
|
||||
|
@ -173,11 +173,11 @@ export default {
|
|||
scopeOptions: {
|
||||
noFrozen: '只查詢未凍結人員',
|
||||
onlyFrozen: '只查詢已凍結人員',
|
||||
all: '查詢全部人員'
|
||||
all: '查詢全部人員',
|
||||
},
|
||||
searchButton: '查詢',
|
||||
addButton: '添加',
|
||||
deleteButton: '刪除'
|
||||
deleteButton: '刪除',
|
||||
},
|
||||
table: {
|
||||
serialNumber: '序號',
|
||||
|
@ -195,12 +195,12 @@ export default {
|
|||
operations: '操作',
|
||||
edit: '修改',
|
||||
delete: '刪除',
|
||||
noData: '暫無數據'
|
||||
noData: '暫無數據',
|
||||
},
|
||||
confirm: {
|
||||
deleteSingle: '你確定要刪除當前項嗎',
|
||||
deleteMultiple: '你確定要刪除選中項嗎',
|
||||
noSelection: '未選中任何行'
|
||||
noSelection: '未選中任何行',
|
||||
},
|
||||
message: {
|
||||
deleteSuccess: '刪除成功',
|
||||
|
@ -208,26 +208,26 @@ export default {
|
|||
getRolesSuccess: '獲取角色列表成功',
|
||||
getRolesFailed: '獲取角色列表失敗',
|
||||
getDeptFailed: '獲取組織失敗',
|
||||
getAuxFailed: '附加信息列獲取失敗'
|
||||
}
|
||||
getAuxFailed: '附加信息列獲取失敗',
|
||||
},
|
||||
},
|
||||
knowledge: {
|
||||
title: '我的知識庫(共 ',
|
||||
titleEnd:' 個)',
|
||||
titleEnd: ' 個)',
|
||||
newBtn: '新建知識庫',
|
||||
empty: '暫無知識庫數據',
|
||||
loading: '載入中...',
|
||||
error: '獲取知識庫信息失敗,請檢查網絡連接後重試',
|
||||
|
||||
|
||||
card: {
|
||||
noDescription: '暫無描述',
|
||||
docCount: '文檔數',
|
||||
wordCount: '字數',
|
||||
createTime: '創建時間:',
|
||||
updateTime: '更新時間:',
|
||||
unknownTime: '--'
|
||||
unknownTime: '--',
|
||||
},
|
||||
|
||||
|
||||
dialog: {
|
||||
createTitle: '新建知識庫',
|
||||
editTitle: '編輯知識庫',
|
||||
|
@ -240,26 +240,26 @@ export default {
|
|||
createSuccess: '創建成功',
|
||||
createFail: '創建失敗',
|
||||
updateSuccess: '更新成功',
|
||||
updateFail:'更新失敗',
|
||||
updateFail: '更新失敗',
|
||||
deleteSuccess: '刪除成功',
|
||||
deleteFail: '刪除失敗',
|
||||
|
||||
|
||||
rules: {
|
||||
nameRequired: '請輸入知識庫名稱',
|
||||
nameMaxLength: '名稱長度不能超過50個字符'
|
||||
}
|
||||
nameMaxLength: '名稱長度不能超過50個字符',
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
dropdown: {
|
||||
edit: '編輯',
|
||||
delete: '刪除'
|
||||
delete: '刪除',
|
||||
},
|
||||
|
||||
|
||||
deleteConfirm: {
|
||||
title: '刪除確認',
|
||||
message: '確定要刪除該知識庫嗎?所有關聯文檔將被清除',
|
||||
confirm: '確定',
|
||||
cancel: '取消'
|
||||
cancel: '取消',
|
||||
},
|
||||
document: {
|
||||
title: '數據集文檔管理',
|
||||
|
@ -267,7 +267,7 @@ export default {
|
|||
title: '{name}',
|
||||
description: '數據集文檔管理 - 共 ',
|
||||
descriptionEnd: ' 個文件',
|
||||
descriptionEnds:' 個文件'
|
||||
descriptionEnds: ' 個文件',
|
||||
},
|
||||
table: {
|
||||
index: '序號',
|
||||
|
@ -280,45 +280,45 @@ export default {
|
|||
available: '可用',
|
||||
indexing: '解析中',
|
||||
error: '解析失敗',
|
||||
unknown: '未知狀態'
|
||||
}
|
||||
unknown: '未知狀態',
|
||||
},
|
||||
},
|
||||
buttons: {
|
||||
search: '查詢',
|
||||
refresh: '刷新',
|
||||
upload: '上傳文件',
|
||||
batchDelete: '批量刪除 ',
|
||||
batchDeleteConfrim:'批量刪除確認',
|
||||
batchDeleteConfrim: '批量刪除確認',
|
||||
preview: '預覽',
|
||||
download: '下載',
|
||||
rename: '重命名',
|
||||
delete: '刪除'
|
||||
delete: '刪除',
|
||||
},
|
||||
search: {
|
||||
placeholder: '請輸入關鍵詞查詢'
|
||||
placeholder: '請輸入關鍵詞查詢',
|
||||
},
|
||||
uploadDialog: {
|
||||
title: '上傳文件',
|
||||
indexingTechnique: '索引方式',
|
||||
indexingOptions: {
|
||||
highQuality: '高質量',
|
||||
economy: '經濟'
|
||||
economy: '經濟',
|
||||
},
|
||||
preProcessingRules: '預處理規則',
|
||||
ruleOptions: {
|
||||
removeSpaces: '移除多餘空格',
|
||||
removeUrls: '移除URL/郵箱'
|
||||
removeUrls: '移除URL/郵箱',
|
||||
},
|
||||
segmentation: '分段規則',
|
||||
separatorPlaceholder: '分隔符(默認###)',
|
||||
maxTokens: '最大Token數',
|
||||
selectFile:'選擇文件',
|
||||
selectFile: '選擇文件',
|
||||
fileTip: '支持多選,單個文件不超過100MB,可接受格式:TXT、MD、MARKDOWN、MDX、PDF、HTML、HTM、XLSX、XLS、DOCX、CSV、VTT、PROPERTIES',
|
||||
cancel: '取消',
|
||||
upload: '開始上傳'
|
||||
upload: '開始上傳',
|
||||
},
|
||||
preview: {
|
||||
title: '文件預覽'
|
||||
title: '文件預覽',
|
||||
},
|
||||
renameDialog: {
|
||||
title: '重命名文件',
|
||||
|
@ -326,28 +326,28 @@ export default {
|
|||
placeholder: '請輸入新的文件名',
|
||||
cancel: '取消',
|
||||
confirm: '確定',
|
||||
deleteconfirm:'刪除確認'
|
||||
deleteconfirm: '刪除確認',
|
||||
},
|
||||
messages: {
|
||||
FilenamecantEmpty:'文件名不能为空',
|
||||
uploadSuccess:'上傳成功',
|
||||
FilenamecantEmpty: '文件名不能为空',
|
||||
uploadSuccess: '上傳成功',
|
||||
deleteConfirm: '確定要刪除該文件嗎?此操作不可恢復!',
|
||||
batchDeleteConfirm: '確定要刪除選中的 ',
|
||||
batchDeleteConfirmEnd:' 個文件嗎?此操作不可恢復!',
|
||||
batchDeleteConfirmEnd: ' 個文件嗎?此操作不可恢復!',
|
||||
deleteSuccess: '文件 ',
|
||||
deleteSuccessEnd:' 已刪除',
|
||||
deleteing:'刪除中...',
|
||||
deleteSuccessOk:'刪除成功',
|
||||
deleteSuccessEnd: ' 已刪除',
|
||||
deleteing: '刪除中...',
|
||||
deleteSuccessOk: '刪除成功',
|
||||
batchDeleteSuccess: '已成功刪除 ',
|
||||
batchDeleteSuccessEnd:' 個文件',
|
||||
batchDeleteSuccessEnd: ' 個文件',
|
||||
uploadSuccessEnd: ' 個文件已處理完成',
|
||||
renameSuccess: '文件已重命名',
|
||||
noFileSelected: '請選擇要刪除的文件',
|
||||
noUploadFile: '請選擇至少一個文件',
|
||||
loading: '載入中...',
|
||||
NoKnowError:'未知錯誤',
|
||||
getFileContentFailed:'獲取文件內容失敗',
|
||||
uploadLoading:'文件上傳中...'
|
||||
NoKnowError: '未知錯誤',
|
||||
getFileContentFailed: '獲取文件內容失敗',
|
||||
uploadLoading: '文件上傳中...',
|
||||
},
|
||||
errors: {
|
||||
deleteFailed: '刪除失敗: ',
|
||||
|
@ -356,9 +356,172 @@ export default {
|
|||
renameFailed: '重命名失敗: ',
|
||||
fetchFailed: '獲取文檔列表失敗: ',
|
||||
previewFailed: '預覽失敗: ',
|
||||
downloadFailed: '下載失敗: '
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
downloadFailed: '下載失敗: ',
|
||||
},
|
||||
},
|
||||
},
|
||||
KnowledgeManagement: {
|
||||
query: {
|
||||
nameFilter: '註冊名/姓名',
|
||||
deptFilter: '請選擇組織',
|
||||
roleFilter: '請選擇角色',
|
||||
search: '查詢',
|
||||
add: '添加',
|
||||
},
|
||||
table: {
|
||||
noData: '暫無資料',
|
||||
operation: '操作',
|
||||
bindDataset: '綁定知識庫',
|
||||
columns: {
|
||||
index: '序號',
|
||||
name: '註冊名',
|
||||
displayName: '姓名',
|
||||
department: '組織',
|
||||
roles: '角色',
|
||||
datasets: '知識庫',
|
||||
},
|
||||
},
|
||||
pagination: {
|
||||
pageSize: '每頁條數',
|
||||
total: '總數',
|
||||
},
|
||||
filter: {
|
||||
tableFields: '表格欄位過濾與排序',
|
||||
},
|
||||
fullscreen: '全螢幕',
|
||||
collapseQuery: '摺疊查詢區域',
|
||||
expandQuery: '展開查詢區域',
|
||||
addUser: '新增使用者',
|
||||
deleteUser: '刪除使用者',
|
||||
confirmDelete: '您確定要刪除嗎?',
|
||||
errorFetchingData: '獲取資料失敗',
|
||||
message: {
|
||||
getRolesSuccess: '獲取角色列表成功',
|
||||
getRolesFailed: '獲取角色列表失敗',
|
||||
getDeptsFailed: '獲取組織列表失敗',
|
||||
},
|
||||
bindDataset: {
|
||||
title: '綁定知識庫',
|
||||
user: '用戶',
|
||||
boundDatasets: '已綁定知識庫',
|
||||
addDatasets: '添加知識庫',
|
||||
selectDatasets: '請選擇要綁定的知識庫',
|
||||
removeDataset: '移除知識庫',
|
||||
cancel: '取 消',
|
||||
confirm: '確 定',
|
||||
pleaseSelect: '請選擇要綁定的知識庫',
|
||||
bindSuccess: '綁定成功',
|
||||
unbindSuccess: '解绑成功',
|
||||
bindFail: '綁定失敗',
|
||||
unbindFail: '解绑失敗',
|
||||
fetchFail: '獲取知識庫列表失敗',
|
||||
},
|
||||
},
|
||||
|
||||
DictionaryManagement: {
|
||||
add: '添加',
|
||||
index: '序號',
|
||||
addDic: '添加字典分類',
|
||||
addDicDetail: '添加字典詳細',
|
||||
editDic: '編輯字典',
|
||||
dictionaryKey: '字典鍵',
|
||||
dictionaryValue: '字典值',
|
||||
parentDictionary: '父級字典',
|
||||
remark: '備註',
|
||||
pleaseEnterRemark: '請輸入備註',
|
||||
editable: '是否可編輯',
|
||||
allow: '允許',
|
||||
notAllow: '不允許',
|
||||
operation: '操作',
|
||||
confirm: '確定',
|
||||
cancel: '取消',
|
||||
edit: '修改',
|
||||
delete: '刪除',
|
||||
searchPlaceholder: '請輸入字典名稱',
|
||||
noData: '暫無資料',
|
||||
dialogTitleAdd: '新增字典',
|
||||
dialogTitleEdit: '編輯字典',
|
||||
confirmDelete: '確定要刪除此字典項嗎?',
|
||||
deleteSuccess: '刪除成功',
|
||||
deleteFail: '刪除失敗',
|
||||
saveSuccess: '保存成功',
|
||||
saveFail: '保存失敗',
|
||||
batchDeleteSuccess: '批量刪除成功',
|
||||
batchDeleteFail: '批量刪除失敗',
|
||||
refreshCache: '刷新快取',
|
||||
refreshCacheSuccess: '快取刷新成功',
|
||||
refreshCacheFail: '快取刷新失敗',
|
||||
dictionaryCategory: '字典分類',
|
||||
dictionaryKeyError: '請輸入字典鍵',
|
||||
dictionaryValueError: '請輸入字典值',
|
||||
selecteditable: '請選擇是否可編輯',
|
||||
parentDictionaryError: '請選擇父級字典(留空表示根節點)',
|
||||
numberdescription: '括號內數值爲ID值',
|
||||
diclengtherror: '字典鍵長度不能超過50個字符',
|
||||
dicvalueerror: '字典值長度不能超過50個字符',
|
||||
alldic: '全部字典',
|
||||
getdicfail: '獲取字典數據失敗',
|
||||
getdicTreefail: '獲取字典樹數據失敗',
|
||||
rootNode: '根節點',
|
||||
selectDicCate: '請先選擇字典分類',
|
||||
updateFail: '更新失敗',
|
||||
addFail: '添加失敗',
|
||||
},
|
||||
ApiKeyManagement: {
|
||||
searchPlaceholder: '請輸入密鑰名稱',
|
||||
enterApiValue: '請輸入密鑰值',
|
||||
createBy: '創建人',
|
||||
placeCreateby: '請輸入創建人',
|
||||
search:'查詢',
|
||||
index: '序號',
|
||||
createTime: '創建時間',
|
||||
updateBy: '更新人',
|
||||
updateTime: '更新時間',
|
||||
edit: '編輯',
|
||||
delete: '刪除',
|
||||
|
||||
add: '新增',
|
||||
batchDelete: '批量刪除',
|
||||
refreshCache: '刷新快取',
|
||||
noData: '暫無資料',
|
||||
dialogTitleAdd: '新增API密鑰',
|
||||
dialogTitleEdit: '編輯API密鑰',
|
||||
confirmDelete: '確定要刪除此API密鑰嗎?',
|
||||
deleteSuccess: '刪除成功',
|
||||
deleteFail: '刪除失敗',
|
||||
saveSuccess: '保存成功',
|
||||
saveFail: '保存失敗',
|
||||
batchDeleteSuccess: '批量刪除成功',
|
||||
batchDeleteFail: '批量刪除失敗',
|
||||
dictionaryKey: '密鑰名稱',
|
||||
dictionaryValue: '密鑰值',
|
||||
show:'顯示',
|
||||
hide:'隱藏',
|
||||
operation: '操作',
|
||||
remark: '備註',
|
||||
enterRemark: '請輸入備註信息',
|
||||
maskValue: '******',
|
||||
confirm: '確定',
|
||||
cancel: '取消',
|
||||
refreshCacheSuccess: '快取刷新成功',
|
||||
refreshCacheFail: '快取刷新失敗',
|
||||
copySuccess: '複製成功',
|
||||
copyFail: '複製失敗',
|
||||
copy:'複製',
|
||||
dictionaryKeyLength: '密鑰名稱長度在 1 到 255 個字符',
|
||||
dictionaryValueLength: '密鑰值長度在 1 到 255 個字符',
|
||||
getApiKeysFail: '获取API密鑰列表失败',
|
||||
confirmDeleteApiKey: '此操作将永久删除该API密鑰,是否继续?',
|
||||
Tip: '提示',
|
||||
selectDeleteData: '請選擇要刪除的數據',
|
||||
confirmDeleteApiKeys: '此操作將永久删除选中的 ',
|
||||
confirmDeleteApiKeysEnd:' 條API密鑰,是否繼續?',
|
||||
confirmDeleteApiKeysEndPlural:' 條API密鑰,是否繼續?',
|
||||
confirmRefreshCache: '此操作將刷新Redis缓存,重新加载所有API密鑰,是否繼續?',
|
||||
updateSuccess: '更新成功',
|
||||
updateFail:'更新失敗',
|
||||
addSuccess:'新增成功',
|
||||
addFail:'新增失敗',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
export default {
|
||||
vabI18n:{
|
||||
vabI18n: {
|
||||
role: {
|
||||
index: '序号',
|
||||
name: '注册名',
|
||||
|
@ -27,9 +27,9 @@ export default {
|
|||
edit: '编辑',
|
||||
delete: '删除',
|
||||
stopGenerating: '停止生成',
|
||||
placeEnter:'输入您的问题...',
|
||||
placeEnterChart:'请输入您的图表报告问题...',
|
||||
placeEnterDiag:'请输入您的诊断代码查询问题...',
|
||||
placeEnter: '输入您的问题...',
|
||||
placeEnterChart: '请输入您的图表报告问题...',
|
||||
placeEnterDiag: '请输入您的诊断代码查询问题...',
|
||||
placeholder: '请输入消息内容...',
|
||||
you: '你',
|
||||
assistant: 'AI助手',
|
||||
|
@ -42,8 +42,8 @@ export default {
|
|||
think: '思考过程',
|
||||
like: '赞',
|
||||
dislike: '踩',
|
||||
cancel:'取消',
|
||||
send:'发送',
|
||||
cancel: '取消',
|
||||
send: '发送',
|
||||
},
|
||||
personal: {
|
||||
title: '个人中心',
|
||||
|
@ -94,26 +94,26 @@ export default {
|
|||
oldPassword: '原始密码',
|
||||
newPassword: '新密码',
|
||||
confirmNewPassword: '确认新密码',
|
||||
|
||||
|
||||
oldPasswordPlaceholder: '请输入原始密码',
|
||||
newPasswordPlaceholder: '请输入新密码',
|
||||
newPasswordPermission: '密码长度不能少于6位',
|
||||
confirmNewPasswordPlaceholder: '请再次输入新密码',
|
||||
changePasswordDialogTitle: '修改密码',
|
||||
pleaseConfirmNewPassword: '请确认新密码',
|
||||
passwordNoEqual:'两次输入的密码不一致',
|
||||
departmentGetFail:'获取组织失败',
|
||||
roleListGetOk:'获取角色列表成功',
|
||||
roleListGetFail:'获取角色失败',
|
||||
passwordNoEqual: '两次输入的密码不一致',
|
||||
departmentGetFail: '获取组织失败',
|
||||
roleListGetOk: '获取角色列表成功',
|
||||
roleListGetFail: '获取角色失败',
|
||||
resetPasswordDialogTitle: '重置密码',
|
||||
resetPasswordSuccess: '重置密码成功',
|
||||
resetPasswordFail: '重置密码失败',
|
||||
resetPasswordConfirm: '确认将该用户密码重置吗?',
|
||||
resetPasswordFailCheck: '重设密码失败,请检查原密码!'
|
||||
resetPasswordFailCheck: '重设密码失败,请检查原密码!',
|
||||
},
|
||||
HistoryRecords: {
|
||||
queryTime: '提问时间:',
|
||||
range:'至',
|
||||
range: '至',
|
||||
chatType: '聊天类型',
|
||||
chatTypePlaceholder: '请选择聊天类型',
|
||||
keyword: '问题关键字',
|
||||
|
@ -148,7 +148,7 @@ export default {
|
|||
buttons: {
|
||||
view: '查看',
|
||||
delete: '删除',
|
||||
confirm: '确认',
|
||||
confirm: '确定',
|
||||
cancel: '取消',
|
||||
close: '关闭',
|
||||
fullscreen: '全屏',
|
||||
|
@ -163,7 +163,7 @@ export default {
|
|||
},
|
||||
HistoryDetails: {
|
||||
title: '会话详情',
|
||||
count:'共',
|
||||
count: '共',
|
||||
messageCount: ' 条对话',
|
||||
exportMarkdown: '导出为 Markdown',
|
||||
user: '用户',
|
||||
|
@ -183,11 +183,11 @@ export default {
|
|||
scopeOptions: {
|
||||
noFrozen: '只查询未冻结人员',
|
||||
onlyFrozen: '只查询已冻结人员',
|
||||
all: '查询全部人员'
|
||||
all: '查询全部人员',
|
||||
},
|
||||
searchButton: '查询',
|
||||
addButton: '添加',
|
||||
deleteButton: '删除'
|
||||
deleteButton: '删除',
|
||||
},
|
||||
table: {
|
||||
serialNumber: '序号',
|
||||
|
@ -205,12 +205,12 @@ export default {
|
|||
operations: '操作',
|
||||
edit: '修改',
|
||||
delete: '删除',
|
||||
noData: '暂无数据'
|
||||
noData: '暂无数据',
|
||||
},
|
||||
confirm: {
|
||||
deleteSingle: '你确定要删除当前项吗',
|
||||
deleteMultiple: '你确定要删除选中项吗',
|
||||
noSelection: '未选中任何行'
|
||||
noSelection: '未选中任何行',
|
||||
},
|
||||
message: {
|
||||
deleteSuccess: '删除成功',
|
||||
|
@ -218,26 +218,26 @@ export default {
|
|||
getRolesSuccess: '获取角色列表成功',
|
||||
getRolesFailed: '获取角色列表失败',
|
||||
getDeptFailed: '获取组织失败',
|
||||
getAuxFailed: '附加信息列获取失败'
|
||||
}
|
||||
getAuxFailed: '附加信息列获取失败',
|
||||
},
|
||||
},
|
||||
knowledge: {
|
||||
title: '我的知识库(共 ',
|
||||
titleEnd:'个)',
|
||||
titleEnd: '个)',
|
||||
newBtn: '新建知识库',
|
||||
empty: '暂无知识库数据',
|
||||
loading: '加载中...',
|
||||
error: '获取知识库信息失败,请检查网络连接后重试',
|
||||
|
||||
|
||||
card: {
|
||||
noDescription: '暂无描述',
|
||||
docCount: '文档数',
|
||||
wordCount: '字数',
|
||||
createTime: '创建时间:',
|
||||
updateTime: '更新时间:',
|
||||
unknownTime: '--'
|
||||
unknownTime: '--',
|
||||
},
|
||||
|
||||
|
||||
dialog: {
|
||||
createTitle: '新建知识库',
|
||||
editTitle: '编辑知识库',
|
||||
|
@ -250,26 +250,26 @@ export default {
|
|||
createSuccess: '创建成功',
|
||||
createFail: '创建失败',
|
||||
updateSuccess: '更新成功',
|
||||
updateFail:'更新失败',
|
||||
updateFail: '更新失败',
|
||||
deleteSuccess: '删除成功',
|
||||
deleteFail: '删除失败',
|
||||
|
||||
|
||||
rules: {
|
||||
nameRequired: '请输入知识库名称',
|
||||
nameMaxLength: '名称长度不能超过50个字符'
|
||||
}
|
||||
nameMaxLength: '名称长度不能超过50个字符',
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
dropdown: {
|
||||
edit: '编辑',
|
||||
delete: '删除'
|
||||
delete: '删除',
|
||||
},
|
||||
|
||||
|
||||
deleteConfirm: {
|
||||
title: '删除确认',
|
||||
message: '确定要删除该知识库吗?所有关联文档将被清除',
|
||||
confirm: '确定',
|
||||
cancel: '取消'
|
||||
cancel: '取消',
|
||||
},
|
||||
document: {
|
||||
title: '数据集文档管理',
|
||||
|
@ -277,8 +277,7 @@ export default {
|
|||
title: '{name}',
|
||||
description: '数据集文档管理 - 共 ',
|
||||
descriptionEnd: ' 个文件',
|
||||
descriptionEnds:' 个文件'
|
||||
|
||||
descriptionEnds: ' 个文件',
|
||||
},
|
||||
table: {
|
||||
index: '序号',
|
||||
|
@ -291,8 +290,8 @@ export default {
|
|||
available: '可用',
|
||||
indexing: '解析中',
|
||||
error: '解析失败',
|
||||
unknown: '未知状态'
|
||||
}
|
||||
unknown: '未知状态',
|
||||
},
|
||||
},
|
||||
buttons: {
|
||||
search: '查询',
|
||||
|
@ -303,33 +302,33 @@ export default {
|
|||
preview: '预览',
|
||||
download: '下载',
|
||||
rename: '重命名',
|
||||
delete: '删除'
|
||||
delete: '删除',
|
||||
},
|
||||
search: {
|
||||
placeholder: '请输入关键词查询'
|
||||
placeholder: '请输入关键词查询',
|
||||
},
|
||||
uploadDialog: {
|
||||
title: '上传文件',
|
||||
indexingTechnique: '索引方式',
|
||||
indexingOptions: {
|
||||
highQuality: '高质量',
|
||||
economy: '经济'
|
||||
economy: '经济',
|
||||
},
|
||||
preProcessingRules: '预处理规则',
|
||||
ruleOptions: {
|
||||
removeSpaces: '移除多余空格',
|
||||
removeUrls: '移除URL/邮箱'
|
||||
removeUrls: '移除URL/邮箱',
|
||||
},
|
||||
segmentation: '分段规则',
|
||||
separatorPlaceholder: '分隔符(默认###)',
|
||||
maxTokens: '最大Token数',
|
||||
selectFile:'选择文件',
|
||||
selectFile: '选择文件',
|
||||
fileTip: '支持多选,单个文件不超过100MB,可接受格式:TXT、MD、MARKDOWN、MDX、PDF、HTML、HTM、XLSX、XLS、DOCX、CSV、VTT、PROPERTIES',
|
||||
cancel: '取消',
|
||||
upload: '开始上传'
|
||||
upload: '开始上传',
|
||||
},
|
||||
preview: {
|
||||
title: '文件预览'
|
||||
title: '文件预览',
|
||||
},
|
||||
renameDialog: {
|
||||
title: '重命名文件',
|
||||
|
@ -337,28 +336,28 @@ export default {
|
|||
placeholder: '请输入新的文件名',
|
||||
cancel: '取消',
|
||||
confirm: '确定',
|
||||
deleteconfirm:'删除确认'
|
||||
deleteconfirm: '删除确认',
|
||||
},
|
||||
messages: {
|
||||
FilenamecantEmpty:'文件名不能为空',
|
||||
uploadSuccess:'上传成功',
|
||||
FilenamecantEmpty: '文件名不能为空',
|
||||
uploadSuccess: '上传成功',
|
||||
deleteConfirm: '确定要删除该文件吗?此操作不可恢复!',
|
||||
batchDeleteConfirm: '确定要删除选中的 ',
|
||||
batchDeleteConfirmEnd:' 个文件吗?此操作不可恢复!',
|
||||
batchDeleteConfirmEnd: ' 个文件吗?此操作不可恢复!',
|
||||
deleteSuccess: '文件 ',
|
||||
deleteSuccessEnd:' 已删除',
|
||||
deleteing:'删除中...',
|
||||
deleteSuccessOk:'删除成功',
|
||||
deleteSuccessEnd: ' 已删除',
|
||||
deleteing: '删除中...',
|
||||
deleteSuccessOk: '删除成功',
|
||||
batchDeleteSuccess: '已成功删除 ',
|
||||
batchDeleteSuccessEnd:' 个文件',
|
||||
batchDeleteSuccessEnd: ' 个文件',
|
||||
uploadSuccessEnd: ' 个文件已处理完成',
|
||||
renameSuccess: '文件已重命名',
|
||||
noFileSelected: '请选择要删除的文件',
|
||||
noUploadFile: '请选择至少一个文件',
|
||||
loading: '加载中...',
|
||||
NoKnowError:'未知错误',
|
||||
getFileContentFailed:'获取文件内容失败',
|
||||
uploadLoading:'文件上传中...'
|
||||
NoKnowError: '未知错误',
|
||||
getFileContentFailed: '获取文件内容失败',
|
||||
uploadLoading: '文件上传中...',
|
||||
},
|
||||
errors: {
|
||||
deleteFailed: '删除失败:',
|
||||
|
@ -367,9 +366,170 @@ export default {
|
|||
renameFailed: '重命名失败: ',
|
||||
fetchFailed: '获取文档列表失败: ',
|
||||
previewFailed: '预览失败: ',
|
||||
downloadFailed: '下载失败: '
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
downloadFailed: '下载失败: ',
|
||||
},
|
||||
},
|
||||
},
|
||||
KnowledgeManagement: {
|
||||
query: {
|
||||
nameFilter: '注册名/姓名',
|
||||
deptFilter: '请选择组织',
|
||||
roleFilter: '请选择角色',
|
||||
search: '查询',
|
||||
add: '添加',
|
||||
},
|
||||
table: {
|
||||
noData: '暂无数据',
|
||||
operation: '操作',
|
||||
bindDataset: '绑定知识库',
|
||||
columns: {
|
||||
index: '序号',
|
||||
name: '注册名',
|
||||
displayName: '姓名',
|
||||
department: '组织',
|
||||
roles: '角色',
|
||||
datasets: '知识库',
|
||||
},
|
||||
},
|
||||
pagination: {
|
||||
pageSize: '每页条数',
|
||||
total: '总数',
|
||||
},
|
||||
filter: {
|
||||
tableFields: '表格字段过滤与排序',
|
||||
},
|
||||
fullscreen: '全屏',
|
||||
collapseQuery: '折叠查询区域',
|
||||
expandQuery: '展开查询区域',
|
||||
addUser: '添加用户',
|
||||
deleteUser: '删除用户',
|
||||
confirmDelete: '您确定要删除吗?',
|
||||
errorFetchingData: '获取数据失败',
|
||||
message: {
|
||||
getRolesSuccess: '获取角色列表成功',
|
||||
getRolesFailed: '获取角色列表失败',
|
||||
getDeptsFailed: '获取组织列表失败',
|
||||
},
|
||||
bindDataset: {
|
||||
title: '绑定知识库',
|
||||
user: '用户',
|
||||
boundDatasets: '已绑定知识库',
|
||||
addDatasets: '添加知识库',
|
||||
selectDatasets: '请选择要绑定的知识库',
|
||||
removeDataset: '移除知识库',
|
||||
cancel: '取 消',
|
||||
confirm: '确 定',
|
||||
pleaseSelect: '请选择要绑定的知识库',
|
||||
bindSuccess: '绑定成功',
|
||||
unbindSuccess: '解绑成功',
|
||||
bindFail: '绑定失败',
|
||||
unbindFail: '解绑失败',
|
||||
fetchFail: '获取知识库列表失败',
|
||||
},
|
||||
},
|
||||
DictionaryManagement: {
|
||||
add: '添加',
|
||||
index: '序号',
|
||||
addDic: '添加字典分类',
|
||||
addDicDetail: '添加字典详情',
|
||||
editDic: '编辑字典',
|
||||
dictionaryKey: '字典键',
|
||||
dictionaryValue: '字典值',
|
||||
remark: '备注',
|
||||
pleaseEnterRemark: '请输入备注',
|
||||
editable: '是否可编辑',
|
||||
allow: '允许',
|
||||
notAllow: '不允许',
|
||||
operation: '操作',
|
||||
edit: '修改',
|
||||
delete: '删除',
|
||||
confirm: '确定',
|
||||
cancel: '取消',
|
||||
parentDictionary: '父级字典',
|
||||
searchPlaceholder: '请输入字典名称',
|
||||
noData: '暂无数据',
|
||||
dialogTitleAdd: '新增字典',
|
||||
dialogTitleEdit: '编辑字典',
|
||||
confirmDelete: '确定要删除此字典项吗?',
|
||||
deleteSuccess: '删除成功',
|
||||
deleteFail: '删除失败',
|
||||
saveSuccess: '保存成功',
|
||||
saveFail: '保存失败',
|
||||
batchDeleteSuccess: '批量删除成功',
|
||||
batchDeleteFail: '批量删除失败',
|
||||
refreshCache: '刷新缓存',
|
||||
refreshCacheSuccess: '缓存刷新成功',
|
||||
refreshCacheFail: '缓存刷新失败',
|
||||
dictionaryCategory: '字典分类',
|
||||
dictionaryKeyError: '请输入字典键',
|
||||
selecteditable: '请选择是否可编辑',
|
||||
dictionaryValueError: '请输入字典值',
|
||||
parentDictionaryError: '请选择父级字典(留空表示根节点)',
|
||||
numberdescription: '括号内数值为ID值',
|
||||
diclengtherror: '字典键长度不能超过50个字符',
|
||||
dicvalueerror: '字典值长度不能超过50个字符',
|
||||
alldic: '全部字典',
|
||||
getdicfail: '获取字典数据失败',
|
||||
getdicTreefail: '获取字典树数据失败',
|
||||
rootNode: '根节点',
|
||||
selectDicCate: '请先选择字典分类',
|
||||
updateFail: '更新失败',
|
||||
addFail: '添加失败',
|
||||
},
|
||||
ApiKeyManagement: {
|
||||
searchPlaceholder: '请输入密钥名称',
|
||||
enterApiValue: '请输入密钥值',
|
||||
createBy: '创建人',
|
||||
placeCreateby: '请输入创建人',
|
||||
search:'查询',
|
||||
index: '序号',
|
||||
createTime: '创建时间',
|
||||
updateBy: '更新人',
|
||||
updateTime: '更新时间',
|
||||
edit: '编辑',
|
||||
delete: '删除',
|
||||
add: '新增',
|
||||
batchDelete: '批量删除',
|
||||
refreshCache: '刷新缓存',
|
||||
noData: '暂无数据',
|
||||
dialogTitleAdd: '新增API密钥',
|
||||
dialogTitleEdit: '编辑API密钥',
|
||||
confirmDelete: '确定要删除此API密钥吗?',
|
||||
deleteSuccess: '删除成功',
|
||||
deleteFail: '删除失败',
|
||||
saveSuccess: '保存成功',
|
||||
saveFail: '保存失败',
|
||||
batchDeleteSuccess: '批量删除成功',
|
||||
batchDeleteFail: '批量删除失败',
|
||||
dictionaryKey: '密钥名称',
|
||||
dictionaryValue: '密钥值',
|
||||
show:'显示',
|
||||
hide:'隐藏',
|
||||
operation: '操作',
|
||||
remark: '备注',
|
||||
enterRemark: '请输入备注信息',
|
||||
maskValue: '******',
|
||||
confirm: '确定',
|
||||
cancel: '取消',
|
||||
refreshCacheSuccess: '缓存刷新成功',
|
||||
refreshCacheFail: '缓存刷新失败',
|
||||
copy:'复制',
|
||||
copySuccess: '复制成功',
|
||||
copyFail: '复制失败',
|
||||
dictionaryKeyLength: '密钥名称长度在 1 到 255 个字符',
|
||||
dictionaryValueLength: '密钥值长度在 1 到 255 个字符',
|
||||
getApiKeysFail: '获取API密钥列表失败',
|
||||
confirmDeleteApiKey: '此操作将永久删除该API密钥,是否继续?',
|
||||
Tip: '提示',
|
||||
selectDeleteData: '请选择要删除的数据',
|
||||
confirmDeleteApiKeys: '此操作将永久删除选中的 ',
|
||||
confirmDeleteApiKeysEnd:' 条API密钥,是否继续?',
|
||||
confirmDeleteApiKeysEndPlural:' 条API密钥,是否继续?',
|
||||
confirmRefreshCache: '此操作将刷新Redis缓存,重新加载所有API密钥,是否继续?',
|
||||
updateSuccess: '更新成功',
|
||||
updateFail: '更新失败',
|
||||
addSuccess: '新增成功',
|
||||
addFail: '新增失败',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
@ -27,7 +27,9 @@
|
|||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button :icon="Search" native-type="submit" type="primary" @click="queryData">{{ t('vabI18n.HistoryRecords.search') }}</el-button>
|
||||
<el-button v-permissions="{ verbName: 'del', resourceName: $options.name }" :icon="Delete" type="danger" @click="handleDelete()">{{ t('vabI18n.HistoryRecords.delete') }}</el-button>
|
||||
<el-button v-permissions="{ verbName: 'del', resourceName: $options.name }" :icon="Delete" type="danger" @click="handleDelete()">
|
||||
{{ t('vabI18n.HistoryRecords.delete') }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</vab-query-form-left-panel>
|
||||
|
@ -54,7 +56,7 @@
|
|||
</el-popover>
|
||||
</vab-query-form-right-panel>
|
||||
</vab-query-form>
|
||||
<el-table ref="tableRef" v-loading="listLoading" border :data="tableDataList" :height="tableHeight" @selection-change="setSelectRows">
|
||||
<el-table :key="locale" ref="tableRef" v-loading="listLoading" border :data="tableDataList" :height="tableHeight" @selection-change="setSelectRows">
|
||||
<el-table-column align="center" show-overflow-tooltip type="selection" width="55" />
|
||||
<el-table-column align="center" :label="t('vabI18n.HistoryRecords.columns.index')" show-overflow-tooltip width="80">
|
||||
<template #default="{ $index }">
|
||||
|
@ -79,8 +81,12 @@
|
|||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" :label="t('vabI18n.HistoryRecords.columns.actions')" show-overflow-tooltip width="180">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" v-permissions="{ verbName: 'edit', resourceName: $options.name }" plain @click="handleEdit(row)">{{ t('vabI18n.HistoryRecords.viewDetails') }}</el-button>
|
||||
<el-button type="danger" v-permissions="{ verbName: 'del', resourceName: $options.name }" plain @click="handleDelete(row)">{{ t('vabI18n.HistoryRecords.delete') }}</el-button>
|
||||
<el-button type="primary" v-permissions="{ verbName: 'edit', resourceName: $options.name }" plain @click="handleEdit(row)">
|
||||
{{ t('vabI18n.HistoryRecords.viewDetails') }}
|
||||
</el-button>
|
||||
<el-button type="danger" v-permissions="{ verbName: 'del', resourceName: $options.name }" plain @click="handleDelete(row)">
|
||||
{{ t('vabI18n.HistoryRecords.delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #empty>
|
||||
|
@ -100,86 +106,100 @@
|
|||
<div style="height: 100%"><historyDetails :data="detailsMessage" :conversation-name="conversationName" /></div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
<script>
|
||||
import { historyList, deleteHistoryMessage, deleteHistoryMessages ,conversationsPage,conversationDetail} from '@/api/historicalRecords'
|
||||
import VabDraggable from 'vuedraggable'
|
||||
import { Delete, Plus, Search } from '@element-plus/icons-vue'
|
||||
import historyDetails from './components/details'
|
||||
import { useAclStore } from '@/store/modules/acl'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
const aclStore = useAclStore()
|
||||
const userId = aclStore.getUserId
|
||||
import { historyList, deleteHistoryMessage, deleteHistoryMessages, conversationsPage, conversationDetail } from '@/api/historicalRecords'
|
||||
import VabDraggable from 'vuedraggable'
|
||||
import { Delete, Plus, Search } from '@element-plus/icons-vue'
|
||||
import historyDetails from './components/details'
|
||||
import { useAclStore } from '@/store/modules/acl'
|
||||
import { nextTick, reactive, ref, computed, watch, onMounted, inject } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Dailysummary',
|
||||
components: {
|
||||
VabDraggable,
|
||||
historyDetails,
|
||||
},
|
||||
|
||||
setup() {
|
||||
const { t, locale } = useI18n()
|
||||
const $baseConfirm = inject('$baseConfirm')
|
||||
const $baseMessage = inject('$baseMessage')
|
||||
const $baseTableHeight = inject('$baseTableHeight')
|
||||
/**
|
||||
* 参数定义区
|
||||
*/
|
||||
const tableFilterListForSelect = ref([])
|
||||
const updateTableFilterList = () => {
|
||||
tableFilterListForSelect.value = [
|
||||
t('vabI18n.HistoryRecords.columns.conversationName'),
|
||||
t('vabI18n.HistoryRecords.columns.chatType'),
|
||||
t('vabI18n.HistoryRecords.columns.createTime'),
|
||||
t('vabI18n.HistoryRecords.columns.updateTime')
|
||||
]
|
||||
}
|
||||
const aclStore = useAclStore()
|
||||
const userId = aclStore.getUserId
|
||||
|
||||
watch(locale, () => {
|
||||
updateTableFilterList()
|
||||
})
|
||||
export default defineComponent({
|
||||
name: 'Dailysummary',
|
||||
components: {
|
||||
VabDraggable,
|
||||
historyDetails,
|
||||
},
|
||||
|
||||
onMounted(() => {
|
||||
updateTableFilterList()
|
||||
fetchData()
|
||||
})
|
||||
setup() {
|
||||
const { t, locale } = useI18n()
|
||||
const $baseConfirm = inject('$baseConfirm')
|
||||
const $baseMessage = inject('$baseMessage')
|
||||
const $baseTableHeight = inject('$baseTableHeight')
|
||||
/**
|
||||
* 参数定义区
|
||||
*/
|
||||
|
||||
const state = reactive({
|
||||
//全屏
|
||||
isFullscreen: false,
|
||||
//加载
|
||||
listLoading: true,
|
||||
layout: 'total, sizes, prev, pager, next, jumper',
|
||||
daterange: [],
|
||||
total: 0,
|
||||
labelWidth: 120,
|
||||
//选择行
|
||||
selectRows: '',
|
||||
//查询条件
|
||||
queryForm: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
query: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
chatType: '',
|
||||
userId: userId, // 从localStorage获取userId
|
||||
},
|
||||
//表格引用
|
||||
tableRef: null,
|
||||
//查询区字段折叠
|
||||
foldQueryRegion: true,
|
||||
//表格高度
|
||||
tableHeight: $baseTableHeight(1),
|
||||
//表格数据
|
||||
tableDataList: [],
|
||||
// //表格可供选择的过滤清单
|
||||
// tableFilterListForSelect: [t('vabI18n.HistoryRecords.columns.conversationName'), t('vabI18n.HistoryRecords.columns.chatType'), t('vabI18n.HistoryRecords.columns.createTime'), t('vabI18n.HistoryRecords.columns.updateTime')],
|
||||
// //表格所有的动态字段。
|
||||
tableDynamicColumns: [
|
||||
const tableFilterListForSelect = ref([])
|
||||
|
||||
// 动态计算翻译文本
|
||||
const conversationName = computed(() => t('vabI18n.HistoryRecords.columns.conversationName'))
|
||||
const chatType = computed(() => t('vabI18n.HistoryRecords.columns.chatType'))
|
||||
const createTime = computed(() => t('vabI18n.HistoryRecords.columns.createTime'))
|
||||
const updateTime = computed(() => t('vabI18n.HistoryRecords.columns.updateTime'))
|
||||
|
||||
// 更新表格过滤列表
|
||||
const updateTableFilterList = () => {
|
||||
tableFilterListForSelect.value = [conversationName.value, chatType.value, createTime.value, updateTime.value]
|
||||
}
|
||||
|
||||
// 监听语言变化,语言切换时更新过滤列表
|
||||
watch(
|
||||
locale,
|
||||
() => {
|
||||
nextTick(() => {
|
||||
updateTableFilterList() // 使用 nextTick 确保 DOM 更新后再更新
|
||||
})
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
onMounted(() => {
|
||||
updateTableFilterList() // 初始化时更新
|
||||
fetchData()
|
||||
})
|
||||
|
||||
const state = reactive({
|
||||
//全屏
|
||||
isFullscreen: false,
|
||||
//加载
|
||||
listLoading: true,
|
||||
layout: 'total, sizes, prev, pager, next, jumper',
|
||||
daterange: [],
|
||||
total: 0,
|
||||
labelWidth: 120,
|
||||
//选择行
|
||||
selectRows: '',
|
||||
//查询条件
|
||||
queryForm: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
query: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
chatType: '',
|
||||
userId: userId, // 从localStorage获取userId
|
||||
},
|
||||
//表格引用
|
||||
tableRef: null,
|
||||
//查询区字段折叠
|
||||
foldQueryRegion: true,
|
||||
//表格高度
|
||||
tableHeight: $baseTableHeight(1),
|
||||
//表格数据
|
||||
tableDataList: [],
|
||||
// //表格可供选择的过滤清单
|
||||
// tableFilterListForSelect: [t('vabI18n.HistoryRecords.columns.conversationName'), t('vabI18n.HistoryRecords.columns.chatType'), t('vabI18n.HistoryRecords.columns.createTime'), t('vabI18n.HistoryRecords.columns.updateTime')],
|
||||
|
||||
// //表格所有的动态字段。
|
||||
tableDynamicColumns: [
|
||||
{
|
||||
label: t('vabI18n.HistoryRecords.columns.conversationName'),
|
||||
label: conversationName.value,
|
||||
prop: 'conversationName',
|
||||
sortable: true,
|
||||
},
|
||||
|
@ -189,263 +209,260 @@ export default defineComponent({
|
|||
sortable: true,
|
||||
},
|
||||
{
|
||||
label: t('vabI18n.HistoryRecords.columns.createTime'),
|
||||
prop: 'createTime',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
label: t('vabI18n.HistoryRecords.columns.updateTime'),
|
||||
prop: 'updateTime',
|
||||
sortable: true,
|
||||
},
|
||||
],
|
||||
detailsMessage: [],
|
||||
historyDetailsRef: null,
|
||||
dialogTableVisible: false,
|
||||
conversationId: '',
|
||||
conversationName: '',
|
||||
})
|
||||
/**
|
||||
* 表格获取数据
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
state.listLoading = true
|
||||
//获取查询提问时间
|
||||
if (state.daterange && state.daterange.length === 2) {
|
||||
// 确保时间格式符合后端要求 yyyy-MM-dd HH:mm:ss
|
||||
state.queryForm.startTime = state.daterange[0]
|
||||
state.queryForm.endTime = state.daterange[1]
|
||||
} else {
|
||||
state.queryForm.startTime = undefined
|
||||
state.queryForm.endTime = undefined
|
||||
}
|
||||
const res = await conversationsPage(state.queryForm)
|
||||
if (res.data) {
|
||||
state.tableDataList = res.data.content
|
||||
state.total = res.data.total
|
||||
state.listLoading = false
|
||||
console.log("state.tableDataList",state.tableDataList)
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 分页条数
|
||||
* @param val 每页条数
|
||||
*/
|
||||
const handleSizeChange = (val) => {
|
||||
state.queryForm.pageSize = val
|
||||
fetchData()
|
||||
}
|
||||
/**
|
||||
* 页码跳转
|
||||
* @param val 页码
|
||||
*/
|
||||
const handleCurrentChange = (val) => {
|
||||
state.queryForm.pageNo = val
|
||||
fetchData()
|
||||
}
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
const queryData = () => {
|
||||
state.queryForm.pageNo = 1
|
||||
fetchData()
|
||||
}
|
||||
/**
|
||||
* 全屏按钮
|
||||
*/
|
||||
const clickFullScreen = () => {
|
||||
state.isFullscreen = !state.isFullscreen
|
||||
state.foldQueryRegion = !state.isFullscreen
|
||||
resizeTableHeight()
|
||||
}
|
||||
const statusFilter = (status) => {
|
||||
const statusMap = {
|
||||
published: 'success',
|
||||
draft: '',
|
||||
deleted: 'danger',
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
/**
|
||||
* 展开/合并查询区字段
|
||||
*/
|
||||
const handleFold = () => {
|
||||
state.foldQueryRegion = !state.foldQueryRegion
|
||||
resizeTableHeight()
|
||||
}
|
||||
/**
|
||||
* 表格字段过滤拖拽设置
|
||||
*/
|
||||
const dragOptions = computed(() => {
|
||||
return {
|
||||
animation: 600,
|
||||
group: 'description',
|
||||
}
|
||||
})
|
||||
/**
|
||||
*表格动态显示字段
|
||||
*/
|
||||
const tableShowDynamicColumns = computed(() => {
|
||||
return state.tableDynamicColumns.filter((item) => state.tableFilterListForSelect.includes(item.label))
|
||||
})
|
||||
/**
|
||||
* 自适应表格高度
|
||||
*/
|
||||
const resizeTableHeight = () => {
|
||||
if (state.foldQueryRegion && !state.isFullscreen) {
|
||||
//如果是查询条件展开
|
||||
state.tableHeight = $baseTableHeight(1) + 22
|
||||
} else if (state.isFullscreen) {
|
||||
//如果是全屏
|
||||
state.tableHeight = $baseTableHeight(0) + 80
|
||||
} else {
|
||||
state.tableHeight = $baseTableHeight(2) + 40
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 选择行
|
||||
* @param val rows
|
||||
*/
|
||||
const setSelectRows = (val) => {
|
||||
state.selectRows = val
|
||||
}
|
||||
/**
|
||||
* 查看详情 1.3版本处理方法
|
||||
* @param row 行数据
|
||||
*/
|
||||
const handleEdit = async (row) => {
|
||||
state.detailsMessage = []
|
||||
state.conversationId = row.conversationId
|
||||
state.conversationName = row.conversationName // 保存会话名称
|
||||
|
||||
try {
|
||||
const res = await conversationDetail(row.conversationId)
|
||||
console.log("res.data", res.data)
|
||||
|
||||
if (res.data && res.data.messages && Array.isArray(res.data.messages)) {
|
||||
// 按时间排序消息
|
||||
const sortedMessages = res.data.messages.sort((a, b) =>
|
||||
new Date(a.replyTime).getTime() - new Date(b.replyTime).getTime()
|
||||
)
|
||||
|
||||
// 转换消息格式
|
||||
state.detailsMessage = sortedMessages.map(item => ({
|
||||
messageId: item.messageId,
|
||||
query: item.query,
|
||||
answer: item.answer,
|
||||
replyTime: item.replyTime
|
||||
}))
|
||||
label: t('vabI18n.HistoryRecords.columns.createTime'),
|
||||
prop: 'createTime',
|
||||
sortable: true,
|
||||
},
|
||||
{
|
||||
label: t('vabI18n.HistoryRecords.columns.updateTime'),
|
||||
prop: 'updateTime',
|
||||
sortable: true,
|
||||
},
|
||||
],
|
||||
detailsMessage: [],
|
||||
historyDetailsRef: null,
|
||||
dialogTableVisible: false,
|
||||
conversationId: '',
|
||||
conversationName: '',
|
||||
})
|
||||
|
||||
/**
|
||||
* 表格获取数据
|
||||
*/
|
||||
const fetchData = async () => {
|
||||
state.listLoading = true
|
||||
//获取查询提问时间
|
||||
if (state.daterange && state.daterange.length === 2) {
|
||||
// 确保时间格式符合后端要求 yyyy-MM-dd HH:mm:ss
|
||||
state.queryForm.startTime = state.daterange[0]
|
||||
state.queryForm.endTime = state.daterange[1]
|
||||
} else {
|
||||
console.error('Unexpected data structure:', res.data)
|
||||
$baseMessage(t('vabI18n.HistoryRecords.messages.invalidData'), 'error', 'vab-hey-message-error')
|
||||
return
|
||||
state.queryForm.startTime = undefined
|
||||
state.queryForm.endTime = undefined
|
||||
}
|
||||
const res = await conversationsPage(state.queryForm)
|
||||
if (res.data) {
|
||||
state.tableDataList = res.data.content
|
||||
state.total = res.data.total
|
||||
state.listLoading = false
|
||||
console.log('state.tableDataList', state.tableDataList)
|
||||
}
|
||||
|
||||
state.dialogTableVisible = true
|
||||
} catch (error) {
|
||||
console.error('Error fetching conversation details:', error)
|
||||
$baseMessage(t('vabI18n.HistoryRecords.messages.fetchDetailFail'), 'error', 'vab-hey-message-error')
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 分页条数
|
||||
* @param val 每页条数
|
||||
*/
|
||||
const handleSizeChange = (val) => {
|
||||
state.queryForm.pageSize = val
|
||||
fetchData()
|
||||
}
|
||||
/**
|
||||
* 页码跳转
|
||||
* @param val 页码
|
||||
*/
|
||||
const handleCurrentChange = (val) => {
|
||||
state.queryForm.pageNo = val
|
||||
fetchData()
|
||||
}
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
const queryData = () => {
|
||||
state.queryForm.pageNo = 1
|
||||
fetchData()
|
||||
}
|
||||
/**
|
||||
* 全屏按钮
|
||||
*/
|
||||
const clickFullScreen = () => {
|
||||
state.isFullscreen = !state.isFullscreen
|
||||
state.foldQueryRegion = !state.isFullscreen
|
||||
resizeTableHeight()
|
||||
}
|
||||
const statusFilter = (status) => {
|
||||
const statusMap = {
|
||||
published: 'success',
|
||||
draft: '',
|
||||
deleted: 'danger',
|
||||
}
|
||||
return statusMap[status]
|
||||
}
|
||||
/**
|
||||
* 展开/合并查询区字段
|
||||
*/
|
||||
const handleFold = () => {
|
||||
state.foldQueryRegion = !state.foldQueryRegion
|
||||
resizeTableHeight()
|
||||
}
|
||||
/**
|
||||
* 表格字段过滤拖拽设置
|
||||
*/
|
||||
const dragOptions = computed(() => {
|
||||
return {
|
||||
animation: 600,
|
||||
group: 'description',
|
||||
}
|
||||
})
|
||||
/**
|
||||
*表格动态显示字段
|
||||
*/
|
||||
const tableShowDynamicColumns = computed(() => {
|
||||
return state.tableDynamicColumns.filter((item) => state.tableFilterListForSelect.includes(item.label))
|
||||
})
|
||||
/**
|
||||
* 自适应表格高度
|
||||
*/
|
||||
const resizeTableHeight = () => {
|
||||
if (state.foldQueryRegion && !state.isFullscreen) {
|
||||
//如果是查询条件展开
|
||||
state.tableHeight = $baseTableHeight(1) + 22
|
||||
} else if (state.isFullscreen) {
|
||||
//如果是全屏
|
||||
state.tableHeight = $baseTableHeight(0) + 80
|
||||
} else {
|
||||
state.tableHeight = $baseTableHeight(2) + 40
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 选择行
|
||||
* @param val rows
|
||||
*/
|
||||
const setSelectRows = (val) => {
|
||||
state.selectRows = val
|
||||
}
|
||||
/**
|
||||
* 查看详情 1.3版本处理方法
|
||||
* @param row 行数据
|
||||
*/
|
||||
const handleEdit = async (row) => {
|
||||
state.detailsMessage = []
|
||||
state.conversationId = row.conversationId
|
||||
state.conversationName = row.conversationName // 保存会话名称
|
||||
|
||||
try {
|
||||
const res = await conversationDetail(row.conversationId)
|
||||
console.log('res.data', res.data)
|
||||
|
||||
if (res.data && res.data.messages && Array.isArray(res.data.messages)) {
|
||||
// 按时间排序消息
|
||||
const sortedMessages = res.data.messages.sort((a, b) => new Date(a.replyTime).getTime() - new Date(b.replyTime).getTime())
|
||||
|
||||
/**
|
||||
* 删除(多行或单行)
|
||||
* @param row 行数据
|
||||
*/
|
||||
const handleDelete = (row) => {
|
||||
if (row) {
|
||||
$baseConfirm(t('vabI18n.HistoryRecords.messages.confirmDelete'), null, async () => {
|
||||
const { msg } = await deleteHistoryMessage(row.conversationId)
|
||||
$baseMessage(msg ? msg : t('vabI18n.HistoryRecords.deleteSuccess'), 'success', 'vab-hey-message-success')
|
||||
await fetchData()
|
||||
})
|
||||
} else {
|
||||
if (state.selectRows.length > 0) {
|
||||
const ids = state.selectRows.map((item) => item.conversationId)
|
||||
$baseConfirm(t('vabI18n.HistoryRecords.messages.confirmDeleteBatch'), null, async () => {
|
||||
const { msg } = await deleteHistoryMessages(ids)
|
||||
// 转换消息格式
|
||||
state.detailsMessage = sortedMessages.map((item) => ({
|
||||
messageId: item.messageId,
|
||||
query: item.query,
|
||||
answer: item.answer,
|
||||
replyTime: item.replyTime,
|
||||
}))
|
||||
} else {
|
||||
console.error('Unexpected data structure:', res.data)
|
||||
$baseMessage(t('vabI18n.HistoryRecords.messages.invalidData'), 'error', 'vab-hey-message-error')
|
||||
return
|
||||
}
|
||||
|
||||
state.dialogTableVisible = true
|
||||
} catch (error) {
|
||||
console.error('Error fetching conversation details:', error)
|
||||
$baseMessage(t('vabI18n.HistoryRecords.messages.fetchDetailFail'), 'error', 'vab-hey-message-error')
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除(多行或单行)
|
||||
* @param row 行数据
|
||||
*/
|
||||
const handleDelete = (row) => {
|
||||
if (row) {
|
||||
$baseConfirm(t('vabI18n.HistoryRecords.confirmDelete'), null, async () => {
|
||||
const { msg } = await deleteHistoryMessage(row.conversationId)
|
||||
$baseMessage(msg ? msg : t('vabI18n.HistoryRecords.deleteSuccess'), 'success', 'vab-hey-message-success')
|
||||
await fetchData()
|
||||
})
|
||||
} else {
|
||||
$baseMessage(t('vabI18n.HistoryRecords.noSelection'), 'error', 'vab-hey-message-error')
|
||||
if (state.selectRows.length > 0) {
|
||||
const ids = state.selectRows.map((item) => item.conversationId)
|
||||
$baseConfirm(t('vabI18n.HistoryRecords.confirmDeleteBatch'), null, async () => {
|
||||
const { msg } = await deleteHistoryMessages(ids)
|
||||
$baseMessage(msg ? msg : t('vabI18n.HistoryRecords.deleteSuccess'), 'success', 'vab-hey-message-success')
|
||||
await fetchData()
|
||||
})
|
||||
} else {
|
||||
$baseMessage(t('vabI18n.HistoryRecords.noSelection'), 'error', 'vab-hey-message-error')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
fetchData()
|
||||
window.addEventListener('resize', resizeTableHeight)
|
||||
})
|
||||
return {
|
||||
...toRefs(state),
|
||||
t,
|
||||
locale,
|
||||
tableFilterListForSelect,
|
||||
handleSizeChange,
|
||||
handleCurrentChange,
|
||||
queryData,
|
||||
statusFilter,
|
||||
handleFold,
|
||||
resizeTableHeight,
|
||||
setSelectRows,
|
||||
handleDelete,
|
||||
fetchData,
|
||||
handleEdit, //查看详情
|
||||
clickFullScreen, //全屏
|
||||
tableShowDynamicColumns: tableShowDynamicColumns, //表格动态显示字段,可以隐藏或调整显示顺序
|
||||
dragOptions, //表格动态显示字段拖拽设置
|
||||
Delete,
|
||||
Plus,
|
||||
Search,
|
||||
}
|
||||
|
||||
},
|
||||
})
|
||||
onMounted(() => {
|
||||
fetchData()
|
||||
window.addEventListener('resize', resizeTableHeight)
|
||||
})
|
||||
return {
|
||||
tableFilterListForSelect,
|
||||
updateTableFilterList,
|
||||
...toRefs(state),
|
||||
t,
|
||||
locale,
|
||||
handleSizeChange,
|
||||
handleCurrentChange,
|
||||
queryData,
|
||||
statusFilter,
|
||||
handleFold,
|
||||
resizeTableHeight,
|
||||
setSelectRows,
|
||||
handleDelete,
|
||||
fetchData,
|
||||
handleEdit, //查看详情
|
||||
clickFullScreen, //全屏
|
||||
tableShowDynamicColumns: tableShowDynamicColumns, //表格动态显示字段,可以隐藏或调整显示顺序
|
||||
dragOptions, //表格动态显示字段拖拽设置
|
||||
Delete,
|
||||
Plus,
|
||||
Search,
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@use 'sass:math';
|
||||
.DailySummary-container {
|
||||
:deep() {
|
||||
i {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.right-panel {
|
||||
.stripe-panel,
|
||||
.border-panel {
|
||||
margin: 0 10px #{math.div($base-margin, 2)} 10px !important;
|
||||
:deep() {
|
||||
.el-checkbox__label {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
@use 'sass:math';
|
||||
.DailySummary-container {
|
||||
:deep() {
|
||||
i {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
[class*='ri'] {
|
||||
font-size: $base-font-size-big;
|
||||
color: var(--el-color-black);
|
||||
.right-panel {
|
||||
.stripe-panel,
|
||||
.border-panel {
|
||||
margin: 0 10px #{math.div($base-margin, 2)} 10px !important;
|
||||
:deep() {
|
||||
.el-checkbox__label {
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
[class*='ri'] {
|
||||
font-size: $base-font-size-big;
|
||||
color: var(--el-color-black);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
html body .custom-table-checkbox {
|
||||
[class*='ri'] {
|
||||
vertical-align: -0.5px !important;
|
||||
cursor: pointer;
|
||||
html body .custom-table-checkbox {
|
||||
[class*='ri'] {
|
||||
vertical-align: -0.5px !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
.el-checkbox {
|
||||
margin: 5px 0 5px 8px;
|
||||
}
|
||||
}
|
||||
.el-checkbox {
|
||||
margin: 5px 0 5px 8px;
|
||||
.custom-table-radio {
|
||||
width: 240px !important;
|
||||
}
|
||||
}
|
||||
.custom-table-radio {
|
||||
width: 240px !important;
|
||||
}
|
||||
.rounded-devlog {
|
||||
border-radius: 8px; /* 调整圆角大小 */
|
||||
overflow: hidden; /* 确保内部内容也被圆角裁剪 */
|
||||
width: 46%;
|
||||
}
|
||||
</style>
|
||||
.rounded-devlog {
|
||||
border-radius: 8px; /* 调整圆角大小 */
|
||||
overflow: hidden; /* 确保内部内容也被圆角裁剪 */
|
||||
width: 46%;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -156,21 +156,21 @@
|
|||
<!-- 上传文件对话框 -->
|
||||
<el-dialog v-model="uploadDialogVisible" :title="t('vabI18n.knowledge.document.buttons.upload')" width="600px" class="upload-dialog">
|
||||
<el-form :model="uploadForm" label-width="120px" class="upload-form">
|
||||
<el-form-item :label="t('vabI18n.knowledge.document.uploadDialog.indexingTechnique')">
|
||||
<el-form-item :label="t('vabI18n.knowledge.document.uploadDialog.indexingTechnique')" label-width="auto">
|
||||
<el-radio-group v-model="uploadForm.indexingTechnique">
|
||||
<el-radio value="high_quality">{{t('vabI18n.knowledge.document.uploadDialog.indexingOptions.highQuality')}}</el-radio>
|
||||
<el-radio value="economy">{{t('vabI18n.knowledge.document.uploadDialog.indexingOptions.economy')}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('vabI18n.knowledge.document.uploadDialog.preProcessingRules')">
|
||||
<el-form-item :label="t('vabI18n.knowledge.document.uploadDialog.preProcessingRules')" label-width="auto">
|
||||
<el-checkbox-group v-model="uploadForm.preProcessingRules">
|
||||
<el-checkbox value="remove_extra_spaces">{{t('vabI18n.knowledge.document.uploadDialog.ruleOptions.removeSpaces')}}</el-checkbox>
|
||||
<el-checkbox value="remove_urls_emails">{{t('vabI18n.knowledge.document.uploadDialog.ruleOptions.removeUrls')}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item :label="t('vabI18n.knowledge.document.uploadDialog.segmentation')">
|
||||
<el-form-item :label="t('vabI18n.knowledge.document.uploadDialog.segmentation')" label-width="auto">
|
||||
<div class="segment-rule">
|
||||
<el-input
|
||||
v-model="uploadForm.segmentSeparator"
|
||||
|
|
|
@ -12,10 +12,10 @@ date:2024-04-02
|
|||
@close="handleClose"
|
||||
>
|
||||
<el-form ref="formRef" :model="form" label-width="100px">
|
||||
<el-form-item label="用户">
|
||||
<el-form-item :label="$t('vabI18n.KnowledgeManagement.bindDataset.user')">
|
||||
<span>{{ currentUser?.dispName }} ({{ currentUser?.name }})</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="已绑知识库">
|
||||
<el-form-item :label="$t('vabI18n.KnowledgeManagement.bindDataset.boundDatasets')">
|
||||
<div class="dataset-tags">
|
||||
<el-tag
|
||||
v-for="dataset in currentUser?.datasets"
|
||||
|
@ -37,12 +37,12 @@ date:2024-04-02
|
|||
</el-tag>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="添加知识库">
|
||||
<el-form-item :label="$t('vabI18n.KnowledgeManagement.bindDataset.addDatasets')">
|
||||
<el-select
|
||||
v-model="form.selectedDatasets"
|
||||
multiple
|
||||
filterable
|
||||
placeholder="请选择要绑定的知识库"
|
||||
:placeholder="$t('vabI18n.KnowledgeManagement.bindDataset.selectDatasets')"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
|
@ -69,7 +69,9 @@ date:2024-04-02
|
|||
import { ref, reactive, computed, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { getAllDatasets, bindDatasets, unbindDataset } from '@/api/dataset'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t, locale } = useI18n()
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
|
@ -108,7 +110,7 @@ const getAvailableDatasets = async () => {
|
|||
availableDatasets.value = data.filter(dataset => !boundDatasetIds.includes(dataset.id))
|
||||
console.log("可绑定的知识库", availableDatasets.value)
|
||||
} catch (error) {
|
||||
ElMessage.error('获取知识库列表失败')
|
||||
ElMessage.error(t('vabI18n.KnowledgeManagement.bindDataset.fetchFail'))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,16 +124,16 @@ const handleRemoveDataset = async (dataset) => {
|
|||
}
|
||||
const res = await unbindDataset(params)
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('解绑成功')
|
||||
ElMessage.success(t('vabI18n.KnowledgeManagement.bindDataset.unbindSuccess'))
|
||||
emit('success')
|
||||
// 重新获取可用知识库列表
|
||||
getAvailableDatasets()
|
||||
} else {
|
||||
ElMessage.error(res.msg || '解绑失败')
|
||||
ElMessage.error(res.msg || t('vabI18n.KnowledgeManagement.bindDataset.unbindFail'))
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('解绑失败:', error)
|
||||
ElMessage.error('解绑失败')
|
||||
ElMessage.error(t('vabI18n.KnowledgeManagement.bindDataset.unbindFail'))
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
@ -140,7 +142,7 @@ const handleRemoveDataset = async (dataset) => {
|
|||
// 确认绑定
|
||||
const handleConfirm = async () => {
|
||||
if (!form.selectedDatasets.length) {
|
||||
ElMessage.warning('请选择要绑定的知识库')
|
||||
ElMessage.warning(t('vabI18n.KnowledgeManagement.bindDataset.pleaseSelect'))
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -153,15 +155,15 @@ const handleConfirm = async () => {
|
|||
console.log('绑定参数:', params)
|
||||
const res = await bindDatasets(params)
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('绑定成功')
|
||||
ElMessage.success(t('vabI18n.KnowledgeManagement.bindDataset.bindSuccess'))
|
||||
emit('success')
|
||||
handleClose()
|
||||
} else {
|
||||
ElMessage.error(res.msg || '绑定失败')
|
||||
ElMessage.error(res.msg || t('vabI18n.KnowledgeManagement.bindDataset.bindFail'))
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('绑定失败:', error)
|
||||
ElMessage.error('绑定失败')
|
||||
ElMessage.error(t('vabI18n.KnowledgeManagement.bindDataset.bindFail'))
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
@ -197,6 +199,10 @@ watch(() => props.currentUser, () => {
|
|||
gap: 8px;
|
||||
}
|
||||
|
||||
.el-form-item {
|
||||
margin-bottom: 20px; /* 增加表单项之间的间距 */
|
||||
}
|
||||
|
||||
.dataset-tag {
|
||||
margin: 2px;
|
||||
border-radius: 4px;
|
||||
|
@ -213,4 +219,19 @@ watch(() => props.currentUser, () => {
|
|||
.dialog-footer {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.el-dialog__body {
|
||||
display: flex;
|
||||
flex-direction: column; /* 确保内容垂直排列 */
|
||||
}
|
||||
|
||||
.el-form {
|
||||
display: flex;
|
||||
flex-direction: column; /* 确保表单元素垂直排列 */
|
||||
}
|
||||
|
||||
.el-select {
|
||||
margin-top: 10px; /* 增加选择框顶部的间距,避免与上面的元素重叠 */
|
||||
}
|
||||
|
||||
</style>
|
|
@ -11,15 +11,15 @@ date : 2025-4-2 13:08:41
|
|||
<vab-query-form-left-panel :span="22">
|
||||
<el-form inline label-width="60px" :model="queryForm" @submit.prevent>
|
||||
<el-form-item>
|
||||
<el-input v-model="queryForm.nameFilter" placeholder="注册名/姓名" clearable style="width: 150px" />
|
||||
<el-input v-model="queryForm.nameFilter" :placeholder="$t('vabI18n.KnowledgeManagement.query.nameFilter')" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label=" " :label-width="labelWidth">
|
||||
<el-select v-model="queryForm.deptFilter" style="width: 350px" multiple filterable default-first-option placeholder="请选择组织">
|
||||
<el-select v-model="queryForm.deptFilter" style="width: 350px" multiple filterable default-first-option :placeholder="$t('vabI18n.KnowledgeManagement.query.deptFilter')">
|
||||
<el-option v-for="dept in filters.selectableDepts" :key="dept.name" :label="dept.fullDispName" :value="dept.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label=" " :label-width="labelWidth">
|
||||
<el-select v-model="queryForm.roleFilter" style="width: 200px" multiple filterable default-first-option placeholder="请选择角色">
|
||||
<el-select v-model="queryForm.roleFilter" style="width: 200px" multiple filterable default-first-option :placeholder="$t('vabI18n.KnowledgeManagement.query.roleFilter')">
|
||||
<el-option v-for="role in filters.selectableRoles" :key="role.name" :label="role.dispName" :value="role.id">
|
||||
<span>{{ role.dispName }}</span>
|
||||
<span style="float: right; font-weight: bold">{{ role.name }}</span>
|
||||
|
@ -27,8 +27,8 @@ date : 2025-4-2 13:08:41
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button :icon="Search" native-type="submit" type="primary" @click="queryData">查询</el-button>
|
||||
<!-- <el-button v-permissions="{ verbName: 'add', resourceName: $options.name }" :icon="Plus" type="primary" @click="handleAdd">添加</el-button>
|
||||
<el-button :icon="Search" native-type="submit" type="primary" @click="queryData">{{t('vabI18n.KnowledgeManagement.query.search')}}</el-button>
|
||||
<!-- <el-button v-permissions="{ verbName: 'add', resourceName: $options.name }" :icon="Plus" type="primary" @click="handleAdd">{{t('vabI18n.KnowledgeManagement.query.add')}}</el-button>
|
||||
<el-button v-permissions="{ verbName: 'del', resourceName: $options.name }" :icon="Delete" type="danger" @click="handleDelete($event)">
|
||||
删除
|
||||
</el-button> -->
|
||||
|
@ -41,7 +41,7 @@ date : 2025-4-2 13:08:41
|
|||
<!-- 表格字段过滤与排序 -->
|
||||
<el-popover popper-class="custom-table-checkbox" trigger="hover">
|
||||
<template #reference>
|
||||
<vab-icon icon="filter-line" title="表格字段过滤与排序" style="margin-right: 12px; font-size: 18px" />
|
||||
<vab-icon icon="filter-line" :title="$t('vabI18n.KnowledgeManagement.filter.tableFields')" style="margin-right: 12px; font-size: 18px" />
|
||||
</template>
|
||||
<el-checkbox-group v-model="tableFilterListForSelect">
|
||||
<vab-draggable v-bind="dragOptions" item-key="{ element }" :list="tableDynamicColumns">
|
||||
|
@ -60,7 +60,7 @@ date : 2025-4-2 13:08:41
|
|||
</vab-query-form>
|
||||
<el-table ref="tableRef" v-loading="listLoading" border :data="tableDataList" :height="tableHeight" @selection-change="setSelectRows">
|
||||
<el-table-column align="center" show-overflow-tooltip type="selection" width="55" />
|
||||
<el-table-column align="center" label="序号" show-overflow-tooltip width="55">
|
||||
<el-table-column align="center" :label="$t('vabI18n.KnowledgeManagement.table.columns.index')" show-overflow-tooltip width="60">
|
||||
<template #default="{ $index }">
|
||||
{{ (queryForm.pageNo - 1) * queryForm.pageSize + $index + 1 }}
|
||||
</template>
|
||||
|
@ -89,11 +89,7 @@ date : 2025-4-2 13:08:41
|
|||
</el-tag>
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'datasets'">
|
||||
<el-tooltip
|
||||
v-if="row.datasets && row.datasets.length > 5"
|
||||
placement="top"
|
||||
:content="row.datasets.map(d => d.datasetName).join('、')"
|
||||
>
|
||||
<el-tooltip v-if="row.datasets && row.datasets.length > 5" placement="top" :content="row.datasets.map((d) => d.datasetName).join('、')">
|
||||
<div class="dataset-tags-wrapper">
|
||||
<el-tag
|
||||
v-for="(dataset, index) in row.datasets.slice(0, 5)"
|
||||
|
@ -109,19 +105,8 @@ date : 2025-4-2 13:08:41
|
|||
</div>
|
||||
</el-tooltip>
|
||||
<div v-else class="dataset-tags-wrapper">
|
||||
<el-tag
|
||||
v-for="dataset in row.datasets"
|
||||
:key="dataset.datasetId"
|
||||
size="small"
|
||||
class="dataset-tag"
|
||||
effect="plain"
|
||||
type="warning"
|
||||
>
|
||||
<el-tooltip
|
||||
v-if="dataset.datasetName.length > 7"
|
||||
placement="top"
|
||||
:content="dataset.datasetName"
|
||||
>
|
||||
<el-tag v-for="dataset in row.datasets" :key="dataset.datasetId" size="small" class="dataset-tag" effect="plain" type="warning">
|
||||
<el-tooltip v-if="dataset.datasetName.length > 7" placement="top" :content="dataset.datasetName">
|
||||
<span>{{ dataset.datasetName.slice(0, 7) + '...' }}</span>
|
||||
</el-tooltip>
|
||||
<span v-else>{{ dataset.datasetName }}</span>
|
||||
|
@ -130,8 +115,6 @@ date : 2025-4-2 13:08:41
|
|||
</template>
|
||||
<span v-else>{{ row[item.prop] }}</span>
|
||||
</template>
|
||||
|
||||
|
||||
</el-table-column>
|
||||
<!-- 附加属性列 -->
|
||||
<el-table-column v-for="(item, index) in auxMeta" :key="index" prop="item.property" :label="item.label">
|
||||
|
@ -139,15 +122,15 @@ date : 2025-4-2 13:08:41
|
|||
{{ auxTrans(row, item.property) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" fixed="right" label="操作" show-overflow-tooltip width="350">
|
||||
<el-table-column align="center" fixed="right" :label="$t('vabI18n.KnowledgeManagement.table.operation')" show-overflow-tooltip width="350">
|
||||
<template #default="{ row }">
|
||||
<!-- <el-button type="primary" plain @click="handleEdit(row)">修改</el-button>
|
||||
<el-button type="danger" plain @click="handleDelete(row)">删除</el-button> -->
|
||||
<el-button type="success" plain @click="handleBindDataset(row)">绑定知识库</el-button>
|
||||
<el-button type="success" plain @click="handleBindDataset(row)">{{t('vabI18n.KnowledgeManagement.table.bindDataset')}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #empty>
|
||||
<el-empty class="vab-data-empty" description="暂无数据" />
|
||||
<el-empty class="vab-data-empty" :description="$t('vabI18n.KnowledgeManagement.table.noData')" />
|
||||
</template>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
|
@ -160,21 +143,20 @@ date : 2025-4-2 13:08:41
|
|||
@size-change="handleSizeChange"
|
||||
/>
|
||||
<add ref="addRef" @fetch-data="getUsers" />
|
||||
<dataset-bind
|
||||
v-model="showDatasetBindDialog"
|
||||
:current-user="currentUser"
|
||||
@success="handleDatasetBindSuccess"
|
||||
/>
|
||||
<dataset-bind v-model="showDatasetBindDialog" :current-user="currentUser" @success="handleDatasetBindSuccess" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import userMeta, { getUserAuxMeta} from '@/api/userManagement'
|
||||
import userMeta, { getUserAuxMeta } from '@/api/userManagement'
|
||||
import { getUsersAndDatasets } from '@/api/dataset'
|
||||
import { getDepartmentList } from '@/api/departmentManagement'
|
||||
import { getRoleList } from '@/api/roleManagement'
|
||||
import add from './components/userAdd'
|
||||
import datasetBind from './components/datasetBind'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t, locale } = useI18n()
|
||||
const router = useRouter()
|
||||
const $baseConfirm = inject('$baseConfirm')
|
||||
const $baseMessage = inject('$baseMessage')
|
||||
|
@ -186,11 +168,11 @@ date : 2025-4-2 13:08:41
|
|||
|
||||
const tableFilterListForSelect = ref([])
|
||||
const tableDynamicColumns = ref([
|
||||
{ label: '注册名', prop: 'name', width: 120, sortable: true },
|
||||
{ label: '姓名', prop: 'dispName', width: 150 },
|
||||
{ label: '组织', prop: 'dept', width: 250 },
|
||||
{ label: '角色', prop: 'roles' },
|
||||
{ label: '知识库', prop: 'datasets', width: 300 },
|
||||
{ label: t('vabI18n.KnowledgeManagement.table.columns.name'), prop: 'name', width: 120, sortable: true },
|
||||
{ label: t('vabI18n.KnowledgeManagement.table.columns.displayName'), prop: 'dispName', width: 150 },
|
||||
{ label: t('vabI18n.KnowledgeManagement.table.columns.department'), prop: 'dept', width: 250 },
|
||||
{ label: t('vabI18n.KnowledgeManagement.table.columns.roles'), prop: 'roles' },
|
||||
{ label: t('vabI18n.KnowledgeManagement.table.columns.datasets'), prop: 'datasets', width: 300 },
|
||||
])
|
||||
const auxMeta = [] //附加信息列
|
||||
const tableHeight = ref(0) //表格高度
|
||||
|
@ -233,12 +215,12 @@ date : 2025-4-2 13:08:41
|
|||
return r.id != 1
|
||||
})
|
||||
if (target === 'roles') {
|
||||
ElMessage.success('获取角色列表成功')
|
||||
ElMessage.success(t('vabI18n.KnowledgeManagement.message.getRolesSuccess'))
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
if (target === 'roles') {
|
||||
ElMessage.error('获取角色列表失败')
|
||||
ElMessage.error(t('vabI18n.KnowledgeManagement.message.getRolesFailed'))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -256,7 +238,7 @@ date : 2025-4-2 13:08:41
|
|||
},
|
||||
() => {
|
||||
ElMessage({
|
||||
message: '获取组织失败',
|
||||
message: t('vabI18n.KnowledgeManagement.message.getDeptsFailed'),
|
||||
type: 'error',
|
||||
})
|
||||
}
|
||||
|
@ -272,6 +254,7 @@ date : 2025-4-2 13:08:41
|
|||
// scope: this.filters.scope,
|
||||
// }
|
||||
listLoading.value = true
|
||||
// 构建完整的查询参数
|
||||
// 获取附加信息列 {
|
||||
getUserAuxMetaList()
|
||||
// } 20220124 yq
|
||||
|
@ -325,7 +308,6 @@ date : 2025-4-2 13:08:41
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 选择行
|
||||
* @param val rows
|
||||
|
@ -356,7 +338,7 @@ date : 2025-4-2 13:08:41
|
|||
const handleCurrentChange = (val) => {
|
||||
queryForm.pageNo = val
|
||||
getUsers()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 表格字段过滤拖拽设置
|
||||
|
@ -419,7 +401,7 @@ date : 2025-4-2 13:08:41
|
|||
const showDatasetBindDialog = ref(false)
|
||||
const handleBindDataset = (row) => {
|
||||
currentUser.value = row
|
||||
console.log("currentUser",currentUser.value)
|
||||
console.log('currentUser', currentUser.value)
|
||||
showDatasetBindDialog.value = true
|
||||
}
|
||||
|
||||
|
@ -430,7 +412,7 @@ date : 2025-4-2 13:08:41
|
|||
await getUsers()
|
||||
// 同步更新当前用户数据
|
||||
if (currentUser.value) {
|
||||
const updatedUser = tableDataList.value.find(user => user.id === currentUser.value.id)
|
||||
const updatedUser = tableDataList.value.find((user) => user.id === currentUser.value.id)
|
||||
if (updatedUser) {
|
||||
currentUser.value = updatedUser
|
||||
}
|
||||
|
@ -444,21 +426,21 @@ date : 2025-4-2 13:08:41
|
|||
i {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
||||
.dataset-tags-wrapper {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
|
||||
|
||||
.dataset-tag {
|
||||
margin: 2px;
|
||||
border-radius: 4px;
|
||||
background-color: #FFF7E6;
|
||||
border-color: #FFD591;
|
||||
color: #D46B08;
|
||||
|
||||
background-color: #fff7e6;
|
||||
border-color: #ffd591;
|
||||
color: #d46b08;
|
||||
|
||||
&:hover {
|
||||
background-color: #FFE7BA;
|
||||
background-color: #ffe7ba;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,8 @@ date: 2025-01-09
|
|||
<el-row :gutter="20">
|
||||
<el-col :lg="4" :md="8" :sm="24" :xl="4" :xs="24">
|
||||
<vab-card shadow="hover">
|
||||
<el-button class="tree-button" :icon="Plus" type="primary" @click="handleEdit('addDic')">添加字典分类</el-button>
|
||||
<el-input v-model="filterText" placeholder="请输入字典名称" />
|
||||
<el-button class="tree-button" :icon="Plus" type="primary" @click="handleEdit('addDic')">{{t('vabI18n.DictionaryManagement.addDic')}}</el-button>
|
||||
<el-input v-model="filterText" :placeholder="$t('vabI18n.DictionaryManagement.searchPlaceholder')" />
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:data="dicData"
|
||||
|
@ -22,7 +22,7 @@ date: 2025-01-09
|
|||
@node-click="handleNodeClick"
|
||||
>
|
||||
<template #default="{ node }">
|
||||
<span title="括号内数值为ID值">{{ node.label }}【{{ node.key }}】</span>
|
||||
<span :title="$t('vabI18n.DictionaryManagement.numberdescription')">{{ node.label }}【{{ node.key }}】</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</vab-card>
|
||||
|
@ -31,34 +31,34 @@ date: 2025-01-09
|
|||
<vab-card shadow="hover">
|
||||
<vab-query-form>
|
||||
<vab-query-form-top-panel :span="12">
|
||||
<el-button :icon="Plus" type="primary" @click="handleEdit('addDicDetail')">添加</el-button>
|
||||
<el-button :icon="Plus" type="primary" @click="handleEdit('addDicDetail')">{{t('vabI18n.DictionaryManagement.add')}}</el-button>
|
||||
</vab-query-form-top-panel>
|
||||
</vab-query-form>
|
||||
<el-table v-loading="listLoading" border :data="dicDetailData">
|
||||
<el-table-column align="center" label="序号" show-overflow-tooltip width="55">
|
||||
<el-table-column align="center" :label="t('vabI18n.DictionaryManagement.index')" show-overflow-tooltip width="55">
|
||||
<template #default="{ $index }">
|
||||
{{ $index + 1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="字典分类" prop="parentName" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="字典键" prop="dicKey" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="字典值" prop="dicValue" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="备注" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column align="center" label="是否可编辑" prop="edit" show-overflow-tooltip width="120">
|
||||
<el-table-column align="center" :label="$t(vabI18n.DictionaryManagement.dictionaryCategory)" prop="parentName" show-overflow-tooltip />
|
||||
<el-table-column align="center" :label="$t(vabI18n.DictionaryManagement.dictionaryKey)" prop="dicKey" show-overflow-tooltip />
|
||||
<el-table-column align="center" :label="$t(vabI18n.DictionaryManagement.dictionaryValue)" prop="dicValue" show-overflow-tooltip />
|
||||
<el-table-column align="center" :label="$t(vabI18n.DictionaryManagement.remark)" prop="remark" show-overflow-tooltip />
|
||||
<el-table-column align="center" :label="$t(vabI18n.DictionaryManagement.editable)" prop="edit" show-overflow-tooltip width="120">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="row.edit === 1 ? 'success' : 'danger'" size="small">
|
||||
{{ row.edit === 1 ? '允许' : '不允许' }}
|
||||
{{ row.edit === 1 ? t('vabI18n.DictionaryManagement.allow') : t('vabI18n.DictionaryManagement.notAllow') }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" show-overflow-tooltip width="200">
|
||||
<el-table-column align="center" :label="$t(vabI18n.DictionaryManagement.operation)" show-overflow-tooltip width="200">
|
||||
<template #default="{ row }">
|
||||
<el-button plain type="primary" @click="handleEdit('edit', row)">修改</el-button>
|
||||
<el-button plain type="danger" @click="handleDelete(row)">删除</el-button>
|
||||
<el-button plain type="primary" @click="handleEdit('edit', row)">{{t('vabI18n.DictionaryManagement.edit')}}</el-button>
|
||||
<el-button plain type="danger" @click="handleDelete(row)">{{t('vabI18n.DictionaryManagement.delete')}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #empty>
|
||||
<el-empty class="vab-data-empty" description="暂无数据" />
|
||||
<el-empty class="vab-data-empty" :description="$t('vabI18n.DictionaryManagement.noData')" />
|
||||
</template>
|
||||
</el-table>
|
||||
</vab-card>
|
||||
|
@ -67,7 +67,7 @@ date: 2025-01-09
|
|||
|
||||
<!-- 新增/编辑对话框 -->
|
||||
<el-dialog
|
||||
:title="dialogForm.id ? '编辑字典' : '新增字典'"
|
||||
:title="dialogForm.id ? t('vabI18n.DictionaryManagement.dialogTitleEdit') : t('vabI18n.DictionaryManagement.dialogTitleAdd')"
|
||||
v-model="dialogVisible"
|
||||
width="600px"
|
||||
:before-close="handleDialogClose"
|
||||
|
@ -78,43 +78,43 @@ date: 2025-01-09
|
|||
:rules="dialogRules"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="字典键" prop="dicKey">
|
||||
<el-input v-model="dialogForm.dicKey" placeholder="请输入字典键" />
|
||||
<el-form-item :label="$t('vabI18n.DictionaryManagement.dictionaryKey')" prop="dicKey">
|
||||
<el-input v-model="dialogForm.dicKey" :placeholder="$t('vabI18n.DictionaryManagement.dictionaryKey')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="字典值" prop="dicValue">
|
||||
<el-input v-model="dialogForm.dicValue" placeholder="请输入字典值" />
|
||||
<el-form-item :label="$t('vabI18n.DictionaryManagement.dictionaryValue')" prop="dicValue">
|
||||
<el-input v-model="dialogForm.dicValue" :placeholder="$t('vabI18n.DictionaryManagement.dictionaryValue')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="父级字典" prop="parentId" v-if="dialogType !== 'addDic'">
|
||||
<el-form-item :label="$t('vabI18n.DictionaryManagement.parentDictionary')" prop="parentId" v-if="dialogType !== 'addDic'">
|
||||
<el-tree-select
|
||||
v-model="dialogForm.parentId"
|
||||
:data="dicTreeData"
|
||||
:props="{ label: 'dicValue', value: 'id', children: 'children' }"
|
||||
placeholder="请选择父级字典(留空表示根节点)"
|
||||
:placeholder="$t('vabI18n.DictionaryManagement.parentDictionary')"
|
||||
clearable
|
||||
check-strictly
|
||||
:render-after-expand="false"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-form-item :label="$t('vabI18n.DictionaryManagement.remark')">
|
||||
<el-input
|
||||
v-model="dialogForm.remark"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请输入备注"
|
||||
:placeholder="$t('vabI18n.DictionaryManagement.pleaseEnterRemark')"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否可编辑" prop="edit">
|
||||
<el-form-item :label="$t('vabI18n.DictionaryManagement.editable')" prop="edit">
|
||||
<el-radio-group v-model="dialogForm.edit">
|
||||
<el-radio :value="1">允许</el-radio>
|
||||
<el-radio :value="0">不允许</el-radio>
|
||||
<el-radio :value="1">{{$t('vabI18n.DictionaryManagement.allow')}}</el-radio>
|
||||
<el-radio :value="0">{{$t('vabI18n.DictionaryManagement.notAllow')}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="handleDialogConfirm" :loading="saveLoading">确定</el-button>
|
||||
<el-button @click="dialogVisible = false">{{$t('vabI18n.DictionaryManagement.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="handleDialogConfirm" :loading="saveLoading">{{$t('vabI18n.DictionaryManagement.confirm')}}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
@ -131,7 +131,9 @@ import {
|
|||
deleteDic,
|
||||
getDicTree
|
||||
} from '@/api/dic'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t, locale } = useI18n()
|
||||
// 注入的全局方法
|
||||
const $baseConfirm = inject('$baseConfirm')
|
||||
const $baseMessage = inject('$baseMessage')
|
||||
|
@ -176,15 +178,15 @@ const dialogForm = reactive({
|
|||
// 表单验证规则
|
||||
const dialogRules = {
|
||||
dicKey: [
|
||||
{ required: true, message: '请输入字典键', trigger: 'blur' },
|
||||
{ max: 50, message: '字典键长度不能超过50个字符', trigger: 'blur' }
|
||||
{ required: true, message: t('vabI18n.DictionaryManagement.dictionaryKeyError'), trigger: 'blur' },
|
||||
{ max: 50, message: t('vabI18n.DictionaryManagement.diclengtherror'), trigger: 'blur' }
|
||||
],
|
||||
dicValue: [
|
||||
{ required: true, message: '请输入字典值', trigger: 'blur' },
|
||||
{ max: 50, message: '字典值长度不能超过50个字符', trigger: 'blur' }
|
||||
{ required: true, message: t('vabI18n.DictionaryManagement.dictionaryValueError'), trigger: 'blur' },
|
||||
{ max: 50, message: t('vabI18n.DictionaryManagement.dicvalueerror'), trigger: 'blur' }
|
||||
],
|
||||
edit: [
|
||||
{ required: true, message: '请选择是否可编辑', trigger: 'change' }
|
||||
{ required: true, message: t('vabI18n.DictionaryManagement.selecteditable'), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -215,7 +217,7 @@ const fetchData = async () => {
|
|||
{
|
||||
id: 'root',
|
||||
key: 'root',
|
||||
label: '全部字典',
|
||||
label: t('vabI18n.DictionaryManagement.alldic'),
|
||||
children: [],
|
||||
},
|
||||
]
|
||||
|
@ -245,7 +247,7 @@ const fetchData = async () => {
|
|||
handleNodeClick({ id: parentId.value, label: parentName.value })
|
||||
}
|
||||
} catch (error) {
|
||||
$baseMessage('获取字典数据失败', 'error')
|
||||
$baseMessage(t('vabI18n.DictionaryManagement.getdicfail'), 'error')
|
||||
listLoading.value = false
|
||||
}
|
||||
}
|
||||
|
@ -271,7 +273,7 @@ const handleNodeClick = (data) => {
|
|||
dicDetailAllData.value.forEach((item) => {
|
||||
dicDetailData.value.push({
|
||||
id: item.id,
|
||||
parentName: item.parentId === 0 || item.parentId === null ? '根节点' : getParentName(item.parentId),
|
||||
parentName: item.parentId === 0 || item.parentId === null ? t('vabI18n.DictionaryManagement.rootNode') : getParentName(item.parentId),
|
||||
parentId: item.parentId,
|
||||
dicKey: item.dicKey,
|
||||
dicValue: item.dicValue,
|
||||
|
@ -300,7 +302,7 @@ const handleNodeClick = (data) => {
|
|||
// 获取父级名称
|
||||
const getParentName = (parentId) => {
|
||||
const parent = dicDetailAllData.value.find(item => item.id === parentId)
|
||||
return parent ? parent.dicValue : '根节点'
|
||||
return parent ? parent.dicValue : t('vabI18n.DictionaryManagement.rootNode')
|
||||
}
|
||||
|
||||
// 处理编辑操作
|
||||
|
@ -309,7 +311,7 @@ const handleEdit = async (type, data) => {
|
|||
|
||||
if (type === 'addDicDetail') {
|
||||
if (parentId.value === '' || parentId.value === undefined || parentId.value === 'root') {
|
||||
$baseMessage('请先选择字典分类', 'warning')
|
||||
$baseMessage(t('vabI18n.DictionaryManagement.selectDicCate'), 'warning')
|
||||
return
|
||||
}
|
||||
resetDialogForm()
|
||||
|
@ -330,13 +332,13 @@ const handleEdit = async (type, data) => {
|
|||
|
||||
// 删除操作
|
||||
const handleDelete = async (row) => {
|
||||
$baseConfirm('确定要删除此字典项吗?', null, async () => {
|
||||
$baseConfirm(t('vabI18n.DictionaryManagement.confirmDelete'), null, async () => {
|
||||
try {
|
||||
await deleteDic(row.id)
|
||||
$baseMessage('删除成功', 'success')
|
||||
$baseMessage(t('vabI18n.DictionaryManagement.deleteSuccess'), 'success')
|
||||
await fetchData()
|
||||
} catch (error) {
|
||||
$baseMessage('删除失败', 'error')
|
||||
$baseMessage(t('vabI18n.DictionaryManagement.deleteFail'), 'error')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -396,7 +398,7 @@ const handleDialogConfirm = async () => {
|
|||
await fetchData()
|
||||
} catch (error) {
|
||||
if (error !== false) { // 不是表单验证错误
|
||||
$baseMessage(dialogForm.id ? '更新失败' : '添加失败', 'error')
|
||||
$baseMessage(dialogForm.id ? t('vabI18n.DictionaryManagement.updateFail') : t('vabI18n.DictionaryManagement.addFail'), 'error')
|
||||
}
|
||||
} finally {
|
||||
saveLoading.value = false
|
||||
|
|
|
@ -4,19 +4,20 @@
|
|||
<vab-query-form>
|
||||
<vab-query-form-left-panel :span="22">
|
||||
<el-form inline label-width="80px" :model="queryForm" @submit.prevent>
|
||||
<el-form-item label="密钥名称">
|
||||
<el-input v-model="queryForm.name" placeholder="请输入密钥名称" clearable style="width: 200px" />
|
||||
<el-form-item :label="$t('vabI18n.ApiKeyManagement.dictionaryKey')" label-width="auto">
|
||||
<el-input v-model="queryForm.name" :placeholder="$t('vabI18n.ApiKeyManagement.dictionaryKey')" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人">
|
||||
<el-input v-model="queryForm.createdBy" placeholder="请输入创建人" clearable style="width: 150px" />
|
||||
<el-form-item :label="$t('vabI18n.ApiKeyManagement.createBy')" label-width="auto">
|
||||
<el-input v-model="queryForm.createdBy" :placeholder="$t('vabI18n.ApiKeyManagement.placeCreateby')" clearable style="width: 150px" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button :icon="Search" native-type="submit" type="primary" @click="queryData">查询</el-button>
|
||||
<el-button :icon="Plus" type="primary" @click="handleAdd">新增</el-button>
|
||||
<el-button :icon="Delete" type="danger" @click="handleBatchDelete">批量删除</el-button>
|
||||
<el-button :icon="Refresh" type="warning" @click="handleRefreshCache">刷新缓存</el-button>
|
||||
<el-button :icon="Search" native-type="submit" type="primary" @click="queryData">{{t('vabI18n.ApiKeyManagement.search')}}</el-button>
|
||||
<el-button :icon="Plus" type="primary" @click="handleAdd">{{t('vabI18n.ApiKeyManagement.add')}}</el-button>
|
||||
<el-button :icon="Delete" type="danger" @click="handleBatchDelete">{{t('vabI18n.ApiKeyManagement.batchDelete')}}</el-button>
|
||||
<el-button :icon="Refresh" type="warning" @click="handleRefreshCache">{{t('vabI18n.ApiKeyManagement.refreshCache')}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</vab-query-form-left-panel>
|
||||
<vab-query-form-right-panel :span="2">
|
||||
<!-- 全屏 -->
|
||||
|
@ -38,13 +39,13 @@
|
|||
@selection-change="setSelectRows"
|
||||
>
|
||||
<el-table-column align="center" show-overflow-tooltip type="selection" width="55" />
|
||||
<el-table-column align="center" label="序号" show-overflow-tooltip width="80">
|
||||
<el-table-column align="center" :label="$t('vabI18n.ApiKeyManagement.index')" show-overflow-tooltip width="80">
|
||||
<template #default="{ $index }">
|
||||
{{ (queryForm.pageNo - 1) * queryForm.pageSize + $index + 1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="密钥名称" prop="name" show-overflow-tooltip width="200" />
|
||||
<el-table-column align="center" label="密钥值" prop="value" show-overflow-tooltip min-width="300">
|
||||
<el-table-column align="center" :label="$t('vabI18n.ApiKeyManagement.dictionaryKey')" prop="name" show-overflow-tooltip width="160" />
|
||||
<el-table-column align="center" :label="$t('vabI18n.ApiKeyManagement.dictionaryValue')" prop="value" show-overflow-tooltip min-width="340">
|
||||
<template #default="{ row }">
|
||||
<span v-if="!row.showValue">{{ maskValue(row.value) }}</span>
|
||||
<span v-else>{{ row.value }}</span>
|
||||
|
@ -54,30 +55,30 @@
|
|||
style="margin-left: 10px"
|
||||
@click="toggleShowValue(row)"
|
||||
>
|
||||
{{ row.showValue ? '隐藏' : '显示' }}
|
||||
{{ row.showValue ? t('vabI18n.ApiKeyManagement.hide') : t('vabI18n.ApiKeyManagement.show') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="copyToClipboard(row.value)"
|
||||
>
|
||||
复制
|
||||
{{ t('vabI18n.ApiKeyManagement.copy') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="备注" prop="remark" show-overflow-tooltip width="200" />
|
||||
<el-table-column align="center" label="创建人" prop="createdBy" show-overflow-tooltip width="120" />
|
||||
<el-table-column align="center" label="创建时间" prop="createdTime" show-overflow-tooltip width="120" />
|
||||
<el-table-column align="center" label="更新人" prop="updatedBy" show-overflow-tooltip width="120" />
|
||||
<el-table-column align="center" label="更新时间" prop="updatedTime" show-overflow-tooltip width="120" />
|
||||
<el-table-column align="center" fixed="right" label="操作" show-overflow-tooltip width="160">
|
||||
<el-table-column align="center" :label="$t('vabI18n.ApiKeyManagement.remark')" prop="remark" show-overflow-tooltip width="200" />
|
||||
<el-table-column align="center" :label="$t('vabI18n.ApiKeyManagement.createBy')" prop="createdBy" show-overflow-tooltip width="120" />
|
||||
<el-table-column align="center" :label="$t('vabI18n.ApiKeyManagement.createTime')" prop="createdTime" show-overflow-tooltip width="120" />
|
||||
<el-table-column align="center" :label="$t('vabI18n.ApiKeyManagement.updateBy')" prop="updatedBy" show-overflow-tooltip width="120" />
|
||||
<el-table-column align="center" :label="$t('vabI18n.ApiKeyManagement.updateTime')" prop="updatedTime" show-overflow-tooltip width="120" />
|
||||
<el-table-column align="center" fixed="right" :label="$t('vabI18n.ApiKeyManagement.operation')" show-overflow-tooltip width="160">
|
||||
<template #default="{ row }">
|
||||
<el-button type="primary" size="small" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="danger" size="small" @click="handleDelete(row)">删除</el-button>
|
||||
<el-button type="primary" size="small" @click="handleEdit(row)">{{t('vabI18n.ApiKeyManagement.edit')}}</el-button>
|
||||
<el-button type="danger" size="small" @click="handleDelete(row)">{{t('vabI18n.ApiKeyManagement.delete')}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template #empty>
|
||||
<el-empty class="vab-data-empty" description="暂无数据" />
|
||||
<el-empty class="vab-data-empty" :description="$t('vabI18n.ApiKeyManagement.noData')" />
|
||||
</template>
|
||||
</el-table>
|
||||
|
||||
|
@ -95,31 +96,31 @@
|
|||
<!-- 新增/编辑对话框 -->
|
||||
<el-dialog v-model="dialogFormVisible" :title="dialogTitle" width="600px" @close="closeDialog">
|
||||
<el-form ref="formRef" :model="form" label-width="100px" :rules="rules">
|
||||
<el-form-item label="密钥名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入密钥名称" clearable />
|
||||
<el-form-item :label="$t('vabI18n.ApiKeyManagement.dictionaryKey')" prop="name">
|
||||
<el-input v-model="form.name" :placeholder="$t('vabI18n.ApiKeyManagement.placeCreateby')" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="密钥值" prop="value">
|
||||
<el-form-item :label="$t('vabI18n.ApiKeyManagement.dictionaryValue')" prop="value">
|
||||
<el-input
|
||||
v-model="form.value"
|
||||
type="textarea"
|
||||
:rows="3"
|
||||
placeholder="请输入密钥值"
|
||||
:placeholder="$t('vabI18n.ApiKeyManagement.enterApiValue')"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-form-item :label="$t('vabI18n.ApiKeyManagement.remark')" prop="remark">
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="请输入备注信息"
|
||||
:placeholder="$t('vabI18n.ApiKeyManagement.enterRemark')"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="closeDialog">取 消</el-button>
|
||||
<el-button type="primary" @click="save">确 定</el-button>
|
||||
<el-button @click="closeDialog">{{t('vabI18n.ApiKeyManagement.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="save">{{t('vabI18n.ApiKeyManagement.confirm')}}</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
@ -140,6 +141,9 @@ import {
|
|||
type ApiKey,
|
||||
type ApiKeyQuery
|
||||
} from '@/api/apiKeys'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
const { t, locale } = useI18n()
|
||||
|
||||
// 注入依赖
|
||||
const $baseMessage = inject('$baseMessage') as any
|
||||
|
@ -176,12 +180,12 @@ const form = reactive<ApiKey>({
|
|||
// 表单验证规则
|
||||
const rules = {
|
||||
name: [
|
||||
{ required: true, message: '请输入密钥名称', trigger: 'blur' },
|
||||
{ min: 1, max: 255, message: '密钥名称长度在 1 到 255 个字符', trigger: 'blur' }
|
||||
{ required: true, message:t('vabI18n.ApiKeyManagement.searchPlaceholder'), trigger: 'blur' },
|
||||
{ min: 1, max: 255, message: t('vabI18n.ApiKeyManagement.dictionaryKeyLength'), trigger: 'blur' }
|
||||
],
|
||||
value: [
|
||||
{ required: true, message: '请输入密钥值', trigger: 'blur' },
|
||||
{ min: 1, max: 255, message: '密钥值长度在 1 到 255 个字符', trigger: 'blur' }
|
||||
{ required: true, message: t('vabI18n.ApiKeyManagement.enterApiValue'), trigger: 'blur' },
|
||||
{ min: 1, max: 255, message: t('vabI18n.ApiKeyManagement.dictionaryValueLength'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -191,7 +195,7 @@ const layout = 'total, sizes, prev, pager, next, jumper'
|
|||
|
||||
// 计算属性
|
||||
const dialogTitle = computed(() => {
|
||||
return isEdit.value ? '编辑API密钥' : '新增API密钥'
|
||||
return isEdit.value ? t('vabI18n.ApiKeyManagement.dialogTitleEdit') : t('vabI18n.ApiKeyManagement.dialogTitleAdd')
|
||||
})
|
||||
|
||||
// 生命周期
|
||||
|
@ -212,7 +216,7 @@ const getApiKeys = async () => {
|
|||
}))
|
||||
total.value = response.data.total
|
||||
} catch (error) {
|
||||
ElMessage.error('获取API密钥列表失败')
|
||||
ElMessage.error(t('vabI18n.ApiKeyManagement.getApiKeysFail'))
|
||||
} finally {
|
||||
listLoading.value = false
|
||||
}
|
||||
|
@ -245,49 +249,49 @@ const handleEdit = (row: ApiKey) => {
|
|||
const handleDelete = async (row: ApiKey) => {
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
'此操作将永久删除该API密钥,是否继续?',
|
||||
'提示',
|
||||
t('vabI18n.ApiKeyManagement.confirmDeleteApiKey'),
|
||||
t('vabI18n.ApiKeyManagement.Tip'),
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonText: t('vabI18n.ApiKeyManagement.confirm'),
|
||||
cancelButtonText: t('vabI18n.ApiKeyManagement.cancel'),
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
|
||||
await deleteApiKey(row.id!)
|
||||
ElMessage.success('删除成功')
|
||||
ElMessage.success(t('vabI18n.ApiKeyManagement.deleteSuccess'))
|
||||
getApiKeys()
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
ElMessage.error('删除失败')
|
||||
ElMessage.error(t('vabI18n.ApiKeyManagement.deleteFail'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const handleBatchDelete = async () => {
|
||||
if (selectRows.value.length === 0) {
|
||||
ElMessage.warning('请选择要删除的数据')
|
||||
ElMessage.warning(t('vabI18n.ApiKeyManagement.selectDeleteData'))
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`此操作将永久删除选中的 ${selectRows.value.length} 条API密钥,是否继续?`,
|
||||
'提示',
|
||||
`${t('vabI18n.ApiKeyManagement.confirmDeleteApiKeys')}${selectRows.value.length} ${selectRows.value.length > 1 ? t('vabI18n.ApiKeyManagement.confirmDeleteApiKeysEndPlural') : t('vabI18n.ApiKeyManagement.confirmDeleteApiKeysEnd')}`,
|
||||
t('vabI18n.ApiKeyManagement.Tip'),
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonText: t('vabI18n.ApiKeyManagement.confirm'),
|
||||
cancelButtonText: t('vabI18n.ApiKeyManagement.cancel'),
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
|
||||
const ids = selectRows.value.map(item => item.id!)
|
||||
await batchDeleteApiKeys(ids)
|
||||
ElMessage.success('批量删除成功')
|
||||
ElMessage.success(t('vabI18n.ApiKeyManagement.batchDeleteSuccess'))
|
||||
getApiKeys()
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
ElMessage.error('批量删除失败')
|
||||
ElMessage.error(t('vabI18n.ApiKeyManagement.batchDeleteFail'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -295,20 +299,20 @@ const handleBatchDelete = async () => {
|
|||
const handleRefreshCache = async () => {
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
'此操作将刷新Redis缓存,重新加载所有API密钥,是否继续?',
|
||||
'提示',
|
||||
t('vabI18n.ApiKeyManagement.confirmRefreshCache'),
|
||||
t('vabI18n.ApiKeyManagement.Tip'),
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonText: t('vabI18n.ApiKeyManagement.confirm'),
|
||||
cancelButtonText: t('vabI18n.ApiKeyManagement.cancel'),
|
||||
type: 'info'
|
||||
}
|
||||
)
|
||||
|
||||
await refreshCache()
|
||||
ElMessage.success('缓存刷新成功')
|
||||
ElMessage.success(t('vabI18n.ApiKeyManagement.refreshCacheSuccess'))
|
||||
} catch (error) {
|
||||
if (error !== 'cancel') {
|
||||
ElMessage.error('缓存刷新失败')
|
||||
ElMessage.error(t('vabI18n.ApiKeyManagement.refreshCacheFail'))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -321,16 +325,16 @@ const save = async () => {
|
|||
|
||||
if (isEdit.value) {
|
||||
await updateApiKey(form)
|
||||
ElMessage.success('更新成功')
|
||||
ElMessage.success(t('vabI18n.ApiKeyManagement.updateSuccess'))
|
||||
} else {
|
||||
await createApiKey(form)
|
||||
ElMessage.success('新增成功')
|
||||
ElMessage.success(t('vabI18n.ApiKeyManagement.addSuccess'))
|
||||
}
|
||||
|
||||
closeDialog()
|
||||
getApiKeys()
|
||||
} catch (error) {
|
||||
ElMessage.error(isEdit.value ? '更新失败' : '新增失败')
|
||||
ElMessage.error(isEdit.value ? t('vabI18n.ApiKeyManagement.updateFail') : t('vabI18n.ApiKeyManagement.addFail'))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -379,9 +383,9 @@ const maskValue = (value: string) => {
|
|||
const copyToClipboard = async (text: string) => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(text)
|
||||
ElMessage.success('复制成功')
|
||||
ElMessage.success(t('vabI18n.ApiKeyManagement.copySuccess'))
|
||||
} catch (error) {
|
||||
ElMessage.error('复制失败')
|
||||
ElMessage.error(t('vabI18n.ApiKeyManagement.copyFail'))
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue