diff --git a/src/layouts/admin/components/navMenus.vue b/src/layouts/admin/components/navMenus.vue index d8836093..364b7d65 100644 --- a/src/layouts/admin/components/navMenus.vue +++ b/src/layouts/admin/components/navMenus.vue @@ -122,7 +122,7 @@ const onFullScreen = () => { }) } -const handleCommand = (key: string) => { +const handleCommand = async(key: string) => { console.log(key) switch (key) { case 'adminInfo': @@ -132,10 +132,17 @@ const handleCommand = (key: string) => { popupPwd.value.open() break case 'layout': - navTabs.closeTabs() - window.localStorage.clear() - adminInfo.reset() - router.push({ name: 'login' }) + await window.location.reload() + setTimeout(() => { + navTabs.closeTabs() + window.localStorage.clear() + adminInfo.reset() + router.push({ name: 'login' }) + }, 0) + // navTabs.closeTabs() + // window.localStorage.clear() + // adminInfo.reset() + // router.push({ name: 'login' }) break default: break diff --git a/src/utils/request.ts b/src/utils/request.ts index 26a7acc8..c33a330c 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -104,11 +104,11 @@ function createAxios>( if (token) { ;(config.headers as anyObj).Authorization = token } else { - config.headers.Authorization = 'Basic bmpjbnRlc3Q6bmpjbnBxcw==' + config.headers.Authorization = 'Basic bmpjbjpuamNucHFz' } } if (config.url == '/user-boot/user/generateSm2Key' || config.url == '/pqs-auth/oauth/token') { - config.headers.Authorization = 'Basic bmpjbnRlc3Q6bmpjbnBxcw==' + config.headers.Authorization = 'Basic bmpjbjpuamNucHFz' } return config @@ -145,6 +145,7 @@ function createAxios>( return refreshToken() .then(res => { adminInfo.setToken(res.data.access_token, 'auth') + adminInfo.setToken(res.data.refresh_token, 'refresh') window.requests.forEach(cb => cb(res.data.access_token)) window.requests = [] diff --git a/src/views/pqs/harmonicMonitoring/monitoringPoint/online/shishishuju/index.vue b/src/views/pqs/harmonicMonitoring/monitoringPoint/online/shishishuju/index.vue index e2798e8d..4749ef3e 100644 --- a/src/views/pqs/harmonicMonitoring/monitoringPoint/online/shishishuju/index.vue +++ b/src/views/pqs/harmonicMonitoring/monitoringPoint/online/shishishuju/index.vue @@ -665,7 +665,7 @@ const initEcharts = (color: string, key: number, name: string) => { startAngle: key == 0 ? 180 : 90, endAngle: key == 0 ? 90 : 0, min: 0, - max: key == 0 ? 12 : 400, + max: key == 0 ? 12 : 200, radius: '180%', center: key == 0 ? ['70%', '95%'] : ['30%', '95%'], splitNumber: 2, //刻度数量 @@ -868,7 +868,7 @@ const setRealData = () => { // webMsgSend.value[0].vRmsB == 0 ? 1 : Math.ceil(webMsgSend.value[0].vRmsB) // echartsDataV3.value.options.series[0].max = // webMsgSend.value[0].vRmsC == 0 ? 1 : Math.ceil(webMsgSend.value[0].vRmsC) - let numData = + let vMax = Math.ceil( (Math.max( ...[ @@ -881,9 +881,9 @@ const setRealData = () => { 10 ) * 10 - echartsDataV1.value.options.series[0].max = numData - echartsDataV2.value.options.series[0].max = numData - echartsDataV3.value.options.series[0].max = numData + echartsDataV1.value.options.series[0].max = vMax + echartsDataV2.value.options.series[0].max = vMax + echartsDataV3.value.options.series[0].max = vMax echartsDataV1.value.options.series[0].data = [ { name: ptName.value == 'star' ? 'A相' : 'AB相', //A相 @@ -912,6 +912,22 @@ const setRealData = () => { // webMsgSend.value[0].iRmsB == 0 ? 1 : Math.ceil(webMsgSend.value[0].iRmsB) // echartsDataA3.value.options.series[0].max = // webMsgSend.value[0].iRmsC == 0 ? 1 : Math.ceil(webMsgSend.value[0].iRmsC) + + let aMax = + Math.ceil( + (Math.max( + ...[ + Math.floor(webMsgSend.value[0].iRmsA * 100) / 100 || 10, + Math.floor(webMsgSend.value[0].iRmsB * 100) / 100 || 10, + Math.floor(webMsgSend.value[0].iRmsC * 100) / 100 || 10 + ] + ) * + 1.2) / + 10 + ) * 10 + echartsDataA1.value.options.series[0].max = aMax + echartsDataA2.value.options.series[0].max = aMax + echartsDataA3.value.options.series[0].max = aMax echartsDataA1.value.options.series[0].data = [ { name: 'A相', diff --git a/src/views/pqs/supervise/terminal/components/deviceLedgerTable.vue b/src/views/pqs/supervise/terminal/components/deviceLedgerTable.vue index d7380e04..c21cb0c2 100644 --- a/src/views/pqs/supervise/terminal/components/deviceLedgerTable.vue +++ b/src/views/pqs/supervise/terminal/components/deviceLedgerTable.vue @@ -12,6 +12,16 @@ > + + + + + @@ -71,6 +81,7 @@ const tableStore = new TableStore({ { field: 'bdName', title: '所属变电站', minWidth: 120 }, { field: 'devName', title: '终端名称', minWidth: 110 }, { field: 'loginTime', title: '投运时间', minWidth: 100 }, + { field: 'updateTime', title: '最新数据时间', minWidth: 150 }, { field: 'manufacturer', title: '厂家', @@ -79,7 +90,18 @@ const tableStore = new TableStore({ { field: 'devType', title: '终端型号', minWidth: 100 }, { field: 'ip', title: '终端网络参数', width: '120px' }, - { field: 'port', title: '端口号', minWidth: 40 }, + { field: 'port', title: '端口号', minWidth: 70 }, + { + field: 'comFlag', + title: '通讯状态', + minWidth: 80, + render: 'tag', + custom: { + 正常: 'success', + 中断: 'danger', + '/': 'primary' + } + }, { field: 'runFlag', title: '运行状态', @@ -125,10 +147,15 @@ const tableStore = new TableStore({ if (tableStore.table.params.runF != null) { tableStore.table.params.runFlag = [tableStore.table.params.runF] } + tableStore.table.params.comFlag = [] + if (tableStore.table.params.comF != null) { + tableStore.table.params.comFlag = [tableStore.table.params.comF] + } } }) tableStore.table.params.runF = 0 +tableStore.table.params.comF = '' tableStore.table.params.runFlag = [] tableStore.table.params.searchValue = '' @@ -139,6 +166,10 @@ const runFlagList = [ { id: 3, name: '调试' }, { id: 4, name: '退运' } ] +const comFlagList = [ + { name: '正常', id: 1 }, + { name: '中断', id: 0 } +] provide('tableStore', tableStore) onMounted(() => { diff --git a/src/views/pqs/voltageSags/monitoringPoint/online/navigation/map.vue b/src/views/pqs/voltageSags/monitoringPoint/online/navigation/map.vue index e4dc1490..07540b6d 100644 --- a/src/views/pqs/voltageSags/monitoringPoint/online/navigation/map.vue +++ b/src/views/pqs/voltageSags/monitoringPoint/online/navigation/map.vue @@ -126,6 +126,7 @@