|
@@ -111,12 +111,19 @@
|
|
|
<el-row>
|
|
<el-row>
|
|
|
<span>状态</span>
|
|
<span>状态</span>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <div :class="['status', statusClass]">
|
|
|
|
|
+ 启用
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </el-row>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
</el-row>
|
|
</el-row>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="table">
|
|
<div class="table">
|
|
|
<el-table
|
|
<el-table
|
|
|
:data="models"
|
|
:data="models"
|
|
|
|
|
+ style="width: 100%"
|
|
|
|
|
+ min-height="40vh"
|
|
|
>
|
|
>
|
|
|
<el-table-column type="selection"/>
|
|
<el-table-column type="selection"/>
|
|
|
<el-table-column label="模型名称"></el-table-column>
|
|
<el-table-column label="模型名称"></el-table-column>
|
|
@@ -128,33 +135,77 @@
|
|
|
<el-table-column label="创建时间"></el-table-column>
|
|
<el-table-column label="创建时间"></el-table-column>
|
|
|
<el-table-column label="操作">
|
|
<el-table-column label="操作">
|
|
|
<template #default="slot">
|
|
<template #default="slot">
|
|
|
- <el-icon color="#1890ff"><View /></el-icon>
|
|
|
|
|
- <el-icon color="#1890ff"><Edit /></el-icon>
|
|
|
|
|
- <el-icon color="#1890ff"><List /></el-icon>
|
|
|
|
|
|
|
+ <el-icon color="#1890ff" size="25px" class="icon-gap"><View /></el-icon>
|
|
|
|
|
+ <el-icon color="#1890ff" size="25px" class="icon-gap" @click="edit(slot.$index,slot.row)"><Edit /></el-icon>
|
|
|
|
|
+ <el-icon color="#1890ff" size="25px" class="icon-gap"><List /></el-icon>
|
|
|
|
|
+ <el-icon color="#ffa8e3" size="25px" class="icon-gap"><SwitchButton /></el-icon>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
|
|
+ <el-row>
|
|
|
|
|
+ <el-col :span="2">
|
|
|
|
|
+ <span>已选择0项</span>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="2">
|
|
|
|
|
+ <el-button>批量启用</el-button>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="2">
|
|
|
|
|
+ <el-button>批量禁用</el-button>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ <el-col :span="2">
|
|
|
|
|
+ <el-button type="danger">批量删除</el-button>
|
|
|
|
|
+ </el-col>
|
|
|
|
|
+ </el-row>
|
|
|
|
|
+ <el-dialog v-model="dialogVisable">
|
|
|
|
|
+ <add-model></add-model>
|
|
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
|
|
+import addModel from './addModel.vue'
|
|
|
|
|
+
|
|
|
|
|
|
|
|
const serviceOption = ref(["OpenAI"])
|
|
const serviceOption = ref(["OpenAI"])
|
|
|
const modelNameOption = ref(["模型1","模型2"])
|
|
const modelNameOption = ref(["模型1","模型2"])
|
|
|
const modelTypeOption = ref(["类型1","类型2"])
|
|
const modelTypeOption = ref(["类型1","类型2"])
|
|
|
const modelStateOption = ref(["全部","开启","关闭"])
|
|
const modelStateOption = ref(["全部","开启","关闭"])
|
|
|
-const models = ref([])
|
|
|
|
|
|
|
+const models = ref([{}])
|
|
|
|
|
|
|
|
const modelName = ref(null)
|
|
const modelName = ref(null)
|
|
|
const modelType = ref(null)
|
|
const modelType = ref(null)
|
|
|
const service = ref(null)
|
|
const service = ref(null)
|
|
|
const modelState = ref(null)
|
|
const modelState = ref(null)
|
|
|
|
|
+const dialogVisable = ref(false)
|
|
|
|
|
+//test enabled
|
|
|
|
|
+const statusClass = ref('enabled')
|
|
|
|
|
|
|
|
|
|
+const edit = ((index,row)=>{
|
|
|
|
|
+ dialogVisable.value=true
|
|
|
|
|
+})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
|
|
|
+.status {
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ margin-top: 3px;
|
|
|
|
|
+ padding: 2px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.status.enabled {
|
|
|
|
|
+ border:1px solid #52c41a;
|
|
|
|
|
+ color: #b7eb8f;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+.status.testing {
|
|
|
|
|
+ border:1px solid #ffe58f; /* 黄色 */
|
|
|
|
|
+ color: #fab487;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
.wrapper{
|
|
.wrapper{
|
|
|
margin:10px auto;
|
|
margin:10px auto;
|
|
|
width:90%;
|
|
width:90%;
|
|
@@ -177,5 +228,9 @@ const modelState = ref(null)
|
|
|
}
|
|
}
|
|
|
.table{
|
|
.table{
|
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
|
|
|
+ width:100%;
|
|
|
|
|
+}
|
|
|
|
|
+.icon-gap{
|
|
|
|
|
+ padding-left: 5px;
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|