From f8312b1487c801236905c39395a95514df75e004 Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期三, 04 六月 2025 11:12:30 +0800 Subject: [PATCH] 问题模版配置 --- src/views/ai/model/template/index.vue | 60 ++++++++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 40 insertions(+), 20 deletions(-) diff --git a/src/views/ai/model/template/index.vue b/src/views/ai/model/template/index.vue index 9d3f2c3..b0b4aa6 100644 --- a/src/views/ai/model/template/index.vue +++ b/src/views/ai/model/template/index.vue @@ -8,31 +8,44 @@ :inline="true" label-width="68px" > - <el-form-item label="模型编号" prop="modelCode"> + <el-form-item label="问题编号" prop="questionCode"> <el-input - v-model="queryParams.modelCode" - placeholder="请输入模型编号" + v-model="queryParams.questionCode" + placeholder="请输入问题编号" clearable @keyup.enter="handleQuery" class="!w-240px" /> </el-form-item> - <el-form-item label="模型名称" prop="modelName"> + <el-form-item label="问题名称" prop="questionName"> <el-input - v-model="queryParams.modelName" - placeholder="请输入模型名称" + v-model="queryParams.questionName" + placeholder="请输入问题名称" clearable @keyup.enter="handleQuery" class="!w-240px" /> + </el-form-item> + <el-form-item label="模型名称" prop="modelId"> + <el-select v-model="queryParams.modelId" + clearable + filterable + :fit-input-width="false" placeholder="请选择模型"> + <el-option + v-for="item in scheduleModelList" + :key="item.id" + :label="item.modelName" + :value="item.id" + /> + </el-select> </el-form-item> <el-form-item> <el-button @click="handleQuery"> - <Icon icon="ep:search" class="mr-5px" /> + <Icon icon="ep:search" class="mr-5px"/> 搜索 </el-button> <el-button @click="resetQuery"> - <Icon icon="ep:refresh" class="mr-5px" /> + <Icon icon="ep:refresh" class="mr-5px"/> 重置 </el-button> <el-button @@ -41,7 +54,7 @@ @click="openForm('create')" v-hasPermi="['ai:question-template:create']" > - <Icon icon="ep:plus" class="mr-5px" /> + <Icon icon="ep:plus" class="mr-5px"/> 新增 </el-button> </el-form-item> @@ -51,13 +64,16 @@ <!-- 列表 --> <ContentWrap> <el-table v-loading="loading" :data="list"> - <el-table-column label="模型id" align="center" prop="modelId" min-width="100"/> - <el-table-column label="问题编号" header-align="center" align="left" prop="questionCode" min-width="100"/> - <el-table-column label="问题内容" align="center" prop="questionName" min-width="100"/> - <el-table-column label="问题名称" header-align="center" align="left" prop="questionContent" min-width="200"/> - <el-table-column label="输入个数" align="center" prop="isEnable" min-width="100"/> - <el-table-column label="是否启用" align="center" prop="portLength" min-width="100"/> - <el-table-column label="备注" header-align="center" align="left" prop="remark" min-width="200" /> + <el-table-column label="模型名称" align="center" prop="modelName" min-width="100"/> + <el-table-column label="问题编号" align="center" prop="questionCode" min-width="100"/> + <el-table-column label="问题名称" align="center" prop="questionName" min-width="100"/> + <el-table-column label="输入个数" align="center" prop="dataLength" min-width="100"/> + <el-table-column label="是否启用" align="center" prop="isEnable" min-width="100"> + <template #default="scope"> + <dict-tag :type="DICT_TYPE.COM_IS_INT" :value="scope.row.isEnable"/> + </template> + </el-table-column> + <el-table-column label="备注" align="center" prop="remark" min-width="200"/> <el-table-column label="操作" align="center" min-width="100" fixed="right"> <template #default="scope"> <el-button @@ -89,7 +105,7 @@ </ContentWrap> <!-- 表单弹窗:添加/修改 --> - <TemplateForm ref="formRef" @success="getList" /> + <TemplateForm ref="formRef" @success="getList"/> </template> <script lang="ts" setup> @@ -98,6 +114,8 @@ import download from '@/utils/download' 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'}) @@ -110,16 +128,18 @@ const queryParams = reactive({ pageNo: 1, pageSize: 10, - modelCode: undefined, - modelName: undefined + questionCode: undefined, + questionName: undefined, + modelId: undefined, }) const queryFormRef = ref() // 搜索的表单 const exportLoading = ref(false) // 导出的加载中 - /** 查询列表 */ 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 -- Gitblit v1.9.3