This commit is contained in:
高云鹏 2024-12-02 10:28:50 +08:00
commit f2b50e5b80
4 changed files with 7 additions and 11 deletions

View File

@ -46,6 +46,7 @@ export function menusQuery(params: object = {}) {
url: '/api/menus/query', url: '/api/menus/query',
method: 'POST', method: 'POST',
data: params, data: params,
timeout: 80 * 1000,
}) })
} }
@ -166,7 +167,6 @@ export function equipTree(params: object = {}) {
}) })
} }
// 设备分页查询 // 设备分页查询
export function equipQuery(params: object = {}) { export function equipQuery(params: object = {}) {
return createAxios({ return createAxios({
@ -185,7 +185,7 @@ export function equipAdd(params: object = {}) {
}) })
} }
// 设备删除 // 设备删除
export function equipDelete(params: object = {}) { export function equipDelete(params: object = {}) {
return createAxios({ return createAxios({
url: '/api/equipment/delete', url: '/api/equipment/delete',
@ -211,7 +211,7 @@ export function equipUpdate(params: object = {}) {
// }) // })
// } // }
export const equipImport = (data:FormData, v:string) => { export const equipImport = (data: FormData, v: string) => {
const token = encrypt_aes(adminInfo.token, v) const token = encrypt_aes(adminInfo.token, v)
return createAxios( return createAxios(
{ {
@ -247,7 +247,6 @@ export function equipType(params: object = {}) {
}) })
} }
// 设备详情物模型 // 设备详情物模型
export function equipDetailsModel(params: object = {}) { export function equipDetailsModel(params: object = {}) {
return createAxios({ return createAxios({
@ -258,7 +257,7 @@ export function equipDetailsModel(params: object = {}) {
} }
// 设备详情机构 // 设备详情机构
export function equipDetailsOrg(params: object = {} ) { export function equipDetailsOrg(params: object = {}) {
return createAxios({ return createAxios({
url: '/api/org/list', url: '/api/org/list',
method: 'POST', method: 'POST',

View File

@ -42,10 +42,9 @@ export const getUrlPort = (): string => {
function createAxios<Data = any, T = ApiPromise<Data>>(axiosConfig: AxiosRequestConfig, options: Options = {}, loading: LoadingOptions = {}): T { function createAxios<Data = any, T = ApiPromise<Data>>(axiosConfig: AxiosRequestConfig, options: Options = {}, loading: LoadingOptions = {}): T {
const config = useConfig() const config = useConfig()
const adminInfo = useAdminInfo() const adminInfo = useAdminInfo()
const Axios = axios.create({ const Axios = axios.create({
baseURL: getUrl(), baseURL: getUrl(),
timeout: 1000 * 10, timeout: axiosConfig.timeout ? axiosConfig.timeout : 1000 * 10,
headers: { headers: {
'think-lang': config.lang.defaultLang, 'think-lang': config.lang.defaultLang,
server: true, server: true,

View File

@ -75,11 +75,9 @@ const statAnalysisInterval = ref('1h')
const statAnalysisDeviceId = ref('') const statAnalysisDeviceId = ref('')
const statAnalysisSelectOptions: any = reactive({ const statAnalysisSelectOptions: any = reactive({
interval: [ interval: [
{ label: '一分钟', value: '1m' },
{ label: '一分钟', value: '1m' }, { label: '一分钟', value: '1m' },
{ label: '五分钟', value: '5m' }, { label: '五分钟', value: '5m' },
{ label: '十分钟', value: '10m' }, { label: '十分钟', value: '10m' },
{ label: '十分钟', value: '10m' },
{ label: '十五分钟', value: '15m' }, { label: '十五分钟', value: '15m' },
{ label: '一小时', value: '1h' }, { label: '一小时', value: '1h' },
{ label: '一天', value: '1d' }, { label: '一天', value: '1d' },

View File

@ -575,8 +575,8 @@ const getTimestamps = (start: any, end: any, interval: any) => {
case '5m': case '5m':
current += 5 * 60 * 1000 current += 5 * 60 * 1000
break break
case '15m': case '10m':
current += 15 * 60 * 1000 current += 10 * 60 * 1000
break break
case '1d': case '1d':
current += 24 * 60 * 60 * 1000 current += 24 * 60 * 60 * 1000