fix: bug fix

This commit is contained in:
dataeaseShu
2025-08-05 10:24:02 +08:00
parent 6a9b5eab65
commit 0f3a9c04d8
8 changed files with 101 additions and 23 deletions
+12
View File
@@ -210,3 +210,15 @@ strong {
.ed-button.is-plain:active {
background-color: #a4e3d3 !important;
}
.ed-drawer__footer {
border-top: 1px solid #1f232926;
box-shadow: none !important;
}
.ed-select__popper {
padding: 0 4px !important;
.ed-select-dropdown__item {
border-radius: 4px;
}
}
@@ -197,9 +197,9 @@ defineExpose({ getRecommendQuestions, id: () => props.recordId, stop })
font-weight: 400;
cursor: pointer;
background: rgba(245, 246, 247, 1);
min-height: 46px;
min-height: 32px;
border-radius: 6px;
padding: 12px;
padding: 5px 12px;
line-height: 22px;
&:hover {
background: rgba(31, 35, 41, 0.1);
@@ -356,7 +356,7 @@ defineExpose({
placement="bottom-end"
@command="handleSortTypeChange"
>
<el-icon class="filter-icon-span">
<el-icon class="filter-icon-span" :class="state.curSortType !== 'name_asc' && 'active'">
<el-tooltip :offset="16" effect="dark" :content="sortTypeTip" placement="top">
<Icon v-if="state.curSortType.includes('asc')" name="dv-sort-asc" class="opt-icon"
><dv_sort_asc class="svg-icon opt-icon"
@@ -451,11 +451,11 @@ defineExpose({
</template>
<style lang="less" scoped>
.filter-icon-span {
border: 1px solid #bbbfc4;
border: 1px solid #d9dcdf;
width: 32px;
height: 32px;
border-radius: 4px;
color: var(--ed-color-primary);
color: #1f2329;
padding: 8px;
margin-left: 8px;
font-size: 16px;
@@ -465,13 +465,28 @@ defineExpose({
outline: none !important;
}
&:hover {
&:hover,
&:focus {
background: #f5f6f7;
}
&:active {
background: #eff0f1;
}
&.active {
border: 1px solid #1cba90;
color: #1cba90;
&:hover,
&:focus {
background: #d2f1e9;
}
&:active {
background: #a4e3d3;
}
}
}
.resource-tree {
+45 -10
View File
@@ -312,9 +312,12 @@ const btnSelectClick = (val: any) => {
<span :title="currentTable.custom_comment" class="field-notes">{{
currentTable.custom_comment || '-'
}}</span>
<el-icon style="margin-left: 8px; cursor: pointer" size="16" @click="editTable">
<edit></edit>
</el-icon>
<el-tooltip :offset="14" effect="dark" :content="$t('datasource.edit')" placement="top">
<el-icon style="margin-left: 8px; cursor: pointer" size="16" @click="editTable">
<edit></edit>
</el-icon>
</el-tooltip>
</div>
</div>
<div class="table-content">
@@ -341,7 +344,11 @@ const btnSelectClick = (val: any) => {
:class="btnSelect === 'q' && 'overflow-preview'"
>
<div v-if="btnSelect === 'd'" class="table-content_preview">
<el-table :data="fieldListComputed" style="width: 100%">
<el-table
row-class-name="hover-icon_edit"
:data="fieldListComputed"
style="width: 100%"
>
<el-table-column
prop="field_name"
:label="t('datasource.field_name')"
@@ -594,6 +601,32 @@ const btnSelectClick = (val: any) => {
line-height: 24px;
}
.ed-icon {
position: relative;
cursor: pointer;
margin-top: 4px;
margin-left: 8px;
&::after {
content: '';
background-color: #1f23291a;
position: absolute;
border-radius: 6px;
width: 24px;
height: 24px;
transform: translate(-50%, -50%);
top: 50%;
left: 50%;
display: none;
}
&:hover {
&::after {
display: block;
}
}
}
.notes {
font-weight: 400;
font-size: 14px;
@@ -663,6 +696,12 @@ const btnSelectClick = (val: any) => {
justify-content: flex-end;
}
.hover-icon_edit:hover {
.ed-icon {
display: block;
}
}
.field-comment {
display: flex;
align-items: center;
@@ -676,17 +715,13 @@ const btnSelectClick = (val: any) => {
overflow: hidden;
text-overflow: ellipsis;
}
&:hover {
.ed-icon {
display: block;
}
}
.ed-icon {
position: relative;
cursor: pointer;
margin-top: 4px;
margin-left: 8px;
display: none;
color: #646a73;
&::after {
content: '';
+1 -3
View File
@@ -13,7 +13,6 @@ import DatasourceList from './DatasourceList.vue'
import DatasourceListSide from './DatasourceListSide.vue'
import DatasourceForm from './DatasourceForm.vue'
import { datasourceApi } from '@/api/datasource'
import { useEmitt } from '@/utils/useEmitt'
import Card from './Card.vue'
import DelMessageBox from './DelMessageBox.vue'
import { dsTypeWithImg } from './js/ds-type'
@@ -229,7 +228,6 @@ search()
const currentDataTable = ref()
const dataTableDetail = (ele: any) => {
useEmitt().emitter.emit('collapse-change')
currentDataTable.value = ele
}
@@ -256,7 +254,7 @@ const back = () => {
</template>
</el-input>
<el-popover popper-class="system-default_datasource" placement="bottom">
<el-popover popper-class="system-default_datasource" placement="bottom-end">
<template #reference>
<el-button secondary>
{{ currentDefaultDatasource || $t('datasource.all_types') }}
+1 -1
View File
@@ -738,7 +738,7 @@ defineExpose({
</div>
<div class="draw-foot">
<el-button secondary @click="close">{{ t('common.cancel') }}</el-button>
<el-button v-show="form.type !== 'excel' && !isDataTable" @click="check">
<el-button v-show="form.type !== 'excel' && !isDataTable" secondary @click="check">
{{ t('ds.check') }}
</el-button>
<el-button v-show="activeStep !== 0 && isCreate" secondary @click="preview">
+1 -1
View File
@@ -284,7 +284,7 @@ const submit = (item: any) => {
</template>
</el-input>
<el-popover popper-class="system-default_model" placement="bottom">
<el-popover popper-class="system-default_model" placement="bottom-end">
<template #reference>
<el-button secondary>
<template #icon>
+20 -2
View File
@@ -7,7 +7,9 @@ import IconOpeDelete from '@/assets/svg/icon_delete.svg'
import icon_close_outlined from '@/assets/svg/operate/ope-close.svg'
import EmptyBackground from '@/views/dashboard/common/EmptyBackground.vue'
import icon_down_outlined from '@/assets/svg/icon_down_outlined.svg'
import ICON_TABLE from '@/assets/svg/chart/icon_form_outlined.svg'
import Card from './Card.vue'
import { dsTypeWithImg } from '@/views/ds/js/ds-type'
import SelectPermission from './SelectPermission.vue'
import AuthTree from './auth-tree/RowAuth.vue'
import { getList, savePermissions, delPermissions } from '@/api/permissions'
@@ -211,6 +213,10 @@ const handleColumnPermission = (row: any) => {
: t('permission.add_column_permission')
}
const icon = (item: any) => {
return (dsTypeWithImg.find((ele) => item.type === ele.type) || {}).img
}
const handleInitDsIdChange = (val: any) => {
columnForm.ds_id = val.id
columnForm.ds_name = val.name
@@ -800,7 +806,12 @@ const columnRules = {
:key="item.id"
:label="item.name"
:value="item"
/>
>
<div style="display: flex; align-items: center">
<img :src="icon(item)" width="24" height="24" style="margin-right: 8px" />
{{ item.name }}
</div>
</el-option>
</el-select>
<el-select
v-model="activeTable"
@@ -818,7 +829,14 @@ const columnRules = {
:key="item.id"
:label="item.table_name"
:value="item"
/>
>
<div style="display: flex; align-items: center">
<el-icon size="16" style="margin-right: 8px; color: #646a73">
<ICON_TABLE />
</el-icon>
{{ item.table_name }}
</div>
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('permission.set_rule')">