@geode/opengeodeweb-front 10.0.2-rc.1 → 10.0.2-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/components/CrsSelector.vue +5 -7
- package/app/components/ExtensionSelector.vue +14 -19
- package/app/components/FileSelector.vue +5 -10
- package/app/components/FileUploader.vue +1 -0
- package/app/components/Inspector/InspectionButton.vue +8 -10
- package/app/components/MissingFilesSelector.vue +9 -19
- package/app/components/ObjectSelector.vue +3 -3
- package/app/components/PackagesVersions.vue +10 -22
- package/app/components/RemoteRenderingView.vue +12 -12
- package/app/components/Screenshot.vue +6 -7
- package/app/components/VeaseViewToolbar.vue +4 -7
- package/app/components/ViewToolbar.vue +6 -10
- package/app/components/Viewer/Options/CellAttributeSelector.vue +4 -5
- package/app/components/Viewer/Options/PolygonAttributeSelector.vue +4 -5
- package/app/components/Viewer/Options/PolyhedronAttributeSelector.vue +4 -7
- package/app/components/Viewer/Options/TextureItem.vue +6 -8
- package/app/components/Viewer/Options/VertexAttributeSelector.vue +3 -7
- package/app/composables/project_manager.js +8 -12
- package/app/stores/data_base.js +10 -16
- package/app/stores/data_style.js +3 -3
- package/app/stores/geode.js +30 -4
- package/app/stores/hybrid_viewer.js +18 -18
- package/app/stores/infra.js +59 -44
- package/app/stores/lambda.js +63 -0
- package/app/stores/viewer.js +34 -7
- package/app/utils/file_import_workflow.js +9 -8
- package/app/{composables → utils}/upload_file.js +6 -6
- package/{internal_stores → internal/stores}/mesh/cells.js +20 -20
- package/{internal_stores → internal/stores}/mesh/edges.js +12 -6
- package/{internal_stores → internal/stores}/mesh/index.js +4 -5
- package/{internal_stores → internal/stores}/mesh/points.js +16 -11
- package/{internal_stores → internal/stores}/mesh/polygons.js +20 -19
- package/{internal_stores → internal/stores}/mesh/polyhedra.js +17 -19
- package/{internal_stores → internal/stores}/model/blocks.js +8 -10
- package/{internal_stores → internal/stores}/model/corners.js +8 -10
- package/{internal_stores → internal/stores}/model/edges.js +4 -5
- package/{internal_stores → internal/stores}/model/index.js +8 -10
- package/{internal_stores → internal/stores}/model/lines.js +8 -10
- package/{internal_stores → internal/stores}/model/points.js +8 -10
- package/{internal_stores → internal/stores}/model/surfaces.js +8 -10
- package/{app/composables → internal/utils}/api_fetch.js +11 -11
- package/{app/composables → internal/utils}/viewer_call.js +5 -5
- package/nuxt.config.js +1 -1
- package/package.json +1 -1
- package/tests/integration/stores/data_style/mesh/cells.nuxt.test.js +12 -21
- package/tests/integration/stores/data_style/mesh/edges.nuxt.test.js +6 -11
- package/tests/integration/stores/data_style/mesh/index.nuxt.test.js +3 -6
- package/tests/integration/stores/data_style/mesh/points.nuxt.test.js +9 -16
- package/tests/integration/stores/data_style/mesh/polygons.nuxt.test.js +12 -21
- package/tests/integration/stores/data_style/mesh/polyhedra.nuxt.test.js +6 -11
- package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +6 -11
- package/tests/integration/stores/data_style/model/corners.nuxt.test.js +6 -11
- package/tests/integration/stores/data_style/model/edges.nuxt.test.js +3 -6
- package/tests/integration/stores/data_style/model/index.nuxt.test.js +3 -6
- package/tests/integration/stores/data_style/model/lines.nuxt.test.js +6 -11
- package/tests/integration/stores/data_style/model/points.nuxt.test.js +6 -12
- package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +6 -11
- package/tests/unit/components/CrsSelector.nuxt.test.js +10 -7
- package/tests/unit/components/ExtensionSelector.nuxt.test.js +17 -2
- package/tests/unit/components/FileSelector.nuxt.test.js +2 -2
- package/tests/unit/components/FileUploader.nuxt.test.js +2 -2
- package/tests/unit/components/Inspector/InspectionButton.nuxt.test.js +12 -7
- package/tests/unit/components/MissingFilesSelector.nuxt.test.js +20 -9
- package/tests/unit/components/ObjectSelector.nuxt.test.js +2 -2
- package/tests/unit/components/PackagesVersions.nuxt.test.js +2 -2
- package/tests/unit/composables/ProjectManager.nuxt.test.js +9 -11
- package/tests/unit/composables/api_fetch.nuxt.test.js +17 -40
- package/tests/unit/composables/run_function_when_microservices_connected.nuxt.test.js +27 -12
- package/tests/unit/composables/upload_file.nuxt.test.js +3 -3
- package/tests/unit/plugins/project_load.nuxt.test.js +2 -3
- package/tests/unit/stores/Geode.nuxt.test.js +47 -49
- package/tests/unit/stores/Infra.nuxt.test.js +196 -66
- package/tests/unit/stores/Lambda.nuxt.test.js +131 -0
- package/tests/unit/stores/Viewer.nuxt.test.js +48 -46
- /package/{internal_stores → internal/stores}/data_style_state.js +0 -0
- /package/tests/unit/stores/{Appstore.nuxt.test.js → App.nuxt.test.js} +0 -0
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
const crs_list = ref([])
|
|
46
46
|
const selected_crs = ref([])
|
|
47
47
|
const toggle_loading = useToggle(data_table_loading)
|
|
48
|
+
const geodeStore = useGeodeStore()
|
|
48
49
|
|
|
49
50
|
watch(selected_crs, (new_value) => {
|
|
50
51
|
const crs = get_selected_crs(new_value[0])
|
|
@@ -66,14 +67,11 @@
|
|
|
66
67
|
async function get_crs_table() {
|
|
67
68
|
const params = { geode_object_type }
|
|
68
69
|
toggle_loading()
|
|
69
|
-
await
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
response_function: (response) => {
|
|
73
|
-
crs_list.value = response._data.crs_list
|
|
74
|
-
},
|
|
70
|
+
await geodeStore.request(schema, params, {
|
|
71
|
+
response_function: (response) => {
|
|
72
|
+
crs_list.value = response._data.crs_list
|
|
75
73
|
},
|
|
76
|
-
)
|
|
74
|
+
})
|
|
77
75
|
toggle_loading()
|
|
78
76
|
}
|
|
79
77
|
|
|
@@ -79,27 +79,22 @@
|
|
|
79
79
|
async function get_output_file_extensions() {
|
|
80
80
|
toggle_loading()
|
|
81
81
|
geode_objects_and_output_extensions.value = {}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
resolve(response._data.geode_objects_and_output_extensions)
|
|
94
|
-
},
|
|
95
|
-
response_error_function: () => {
|
|
96
|
-
reject()
|
|
97
|
-
},
|
|
82
|
+
const geodeStore = useGeodeStore()
|
|
83
|
+
const promise_array = filenames.map((filename) => {
|
|
84
|
+
return new Promise((resolve, reject) => {
|
|
85
|
+
const params = {
|
|
86
|
+
geode_object_type,
|
|
87
|
+
filename,
|
|
88
|
+
}
|
|
89
|
+
geodeStore.request(schema, params, {
|
|
90
|
+
request_error_function: () => reject(),
|
|
91
|
+
response_function: (response) => {
|
|
92
|
+
resolve(response._data.geode_objects_and_output_extensions)
|
|
98
93
|
},
|
|
99
|
-
|
|
94
|
+
response_error_function: () => reject(),
|
|
95
|
+
})
|
|
100
96
|
})
|
|
101
|
-
|
|
102
|
-
}
|
|
97
|
+
})
|
|
103
98
|
const values = await Promise.all(promise_array)
|
|
104
99
|
const all_keys = [...new Set(values.flatMap((value) => Object.keys(value)))]
|
|
105
100
|
const common_keys = all_keys.filter(
|
|
@@ -55,16 +55,11 @@
|
|
|
55
55
|
|
|
56
56
|
async function get_allowed_files() {
|
|
57
57
|
toggle_loading()
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
.map((extension) => "." + extension)
|
|
64
|
-
.join(",")
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
)
|
|
58
|
+
const geodeStore = useGeodeStore()
|
|
59
|
+
const response = await geodeStore.request(schema, {})
|
|
60
|
+
accept.value = response.data.value.extensions
|
|
61
|
+
.map((extension) => "." + extension)
|
|
62
|
+
.join(",")
|
|
68
63
|
toggle_loading()
|
|
69
64
|
}
|
|
70
65
|
await get_allowed_files()
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
<script setup>
|
|
36
36
|
import schemas from "@geode/opengeodeweb-back/opengeodeweb_back_schemas.json"
|
|
37
|
+
import { upload_file } from "@ogw_front/utils/upload_file.js"
|
|
37
38
|
const schema = schemas.opengeodeweb_back.upload_file
|
|
38
39
|
|
|
39
40
|
const emit = defineEmits(["files_uploaded", "decrement_step"])
|
|
@@ -33,18 +33,16 @@
|
|
|
33
33
|
async function get_inspection_results(geode_object_type, filename) {
|
|
34
34
|
toggle_loading()
|
|
35
35
|
const params = { geode_object_type, filename }
|
|
36
|
+
const geodeStore = useGeodeStore()
|
|
36
37
|
|
|
37
|
-
await
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
})
|
|
44
|
-
emit("increment_step")
|
|
45
|
-
},
|
|
38
|
+
await geodeStore.request(schema, params, {
|
|
39
|
+
response_function: (response) => {
|
|
40
|
+
emit("update_values", {
|
|
41
|
+
inspection_result: [response._data.inspection_result],
|
|
42
|
+
})
|
|
43
|
+
emit("increment_step")
|
|
46
44
|
},
|
|
47
|
-
)
|
|
45
|
+
})
|
|
48
46
|
toggle_loading()
|
|
49
47
|
}
|
|
50
48
|
</script>
|
|
@@ -81,28 +81,18 @@
|
|
|
81
81
|
has_missing_files.value = false
|
|
82
82
|
mandatory_files.value = []
|
|
83
83
|
additional_files.value = []
|
|
84
|
-
|
|
84
|
+
const geodeStore = useGeodeStore()
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
const promise_array = filenames.map((filename) => {
|
|
87
87
|
const params = { geode_object_type, filename }
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
},
|
|
95
|
-
response_function: (response) => {
|
|
96
|
-
resolve(response._data)
|
|
97
|
-
},
|
|
98
|
-
response_error_function: () => {
|
|
99
|
-
reject()
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
)
|
|
88
|
+
return new Promise((resolve, reject) => {
|
|
89
|
+
geodeStore.request(schema, params, {
|
|
90
|
+
request_error_function: () => reject(),
|
|
91
|
+
response_function: (response) => resolve(response._data),
|
|
92
|
+
response_error_function: () => reject(),
|
|
93
|
+
})
|
|
103
94
|
})
|
|
104
|
-
|
|
105
|
-
}
|
|
95
|
+
})
|
|
106
96
|
const values = await Promise.all(promise_array)
|
|
107
97
|
for (const value of values) {
|
|
108
98
|
has_missing_files.value = value.has_missing_files
|
|
@@ -108,13 +108,13 @@
|
|
|
108
108
|
async function get_allowed_objects() {
|
|
109
109
|
toggle_loading()
|
|
110
110
|
allowed_objects.value = {}
|
|
111
|
+
const geodeStore = useGeodeStore()
|
|
111
112
|
const promise_array = filenames.map((filename) => {
|
|
112
|
-
|
|
113
|
-
return api_fetch({ schema, params })
|
|
113
|
+
return geodeStore.request(schema, { filename })
|
|
114
114
|
})
|
|
115
115
|
const responses = await Promise.all(promise_array)
|
|
116
116
|
const allowed_objects_list = responses.map(
|
|
117
|
-
(
|
|
117
|
+
(r) => r.data.value.allowed_objects,
|
|
118
118
|
)
|
|
119
119
|
const all_keys = [...new Set(allowed_objects_list.flatMap(Object.keys))]
|
|
120
120
|
const common_keys = all_keys.filter((key) =>
|
|
@@ -25,35 +25,23 @@
|
|
|
25
25
|
schema: { type: Object, required: true },
|
|
26
26
|
})
|
|
27
27
|
|
|
28
|
-
const
|
|
28
|
+
const geodeStore = useGeodeStore()
|
|
29
29
|
const packages_versions = ref([])
|
|
30
30
|
|
|
31
31
|
async function get_packages_versions() {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
request_error_function: () => {
|
|
39
|
-
reject()
|
|
40
|
-
},
|
|
41
|
-
response_function: (response) => {
|
|
42
|
-
packages_versions.value = response._data.versions
|
|
43
|
-
resolve()
|
|
44
|
-
},
|
|
45
|
-
response_error_function: () => {
|
|
46
|
-
reject()
|
|
47
|
-
},
|
|
32
|
+
await geodeStore.request(
|
|
33
|
+
props.schema,
|
|
34
|
+
{},
|
|
35
|
+
{
|
|
36
|
+
response_function: (response) => {
|
|
37
|
+
packages_versions.value = response._data.versions
|
|
48
38
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
array_promise.push(promise)
|
|
52
|
-
await Promise.all(array_promise)
|
|
39
|
+
},
|
|
40
|
+
)
|
|
53
41
|
}
|
|
54
42
|
|
|
55
43
|
watch(
|
|
56
|
-
() =>
|
|
44
|
+
() => geodeStore.status,
|
|
57
45
|
(value) => {
|
|
58
46
|
if (value == Status.CONNECTED) get_packages_versions()
|
|
59
47
|
},
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"
|
|
15
15
|
class="pa-0"
|
|
16
16
|
@click="get_x_y"
|
|
17
|
-
@keydown.esc="
|
|
17
|
+
@keydown.esc="viewerStore.toggle_picking_mode(false)"
|
|
18
18
|
/>
|
|
19
19
|
</div>
|
|
20
20
|
</ClientOnly>
|
|
@@ -32,20 +32,20 @@
|
|
|
32
32
|
viewId: { type: String, default: "-1" },
|
|
33
33
|
})
|
|
34
34
|
|
|
35
|
-
const
|
|
35
|
+
const viewerStore = useViewerStore()
|
|
36
36
|
const viewer = useTemplateRef("viewer")
|
|
37
37
|
const { width, height } = useElementSize(viewer)
|
|
38
38
|
|
|
39
39
|
const { width: windowWidth, height: windowHeight } = useWindowSize()
|
|
40
40
|
|
|
41
41
|
function get_x_y(event) {
|
|
42
|
-
if (
|
|
42
|
+
if (viewerStore.picking_mode.value === true) {
|
|
43
43
|
const { offsetX, offsetY } = event
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
viewerStore.set_picked_point(offsetX, offsetY)
|
|
45
|
+
viewerStore.request(
|
|
46
|
+
viewer_schemas.opengeodeweb_viewer.viewer.get_point_position,
|
|
47
|
+
{ x: offsetX, y: offsetY },
|
|
48
|
+
)
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
})
|
|
71
71
|
|
|
72
72
|
watch(
|
|
73
|
-
() =>
|
|
73
|
+
() => viewerStore.picking_mode,
|
|
74
74
|
(value) => {
|
|
75
75
|
const cursor = value ? "crosshair" : "pointer"
|
|
76
76
|
view.getCanvasView().setCursor(cursor)
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
})
|
|
83
83
|
|
|
84
84
|
watch(
|
|
85
|
-
() =>
|
|
85
|
+
() => viewerStore.client,
|
|
86
86
|
() => {
|
|
87
87
|
connect()
|
|
88
88
|
},
|
|
@@ -99,10 +99,10 @@
|
|
|
99
99
|
)
|
|
100
100
|
|
|
101
101
|
function connect() {
|
|
102
|
-
if (
|
|
102
|
+
if (viewerStore.status !== Status.CONNECTED) {
|
|
103
103
|
return
|
|
104
104
|
}
|
|
105
|
-
const session =
|
|
105
|
+
const session = viewerStore.client.getConnection().getSession()
|
|
106
106
|
view.setSession(session)
|
|
107
107
|
view.setViewId(props.viewId)
|
|
108
108
|
connected.value = true
|
|
@@ -79,14 +79,13 @@
|
|
|
79
79
|
const include_background = ref(true)
|
|
80
80
|
|
|
81
81
|
async function takeScreenshot() {
|
|
82
|
-
|
|
82
|
+
const viewerStore = useViewerStore()
|
|
83
|
+
await viewerStore.request(
|
|
84
|
+
viewer_schemas.opengeodeweb_viewer.viewer.take_screenshot,
|
|
83
85
|
{
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
output_extension: output_extension.value,
|
|
88
|
-
include_background: include_background.value,
|
|
89
|
-
},
|
|
86
|
+
filename: filename.value,
|
|
87
|
+
output_extension: output_extension.value,
|
|
88
|
+
include_background: include_background.value,
|
|
90
89
|
},
|
|
91
90
|
{
|
|
92
91
|
response_function: async (response) => {
|
|
@@ -74,13 +74,10 @@
|
|
|
74
74
|
tooltip: "Toggle grid scale",
|
|
75
75
|
icon: "mdi-ruler-square",
|
|
76
76
|
action: () => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
visibility: !grid_scale.value,
|
|
82
|
-
},
|
|
83
|
-
},
|
|
77
|
+
const viewerStore = useViewerStore()
|
|
78
|
+
viewerStore.request(
|
|
79
|
+
schemas.opengeodeweb_viewer.viewer.grid_scale,
|
|
80
|
+
{ visibility: !grid_scale.value },
|
|
84
81
|
{
|
|
85
82
|
response_function: () => {
|
|
86
83
|
grid_scale.value = !grid_scale.value
|
|
@@ -33,9 +33,8 @@
|
|
|
33
33
|
tooltip: "Reset camera",
|
|
34
34
|
icon: "mdi-cube-scan",
|
|
35
35
|
action: () => {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
})
|
|
36
|
+
const viewerStore = useViewerStore()
|
|
37
|
+
viewerStore.request(schemas.opengeodeweb_viewer.viewer.reset_camera)
|
|
39
38
|
},
|
|
40
39
|
},
|
|
41
40
|
{
|
|
@@ -49,13 +48,10 @@
|
|
|
49
48
|
tooltip: "Toggle grid scale",
|
|
50
49
|
icon: "mdi-ruler-square",
|
|
51
50
|
action: () => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
visibility: !grid_scale.value,
|
|
57
|
-
},
|
|
58
|
-
},
|
|
51
|
+
const viewerStore = useViewerStore()
|
|
52
|
+
viewerStore.request(
|
|
53
|
+
schemas.opengeodeweb_viewer.viewer.grid_scale,
|
|
54
|
+
{ visibility: !grid_scale.value },
|
|
59
55
|
{
|
|
60
56
|
response_function: () => {
|
|
61
57
|
grid_scale.value = !grid_scale.value
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
const cell_attribute_name = ref("")
|
|
19
19
|
const cell_attribute_names = ref([])
|
|
20
20
|
const cell_attribute = reactive({ name: cell_attribute_name.value })
|
|
21
|
+
const geodeStore = useGeodeStore()
|
|
21
22
|
|
|
22
23
|
onMounted(() => {
|
|
23
24
|
if (model.value != null) {
|
|
@@ -35,12 +36,10 @@
|
|
|
35
36
|
})
|
|
36
37
|
|
|
37
38
|
function getCellAttributes() {
|
|
38
|
-
|
|
39
|
+
geodeStore.request(
|
|
40
|
+
back_schemas.opengeodeweb_back.cell_attribute_names,
|
|
39
41
|
{
|
|
40
|
-
|
|
41
|
-
params: {
|
|
42
|
-
id: props.id,
|
|
43
|
-
},
|
|
42
|
+
id: props.id,
|
|
44
43
|
},
|
|
45
44
|
{
|
|
46
45
|
response_function: (response) => {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
const polygon_attribute_name = ref("")
|
|
19
19
|
const polygon_attribute_names = ref([])
|
|
20
20
|
const polygon_attribute = reactive({ name: polygon_attribute_name.value })
|
|
21
|
+
const geodeStore = useGeodeStore()
|
|
21
22
|
|
|
22
23
|
onMounted(() => {
|
|
23
24
|
if (model.value != null) {
|
|
@@ -35,12 +36,10 @@
|
|
|
35
36
|
})
|
|
36
37
|
|
|
37
38
|
function getPolygonAttributes() {
|
|
38
|
-
|
|
39
|
+
geodeStore.request(
|
|
40
|
+
back_schemas.opengeodeweb_back.polygon_attribute_names,
|
|
39
41
|
{
|
|
40
|
-
|
|
41
|
-
params: {
|
|
42
|
-
id: props.id,
|
|
43
|
-
},
|
|
42
|
+
id: props.id,
|
|
44
43
|
},
|
|
45
44
|
{
|
|
46
45
|
response_function: (response) => {
|
|
@@ -33,19 +33,16 @@
|
|
|
33
33
|
})
|
|
34
34
|
|
|
35
35
|
const polyhedron_attribute_names = ref([])
|
|
36
|
+
const geodeStore = useGeodeStore()
|
|
36
37
|
|
|
37
38
|
onMounted(() => {
|
|
38
39
|
getVertexAttributes()
|
|
39
40
|
})
|
|
40
41
|
|
|
41
42
|
function getVertexAttributes() {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
params: {
|
|
46
|
-
id: props.id,
|
|
47
|
-
},
|
|
48
|
-
},
|
|
43
|
+
geodeStore.request(
|
|
44
|
+
back_schemas.opengeodeweb_back.polyhedron_attribute_names,
|
|
45
|
+
{ id: props.id },
|
|
49
46
|
{
|
|
50
47
|
response_function: (response) => {
|
|
51
48
|
polyhedron_attribute_names.value =
|
|
@@ -54,19 +54,16 @@
|
|
|
54
54
|
texture_id.value = props.texture_id
|
|
55
55
|
|
|
56
56
|
const texture_coordinates = ref([])
|
|
57
|
+
const geodeStore = useGeodeStore()
|
|
57
58
|
|
|
58
59
|
onMounted(() => {
|
|
59
60
|
getTextureCoordinates()
|
|
60
61
|
})
|
|
61
62
|
|
|
62
63
|
function getTextureCoordinates() {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
params: {
|
|
67
|
-
id: props.id,
|
|
68
|
-
},
|
|
69
|
-
},
|
|
64
|
+
geodeStore.request(
|
|
65
|
+
back_schemas.opengeodeweb_back.texture_coordinates,
|
|
66
|
+
{ id: props.id },
|
|
70
67
|
{
|
|
71
68
|
response_function: (response) => {
|
|
72
69
|
texture_coordinates.value = response._data.texture_coordinates
|
|
@@ -77,7 +74,8 @@
|
|
|
77
74
|
|
|
78
75
|
async function files_uploaded_event(value) {
|
|
79
76
|
if (value.length) {
|
|
80
|
-
await
|
|
77
|
+
await geodeStore.request(
|
|
78
|
+
back_schemas.opengeodeweb_back.save_viewable_file,
|
|
81
79
|
{
|
|
82
80
|
schema: back_schemas.opengeodeweb_back.save_viewable_file,
|
|
83
81
|
params: {
|
|
@@ -36,13 +36,9 @@
|
|
|
36
36
|
})
|
|
37
37
|
|
|
38
38
|
function getVertexAttributes() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
params: {
|
|
43
|
-
id: props.id,
|
|
44
|
-
},
|
|
45
|
-
},
|
|
39
|
+
geodeStore.request(
|
|
40
|
+
back_schemas.opengeodeweb_back.vertex_attribute_names,
|
|
41
|
+
{ id: props.id },
|
|
46
42
|
{
|
|
47
43
|
response_function: (response) => {
|
|
48
44
|
vertex_attribute_names.value = response._data.vertex_attribute_names
|
|
@@ -9,12 +9,10 @@ export function useProjectManager() {
|
|
|
9
9
|
console.log("[export triggered]")
|
|
10
10
|
const appStore = useAppStore()
|
|
11
11
|
const geodeStore = useGeodeStore()
|
|
12
|
-
const infraStore = useInfraStore()
|
|
13
12
|
const snapshot = appStore.exportStores()
|
|
14
13
|
const schema = back_schemas.opengeodeweb_back.export_project
|
|
15
14
|
const defaultName = "project.vease"
|
|
16
15
|
|
|
17
|
-
await infraStore.create_connection()
|
|
18
16
|
const result = await $fetch(schema.$id, {
|
|
19
17
|
baseURL: geodeStore.base_url,
|
|
20
18
|
method: schema.methods.filter((m) => m !== "OPTIONS")[0],
|
|
@@ -30,9 +28,7 @@ export function useProjectManager() {
|
|
|
30
28
|
const dataBaseStore = useDataBaseStore()
|
|
31
29
|
const treeviewStore = useTreeviewStore()
|
|
32
30
|
const hybridViewerStore = useHybridViewerStore()
|
|
33
|
-
const infraStore = useInfraStore()
|
|
34
31
|
|
|
35
|
-
await infraStore.create_connection()
|
|
36
32
|
await viewerStore.ws_connect()
|
|
37
33
|
|
|
38
34
|
const client = viewerStore.client
|
|
@@ -43,10 +39,10 @@ export function useProjectManager() {
|
|
|
43
39
|
.call("opengeodeweb_viewer.release_database", [{}])
|
|
44
40
|
}
|
|
45
41
|
|
|
46
|
-
await
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
await viewerStore.request(
|
|
43
|
+
viewer_schemas.opengeodeweb_viewer.viewer.reset_visualization,
|
|
44
|
+
{},
|
|
45
|
+
)
|
|
50
46
|
|
|
51
47
|
treeviewStore.clear()
|
|
52
48
|
dataBaseStore.clear()
|
|
@@ -81,9 +77,9 @@ export function useProjectManager() {
|
|
|
81
77
|
.call("opengeodeweb_viewer.import_project", [{}])
|
|
82
78
|
}
|
|
83
79
|
|
|
84
|
-
await treeviewStore.importStores(snapshot.treeview)
|
|
80
|
+
await treeviewStore.importStores(snapshot.treeview || {})
|
|
85
81
|
await hybridViewerStore.initHybridViewer()
|
|
86
|
-
await hybridViewerStore.importStores(snapshot.hybridViewer)
|
|
82
|
+
await hybridViewerStore.importStores(snapshot.hybridViewer || {})
|
|
87
83
|
|
|
88
84
|
const snapshotDataBase =
|
|
89
85
|
snapshot && snapshot.dataBase && snapshot.dataBase.db
|
|
@@ -99,11 +95,11 @@ export function useProjectManager() {
|
|
|
99
95
|
})
|
|
100
96
|
|
|
101
97
|
await importWorkflowFromSnapshot(items)
|
|
102
|
-
await hybridViewerStore.importStores(snapshot.hybridViewer)
|
|
98
|
+
await hybridViewerStore.importStores(snapshot.hybridViewer || {})
|
|
103
99
|
|
|
104
100
|
{
|
|
105
101
|
const dataStyleStore = useDataStyleStore()
|
|
106
|
-
await dataStyleStore.importStores(snapshot.dataStyle)
|
|
102
|
+
await dataStyleStore.importStores(snapshot.dataStyle || {})
|
|
107
103
|
}
|
|
108
104
|
{
|
|
109
105
|
const dataStyleStore = useDataStyleStore()
|
package/app/stores/data_base.js
CHANGED
|
@@ -42,10 +42,8 @@ export const useDataBaseStore = defineStore("dataBase", () => {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
async function registerObject(id) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
params: { id },
|
|
48
|
-
})
|
|
45
|
+
const viewerStore = useViewerStore()
|
|
46
|
+
return viewerStore.request(viewer_generic_schemas.register, { id })
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
async function addItem(
|
|
@@ -63,13 +61,10 @@ export const useDataBaseStore = defineStore("dataBase", () => {
|
|
|
63
61
|
}
|
|
64
62
|
|
|
65
63
|
async function fetchMeshComponents(id) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
id,
|
|
71
|
-
},
|
|
72
|
-
},
|
|
64
|
+
const geodeStore = useGeodeStore()
|
|
65
|
+
return geodeStore.request(
|
|
66
|
+
back_model_schemas.mesh_components,
|
|
67
|
+
{ id },
|
|
73
68
|
{
|
|
74
69
|
response_function: async (response) => {
|
|
75
70
|
db[id].mesh_components = response._data.uuid_dict
|
|
@@ -80,11 +75,10 @@ export const useDataBaseStore = defineStore("dataBase", () => {
|
|
|
80
75
|
|
|
81
76
|
async function fetchUuidToFlatIndexDict(id) {
|
|
82
77
|
console.log("fetchUuidToFlatIndexDict", id)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
},
|
|
78
|
+
const geodeStore = useGeodeStore()
|
|
79
|
+
return geodeStore.request(
|
|
80
|
+
back_model_schemas.vtm_component_indices,
|
|
81
|
+
{ id },
|
|
88
82
|
{
|
|
89
83
|
response_function: async (response) => {
|
|
90
84
|
db[id]["uuid_to_flat_index"] = response._data.uuid_to_flat_index
|
package/app/stores/data_style.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getDefaultStyle } from "../utils/default_styles.js"
|
|
2
|
-
import useDataStyleState from "../
|
|
3
|
-
import useMeshStyle from "../
|
|
4
|
-
import useModelStyle from "../
|
|
2
|
+
import useDataStyleState from "../internal/stores/data_style_state.js"
|
|
3
|
+
import useMeshStyle from "../internal/stores/mesh/index.js"
|
|
4
|
+
import useModelStyle from "../internal/stores/model/index.js"
|
|
5
5
|
|
|
6
6
|
export const useDataStyleStore = defineStore("dataStyle", () => {
|
|
7
7
|
const dataStyleState = useDataStyleState()
|