| | |
| | | <template> |
| | | <div class="container"> |
| | | <Breadcrumb :items="['大模型', '大模型管理']" /> |
| | | <Breadcrumb :items="['大模型', '模型管理']" /> |
| | | |
| | | <a-row :gutter="20" align="stretch"> |
| | | <a-col :span="24"> |
| | |
| | | <addTableName |
| | | v-model:tabShow="tabShow" |
| | | :nameList="editList" |
| | | :title="title" |
| | | @refresh-parent="refreshParentMethod" |
| | | v-if="tabShow" |
| | | ></addTableName> |
| | |
| | | const modelType = ref(1); |
| | | const handleAdd = () => { |
| | | tabShow.value = true; |
| | | title.value = '添加模型'; |
| | | editList.value.llm_factory = tabKey.value; |
| | | }; |
| | | const editList = ref({ llm_factory: '' }); |
| | |
| | | if (type == 1) { |
| | | tabShow.value = true; |
| | | editList.value = val; |
| | | title.value = '编辑模型'; |
| | | editList.value.llm_factory = tabKey.value; |
| | | } else { |
| | | modelType.value = 2; |
| | |
| | | |
| | | //父级模型 |
| | | const handleDelete = async (key: any) => { |
| | | console.log(key, 45455); |
| | | // tabData.value = tabData.value.filter((item) => item.key !== key); |
| | | console.log(tabData.value[key]); |
| | | if (tabData.value[key].llm.length > 0) { |
| | | Message.error('请先删除子模型'); |
| | | return; |
| | | } |
| | | if (key !== 'key') { |
| | | Reflect.deleteProperty(tabData.value, key); |
| | | await deleteLlmFactory(key); |
| | | queryModel(); |
| | | const res = await deleteLlmFactory(key); |
| | | if (res.code == 200) { |
| | | Reflect.deleteProperty(tabData.value, key); |
| | | queryModel(); |
| | | } |
| | | } |
| | | }; |
| | | |