修改问题

This commit is contained in:
guanj
2026-03-17 08:43:51 +08:00
parent 9202da17f1
commit 7d2ce51510
6 changed files with 127 additions and 61 deletions

View File

@@ -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

View File

@@ -104,11 +104,11 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
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<Data = any, T = ApiPromise<Data>>(
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 = []

View File

@@ -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相',

View File

@@ -12,6 +12,16 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="通讯状态">
<el-select v-model="tableStore.table.params.comF" clearable placeholder="请选择通讯状态">
<el-option
v-for="item in comFlagList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="数据筛选">
<el-input
style="width: 200px"
@@ -19,7 +29,7 @@
v-model="tableStore.table.params.searchValue"
clearable
maxlength="32"
show-word-limit
show-word-limit
></el-input>
</el-form-item>
</template>
@@ -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(() => {

View File

@@ -126,6 +126,7 @@
<script setup lang="ts">
import { BmlMarkerClusterer } from 'vue-baidu-map-3x'
import { onMounted, ref, watch } from 'vue'
import { getAreaLineInfo } from '@/api/event-boot/areaInfo'
import DatePicker from '@/components/form/datePicker/index.vue'

View File

@@ -91,53 +91,63 @@
@click="markerClick(path)"
></bm-marker>
</BmlMarkerClusterer>
<bm-marker :position="infoWindowPoint" :icon="{ url: '1', size: { width: 0, height: 0 } }">
<bm-info-window :show="infoWindowPoint.show" @close="infoWindowPoint.show = false">
<el-descriptions :title="infoWindowPoint.lineName" :column="1" v-if="infoWindowPoint.lineId">
<el-descriptions-item label="供电公司">{{ infoWindowPoint.gdName }}</el-descriptions-item>
<el-descriptions-item label="变电站(场站)">
{{ infoWindowPoint.subName }}
</el-descriptions-item>
<el-descriptions-item label="母线">{{ infoWindowPoint.voltageName }}</el-descriptions-item>
<el-descriptions-item label="网络参数">
{{ infoWindowPoint.ip }}
</el-descriptions-item>
<el-descriptions-item label="PT变比">
{{ infoWindowPoint.pt1 }}/{{ infoWindowPoint.pt2 }}
</el-descriptions-item>
<el-descriptions-item label="CT变比">
{{ infoWindowPoint.ct1 }}/{{ infoWindowPoint.ct2 }}
</el-descriptions-item>
<el-descriptions-item label="生产厂家">
{{ infoWindowPoint.manufacturer }}
</el-descriptions-item>
<el-descriptions-item label="终端状态">
{{
infoWindowPoint.runFlag == 0
? '投运'
: infoWindowPoint.runFlag == 1
? '检修'
: '停运'
}}
</el-descriptions-item>
<el-descriptions-item label="通讯状态">
{{ infoWindowPoint.comFlag == 0 ? '中断' : '正常' }}
</el-descriptions-item>
<el-descriptions-item>
<!-- <el-button type="primary" size="small" @click="lookPoint">查看监测点</el-button> -->
<el-button type="primary" size="small" @click="lookEvent">
暂态事件({{ infoWindowPoint.noDealCount }})
</el-button>
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:title="infoWindowPoint.subName"
:column="1"
v-else-if="infoWindowPoint.subId"
style="padding-top: 10px"
></el-descriptions>
</bm-info-window>
</bm-marker>
<BmlMarkerClusterer maxZoom="12">
<bm-marker :position="infoWindowPoint" :icon="{ url: '1', size: { width: 0, height: 0 } }">
<bm-info-window :show="infoWindowPoint.show" @close="infoWindowPoint.show = false">
<el-descriptions
:title="infoWindowPoint.lineName"
:column="1"
v-if="infoWindowPoint.lineId"
>
<el-descriptions-item label="供电公司">
{{ infoWindowPoint.gdName }}
</el-descriptions-item>
<el-descriptions-item label="变电站(场站)">
{{ infoWindowPoint.subName }}
</el-descriptions-item>
<el-descriptions-item label="母线">
{{ infoWindowPoint.voltageName }}
</el-descriptions-item>
<el-descriptions-item label="网络参数">
{{ infoWindowPoint.ip }}
</el-descriptions-item>
<el-descriptions-item label="PT变比">
{{ infoWindowPoint.pt1 }}/{{ infoWindowPoint.pt2 }}
</el-descriptions-item>
<el-descriptions-item label="CT变比">
{{ infoWindowPoint.ct1 }}/{{ infoWindowPoint.ct2 }}
</el-descriptions-item>
<el-descriptions-item label="生产厂家">
{{ infoWindowPoint.manufacturer }}
</el-descriptions-item>
<el-descriptions-item label="终端状态">
{{
infoWindowPoint.runFlag == 0
? '投运'
: infoWindowPoint.runFlag == 1
? '检修'
: '停运'
}}
</el-descriptions-item>
<el-descriptions-item label="通讯状态">
{{ infoWindowPoint.comFlag == 0 ? '中断' : '正常' }}
</el-descriptions-item>
<el-descriptions-item>
<!-- <el-button type="primary" size="small" @click="lookPoint">查看监测点</el-button> -->
<el-button type="primary" size="small" @click="lookEvent">
暂态事件({{ infoWindowPoint.noDealCount }})
</el-button>
</el-descriptions-item>
</el-descriptions>
<el-descriptions
:title="infoWindowPoint.subName"
:column="1"
v-else-if="infoWindowPoint.subId"
style="padding-top: 10px"
></el-descriptions>
</bm-info-window>
</bm-marker>
</BmlMarkerClusterer>
</baidu-map>
</div>
<div style="width: 600px; height: 100%">