格式化代码并添加视角高度控制以及视角范围控制
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { type Ref, ref } from 'vue'
|
||||
import { defineStore } from 'pinia';
|
||||
import { type Ref, ref } from 'vue';
|
||||
|
||||
export const useCryptStore = defineStore('crypt', () => {
|
||||
// sm2公钥
|
||||
const sm2PublicKey: Ref<string> = ref('')
|
||||
const sm2PublicKey: Ref<string> = ref('');
|
||||
|
||||
return { sm2PublicKey }
|
||||
})
|
||||
return { sm2PublicKey };
|
||||
});
|
||||
|
||||
@@ -1,52 +1,68 @@
|
||||
import { Billboard } from 'cesium'
|
||||
import { defineStore } from 'pinia'
|
||||
import { type Ref, ref } from 'vue'
|
||||
import type { ClickObject } from '@/types/cesium/ClickObject';
|
||||
import { defineStore } from 'pinia';
|
||||
import { type Ref, ref } from 'vue';
|
||||
|
||||
/**
|
||||
* 加载信息弹窗相关参数
|
||||
*/
|
||||
export const useLoadingInformationStore = defineStore('loadingInformation', () => {
|
||||
|
||||
export const useLoadingInformationStore = defineStore(
|
||||
'loadingInformation',
|
||||
() => {
|
||||
// 点击的对象
|
||||
const clickObject: Ref<{ primitive: Billboard | null }> = ref({ primitive: null })
|
||||
const clickObject: Ref<ClickObject> = ref({ id: '', primitive: null });
|
||||
|
||||
// 隐患点
|
||||
const loadingHiddenPointInformationStatus: Ref<boolean> = ref(false)
|
||||
const hiddenPointId: Ref<number> = ref(-1)
|
||||
const loadingHiddenPointInformationStatus: Ref<boolean> = ref(false);
|
||||
const hiddenPointId: Ref<number> = ref(-1);
|
||||
|
||||
// 风险点
|
||||
const loadingRiskPointInformationStatus: Ref<boolean> = ref(false)
|
||||
const riskPointId: Ref<number> = ref(-1)
|
||||
const loadingRiskPointInformationStatus: Ref<boolean> = ref(false);
|
||||
const riskPointId: Ref<number> = ref(-1);
|
||||
|
||||
// 重置状态
|
||||
const resetStatue = () => {
|
||||
loadingHiddenPointInformationStatus.value = false
|
||||
hiddenPointId.value = -1
|
||||
loadingRiskPointInformationStatus.value = false
|
||||
riskPointId.value = -1
|
||||
}
|
||||
loadingHiddenPointInformationStatus.value = false;
|
||||
hiddenPointId.value = -1;
|
||||
loadingRiskPointInformationStatus.value = false;
|
||||
riskPointId.value = -1;
|
||||
};
|
||||
|
||||
// get/set方法
|
||||
const getClickObject = () => clickObject.value
|
||||
const setClickObject = (value: {primitive: Billboard}) => {
|
||||
clickObject.value = value
|
||||
}
|
||||
const getLoadingHiddenPointInformationStatus = () => loadingHiddenPointInformationStatus.value
|
||||
const getClickObject = () => clickObject.value;
|
||||
const setClickObject = (value: ClickObject) => {
|
||||
clickObject.value = value;
|
||||
};
|
||||
const getLoadingHiddenPointInformationStatus = () =>
|
||||
loadingHiddenPointInformationStatus.value;
|
||||
const setLoadingHiddenPointInformationStatus = (value: boolean) => {
|
||||
loadingHiddenPointInformationStatus.value = value
|
||||
}
|
||||
const getLoadingRiskPointInformationStatus = () => loadingRiskPointInformationStatus.value
|
||||
loadingHiddenPointInformationStatus.value = value;
|
||||
};
|
||||
const getLoadingRiskPointInformationStatus = () =>
|
||||
loadingRiskPointInformationStatus.value;
|
||||
const setLoadingRiskPointInformationStatus = (value: boolean) => {
|
||||
loadingRiskPointInformationStatus.value = value
|
||||
}
|
||||
const getHiddenPointId = () => hiddenPointId.value
|
||||
loadingRiskPointInformationStatus.value = value;
|
||||
};
|
||||
const getHiddenPointId = () => hiddenPointId.value;
|
||||
const setHiddenPointId = (value: number) => {
|
||||
hiddenPointId.value = value
|
||||
}
|
||||
const getRiskPointId = () => riskPointId.value
|
||||
hiddenPointId.value = value;
|
||||
};
|
||||
const getRiskPointId = () => riskPointId.value;
|
||||
const setRiskPointId = (value: number) => {
|
||||
riskPointId.value = value
|
||||
}
|
||||
riskPointId.value = value;
|
||||
};
|
||||
|
||||
return { resetStatue, getClickObject, setClickObject, getLoadingHiddenPointInformationStatus, setLoadingHiddenPointInformationStatus, getLoadingRiskPointInformationStatus, setLoadingRiskPointInformationStatus, getHiddenPointId, setHiddenPointId, getRiskPointId, setRiskPointId }
|
||||
})
|
||||
return {
|
||||
resetStatue,
|
||||
getClickObject,
|
||||
setClickObject,
|
||||
getLoadingHiddenPointInformationStatus,
|
||||
setLoadingHiddenPointInformationStatus,
|
||||
getLoadingRiskPointInformationStatus,
|
||||
setLoadingRiskPointInformationStatus,
|
||||
getHiddenPointId,
|
||||
setHiddenPointId,
|
||||
getRiskPointId,
|
||||
setRiskPointId,
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { type Ref, ref } from 'vue'
|
||||
import { defineStore } from 'pinia';
|
||||
import { type Ref, ref } from 'vue';
|
||||
|
||||
export const useViewerStore = defineStore('viewer', () => {
|
||||
// viewer完成状态
|
||||
const viewerLoadingCompleted: Ref<boolean> = ref(false)
|
||||
// viewer完成状态
|
||||
const viewerLoadingCompleted: Ref<boolean> = ref(false);
|
||||
|
||||
// get/set方法
|
||||
const getViewerLoadingCompleted = () => viewerLoadingCompleted.value
|
||||
const setViewerLoadingCompleted = (value: boolean) => {
|
||||
viewerLoadingCompleted.value = value
|
||||
}
|
||||
// get/set方法
|
||||
const getViewerLoadingCompleted = () => viewerLoadingCompleted.value;
|
||||
const setViewerLoadingCompleted = (value: boolean) => {
|
||||
viewerLoadingCompleted.value = value;
|
||||
};
|
||||
|
||||
return { getViewerLoadingCompleted, setViewerLoadingCompleted }
|
||||
})
|
||||
return { getViewerLoadingCompleted, setViewerLoadingCompleted };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user