修改问题

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) console.log(key)
switch (key) { switch (key) {
case 'adminInfo': case 'adminInfo':
@@ -132,10 +132,17 @@ const handleCommand = (key: string) => {
popupPwd.value.open() popupPwd.value.open()
break break
case 'layout': case 'layout':
navTabs.closeTabs() await window.location.reload()
window.localStorage.clear() setTimeout(() => {
adminInfo.reset() navTabs.closeTabs()
router.push({ name: 'login' }) window.localStorage.clear()
adminInfo.reset()
router.push({ name: 'login' })
}, 0)
// navTabs.closeTabs()
// window.localStorage.clear()
// adminInfo.reset()
// router.push({ name: 'login' })
break break
default: default:
break break

View File

@@ -104,11 +104,11 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
if (token) { if (token) {
;(config.headers as anyObj).Authorization = token ;(config.headers as anyObj).Authorization = token
} else { } else {
config.headers.Authorization = 'Basic bmpjbnRlc3Q6bmpjbnBxcw==' config.headers.Authorization = 'Basic bmpjbjpuamNucHFz'
} }
} }
if (config.url == '/user-boot/user/generateSm2Key' || config.url == '/pqs-auth/oauth/token') { 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 return config
@@ -145,6 +145,7 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
return refreshToken() return refreshToken()
.then(res => { .then(res => {
adminInfo.setToken(res.data.access_token, 'auth') 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.forEach(cb => cb(res.data.access_token))
window.requests = [] window.requests = []

View File

@@ -665,7 +665,7 @@ const initEcharts = (color: string, key: number, name: string) => {
startAngle: key == 0 ? 180 : 90, startAngle: key == 0 ? 180 : 90,
endAngle: key == 0 ? 90 : 0, endAngle: key == 0 ? 90 : 0,
min: 0, min: 0,
max: key == 0 ? 12 : 400, max: key == 0 ? 12 : 200,
radius: '180%', radius: '180%',
center: key == 0 ? ['70%', '95%'] : ['30%', '95%'], center: key == 0 ? ['70%', '95%'] : ['30%', '95%'],
splitNumber: 2, //刻度数量 splitNumber: 2, //刻度数量
@@ -868,7 +868,7 @@ const setRealData = () => {
// webMsgSend.value[0].vRmsB == 0 ? 1 : Math.ceil(webMsgSend.value[0].vRmsB) // webMsgSend.value[0].vRmsB == 0 ? 1 : Math.ceil(webMsgSend.value[0].vRmsB)
// echartsDataV3.value.options.series[0].max = // echartsDataV3.value.options.series[0].max =
// webMsgSend.value[0].vRmsC == 0 ? 1 : Math.ceil(webMsgSend.value[0].vRmsC) // webMsgSend.value[0].vRmsC == 0 ? 1 : Math.ceil(webMsgSend.value[0].vRmsC)
let numData = let vMax =
Math.ceil( Math.ceil(
(Math.max( (Math.max(
...[ ...[
@@ -881,9 +881,9 @@ const setRealData = () => {
10 10
) * 10 ) * 10
echartsDataV1.value.options.series[0].max = numData echartsDataV1.value.options.series[0].max = vMax
echartsDataV2.value.options.series[0].max = numData echartsDataV2.value.options.series[0].max = vMax
echartsDataV3.value.options.series[0].max = numData echartsDataV3.value.options.series[0].max = vMax
echartsDataV1.value.options.series[0].data = [ echartsDataV1.value.options.series[0].data = [
{ {
name: ptName.value == 'star' ? 'A相' : 'AB相', //A相 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) // webMsgSend.value[0].iRmsB == 0 ? 1 : Math.ceil(webMsgSend.value[0].iRmsB)
// echartsDataA3.value.options.series[0].max = // echartsDataA3.value.options.series[0].max =
// webMsgSend.value[0].iRmsC == 0 ? 1 : Math.ceil(webMsgSend.value[0].iRmsC) // 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 = [ echartsDataA1.value.options.series[0].data = [
{ {
name: 'A相', name: 'A相',

View File

@@ -12,6 +12,16 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </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-form-item label="数据筛选">
<el-input <el-input
style="width: 200px" style="width: 200px"
@@ -19,7 +29,7 @@
v-model="tableStore.table.params.searchValue" v-model="tableStore.table.params.searchValue"
clearable clearable
maxlength="32" maxlength="32"
show-word-limit show-word-limit
></el-input> ></el-input>
</el-form-item> </el-form-item>
</template> </template>
@@ -71,6 +81,7 @@ const tableStore = new TableStore({
{ field: 'bdName', title: '所属变电站', minWidth: 120 }, { field: 'bdName', title: '所属变电站', minWidth: 120 },
{ field: 'devName', title: '终端名称', minWidth: 110 }, { field: 'devName', title: '终端名称', minWidth: 110 },
{ field: 'loginTime', title: '投运时间', minWidth: 100 }, { field: 'loginTime', title: '投运时间', minWidth: 100 },
{ field: 'updateTime', title: '最新数据时间', minWidth: 150 },
{ {
field: 'manufacturer', field: 'manufacturer',
title: '厂家', title: '厂家',
@@ -79,7 +90,18 @@ const tableStore = new TableStore({
{ field: 'devType', title: '终端型号', minWidth: 100 }, { field: 'devType', title: '终端型号', minWidth: 100 },
{ field: 'ip', title: '终端网络参数', width: '120px' }, { 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', field: 'runFlag',
title: '运行状态', title: '运行状态',
@@ -125,10 +147,15 @@ const tableStore = new TableStore({
if (tableStore.table.params.runF != null) { if (tableStore.table.params.runF != null) {
tableStore.table.params.runFlag = [tableStore.table.params.runF] 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.runF = 0
tableStore.table.params.comF = ''
tableStore.table.params.runFlag = [] tableStore.table.params.runFlag = []
tableStore.table.params.searchValue = '' tableStore.table.params.searchValue = ''
@@ -139,6 +166,10 @@ const runFlagList = [
{ id: 3, name: '调试' }, { id: 3, name: '调试' },
{ id: 4, name: '退运' } { id: 4, name: '退运' }
] ]
const comFlagList = [
{ name: '正常', id: 1 },
{ name: '中断', id: 0 }
]
provide('tableStore', tableStore) provide('tableStore', tableStore)
onMounted(() => { onMounted(() => {

View File

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

View File

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