import { useRouter } from 'vue-router' import { NDatePicker, NRadioButton, NRadioGroup, NButton, NSelect, } from 'naive-ui' import GanttCom from '../Gantt' import { getDDList } from '@/api/Gantt/gantt' import { onBeforeMount } from 'vue' export default defineComponent({ setup() { const range = ref([new Date('2000-01-01 00:00:00').getTime(), Date.now()]) //const value = ref('year') const value = ref('day') const types = ref([]) const router = useRouter() const editEvent = () => { console.log(router) router.push('/gantt/mainEdit') } onBeforeMount(async () => { await getDDOptions() }) const ddOptions = ref([]) async function getDDOptions() { const { code, data } = await getDDList() if (code === 200) { ddOptions.value = data.list // types.value = ddOptions.value.map(item => item.id) } } const ganttRef = ref(null) function searchGanttData() { ganttRef.value.refresh = true } return () => ( <>
{/* */} {/* 编辑事件 */} 搜索
) }, })