add geolocation for datacite metadata anf for backend
This commit is contained in:
parent
e7d8dc21a0
commit
ba38fc1ed1
16 changed files with 3833 additions and 6047 deletions
|
@ -1,44 +1,62 @@
|
|||
<script>
|
||||
// <script>
|
||||
import Vue from "vue";
|
||||
|
||||
let dataset = new Vue({
|
||||
//outside of the component:
|
||||
function initialState() {
|
||||
return {
|
||||
type: "",
|
||||
state: "",
|
||||
rights: null,
|
||||
project_id: "",
|
||||
|
||||
creating_corporation: "GBA",
|
||||
embargo_date: "",
|
||||
belongs_to_bibliography: 0,
|
||||
|
||||
title_main: {
|
||||
value: "",
|
||||
language: ""
|
||||
},
|
||||
abstract_main: {
|
||||
value: "",
|
||||
language: ""
|
||||
},
|
||||
geolocation: {
|
||||
xmin: "",
|
||||
ymin: "",
|
||||
xmax: "",
|
||||
ymax: ""
|
||||
},
|
||||
checkedAuthors: [],
|
||||
checkedLicenses: [], // [],
|
||||
files: [],
|
||||
references: [],
|
||||
checkedContributors: [],
|
||||
checkedSubmitters: [],
|
||||
|
||||
persons: [],
|
||||
contributors: [],
|
||||
submitters: []
|
||||
};
|
||||
}
|
||||
|
||||
const dataset = new Vue({
|
||||
data: function() {
|
||||
return {
|
||||
type: "",
|
||||
state: "",
|
||||
rights: null,
|
||||
project_id: "",
|
||||
|
||||
creating_corporation: "GBA",
|
||||
embargo_date: "",
|
||||
belongs_to_bibliography: 0,
|
||||
|
||||
title_main: {
|
||||
value: "",
|
||||
language: ""
|
||||
},
|
||||
abstract_main: {
|
||||
value: "",
|
||||
language: ""
|
||||
},
|
||||
checkedAuthors: [],
|
||||
checkedLicenses: [], // [],
|
||||
files: [],
|
||||
references: [],
|
||||
checkedContributors: [],
|
||||
checkedSubmitters: [],
|
||||
|
||||
persons: [],
|
||||
contributors: [],
|
||||
submitters: []
|
||||
};
|
||||
return initialState();
|
||||
},
|
||||
created() {
|
||||
let json = JSON.stringify(this.$data);
|
||||
this.reset = () => {
|
||||
Object.assign(this.$data, JSON.parse(json));
|
||||
};
|
||||
created: function() {
|
||||
// let json = JSON.stringify(this.$data);
|
||||
// this.reset = () => {
|
||||
// Object.assign(this.$data, JSON.parse(json));
|
||||
// };
|
||||
// this.reset(json);
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
Object.assign(this.$data, initialState());
|
||||
}
|
||||
}
|
||||
});
|
||||
export { dataset };
|
||||
export default dataset;
|
||||
//export { dataset };
|
||||
</script>
|
|
@ -30,7 +30,7 @@ import axios from 'axios';
|
|||
//Vue.component('my-autocomplete', require('./components/MyAutocomplete.vue'));
|
||||
import MyAutocomplete from './components/MyAutocomplete.vue';
|
||||
import VeeValidate from 'vee-validate';
|
||||
import { dataset } from './components/Dataset';
|
||||
import dataset from './components/Dataset';
|
||||
// import { Validator } from 'vee-validate';
|
||||
|
||||
Vue.use(VeeValidate);
|
||||
|
@ -179,6 +179,11 @@ const app = new Vue({
|
|||
formData.append('abstract_main[value]', this.dataset.abstract_main.value);
|
||||
formData.append('abstract_main[language]', this.dataset.abstract_main.language);
|
||||
|
||||
formData.append('geolocation[xmin]', this.dataset.geolocation.xmin);
|
||||
formData.append('geolocation[ymin]', this.dataset.geolocation.ymin);
|
||||
formData.append('geolocation[xmax]', this.dataset.geolocation.xmax);
|
||||
formData.append('geolocation[ymax]', this.dataset.geolocation.ymax);
|
||||
|
||||
for (var i = 0; i < this.dataset.checkedLicenses.length; i++) {
|
||||
formData.append('licenses[' + i + ']', this.dataset.checkedLicenses[i]);
|
||||
}
|
||||
|
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue