diff --git a/public/config/config.json b/public/config/config.json index d02f6e9..c21f0e1 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"燃气物联感知平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://192.168.228.39:8083", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -26,5 +26,6 @@ "19": "海南" }, "version": "1.0.1", - "node": "16.18.1" + "node": "16.18.1", + "mode": "windows" } diff --git a/public/config/config.json b/public/config/config.json index d02f6e9..c21f0e1 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"燃气物联感知平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://192.168.228.39:8083", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -26,5 +26,6 @@ "19": "海南" }, "version": "1.0.1", - "node": "16.18.1" + "node": "16.18.1", + "mode": "windows" } diff --git a/src/api/index.ts b/src/api/index.ts index 9da5465..dd01e75 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -62,11 +62,13 @@ } else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 - toLogin() - if (useUserStore().isLogout === 0) { - ElMessage.error(response.data.message || '发生错误') + if(!window.location.href.includes('login')) { + toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - useUserStore().toLogout() } else { // 这里做错误提 diff --git a/public/config/config.json b/public/config/config.json index d02f6e9..c21f0e1 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"燃气物联感知平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://192.168.228.39:8083", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -26,5 +26,6 @@ "19": "海南" }, "version": "1.0.1", - "node": "16.18.1" + "node": "16.18.1", + "mode": "windows" } diff --git a/src/api/index.ts b/src/api/index.ts index 9da5465..dd01e75 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -62,11 +62,13 @@ } else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 - toLogin() - if (useUserStore().isLogout === 0) { - ElMessage.error(response.data.message || '发生错误') + if(!window.location.href.includes('login')) { + toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - useUserStore().toLogout() } else { // 这里做错误提 diff --git a/src/api/system/login.ts b/src/api/system/login.ts index a91897c..9b3c169 100644 --- a/src/api/system/login.ts +++ b/src/api/system/login.ts @@ -26,7 +26,7 @@ } // 登出 -export function logout() { +export function logoutApi() { return request.get(`${prefix}user/logout`) } diff --git a/public/config/config.json b/public/config/config.json index d02f6e9..c21f0e1 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"燃气物联感知平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://192.168.228.39:8083", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -26,5 +26,6 @@ "19": "海南" }, "version": "1.0.1", - "node": "16.18.1" + "node": "16.18.1", + "mode": "windows" } diff --git a/src/api/index.ts b/src/api/index.ts index 9da5465..dd01e75 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -62,11 +62,13 @@ } else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 - toLogin() - if (useUserStore().isLogout === 0) { - ElMessage.error(response.data.message || '发生错误') + if(!window.location.href.includes('login')) { + toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - useUserStore().toLogout() } else { // 这里做错误提 diff --git a/src/api/system/login.ts b/src/api/system/login.ts index a91897c..9b3c169 100644 --- a/src/api/system/login.ts +++ b/src/api/system/login.ts @@ -26,7 +26,7 @@ } // 登出 -export function logout() { +export function logoutApi() { return request.get(`${prefix}user/logout`) } diff --git a/src/main.ts b/src/main.ts index 7d265f6..8a420e8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -101,9 +101,13 @@ } app.config.globalProperties.pauseAudio = () => { const audio = document.getElementById('eventAudio') as HTMLAudioElement - if (!audio.paused) { // 判断音频是否暂停,暂停重新加载音频元素 + if(audio) { audio.pause() } + + // if (!audio.paused) { // 判断音频是否暂停,暂停重新加载音频元素 + // audio.pause() + // } } app.use(ElementPlus) app.use(Vant) diff --git a/public/config/config.json b/public/config/config.json index d02f6e9..c21f0e1 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"燃气物联感知平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://192.168.228.39:8083", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -26,5 +26,6 @@ "19": "海南" }, "version": "1.0.1", - "node": "16.18.1" + "node": "16.18.1", + "mode": "windows" } diff --git a/src/api/index.ts b/src/api/index.ts index 9da5465..dd01e75 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -62,11 +62,13 @@ } else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 - toLogin() - if (useUserStore().isLogout === 0) { - ElMessage.error(response.data.message || '发生错误') + if(!window.location.href.includes('login')) { + toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - useUserStore().toLogout() } else { // 这里做错误提 diff --git a/src/api/system/login.ts b/src/api/system/login.ts index a91897c..9b3c169 100644 --- a/src/api/system/login.ts +++ b/src/api/system/login.ts @@ -26,7 +26,7 @@ } // 登出 -export function logout() { +export function logoutApi() { return request.get(`${prefix}user/logout`) } diff --git a/src/main.ts b/src/main.ts index 7d265f6..8a420e8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -101,9 +101,13 @@ } app.config.globalProperties.pauseAudio = () => { const audio = document.getElementById('eventAudio') as HTMLAudioElement - if (!audio.paused) { // 判断音频是否暂停,暂停重新加载音频元素 + if(audio) { audio.pause() } + + // if (!audio.paused) { // 判断音频是否暂停,暂停重新加载音频元素 + // audio.pause() + // } } app.use(ElementPlus) app.use(Vant) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index d59cf45..b6dc16b 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -1,7 +1,7 @@ import { reject } from 'lodash-es' import useRouteStore from './route' import useMenuStore from './menu' -import { doLogin, getConfig, getInfo, getUserMenus, logout } from '@/api/system/login' +import { doLogin, getConfig, getInfo, getUserMenus, logoutApi } from '@/api/system/login' import { changePwd } from '@/api/system/user' import type { Menu } from '@/global' import { getPrivateKey, privateStr, setPrivateKey } from '@/utils/auth' @@ -100,7 +100,8 @@ // 注销 logout() { return new Promise((resolve) => { - logout().then(() => { + logoutApi().then(() => { + this.isLogout += 1 const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') diff --git a/public/config/config.json b/public/config/config.json index d02f6e9..c21f0e1 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"燃气物联感知平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://192.168.228.39:8083", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -26,5 +26,6 @@ "19": "海南" }, "version": "1.0.1", - "node": "16.18.1" + "node": "16.18.1", + "mode": "windows" } diff --git a/src/api/index.ts b/src/api/index.ts index 9da5465..dd01e75 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -62,11 +62,13 @@ } else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 - toLogin() - if (useUserStore().isLogout === 0) { - ElMessage.error(response.data.message || '发生错误') + if(!window.location.href.includes('login')) { + toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - useUserStore().toLogout() } else { // 这里做错误提 diff --git a/src/api/system/login.ts b/src/api/system/login.ts index a91897c..9b3c169 100644 --- a/src/api/system/login.ts +++ b/src/api/system/login.ts @@ -26,7 +26,7 @@ } // 登出 -export function logout() { +export function logoutApi() { return request.get(`${prefix}user/logout`) } diff --git a/src/main.ts b/src/main.ts index 7d265f6..8a420e8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -101,9 +101,13 @@ } app.config.globalProperties.pauseAudio = () => { const audio = document.getElementById('eventAudio') as HTMLAudioElement - if (!audio.paused) { // 判断音频是否暂停,暂停重新加载音频元素 + if(audio) { audio.pause() } + + // if (!audio.paused) { // 判断音频是否暂停,暂停重新加载音频元素 + // audio.pause() + // } } app.use(ElementPlus) app.use(Vant) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index d59cf45..b6dc16b 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -1,7 +1,7 @@ import { reject } from 'lodash-es' import useRouteStore from './route' import useMenuStore from './menu' -import { doLogin, getConfig, getInfo, getUserMenus, logout } from '@/api/system/login' +import { doLogin, getConfig, getInfo, getUserMenus, logoutApi } from '@/api/system/login' import { changePwd } from '@/api/system/user' import type { Menu } from '@/global' import { getPrivateKey, privateStr, setPrivateKey } from '@/utils/auth' @@ -100,7 +100,8 @@ // 注销 logout() { return new Promise((resolve) => { - logout().then(() => { + logoutApi().then(() => { + this.isLogout += 1 const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') diff --git a/src/views/home/operation/alarm/index.vue b/src/views/home/operation/alarm/index.vue index 739ffb6..a34a05f 100644 --- a/src/views/home/operation/alarm/index.vue +++ b/src/views/home/operation/alarm/index.vue @@ -221,8 +221,8 @@ const cacheRow = ref({}) const detail = async (row: any) => { if (row.processStatus === '未读') { - list1.value[list1.value.findIndex((item: any) => item.id === row.id)].processStatus = '已读' - row.processStatus = '已读' + list1.value[list1.value.findIndex((item: any) => item.id === row.id)].processStatus = '待处置' + row.processStatus = '待处置' } const res = await deviceAlarmView(row.id) const data = toHumpObject(res.data) diff --git a/public/config/config.json b/public/config/config.json index d02f6e9..c21f0e1 100644 --- a/public/config/config.json +++ b/public/config/config.json @@ -1,6 +1,6 @@ { "title":"燃气物联感知平台", - "baseUrl": "http://111.198.10.15:11646", + "baseUrl": "http://192.168.228.39:8083", "securityJsCode": "56bf9671d4b3517d294caec4751889a1", "JsKey": "40849e82b4e33f5255b17372520c954d", "xuntengMap": "http://111.198.10.15:11643/getMap?mapPath=http://172.17.206.70:20198/_allLayer/tile", @@ -26,5 +26,6 @@ "19": "海南" }, "version": "1.0.1", - "node": "16.18.1" + "node": "16.18.1", + "mode": "windows" } diff --git a/src/api/index.ts b/src/api/index.ts index 9da5465..dd01e75 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -62,11 +62,13 @@ } else if (response.data.code !== responseCode.success) { if (response.data.code === responseCode.noPermission) { // token失效状态跳转到登录页 - toLogin() - if (useUserStore().isLogout === 0) { - ElMessage.error(response.data.message || '发生错误') + if(!window.location.href.includes('login')) { + toLogin() + if (useUserStore().isLogout === 0) { + ElMessage.error(response.data.message || '发生错误') + } + useUserStore().toLogout() } - useUserStore().toLogout() } else { // 这里做错误提 diff --git a/src/api/system/login.ts b/src/api/system/login.ts index a91897c..9b3c169 100644 --- a/src/api/system/login.ts +++ b/src/api/system/login.ts @@ -26,7 +26,7 @@ } // 登出 -export function logout() { +export function logoutApi() { return request.get(`${prefix}user/logout`) } diff --git a/src/main.ts b/src/main.ts index 7d265f6..8a420e8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -101,9 +101,13 @@ } app.config.globalProperties.pauseAudio = () => { const audio = document.getElementById('eventAudio') as HTMLAudioElement - if (!audio.paused) { // 判断音频是否暂停,暂停重新加载音频元素 + if(audio) { audio.pause() } + + // if (!audio.paused) { // 判断音频是否暂停,暂停重新加载音频元素 + // audio.pause() + // } } app.use(ElementPlus) app.use(Vant) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index d59cf45..b6dc16b 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -1,7 +1,7 @@ import { reject } from 'lodash-es' import useRouteStore from './route' import useMenuStore from './menu' -import { doLogin, getConfig, getInfo, getUserMenus, logout } from '@/api/system/login' +import { doLogin, getConfig, getInfo, getUserMenus, logoutApi } from '@/api/system/login' import { changePwd } from '@/api/system/user' import type { Menu } from '@/global' import { getPrivateKey, privateStr, setPrivateKey } from '@/utils/auth' @@ -100,7 +100,8 @@ // 注销 logout() { return new Promise((resolve) => { - logout().then(() => { + logoutApi().then(() => { + this.isLogout += 1 const routeStore = useRouteStore() const menuStore = useMenuStore() localStorage.removeItem('username') diff --git a/src/views/home/operation/alarm/index.vue b/src/views/home/operation/alarm/index.vue index 739ffb6..a34a05f 100644 --- a/src/views/home/operation/alarm/index.vue +++ b/src/views/home/operation/alarm/index.vue @@ -221,8 +221,8 @@ const cacheRow = ref({}) const detail = async (row: any) => { if (row.processStatus === '未读') { - list1.value[list1.value.findIndex((item: any) => item.id === row.id)].processStatus = '已读' - row.processStatus = '已读' + list1.value[list1.value.findIndex((item: any) => item.id === row.id)].processStatus = '待处置' + row.processStatus = '待处置' } const res = await deviceAlarmView(row.id) const data = toHumpObject(res.data) diff --git a/src/views/login-pc.vue b/src/views/login-pc.vue index e6e39fd..133116b 100644 --- a/src/views/login-pc.vue +++ b/src/views/login-pc.vue @@ -195,7 +195,7 @@ onMounted(() => { // 暂停播放报警声音 proxy.pauseAudio() - localStorage.setItem('eventAudio', 'pause') + localStorage.setItem('eventAudio', '') // 清空面包屑 menuStore.resetBreadcrumb() })