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 onGenerateClick = async () => {
|
||||||
const data = componentRef.value?.getApiData?.() || {}
|
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)
|
emit('update-data', componentRef.value?.data)
|
||||||
if(!attrs.node?.data?.originalImage)console.log('originalImage 找不到原始图片')
|
if(!attrs.node?.data?.originalImage)console.log('originalImage 找不到原始图片')
|
||||||
|
|
||||||
@@ -131,32 +132,32 @@
|
|||||||
imageUrl: attrs.node?.data?.originalImage,
|
imageUrl: attrs.node?.data?.originalImage,
|
||||||
...data,
|
...data,
|
||||||
}
|
}
|
||||||
|
console.log(subordNode)
|
||||||
const taskList = await currentComponent.value.api(apiData).then((rv)=>{
|
const taskList = await currentComponent.value.api(apiData).then((rv)=>{
|
||||||
return rv
|
return rv
|
||||||
}) || []
|
}) || []
|
||||||
// const taskList = [{taskId:'123'}]
|
// const taskList = [{taskId:'123'}]
|
||||||
console.log(taskList)
|
// if (!subordNode) {
|
||||||
if (!subordNode) {
|
taskList.forEach((item,index) => {
|
||||||
taskList.forEach((item,index) => {
|
nodeManager.createResultNode({
|
||||||
nodeManager.createResultNode({
|
positionY: (index + subordNodes.length) * (50 + 250),
|
||||||
positionY: index * (50 + 250),
|
data: {
|
||||||
|
superiorID: attrs.node.id,
|
||||||
|
createIndexPosition: index,
|
||||||
|
tier: currentComponent.value.tier,
|
||||||
|
isActive: index == 0 && subordNodes.length == 0,
|
||||||
data: {
|
data: {
|
||||||
superiorID: attrs.node.id,
|
imageProcessTasks:[item],
|
||||||
createIndexPosition: index,
|
selectTaskId:item.taskId,
|
||||||
tier: currentComponent.value.tier,
|
|
||||||
isActive: index == 0,
|
|
||||||
data: {
|
|
||||||
imageProcessTasks:[item],
|
|
||||||
selectTaskId:item.taskId,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
})
|
})
|
||||||
} else {
|
})
|
||||||
subordNode.data.data.url =
|
// } else {
|
||||||
'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__'
|
// subordNode.data.data.url =
|
||||||
setTimeout(() => stateManager.recordState())
|
// '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 = ()=>{
|
const onDeleteClick = ()=>{
|
||||||
|
|||||||
@@ -271,6 +271,8 @@
|
|||||||
> .image {
|
> .image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
max-height: 200px;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
> .status{
|
> .status{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { getTaskidResult } from '@/api/flow-canvas'
|
import { getTaskidResult } from '@/api/flow-canvas'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
// interface NodeOptions {
|
// interface NodeOptions {
|
||||||
// }
|
// }
|
||||||
export class GenerateManager {
|
export class GenerateManager {
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ export class StateManager {
|
|||||||
/** 获取节点 */
|
/** 获取节点 */
|
||||||
getNodeById(id: string) { return this.nodes.value.find((node: NodesItem) => node.id === id) }
|
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] }
|
getLastNode() { console.log(this.nodes.value); return this.nodes.value[this.nodes.value.length - 1] }
|
||||||
/** 设置工具 */
|
/** 设置工具 */
|
||||||
setTool(tool: string) { this.tool.value = tool }
|
setTool(tool: string) { this.tool.value = tool }
|
||||||
@@ -145,6 +145,8 @@ export class StateManager {
|
|||||||
setNodesDraggable(v: boolean) { this.nodesDraggable.value = v }
|
setNodesDraggable(v: boolean) { this.nodesDraggable.value = v }
|
||||||
/** 设置是否可以平移画布 */
|
/** 设置是否可以平移画布 */
|
||||||
setPanOnDrag(v: boolean) { this.panOnDrag.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) {
|
bringToFont(id) {
|
||||||
const fromIndex = this.nodes.value.findIndex(item => item.id === id)
|
const fromIndex = this.nodes.value.findIndex(item => item.id === id)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
:rehype-plugins="[rehypeRaw]"
|
:rehype-plugins="[rehypeRaw]"
|
||||||
>
|
>
|
||||||
<template v-slot:s-ReportCard="" {children:children,...attrs}>
|
<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>
|
</template>
|
||||||
</VueMarkdown>
|
</VueMarkdown>
|
||||||
</div>
|
</div>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import gsap from 'gsap'
|
import gsap from 'gsap'
|
||||||
import userThumb from '@/assets/images/user-thumb.jpg'
|
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 ReportCard from './ReportCard.vue'
|
||||||
import UrlCard from './UrlCard.vue'
|
import UrlCard from './UrlCard.vue'
|
||||||
import { VueMarkdown } from '@crazydos/vue-markdown'
|
import { VueMarkdown } from '@crazydos/vue-markdown'
|
||||||
@@ -195,7 +195,15 @@
|
|||||||
|
|
||||||
const toggleThinkingCollapsed = () => {
|
const toggleThinkingCollapsed = () => {
|
||||||
props.content.thinkingCollapsed = !props.content.thinkingCollapsed
|
props.content.thinkingCollapsed = !props.content.thinkingCollapsed
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleClickReport = (data) => {
|
||||||
|
// 点击显示报告
|
||||||
|
}
|
||||||
|
const handleClickUrls = (data) => {
|
||||||
|
// 点击显示来源
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@@ -235,6 +243,10 @@
|
|||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
width: 82%;
|
width: 82%;
|
||||||
}
|
}
|
||||||
|
&.is-user .message-context {
|
||||||
|
width: fit-content;
|
||||||
|
max-width: 82%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.operate {
|
.operate {
|
||||||
margin-top: 1.3rem;
|
margin-top: 1.3rem;
|
||||||
|
|||||||
Reference in New Issue
Block a user