Merge branch 'main' of http://18.167.251.121:10003/aidlab/FiDA_Front
This commit is contained in:
@@ -18,15 +18,18 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, onMounted } from 'vue'
|
||||
import { ref, watch, onMounted, computed } from 'vue'
|
||||
import Agent from './components/Agent.vue'
|
||||
import Preview from './components/Preview.vue'
|
||||
import VersionTreeIndex from './components/versionTree/index.vue'
|
||||
import { useProjectStore } from '@/stores'
|
||||
import { getProjectInfo } from '@/api/agent'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
|
||||
const agentTitle = ref('Retro Sofa Sketch')
|
||||
const previewType = ref<'sketch' | 'report'>('sketch')
|
||||
const route = useRoute()
|
||||
|
||||
const VersionTreeIndexRef = ref()
|
||||
const agentRef = ref()
|
||||
@@ -47,7 +50,17 @@
|
||||
agentRef.value?.inputRef?.addReportTag('Restore')
|
||||
}
|
||||
|
||||
const proJectId = computed(() => route.params.id)
|
||||
const projectStore = useProjectStore()
|
||||
watch(
|
||||
() => proJectId.value,
|
||||
(newVal, oldVal) => {
|
||||
if (newVal) {
|
||||
projectStore.setId(newVal)
|
||||
|
||||
}
|
||||
}
|
||||
)
|
||||
watch(
|
||||
() => projectStore.state.id,
|
||||
(newVal, oldVal) => {
|
||||
|
||||
Reference in New Issue
Block a user