Merge branch 'main' of http://18.167.251.121:10003/aidlab/FiDA_Front
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 7.8 KiB |
BIN
src/assets/images/agent-thumb.png
Normal file
BIN
src/assets/images/agent-thumb.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 67 KiB |
@@ -122,7 +122,8 @@
|
||||
|
||||
const onGenerateClick = async () => {
|
||||
const data = componentRef.value?.getApiData?.() || {}
|
||||
const subordNode = stateManager.getSubordNodeByID(attrs.node.id)
|
||||
const subordNode = stateManager.getSubordNodeById(attrs.node.id)
|
||||
const subordNodes = stateManager.getSubordNodes(attrs.node.id)
|
||||
emit('update-data', componentRef.value?.data)
|
||||
if(!attrs.node?.data?.originalImage)console.log('originalImage 找不到原始图片')
|
||||
|
||||
@@ -131,32 +132,32 @@
|
||||
imageUrl: attrs.node?.data?.originalImage,
|
||||
...data,
|
||||
}
|
||||
console.log(subordNode)
|
||||
const taskList = await currentComponent.value.api(apiData).then((rv)=>{
|
||||
return rv
|
||||
}) || []
|
||||
// const taskList = [{taskId:'123'}]
|
||||
console.log(taskList)
|
||||
if (!subordNode) {
|
||||
taskList.forEach((item,index) => {
|
||||
nodeManager.createResultNode({
|
||||
positionY: index * (50 + 250),
|
||||
// if (!subordNode) {
|
||||
taskList.forEach((item,index) => {
|
||||
nodeManager.createResultNode({
|
||||
positionY: (index + subordNodes.length) * (50 + 250),
|
||||
data: {
|
||||
superiorID: attrs.node.id,
|
||||
createIndexPosition: index,
|
||||
tier: currentComponent.value.tier,
|
||||
isActive: index == 0 && subordNodes.length == 0,
|
||||
data: {
|
||||
superiorID: attrs.node.id,
|
||||
createIndexPosition: index,
|
||||
tier: currentComponent.value.tier,
|
||||
isActive: index == 0,
|
||||
data: {
|
||||
imageProcessTasks:[item],
|
||||
selectTaskId:item.taskId,
|
||||
}
|
||||
imageProcessTasks:[item],
|
||||
selectTaskId:item.taskId,
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
subordNode.data.data.url =
|
||||
'https://s3-alpha-sig.figma.com/img/8ce2/f1a4/12b93da90e5f17109e7430f14837fd14?Expires=1773619200&Key-Pair-Id=APKAQ4GOSFWCW27IBOMQ&Signature=kmLsTFtXJqfvuxj6husWlDkRDMOIRDjzUUjb7zh79GkBKihUHc0f59k5OAImHTPdaiEREUCCpn~8sQ-si5lenuauJpApCmAU~NsxjfQhuh9m5O~GiHenr2fKu0DIJ75-oCE3859fyxoSFXQgZ9PRmeb98kikMR6uRX9nI5TPUHgKO8ZgkhDBTW~iyaDT~1ybnoK7elPa6T2VzfO-bpIyY-MZ71VRq3RxwmZRxduqHEb3Dh-jjrHyh2SoQsHmUjSJOf-uYilfvpGUResZAjAq8ZVLEjvhzKC2bmCNZIp3RmhYO8ctU7pd5t91J6Xaa6jBLtGfMxbqIm652EC79K0RoA__'
|
||||
setTimeout(() => stateManager.recordState())
|
||||
}
|
||||
})
|
||||
// } else {
|
||||
// subordNode.data.data.url =
|
||||
// 'https://s3-alpha-sig.figma.com/img/8ce2/f1a4/12b93da90e5f17109e7430f14837fd14?Expires=1773619200&Key-Pair-Id=APKAQ4GOSFWCW27IBOMQ&Signature=kmLsTFtXJqfvuxj6husWlDkRDMOIRDjzUUjb7zh79GkBKihUHc0f59k5OAImHTPdaiEREUCCpn~8sQ-si5lenuauJpApCmAU~NsxjfQhuh9m5O~GiHenr2fKu0DIJ75-oCE3859fyxoSFXQgZ9PRmeb98kikMR6uRX9nI5TPUHgKO8ZgkhDBTW~iyaDT~1ybnoK7elPa6T2VzfO-bpIyY-MZ71VRq3RxwmZRxduqHEb3Dh-jjrHyh2SoQsHmUjSJOf-uYilfvpGUResZAjAq8ZVLEjvhzKC2bmCNZIp3RmhYO8ctU7pd5t91J6Xaa6jBLtGfMxbqIm652EC79K0RoA__'
|
||||
// setTimeout(() => stateManager.recordState())
|
||||
// }
|
||||
}
|
||||
//删除功能卡片
|
||||
const onDeleteClick = ()=>{
|
||||
|
||||
@@ -271,6 +271,8 @@
|
||||
> .image {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
max-height: 200px;
|
||||
object-fit: contain;
|
||||
}
|
||||
> .status{
|
||||
width: 100%;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { getTaskidResult } from '@/api/flow-canvas'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
// interface NodeOptions {
|
||||
// }
|
||||
export class GenerateManager {
|
||||
|
||||
@@ -135,7 +135,7 @@ export class StateManager {
|
||||
/** 获取节点 */
|
||||
getNodeById(id: string) { return this.nodes.value.find((node: NodesItem) => node.id === id) }
|
||||
/** 获取下级节点 */
|
||||
getSubordNodeByID(id: string) { return this.nodes.value.find((node: NodesItem) => node.data.superiorID === id) }
|
||||
getSubordNodeById(id: string) { return this.nodes.value.find((node: NodesItem) => node.data.superiorID === id) }
|
||||
getLastNode() { console.log(this.nodes.value); return this.nodes.value[this.nodes.value.length - 1] }
|
||||
/** 设置工具 */
|
||||
setTool(tool: string) { this.tool.value = tool }
|
||||
@@ -145,6 +145,8 @@ export class StateManager {
|
||||
setNodesDraggable(v: boolean) { this.nodesDraggable.value = v }
|
||||
/** 设置是否可以平移画布 */
|
||||
setPanOnDrag(v: boolean) { this.panOnDrag.value = v }
|
||||
/** 获取所有下级节点 */
|
||||
getSubordNodes(id: string) { return this.nodes.value.filter((node: NodesItem) => node.data.superiorID === id) }
|
||||
/** 设置节点层级至最顶部 */
|
||||
bringToFont(id) {
|
||||
const fromIndex = this.nodes.value.findIndex(item => item.id === id)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
:rehype-plugins="[rehypeRaw]"
|
||||
>
|
||||
<template v-slot:s-ReportCard="" {children:children,...attrs}>
|
||||
<ReportCard :report="{ title: attrs.title, content: attrs.content }" />
|
||||
<ReportCard :report="{ title: attrs.title, content: attrs.content }" @click="handleClickReport(content)" />
|
||||
</template>
|
||||
</VueMarkdown>
|
||||
</div>
|
||||
@@ -77,7 +77,7 @@
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import gsap from 'gsap'
|
||||
import userThumb from '@/assets/images/user-thumb.jpg'
|
||||
import agentThumb from '@/assets/images/agent-thumb.jpg'
|
||||
import agentThumb from '@/assets/images/agent-thumb.png'
|
||||
import ReportCard from './ReportCard.vue'
|
||||
import UrlCard from './UrlCard.vue'
|
||||
import { VueMarkdown } from '@crazydos/vue-markdown'
|
||||
@@ -92,7 +92,7 @@
|
||||
}>()
|
||||
|
||||
const emit = defineEmits(['regenerate'])
|
||||
|
||||
|
||||
const imageList = computed(() => {
|
||||
const { imageUrls } = props.content
|
||||
const list = []
|
||||
@@ -195,7 +195,15 @@
|
||||
|
||||
const toggleThinkingCollapsed = () => {
|
||||
props.content.thinkingCollapsed = !props.content.thinkingCollapsed
|
||||
}
|
||||
|
||||
const handleClickReport = (data) => {
|
||||
// 点击显示报告
|
||||
}
|
||||
const handleClickUrls = (data) => {
|
||||
// 点击显示来源
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@@ -235,6 +243,10 @@
|
||||
font-size: 1.4rem;
|
||||
width: 82%;
|
||||
}
|
||||
&.is-user .message-context {
|
||||
width: fit-content;
|
||||
max-width: 82%;
|
||||
}
|
||||
}
|
||||
.operate {
|
||||
margin-top: 1.3rem;
|
||||
|
||||
Reference in New Issue
Block a user