[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,3 +1,5 @@
import { getLocal } from '.';
const TokenKey = 'Admin-Token';
const tokenStorage = useStorage<null | string>(TokenKey, null);
@ -7,3 +9,27 @@ export const getToken = () => tokenStorage.value;
export const setToken = (access_token: string) => (tokenStorage.value = access_token);
export const removeToken = () => (tokenStorage.value = null);
export const getDockSocketUrl = () => {
return getLocal('dockSocketUrl');
};
export const getHost = () => {
return getLocal('host');
};
export const getRtmpPort = () => {
return getLocal('rtmpPort');
};
export const getRtcPort = () => {
return getLocal('rtcPort');
};
export const getDockAir = () => {
return getLocal('dockAir');
};
export const getAiUrl = () => {
return getLocal('aiUrl');
};

View File

@ -1,5 +1,5 @@
import { parseTime } from '@/utils/ruoyi';
import $cache from '@/plugins/cache';
/**
* 表格时间格式化
*/
@ -15,6 +15,14 @@ export const formatDate = (cellValue: string) => {
return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds;
};
export const setLocal = (key, value) => {
return $cache.local.set(key, value);
};
export const getLocal = (key) => {
return $cache.local.get(key);
};
/**
* @param {number} time
* @param {string} option
@ -316,3 +324,5 @@ export const removeClass = (ele: HTMLElement, cls: string) => {
export const isExternal = (path: string) => {
return /^(https?:|http?:|mailto:|tel:)/.test(path);
};
export { parseTime };

View File

@ -180,6 +180,7 @@ export function download(url: string, params: any, fileName: string) {
return service.post(url, params, {
transformRequest: [
(params: any) => {
return tansParams(params);
}
],
@ -188,6 +189,7 @@ export function download(url: string, params: any, fileName: string) {
}).then(async (resp: any) => {
const isLogin = blobValidate(resp);
if (isLogin) {
console.log("🚀 ~ download ~ resp:", resp)
const blob = new Blob([resp]);
FileSaver.saveAs(blob, fileName);
} else {