2019-01-07 10:16:18 +00:00
|
|
|
// <script>
|
2018-11-05 15:44:25 +00:00
|
|
|
import Vue from "vue";
|
|
|
|
|
2019-01-07 10:16:18 +00:00
|
|
|
//outside of the component:
|
|
|
|
function initialState() {
|
|
|
|
return {
|
|
|
|
type: "",
|
|
|
|
state: "",
|
|
|
|
rights: null,
|
|
|
|
project_id: "",
|
|
|
|
|
2019-01-22 17:31:46 +00:00
|
|
|
creating_corporation: "GBA Repository",
|
2019-03-19 17:04:41 +00:00
|
|
|
language: "",
|
2019-01-07 10:16:18 +00:00
|
|
|
embargo_date: "",
|
|
|
|
belongs_to_bibliography: 0,
|
2018-11-05 15:44:25 +00:00
|
|
|
|
2019-01-07 10:16:18 +00:00
|
|
|
title_main: {
|
|
|
|
value: "",
|
|
|
|
language: ""
|
|
|
|
},
|
|
|
|
abstract_main: {
|
|
|
|
value: "",
|
|
|
|
language: ""
|
|
|
|
},
|
|
|
|
geolocation: {
|
|
|
|
xmin: "",
|
|
|
|
ymin: "",
|
|
|
|
xmax: "",
|
|
|
|
ymax: ""
|
|
|
|
},
|
2019-03-20 17:40:14 +00:00
|
|
|
coverage: {
|
|
|
|
elevation_min: "",
|
|
|
|
elevation_max: "",
|
|
|
|
elevation_absolut: "",
|
|
|
|
depth_min: "",
|
|
|
|
depth_max: "",
|
|
|
|
depth_absolut: ""
|
|
|
|
},
|
2019-01-07 10:16:18 +00:00
|
|
|
checkedAuthors: [],
|
|
|
|
checkedLicenses: [], // [],
|
|
|
|
files: [],
|
2019-03-18 13:32:29 +00:00
|
|
|
keywords: [],
|
2019-01-07 10:16:18 +00:00
|
|
|
references: [],
|
2019-01-22 17:24:18 +00:00
|
|
|
titles: [],
|
2019-01-24 16:33:04 +00:00
|
|
|
descriptions: [],
|
2019-01-07 10:16:18 +00:00
|
|
|
checkedContributors: [],
|
|
|
|
checkedSubmitters: [],
|
2018-11-05 15:44:25 +00:00
|
|
|
|
2019-01-07 10:16:18 +00:00
|
|
|
persons: [],
|
|
|
|
contributors: [],
|
|
|
|
submitters: []
|
|
|
|
};
|
|
|
|
}
|
2018-11-05 15:44:25 +00:00
|
|
|
|
2019-01-07 10:16:18 +00:00
|
|
|
const dataset = new Vue({
|
|
|
|
data: function() {
|
|
|
|
return initialState();
|
|
|
|
},
|
|
|
|
created: function() {
|
|
|
|
// let json = JSON.stringify(this.$data);
|
|
|
|
// this.reset = () => {
|
|
|
|
// Object.assign(this.$data, JSON.parse(json));
|
|
|
|
// };
|
|
|
|
// this.reset(json);
|
2018-11-05 15:44:25 +00:00
|
|
|
},
|
2019-03-19 17:04:41 +00:00
|
|
|
watch: {
|
|
|
|
language(val) {
|
|
|
|
this.title_main.language = val;
|
|
|
|
this.abstract_main.language = val;
|
|
|
|
}
|
|
|
|
},
|
2019-01-07 10:16:18 +00:00
|
|
|
methods: {
|
|
|
|
reset() {
|
|
|
|
Object.assign(this.$data, initialState());
|
|
|
|
}
|
2018-11-05 15:44:25 +00:00
|
|
|
}
|
|
|
|
});
|
2019-01-07 10:16:18 +00:00
|
|
|
export default dataset;
|
|
|
|
//export { dataset };
|
2018-11-05 15:44:25 +00:00
|
|
|
</script>
|