This commit is contained in:
@@ -69,7 +69,57 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
height: 300,
|
||||
items: [
|
||||
items: [],
|
||||
notes: null,
|
||||
tab: null,
|
||||
uploadFiles: []
|
||||
};
|
||||
},
|
||||
props: {
|
||||
ayaType: Number,
|
||||
ayaId: Number,
|
||||
readonly: Boolean
|
||||
},
|
||||
|
||||
methods: {
|
||||
onResize() {
|
||||
this.height = window.innerHeight * 0.8;
|
||||
},
|
||||
cardTextStyle() {
|
||||
return "height: " + this.height + "px;overflow-y:auto;";
|
||||
},
|
||||
upload() {
|
||||
let at = {
|
||||
ayaId: this.ayaId,
|
||||
ayaType: this.ayaType,
|
||||
files: this.uploadFiles
|
||||
};
|
||||
window.$gz.api.uploadAttachment(at).then(res => {
|
||||
//vm.formState.loading = false;
|
||||
if (res.error) {
|
||||
console.log(res.error);
|
||||
// vm.formState.serverError = res.error;
|
||||
// window.$gz.form.setErrorBoxErrors(vm);
|
||||
} else {
|
||||
console.log("SUCCESS");
|
||||
}
|
||||
});
|
||||
// .catch(function handleSubmitError(error) {
|
||||
// vm.formState.loading = false;
|
||||
// window.$gz.errorHandler.handleFormError(error, vm);
|
||||
// });
|
||||
// if (this.uploadFiles.length > 0) {
|
||||
// this.uploadFiles.forEach(file => {
|
||||
// window.console.log(file);
|
||||
// });
|
||||
// }
|
||||
},
|
||||
aClick() {
|
||||
console.log("CLICK");
|
||||
}
|
||||
}
|
||||
|
||||
/**[
|
||||
{
|
||||
icon: "fa-file-image",
|
||||
title: "drawings.pdf",
|
||||
@@ -130,35 +180,6 @@ export default {
|
||||
// title: "4Work",
|
||||
// subtitle: "Jan 28, 2014"
|
||||
// }
|
||||
],
|
||||
notes: null,
|
||||
tab: null,
|
||||
uploadFiles: []
|
||||
};
|
||||
},
|
||||
props: {
|
||||
ayaType: Number,
|
||||
ayaId: Number,
|
||||
readonly: Boolean
|
||||
},
|
||||
|
||||
methods: {
|
||||
onResize() {
|
||||
this.height = window.innerHeight * 0.8;
|
||||
},
|
||||
cardTextStyle() {
|
||||
return "height: " + this.height + "px;overflow-y:auto;";
|
||||
},
|
||||
upload() {
|
||||
if (this.uploadFiles.length > 0) {
|
||||
this.uploadFiles.forEach(file => {
|
||||
window.console.log(file);
|
||||
});
|
||||
}
|
||||
},
|
||||
aClick() {
|
||||
console.log("CLICK");
|
||||
}
|
||||
}
|
||||
], */
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user