刘翔宇-旅管家 2 years ago
parent d553fa8f1b
commit d180311153

@ -136,8 +136,8 @@
isShow: false, isShow: false,
id: "", id: "",
type: "", type: "",
image_id: [], image_id: [],
video_image_id:[], video_image_id: [],
action: process.env.VUE_APP_UPLOAD_API, action: process.env.VUE_APP_UPLOAD_API,
video_id: [], video_id: [],
@ -215,7 +215,10 @@
this[key] = fileList; this[key] = fileList;
}, },
removeHande(file, fileList, key) { removeHande(file, fileList, key) {
console.log("fileList", fileList)
console.log("key", key)
this[key] = fileList; this[key] = fileList;
this.form[key] = "";
}, },
uploadBefore(file) { uploadBefore(file) {
console.log(file); console.log(file);
@ -232,7 +235,7 @@
const res = await show({ const res = await show({
id: this.id, id: this.id,
table_name: "map_points", table_name: "map_points",
with_relations: ['video', 'image',"videoImage"] with_relations: ['video', 'image', "videoImage"]
}); });
this.$integrateData(this.form, res); this.$integrateData(this.form, res);
this.image_id = res.image ? [{ this.image_id = res.image ? [{
@ -244,13 +247,13 @@
url: res.video?.url, url: res.video?.url,
name: res.video?.original_name, name: res.video?.original_name,
response: res.video response: res.video
}] : [] }] : []
this.video_image_id = res.video_image ? [{ this.video_image_id = res.video_image ? [{
url: res.video_image?.url, url: res.video_image?.url,
name: res.video_image?.original_name, name: res.video_image?.original_name,
response: res.video_image response: res.video_image
}] : []; }] : [];
}, },
@ -268,9 +271,9 @@
writable: true, writable: true,
}); });
} }
this.form.image_id = this.image_id[0]?.response?.id; this.form.image_id = this.image_id.length==0?"":(this.image_id[0]?.response?.id);
this.form.video_id = this.video_id[0]?.response?.id; this.form.video_id =this.video_id.length==0?"":(this.video_id[0]?.response?.id);
this.form.video_image_id = this.video_image_id[0]?.response?.id; this.form.video_image_id =this.video_image_id.length==0?"":(this.video_image_id[0]?.response?.id);
save(Object.assign(this.form, { save(Object.assign(this.form, {
table_name: "map_points" table_name: "map_points"
})).then( })).then(

Loading…
Cancel
Save