Skip to content

Commit c2767ad

Browse files
fix: icon style
1 parent b396d95 commit c2767ad

File tree

11 files changed

+131
-26
lines changed

11 files changed

+131
-26
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
import { Result } from '@/request/Result'
2+
import { get, post, del, put, exportFile, exportExcel } from '@/request/index'
3+
import { type Ref } from 'vue'
4+
import type { pageRequest } from '@/api/type/common'
5+
import type { knowledgeData } from '@/api/type/knowledge'
6+
7+
import useStore from '@/stores'
8+
const prefix: any = { _value: '/system/shared/knowledge/' }
9+
Object.defineProperty(prefix, 'value', {
10+
get: function () {
11+
const { user } = useStore()
12+
return this._value + user.getWorkspaceId()
13+
},
14+
})
15+
16+
/**
17+
* 知识库列表(无分页)
18+
* @param 参数
19+
* param {
20+
folder_id: "string",
21+
name: "string",
22+
tool_type: "string",
23+
desc: string,
24+
}
25+
*/
26+
const getKnowledgeList: (param?: any, loading?: Ref<boolean>) => Promise<Result<any>> = (
27+
param,
28+
loading,
29+
) => {
30+
return get(`${prefix.value}`, param, loading)
31+
}
32+
33+
/**
34+
* 知识库分页列表
35+
* @param 参数
36+
* param {
37+
"folder_id": "string",
38+
"name": "string",
39+
"tool_type": "string",
40+
desc: string,
41+
}
42+
*/
43+
const getKnowledgeListPage: (
44+
page: pageRequest,
45+
param?: any,
46+
loading?: Ref<boolean>,
47+
) => Promise<Result<any>> = (page, param, loading) => {
48+
return get(`${prefix.value}/${page.current_page}/${page.page_size}`, param, loading)
49+
}
50+
51+
/**
52+
* 知识库详情
53+
* @param 参数 knowledge_id
54+
*/
55+
const getKnowledgeDetail: (knowledge_id: string, loading?: Ref<boolean>) => Promise<Result<any>> = (
56+
knowledge_id,
57+
loading,
58+
) => {
59+
return get(`${prefix.value}/${knowledge_id}`, undefined, loading)
60+
}
61+
62+
export default {
63+
getKnowledgeList,
64+
getKnowledgeListPage,
65+
getKnowledgeDetail,
66+
}

ui/src/components/ai-chat/component/chat-input-operate/index.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
</el-row>
130130
<el-space wrap>
131131
<template v-for="(item, index) in uploadImageList" :key="index">
132+
132133
<div
133134
class="file file-image cursor border border-r-6"
134135
v-if="item.url"
@@ -420,6 +421,7 @@ const uploadFile = async (file: any, fileList: any) => {
420421
return
421422
}
422423
fileAllList.value = fileList
424+
console.log(fileAllList.value)
423425
424426
if (!chatId_context.value) {
425427
const res = await props.openChatId()

ui/src/components/app-icon/icons/application.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,4 +634,33 @@ export default {
634634
])
635635
},
636636
},
637+
'app-mobile-open-history': {
638+
iconReader: () => {
639+
return h('i', [
640+
h(
641+
'svg',
642+
{
643+
style: { height: '100%', width: '100%' },
644+
viewBox: '0 0 21 20',
645+
version: '1.1',
646+
xmlns: 'http://www.w3.org/2000/svg',
647+
},
648+
[
649+
h('path', {
650+
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',
651+
fill: 'currentColor',
652+
}),
653+
h('path', {
654+
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',
655+
fill: 'currentColor',
656+
}),
657+
h('path', {
658+
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',
659+
fill: 'currentColor',
660+
}),
661+
],
662+
),
663+
])
664+
},
665+
},
637666
}

ui/src/components/folder-tree/MoveToDialog.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
:default-expanded-keys="['default']"
1919
:canOperation="false"
2020
class="move-to-dialog-tree"
21-
@handleNodeClick="folderClickHandel"
21+
@handleNodeClick="folderClickHandle"
2222
/>
2323
<template #footer>
2424
<span class="dialog-footer">
@@ -77,7 +77,7 @@ function getFolder() {
7777
})
7878
}
7979
80-
function folderClickHandel(item: any) {
80+
function folderClickHandle(item: any) {
8181
selectForderId.value = item.id
8282
}
8383

ui/src/components/select-knowledge-document/index.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ const props = defineProps<{
6565
default: () => {}
6666
}
6767
apiType: 'systemShare' | 'workspace' | 'systemManage'
68-
isApplicaton?: boolean
68+
isApplication?: boolean
6969
}>()
7070
7171
const { user } = useStore()
@@ -124,7 +124,7 @@ function getDocument(id: string) {
124124
.getDocumentList(id, optionLoading)
125125
.then((res: any) => {
126126
documentList.value = res.data
127-
if (props.isApplicaton) {
127+
if (props.isApplication) {
128128
if (localStorage.getItem(id + 'chat_document_id')) {
129129
form.value.document_id = localStorage.getItem(id + 'chat_document_id') as string
130130
}

ui/src/views/application-workflow/component/DropdownMenu.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ const filter_menu_nodes = computed(() => {
147147
}, [])
148148
})
149149
function clickNodes(item: any, data?: any, type?: string) {
150+
console.log('clickNodes', item, data, type)
150151
if (data) {
151152
item['properties']['stepName'] = data.name
152153
if (type == 'tool') {

ui/src/views/chat-log/component/EditContentDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
:apiType="apiType"
5555
@changeKnowledge="changeKnowledge"
5656
@changeDocument="changeDocument"
57-
:isApplicaton="true"
57+
:isApplication="true"
5858
/>
5959
<template #footer>
6060
<span class="dialog-footer">

ui/src/views/chat/embed/index.vue

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
class="chat-embed layout-bg chat-background"
44
:class="{ 'chat-embed--popup': isPopup }"
55
v-loading="loading"
6-
:style="{
6+
:style="{
77
'--el-color-primary': applicationDetail?.custom_theme?.theme_color,
88
'--el-color-primary-light-9': hexToRgba(applicationDetail?.custom_theme?.theme_color, 0.1),
99
backgroundImage: `url(${applicationDetail?.chat_background})`,
@@ -13,7 +13,7 @@
1313
<div class="flex align-center">
1414
<!-- TODO icon更换 -->
1515
<AppIcon
16-
iconName="app-history-outlined"
16+
iconName="app-mobile-open-history"
1717
style="font-size: 20px"
1818
class="ml-16 cursor"
1919
:style="{
@@ -60,11 +60,17 @@
6060
</AiChat>
6161
</div>
6262

63-
<ChatHistoryDrawer v-model:show="show" :application-detail="applicationDetail" :chat-log-data="chatLogData"
64-
:left-loading="left_loading" :currentChatId="currentChatId" @new-chat="newChat"
65-
@clickLog="clickListHandle" @delete-log="deleteLog" />
63+
<ChatHistoryDrawer
64+
v-model:show="show"
65+
:application-detail="applicationDetail"
66+
:chat-log-data="chatLogData"
67+
:left-loading="left_loading"
68+
:currentChatId="currentChatId"
69+
@new-chat="newChat"
70+
@clickLog="clickListHandle"
71+
@delete-log="deleteLog"
72+
/>
6673
</div>
67-
6874
</div>
6975
</template>
7076
<script setup lang="ts">
@@ -107,7 +113,6 @@ const paginationConfig = reactive({
107113
const currentRecordList = ref<any>([])
108114
const currentChatId = ref('new') // 当前历史记录Id 默认为'new'
109115
110-
111116
const customStyle = computed(() => {
112117
return {
113118
background: applicationDetail.value?.custom_theme?.theme_color,
@@ -251,7 +256,7 @@ onMounted(() => {
251256
z-index: 11;
252257
font-size: 1rem;
253258
}
254-
&.chat-embed--popup {
259+
&.chat-embed--popup {
255260
.chat-popover-button {
256261
right: 85px;
257262
}

ui/src/views/chat/mobile/index.vue

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
>
1212
<div class="chat-embed__header" :style="(user.isEE() || user.isPE()) && customStyle">
1313
<div class="flex align-center">
14-
<!-- TODO icon更换 -->
1514
<AppIcon
16-
iconName="app-history-outlined"
15+
iconName="app-mobile-open-history"
1716
style="font-size: 20px"
1817
class="ml-16 cursor"
1918
:style="{
@@ -60,11 +59,17 @@
6059
</AiChat>
6160
</div>
6261

63-
<ChatHistoryDrawer v-model:show="show" :application-detail="applicationDetail" :chat-log-data="chatLogData"
64-
:left-loading="left_loading" :currentChatId="currentChatId" @new-chat="newChat"
65-
@clickLog="clickListHandle" @delete-log="deleteLog" />
62+
<ChatHistoryDrawer
63+
v-model:show="show"
64+
:application-detail="applicationDetail"
65+
:chat-log-data="chatLogData"
66+
:left-loading="left_loading"
67+
:currentChatId="currentChatId"
68+
@new-chat="newChat"
69+
@clickLog="clickListHandle"
70+
@delete-log="deleteLog"
71+
/>
6672
</div>
67-
6873
</div>
6974
</template>
7075
<script setup lang="ts">
@@ -102,7 +107,6 @@ const paginationConfig = reactive({
102107
const currentRecordList = ref<any>([])
103108
const currentChatId = ref('new') // 当前历史记录Id 默认为'new'
104109
105-
106110
const customStyle = computed(() => {
107111
return {
108112
background: applicationDetail.value?.custom_theme?.theme_color,

ui/src/views/chat/pc/index.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,7 @@
110110
</el-menu-item>
111111
<el-sub-menu v-show="isPcCollapse" index="2">
112112
<template #title>
113-
<el-icon>
114-
<location />
115-
</el-icon>
113+
<AppIcon iconName="app-history-outlined" />
116114
</template>
117115
<el-menu-item-group v-loading="left_loading">
118116
<template #title
@@ -228,7 +226,7 @@
228226
>
229227
<el-splitter>
230228
<el-splitter-panel>
231-
<div class="mb-24 p-16-24 flex-between">
229+
<div class="p-16-24 flex-between">
232230
<h4 class="ellipsis-1" style="width: 66%">
233231
{{ currentChatName }}
234232
</h4>
@@ -745,7 +743,7 @@ function closeExecutionDetail() {
745743
box-sizing: border-box;
746744
747745
.right-height {
748-
height: calc(100vh - 85px);
746+
height: calc(100vh - 60px);
749747
}
750748
751749
.el-splitter-bar__collapse-icon,

0 commit comments

Comments
 (0)