|
@@ -18,10 +18,14 @@
|
|
|
<el-icon><Edit /></el-icon>
|
|
<el-icon><Edit /></el-icon>
|
|
|
编辑
|
|
编辑
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button type="danger" size="small" class="custom-button">
|
|
|
|
|
|
|
+ <el-button type="danger" v-if="model.status===1" @click="handleToggle(false)" size="small" class="custom-button">
|
|
|
<el-icon><SwitchButton /></el-icon>
|
|
<el-icon><SwitchButton /></el-icon>
|
|
|
禁用
|
|
禁用
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button type="success" v-if="model.status===0" @click="handleToggle(true)" size="small" class="custom-button">
|
|
|
|
|
+ <el-icon><SwitchButton /></el-icon>
|
|
|
|
|
+ 启用
|
|
|
|
|
+ </el-button>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 顶部信息区(单卡片,左右分布) -->
|
|
<!-- 顶部信息区(单卡片,左右分布) -->
|
|
@@ -191,12 +195,13 @@ const route = useRoute()
|
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
|
const model = ref<ModelConfigVo>(route.query.model)
|
|
const model = ref<ModelConfigVo>(route.query.model)
|
|
|
model.value = {
|
|
model.value = {
|
|
|
|
|
+ id:0,
|
|
|
modelName: "GPT-4",
|
|
modelName: "GPT-4",
|
|
|
modelType:"大语言模型(LLM)",
|
|
modelType:"大语言模型(LLM)",
|
|
|
modelVersion:"gpt-4-1106-preview",
|
|
modelVersion:"gpt-4-1106-preview",
|
|
|
baseUrl:"https://api.openai.com/v1/chat/completions",
|
|
baseUrl:"https://api.openai.com/v1/chat/completions",
|
|
|
apiKey: "",
|
|
apiKey: "",
|
|
|
- status:1,
|
|
|
|
|
|
|
+ status:0,
|
|
|
priority:10,
|
|
priority:10,
|
|
|
description:"GPT-4是OpenAI最先进的大型语言模型,在各种专业和学术基准上表现最佳。相比GPT-3.5,GPT-4在创造性写作、编码和解决复杂问题方面表现出显著提升,能更好地遵循用户意图,理解和生成更长的内容。",
|
|
description:"GPT-4是OpenAI最先进的大型语言模型,在各种专业和学术基准上表现最佳。相比GPT-3.5,GPT-4在创造性写作、编码和解决复杂问题方面表现出显著提升,能更好地遵循用户意图,理解和生成更长的内容。",
|
|
|
createTime:"2025-05-15 10:30:15",
|
|
createTime:"2025-05-15 10:30:15",
|
|
@@ -235,6 +240,13 @@ onMounted(() => {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
// 方法
|
|
// 方法
|
|
|
|
|
+const handleToggle = async (value:boolean) =>{
|
|
|
|
|
+ const res = await toggleStatus(value, model.id);
|
|
|
|
|
+ if(res.code === 0){
|
|
|
|
|
+ model.value.status = model.value.status === 1 ? 0 : 1;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const handleModelAdd = () => {
|
|
const handleModelAdd = () => {
|
|
|
drawerVisible.value = true
|
|
drawerVisible.value = true
|
|
|
}
|
|
}
|