Compare commits
8 Commits
2dca6e3ff8
...
b6c64df004
| Author | SHA1 | Date | |
|---|---|---|---|
| b6c64df004 | |||
| 93166e0f71 | |||
| dc28fb65ba | |||
| 03df0388b4 | |||
| 6d6d395bff | |||
| 75a7da4a19 | |||
| 8e552df724 | |||
| 72699abdec |
@ -6,8 +6,8 @@ VITE_APP_ENV = 'development'
|
|||||||
|
|
||||||
# 开发环境
|
# 开发环境
|
||||||
#VITE_APP_BASE_API = 'https://fuyuanshen.com/backend'
|
#VITE_APP_BASE_API = 'https://fuyuanshen.com/backend'
|
||||||
# VITE_APP_BASE_API = 'https://www.cnxhyc.com/jq'
|
VITE_APP_BASE_API = 'https://www.cnxhyc.com/jq'
|
||||||
VITE_APP_BASE_API = 'http://192.168.110.56:8000'
|
#VITE_APP_BASE_API = 'http://192.168.2.34:8000'
|
||||||
#代永飞接口
|
#代永飞接口
|
||||||
# VITE_APP_BASE_API = 'http://457102h2d6.qicp.vip:24689'
|
# VITE_APP_BASE_API = 'http://457102h2d6.qicp.vip:24689'
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,8 @@ export interface DeviceDetail {
|
|||||||
name: string; // 姓名
|
name: string; // 姓名
|
||||||
code: string; // ID(身份证/工号)
|
code: string; // ID(身份证/工号)
|
||||||
};
|
};
|
||||||
chargeState: string
|
chargeState: string;
|
||||||
|
alarmStatus:number
|
||||||
}
|
}
|
||||||
// 定义灯光模式的类型接口
|
// 定义灯光模式的类型接口
|
||||||
export interface LightMode {
|
export interface LightMode {
|
||||||
|
|||||||
@ -5,6 +5,7 @@ export interface deviceQuery extends PageQuery {
|
|||||||
deviceType: string;
|
deviceType: string;
|
||||||
deviceStatus: string;
|
deviceStatus: string;
|
||||||
bluetoothName?: string; // 蓝牙名称查询字段
|
bluetoothName?: string; // 蓝牙名称查询字段
|
||||||
|
onlineStatus?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface deviceForm {
|
export interface deviceForm {
|
||||||
|
|||||||
4
src/assets/icons/svg/home.svg
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg id="_图层_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17.99 18">
|
||||||
|
<path id="_矢量_42" d="M17.82,5.81L9.5.08c-.16-.11-.38-.11-.54,0L.2,5.81c-.13.08-.2.21-.2.35v11.41c0,.24.21.43.46.43h5.54c.25,0,.46-.19.46-.43v-2.48c0-1.42,1.17-2.65,2.68-2.69,1.57-.04,2.85,1.13,2.85,2.58v2.59c0,.24.21.43.46.43h5.08c.25,0,.46-.19.46-.43V6.15c0-.14-.06-.26-.18-.35h.01Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 417 B |
6
src/assets/icons/svg/报警信息1.1.svg
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 18">
|
||||||
|
|
||||||
|
<path d="M8.1,3.9c.6,0,1-.5,1-1v-1.9C9.1.5,8.6,0,8.1,0s-1,.4-1,1v1.9c0,.6.4,1,1,1h0ZM3.3,5.7c-.4.4-1,.4-1.4,0l-1.6-1.5c-.4-.4-.4-.9,0-1.3.4-.4,1-.4,1.4,0l1.6,1.5c.4.4.4.9,0,1.3ZM12.6,5.7c.4.4,1,.4,1.4,0l1.6-1.5c.4-.4.4-.9,0-1.3-.4-.4-1-.4-1.4,0l-1.6,1.5c-.4.4-.4.9,0,1.3ZM3,15.4v-5.4c0-2.8,2.3-5.1,5-5.1s5.1,2.3,5.1,5.1v5.4h1.6c.7,0,1.3.6,1.3,1.3s-.6,1.3-1.3,1.3H1.5c-.7,0-1.3-.6-1.3-1.3s.6-1.3,1.3-1.3c0,0,1.6,0,1.6,0ZM10.1,11.3h-1.1c-.1,0-.2,0-.2-.2l.4-2.1c0-.1-.2-.2-.3-.1l-2.9,2.6c0,0,0,.2.1.2h1.2c0,0,.2,0,.2.2l-.4,2.1c0,.1.2.2.3.1l2.9-2.6c.1,0,0-.2-.1-.2Z"/>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 699 B |
4
src/assets/icons/svg/控制中心1.1.svg
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 18 16">
|
||||||
|
<path id="_矢量_54" class="cls-1" d="M13.5,12.6v-1.1h2.2v1.1h2.2v2.3h-2.2v1.1h-2.2v-1.1H0v-2.3h13.5ZM7.9,6.9v-1.1h2.2v1.1h7.9v2.3h-7.9v1.1h-2.2v-1.1H0v-2.3s7.9,0,7.9,0ZM2.2,1.1V0h2.2v1.1h13.5v2.3H4.5v1.1h-2.2v-1.1H0V1.1h2.2Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 356 B |
6
src/assets/icons/svg/数据可视化1.1.svg
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 18 15">
|
||||||
|
|
||||||
|
<path d="M.8,0h16.4s.1,0,.2,0c0,0,.1,0,.1,0,0,0,.1,0,.1,0,0,0,0,0,.1,0,0,0,0,0,.1.1s0,0,0,.1c0,0,0,.1,0,.2,0,0,0,.1,0,.2v10.8c0,0,0,.1,0,.2,0,0,0,.1,0,.2,0,0,0,.1,0,.1,0,0,0,0-.1.1s0,0-.1.1c0,0,0,0-.1,0,0,0-.1,0-.1,0s-.1,0-.2,0H.8c0,0-.1,0-.2,0,0,0-.1,0-.1,0,0,0,0,0-.1,0s0,0-.1-.1c0,0,0,0,0-.1s0,0,0-.1c0,0,0-.1,0-.2C0,11.8,0,11.7,0,11.7V.8S0,.7,0,.7c0,0,0-.1,0-.2s0,0,0-.1c0,0,0,0,0-.1s0,0,.1,0c0,0,0,0,.1,0,0,0,.1,0,.1,0C.7,0,.8,0,.8,0h0ZM2.5,6.7h0s0,0,0,0c0,0,0,0,0,0s0,0,0,0,0,0,0,0,0,0,0,0c0,0,0,0,0,0v2.7s0,0,0,0,0,0,0,0c0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0s0,0,0,0h1s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0s0,0,0,0,0,0,0,0c0,0,0,0,0,0v-2.7s0,0,0,0,0,0,0,0c0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0s0,0,0,0h-.9ZM6.5,5h0s0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0c0,0,0,0,0,0v4.3s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0s0,0,0,0h1s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0s0,0,0,0,0,0,0,0c0,0,0,0,0,0v-4.3s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0s0,0,0,0c0,0-.9,0-.9,0ZM10.6,2.5h0s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0s0,0,0,0,0,0,0,0c0,0,0,0,0,0v6.8s0,0,0,0,0,0,0,0c0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0h1s0,0,0,0c0,0,0,0,0,0s0,0,0,0,0,0,0,0,0,0,0,0c0,0,0,0,0,0V2.8s0,0,0,0,0,0,0,0c0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0s0,0,0,0h0s-.8,0-.8,0ZM14.7,5.8h0s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0v3.5s0,0,0,0,0,0,0,0c0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0h1s0,0,0,0c0,0,0,0,0,0s0,0,0,0,0,0,0,0,0,0,0,0c0,0,0,0,0,0v-3.5s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0s0,0,0,0h0s-.8,0-.8,0ZM6.6,14.2v-.5s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0s0,0,0,0h4.3s0,0,0,0c0,0,0,0,0,0s0,0,0,0,0,0,0,0,0,0,0,0c0,0,0,0,0,0v.5h3.8s0,0,0,0c0,0,0,0,0,0s0,0,0,0,0,0,0,0,0,0,0,0c0,0,0,0,0,0v.2s0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0H2.8s0,0,0,0c0,0,0,0,0,0s0,0,0,0,0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0v-.2s0,0,0,0,0,0,0,0c0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0s0,0,0,0h3.8Z"/>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 2.0 KiB |
7
src/assets/icons/svg/日志报表1.1.svg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 16 18">
|
||||||
|
|
||||||
|
<path d="M5.8,2.4h4.4c.4,0,.7-.3.7-.7V.7c0-.4-.3-.7-.7-.7h-4.4c-.4,0-.7.3-.7.7v1.1c0,.4.3.7.7.7Z"/>
|
||||||
|
<path d="M13.8,1.3h-2.3v.7c0,.5-.4.8-.9.8h-5.2c-.5,0-.9-.4-.9-.8v-.7h-2.3C1,1.3,0,2.2,0,3.4v12.5c0,1.1,1,2.1,2.2,2.1h11.5c1.2,0,2.2-.9,2.2-2.1V3.4c0-1.2-1-2.1-2.2-2.1ZM13.2,13.4H3.3c-.3,0-.6-.2-.6-.5s.2-.5.6-.5h9.9c.3,0,.6.2.6.5s-.3.5-.6.5h0ZM13.2,10H3.3c-.3,0-.6-.2-.6-.5s.2-.5.6-.5h9.9c.3,0,.6.2.6.5s-.3.5-.6.5h0ZM13.2,6.5H3.3c-.3,0-.6-.2-.6-.5s.2-.5.6-.5h9.9c.3,0,.6.2.6.5s-.3.5-.6.5h0Z"/>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 633 B |
6
src/assets/icons/svg/用户管理1.1.svg
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 18 18">
|
||||||
|
|
||||||
|
<path d="M16.9,12.8c-.1-.4-.3-.8-.5-1.2l.6-1-.5-.6-1,.6c-.3-.2-.7-.4-1.1-.4l-.3-1.2h-.8l-.3,1.2c-.4,0-.7.2-1.1.4l-1-.6-.5.6.6,1c-.2.4-.4.8-.5,1.2l-1.1.3v.8l1,.3c0,.5.2,1,.5,1.4l-.5.9.5.5.8-.5c.4.3.9.6,1.4.7l.2.9h.8l.2-.9c.3,0,.5-.1.8-.2s.5-.2.7-.4l.8.5.5-.5-.5-.9c.3-.4.4-.9.5-1.4l1-.3v-.8l-1.1-.3s0,0,0,0ZM13.7,15.6h-.2c0,0-.1,0-.2,0,0,0-.1,0-.2,0s-.1,0-.2,0c0,0-.1,0-.2,0,0,0-.1,0-.2-.1s-.1,0-.1-.1c0,0,0,0-.1-.1,0,0,0,0-.1-.1s0-.1-.1-.1c0,0,0-.1,0-.2,0,0,0-.1,0-.2s0-.1,0-.2,0-.1,0-.2c0,0,0-.1,0-.2v-.4c0,0,0-.1,0-.2,0,0,0-.1,0-.2,0,0,0-.1,0-.2s0-.1,0-.2c0,0,0-.1,0-.2s0-.1.1-.1c0,0,0-.1.1-.1,0,0,0,0,.1-.1s.1,0,.1-.1c0,0,.1,0,.2-.1s.1,0,.2,0c0,0,.1,0,.2,0,0,0,.1,0,.2,0,0,0,.1,0,.2,0h.4c0,0,.1,0,.2,0,0,0,.1,0,.2,0s.1,0,.2,0c0,0,.1,0,.2,0,0,0,.1,0,.2.1s.1,0,.1.1c0,0,0,0,.1.1,0,0,0,0,.1.1s0,.1.1.1c0,0,0,.1,0,.2,0,0,0,.1,0,.2s0,.1,0,.2,0,.1,0,.2c0,0,0,.1,0,.2v.4c0,0,0,.1,0,.2,0,0,0,.1,0,.2,0,0,0,.1,0,.2s0,.1,0,.2c0,0,0,.1,0,.2s0,.1-.1.1c0,0,0,.1-.1.1,0,0,0,0-.1.1s-.1,0-.1.1c0,0-.1,0-.2.1,0,0-.1,0-.2,0,0,0-.1,0-.2,0,0,0-.1,0-.2,0,0,0-.1,0-.2,0,0,0-.2,0-.2,0ZM10.4,9.6c-.6-.5-1.3-.8-2-1,1.4-.7,2.5-2.3,2.5-4S8.9,0,6.5,0,2.2,2,2.2,4.5s1,3.3,2.4,4C1.9,9.4,0,11.9,0,14.8,0,14.8,3.3,15.8,6.6,15.8s1.7,0,2.5-.2c-.1-.3-.2-.7-.3-1,0-.4-.1-.7-.1-1.1,0-1.6.7-3,1.7-3.9h0Z"/>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.4 KiB |
8
src/assets/icons/svg/租户管理1.1.svg
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 18 18">
|
||||||
|
|
||||||
|
<path d="M7.4,12.7c.3-2,1.8-3.2,2.4-3.7h0c0,0,.2,0,.3-.2,1.9-.7,3.2-2.3,3.2-4.3,0-2.5-2.3-4.6-5.1-4.6S3.1,2.1,3.1,4.6s1.4,3.6,3.3,4.3c-.9.2-1.8.6-2.5,1C.6,11.7,0,14.2,0,17.7s.3.3.6.3h9.9l-.9-.4c-.9-.4-2.7-2.3-2.3-4.9h0Z"/>
|
||||||
|
<path d="M13.2,11.6l-1.7,1.4v2.4h.7v-1.2h2v1.2h.7v-2.4l-1.7-1.4h0ZM14.9,11.9h-.3l.3.3v-.3Z"/>
|
||||||
|
<path d="M13.2,9.1c-2.7,0-4.8,2-4.8,4.4s2.2,4.4,4.8,4.4,4.8-2,4.8-4.4-2.1-4.4-4.8-4.4ZM15.9,13.6c0,0-.1,0-.3,0s-.1,0-.2,0v2c0,.2-.2.4-.5.4h-1.6v-1.2h-.6v1.2h-1.6c-.3,0-.5-.2-.5-.4v-2s0,0-.2,0-.2,0-.3,0,0-.2,0-.2,0-.2,0-.2l2.4-2c.3-.2.6-.2.9,0l.4.4c0,0,.2-.2.3-.2h.9c.2,0,.3.2.3.3v.8c0,.1,0,.2-.1.2l.5.5c0,0,0,.1,0,.2,0,0,0,.1,0,.2h0Z"/>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 804 B |
6
src/assets/icons/svg/维修记录1.1.svg
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 18 18">
|
||||||
|
|
||||||
|
<path d="M17.2,2.8s0,0,0,0c-.1-.1-.3-.1-.4,0l-3.2,3.2c-.4.4-1,.4-1.4,0h-.1c-.4-.5-.4-1.1,0-1.5l3.2-3.2s0,0,0,0c0-.1,0-.3-.1-.4-2.2-1.3-5.1-1-7,.9-1.4,1.4-1.9,3.2-1.6,5,0,.3,0,.7-.3,1L0,13.9c0,0,0,.2,0,.2l3.8,3.8c0,0,.2,0,.2,0l6.2-6.2c.2-.2.6-.3,1-.3,1.8.3,3.7-.2,5-1.6,1.9-1.9,2.2-4.8.9-7h0Z"/>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 428 B |
4
src/assets/icons/svg/联调中心1.1.svg
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 18 18">
|
||||||
|
<path id="_联调中心图标" class="cls-1" d="M9.8,12.3c-1.1,0-2.1-.4-2.9-1.2-.2-.2-.3-.5-.3-.8s.1-.6.3-.8c.4-.4,1.2-.4,1.6,0,.8.8,2.1.7,3-.2l3.5-3.5c.5-.5.7-1.1.7-1.7s0-.9-.6-1.3c-.5-.5-1-.6-1.4-.5-.6,0-1.1.3-1.6.7l-2,2c-.5-.5-2.4-.8-2.9-.3l3.3-3.3c.9-.9,2-1.4,3.1-1.4,1.2,0,2.3.4,3.1,1.2.8.8,1.2,1.8,1.2,2.9s-.5,2.4-1.4,3.3l-3.5,3.5c-.9.9-2.1,1.4-3.3,1.4M4.9,7.1l-3.5,3.5C.5,11.5,0,12.7,0,13.9s.4,2.1,1.2,2.9c.8.8,1.9,1.3,3.1,1.2,1.1,0,2.2-.5,3.1-1.4l3.3-3.3c-.5.5-2.5.2-2.9-.3l-2,2c-.4.4-1,.7-1.6.7-.4,0-.9,0-1.4-.6-.5-.4-.5-1-.5-1.3,0-.6.3-1.2.7-1.7l3.5-3.5c.9-.9,2.2-1,3-.2s.5.3.8.3.6-.1.8-.3.3-.5.3-.8-.1-.6-.3-.8c-.8-.8-1.9-1.2-2.9-1.2s-2.4.5-3.3,1.4h0Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 793 B |
6
src/assets/icons/svg/设备管理1.1.svg
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 18 18">
|
||||||
|
|
||||||
|
<path d="M17.6,14.4l-6.4,3.5s-.1,0-.1,0c0,0-.1,0-.2,0h-.2c0,0-.1,0-.2,0,0,0-.1,0-.2,0,0,0-.1,0-.1,0s0,0-.1-.1,0,0-.1-.1c0-.1-.1-.3-.1-.4v-5.9c0,0,0-.1,0-.2,0,0,0-.1,0-.2,0,0,0-.1.1-.2,0,0,.1,0,.2-.1l6.4-3.5s.1,0,.1,0,.1,0,.2,0h.2c0,0,.1,0,.2,0,0,0,.1,0,.2,0,0,0,.1,0,.1,0,0,0,0,0,.1.1s0,0,.1.1c0,.1.1.3.1.4v5.9c0,0,0,.1,0,.2,0,0,0,.1,0,.2,0,0,0,.1-.1.2,0,0-.1,0-.2.1h0ZM.4,14.4c0,0-.1,0-.2-.1,0,0,0-.1-.1-.2,0,0,0-.1,0-.2C0,13.8,0,13.7,0,13.6v-5.9C0,7.3.4,7,.9,7s.3,0,.4.1l6.4,3.5c0,0,.1,0,.2.1,0,0,0,.1.1.2s0,.1,0,.2,0,.1,0,.2v5.9c0,.5-.4.8-.9.8s-.3,0-.4-.1L.4,14.4H.4ZM8.6.1c.3-.1.6-.1.9,0l7.3,3.9s0,0,0,0,0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0v.2s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0l-7.3,3.9c0,0-.1,0-.2,0,0,0-.1,0-.2,0s-.1,0-.2,0-.1,0-.2,0L1.3,5.5s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0v-.2s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0L8.6.1h0Z"/>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.1 KiB |
6
src/assets/icons/svg/首页1.1.svg
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 18 18">
|
||||||
|
|
||||||
|
<path d="M17.8,5.8L9.5,0c-.2-.1-.4-.1-.5,0L.2,5.8c-.1,0-.2.2-.2.3v11.4c0,.2.2.4.5.4h5.5c.2,0,.5-.2.5-.4v-2.5c0-1.4,1.2-2.6,2.7-2.7,1.6,0,2.8,1.1,2.8,2.6v2.6c0,.2.2.4.5.4h5.1c.2,0,.5-.2.5-.4V6.2c0-.1,0-.3-.2-.3h0Z"/>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 345 B |
BIN
src/assets/images/di.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/assets/images/diAc.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/images/high.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
src/assets/images/highAc.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/images/rb.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
src/assets/images/rbAc.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/assets/images/sg.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
src/assets/images/sgAc.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
src/assets/images/zhong.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
src/assets/images/zhongAc.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
@ -79,6 +79,7 @@ const hasOneShowingChild = (parent: RouteRecordRaw, children?: RouteRecordRaw[])
|
|||||||
};
|
};
|
||||||
|
|
||||||
const resolvePath = (routePath: string, routeQuery?: string): any => {
|
const resolvePath = (routePath: string, routeQuery?: string): any => {
|
||||||
|
|
||||||
if (isExternal(routePath)) {
|
if (isExternal(routePath)) {
|
||||||
return routePath;
|
return routePath;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,7 +43,7 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
path: "/homeIndex",
|
path: "/homeIndex",
|
||||||
name: "HomeIndex",
|
name: "HomeIndex",
|
||||||
component: () => import("@/views/homeIndex/index.vue"),
|
component: () => import("@/views/homeIndex/index.vue"),
|
||||||
meta: {title: '数据大屏', icon: 'dashboard', preload: true, keepAlive: true },
|
meta: {title: '数据大屏', icon: 'home', preload: true, keepAlive: true },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
@ -54,7 +54,7 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
path: '/index',
|
path: '/index',
|
||||||
component: () => import('@/views/index.vue'),
|
component: () => import('@/views/index.vue'),
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
meta: { title: '首页', icon: 'dashboard', affix: true, keepAlive: false }
|
meta: { title: '首页', icon: 'home', affix: true, keepAlive: false }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<div>设备型号:{{ deviceDetail.deviceImei }}</div>
|
<div>设备型号:{{ deviceDetail.deviceImei }}</div>
|
||||||
<div class="device-status">设备状态:
|
<div class="device-status">设备状态:
|
||||||
<span :class="{ online: deviceDetail.onlineStatus === 1, offline: deviceDetail?.onlineStatus === 0 }">
|
<span :class="{ online: deviceDetail.onlineStatus === 1, offline: deviceDetail?.onlineStatus === 0 }">
|
||||||
{{ deviceDetail.onlineStatus === 1 ? "在线" : "离线" }}
|
{{ deviceDetail.onlineStatus === 1 ? '在线' : (deviceDetail.onlineStatus === 2 ? '故障' : '离线') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div>电量:{{ deviceDetail.batteryPercentage || 0 }}%</div>
|
<div>电量:{{ deviceDetail.batteryPercentage || 0 }}%</div>
|
||||||
@ -15,6 +15,14 @@
|
|||||||
|
|
||||||
<!-- 主体内容区域 -->
|
<!-- 主体内容区域 -->
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
|
<el-row :gutter="20" class="content-row" :class="deviceDetail.alarmStatus == 1 ? '' : 'displayNone'" >
|
||||||
|
<el-col :lg="24" :xs="24">
|
||||||
|
<div class="staticRwo" :class="deviceDetail.alarmStatus == 1 ? '' : 'displayNone'"
|
||||||
|
@click="showClose()">
|
||||||
|
设备强制报警中!
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<!-- 第一行:灯光模式 + 灯光亮度、强制报警、位置信息 -->
|
<!-- 第一行:灯光模式 + 灯光亮度、强制报警、位置信息 -->
|
||||||
<el-row :gutter="20" class="content-row">
|
<el-row :gutter="20" class="content-row">
|
||||||
<el-col :lg="16" :xs="24">
|
<el-col :lg="16" :xs="24">
|
||||||
@ -50,7 +58,7 @@
|
|||||||
:loading-text="lightModesLoading ? '保存中...' : '保存'"> {{
|
:loading-text="lightModesLoading ? '保存中...' : '保存'"> {{
|
||||||
lightModesLoading ? '保存中' : '保存' }}</el-button>
|
lightModesLoading ? '保存中' : '保存' }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-button type="danger" class="alarm-btn" @click="forceAlarm" :loading="forceAlarmLoading"
|
<el-button type="danger" class="alarm-btn" @click="forceAlarm" :loading="forceAlarmLoading" v-if="deviceDetail.alarmStatus === 0 || deviceDetail.alarmStatus === null"
|
||||||
:loading-text="forceAlarmLoading ? '报警中...' : '强制报警'" > {{
|
:loading-text="forceAlarmLoading ? '报警中...' : '强制报警'" > {{
|
||||||
forceAlarmLoading ? '报警中' : '强制报警' }}</el-button>
|
forceAlarmLoading ? '报警中' : '强制报警' }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
@ -248,7 +256,8 @@ const deviceDetail = ref<DeviceDetail & { typeName: string }>({
|
|||||||
address: '',
|
address: '',
|
||||||
sendMsg: '',
|
sendMsg: '',
|
||||||
chargeState: '0',
|
chargeState: '0',
|
||||||
typeName: ''
|
typeName: '',
|
||||||
|
alarmStatus: 0
|
||||||
});
|
});
|
||||||
// 保留原有的操作中标志位
|
// 保留原有的操作中标志位
|
||||||
const isUpdatingStatus = ref(false);
|
const isUpdatingStatus = ref(false);
|
||||||
@ -357,7 +366,7 @@ const handleLaserClick = async () => {
|
|||||||
laserMode.value.switchStatus = !targetStatus;
|
laserMode.value.switchStatus = !targetStatus;
|
||||||
}
|
}
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
proxy?.$modal.msgError(error.msg) ;
|
// proxy?.$modal.msgError(error.msg);
|
||||||
// 恢复之前的状态
|
// 恢复之前的状态
|
||||||
laserMode.value.switchStatus = !laserMode.value.switchStatus;
|
laserMode.value.switchStatus = !laserMode.value.switchStatus;
|
||||||
} finally { }
|
} finally { }
|
||||||
@ -420,11 +429,56 @@ const saveBtn = () => {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
lightModesLoading.value = false
|
lightModesLoading.value = false
|
||||||
proxy?.$modal.msgError(res.msg);
|
//proxy?.$modal.msgError(res.msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 解除报警
|
||||||
|
const showClose = async () => {
|
||||||
|
try {
|
||||||
|
await proxy?.$modal.confirm('确定要对该设备解除报警?', '提示');
|
||||||
|
// 2. 准备请求数据
|
||||||
|
const batchId = generateShortId();
|
||||||
|
let data = {
|
||||||
|
deviceIds: [route.params.deviceId],
|
||||||
|
typeName: deviceDetail.value.typeName,
|
||||||
|
deviceImeiList: [deviceDetail.value.deviceImei],
|
||||||
|
batchId: batchId,
|
||||||
|
instructValue: '0', //强制报警1,解除报警0
|
||||||
|
}
|
||||||
|
const registerRes = await api.sendAlarmMessage(data);
|
||||||
|
if (registerRes.code !== 200) {
|
||||||
|
proxy?.$modal.msgWarning(registerRes.msg)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
// 4. 获取设备状态
|
||||||
|
let deviceImei = deviceDetail.value.deviceImei
|
||||||
|
const statusRes = await getDeviceStatus({
|
||||||
|
functionMode: 2,
|
||||||
|
batchId,
|
||||||
|
typeName: 'FunctionAccessBatchStatusRule',
|
||||||
|
deviceImei,
|
||||||
|
interval: 500
|
||||||
|
},
|
||||||
|
api.deviceRealTimeStatus
|
||||||
|
);
|
||||||
|
// 只有当状态为'OK'时才显示成功弹窗
|
||||||
|
if (statusRes.data.functionAccess === 'OK') {
|
||||||
|
proxy?.$modal.msgSuccess(statusRes.msg);
|
||||||
|
await getList();
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (error: any) {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 强制报警
|
// 强制报警
|
||||||
const forceAlarm = async () => {
|
const forceAlarm = async () => {
|
||||||
try {
|
try {
|
||||||
@ -458,10 +512,12 @@ const forceAlarm = async () => {
|
|||||||
// 只有当状态为'OK'时才显示成功弹窗
|
// 只有当状态为'OK'时才显示成功弹窗
|
||||||
if (statusRes.data.functionAccess === 'OK') {
|
if (statusRes.data.functionAccess === 'OK') {
|
||||||
proxy?.$modal.msgSuccess(statusRes.msg);
|
proxy?.$modal.msgSuccess(statusRes.msg);
|
||||||
|
await getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
proxy?.$modal.msgWarning(error.msg)
|
// proxy?.$modal.msgWarning(error.msg)
|
||||||
|
forceAlarmLoading.value = false;
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
forceAlarmLoading.value = false;
|
forceAlarmLoading.value = false;
|
||||||
@ -588,6 +644,10 @@ const handleDeviceMessage = (msg: any) => {
|
|||||||
if (deviceDetail.value.batteryPercentage < 20 && Number(deviceDetail.value.chargeState) == 0) {
|
if (deviceDetail.value.batteryPercentage < 20 && Number(deviceDetail.value.chargeState) == 0) {
|
||||||
centerDialogVisible.value = true
|
centerDialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
case 7:
|
||||||
|
deviceDetail.value.alarmStatus = deviceState[1];
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// 其他类型消息(不处理,仅打印)
|
// 其他类型消息(不处理,仅打印)
|
||||||
@ -644,6 +704,7 @@ onUnmounted(() => {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.device-page {
|
.device-page {
|
||||||
.header-bar {
|
.header-bar {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
@ -948,4 +1009,23 @@ onUnmounted(() => {
|
|||||||
width: 52px;
|
width: 52px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.staticRwo {
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 2px 12px rgba(0, 34, 96, 0.1);
|
||||||
|
background: white;
|
||||||
|
border: 1px solid #ebeef5;
|
||||||
|
height: auto;
|
||||||
|
line-height: 36px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-indent: 15px;
|
||||||
|
color: #ff0000;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 17px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.displayNone {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -19,8 +19,8 @@
|
|||||||
<el-row :gutter="20" class="content-row" :class="deviceDetail.sta_ShakeBit == 1 || deviceDetail.staSOSGrade == 1 ? '' : 'displayNone'">
|
<el-row :gutter="20" class="content-row" :class="deviceDetail.sta_ShakeBit == 1 || deviceDetail.staSOSGrade == 1 ? '' : 'displayNone'">
|
||||||
<el-col :lg="24" :xs="24">
|
<el-col :lg="24" :xs="24">
|
||||||
<div class="staticRwo" :class="deviceDetail.sta_ShakeBit == 1 ? '' : 'displayNone'">设备静止报警中!</div>
|
<div class="staticRwo" :class="deviceDetail.sta_ShakeBit == 1 ? '' : 'displayNone'">设备静止报警中!</div>
|
||||||
<div class="staticRwo" :class="deviceDetail.staSOSGrade == 1 ? '' : 'displayNone'" @click="showClose()">
|
<div class="staticRwo" :class="(deviceDetail.staSOSGrade == 1 && Status.timeOut>0) ? '' : 'displayNone'" @click="showClose()">
|
||||||
设备强制报警中,<span v-show="Status.timeOut>0">{{ Status.timeOut }}S</span>!
|
设备强制报警中<span v-show="Status.timeOut>0">,{{ Status.timeOut }}S</span>!
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -102,7 +102,7 @@
|
|||||||
<el-input v-if="deviceDetail" placeholder="请输入职位" v-model="deviceDetail.personnelInfo.name" />
|
<el-input v-if="deviceDetail" placeholder="请输入职位" v-model="deviceDetail.personnelInfo.name" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-item">
|
<div class="form-item">
|
||||||
<span class="form-label">姓名</span>
|
<span class="form-label">姓名:</span>
|
||||||
<el-input v-if="deviceDetail" placeholder="请输入姓名" v-model="deviceDetail.personnelInfo.position" />
|
<el-input v-if="deviceDetail" placeholder="请输入姓名" v-model="deviceDetail.personnelInfo.position" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-item">
|
<div class="form-item">
|
||||||
@ -206,11 +206,24 @@ const router = useRouter();
|
|||||||
// 导入图片资源(确保路径正确)
|
// 导入图片资源(确保路径正确)
|
||||||
import strongLightDefault from '@/assets/images/strong-light.png';
|
import strongLightDefault from '@/assets/images/strong-light.png';
|
||||||
import strongLightActive from '@/assets/images/strong-light_HL.png';
|
import strongLightActive from '@/assets/images/strong-light_HL.png';
|
||||||
import weakLightDefault from '@/assets/images/weak-light.png';
|
import floodLightDefault from '@/assets/images/flood-light.png';
|
||||||
import weakLightActive from '@/assets/images/weak-light_HL.png';
|
import floodLightActive from '@/assets/images/flood-light_HL.png';
|
||||||
|
|
||||||
|
|
||||||
|
import di from '@/assets/images/di.png';
|
||||||
|
import diAc from '@/assets/images/diAc.png';
|
||||||
|
import high from '@/assets/images/high.png';
|
||||||
|
import highAc from '@/assets/images/highAc.png';
|
||||||
|
import rb from '@/assets/images/rb.png';
|
||||||
|
import rbAc from '@/assets/images/rbAc.png';
|
||||||
|
import sg from '@/assets/images/sg.png';
|
||||||
|
import sgAc from '@/assets/images/sgAc.png';
|
||||||
|
import zhong from '@/assets/images/zhong.png';
|
||||||
|
import zhongAc from '@/assets/images/zhongAc.png';
|
||||||
import closeDefault from '@/assets/images/close.png';
|
import closeDefault from '@/assets/images/close.png';
|
||||||
import closeActive from '@/assets/images/close_HL.png';
|
import closeActive from '@/assets/images/close_HL.png';
|
||||||
|
import { hi } from 'element-plus/es/locale/index.mjs';
|
||||||
|
|
||||||
const fullscreenLoading = ref(false);
|
const fullscreenLoading = ref(false);
|
||||||
var timer = null;
|
var timer = null;
|
||||||
const sendTextLoading = ref(false);
|
const sendTextLoading = ref(false);
|
||||||
@ -248,8 +261,8 @@ const lightModes = ref<any[]>([
|
|||||||
{
|
{
|
||||||
id: '2',
|
id: '2',
|
||||||
name: '弱光',
|
name: '弱光',
|
||||||
icon: weakLightDefault,
|
icon: floodLightDefault,
|
||||||
activeIcon: weakLightActive,
|
activeIcon: floodLightActive,
|
||||||
active: false
|
active: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -265,24 +278,24 @@ const sosModes = ref<any[]>([
|
|||||||
{
|
{
|
||||||
id: '1',
|
id: '1',
|
||||||
name: '声光报警',
|
name: '声光报警',
|
||||||
icon: strongLightDefault, // 直接使用导入的变量
|
icon: sg, // 直接使用导入的变量
|
||||||
activeIcon: strongLightActive,
|
activeIcon: sgAc,
|
||||||
|
|
||||||
active: false
|
active: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '2',
|
id: '2',
|
||||||
name: '红蓝模式',
|
name: '红蓝模式',
|
||||||
icon: strongLightDefault, // 直接使用导入的变量
|
icon: rb, // 直接使用导入的变量
|
||||||
activeIcon: strongLightActive,
|
activeIcon: rbAc,
|
||||||
|
|
||||||
active: false
|
active: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '0',
|
id: '0',
|
||||||
name: '关闭',
|
name: '关闭',
|
||||||
icon: strongLightDefault, // 直接使用导入的变量
|
icon: closeDefault, // 直接使用导入的变量
|
||||||
activeIcon: strongLightActive,
|
activeIcon: closeActive,
|
||||||
|
|
||||||
active: false
|
active: false
|
||||||
}
|
}
|
||||||
@ -292,32 +305,32 @@ const staticModes = ref<any[]>([
|
|||||||
{
|
{
|
||||||
id: '3',
|
id: '3',
|
||||||
name: '高档',
|
name: '高档',
|
||||||
icon: strongLightDefault, // 直接使用导入的变量
|
icon: high, // 直接使用导入的变量
|
||||||
activeIcon: strongLightActive,
|
activeIcon: highAc,
|
||||||
|
|
||||||
active: false
|
active: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '2',
|
id: '2',
|
||||||
name: '中档',
|
name: '中档',
|
||||||
icon: strongLightDefault, // 直接使用导入的变量
|
icon: zhong, // 直接使用导入的变量
|
||||||
activeIcon: strongLightActive,
|
activeIcon:zhongAc,
|
||||||
|
|
||||||
active: false
|
active: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '1',
|
id: '1',
|
||||||
name: '低档',
|
name: '低档',
|
||||||
icon: strongLightDefault, // 直接使用导入的变量
|
icon: di, // 直接使用导入的变量
|
||||||
activeIcon: strongLightActive,
|
activeIcon: diAc,
|
||||||
|
|
||||||
active: false
|
active: false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '0',
|
id: '0',
|
||||||
name: '关闭',
|
name: '关闭',
|
||||||
icon: strongLightDefault, // 直接使用导入的变量
|
icon: closeDefault, // 直接使用导入的变量
|
||||||
activeIcon: strongLightActive,
|
activeIcon: closeActive,
|
||||||
|
|
||||||
active: false
|
active: false
|
||||||
}
|
}
|
||||||
|
|||||||
@ -130,6 +130,12 @@
|
|||||||
<div class="normal red" v-if="scope.row.bindingStatus == 0">未绑定</div>
|
<div class="normal red" v-if="scope.row.bindingStatus == 0">未绑定</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="报警状态" align="center" prop="alarmStatus">
|
||||||
|
<template #default="scope">
|
||||||
|
<div class="normal red" v-if="scope.row.alarmStatus == 1">报警中</div>
|
||||||
|
<div class="normal green" v-if="scope.row.alarmStatus == 0">未报警</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column label="操作" fixed="right" width="180" class-name="small-padding fixed-width">
|
<el-table-column label="操作" fixed="right" width="180" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
|||||||
@ -562,7 +562,7 @@ function SaveMultiData() {
|
|||||||
// return api.uploadBoot(formData);
|
// return api.uploadBoot(formData);
|
||||||
// }
|
// }
|
||||||
// 上传开机画面根据类型适配不同的上传接口,其他类型暂且默认670
|
// 上传开机画面根据类型适配不同的上传接口,其他类型暂且默认670
|
||||||
function updaeLogo(ids, file, deviceType?: number,) {
|
function updaeLogo(ids, file, deviceType?: number) {
|
||||||
const selectedRows = getSelectionRows(grid);
|
const selectedRows = getSelectionRows(grid);
|
||||||
let realDeviceType = 670; // 默认670
|
let realDeviceType = 670; // 默认670
|
||||||
if (selectedRows.length > 0) {
|
if (selectedRows.length > 0) {
|
||||||
|
|||||||
@ -131,7 +131,11 @@
|
|||||||
<div>{{ scope.row.deviceImei }} {{ scope.row.deviceMac }}</div>
|
<div>{{ scope.row.deviceImei }} {{ scope.row.deviceMac }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="报警地点" align="center" prop="location" show-overflow-tooltip/>
|
<el-table-column label="报警地点" align="center" prop="location" show-overflow-tooltip>
|
||||||
|
<template #default="scope">
|
||||||
|
<div>{{ scope.row.location && scope.row.location !== '[]' ? scope.row.location : '无' }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="报警事项" align="center" prop="deviceAction">
|
<el-table-column label="报警事项" align="center" prop="deviceAction">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="danger" v-if="scope.row.deviceAction == 0">强制报警</el-tag>
|
<el-tag type="danger" v-if="scope.row.deviceAction == 0">强制报警</el-tag>
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
<el-form-item label="设备MAC" prop="deviceMac">
|
<el-form-item label="设备MAC" prop="deviceMac">
|
||||||
<el-input v-model="queryParams.deviceMac" placeholder="请输入设备MAC" clearable />
|
<el-input v-model="queryParams.deviceMac" placeholder="请输入设备MAC" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="请输入设备IMEI" prop="deviceImei">
|
<el-form-item label="设备IMEI" prop="deviceImei">
|
||||||
<el-input v-model="queryParams.deviceImei" placeholder="请输入设备IMEI" clearable />
|
<el-input v-model="queryParams.deviceImei" placeholder="请输入设备IMEI" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备类型" prop="deviceType">
|
<el-form-item label="设备类型" prop="deviceType">
|
||||||
@ -27,6 +27,13 @@
|
|||||||
<el-option label="失效" value="0" />
|
<el-option label="失效" value="0" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="在线状态" prop="onlineStatus">
|
||||||
|
<el-select v-model="queryParams.onlineStatus" placeholder="在线状态" style="margin-left: 10px">
|
||||||
|
<el-option label="在线" value="1" />
|
||||||
|
<el-option label="离线" value="0" />
|
||||||
|
<el-option label="故障" value="2" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="创建时间">
|
<el-form-item label="创建时间">
|
||||||
<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD HH:mm:ss" type="daterange"
|
<el-date-picker v-model="dateRange" value-format="YYYY-MM-DD HH:mm:ss" type="daterange"
|
||||||
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
|
||||||
@ -88,7 +95,7 @@
|
|||||||
<el-popover placement="right" trigger="click">
|
<el-popover placement="right" trigger="click">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<img v-if="scope.row.devicePic" :src="scope.row.devicePic"
|
<img v-if="scope.row.devicePic" :src="scope.row.devicePic"
|
||||||
style="width: 40px; height: 40px; cursor: pointer; object-fit: contain"
|
style="width: 50px; height: 50px; cursor: pointer; object-fit: contain"
|
||||||
class="hover:opacity-80 transition-opacity" />
|
class="hover:opacity-80 transition-opacity" />
|
||||||
<img v-else src="@/assets/index/IMG.png" alt="" style="width: 40px; height: 40px;">
|
<img v-else src="@/assets/index/IMG.png" alt="" style="width: 40px; height: 40px;">
|
||||||
</template>
|
</template>
|
||||||
@ -110,7 +117,7 @@
|
|||||||
<el-table-column prop="onlineStatus" label="设备状态">
|
<el-table-column prop="onlineStatus" label="设备状态">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag :type="scope.row.onlineStatus === 1 ? 'success' : 'info'">
|
<el-tag :type="scope.row.onlineStatus === 1 ? 'success' : 'info'">
|
||||||
{{ scope.row.onlineStatus === 1 ? '在线' : '离线' }}
|
{{ scope.row.onlineStatus === 1 ? '在线' : (scope.row.onlineStatus === 2 ? '故障' : '离线') }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -451,7 +458,8 @@ const initData: PageData<deviceForm, deviceQuery> = {
|
|||||||
deviceMac: '',
|
deviceMac: '',
|
||||||
deviceImei: '',
|
deviceImei: '',
|
||||||
deviceType: '',
|
deviceType: '',
|
||||||
deviceStatus: ''
|
deviceStatus: '',
|
||||||
|
onlineStatus:''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
deviceName: [{ required: true, message: '请输入设备名称', trigger: 'blur' }],
|
deviceName: [{ required: true, message: '请输入设备名称', trigger: 'blur' }],
|
||||||
@ -711,17 +719,17 @@ const httpRequestImg = (parm): Promise<any> => {
|
|||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
};
|
};
|
||||||
const beforeUpload = (file) => {
|
const beforeUpload = (file) => {
|
||||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
//const isLt2M = file.size / 1024 / 1024 < 2;
|
||||||
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
|
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
|
||||||
if (!isJPG) {
|
if (!isJPG) {
|
||||||
ElMessage.warning('请上传jpg、png格式,大小不超过2M的照片');
|
ElMessage.warning('请上传jpg、png格式');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!isLt2M) {
|
// if (!isLt2M) {
|
||||||
ElMessage.warning('大小不超过2M的照片片');
|
// ElMessage.warning('大小不超过2M的照片片');
|
||||||
return false;
|
// return false;
|
||||||
}
|
// }
|
||||||
return isJPG && isLt2M;
|
return isJPG;
|
||||||
};
|
};
|
||||||
// 文件上传状态改变时触发
|
// 文件上传状态改变时触发
|
||||||
const fileUploadChange = (files, fileList) => {
|
const fileUploadChange = (files, fileList) => {
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
v-model="advanceSearch.Date"
|
v-model="advanceSearch.Date"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
style="width: 240px;"
|
style="width: 240px"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
range-separator="-"
|
range-separator="-"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
@ -102,7 +102,6 @@
|
|||||||
>
|
>
|
||||||
<div class="form">
|
<div class="form">
|
||||||
<el-form :model="cEdit" ref="formRef" style="max-width: 750px" :rules="rules">
|
<el-form :model="cEdit" ref="formRef" style="max-width: 750px" :rules="rules">
|
||||||
|
|
||||||
<el-form-item label="设备名称" label-position="right" prop="deviceId">
|
<el-form-item label="设备名称" label-position="right" prop="deviceId">
|
||||||
<!-- <el-input v-model="selectedRow['deviceName']" :readonly="true" @click.stop="ShowDevice('Edit', true)" placeholder="请选择设备" /> -->
|
<!-- <el-input v-model="selectedRow['deviceName']" :readonly="true" @click.stop="ShowDevice('Edit', true)" placeholder="请选择设备" /> -->
|
||||||
<el-select v-model="cEdit.deviceId" placeholder="选择设备" clearable :disabled="!cEdit.isEdit" filterable>
|
<el-select v-model="cEdit.deviceId" placeholder="选择设备" clearable :disabled="!cEdit.isEdit" filterable>
|
||||||
@ -143,6 +142,7 @@
|
|||||||
accept=".jpg,.jpeg,.png,.gif.webp"
|
accept=".jpg,.jpeg,.png,.gif.webp"
|
||||||
:limit="9"
|
:limit="9"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
|
:class="{ 'hide-add-btn': !cEdit.isEdit }"
|
||||||
>
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Plus />
|
<Plus />
|
||||||
@ -154,7 +154,7 @@
|
|||||||
<img :src="file.url" class="el-upload-list__item-thumbnail" />
|
<img :src="file.url" class="el-upload-list__item-thumbnail" />
|
||||||
|
|
||||||
<!-- 操作按钮组 -->
|
<!-- 操作按钮组 -->
|
||||||
<div class="el-upload-list__item-actions">
|
<div class="el-upload-list__item-actions" v-show="cEdit.isEdit">
|
||||||
<!-- 自定义删除按钮 -->
|
<!-- 自定义删除按钮 -->
|
||||||
<span class="el-upload-list__item-delete" @click.stop="dropImg('before', file, index)">
|
<span class="el-upload-list__item-delete" @click.stop="dropImg('before', file, index)">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
@ -179,6 +179,7 @@
|
|||||||
accept=".jpg,.jpeg,.png,.gif.webp"
|
accept=".jpg,.jpeg,.png,.gif.webp"
|
||||||
:limit="9"
|
:limit="9"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
|
:class="{ 'hide-add-btn': !cEdit.isEdit }"
|
||||||
>
|
>
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<Plus />
|
<Plus />
|
||||||
@ -189,7 +190,7 @@
|
|||||||
<!-- 图片缩略图 -->
|
<!-- 图片缩略图 -->
|
||||||
<img :src="file.url" class="el-upload-list__item-thumbnail" />
|
<img :src="file.url" class="el-upload-list__item-thumbnail" />
|
||||||
<!-- 操作按钮组 -->
|
<!-- 操作按钮组 -->
|
||||||
<div class="el-upload-list__item-actions">
|
<div class="el-upload-list__item-actions" v-show="cEdit.isEdit">
|
||||||
<!-- 自定义删除按钮 -->
|
<!-- 自定义删除按钮 -->
|
||||||
<span class="el-upload-list__item-delete" @click.stop="dropImg('after', file, index)">
|
<span class="el-upload-list__item-delete" @click.stop="dropImg('after', file, index)">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
@ -338,7 +339,6 @@
|
|||||||
import api from '@/api/equipmentManagement/repairRecords/index';
|
import api from '@/api/equipmentManagement/repairRecords/index';
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
|
|
||||||
var grid = ref(null);
|
var grid = ref(null);
|
||||||
var deviceGrid = ref(null);
|
var deviceGrid = ref(null);
|
||||||
|
|
||||||
@ -490,15 +490,12 @@ function DropRecord(arr = undefined) {
|
|||||||
() => {
|
() => {
|
||||||
showloading('fullLoading');
|
showloading('fullLoading');
|
||||||
arr = arr.map((item) => item.recordId);
|
arr = arr.map((item) => item.recordId);
|
||||||
api.dropRepir(arr).then(res=>{
|
api.dropRepir(arr).then((res) => {
|
||||||
if (res && res.code == 200) {
|
if (res && res.code == 200) {
|
||||||
Search();
|
Search();
|
||||||
}
|
}
|
||||||
alert(res.msg);
|
alert(res.msg);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
hideConfirm,
|
hideConfirm,
|
||||||
'提示'
|
'提示'
|
||||||
@ -590,7 +587,7 @@ function ShowEdit(item = undefined, isEdit = true,formEl=undefined) {
|
|||||||
return { name: v.imageId, url: v.imageUrl, id: v.imageId };
|
return { name: v.imageId, url: v.imageUrl, id: v.imageId };
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!formEl) return
|
if (!formEl) return;
|
||||||
|
|
||||||
formEl.validate();
|
formEl.validate();
|
||||||
}
|
}
|
||||||
@ -671,10 +668,11 @@ var dropImg = (type, file, index) => {
|
|||||||
//保存表单数据
|
//保存表单数据
|
||||||
function SaveFormData(formEl: FormInstance | undefined) {
|
function SaveFormData(formEl: FormInstance | undefined) {
|
||||||
if (!cEdit.isEdit) {
|
if (!cEdit.isEdit) {
|
||||||
|
CloseEdit();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!formEl) return
|
if (!formEl) return;
|
||||||
|
|
||||||
let submit = () => {
|
let submit = () => {
|
||||||
showloading('fullLoading');
|
showloading('fullLoading');
|
||||||
@ -737,14 +735,12 @@ function SaveFormData(formEl: FormInstance | undefined) {
|
|||||||
hideloading();
|
hideloading();
|
||||||
});
|
});
|
||||||
}, 0);
|
}, 0);
|
||||||
}
|
};
|
||||||
formEl.validate((valid) => {
|
formEl.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
submit();
|
submit();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//导出
|
//导出
|
||||||
@ -1087,4 +1083,8 @@ input:focus {
|
|||||||
// margin-right: 8px !important;
|
// margin-right: 8px !important;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
:deep .hide-add-btn .el-upload.is-disabled,
|
||||||
|
.hide-add-btn .el-upload.is-disabled {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -4,9 +4,10 @@
|
|||||||
<div class="btn_mounth" :class="{ cur: activeTab == 'month' }" @click="switchTab('month')">近一月</div>
|
<div class="btn_mounth" :class="{ cur: activeTab == 'month' }" @click="switchTab('month')">近一月</div>
|
||||||
<div class="btn_mounth" :class="{ cur: activeTab === 'halfYear' }" @click="switchTab('halfYear')">近半年</div>
|
<div class="btn_mounth" :class="{ cur: activeTab === 'halfYear' }" @click="switchTab('halfYear')">近半年</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div ref="chartContainerRef" class="chartContainer" :class="{ 'show-scroll': showScroll }">
|
||||||
<div ref="chartRef" class="chartRef"></div>
|
<div ref="chartRef" class="chartRef"></div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@ -14,19 +15,46 @@ import * as echarts from 'echarts';
|
|||||||
import { getDeviceUsageFrequency } from '@/api/homeIndex/index';
|
import { getDeviceUsageFrequency } from '@/api/homeIndex/index';
|
||||||
|
|
||||||
const chartRef = ref<HTMLDivElement | null>(null);
|
const chartRef = ref<HTMLDivElement | null>(null);
|
||||||
|
const chartContainerRef = ref<HTMLDivElement | null>(null);
|
||||||
const activeTab = ref('month');
|
const activeTab = ref('month');
|
||||||
let myChart: echarts.ECharts | null = null; // 保存图表实例
|
const showScroll = ref(false); // 控制是否显示滚动条
|
||||||
let dataTimer: NodeJS.Timeout | null = null; // 数据更新定时器
|
let myChart: echarts.ECharts | null = null;
|
||||||
|
let dataTimer: NodeJS.Timeout | null = null;
|
||||||
|
|
||||||
// 根据天数获取数据并更新图表
|
// 根据天数获取数据并更新图表
|
||||||
const fetchDataAndUpdate = (days: number) => {
|
const fetchDataAndUpdate = (days: number) => {
|
||||||
getDeviceUsageFrequency({ days }).then((res) => {
|
getDeviceUsageFrequency({ days }).then((res) => {
|
||||||
if (res.code === 200 && res.data && myChart) {
|
if (res.code === 200 && res.data && myChart) {
|
||||||
//(转换为图表所需格式)
|
// 模拟数据(根据需求调整数量)
|
||||||
|
const dataCount = activeTab.value === 'month' ? 8 : 25; // 一月8条,半年25条
|
||||||
|
const mockData = Array.from({ length: dataCount }, (_, index) => ({
|
||||||
|
deviceName: `设备${index + 1}`,
|
||||||
|
frequency: Math.floor(Math.random() * 100)
|
||||||
|
}));
|
||||||
const chartData = res.data.map(item => ({
|
const chartData = res.data.map(item => ({
|
||||||
name: item.deviceName,
|
name: item.deviceName,
|
||||||
value: item.frequency
|
value: item.frequency
|
||||||
}));
|
}));
|
||||||
|
const scrollThreshold = 20;
|
||||||
|
showScroll.value = chartData.length > scrollThreshold;
|
||||||
|
|
||||||
|
// 动态计算图表高度
|
||||||
|
const baseItemHeight = 20;
|
||||||
|
const minHeight = 200;
|
||||||
|
const maxHeight = 600;
|
||||||
|
|
||||||
|
let chartHeight;
|
||||||
|
if (showScroll.value) {
|
||||||
|
|
||||||
|
chartHeight = Math.min(chartData.length * baseItemHeight, maxHeight);
|
||||||
|
} else {
|
||||||
|
chartHeight = Math.max(chartData.length * baseItemHeight, minHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (chartRef.value) {
|
||||||
|
chartRef.value.style.height = `${chartHeight}px`;
|
||||||
|
}
|
||||||
|
|
||||||
// 更新图表
|
// 更新图表
|
||||||
myChart.setOption({
|
myChart.setOption({
|
||||||
yAxis: {
|
yAxis: {
|
||||||
@ -36,21 +64,30 @@ const fetchDataAndUpdate = (days: number) => {
|
|||||||
data: chartData.map(item => item.value)
|
data: chartData.map(item => item.value)
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// 数据更新后,重新调整图表尺寸
|
||||||
|
setTimeout(() => {
|
||||||
|
if (myChart) {
|
||||||
|
myChart.resize();
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
console.error('获取数据失败', err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 切换标签逻辑
|
// 切换标签逻辑
|
||||||
const switchTab = (tab: string) => {
|
const switchTab = (tab: string) => {
|
||||||
activeTab.value = tab;
|
activeTab.value = tab;
|
||||||
// 根据标签切换天数(近一月=30天,近半年=180天)
|
|
||||||
const days = tab === 'month' ? 30 : 180;
|
const days = tab === 'month' ? 30 : 180;
|
||||||
fetchDataAndUpdate(days);
|
fetchDataAndUpdate(days);
|
||||||
|
|
||||||
// 切换标签后重新启动定时器
|
|
||||||
startDataTimer();
|
startDataTimer();
|
||||||
|
|
||||||
|
// 重置滚动位置
|
||||||
|
if (chartContainerRef.value) {
|
||||||
|
chartContainerRef.value.scrollTop = 10;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 开始数据定时器
|
// 开始数据定时器
|
||||||
@ -58,7 +95,6 @@ const startDataTimer = () => {
|
|||||||
if (dataTimer) {
|
if (dataTimer) {
|
||||||
clearInterval(dataTimer);
|
clearInterval(dataTimer);
|
||||||
}
|
}
|
||||||
// 每300秒(5分钟)更新一次数据
|
|
||||||
dataTimer = setInterval(() => {
|
dataTimer = setInterval(() => {
|
||||||
const days = activeTab.value === 'month' ? 30 : 180;
|
const days = activeTab.value === 'month' ? 30 : 180;
|
||||||
fetchDataAndUpdate(days);
|
fetchDataAndUpdate(days);
|
||||||
@ -81,18 +117,19 @@ const initChart = () => {
|
|||||||
const option = {
|
const option = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: { type: 'shadow' } // 柱状图建议使用阴影指示器
|
axisPointer: { type: 'shadow' }
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
left: '5%',
|
left: '5%',
|
||||||
right: '10%',
|
right: '5%',
|
||||||
bottom: '3%',
|
bottom: '2%',
|
||||||
top: '20%',
|
top: '12%',
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: [], // 初始空数据
|
inverse: true,
|
||||||
|
data: [],
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#1e3a8a',
|
color: '#1e3a8a',
|
||||||
@ -100,26 +137,37 @@ const initChart = () => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#DEEFFF'
|
color: '#DEEFFF',
|
||||||
|
fontSize: 12
|
||||||
|
},
|
||||||
|
axisTick: {
|
||||||
|
alignWithLabel: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
axisLine: { show: false },
|
axisLine: { show: false },
|
||||||
axisLabel: { show: false },
|
axisLabel: { show: false },
|
||||||
splitLine: { show: false }
|
splitLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: 'rgba(30, 58, 138, 0.3)',
|
||||||
|
type: 'dashed'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
series: [{
|
series: [{
|
||||||
name: '使用频次',
|
name: '使用频次',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: [], // 初始空数据
|
data: [],
|
||||||
barWidth: '9px',
|
barWidth: '12px',
|
||||||
stack: 'total',
|
stack: 'total',
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'right',
|
position: 'right',
|
||||||
valueAnimation: true,
|
valueAnimation: true,
|
||||||
color: '#DEEFFF'
|
color: '#DEEFFF',
|
||||||
|
fontSize: 11
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: new echarts.graphic.LinearGradient(
|
color: new echarts.graphic.LinearGradient(
|
||||||
@ -130,15 +178,14 @@ const initChart = () => {
|
|||||||
]
|
]
|
||||||
),
|
),
|
||||||
borderRadius: 4
|
borderRadius: 4
|
||||||
}
|
},
|
||||||
|
barGap: '30%',
|
||||||
|
barCategoryGap: '40%'
|
||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
myChart.setOption(option);
|
myChart.setOption(option);
|
||||||
|
|
||||||
// 初始化数据
|
|
||||||
fetchDataAndUpdate(30);
|
fetchDataAndUpdate(30);
|
||||||
|
|
||||||
// 启动定时器
|
|
||||||
startDataTimer();
|
startDataTimer();
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -155,11 +202,8 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
onUnmounted(() => {
|
onUnmounted(() => {
|
||||||
// 清除定时器
|
|
||||||
clearDataTimer();
|
clearDataTimer();
|
||||||
// 移除事件监听
|
|
||||||
window.removeEventListener('resize', handleResize);
|
window.removeEventListener('resize', handleResize);
|
||||||
// 销毁图表实例
|
|
||||||
if (myChart) {
|
if (myChart) {
|
||||||
myChart.dispose();
|
myChart.dispose();
|
||||||
myChart = null;
|
myChart = null;
|
||||||
@ -170,7 +214,8 @@ onUnmounted(() => {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.vchartPage {
|
.vchartPage {
|
||||||
margin-top: 4.9vh;
|
margin-top: 4.9vh;
|
||||||
position: relative; // 确保按钮定位正确
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn_mounth_box {
|
.btn_mounth_box {
|
||||||
@ -191,7 +236,7 @@ onUnmounted(() => {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 0.8vw;
|
font-size: 0.8vw;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-left: 0.5vw; // 按钮间距
|
margin-left: 0.5vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cur {
|
.cur {
|
||||||
@ -199,8 +244,49 @@ onUnmounted(() => {
|
|||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chartContainer {
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
overflow-y: hidden;
|
||||||
|
overflow-x: hidden;
|
||||||
|
position: relative;
|
||||||
|
// margin-top: 2vh;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
|
||||||
|
// 当需要显示滚动条时的样式
|
||||||
|
&.show-scroll {
|
||||||
|
height: 24vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
|
&::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb {
|
||||||
|
background-color: rgba(7, 104, 212, 0.8);
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 2px solid transparent;
|
||||||
|
background-clip: content-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-thumb:hover {
|
||||||
|
background-color: rgba(7, 104, 212, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-track {
|
||||||
|
background-color: rgba(30, 58, 138, 0.1);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::-webkit-scrollbar-track:hover {
|
||||||
|
background-color: rgba(30, 58, 138, 0.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.chartRef {
|
.chartRef {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 24vh;
|
min-height: 100px;
|
||||||
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -16,7 +16,7 @@
|
|||||||
<div class="item-cell alarm-event">
|
<div class="item-cell alarm-event">
|
||||||
{{ getEventName(item.deviceAction) }}
|
{{ getEventName(item.deviceAction) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-cell loaction">{{ item.location }}</div>
|
<div class="item-cell loaction"> {{ item.location && item.location !== '[]' ? item.location : '无' }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(item, index) in displayData" :key="`second-${getKey(item, index)}`" class="alarm-item">
|
<div v-for="(item, index) in displayData" :key="`second-${getKey(item, index)}`" class="alarm-item">
|
||||||
<div class="item-cell">{{ item.startTime }}</div>
|
<div class="item-cell">{{ item.startTime }}</div>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
<div class="item-cell alarm-event">
|
<div class="item-cell alarm-event">
|
||||||
{{ getEventName(item.deviceAction) }}
|
{{ getEventName(item.deviceAction) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="item-cell loaction">{{ item.location }}</div>
|
<div class="item-cell loaction"> {{ item.location && item.location !== '[]' ? item.location : '无' }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
83
src/views/system/user/profile/appVer.vue
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
<template>
|
||||||
|
<el-form :model="user" label-width="80px">
|
||||||
|
<div v-for="item in user">
|
||||||
|
<el-form-item :label="item.dictLabel" prop="dictLabel">
|
||||||
|
<el-input v-model="item.dictLabel" disabled />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="版本号" prop="dictValue">
|
||||||
|
<el-input v-model="item.dictValue" placeholder="请输入版本号" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="下载地址" prop="remark">
|
||||||
|
<el-input v-model="item.remark" placeholder="请输入wgt下载地址" clearable />
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="submit">保存</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import request from '@/utils/request';
|
||||||
|
const user = ref([
|
||||||
|
{
|
||||||
|
'dictValue': '',
|
||||||
|
'dictLabel': 'ios',
|
||||||
|
'remark': ''
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'dictValue': '',
|
||||||
|
'dictLabel': 'android',
|
||||||
|
'remark': ''
|
||||||
|
}
|
||||||
|
]);
|
||||||
|
|
||||||
|
function getCfg() {
|
||||||
|
request({
|
||||||
|
url: '/app/auth/version',
|
||||||
|
method: 'get'
|
||||||
|
}).then((res) => {
|
||||||
|
if (res && res.code === 200) {
|
||||||
|
user.value.forEach((v) => {
|
||||||
|
let f = res.data.find((item) => {
|
||||||
|
return item.dictLabel === v.dictLabel;
|
||||||
|
});
|
||||||
|
if (f) {
|
||||||
|
v.dictValue = f.dictValue;
|
||||||
|
v.remark = f.remark;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function submit() {
|
||||||
|
let flag = [];
|
||||||
|
user.value.forEach((v) => {
|
||||||
|
let keys = Object.keys(v);
|
||||||
|
keys.forEach((k) => {
|
||||||
|
if (!v[k]) {
|
||||||
|
flag.push(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
if (flag.length > 0) {
|
||||||
|
ElMessageBox.alert('所有项都是必填');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
request({
|
||||||
|
url: '/api/xinghan/device/UpVersion',
|
||||||
|
method: 'post',
|
||||||
|
data: user.value
|
||||||
|
}).then((res) => {
|
||||||
|
if (res && res.code === 200) {
|
||||||
|
ElMessageBox.alert('操作成功');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getCfg();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
@ -61,6 +61,9 @@
|
|||||||
<el-tab-pane label="在线设备" name="onlineDevice">
|
<el-tab-pane label="在线设备" name="onlineDevice">
|
||||||
<onlineDevice :devices="state.devices" />
|
<onlineDevice :devices="state.devices" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="App版本" name="appVer">
|
||||||
|
<appVer />
|
||||||
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -78,7 +81,7 @@ import { getAuthList } from '@/api/system/social/auth';
|
|||||||
import { getUserProfile } from '@/api/system/user';
|
import { getUserProfile } from '@/api/system/user';
|
||||||
import { getOnline } from '@/api/monitor/online';
|
import { getOnline } from '@/api/monitor/online';
|
||||||
import { UserVO } from '@/api/system/user/types';
|
import { UserVO } from '@/api/system/user/types';
|
||||||
|
import appVer from './appVer.vue';
|
||||||
const activeTab = ref('userinfo');
|
const activeTab = ref('userinfo');
|
||||||
interface State {
|
interface State {
|
||||||
user: Partial<UserVO>;
|
user: Partial<UserVO>;
|
||||||
@ -86,13 +89,15 @@ interface State {
|
|||||||
postGroup: string;
|
postGroup: string;
|
||||||
auths: any;
|
auths: any;
|
||||||
devices: any;
|
devices: any;
|
||||||
|
vers: any;
|
||||||
}
|
}
|
||||||
const state = ref<State>({
|
const state = ref<State>({
|
||||||
user: {},
|
user: {},
|
||||||
roleGroup: '',
|
roleGroup: '',
|
||||||
postGroup: '',
|
postGroup: '',
|
||||||
auths: [],
|
auths: [],
|
||||||
devices: []
|
devices: [],
|
||||||
|
vers: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
const userForm = ref({});
|
const userForm = ref({});
|
||||||
|
|||||||