diff --git a/components.d.ts b/components.d.ts index 864a1e1..7d0d6cb 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,7 +9,9 @@ declare module '@vue/runtime-core' { export interface GlobalComponents { Alarm: typeof import('./src/components/alarm.vue')['default'] BatchImp: typeof import('./src/components/batch-imp.vue')['default'] + copy: typeof import('./src/components/upload-img copy.vue')['default'] Countup: typeof import('./src/components/countup.vue')['default'] + CustomInput: typeof import('./src/components/CustomInput.vue')['default'] DeviceInfo: typeof import('./src/components/deviceInfo.vue')['default'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] ElButton: typeof import('element-plus/es')['ElButton'] @@ -54,8 +56,10 @@ declare module '@vue/runtime-core' { TableEdit: typeof import('./src/components/table-edit.vue')['default'] TableSearch: typeof import('./src/components/table-search.vue')['default'] UploadImg: typeof import('./src/components/upload-img.vue')['default'] + UploadImgsa: typeof import('./src/components/upload-imgsa.vue')['default'] } export interface ComponentCustomProperties { vInfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll'] + vLoading: typeof import('element-plus/es')['ElLoadingDirective'] } } diff --git a/src/api/index.d.ts b/src/api/index.d.ts index 67d213b..20b1b6c 100644 --- a/src/api/index.d.ts +++ b/src/api/index.d.ts @@ -15,6 +15,86 @@ export interface TRoleList { createTime: string } + + +export interface TStatisticsDevice { + addCount: number + deviceTotal: number + onlineCount: number + warnCount: number +} + +export interface TStatisticsCount { + addCount: number + deviceTotal: number + onlineCount: number + warnCount: number +} + +export interface statisticsContentReq { + type: string + startDate: string + endDate: string +} + +export interface statisticsContentRes { + sosCount: number + railCount: number + destroyCount: number + batteryCount: number + heartRateCount: number + bloodOxygenCount: number + tempCount: number + times: any[], + sosArr: any[], + railArr: any[], + destroyArr: any[], + healthArr: any[], +} + +export interface TWarningConfirm { + id?: number | string + name: string + username: string + content: string + images: string[] +} + +export interface TDeviceConfigModify { + deviceId: string | string[] + userNumber: string + minHr: number + maxHr: number + minBo: number + minTemp: number + maxTemp: number + contacts: any[] +} + + +export namespace TDeviceConfig { + + interface Treq { + deviceId: string | string[] + } + interface Tcontacts { + name: string + phone: string + } + interface Tres { + deviceId: string | string[] + userNumber: string + minHr: number + minBo: number + minTemp: number + maxTemp: number + maxHr: number + name?: string + phone?: string + contacts: Tcontacts[] + } +} + export namespace TLogin { export interface Ireq { username: string; @@ -103,7 +183,7 @@ export namespace TDevice { } export interface IRecordReq extends Ipaging { - deviceId?: number; + deviceId?: string | string[]; } export interface IRecordRes { id: number @@ -212,42 +292,34 @@ export namespace TWarnRecord { } } - - - - -export interface TStatisticsDevice { - addCount: number - deviceTotal: number - onlineCount: number - warnCount: number +export namespace TWarningDetail { + interface TParams { + id: number | string + } + interface TRes { + address: string + adminName: string + adminPhone: string + creatUser: string + createTime: string + deviceId: string + healthData: string + id: number + lat: number + lng: number + maxValue: number + minValue: number + rcontent: string + rimg: any + rname: string + status: number + type: number + updateTime: string + updateUser: string + userNumber: string + username: string + value: string + orgName: string + warnType: number + } } - -export interface TStatisticsCount { - addCount: number - deviceTotal: number - onlineCount: number - warnCount: number -} - -export interface statisticsContentReq { - type: string - startDate: string - endDate: string -} - -export interface statisticsContentRes { - sosCount: number - railCount: number - destroyCount: number - batteryCount: number - heartRateCount: number - bloodOxygenCount: number - tempCount: number - times: any[], - sosArr: any[], - railArr: any[], - destroyArr: any[], - healthArr: any[], -} - diff --git a/src/api/index.ts b/src/api/index.ts index 41d4f4c..d8d30de 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,5 +1,5 @@ import request from '../utils/request'; -import { TLogin, TAccount, IpagingRes, TDevice, TOrg, TRoleList, TStatisticsDevice, statisticsContentReq, statisticsContentRes, TStatisticsCount, TWarnRecord } from "./index.d"; +import { TLogin, TAccount, IpagingRes, TDevice, TOrg, TRoleList, TStatisticsDevice, statisticsContentReq, statisticsContentRes, TStatisticsCount, TWarnRecord, TWarningDetail, TWarningConfirm, TDeviceConfigModify, TDeviceConfig } from "./index.d"; export const fetchLogin = (p: TLogin.Ireq): Promise => { return request({ @@ -116,7 +116,7 @@ export const setMode = (p: TDevice.ISetMonitor): Promise => { // 获取定位 export const deviceGetLocation = (p: TDevice.ISetMonitor): Promise => { return request({ - url: '/v1/web/device/getLocation', + url: '/v1/web/device/getLocate', method: 'post', data: p }); @@ -143,7 +143,7 @@ export const deviceUseRecord = (p: TDevice.IRecordReq): Promise> => { return request({ - url: '/v1/web/device/warning/record', + url: '/v1/web/warning/record', method: 'get', params: p }); @@ -186,7 +186,7 @@ export const orgDelete = (p?: TOrg.Idel): Promise => { // 获取角色列表 export const roleList = (): Promise => { return request({ - url: '/v1/web/account/role/list', + url: '/v1/web/role/list', method: 'get', }); }; @@ -227,10 +227,46 @@ export const statisticsWarningapi = (): Promise => { // 预警记录 export const warnRecord = (p: TWarnRecord.IListReq): Promise> => { return request({ - url: '/v1/web/warn/record', + url: '/v1/web/warning/record', method: 'get', params: p }); }; +// 预警记录 +export const warningDetail = (p: TWarningDetail.TParams): Promise => { + return request({ + url: '/v1/web/warning/detail', + method: 'get', + params: p + }); +}; + +// 预警记录 +export const warningConfirm = (p: TWarningConfirm): Promise => { + return request({ + url: '/v1/web/warning/confirm', + method: 'post', + data: p + }); +}; + +// 获取专项配置 +export const deviceConfig = (p: TDeviceConfig.Treq): Promise => { + return request({ + url: '/v1/web/device/deviceConfig', + method: 'get', + params: p + }); +}; + +// 修改专项配置 +export const deviceConfigModify = (p: TDeviceConfigModify): Promise => { + return request({ + url: '/v1/web/device/deviceConfig/modify', + method: 'post', + data: p + }); +}; + diff --git a/src/assets/img/location.png b/src/assets/img/location.png new file mode 100644 index 0000000..140fdbd Binary files /dev/null and b/src/assets/img/location.png differ diff --git a/src/components/upload-img.vue b/src/components/upload-img.vue index 8e41737..991474c 100644 --- a/src/components/upload-img.vue +++ b/src/components/upload-img.vue @@ -1,12 +1,17 @@