feat:1.数据库存储功能添加(初版)2.后端REST API版本代码清理
This commit is contained in:
@@ -1,14 +1,38 @@
|
||||
<script setup lang="ts">
|
||||
import Header from './components/Header.vue'
|
||||
import Main from './components/Main/index.vue'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { ref, onMounted, computed } from 'vue'
|
||||
import FloatWindow from './components/Main/TaskTemplate/TaskSyllabus/components/FloatWindow.vue'
|
||||
import PlanModification from './components/Main/TaskTemplate/TaskSyllabus/Branch/PlanModification.vue'
|
||||
import { useAgentsStore } from '@/stores/modules/agents'
|
||||
import PlanTask from './components/Main/TaskTemplate/TaskProcess/components/PlanTask.vue'
|
||||
import AgentAllocation from './components/Main/TaskTemplate/TaskSyllabus/components/AgentAllocation.vue'
|
||||
|
||||
const isDarkMode = ref(false)
|
||||
const agentsStore = useAgentsStore()
|
||||
const mainRef = ref<{ currentTaskID: string } | null>(null)
|
||||
|
||||
// 获取当前的 taskId
|
||||
const currentTaskId = computed(() => {
|
||||
return mainRef.value?.currentTaskID || ''
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
// 等待 Main 组件挂载后获取 taskId
|
||||
setTimeout(() => {
|
||||
const mainEl = document.querySelector('.main-container')
|
||||
if (mainEl) {
|
||||
// 通过 parent 获取
|
||||
const mainParent = mainEl.parentElement
|
||||
if (mainParent) {
|
||||
const mainComponent = mainParent.querySelector('[class*="main"]')
|
||||
if (mainComponent) {
|
||||
// 尝试从 Vue 组件实例获取
|
||||
}
|
||||
}
|
||||
}
|
||||
}, 100)
|
||||
})
|
||||
// 初始化主题
|
||||
const initTheme = () => {
|
||||
const savedTheme = localStorage.getItem('theme')
|
||||
|
||||
Reference in New Issue
Block a user