<template>
|
<div class="container">
|
<Breadcrumb :items="['大模型', '大模型管理']" />
|
<a-row :gutter="20" align="stretch">
|
<a-col :span="24">
|
<a-card class="general-card" :title="$t('大模型管理')">
|
<a-row justify="space-between">
|
<a-col :span="24">
|
<a-tabs
|
:active-key="activeKey"
|
type="line"
|
:editable="true"
|
@tab-click="changeTabs"
|
@add="handleAdd"
|
@delete="handleDelete"
|
>
|
<a-tab-pane
|
v-for="(item, index) of data"
|
:key="item.key"
|
:title="item.title"
|
:closable="index >= 4"
|
>
|
<div style="display: flex; flex-wrap: wrap;justify-content: space-between;">
|
<div class="card-wrap" v-for="(item, index) of data" :key="index">
|
<a-card :bordered="false" hoverable >
|
<template #cover>
|
<div
|
>
|
<img
|
:style="{ width: '100%', transform: 'translateY(-20px)' }"
|
alt="dessert"
|
src="https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/a20012a2d4d5b9db43dfc6a01fe508c0.png~tplv-uwbnlip3yd-webp.webp"
|
/>
|
</div>
|
</template>
|
<div class="arco-card-body-content">
|
<div class="arco-card-body-content-title">
|
{{ item.title }}
|
</div>
|
</div>
|
<div style="position: absolute; bottom: 1rem; right: 1rem;">
|
<a-space>
|
<a-button>
|
删除
|
</a-button>
|
<editModel></editModel>
|
</a-space>
|
</div>
|
</a-card>
|
</div>
|
</div>
|
</a-tab-pane>
|
</a-tabs>
|
</a-col>
|
<div> </div>
|
<a-input-search
|
:placeholder="$t('cardList.searchInput.placeholder')"
|
style="width: 240px; position: absolute; top: 60px; right: 60px"
|
/>
|
<div style="position: absolute; top: 60px; right: 20px">
|
<addModel></addModel>
|
</div>
|
|
</a-row>
|
</a-card>
|
</a-col>
|
</a-row>
|
</div>
|
</template>
|
|
<script lang="ts" setup>
|
import { ref, reactive, nextTick } from 'vue';
|
|
import QualityInspection from './components/quality-inspection.vue';
|
import TheService from './components/the-service.vue';
|
import RulesPreset from './components/rules-preset.vue';
|
import CustomSettings from './components/custom-settings.vue';
|
import addModel from "@/views/dmx/model/components/addModel.vue";
|
import editModel from "@/views/dmx/model/components/editModel.vue";
|
|
let count = 5;
|
const activeKey = ref(1);
|
const data = ref([
|
{
|
key: 1,
|
title: '全部',
|
content: 'Content of Tab Panel 1',
|
},
|
{
|
key: 2,
|
title: '内容质检',
|
content: 'Content of Tab Panel 2',
|
},
|
{
|
key: 3,
|
title: '开通服务',
|
content: 'Content of Tab Panel 3',
|
},
|
{
|
key: 4,
|
title: '规则预置',
|
content: 'Content of Tab Panel 4',
|
},
|
]);
|
const changeTabs = (val) => {
|
activeKey.value = val;
|
}
|
const handleAdd = () => {
|
visible.value = true;
|
};
|
const handleDelete = (key: any) => {
|
data.value = data.value.filter((item) => item.key !== key);
|
};
|
|
const visible = ref(false);
|
const formRef = ref(null);
|
const form = reactive({
|
size: 'medium',
|
name: '',
|
});
|
const handleOk = () => {
|
count += 1;
|
formRef.value.validate().then((res) => {
|
if (res) {
|
return;
|
}
|
data.value = data.value.concat({
|
key: count,
|
title: `${form.name}`,
|
content: ``,
|
});
|
visible.value = false;
|
activeKey.value = count;
|
});
|
nextTick(() => {
|
visible.value = true;
|
|
})
|
return false;
|
};
|
const handleCancel = () => {
|
formRef.value.resetFields();
|
visible.value = false;
|
};
|
const handleSubmit = ({ values, errors }) => {
|
this.$refs.formRef.validate().then((res, a, b) => {
|
debugger;
|
console.log('values', values);
|
});
|
};
|
</script>
|
|
<script lang="ts">
|
export default {
|
name: 'Card',
|
};
|
</script>
|
|
<style scoped lang="less">
|
.container {
|
padding: 0 20px 20px 20px;
|
:deep(.arco-list-content) {
|
overflow-x: hidden;
|
}
|
|
:deep(.arco-card-meta-title) {
|
font-size: 14px;
|
}
|
}
|
:deep(.arco-list-col) {
|
display: flex;
|
flex-direction: row;
|
flex-wrap: wrap;
|
justify-content: space-between;
|
}
|
|
:deep(.arco-list-item) {
|
width: 33%;
|
}
|
|
:deep(.block-title) {
|
margin: 0 0 12px 0;
|
font-size: 14px;
|
}
|
:deep(.list-wrap) {
|
// min-height: 140px;
|
.list-row {
|
align-items: stretch;
|
.list-col {
|
margin-bottom: 16px;
|
}
|
}
|
:deep(.arco-space) {
|
width: 100%;
|
.arco-space-item {
|
&:last-child {
|
flex: 1;
|
}
|
}
|
}
|
}
|
.card-wrap {
|
width: 320px;
|
height: 350px;
|
margin: 30px;
|
transition: all 0.3s;
|
border: 1px solid var(--color-neutral-3);
|
border-radius: 4px;
|
position: relative;
|
&:hover {
|
transform: translateY(-4px);
|
// box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
|
}
|
:deep(.arco-card) {
|
height: 100%;
|
border-radius: 4px;
|
.arco-card-body {
|
height: 100%;
|
.arco-space {
|
width: 100%;
|
height: 100%;
|
.arco-space-item {
|
height: 100%;
|
&:last-child {
|
flex: 1;
|
}
|
.arco-card-meta {
|
height: 100%;
|
display: flex;
|
flex-flow: column;
|
.arco-card-meta-content {
|
flex: 1;
|
.arco-card-meta-description {
|
margin-top: 8px;
|
color: rgb(var(--gray-6));
|
line-height: 20px;
|
font-size: 12px;
|
}
|
}
|
.arco-card-meta-footer {
|
margin-top: 0;
|
}
|
}
|
}
|
}
|
}
|
}
|
:deep(.arco-card-meta-title) {
|
display: flex;
|
align-items: center;
|
|
// To prevent the shaking
|
line-height: 28px;
|
}
|
:deep(.arco-skeleton-line) {
|
&:last-child {
|
display: flex;
|
justify-content: flex-end;
|
margin-top: 20px;
|
}
|
}
|
}
|
</style>
|