Merge pull request #6640 from dataease/pr@dev-v2_dzz

Pr@dev v2 dzz
This commit is contained in:
dataeaseShu 2023-11-10 17:25:50 +08:00 committed by GitHub
commit 7ade926aef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 22 deletions

View File

@ -390,11 +390,15 @@ const menuList = [
const expandedKey = ref([])
const nodeExpand = data => {
expandedKey.value.push(data.id)
if (data.id) {
expandedKey.value.push(data.id)
}
}
const nodeCollapse = data => {
expandedKey.value = expandedKey.value.filter(ele => ele !== data.id)
if (data.id) {
expandedKey.value.splice(expandedKey.value.indexOf(data.id), 1)
}
}
const datasetTypeList = [
@ -490,6 +494,8 @@ const getMenuList = (val: boolean) => {
node-key="id"
:data="state.datasetTree"
:filter-node-method="filterNode"
expand-on-click-node
highlight-current
@node-expand="nodeExpand"
@node-collapse="nodeCollapse"
:default-expanded-keys="expandedKey"

View File

@ -746,7 +746,7 @@ defineExpose({
</el-icon>
</span>
<template v-if="showPriority">
<el-row :gutter="24">
<el-row :gutter="24" class="mb16">
<el-col :span="12">
<el-form-item
:label="t('datasource.initial_pool_size')"
@ -796,19 +796,17 @@ defineExpose({
</el-col>
<el-col :span="12">
<el-form-item
:label="t('datasource.query_timeout')"
:label="`${t('datasource.query_timeout')}(${t('common.second')})`"
prop="configuration.queryTimeout"
>
<el-input
<el-input-number
v-model="form.configuration.queryTimeout"
controls-position="right"
autocomplete="off"
:placeholder="t('common.inputText') + t('datasource.query_timeout')"
class="input-with-append"
type="number"
:min="0"
>
<template v-slot:append>{{ t('cron.second') }}</template>
</el-input>
/>
</el-form-item>
</el-col>
</el-row>
@ -949,6 +947,12 @@ defineExpose({
height: 22px;
}
.mb16 {
:deep(.ed-form-item) {
margin-bottom: 16px;
}
}
.execute-rate-cont {
background: #f5f6f7;
border-radius: 4px;
@ -963,17 +967,6 @@ defineExpose({
width: 100%;
}
.input-with-append {
:deep(.ed-input__wrapper) {
padding-right: 1px;
}
:deep(.ed-input-group__append) {
width: 55px;
background: #eff0f1;
color: #1f2329;
}
}
:deep(.is-controls-right > span) {
background: #fff;
}

View File

@ -512,11 +512,15 @@ const updateApiDs = () => {
}
const nodeExpand = data => {
expandedKey.value.push(data.id)
if (data.id) {
expandedKey.value.push(data.id)
}
}
const nodeCollapse = data => {
expandedKey.value = expandedKey.value.filter(ele => ele !== data.id)
if (data.id) {
expandedKey.value.splice(expandedKey.value.indexOf(data.id), 1)
}
}
const filterNode = (value: string, data: BusiTreeNode) => {