fix
This commit is contained in:
@@ -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',
|
||||
})
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
Reference in New Issue
Block a user