@@ -153,6 +205,9 @@
快捷键介绍
-->
+
修改密码
@@ -183,7 +238,12 @@
height: 24px;
width: 34px;
cursor: pointer;
- vertical-align: middle;
+ // vertical-align:baseline;
+ // display: flex;
+ // flex-direction: column;
+ // align-items: center;
+ // justify-content: center;
+
.el-icon {
color: var(--el-text-color-primary);
@@ -193,63 +253,6 @@
}
}
-.message-container {
- width: 100%;
- padding: 0 5px;
-
- .message-title {
- width: 100%;
- text-align: center;
- padding-bottom: 10px;
- font-size: 14px;
- border-bottom: 1px solid #ddd;
- }
-
- .message-item {
- display: flex;
- align-items: center;
- border-bottom: 1px solid #ddd;
- padding: 8px 5px;
- cursor: pointer;
-
- &:hover {
- background-color: #f6f6f6;
- }
-
- .icon {
- width: 26px;
- height: 26px;
- margin-right: 10px;
- border-radius: 40px;
- color: #fff;
- background-color: var(--el-color-primary);
- padding: 4px;
- }
-
- .message-content {
- flex: 1;
- font-size: 14px;
-
- .time {
- margin-top: 3px;
- font-size: 12px;
- color: #888;
- }
- }
- }
-
- .message-footer {
- margin-top: 10px;
- line-height: 2;
- text-align: center;
- cursor: pointer;
-
- &:hover {
- color: var(--el-color-primary);
- }
- }
-}
-
:deep(.user-container) {
display: inline-block;
height: 24px;
diff --git a/public/image/home.png b/public/image/home.png
new file mode 100644
index 0000000..08c451d
--- /dev/null
+++ b/public/image/home.png
Binary files differ
diff --git a/src/App.vue b/src/App.vue
index 52ccd6e..2292f43 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -4,7 +4,6 @@
import eventBus from './utils/eventBus'
import useSettingsStore from '@/store/modules/settings'
import useMenuStore from '@/store/modules/menu'
-
const settingsStore = useSettingsStore()
const buttonConfig = ref({
@@ -89,6 +88,7 @@
eventBus.emit('global-system-info-toggle')
})
})
+
@@ -102,3 +102,9 @@
+
+
diff --git a/src/assets/images/login-image/theme0/bg.png b/src/assets/images/login-image/theme0/bg.png
new file mode 100644
index 0000000..c518e9d
--- /dev/null
+++ b/src/assets/images/login-image/theme0/bg.png
Binary files differ
diff --git a/src/assets/images/login-image/theme0/left.jpg b/src/assets/images/login-image/theme0/left.jpg
new file mode 100644
index 0000000..35ba6f0
--- /dev/null
+++ b/src/assets/images/login-image/theme0/left.jpg
Binary files differ
diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue
index 2479614..2e1c849 100644
--- a/src/components/NormalTable/index.vue
+++ b/src/components/NormalTable/index.vue
@@ -243,6 +243,15 @@
visibility: hidden;
}
}
+
+.follow-link {
+ color: #0d76d4;
+ cursor: pointer;
+
+ &:hover {
+ color: #04395e;
+ }
+}
diff --git a/src/layouts/components/Logo/index.vue b/src/layouts/components/Logo/index.vue
index 70c5758..6a9e3dc 100644
--- a/src/layouts/components/Logo/index.vue
+++ b/src/layouts/components/Logo/index.vue
@@ -14,8 +14,8 @@
})
const settingsStore = useSettingsStore()
-const { proxy } = getCurrentInstance() as any
-const title = ref(proxy.config.title)
+
+const title = ref(window.localStorage.getItem('project-name') || import.meta.env.VITE_APP_TITLE)
const logo = ref(imgLogo)
const to = computed(() => {
@@ -31,7 +31,7 @@
-
+
{{ title }}
@@ -42,7 +42,7 @@
z-index: 1000;
top: 0;
width: inherit;
- padding: 0 5px;
+ padding: 0 10px;
display: flex;
align-items: center;
justify-content: center;
diff --git a/src/layouts/components/SidebarItem/index.vue b/src/layouts/components/SidebarItem/index.vue
index c08cd89..6b450af 100644
--- a/src/layouts/components/SidebarItem/index.vue
+++ b/src/layouts/components/SidebarItem/index.vue
@@ -2,7 +2,7 @@
// import SidebarItem from './index.vue'
import { isExternalLink, resolveRoutePath } from '@/utils'
import type { Menu } from '@/global'
-
+import useSettingsStore from '@/store/modules/settings'
const props = defineProps({
item: {
type: Object as () => Menu.recordRaw,
@@ -13,7 +13,7 @@
default: '',
},
})
-
+const settingsStore = useSettingsStore()
const hasChildren = computed(() => {
let flag = true
if (props.item.children) {
@@ -33,7 +33,7 @@
-
+
{{ item.meta.title }}
@@ -42,7 +42,7 @@
-
+
{{ item.meta.title }}
@@ -56,13 +56,21 @@
+
+
diff --git a/src/layouts/components/SubSidebar/index.vue b/src/layouts/components/SubSidebar/index.vue
index ead1f31..0e5a79a 100644
--- a/src/layouts/components/SubSidebar/index.vue
+++ b/src/layouts/components/SubSidebar/index.vue
@@ -24,7 +24,6 @@
/>
+import { alarmValue } from '@/views/home/alarm/current/components/dict'
+const dialogFormVisible = ref(false) // 对话框是否显示
+const dataForm = ref({
+}) // 表单
+
+// 重置表单
+
+const className = ref('')
+const info = ref({})
+const resetForm = () => {
+ info.value = {
+ }
+}
+const initDialog = (row: any) => {
+ dialogFormVisible.value = true
+ const grade = `grade-${row.alarmLevel === '报警' || row.alarmLevel === '一级' ? '1' : row.alarmLevel === '预警' || row.alarmLevel === '二级' ? '2' : 'other'}`
+ className.value = grade
+ resetForm()
+ info.value = JSON.parse(JSON.stringify(row))
+ if (!info.value.alarmType.includes('浓度')) {
+ // console.log(info.value.value, 'info.value.value')
+ info.value.value = alarmValue[info.value.value] ? alarmValue[info.value.value] : '其他'
+ }
+ else {
+ info.value.value = `${info.value.value}${info.value.typeName.includes('燃气') || info.value.typeName.includes('哨兵') ? '%LEL' : ''}`
+ }
+ // const row = {
+ // alarmNoteMethod: '1', // 消息提醒 1:弹窗,2:消息提醒
+ // isSound: '1', // 报警音效,1:开,0:关
+ // isSend: '1', // 报警推送,1:开,0:关
+ // isText: '1', // 报警短息,1:开,0:关
+ // alarmType: '浓度超限',
+ // tagNumber: 'NX5702',
+ // alarmTime: '2024-09-09',
+ // value: '20',
+ // typeName: '燃气智能终端',
+ // alarmLevel: '一级',
+ // }
+}
+// 关闭
+const close = () => {
+ dialogFormVisible.value = false
+}
+// 关闭声音
+const { proxy } = getCurrentInstance() as any
+const closeSound = () => {
+ proxy.pauseAudio()
+ localStorage.setItem('eventAudio', 'pause')
+}
+// 查看
+const $router = useRouter()
+const detail = () => {
+ dialogFormVisible.value = false
+ $router.push({
+ name: 'AlarmCurrent',
+ query: {
+ row: JSON.stringify({ ...info.value, id: info.value.alarmIds, type: 'alarm-dialog' }),
+ type: 'alarm-dialog'
+ },
+ })
+}
+defineExpose({
+ initDialog,
+})
+
+
+
+
+
+ {{ info.alarmType }}
+
+
+
+
+ 报警类型
+
+
+ {{ info.alarmType }}
+
+
+ 设备类型
+
+
+ {{ info.typeName }}
+
+
+
+
+ 闸井位号
+
+
+ {{ info.tagNumber }}
+
+
+ 闸井名称
+
+
+ {{ info.tagName }}
+
+
+
+
+ 报警等级
+
+
+ {{ info.alarmLevel }}
+
+
+
+ {{ info.alarmType.includes('浓度') ? '报警值' : '报警原因' }}
+
+
+ {{ info.value }}
+
+
+
+
+ 报警时间
+
+
+ {{ info.alarmTime }}
+ 占位
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/layouts/components/Tools/alarmList.vue b/src/layouts/components/Tools/alarmList.vue
new file mode 100644
index 0000000..e1ba9fd
--- /dev/null
+++ b/src/layouts/components/Tools/alarmList.vue
@@ -0,0 +1,449 @@
+
+
+
+
+
+
+ 报警({{ messageList.length }})
+
+
+
+
+
+
+
+
+
+
+
+ 22
+
+
+ {{ message.alarmType }}
+
+
+ {{ message.ts }}
+
+
+
+
+ {{ message.processStatus
+ === '1' ? '未读' : '已读' }}
+
+
+
+
+
+
+ {{ message.ledgerNumber }}
+
+ |
+
+
+ {{ message.devTypeName }}
+
+ |
+
+ {{ message.alarmReason }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/layouts/components/Tools/index.vue b/src/layouts/components/Tools/index.vue
index fff759c..9dfdfbb 100644
--- a/src/layouts/components/Tools/index.vue
+++ b/src/layouts/components/Tools/index.vue
@@ -2,35 +2,25 @@
import { useFullscreen } from '@vueuse/core'
import type { Ref } from 'vue'
import ResetPwd from './resetPwd.vue'
+// import alarmList from './alarmList.vue'
import eventBus from '@/utils/eventBus'
import useSettingsStore from '@/store/modules/settings'
import useUserStore from '@/store/modules/user'
-
+import useRouteStore from '@/store/modules/route'
+import useWebsocketStore from '@/store/modules/websocket'
const router = useRouter()
const settingsStore = useSettingsStore()
const userStore = useUserStore()
+const routeStore = useRouteStore()
+const websocket = useWebsocketStore()
const mainPage = useMainPage()
const { isFullscreen, toggle } = useFullscreen()
const resetPwd = ref()
-interface Message {
- id: string
- message: string
- time: string
-}
-const messageList: Ref = ref([])
-
-messageList.value = [
- { id: '1', message: '示例消息', time: '2022-07-20 18:32:00' },
- { id: '2', message: '收到一条证书到期提醒', time: '2022-07-20 18:32:00' },
- { id: '3', message: '有新的借用申请待审批', time: '2022-07-20 18:32:00' },
- { id: '4', message: '您的请假申请已通过', time: '2022-07-20 18:32:00' },
-]
-
-function userCommand(command: 'dashboard' | 'resetPassword' | 'setting' | 'hotkeys' | 'logout') {
+function userCommand(command: 'dashboard' | 'resetPassword' | 'setting' | 'hotkeys' | 'logout' | 'index' | 'board') {
switch (command) {
case 'dashboard':
router.push({
@@ -45,10 +35,25 @@
name: 'personalSetting',
})
break
+ // case 'board':
+ // router.push({
+ // name: 'FullScreen',
+ // })
+ // break
+ case 'index':
+ // 清空当前系统路由
+ localStorage.removeItem('currentSys')
+ routeStore.removeRoutes()
+ router.push({
+ path: '/index',
+ })
+ break
case 'hotkeys':
eventBus.emit('global-hotkeys-intro-toggle')
break
case 'logout':
+ // localStorage.removeItem('currentSys')
+ routeStore.removeRoutes()
userStore.logout().then(() => {
router.push({
name: 'login',
@@ -57,9 +62,70 @@
break
}
}
-function pro() {
- window.open('https://hooray.gitee.io/fantastic-admin-pro-example/', 'top')
+// 报警组件
+const alarmRef = ref()
+// 跳转 报警或综合大屏
+const board = () => {
+ router.push({
+ name: 'FullScreenControl',
+ })
}
+const popoverRef = ref()
+// 关闭报警列表
+const closePopover = () => {
+ popoverRef.value.hide()
+}
+const alarmCount = computed(() => alarmRef.value?.messageList || [])
+
+const alarmFlicker = ref(0)
+const showAlarmFlicker = ref(false)
+watch(() => alarmRef.value?.messageList, (newVal) => {
+ if (newVal) {
+ if (newVal.length) {
+ // console.log(newVal, 'newVal')
+ if (newVal.some((item: any) => item.processStatus === '1' && (item.alarmLevelName === '预警' || item.alarmLevelName === '二级'))) {
+ alarmFlicker.value = 1
+ }
+ else {
+ alarmFlicker.value = 0
+ }
+ }
+ else {
+ alarmFlicker.value = 0
+ }
+ } else {
+ alarmFlicker.value = 0
+ }
+})
+const alarmTimer = ref()
+watch(() => alarmFlicker.value, () => {
+ if (alarmFlicker.value) {
+ clearInterval(alarmTimer.value)
+ alarmTimer.value = null
+ showAlarmFlicker.value = false
+ alarmTimer.value = setInterval(() => {
+ showAlarmFlicker.value = !showAlarmFlicker.value
+ }, 1000);
+ }
+ else {
+ clearInterval(alarmTimer.value)
+ alarmTimer.value = null
+ showAlarmFlicker.value = false
+ }
+})
+onMounted(() => {
+ // 连接 websocket
+ // websocket.initWebSocket()
+})
+onBeforeMount(() => {
+ // 断开 websocket
+ // websocket.destroyWebSocket()
+ if (alarmTimer.value) {
+ clearInterval(alarmTimer.value)
+ alarmTimer.value = null
+ }
+})
+const { proxy } = getCurrentInstance() as any
@@ -70,17 +136,41 @@
-
+
+
+
+
+
+
+
+
-
+
@@ -91,44 +181,6 @@
-