mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-09 01:36:57 +08:00
fix: bug fix
This commit is contained in:
@@ -74,14 +74,14 @@ const rules = reactive<FormRules>({
|
||||
host: [
|
||||
{
|
||||
required: true,
|
||||
message: t('datasource.please_enter') + t('common.empty') + t('ds.form.port'),
|
||||
message: t('datasource.please_enter') + t('common.empty') + t('ds.form.host'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
port: [
|
||||
{
|
||||
required: true,
|
||||
message: t('datasource.please_enter') + t('common.empty') + t('ds.form.host'),
|
||||
message: t('datasource.please_enter') + t('common.empty') + t('ds.form.port'),
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
@@ -97,7 +97,7 @@ const rules = reactive<FormRules>({
|
||||
dbSchema: [
|
||||
{
|
||||
required: true,
|
||||
message: t('datasource.please_enter') + t('common.empty') + t('ds.form.schema'),
|
||||
message: t('datasource.please_enter') + t('common.empty') + 'Schema',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
@@ -605,16 +605,10 @@ defineExpose({
|
||||
"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="haveSchema.includes(form.type)"
|
||||
:label="t('ds.form.schema')"
|
||||
prop="dbSchema"
|
||||
>
|
||||
<el-form-item v-if="haveSchema.includes(form.type)" label="Schema" prop="dbSchema">
|
||||
<el-input
|
||||
v-model="form.dbSchema"
|
||||
:placeholder="
|
||||
$t('datasource.please_enter') + $t('common.empty') + t('ds.form.schema')
|
||||
"
|
||||
:placeholder="$t('datasource.please_enter') + $t('common.empty') + 'Schema'"
|
||||
/>
|
||||
<el-button v-if="false" link type="primary" :icon="Plus">Get Schema</el-button>
|
||||
</el-form-item>
|
||||
|
||||
@@ -67,13 +67,13 @@ const handlePublic = () => {
|
||||
<div click.stop class="methods">
|
||||
<el-button v-if="isPrivate" secondary @click.stop="handlePublic">
|
||||
<el-icon style="margin-right: 4px" size="16">
|
||||
<icon_personal_privacy_outlined></icon_personal_privacy_outlined>
|
||||
<icon_community_tab_outlined></icon_community_tab_outlined>
|
||||
</el-icon>
|
||||
{{ $t('embedded.set_to_public') }}
|
||||
</el-button>
|
||||
<el-button v-else secondary @click.stop="handlePrivate">
|
||||
<el-icon style="margin-right: 4px" size="16">
|
||||
<icon_community_tab_outlined></icon_community_tab_outlined>
|
||||
<icon_personal_privacy_outlined></icon_personal_privacy_outlined>
|
||||
</el-icon>
|
||||
{{ $t('embedded.set_to_private') }}
|
||||
</el-button>
|
||||
|
||||
@@ -99,6 +99,9 @@ const handleAddEmbedded = (val: any) => {
|
||||
const getDsList = () => {
|
||||
datasourceApi.list().then((res: any) => {
|
||||
dsListOptions.value = res || []
|
||||
if (!currentEmbedded.id) {
|
||||
dsForm.private_list = dsListOptions.value.map((ele) => ele.id)
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleBaseEmbedded = (row: any) => {
|
||||
@@ -645,6 +648,7 @@ const copyCode = () => {
|
||||
<el-form-item prop="workspace" :label="t('user.workspace')">
|
||||
<el-select
|
||||
v-model="dsForm.oid"
|
||||
filterable
|
||||
:placeholder="
|
||||
$t('datasource.please_enter') + $t('common.empty') + $t('user.workspace')
|
||||
"
|
||||
@@ -814,11 +818,12 @@ const copyCode = () => {
|
||||
.popover-item {
|
||||
height: 98px;
|
||||
display: flex;
|
||||
padding-left: 12px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
position: relative;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
padding-top: 8px;
|
||||
&:hover {
|
||||
background: #1f23291a;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ const handleDel = () => {
|
||||
<div class="card">
|
||||
<div class="name-icon">
|
||||
<img :src="current_supplier?.icon" width="32px" height="32px" />
|
||||
<span class="name">{{ name }}</span>
|
||||
<span :title="name" class="name ellipsis">{{ name }}</span>
|
||||
<span v-if="isDefault" class="default">{{ $t('model.default_model') }}</span>
|
||||
</div>
|
||||
<div class="type-value">
|
||||
@@ -90,6 +90,7 @@ const handleDel = () => {
|
||||
font-weight: 500;
|
||||
font-size: 16px;
|
||||
line-height: 24px;
|
||||
max-width: 280px;
|
||||
}
|
||||
.default {
|
||||
margin-left: auto;
|
||||
|
||||
@@ -191,7 +191,7 @@ const submit = (item: any) => {
|
||||
search()
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: 'Add completed',
|
||||
message: t('workspace.add_successfully'),
|
||||
})
|
||||
})
|
||||
return
|
||||
@@ -368,6 +368,7 @@ const submit = (item: any) => {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
max-height: calc(100% - 40px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -389,6 +390,8 @@ const submit = (item: any) => {
|
||||
.popover {
|
||||
.popover-content {
|
||||
padding: 4px;
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.popover-item {
|
||||
height: 32px;
|
||||
|
||||
@@ -133,9 +133,6 @@ const supplierChang = (supplier: any) => {
|
||||
const config = supplier.model_config[modelForm.model_type || 0]
|
||||
modelForm.api_domain = config.api_domain
|
||||
modelForm.base_model = ''
|
||||
if (!modelForm.id) {
|
||||
modelForm.name = supplier.name
|
||||
}
|
||||
}
|
||||
const initForm = (item?: any) => {
|
||||
modelForm.id = ''
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="email" :label="$t('user.email')" width="280" />
|
||||
<el-table-column prop="email" show-overflow-tooltip :label="$t('user.email')" />
|
||||
<!-- <el-table-column prop="phone" :label="$t('user.phone_number')" width="280" /> -->
|
||||
<!-- <el-table-column prop="user_source" :label="$t('user.user_source')" width="280" /> -->
|
||||
<el-table-column prop="oid_list" :label="$t('user.workspace')" width="280">
|
||||
@@ -187,6 +187,7 @@
|
||||
v-model="state.form.name"
|
||||
:placeholder="$t('datasource.please_enter') + $t('common.empty') + $t('user.name')"
|
||||
autocomplete="off"
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="account" :label="t('user.account')">
|
||||
@@ -195,6 +196,7 @@
|
||||
:disabled="!!state.form.id"
|
||||
:placeholder="$t('datasource.please_enter') + $t('common.empty') + $t('user.account')"
|
||||
autocomplete="off"
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="email" :label="$t('user.email')">
|
||||
|
||||
@@ -110,7 +110,9 @@ const loading = ref(false)
|
||||
const centerDialogVisible = ref(false)
|
||||
|
||||
const workspaceWithKeywords = computed(() => {
|
||||
return workspace.value.filter((ele: any) => (ele.name as string).includes(search.value))
|
||||
return workspace.value.filter((ele: any) =>
|
||||
(ele.name.toLowerCase() as string).includes(search.value.toLowerCase())
|
||||
)
|
||||
})
|
||||
const handleCheckAllChange = (val: CheckboxValueType) => {
|
||||
checkedWorkspace.value = val ? workspace.value : []
|
||||
@@ -128,6 +130,7 @@ let oid: any = null
|
||||
|
||||
const open = async (id: any) => {
|
||||
loading.value = true
|
||||
search.value = ''
|
||||
oid = id
|
||||
checkedWorkspace.value = []
|
||||
checkAll.value = false
|
||||
|
||||
@@ -536,6 +536,7 @@ const handleCurrentChange = (val: number) => {
|
||||
<el-form-item prop="name" :label="t('workspace.workspace_name')">
|
||||
<el-input
|
||||
v-model="workspaceForm.name"
|
||||
maxlength="50"
|
||||
:placeholder="
|
||||
$t('datasource.please_enter') + $t('common.empty') + $t('workspace.workspace_name')
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user