Commit 9ba2dabd by renyizhao

模型列表

parent df631fb9
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
:index="'/computingResource/resourceList?type='+item.id"> :index="'/computingResource/resourceList?type='+item.id">
{{ item.name }} {{ item.name }}
</el-menu-item> </el-menu-item>
<el-menu-item :index="'/computingResource/resourceList?type='+999">AI token</el-menu-item>
</el-sub-menu> </el-sub-menu>
<el-menu-item index="/industryApplications/index">解决方案</el-menu-item> <el-menu-item index="/industryApplications/index">解决方案</el-menu-item>
......
...@@ -151,6 +151,12 @@ ...@@ -151,6 +151,12 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="AI token" :name="999">
<div class="model-list">
<model-card v-for="m in models" :key="m.modelName" :model="m" />
</div>
</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
...@@ -293,6 +299,7 @@ import request from '@/utils/request' ...@@ -293,6 +299,7 @@ import request from '@/utils/request'
import {PayOrderStatusEnum} from "@/utils/constants.js"; import {PayOrderStatusEnum} from "@/utils/constants.js";
import PDFObject from 'pdfobject'; import PDFObject from 'pdfobject';
import axios from "axios"; import axios from "axios";
import ModelCard from '@/views/console/components/model-card.vue'
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
...@@ -377,6 +384,9 @@ function tabChange() { ...@@ -377,6 +384,9 @@ function tabChange() {
} }
function getList() { function getList() {
if(tabActive.value === 999) {
return
}
getRListByCategory({categoryId: tabActive.value, pageNo: pageNo.value, pageSize: pageSize.value}).then(res => { getRListByCategory({categoryId: tabActive.value, pageNo: pageNo.value, pageSize: pageSize.value}).then(res => {
total.value = res.data.total total.value = res.data.total
tableData.value = res.data.list tableData.value = res.data.list
...@@ -623,10 +633,16 @@ const clearProtocol = () => { ...@@ -623,10 +633,16 @@ const clearProtocol = () => {
protocol.value = true protocol.value = true
} }
onMounted(() => { const models = ref([])
function getModelList() {
modelsWithPricing().then(res => { modelsWithPricing().then(res => {
console.log('res', res) console.log('res', res)
models.value = res.data || []
}) })
}
onMounted(() => {
getModelList()
}) })
</script> </script>
...@@ -929,4 +945,10 @@ onMounted(() => { ...@@ -929,4 +945,10 @@ onMounted(() => {
//overflow: hidden; //overflow: hidden;
overflow-y: auto; overflow-y: auto;
} }
.model-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
gap: 16px;
}
</style> </style>
...@@ -20,10 +20,11 @@ ...@@ -20,10 +20,11 @@
<div class="card-footer"> <div class="card-footer">
<div class="tag-price">收费价格</div> <div class="tag-price">收费价格</div>
<div class="price-text"> <div class="price-text">
<span>输入 <b>¥{{ formatPrice(model.inputPrice) }}</b></span> <span>输入:<b>¥{{ formatPrice(model.inputPrice) }}</b></span>
<span class="divider">/</span> <span class="unit"> / 1M tokens</span>
<span>输出 <b>¥{{ formatPrice(model.outputPrice) }}</b></span> <span class="divider"></span>
<span class="unit"> / 1k tokens</span> <span>输出:<b>¥{{ formatPrice(model.outputPrice) }}</b></span>
<span class="unit"> / 1M tokens</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -73,13 +74,13 @@ function formatPrice(price) { ...@@ -73,13 +74,13 @@ function formatPrice(price) {
.tag-top { .tag-top {
position: absolute; position: absolute;
top: 0; top: 0;
right: 24px; right: 0px;
background: linear-gradient(135deg, #ff6b6b, #ee5a52); background: linear-gradient(135deg, #ff6b6b, #ee5a52);
color: #fff; color: #fff;
font-size: 12px; font-size: 12px;
font-weight: 500; font-weight: 500;
padding: 5px 14px; padding: 5px 14px;
border-radius: 0 0 6px 6px; border-radius: 0 6px 0px 6px;
line-height: 1.4; line-height: 1.4;
} }
...@@ -153,9 +154,15 @@ function formatPrice(price) { ...@@ -153,9 +154,15 @@ function formatPrice(price) {
font-size: 13px; font-size: 13px;
color: #666; color: #666;
display: flex; display: flex;
height: 26px;
align-items: center; align-items: center;
flex-wrap: wrap; // flex-wrap: wrap;
& span {
display: block;
height: 26px;
display: flex;
align-items: center;
}
b { b {
color: #ee5a52; color: #ee5a52;
font-weight: 600; font-weight: 600;
...@@ -163,8 +170,7 @@ function formatPrice(price) { ...@@ -163,8 +170,7 @@ function formatPrice(price) {
} }
.divider { .divider {
color: #ccc; margin: 0 8px;
margin: 0 6px;
} }
.unit { .unit {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment