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.name }}
-
-
+
+
-
{{ 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 @@
-
-
+
+
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 @@
- {{ item.title }}
+ {{ resultInfo.title }}
{{ resultInfo.time }}
展开结果
@@ -51,10 +51,10 @@ const nodeResult = ref();
const resultInfo = ref({
time: '3.1s',
status: '', // 成功/失败/运行中三种状态
+ title: '运行成功',
infoList: [
{
id: '1',
- title: '运行成功',
desc: [
// 定义的假数据,后期由接口获取
{
@@ -75,7 +75,7 @@ watch(
() => {
resultInfo.value.status = props.status;
// 目前props.status只有success、error、running三种
- resultInfo.value.infoList[0].title = StatusInfoTitle[props.status];
+ resultInfo.value.title = StatusInfoTitle[props.status];
if (props?.inputAndOutput) {
resultInfo.value.time = props.inputAndOutput.input_parameters.timeout ?? 0;
diff --git a/src/views/createapp/components/workFlow.vue b/src/views/createapp/components/workFlow.vue
index ae8ba3fafb7c96b2d63ee531654fa48cd33987b6..870da45017645ef36b665285f88275ba607064d3 100644
--- a/src/views/createapp/components/workFlow.vue
+++ b/src/views/createapp/components/workFlow.vue
@@ -42,7 +42,7 @@ const apiServiceList = ref([]);
const allApiServiceList = ref([]);
const yamlContent = ref();
const nodeYamlId = ref();
-const emits = defineEmits(['validateConnect']);
+const emits = defineEmits(['validateConnect', 'updateFlowsDebug']);
const route = useRoute();
const workFlowList = ref([]);
const props = defineProps(['flowList']);
@@ -80,7 +80,7 @@ const { onDragOver, onDrop, onDragLeave, onDragStart } = useDragAndDrop();
// 这里是初始化的开始结束的节点
const initNodes = ref([
{
- id: 'node1',
+ id: 'start',
type: 'start',
data: {
name: '开始',
@@ -92,7 +92,7 @@ const initNodes = ref([
position: { x: 100, y: 160 },
},
{
- id: 'node2',
+ id: 'end',
type: 'end',
data: {
name: '结束',
@@ -267,6 +267,11 @@ const searchApiList = () => {
};
const handleDebugDialogOps = (visible) => {
+
+ // 这里将对应的保存
+ if (visible) {
+ saveFlow();
+ }
debugDialogVisible.value = visible;
// 调试弹窗关闭时---结果清空
debugStatus.value = '';
@@ -276,7 +281,6 @@ const handleDebugDialogOps = (visible) => {
})
// 调试弹窗关闭时---需要将边状态清空
getEdges.value.forEach(edge => {
- console.log(edge, 'ecge')
// 更新节点的起源与终点
updateEdgeData(edge.id, {targetStatus: 'default'})
updateEdgeData(edge.id, {sourceStatus: 'default'})
@@ -340,6 +344,8 @@ const queryFlow = (deal: string) => {
choiceFlowId(workFlowList.value[0]);
}
}
+ // 更新当前publish状态
+ emits('updateFlowsDebug');
}
});
}
@@ -395,6 +401,8 @@ const redrageFlow = (nodesList, edgesList) => {
name: node.name,
description: node.description,
parameters: node.parameters,
+ nodeMetaDataId: node.nodeMetaDataId,
+ serviceId: node.serviceId,
},
position: node.position,
deletable: true,
@@ -441,6 +449,7 @@ $bus.on('getNodesStatue', lines => {
totalTime.value = 0;
debugTime.value = '';
debugStatus.value = newLines.data.flow?.stepStatus;
+ updateNodeFunc('start', 'success', '')
}
// 这里判断是否有调试状态的值,无值不处理
@@ -452,13 +461,15 @@ $bus.on('getNodesStatue', lines => {
// output-节点运行结束时,获取节点运行的耗时
let constTime = '';
if (newLines.data.event === 'step.output') {
- totalTime.value += newLines.data?.time_cost;
- constTime = `${newLines.data?.time_cost?.toFixed(3)}s`
+ totalTime.value += newLines.data?.metadata?.time_cost;
+ constTime = `${newLines.data?.metadata?.time_cost?.toFixed(3)}s`
}
updateNodeFunc(newLines.data.flow.stepId, newLines.data.flow?.stepStatus, constTime);
} else if (newLines?.data?.event === 'flow.stop') {
debugStatus.value = newLines.data.flow?.stepStatus;
debugTime.value = `${totalTime.value.toFixed(3)}s`
+ // 最后更新-调用一下接口
+ emits('updateFlowsDebug')
} else {
// do nothing
}
@@ -503,6 +514,7 @@ const saveFlow = (updateNodeParameter?) => {
position: item.position,
apiId: item.data.nodeMetaDataId,
serviceId: item.data.serviceId,
+ nodeMetaDataId: item.data.nodeMetaDataId,
nodeId: item.id,
...item.data,
};
@@ -548,7 +560,6 @@ const saveFlow = (updateNodeParameter?) => {
}
});
}
- // return;
// 更新最新的节点与边的数据
api
.createOrUpdateFlowTopology(
@@ -779,10 +790,6 @@ defineExpose({
>