添加文档注释,方便生成技术文档

This commit is contained in:
wzy-warehouse
2026-04-13 22:28:56 +08:00
parent 8ef7d36d26
commit 27fba7ce12
34 changed files with 520 additions and 160 deletions
+60 -6
View File
@@ -3,23 +3,38 @@ import { defineStore } from 'pinia';
import { type Ref, ref } from 'vue';
/**
* 加载信息弹窗相关参数
* 加载信息弹窗相关状态管理
* @returns 点击对象、隐患点/风险点状态及相关方法
*/
export const useLoadingInformationStore = defineStore(
'loadingInformation',
() => {
// 点击的对象
/**
* 点击的对象
*/
const clickObject: Ref<ClickObject> = ref({ id: '', primitive: null });
// 隐患点
/**
* 隐患点加载状态
*/
const loadingHiddenPointInformationStatus: Ref<boolean> = ref(false);
/**
* 隐患点ID
*/
const hiddenPointId: Ref<number> = ref(-1);
// 风险点
/**
* 风险点加载状态
*/
const loadingRiskPointInformationStatus: Ref<boolean> = ref(false);
/**
* 风险点ID
*/
const riskPointId: Ref<number> = ref(-1);
// 重置状态
/**
* 重置状态
*/
const resetStatue = () => {
loadingHiddenPointInformationStatus.value = false;
hiddenPointId.value = -1;
@@ -27,26 +42,65 @@ export const useLoadingInformationStore = defineStore(
riskPointId.value = -1;
};
// get/set方法
/**
* 获取点击对象
* @returns 点击对象
*/
const getClickObject = () => clickObject.value;
/**
* 设置点击对象
* @param value - 点击对象
*/
const setClickObject = (value: ClickObject) => {
clickObject.value = value;
};
/**
* 获取隐患点加载状态
* @returns 加载状态
*/
const getLoadingHiddenPointInformationStatus = () =>
loadingHiddenPointInformationStatus.value;
/**
* 设置隐患点加载状态
* @param value - 加载状态
*/
const setLoadingHiddenPointInformationStatus = (value: boolean) => {
loadingHiddenPointInformationStatus.value = value;
};
/**
* 获取风险点加载状态
* @returns 加载状态
*/
const getLoadingRiskPointInformationStatus = () =>
loadingRiskPointInformationStatus.value;
/**
* 设置风险点加载状态
* @param value - 加载状态
*/
const setLoadingRiskPointInformationStatus = (value: boolean) => {
loadingRiskPointInformationStatus.value = value;
};
/**
* 获取隐患点ID
* @returns 隐患点ID
*/
const getHiddenPointId = () => hiddenPointId.value;
/**
* 设置隐患点ID
* @param value - 隐患点ID
*/
const setHiddenPointId = (value: number) => {
hiddenPointId.value = value;
};
/**
* 获取风险点ID
* @returns 风险点ID
*/
const getRiskPointId = () => riskPointId.value;
/**
* 设置风险点ID
* @param value - 风险点ID
*/
const setRiskPointId = (value: number) => {
riskPointId.value = value;
};