mirror of
https://github.com/dataease/dataease.git
synced 2025-02-24 11:32:57 +08:00
fix(工作台): copilot 选择数据集时,数据集的排序规则和数据集树设置的保持一致 #14109
This commit is contained in:
parent
5a1f3ecdc2
commit
621849d3e4
@ -68,6 +68,10 @@ export default {
|
||||
org_center: 'Organization management center'
|
||||
},
|
||||
api_pagination: {
|
||||
help_documentation: 'Help Documentation',
|
||||
product_forum: 'Product Forum',
|
||||
technical_blog: 'Technical Blog',
|
||||
enterprise_edition_trial: 'Enterprise Edition Trial',
|
||||
paging_ettings: 'Paging Settings',
|
||||
parameter_name: 'Parameter name',
|
||||
built_in_parameter_name: 'Built-in parameter name',
|
||||
|
@ -68,6 +68,10 @@ export default {
|
||||
org_center: '組織管理中心'
|
||||
},
|
||||
api_pagination: {
|
||||
help_documentation: '幫助文檔',
|
||||
product_forum: '產品論壇',
|
||||
technical_blog: '技術部落格',
|
||||
enterprise_edition_trial: '企業版試用',
|
||||
paging_ettings: '分頁設定',
|
||||
parameter_name: '參數名',
|
||||
built_in_parameter_name: '內建參數名',
|
||||
|
@ -69,6 +69,10 @@ export default {
|
||||
org_center: '组织管理中心'
|
||||
},
|
||||
api_pagination: {
|
||||
help_documentation: '帮助文档',
|
||||
product_forum: '产品论坛',
|
||||
technical_blog: '技术博客',
|
||||
enterprise_edition_trial: '企业版试用',
|
||||
paging_ettings: '分页设置',
|
||||
parameter_name: '参数名',
|
||||
built_in_parameter_name: '内置参数名',
|
||||
|
@ -699,18 +699,14 @@ defineExpose({
|
||||
/></Icon>
|
||||
</el-icon>
|
||||
<span :title="node.label" class="label-tooltip">{{ node.label }}</span>
|
||||
|
||||
<div
|
||||
class="icon-more flex-align-center"
|
||||
v-if="data.weight >= 7 && showPosition === 'preview'"
|
||||
>
|
||||
<div class="icon-more" v-if="data.weight >= 7 && showPosition === 'preview'">
|
||||
<el-icon
|
||||
v-on:click.stop
|
||||
v-if="data.leaf"
|
||||
class="hover-icon"
|
||||
@click="resourceEdit(data.id)"
|
||||
>
|
||||
<Icon name="icon_edit_outlined"><icon_edit_outlined class="svg-icon" /></Icon>
|
||||
<Icon><icon_edit_outlined class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
<handle-more
|
||||
@handle-command="
|
||||
@ -854,7 +850,7 @@ defineExpose({
|
||||
padding-right: 4px;
|
||||
|
||||
.label-tooltip {
|
||||
width: calc(100% - 66px);
|
||||
width: 100%;
|
||||
margin-left: 8.75px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
@ -862,12 +858,17 @@ defineExpose({
|
||||
}
|
||||
.icon-more {
|
||||
margin-left: auto;
|
||||
visibility: hidden;
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:hover .icon-more {
|
||||
margin-left: auto;
|
||||
visibility: visible;
|
||||
&:hover {
|
||||
.label-tooltip {
|
||||
width: calc(100% - 78px);
|
||||
}
|
||||
|
||||
.icon-more {
|
||||
display: inline-flex;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-screen-new {
|
||||
|
@ -3,13 +3,15 @@ import activeBtn_copilot from '@/assets/svg/active-btn_copilot.svg'
|
||||
import btn_copilot from '@/assets/svg/btn_copilot.svg'
|
||||
import copilot from '@/assets/svg/copilot.svg'
|
||||
import icon_loading_outlined from '@/assets/svg/icon_loading_outlined.svg'
|
||||
import treeSort from '@/utils/treeSortUtils'
|
||||
import icon_right_outlined from '@/assets/svg/icon_right_outlined.svg'
|
||||
import icon_left_outlined from '@/assets/svg/icon_left_outlined.svg'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
import { useEmbedded } from '@/store/modules/embedded'
|
||||
import dvFolder from '@/assets/svg/dv-folder.svg'
|
||||
import icon_dataset from '@/assets/svg/icon_dataset.svg'
|
||||
import icon_expandRight_filled from '@/assets/svg/icon_expand-right_filled.svg'
|
||||
import { ref, shallowRef, computed, watch, nextTick } from 'vue'
|
||||
import { ref, shallowRef, computed, watch, nextTick, unref } from 'vue'
|
||||
import { ElMessageBox } from 'element-plus-secondary'
|
||||
import {
|
||||
getDatasetTree,
|
||||
@ -27,6 +29,7 @@ import { iconFieldMap } from '@/components/icon-group/field-list'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
|
||||
const embeddedStore = useEmbedded()
|
||||
const { wsCache } = useCache()
|
||||
const { t } = useI18n()
|
||||
const quota = shallowRef([])
|
||||
const dimensions = shallowRef([])
|
||||
@ -57,7 +60,7 @@ const dfs = arr => {
|
||||
return ele.leaf
|
||||
})
|
||||
}
|
||||
|
||||
const originResourceTree = ref([])
|
||||
const computedTree = computed(() => {
|
||||
if (datasetTree.value[0]?.id === '0') {
|
||||
return dfs(datasetTree.value[0].children)
|
||||
@ -68,9 +71,14 @@ const computedTree = computed(() => {
|
||||
const isActive = computed(() => {
|
||||
return questionInput.value.trim().length && !!datasetId.value
|
||||
})
|
||||
const sortList = ['time_asc', 'time_desc', 'name_asc', 'name_desc']
|
||||
const initDataset = async () => {
|
||||
await getDatasetTree({}).then(res => {
|
||||
datasetTree.value = (res as unknown as Tree[]) || []
|
||||
let curSortType = sortList[Number(wsCache.get('TreeSort-backend')) ?? 1]
|
||||
curSortType = wsCache.get('TreeSort-dataset') ?? curSortType
|
||||
originResourceTree.value = cloneDeep(unref(datasetTree))
|
||||
datasetTree.value = treeSort(originResourceTree.value, curSortType)
|
||||
})
|
||||
getListCopilot().then(res => {
|
||||
const allList = (res as unknown as { history: object }[]) || []
|
||||
|
Loading…
Reference in New Issue
Block a user