|
|
@@ -310,19 +310,8 @@ export const back = () => {
|
|
|
|
|
|
const loadStore = async () => {
|
|
|
const data: any = await api.getStore();
|
|
|
- if (params.temp) {
|
|
|
- try {
|
|
|
- const str = await api.getFile("panoReshot.json");
|
|
|
- const data = await (await fetch(str).then()).text();
|
|
|
- reshootData.value = JSON.parse(data).map((item) => ({
|
|
|
- ...item,
|
|
|
- position: JSON.parse(item.position),
|
|
|
- }));
|
|
|
- } catch (e) {
|
|
|
- console.error(e);
|
|
|
- reshootData.value = [];
|
|
|
- }
|
|
|
- }
|
|
|
+ reshootData.value = [];
|
|
|
+
|
|
|
list.value = data?.measures || [];
|
|
|
baseLines.value = data?.baseLines || [];
|
|
|
basePoints.value = data?.basePoints || [];
|
|
|
@@ -335,6 +324,19 @@ const loadStore = async () => {
|
|
|
tables.value = data?.tables || {};
|
|
|
drawSetting.value = data?.drawSetting || {};
|
|
|
syncSceneStore();
|
|
|
+
|
|
|
+ if (params.temp) {
|
|
|
+ try {
|
|
|
+ const str = await api.getFile("panoReshot.json");
|
|
|
+ const data = await (await fetch(str).then()).text();
|
|
|
+ reshootData.value = JSON.parse(data).map((item) => ({
|
|
|
+ ...item,
|
|
|
+ position: JSON.parse(item.position),
|
|
|
+ }));
|
|
|
+ } catch (e) {
|
|
|
+ console.error(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
export const updateSceneStore = debounce(api.setStore, 300);
|
|
|
@@ -359,6 +361,7 @@ export const downloadImage = async (
|
|
|
};
|
|
|
|
|
|
const syncSceneStore = () => {
|
|
|
+ console.log("开始监听数据变化");
|
|
|
return watch(
|
|
|
() => ({
|
|
|
measures: list.value,
|