|
@@ -903,6 +903,8 @@ async function handleOnboardUpload(option: any) {
|
|
|
const imageId = res.data.data?.image_id;
|
|
const imageId = res.data.data?.image_id;
|
|
|
if (imageId) {
|
|
if (imageId) {
|
|
|
onboardImageIds.value.push(imageId);
|
|
onboardImageIds.value.push(imageId);
|
|
|
|
|
+ onboardForm.scene_image = onboardImageIds.value.join(",");
|
|
|
|
|
+ onboardFormRef.value?.validateField("scene_image");
|
|
|
option.onSuccess();
|
|
option.onSuccess();
|
|
|
} else {
|
|
} else {
|
|
|
option.onError(new Error("上传失败"));
|
|
option.onError(new Error("上传失败"));
|
|
@@ -915,7 +917,11 @@ async function handleOnboardUpload(option: any) {
|
|
|
function handleOnboardFileRemove(_file: any, fileList: any) {
|
|
function handleOnboardFileRemove(_file: any, fileList: any) {
|
|
|
// 移除对应位置的 image_id
|
|
// 移除对应位置的 image_id
|
|
|
const idx = fileList.findIndex((f: any) => f.uid === _file.uid);
|
|
const idx = fileList.findIndex((f: any) => f.uid === _file.uid);
|
|
|
- if (idx >= 0) onboardImageIds.value.splice(idx, 1);
|
|
|
|
|
|
|
+ if (idx >= 0) {
|
|
|
|
|
+ onboardImageIds.value.splice(idx, 1);
|
|
|
|
|
+ onboardForm.scene_image = onboardImageIds.value.join(",");
|
|
|
|
|
+ onboardFormRef.value?.validateField("scene_image");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
async function handleOnboardSubmit() {
|
|
async function handleOnboardSubmit() {
|