mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
fix: bug fix
This commit is contained in:
@@ -458,6 +458,9 @@
|
||||
"add_interface_credentials": "Add interface credentials",
|
||||
"edit_interface_credentials": "Edit interface credentials",
|
||||
"duplicate_name": "Duplicate name",
|
||||
"duplicate_name_": "Duplicate name",
|
||||
"duplicate_account": "Duplicate account",
|
||||
"duplicate_email": "Duplicate email",
|
||||
"interface_credentials": "Interface credentials",
|
||||
"no_credentials_yet": "No credentials yet",
|
||||
"intelligent_customer_service": "SQLBot Intelligent Customer Service"
|
||||
@@ -506,4 +509,4 @@
|
||||
"back_community": "Restore to Community Edition",
|
||||
"confirm_tips": "Are you sure to restore to Community Edition?"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -463,6 +463,9 @@
|
||||
"add_interface_credentials": "添加接口凭证",
|
||||
"edit_interface_credentials": "编辑接口凭证",
|
||||
"duplicate_name": "重复名称",
|
||||
"duplicate_name_": "重复姓名",
|
||||
"duplicate_account": "重复账号",
|
||||
"duplicate_email": "重复邮箱",
|
||||
"interface_credentials": "接口凭证",
|
||||
"no_credentials_yet": "暂无凭证",
|
||||
"intelligent_customer_service": "SQLBot 智能客服",
|
||||
@@ -518,4 +521,4 @@
|
||||
"back_community": "还原至社区版",
|
||||
"confirm_tips": "确定还原至社区版?"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,11 +209,11 @@ function addToDashboard() {
|
||||
<div class="chart-select-container">
|
||||
<el-tooltip effect="dark" :content="t('chat.type')" placement="top">
|
||||
<ChartPopover
|
||||
:chartTypeList="chartTypeList"
|
||||
:chartType="chartType"
|
||||
:title="t('chat.type')"
|
||||
@typeChange="onTypeChange"
|
||||
v-if="chartTypeList.length > 0"
|
||||
:chart-type-list="chartTypeList"
|
||||
:chart-type="chartType"
|
||||
:title="t('chat.type')"
|
||||
@type-change="onTypeChange"
|
||||
></ChartPopover>
|
||||
</el-tooltip>
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@ const btnSelectClick = (val: any) => {
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<div class="preview-or-schema" v-if="!loading">
|
||||
<div v-if="!loading" class="preview-or-schema">
|
||||
<div v-if="btnSelect === 'd'" class="table-content_preview">
|
||||
<el-table :data="fieldListComputed" style="width: 100%">
|
||||
<el-table-column
|
||||
|
||||
@@ -312,7 +312,7 @@ import IconLock from '@/assets/svg/icon-key_outlined.svg'
|
||||
import IconOpeEdit from '@/assets/svg/icon_edit_outlined.svg'
|
||||
import IconOpeDelete from '@/assets/svg/icon_delete.svg'
|
||||
import iconFilter from '@/assets/svg/icon-filter_outlined.svg'
|
||||
import ccmUpload from '@/assets/svg/icon_ccm-upload_outlined.svg'
|
||||
// import ccmUpload from '@/assets/svg/icon_ccm-upload_outlined.svg'
|
||||
import icon_add_outlined from '@/assets/svg/icon_add_outlined.svg'
|
||||
import { userApi } from '@/api/user'
|
||||
import { workspaceList } from '@/api/workspace'
|
||||
@@ -451,9 +451,9 @@ const handleEditPassword = (id: any) => {
|
||||
})
|
||||
}
|
||||
|
||||
const handleUserImport = () => {
|
||||
userImportRef.value.showDialog()
|
||||
}
|
||||
// const handleUserImport = () => {
|
||||
// userImportRef.value.showDialog()
|
||||
// }
|
||||
|
||||
const handleConfirmPassword = () => {
|
||||
passwordRef.value.validate((val: any) => {
|
||||
@@ -661,14 +661,39 @@ const editTerm = () => {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
const duplicateName = async () => {
|
||||
const res = await userApi.pager({}, 1, 1000)
|
||||
const arr = res.filter((ele: any) => ele.id !== state.form.id)
|
||||
const names = arr.map((ele: any) => ele.name)
|
||||
const accounts = arr.map((ele: any) => ele.account)
|
||||
const emails = arr.map((ele: any) => ele.email)
|
||||
if (names.includes(state.form.name)) {
|
||||
ElMessage.error(t('embedded.duplicate_name_'))
|
||||
return
|
||||
}
|
||||
|
||||
if (accounts.includes(state.form.account)) {
|
||||
ElMessage.error(t('embedded.duplicate_account'))
|
||||
return
|
||||
}
|
||||
|
||||
if (emails.includes(state.form.email)) {
|
||||
ElMessage.error(t('embedded.duplicate_email'))
|
||||
return
|
||||
}
|
||||
|
||||
if (state.form.id) {
|
||||
editTerm()
|
||||
} else {
|
||||
addTerm()
|
||||
}
|
||||
}
|
||||
|
||||
const saveHandler = () => {
|
||||
termFormRef.value.validate((res: any) => {
|
||||
if (res) {
|
||||
if (state.form.id) {
|
||||
editTerm()
|
||||
} else {
|
||||
addTerm()
|
||||
}
|
||||
duplicateName()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user