2024-12-20 10:06:46 +00:00
|
|
|
import { useRouter } from 'vue-router'
|
|
|
|
import { NDatePicker, NRadioButton, NRadioGroup, NButton } from 'naive-ui'
|
2024-12-19 06:48:14 +00:00
|
|
|
import GanttCom from '../Gantt'
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
setup() {
|
|
|
|
const range = ref()
|
|
|
|
const value = ref('day')
|
2024-12-20 10:06:46 +00:00
|
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
const editEvent = () => {
|
|
|
|
console.log(router)
|
|
|
|
router.push('/gantt/mainEdit')
|
|
|
|
}
|
2024-12-19 06:48:14 +00:00
|
|
|
return () => (
|
|
|
|
<>
|
|
|
|
<div class="flex gap-2">
|
|
|
|
<NDatePicker v-model:value={range.value} type="daterange" clearable />
|
|
|
|
<NRadioGroup v-model:value={value.value} name="radiobuttongroup">
|
|
|
|
<NRadioButton value="hour" label="日" />
|
|
|
|
<NRadioButton value="day" label="月" />
|
|
|
|
</NRadioGroup>
|
2024-12-20 10:06:46 +00:00
|
|
|
<NButton class="ml-auto" type="primary" onClick={editEvent}>
|
|
|
|
编辑事件
|
|
|
|
</NButton>
|
2024-12-19 06:48:14 +00:00
|
|
|
</div>
|
|
|
|
<GanttCom scale={value.value} />
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
},
|
|
|
|
})
|