diff --git a/src/apis/paths/knowledge.ts b/src/apis/paths/knowledge.ts index 1a3421840fc8fd28fd3053a93b888e8dbca0f93d..d59c477bf95a35b551387c04b0418665784a68f9 100644 --- a/src/apis/paths/knowledge.ts +++ b/src/apis/paths/knowledge.ts @@ -10,23 +10,6 @@ import { get, post } from 'src/apis/server'; import type { FcResponse } from 'src/apis/server'; -/** - * 验证用户信息 - * @returns - */ -export const getKnowledgeList = (): Promise< - [ - any, - ( - | FcResponse<{ - }> - | undefined - ) - ] -> => { - return get('/api/knowledge'); -}; - /** * USER登录 * @returns @@ -45,10 +28,7 @@ export const updateKnowledgeList = (params: { > => { return post('/api/knowledge', params); }; - - export const knowledgeApi = { - getKnowledgeList, updateKnowledgeList, }; diff --git a/src/assets/styles/theme.scss b/src/assets/styles/theme.scss index 3156f92477133568703e345adb5f8b26f2ef30bb..ec12a6c1c66ee826f461415559b185c1f2aed13e 100644 --- a/src/assets/styles/theme.scss +++ b/src/assets/styles/theme.scss @@ -25,6 +25,7 @@ body[theme='dark'] { --o-think-border:#8d98aa; --o-think-header-bg:#2a2f37; --o-think-header-text:#e4e8ee; + --el-drawer-bg-color:#000000; } body[theme='light'] { @@ -54,4 +55,6 @@ body[theme='light'] { --o-think-header-text:#8d98aa; --flow-branch-node-error-node-cover-color: #edb3b3; --flow-branch-node-success-node-cover-color: #b3dbb8; + --el-collapse-header-bg: rgb(244,246,250); + --el-collapse-content-bg: rgb(244,246,250,0.5); } diff --git a/src/components/Upload/index.vue b/src/components/Upload/index.vue index e5b847036468a1e8ef5f685009d91a1c053f3587..32e10ec6c0142fd5fd6b4e556f93cacddb3efac2 100644 --- a/src/components/Upload/index.vue +++ b/src/components/Upload/index.vue @@ -2,11 +2,11 @@ import { ElMessage } from 'element-plus'; import { ref, watch } from 'vue'; import * as jsYaml from 'js-yaml'; -import { IconUpload, IconVisible, IconDelete } from '@computing/opendesign-icons'; +import { IconUpload, IconVisible, IconDelete, IconCaretRight } from '@computing/opendesign-icons'; import type { UploadFile, ElUploadProgressEvent, ElFile } from 'element-plus/es/components/upload/src/upload.type'; import { Codemirror } from 'vue-codemirror'; import { api } from 'src/apis'; -import { IconChevronDown } from '@computing/opendesign-icons'; +import { successMsg } from 'src/components/Message'; const handleCreateapi = () => { api @@ -68,8 +68,14 @@ const handleEditClose = () => { const handleEdit = () => { //edit数据 + successMsg('可编辑'); editable.value = true; }; +const data = [ + {path:'212121',description:"23213123"}, + {path:'ndie',description:"23213123"}, + {path:'nidanide1',description:"23213123"}, +] const uploadtype = ref(props.type); const getServiceYaml = ref(''); @@ -251,14 +257,20 @@ watch(
-
{{ item.path }}
-
{{ item.description }}
+
+ 接口路径 + {{ item.path }} +
+
+ 接口描述 + {{ item.description }} +
@@ -386,4 +398,26 @@ watch( right: 8px; bottom: 8px; } + +.json-container { + :deep(.el-collapse-item__header){ + background-color: var(--el-collapse-header-bg) !important; + height: 32px; + border-bottom: 1px solid var(--el-collapse-border-color) !important; + } + :deep(.el-collapse-item__content){ + background-color: var(--el-collapse-content-bg) !important; + margin: 0px; + border-bottom: 1px solid var(--el-collapse-border-color) !important; + } +} + +.o-collapse-content{ + .subName{ + span:first-child{ + margin-right: 16px; + color:var(--o-font-size-subtitle); + } + } +} diff --git a/src/components/dialoguePanel/DialoguePanel.vue b/src/components/dialoguePanel/DialoguePanel.vue index e50b9f4ba26437de2a1e5e5afab5c1c7cd80a8a8..6abe12fad9ca11cfb76c01a27f8588876cd1e568 100644 --- a/src/components/dialoguePanel/DialoguePanel.vue +++ b/src/components/dialoguePanel/DialoguePanel.vue @@ -397,12 +397,6 @@ const selectQuestion = (item:Suggest) => { }; -// const selectQuestion = (item:object) => { -// let question = item.question; -// let user_selected_flow = item.flow; -// emits('handleSendMessage',question,user_selected_flow); -// }; - const popperSize = () => { if(language.value == "EN"){ size.width = 418; diff --git a/src/store/conversation.ts b/src/store/conversation.ts index 9057a9defb5afe9553276dfca69662f4a1a6f5a5..1d62d6eeae75fc46ee29016417b2970ad600438a 100644 --- a/src/store/conversation.ts +++ b/src/store/conversation.ts @@ -315,7 +315,7 @@ export const useSessionStore = defineStore('conversation', () => { target.data.output = message.content target.status = message.flow?.stepStatus; // 工作流添加每阶段的时间耗时 - target['costTime'] = message.time_cost; + target['costTime'] = message.metadata?.time_cost; if(message.flow.step_status === "error"){ conversationItem.flowdata.status = message.flow?.stepStatus; } diff --git a/src/views/api/index.vue b/src/views/api/index.vue index 185171b8896638f936373dd56583b38128da34d0..757a8432b481509b9f841b8aae010aee64522c7a 100644 --- a/src/views/api/index.vue +++ b/src/views/api/index.vue @@ -69,31 +69,23 @@ -
暂无数据
- +
@@ -103,8 +95,20 @@
+
+ diff --git a/src/views/api/style.scss b/src/views/api/style.scss index 749fa9c9d448f29215bf3006917651c2ef793665..d5f1bf2f2f12d0fcf9cdc5855fdd9f7c258e04a0 100644 --- a/src/views/api/style.scss +++ b/src/views/api/style.scss @@ -59,14 +59,17 @@ .apiCenterCardContainer { padding-top: 16px; max-width: 1336px; - max-height: calc(100vh - 327px); - overflow-y: scroll; + max-height: calc(100vh - 370px); + min-height: calc(100vh - 370px); + min-width: 1336px; + overflow-y: hidden; .apiCenterCardBox { width: fit-content; display: flex; flex-wrap: wrap; box-sizing: border-box; gap: 16px; + min-width: 1336px; .apiCenterCardSingle { box-sizing: border-box; border: 1px solid transparent; @@ -186,7 +189,7 @@ } } - .el-pagination { + :deep(.el-pagination) { margin-top: 16px; .el-select__wrapier { background-color: transparent; diff --git a/src/views/createapp/components/appConfig.vue b/src/views/createapp/components/appConfig.vue index b39a3ff5822c25928c809870ed93110bcb214f9b..04d25b770fa1fe1a1f0a7c960054716f395a3d1c 100644 --- a/src/views/createapp/components/appConfig.vue +++ b/src/views/createapp/components/appConfig.vue @@ -42,6 +42,7 @@ const permissionTypeList = [ value: 'protected', }, ]; +const base64Image: any = ref(''); const permissionList = ref([]); const curPersonList = ref([]); const publishStatus = ref(false); @@ -78,9 +79,22 @@ const searchPerson = () => { curPersonList.value = permissionList.value.filter(item => item?.userName?.toLowerCase()?.includes(searchName.value)); }; const handleAvatarSuccess = (res, file) => { - createAppForm.value.icon = URL.createObjectURL(file.raw); + convertToBase64(file.raw); }; +// 转为base64-仅限小图标,后续请改为上传图片接口 +const convertToBase64 = file => { + const reader = new FileReader(); + reader.onload = e => { + base64Image.value = e.target?.result; + }; + reader.readAsDataURL(file); +}; + +watch(() => base64Image.value, () => { + createAppForm.value.icon = base64Image.value; +}) + watch( () => publishStatus.value, () => { @@ -138,7 +152,7 @@ watch( async () => { if (createAppFormRef.value && props.handleValidateContent) { const formBalidate = await validateForm(); - props.handleValidateContent(!formBalidate); + props.handleValidateContent(formBalidate); } }, { deep: true, immediate: true }, diff --git a/src/views/createapp/components/codeMirror/nodeMirrorText.vue b/src/views/createapp/components/codeMirror/nodeMirrorText.vue index e72724d1645cbb8f87735f7707b19e0e9ca64ae1..ba8073c0653b38401141036af90371e0c3fcab3b 100644 --- a/src/views/createapp/components/codeMirror/nodeMirrorText.vue +++ b/src/views/createapp/components/codeMirror/nodeMirrorText.vue @@ -5,7 +5,7 @@