| | |
| | | > |
| | | <a-option |
| | | v-for="(item, index) in modalList" |
| | | :value="index" |
| | | :label="index" |
| | | :value="item.name" |
| | | :label="item.name" |
| | | :disabled="item.added" |
| | | ></a-option> |
| | | </a-select> |
| | | </a-form-item> |
| | |
| | | <a-textarea |
| | | v-model="form.tags" |
| | | placeholder="请输入模型描述" |
| | | :max-length="50" |
| | | allow-clear |
| | | /> |
| | | </a-form-item> |
| | | |
| | | <a-form-item field="section" label="模型图片"> |
| | | <a-space direction="vertical" :style="{ width: '100%' }"> |
| | | <a-form-item field="logo" label="模型图片"> |
| | | <a-space |
| | | v-model="form.logo" |
| | | direction="vertical" |
| | | :style="{ width: '100%' }" |
| | | > |
| | | <Upload |
| | | :action="uploadAction" |
| | | :limit="1" |
| | | :url="form.urlS" |
| | | @handleRemove="deleteRemove" |
| | | @update:fileList="updateFileList" |
| | | @success="handleSuccess" |
| | | ></Upload> |
| | |
| | | computed, |
| | | } from 'vue'; |
| | | import { |
| | | modelmyLlms, |
| | | getFactories, |
| | | addLlmFactory, |
| | | getLlmDetail, |
| | | editLlmFactory, |
| | |
| | | message: '模型框架不允许为空', |
| | | }, |
| | | ], |
| | | describe: [ |
| | | tags: [ |
| | | { |
| | | required: true, |
| | | message: '描述不允许为空', |
| | | }, |
| | | ], |
| | | logo: [ |
| | | { |
| | | required: true, |
| | | message: '模型图片不能为空', |
| | | }, |
| | | ], |
| | | }; |
| | |
| | | fileList.value = newFileList; |
| | | }; |
| | | |
| | | const deleteRemove = () => { |
| | | form.logo = ''; |
| | | uploadUrl.value = []; |
| | | imageUrls.value = []; |
| | | }; |
| | | |
| | | const handleSuccess = (urls) => { |
| | | uploadUrl.value = urls; |
| | | form.logo = urls[0]; |
| | | |
| | | const urlsArr = urls.map((url) => { |
| | | return httpUrl + url; |
| | |
| | | }; |
| | | const modalList = ref([]); |
| | | const queryModel = async () => { |
| | | const res = await modelmyLlms(); |
| | | const res = await getFactories(); |
| | | modalList.value = res.data; |
| | | }; |
| | | queryModel(); |