This commit is contained in:
曹辉 2022-12-30 14:01:41 +08:00
parent 57f26e2df0
commit c9c1b6a7bd

View File

@ -217,19 +217,23 @@ export default {
//
uploadImg() {
let formData = new FormData();
formData.append("file", this.previews.data);
formData.append("type", this.types);
updateNurseStationHeads(formData).then((response) => {
this.options.img = baseurl + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
console.log(this.items);
console.log(this.types);
if (this.types == "attributePitureUrl") {
this.items.attributePitureUrl = response.imgUrl;
this.$emit("item", JSON.stringify(this.items));
}
if (this.previews.data) {
formData.append("file", this.previews.data);
formData.append("type", this.types);
updateNurseStationHeads(formData).then((response) => {
this.options.img = baseurl + response.imgUrl;
this.$emit("imgUrl", response.imgUrl);
console.log(this.items);
console.log(this.types);
if (this.types == "attributePitureUrl") {
this.items.attributePitureUrl = response.imgUrl;
this.$emit("item", JSON.stringify(this.items));
}
this.openimg = false;
});
} else {
this.openimg = false;
});
}
},
//
realTime(data) {