fix
This commit is contained in:
@@ -9,7 +9,7 @@ import request from '@/utils/request'
|
|||||||
*/
|
*/
|
||||||
export const getChatNodeDetail = (data) => {
|
export const getChatNodeDetail = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/project/${data.projectId}/chat/node/${data.id}`,
|
url: `/api/version/${data.projectId}/chat/node/${data.id}`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ export const getChatNodeDetail = (data) => {
|
|||||||
*/
|
*/
|
||||||
export const versionTree = (data) => {
|
export const versionTree = (data) => {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/project/${data.projectId}/chat/tree`,
|
url: `/api/version/${data.projectId}/chat/tree`,
|
||||||
method: 'get',
|
method: 'get',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -334,7 +334,9 @@
|
|||||||
}
|
}
|
||||||
.agent-container {
|
.agent-container {
|
||||||
// width: 39%;
|
// width: 39%;
|
||||||
width: 63.4rem;
|
// width: 63.4rem;
|
||||||
|
flex: 1;
|
||||||
|
margin-right: 2.7rem;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 2rem;
|
border-radius: 2rem;
|
||||||
box-shadow: 0px 15px 21px 0px #0000000d;
|
box-shadow: 0px 15px 21px 0px #0000000d;
|
||||||
|
|||||||
@@ -25,52 +25,21 @@ const props = defineProps({
|
|||||||
const versionsList = ref([])
|
const versionsList = ref([])
|
||||||
|
|
||||||
const projectStore = useProjectStore()
|
const projectStore = useProjectStore()
|
||||||
watch(()=>projectStore.state.id, (newVal, oldVal) => {
|
watch(()=>props.versionTreeData?.drawer, (newVal, oldVal) => {
|
||||||
|
console.log(newVal)
|
||||||
if(newVal){
|
if(newVal){
|
||||||
versionTree({
|
versionTree({
|
||||||
projectId: projectStore.state.id
|
projectId: projectStore.state.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
|
// setVersionsList
|
||||||
// versionsList.value = res.data
|
// versionsList.value = res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const setVersionsList = (res)=>{
|
const setVersionsList = (res)=>{
|
||||||
versionsList.value = [{
|
versionsList.value = [res]
|
||||||
"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": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
//设置versionId
|
//设置versionId
|
||||||
function traverseArray(items,father, callback) {
|
function traverseArray(items,father, callback) {
|
||||||
for (let i = 0; i < items.length; i++) {
|
for (let i = 0; i < items.length; i++) {
|
||||||
@@ -133,7 +102,7 @@ const versionDelete = (versionDetail)=>{
|
|||||||
}
|
}
|
||||||
|
|
||||||
let data = reactive({})
|
let data = reactive({})
|
||||||
onMounted(() => {setVersionsList('')})
|
// onMounted(() => {setVersionsList('')})
|
||||||
onUnmounted(() => {})
|
onUnmounted(() => {})
|
||||||
defineExpose({})
|
defineExpose({})
|
||||||
const {} = toRefs(data)
|
const {} = toRefs(data)
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<setting />
|
<setting />
|
||||||
<flow-canvas />
|
<!-- <flow-canvas /> -->
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user