mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
perf: 禁用桌面版 SQLBot 嵌入
This commit is contained in:
committed by
fit2cloud-chenyw
parent
31905d931f
commit
6c9409c8b3
@@ -15,14 +15,6 @@ import { useAppearanceStoreWithOut } from '@/store/modules/appearance'
|
||||
import { msgCountApi } from '@/api/msg'
|
||||
import { computed, ref, onMounted } from 'vue'
|
||||
import { useEmitt } from '@/hooks/web/useEmitt'
|
||||
import logo_sqlbot from '@/assets/svg/logo_sqlbot.svg'
|
||||
|
||||
defineProps({
|
||||
sqlbotEnabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
const aiBaseUrl = ref('https://maxkb.fit2cloud.com/ui/chat/2ddd8b594ce09dbb?mode=embed')
|
||||
const showToolbox = ref(false)
|
||||
@@ -58,9 +50,7 @@ const initAiBase = async () => {
|
||||
const handleAiClick = () => {
|
||||
useEmitt().emitter.emit('aiComponentChange')
|
||||
}
|
||||
const handleSQLBotClick = () => {
|
||||
push('/sqlbot/index')
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
initShowToolbox()
|
||||
initAiBase()
|
||||
@@ -72,11 +62,6 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<ToolboxCfg v-if="showToolbox" />
|
||||
<el-tooltip effect="dark" content="SQLBot" placement="bottom">
|
||||
<el-icon style="margin: 0 10px" class="ai-icon copilot-icon" v-if="sqlbotEnabled">
|
||||
<Icon name="copilot"><logo_sqlbot @click="handleSQLBotClick" class="svg-icon" /></Icon>
|
||||
</el-icon>
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="dark" :content="$t('data_export.export_center')" placement="bottom">
|
||||
<el-icon
|
||||
style="margin-left: 10px"
|
||||
|
||||
@@ -213,7 +213,7 @@ onMounted(() => {
|
||||
<div v-if="showOverlay && appearanceStore.getShowAi" class="overlay"></div>
|
||||
</div>
|
||||
<div v-else class="operate-setting">
|
||||
<desktop-setting :sqlbot-enabled="sqlbotEnabled" />
|
||||
<desktop-setting />
|
||||
</div>
|
||||
</el-header>
|
||||
</template>
|
||||
|
||||
@@ -22,16 +22,18 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import MapSetting from './map/MapSetting.vue'
|
||||
import BasicInfo from './basic/BasicInfo.vue'
|
||||
import ThirdParty from './third-party/index.vue'
|
||||
import EngineInfo from '@/views/system/parameter/engine/EngineInfo.vue'
|
||||
import { XpackComponent } from '@/components/plugin'
|
||||
import { isDesktop } from '@/utils/ModelUtil'
|
||||
/* import EmailInfo from './email/EmailInfo.vue' */
|
||||
const { t } = useI18n()
|
||||
|
||||
const desktop = isDesktop()
|
||||
const tabArray = ref([
|
||||
{ label: t('system.basic_settings'), name: 'basic' },
|
||||
{ label: t('system.map_settings'), name: 'map' },
|
||||
@@ -49,6 +51,18 @@ const addTable = tab => {
|
||||
tabArray.value.splice(1, 0, tab)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (desktop) {
|
||||
let len = tabArray.value.length
|
||||
while (len--) {
|
||||
if (tabArray.value[len]['name'] === 'third_party') {
|
||||
tabArray.value.splice(len, 1)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<style lang="less">
|
||||
.router-title {
|
||||
|
||||
Reference in New Issue
Block a user