| | |
| | | import { Modal, Message } from '@arco-design/web-vue'; |
| | | import message from '@arco-design/web-vue/es/message'; |
| | | import { resolveUnref } from '@vueuse/core'; |
| | | import { userModelState } from '@/store'; |
| | | |
| | | const modelStore = userModelState(); |
| | | |
| | | const addPageModelVisible = defineModel('show'); |
| | | const loading = ref(false); |
| | |
| | | multiSelect: ['section one'], |
| | | treeSelect: '', |
| | | raptor: false, |
| | | addFomList: [], |
| | | addFomList: <any[]>[], |
| | | }); |
| | | const form_ref = ref(null); |
| | | const form_ref = ref(); |
| | | |
| | | const rules = { |
| | | model_type: [ |
| | |
| | | |
| | | const uploadAction = '/api/v1/llm/upload'; // 替换为你的上传API |
| | | const fileList = ref([]); |
| | | const imageUrls = ref([]); |
| | | const imageUrls = ref<any[]>([]); |
| | | const uploadUrl = ref([]); |
| | | const httpUrl = modelStore.hrefUrl; |
| | | |
| | | const updateFileList = (newFileList) => { |
| | | fileList.value = newFileList; |
| | | console.log(newFileList, 88); |
| | | }; |
| | | |
| | | const handleSuccess = (urls) => { |
| | | imageUrls.value = urls; // 拿到上传的图片地址 |
| | | uploadUrl.value = urls; |
| | | |
| | | const urlsArr = urls.map((url) => { |
| | | return httpUrl + url; |
| | | }); |
| | | imageUrls.value = urlsArr; // 拿到上传的图片地址 |
| | | }; |
| | | const emit = defineEmits(['refresh-parent']); |
| | | const handleSubmit = ({ values, errors }) => { |
| | |
| | | volc_sk: form.volc_sk, |
| | | api_base: form.api_base, |
| | | all_params: all_params, |
| | | logo: imageUrls.value[0], |
| | | logo: uploadUrl.value[0] || '', |
| | | }); |
| | | |
| | | if ((data as any).code == 200) { |
| | |
| | | volc_sk: form.volc_sk, |
| | | api_base: form.api_base, |
| | | all_params: all_params, |
| | | logo: imageUrls.value[0], |
| | | logo: uploadUrl.value[0] || '', |
| | | }); |
| | | |
| | | if ((data as any).code == 200) { |
| | |
| | | }); |
| | | } |
| | | |
| | | imageUrls.value.push(data.data.logo); |
| | | imageUrls.value.push(httpUrl + data.data.logo); |
| | | }; |
| | | |
| | | watchEffect(() => { |