[add] 新增萤石摄像头抓拍相关逻辑,获取方阵内光伏板、桩点支柱立架、箱变、逆变器地理信息接口

This commit is contained in:
lcj
2025-06-18 19:56:23 +08:00
parent 9d092facd0
commit cd1779fffd
91 changed files with 4163 additions and 672 deletions

View File

@ -1,12 +1,22 @@
const sessionCache = {
set(key: string, value: any) {
if (!sessionStorage) {
return;
}
if (key != null && value != null) {
sessionStorage.setItem(key, value);
if (!sessionStorage || key == null || value == null) return;
try {
const str = typeof value === 'string' ? value : JSON.stringify(value);
// 限制:如果数据超过 1MB就不存
if (str.length > 1024 * 1024) {
console.warn(`sessionStorage.setItem(${key}) 跳过,数据过大(${(str.length / 1024).toFixed(2)} KB`);
return;
}
sessionStorage.setItem(key, str);
} catch (e) {
console.error(`sessionStorage.setItem(${key}) 失败:`, e);
}
},
get(key: string) {
if (!sessionStorage) {
return null;

View File

@ -18,6 +18,18 @@ export default {
msgWarning(content: any) {
ElMessage.warning(content);
},
// 警告消息
warning(content: any) {
ElMessage.warning(content);
},
// 错误消息
error(content: any) {
ElMessage.error(content);
},
// 成功消息
success(content: any) {
ElMessage.success(content);
},
// 弹出提示
alert(content: any) {
ElMessageBox.alert(content, '系统提示');
@ -34,6 +46,7 @@ export default {
alertWarning(content: any) {
ElMessageBox.alert(content, '系统提示', { type: 'warning' });
},
// 通知提示
notify(content: any) {
ElNotification.info(content);