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: ""
|
|
|
|
},
|
2019-03-29 17:29:20 +00:00
|
|
|
// geolocation: {
|
|
|
|
// xmin: "",
|
|
|
|
// ymin: "",
|
|
|
|
// xmax: "",
|
|
|
|
// ymax: ""
|
|
|
|
// },
|
|
|
|
coverage: {
|
2019-01-07 10:16:18 +00:00
|
|
|
xmin: "",
|
|
|
|
ymin: "",
|
|
|
|
xmax: "",
|
2019-03-29 17:29:20 +00:00
|
|
|
ymax: "",
|
2019-03-20 17:40:14 +00:00
|
|
|
elevation_min: "",
|
|
|
|
elevation_max: "",
|
|
|
|
elevation_absolut: "",
|
|
|
|
depth_min: "",
|
|
|
|
depth_max: "",
|
2019-03-29 17:29:20 +00:00
|
|
|
depth_absolut: "",
|
|
|
|
time_min: "",
|
|
|
|
time_max: "",
|
|
|
|
time_absolut: ""
|
2019-03-20 17:40:14 +00:00
|
|
|
},
|
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: [],
|
2019-05-14 16:02:25 +00:00
|
|
|
// checkedSubmitters: [],
|
2018-11-05 15:44:25 +00:00
|
|
|
|
2019-01-07 10:16:18 +00:00
|
|
|
persons: [],
|
|
|
|
contributors: [],
|
2019-05-14 16:02:25 +00:00
|
|
|
// submitters: []
|
2019-01-07 10:16:18 +00:00
|
|
|
};
|
|
|
|
}
|
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>
|