diff --git a/package.json b/package.json index e536d3c..b00dd3d 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@wangeditor/editor-for-vue": "^5.1.10", "animate.css": "^4.1.1", "axios": "^1.3.4", + "can-autoplay": "^3.0.2", "crypto-js": "^4.2.0", "echarts": "^5.2.2", "element-plus": "^2.2.32", diff --git a/src/api/waring/index.ts b/src/api/waring/index.ts index f5a99d2..4297055 100644 --- a/src/api/waring/index.ts +++ b/src/api/waring/index.ts @@ -37,3 +37,16 @@ export function process(id: string) { method: 'post' }); } + +/** + * 关闭报警 + * + * @param data + */ +export function setAlarm(data: any) { + return request({ + url: '/dc/dcBusiAlertJob/alertSwith', + method: 'post', + data: data + }); +} diff --git a/src/api/waring/types.ts b/src/api/waring/types.ts index b5be01c..601bd8d 100644 --- a/src/api/waring/types.ts +++ b/src/api/waring/types.ts @@ -6,7 +6,8 @@ export interface waringVo { alertLastTime: string; alertLevel: number; alertName: string; - alertTime:string + alertSwitch: string; + alertTime: string; alertReadTime: string; deviceName: string; deviceUuid: string; diff --git a/src/assets/icons/alarm.svg b/src/assets/icons/alarm.svg new file mode 100644 index 0000000..7bec76b --- /dev/null +++ b/src/assets/icons/alarm.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/media/alarm.mp3 b/src/assets/media/alarm.mp3 new file mode 100644 index 0000000..ef00043 Binary files /dev/null and b/src/assets/media/alarm.mp3 differ diff --git a/src/assets/media/alarm1.mp3 b/src/assets/media/alarm1.mp3 new file mode 100644 index 0000000..cbc41a1 Binary files /dev/null and b/src/assets/media/alarm1.mp3 differ diff --git a/src/assets/media/alarm2.mp3 b/src/assets/media/alarm2.mp3 new file mode 100644 index 0000000..c81fcc6 Binary files /dev/null and b/src/assets/media/alarm2.mp3 differ diff --git a/src/components/Widgets/button.vue b/src/components/Widgets/button.vue new file mode 100644 index 0000000..7b269e0 --- /dev/null +++ b/src/components/Widgets/button.vue @@ -0,0 +1,40 @@ + + diff --git a/src/styles/index.scss b/src/styles/index.scss index 4f73d5f..0831d47 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -64,6 +64,15 @@ justify-content: space-between; align-items: center; margin-bottom: 10px; + .title { + display: flex; + align-items: center; + .svg-icon { + width: 16px !important; + height: 16px !important; + margin-right: 5px; + } + } span { font-size: 16px; @@ -139,6 +148,7 @@ .confirm { background-color: #022a5a !important; border: 1px solid #114073; + margin-left: 10px; } } } diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index 5742656..67e581d 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -2,7 +2,6 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] - const ElForm: typeof import('element-plus/es')['ElForm'] const ElMessage: typeof import('element-plus/es')['ElMessage'] const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const ElNotification: typeof import('element-plus/es')['ElNotification'] @@ -273,7 +272,6 @@ import { UnwrapRef } from 'vue' declare module 'vue' { interface ComponentCustomProperties { readonly EffectScope: UnwrapRef - readonly ElForm: UnwrapRef readonly ElMessage: UnwrapRef readonly ElMessageBox: UnwrapRef readonly ElNotification: UnwrapRef diff --git a/src/types/components.d.ts b/src/types/components.d.ts index 0dcb051..a2672c5 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -8,6 +8,7 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { Breadcrumb: typeof import('./../components/Breadcrumb/index.vue')['default'] + Button: typeof import('./../components/Widgets/button.vue')['default'] ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] ElButton: typeof import('element-plus/es')['ElButton'] diff --git a/src/views/monitoring/components/header.vue b/src/views/monitoring/components/header.vue index 4303d75..7478a6e 100644 --- a/src/views/monitoring/components/header.vue +++ b/src/views/monitoring/components/header.vue @@ -77,7 +77,10 @@
- {{ item.deviceName }} +
+ + {{ item.deviceName }} +
{{ item.alertTime }}
@@ -114,6 +117,13 @@ @@ -132,19 +142,24 @@
+
+ +
-