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