feat: 模型管理优化

This commit is contained in:
wangdan-fit2cloud 2023-12-04 16:55:54 +08:00
parent 8bc868becd
commit 16439d663a
5 changed files with 46 additions and 35 deletions

View File

@ -24,7 +24,7 @@ const settingRouter = {
meta: { meta: {
icon: 'app-template', icon: 'app-template',
iconActive: 'app-template-active', iconActive: 'app-template-active',
title: '模管理', title: '模管理',
activeMenu: '/setting', activeMenu: '/setting',
parentPath: '/setting', parentPath: '/setting',
parentName: 'setting' parentName: 'setting'

View File

@ -158,6 +158,13 @@ h4 {
padding: calc(var(--app-base-px) * 3); padding: calc(var(--app-base-px) * 3);
} }
.pt-0 {
padding-top: 0;
}
.pb-0 {
padding-bottom: 0;
}
.flex { .flex {
display: flex; display: flex;
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="application-list-container p-24"> <div class="application-list-container p-24" style="padding-top: 16px">
<div class="flex-between"> <div class="flex-between mb-8">
<h3>应用</h3> <h3>应用</h3>
<el-input <el-input
v-model="pageConfig.name" v-model="pageConfig.name"

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="dataset-list-container p-24"> <div class="dataset-list-container p-24" style="padding-top: 16px">
<div class="flex-between"> <div class="flex-between mb-8">
<h3>数据集</h3> <h3>数据集</h3>
<el-input <el-input
v-model="pageConfig.name" v-model="pageConfig.name"

View File

@ -1,5 +1,5 @@
<template> <template>
<LayoutContainer header="模管理"> <LayoutContainer header="模管理">
<div class="template-manage flex main-calc-height"> <div class="template-manage flex main-calc-height">
<div class="template-manage__left p-8 border-r"> <div class="template-manage__left p-8 border-r">
<h4 class="p-16" style="padding-bottom: 8px">供应商</h4> <h4 class="p-16" style="padding-bottom: 8px">供应商</h4>
@ -20,38 +20,42 @@
</template> </template>
</common-list> </common-list>
</div> </div>
<div class="template-manage__right p-24" v-loading="list_model_loading"> <div class="template-manage__right w-full" v-loading="list_model_loading">
<h4>{{ active_provider?.name }}</h4> <div class="p-24 pb-0">
<div class="flex-between mt-16 mb-16"> <h4>{{ active_provider?.name }}</h4>
<el-button type="primary" @click="openCreateModel(active_provider)">创建模型</el-button> <div class="flex-between mt-16 mb-16">
<el-input <el-button type="primary" @click="openCreateModel(active_provider)">创建模型</el-button>
v-model="model_search_form.name" <el-input
@change="list_model" v-model="model_search_form.name"
placeholder="按 名称 搜索" @change="list_model"
prefix-icon="Search" placeholder="按 名称 搜索"
class="w-240" prefix-icon="Search"
/> class="w-240"
/>
</div>
</div> </div>
<div class="model-list-height"> <div class="model-list-height">
<el-scrollbar> <el-scrollbar>
<el-row v-if="model_split_list.length > 0" :gutter="15"> <div class="p-24 pt-0">
<template v-for="(row, index) in model_split_list" :key="index"> <el-row v-if="model_split_list.length > 0" :gutter="15">
<el-col <template v-for="(row, index) in model_split_list" :key="index">
:xs="24" <el-col
:sm="24" :xs="24"
:md="12" :sm="24"
:lg="12" :md="12"
:xl="12" :lg="12"
class="mb-16" :xl="12"
v-for="(model, i) in row" class="mb-16"
:key="i" v-for="(model, i) in row"
> :key="i"
<ModelCard @change="list_model" :model="model" :provider_list="provider_list"> >
</ModelCard> <ModelCard @change="list_model" :model="model" :provider_list="provider_list">
</el-col> </ModelCard>
</template> </el-col>
</el-row> </template>
<el-empty description="暂无数据" v-else /> </el-row>
<el-empty description="暂无数据" v-else />
</div>
</el-scrollbar> </el-scrollbar>
</div> </div>
</div> </div>