diff --git a/src/oj/ai/analysis.vue b/src/oj/ai/analysis.vue index 668571e..dbd13d5 100644 --- a/src/oj/ai/analysis.vue +++ b/src/oj/ai/analysis.vue @@ -6,7 +6,7 @@ 查询 -
+
- + + + + @@ -41,17 +35,16 @@ import { formatISO, sub, type Duration } from "date-fns" import { NButton } from "naive-ui" import WeeklyChart from "./components/WeeklyChart.vue" import Details from "./components/Details.vue" +import AI from "./components/AI.vue" import { useUserStore } from "~/shared/store/user" +import { useAIStore } from "../store/ai" const userStore = useUserStore() +const aiStore = useAIStore() const start = ref("") const end = ref("") const username = ref("") -const query = reactive({ - username: "", - duration: "months:6", -}) const options: SelectOption[] = [ { label: "一节课内", value: "hours:1" }, @@ -65,7 +58,7 @@ const options: SelectOption[] = [ ] const subOptions = computed(() => { - let dur = options.find((it) => it.value === query.duration) ?? options[0] + let dur = options.find((it) => it.value === aiStore.duration) ?? options[0] const x = dur.value!.toString().split(":") const unit = x[0] const n = x[1] @@ -79,8 +72,8 @@ function updateRange() { } function search() { - query.username = username.value + aiStore.username = username.value } -watch(() => query.duration, updateRange, { immediate: true }) +watch(() => aiStore.duration, updateRange, { immediate: true }) diff --git a/src/oj/ai/components/AI.vue b/src/oj/ai/components/AI.vue new file mode 100644 index 0000000..4325cfb --- /dev/null +++ b/src/oj/ai/components/AI.vue @@ -0,0 +1,25 @@ + + diff --git a/src/oj/ai/components/Details.vue b/src/oj/ai/components/Details.vue index f91e5e3..9b4b6f7 100644 --- a/src/oj/ai/components/Details.vue +++ b/src/oj/ai/components/Details.vue @@ -1,33 +1,40 @@