| | |
| | | filterable |
| | | :fit-input-width="false" placeholder="请选择模型"> |
| | | <el-option |
| | | v-for="item in scheduleModelList" |
| | | v-for="item in aiModelList" |
| | | :key="item.id" |
| | | :label="item.modelName" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | /> |
| | | </el-select> |
| | |
| | | import * as AiQuestionTemplateApi from '@/api/ai/questiontemplate' |
| | | import TemplateForm from './templateForm.vue' |
| | | import * as AiModelApi from "@/api/ai/model/model"; |
| | | import * as ScheduleModelApi from "@/api/model/sche/model"; |
| | | |
| | | defineOptions({name: 'AiTemplate'}) |
| | | |
| | |
| | | const loading = ref(true) // 列表的加载中 |
| | | const total = ref(0) // 列表的总页数 |
| | | const list = ref([]) // 列表的数据 |
| | | const aiModelList = ref([] as AiModelApi.ModelVO[]) |
| | | const queryParams = reactive({ |
| | | pageNo: 1, |
| | | pageSize: 10, |
| | |
| | | const getList = async () => { |
| | | loading.value = true |
| | | try { |
| | | const scheduleModelList = ref([] as ScheduleModelApi.ScheduleModelVO[]) |
| | | scheduleModelList.value = await ScheduleModelApi.getScheduleModelList() |
| | | const page = await AiQuestionTemplateApi.QuestionTemplateApi.getQuestionTemplatePage(queryParams) |
| | | list.value = page.list |
| | | total.value = page.total |
| | |
| | | |
| | | /** 初始化 **/ |
| | | onMounted(async () => { |
| | | |
| | | aiModelList.value = await AiModelApi.ModelApi.getModelSimpleList(1) |
| | | await getList() |
| | | }) |
| | | </script> |