| | |
| | | <a-button @click="handleDeleteModel(list)"> |
| | | 删除 |
| | | </a-button> |
| | | <a-button |
| | | <!-- <a-button |
| | | type="primary" |
| | | @click="handleEditModel(list)" |
| | | > |
| | | 编辑 |
| | | </a-button> |
| | | </a-button> --> |
| | | |
| | | <!-- <editModel></editModel> --> |
| | | </a-space> |
| | |
| | | /> |
| | | </div> --> |
| | | <div> |
| | | <a-button type="primary" @click="handleAddModel"> |
| | | <a-button |
| | | type="primary" |
| | | @click="handleAddModel" |
| | | :disabled="addBtn" |
| | | > |
| | | <template #icon> |
| | | <icon-plus /> |
| | | </template> |
| | |
| | | modelmyLlms, |
| | | deleteLlm, |
| | | deleteLlmFactory, |
| | | getFactoryDetail, |
| | | } from '@/api/model'; |
| | | import { Modal, Message } from '@arco-design/web-vue'; |
| | | import { userModelState } from '@/store'; |
| | |
| | | |
| | | const modelStore = userModelState(); |
| | | let count = 5; |
| | | const addBtn = ref(false); |
| | | const activeKey = ref(1); |
| | | const data = ref([ |
| | | { |
| | |
| | | |
| | | const modalList = ref({}); |
| | | const tabKey = ref('key'); |
| | | const changeTabs = (val) => { |
| | | const changeTabs = async (val) => { |
| | | tabKey.value = val; |
| | | await getFactory(); |
| | | }; |
| | | |
| | | const httpUrl = modelStore.hrefUrl; |
| | |
| | | modalList.value = res.data; |
| | | loading.value = true; |
| | | tabData.value = Object.assign({}, tabData.value, res.data); |
| | | tabData.value = filterObject(tabData.value, 1); |
| | | tabKey.value = Object.keys(tabData.value)[0]; |
| | | await getFactory(); |
| | | }; |
| | | queryModel(); |
| | | //返回满足条件的对象 |
| | | const filterObject = (obj, threshold) => { |
| | | return Object.keys(obj) |
| | | .filter((key) => obj[key] > threshold) |
| | | .filter((key) => obj[key].added == 1) |
| | | .reduce((result, key) => { |
| | | result[key] = obj[key]; |
| | | return result; |
| | |
| | | queryModel(); |
| | | // 这里执行需要的操作 |
| | | }; |
| | | |
| | | const getFactory = async () => { |
| | | const { data } = await getFactoryDetail({ |
| | | factory_name: tabKey.value, |
| | | }); |
| | | |
| | | if (data.set_type == 2) { |
| | | addBtn.value = true; |
| | | } else { |
| | | addBtn.value = false; |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <script lang="ts"> |