fix: icon style

This commit is contained in:
wangdan-fit2cloud 2025-07-08 15:47:52 +08:00
parent b396d95c6f
commit c2767addd2
11 changed files with 131 additions and 26 deletions

View File

@ -0,0 +1,66 @@
import { Result } from '@/request/Result'
import { get, post, del, put, exportFile, exportExcel } from '@/request/index'
import { type Ref } from 'vue'
import type { pageRequest } from '@/api/type/common'
import type { knowledgeData } from '@/api/type/knowledge'
import useStore from '@/stores'
const prefix: any = { _value: '/system/shared/knowledge/' }
Object.defineProperty(prefix, 'value', {
get: function () {
const { user } = useStore()
return this._value + user.getWorkspaceId()
},
})
/**
*
* @param
* param {
folder_id: "string",
name: "string",
tool_type: "string",
desc: string,
}
*/
const getKnowledgeList: (param?: any, loading?: Ref<boolean>) => Promise<Result<any>> = (
param,
loading,
) => {
return get(`${prefix.value}`, param, loading)
}
/**
*
* @param
* param {
"folder_id": "string",
"name": "string",
"tool_type": "string",
desc: string,
}
*/
const getKnowledgeListPage: (
page: pageRequest,
param?: any,
loading?: Ref<boolean>,
) => Promise<Result<any>> = (page, param, loading) => {
return get(`${prefix.value}/${page.current_page}/${page.page_size}`, param, loading)
}
/**
*
* @param knowledge_id
*/
const getKnowledgeDetail: (knowledge_id: string, loading?: Ref<boolean>) => Promise<Result<any>> = (
knowledge_id,
loading,
) => {
return get(`${prefix.value}/${knowledge_id}`, undefined, loading)
}
export default {
getKnowledgeList,
getKnowledgeListPage,
getKnowledgeDetail,
}

View File

@ -129,6 +129,7 @@
</el-row> </el-row>
<el-space wrap> <el-space wrap>
<template v-for="(item, index) in uploadImageList" :key="index"> <template v-for="(item, index) in uploadImageList" :key="index">
<div <div
class="file file-image cursor border border-r-6" class="file file-image cursor border border-r-6"
v-if="item.url" v-if="item.url"
@ -420,6 +421,7 @@ const uploadFile = async (file: any, fileList: any) => {
return return
} }
fileAllList.value = fileList fileAllList.value = fileList
console.log(fileAllList.value)
if (!chatId_context.value) { if (!chatId_context.value) {
const res = await props.openChatId() const res = await props.openChatId()

View File

@ -634,4 +634,33 @@ export default {
]) ])
}, },
}, },
'app-mobile-open-history': {
iconReader: () => {
return h('i', [
h(
'svg',
{
style: { height: '100%', width: '100%' },
viewBox: '0 0 21 20',
version: '1.1',
xmlns: 'http://www.w3.org/2000/svg',
},
[
h('path', {
d: 'M3.01237 4.16663H17.179C17.4568 4.16663 17.5957 4.30551 17.5957 4.58329V5.41663C17.5957 5.6944 17.4568 5.83329 17.179 5.83329H3.01237C2.73459 5.83329 2.5957 5.6944 2.5957 5.41663V4.58329C2.5957 4.30551 2.73459 4.16663 3.01237 4.16663Z',
fill: 'currentColor',
}),
h('path', {
d: 'M3.01237 9.16663H17.179C17.4568 9.16663 17.5957 9.30552 17.5957 9.5833V10.4166C17.5957 10.6944 17.4568 10.8333 17.179 10.8333H3.01237C2.73459 10.8333 2.5957 10.6944 2.5957 10.4166V9.5833C2.5957 9.30552 2.73459 9.16663 3.01237 9.16663Z',
fill: 'currentColor',
}),
h('path', {
d: 'M3.01237 14.1667H17.179C17.4568 14.1667 17.5957 14.3056 17.5957 14.5833V15.4167C17.5957 15.6944 17.4568 15.8333 17.179 15.8333H3.01237C2.73459 15.8333 2.5957 15.6944 2.5957 15.4167V14.5833C2.5957 14.3056 2.73459 14.1667 3.01237 14.1667Z',
fill: 'currentColor',
}),
],
),
])
},
},
} }

View File

@ -18,7 +18,7 @@
:default-expanded-keys="['default']" :default-expanded-keys="['default']"
:canOperation="false" :canOperation="false"
class="move-to-dialog-tree" class="move-to-dialog-tree"
@handleNodeClick="folderClickHandel" @handleNodeClick="folderClickHandle"
/> />
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
@ -77,7 +77,7 @@ function getFolder() {
}) })
} }
function folderClickHandel(item: any) { function folderClickHandle(item: any) {
selectForderId.value = item.id selectForderId.value = item.id
} }

View File

@ -65,7 +65,7 @@ const props = defineProps<{
default: () => {} default: () => {}
} }
apiType: 'systemShare' | 'workspace' | 'systemManage' apiType: 'systemShare' | 'workspace' | 'systemManage'
isApplicaton?: boolean isApplication?: boolean
}>() }>()
const { user } = useStore() const { user } = useStore()
@ -124,7 +124,7 @@ function getDocument(id: string) {
.getDocumentList(id, optionLoading) .getDocumentList(id, optionLoading)
.then((res: any) => { .then((res: any) => {
documentList.value = res.data documentList.value = res.data
if (props.isApplicaton) { if (props.isApplication) {
if (localStorage.getItem(id + 'chat_document_id')) { if (localStorage.getItem(id + 'chat_document_id')) {
form.value.document_id = localStorage.getItem(id + 'chat_document_id') as string form.value.document_id = localStorage.getItem(id + 'chat_document_id') as string
} }

View File

@ -147,6 +147,7 @@ const filter_menu_nodes = computed(() => {
}, []) }, [])
}) })
function clickNodes(item: any, data?: any, type?: string) { function clickNodes(item: any, data?: any, type?: string) {
console.log('clickNodes', item, data, type)
if (data) { if (data) {
item['properties']['stepName'] = data.name item['properties']['stepName'] = data.name
if (type == 'tool') { if (type == 'tool') {

View File

@ -54,7 +54,7 @@
:apiType="apiType" :apiType="apiType"
@changeKnowledge="changeKnowledge" @changeKnowledge="changeKnowledge"
@changeDocument="changeDocument" @changeDocument="changeDocument"
:isApplicaton="true" :isApplication="true"
/> />
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">

View File

@ -3,7 +3,7 @@
class="chat-embed layout-bg chat-background" class="chat-embed layout-bg chat-background"
:class="{ 'chat-embed--popup': isPopup }" :class="{ 'chat-embed--popup': isPopup }"
v-loading="loading" v-loading="loading"
:style="{ :style="{
'--el-color-primary': applicationDetail?.custom_theme?.theme_color, '--el-color-primary': applicationDetail?.custom_theme?.theme_color,
'--el-color-primary-light-9': hexToRgba(applicationDetail?.custom_theme?.theme_color, 0.1), '--el-color-primary-light-9': hexToRgba(applicationDetail?.custom_theme?.theme_color, 0.1),
backgroundImage: `url(${applicationDetail?.chat_background})`, backgroundImage: `url(${applicationDetail?.chat_background})`,
@ -13,7 +13,7 @@
<div class="flex align-center"> <div class="flex align-center">
<!-- TODO icon更换 --> <!-- TODO icon更换 -->
<AppIcon <AppIcon
iconName="app-history-outlined" iconName="app-mobile-open-history"
style="font-size: 20px" style="font-size: 20px"
class="ml-16 cursor" class="ml-16 cursor"
:style="{ :style="{
@ -60,11 +60,17 @@
</AiChat> </AiChat>
</div> </div>
<ChatHistoryDrawer v-model:show="show" :application-detail="applicationDetail" :chat-log-data="chatLogData" <ChatHistoryDrawer
:left-loading="left_loading" :currentChatId="currentChatId" @new-chat="newChat" v-model:show="show"
@clickLog="clickListHandle" @delete-log="deleteLog" /> :application-detail="applicationDetail"
:chat-log-data="chatLogData"
:left-loading="left_loading"
:currentChatId="currentChatId"
@new-chat="newChat"
@clickLog="clickListHandle"
@delete-log="deleteLog"
/>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -107,7 +113,6 @@ const paginationConfig = reactive({
const currentRecordList = ref<any>([]) const currentRecordList = ref<any>([])
const currentChatId = ref('new') // Id 'new' const currentChatId = ref('new') // Id 'new'
const customStyle = computed(() => { const customStyle = computed(() => {
return { return {
background: applicationDetail.value?.custom_theme?.theme_color, background: applicationDetail.value?.custom_theme?.theme_color,
@ -251,7 +256,7 @@ onMounted(() => {
z-index: 11; z-index: 11;
font-size: 1rem; font-size: 1rem;
} }
&.chat-embed--popup { &.chat-embed--popup {
.chat-popover-button { .chat-popover-button {
right: 85px; right: 85px;
} }

View File

@ -11,9 +11,8 @@
> >
<div class="chat-embed__header" :style="(user.isEE() || user.isPE()) && customStyle"> <div class="chat-embed__header" :style="(user.isEE() || user.isPE()) && customStyle">
<div class="flex align-center"> <div class="flex align-center">
<!-- TODO icon更换 -->
<AppIcon <AppIcon
iconName="app-history-outlined" iconName="app-mobile-open-history"
style="font-size: 20px" style="font-size: 20px"
class="ml-16 cursor" class="ml-16 cursor"
:style="{ :style="{
@ -60,11 +59,17 @@
</AiChat> </AiChat>
</div> </div>
<ChatHistoryDrawer v-model:show="show" :application-detail="applicationDetail" :chat-log-data="chatLogData" <ChatHistoryDrawer
:left-loading="left_loading" :currentChatId="currentChatId" @new-chat="newChat" v-model:show="show"
@clickLog="clickListHandle" @delete-log="deleteLog" /> :application-detail="applicationDetail"
:chat-log-data="chatLogData"
:left-loading="left_loading"
:currentChatId="currentChatId"
@new-chat="newChat"
@clickLog="clickListHandle"
@delete-log="deleteLog"
/>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -102,7 +107,6 @@ const paginationConfig = reactive({
const currentRecordList = ref<any>([]) const currentRecordList = ref<any>([])
const currentChatId = ref('new') // Id 'new' const currentChatId = ref('new') // Id 'new'
const customStyle = computed(() => { const customStyle = computed(() => {
return { return {
background: applicationDetail.value?.custom_theme?.theme_color, background: applicationDetail.value?.custom_theme?.theme_color,

View File

@ -110,9 +110,7 @@
</el-menu-item> </el-menu-item>
<el-sub-menu v-show="isPcCollapse" index="2"> <el-sub-menu v-show="isPcCollapse" index="2">
<template #title> <template #title>
<el-icon> <AppIcon iconName="app-history-outlined" />
<location />
</el-icon>
</template> </template>
<el-menu-item-group v-loading="left_loading"> <el-menu-item-group v-loading="left_loading">
<template #title <template #title
@ -228,7 +226,7 @@
> >
<el-splitter> <el-splitter>
<el-splitter-panel> <el-splitter-panel>
<div class="mb-24 p-16-24 flex-between"> <div class="p-16-24 flex-between">
<h4 class="ellipsis-1" style="width: 66%"> <h4 class="ellipsis-1" style="width: 66%">
{{ currentChatName }} {{ currentChatName }}
</h4> </h4>
@ -745,7 +743,7 @@ function closeExecutionDetail() {
box-sizing: border-box; box-sizing: border-box;
.right-height { .right-height {
height: calc(100vh - 85px); height: calc(100vh - 60px);
} }
.el-splitter-bar__collapse-icon, .el-splitter-bar__collapse-icon,

View File

@ -12,7 +12,7 @@
:apiType="apiType" :apiType="apiType"
@changeKnowledge="changeKnowledge" @changeKnowledge="changeKnowledge"
@changeDocument="changeDocument" @changeDocument="changeDocument"
:isApplicaton="true" :isApplication="true"
/> />
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">