This commit is contained in:
X1627315083@163.com
2026-02-25 15:12:04 +08:00
parent 74346516f1
commit 9e2c60e892
5 changed files with 11 additions and 124 deletions

View File

@@ -9,7 +9,7 @@ import request from '@/utils/request'
*/
export const getChatNodeDetail = (data) => {
return request({
url: `/api/project/${data.projectId}/chat/node/${data.id}`,
url: `/api/version/${data.projectId}/chat/node/${data.id}`,
method: 'get',
})
}
@@ -22,7 +22,7 @@ export const getChatNodeDetail = (data) => {
*/
export const versionTree = (data) => {
return request({
url: `/api/project/${data.projectId}/chat/tree`,
url: `/api/version/${data.projectId}/chat/tree`,
method: 'get',
})
}

View File

@@ -334,7 +334,9 @@
}
.agent-container {
// width: 39%;
width: 63.4rem;
// width: 63.4rem;
flex: 1;
margin-right: 2.7rem;
background-color: #fff;
border-radius: 2rem;
box-shadow: 0px 15px 21px 0px #0000000d;

View File

@@ -25,52 +25,21 @@ const props = defineProps({
const versionsList = ref([])
const projectStore = useProjectStore()
watch(()=>projectStore.state.id, (newVal, oldVal) => {
watch(()=>props.versionTreeData?.drawer, (newVal, oldVal) => {
console.log(newVal)
if(newVal){
versionTree({
projectId: projectStore.state.id
}).then(res => {
console.log(res)
// setVersionsList
// versionsList.value = res.data
})
}
})
const setVersionsList = (res)=>{
versionsList.value = [{
"id": "node_001",
"url": "https://example.com/images/cover_001.jpg",
"children": [
{
"id": "node_002",
"url": "https://example.com/images/cover_002.jpg",
"children": [
{
"id": "node_003",
"url": "https://example.com/images/cover_003.jpg",
"children": []
},
{
"id": "node_004",
"url": "https://example.com/images/cover_004.jpg",
"children": []
}
]
},
{
"id": "node_005",
"url": "https://example.com/images/cover_005.jpg",
"children": [
{
"id": "node_006",
"url": "https://example.com/images/cover_006.jpg",
"children": []
}
]
}
]
}]
versionsList.value = [res]
//设置versionId
function traverseArray(items,father, callback) {
for (let i = 0; i < items.length; i++) {
@@ -133,7 +102,7 @@ const versionDelete = (versionDetail)=>{
}
let data = reactive({})
onMounted(() => {setVersionsList('')})
// onMounted(() => {setVersionsList('')})
onUnmounted(() => {})
defineExpose({})
const {} = toRefs(data)

View File

@@ -16,7 +16,7 @@
</div>
</div>
<setting />
<flow-canvas />
<!-- <flow-canvas /> -->
</template>
<script setup lang="ts">

File diff suppressed because one or more lines are too long