联调台账变更推送

This commit is contained in:
GGJ
2025-04-23 15:36:57 +08:00
parent 71fbdfa1d0
commit dc4b37b833
11 changed files with 684 additions and 249 deletions

View File

@@ -5,6 +5,13 @@ export function getTerminalTreeForFive(data:any) {
return request({ return request({
url: '/device-boot/terminalTree/getTerminalTreeForFive', url: '/device-boot/terminalTree/getTerminalTreeForFive',
method: 'post', method: 'post',
data: data, data: data
})
}
// 台账变更推送
export function ledgerChangePush() {
return request({
url: '/device-boot/device/ledgerChangePush',
method: 'post'
}) })
} }

View File

@@ -11,6 +11,9 @@
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable /> <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable />
</el-form-item> </el-form-item>
</template> </template>
<template #operation>
<el-button type="primary" icon="el-icon-Sort" @click="changePush">台账变更推送</el-button>
</template>
</TableHeader> </TableHeader>
<Table ref="tableRef"></Table> <Table ref="tableRef"></Table>
</div> </div>
@@ -22,6 +25,8 @@ import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue' import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue' import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData' import { useDictData } from '@/stores/dictData'
import { ElMessage, ElMessageBox } from 'element-plus'
import { ledgerChangePush } from '@/api/device-boot/terminalTree'
defineOptions({ defineOptions({
name: 'BusinessAdministrator/LogManagement/TerminalLog' name: 'BusinessAdministrator/LogManagement/TerminalLog'
}) })
@@ -41,7 +46,10 @@ const tableStore = new TableStore({
} }
}, },
// { title: '名称', field: 'name', width: '200' }, // { title: '名称', field: 'name', width: '200' },
{ title: '日志类型', field: 'logsType', width: '250', {
title: '日志类型',
field: 'logsType',
width: '250',
formatter: (row: any) => { formatter: (row: any) => {
return fontdveoption.find((item: any) => item.id == row.cellValue)?.name return fontdveoption.find((item: any) => item.id == row.cellValue)?.name
} }
@@ -62,6 +70,21 @@ const tableStore = new TableStore({
], ],
beforeSearchFun: () => {} beforeSearchFun: () => {}
}) })
// 变更推送
const changePush = () => {
ElMessageBox.confirm('当前操作会把存在变动的装置测点推送至前置,是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
ledgerChangePush().then(res => {
ElMessage.success(res.message)
tableStore.index()
})
})
}
const tableRef = ref()
provide('tableRef', tableRef)
tableStore.table.params.type = '' tableStore.table.params.type = ''
tableStore.table.params.searchValue = '' tableStore.table.params.searchValue = ''
provide('tableStore', tableStore) provide('tableStore', tableStore)

View File

@@ -124,7 +124,6 @@
<el-tag v-if="row.comFlag === 1" type="success" size="small">正常</el-tag> <el-tag v-if="row.comFlag === 1" type="success" size="small">正常</el-tag>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column title="操作" width="160"> <vxe-column title="操作" width="160">
<template #default="{ row }"> <template #default="{ row }">
<!-- <el-button v-if="row.level === 4" type="primary" size="small" link @click="uesdealia(row)"> <!-- <el-button v-if="row.level === 4" type="primary" size="small" link @click="uesdealia(row)">

View File

@@ -2514,7 +2514,7 @@ const queryNodeContent = () => {
return return
} }
if (nodeData.value.plevel == 6) { if (nodeData.value.level>= 400) {
setDown() setDown()
} }
let data = { let data = {

View File

@@ -3,107 +3,149 @@
<TableHeader datePicker ref="header"> <TableHeader datePicker ref="header">
<template v-slot:select> <template v-slot:select>
<el-form-item label="统计类型"> <el-form-item label="统计类型">
<el-select v-model="tableStore.table.params.statisticalType" value-key="id" placeholder="请选择统计类型"> <el-select
v-model="tableStore.table.params.statisticalType"
value-key="id"
placeholder="请选择统计类型"
>
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" /> <el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-DataAnalysis" <el-button type="primary" icon="el-icon-DataAnalysis" @click="rankingClick(null, true)">
@click="rankingClick(null, true)">排名前10监测点</el-button> 排名前10监测点
</el-button>
</el-form-item> </el-form-item>
</template> </template>
</TableHeader> </TableHeader>
<div v-loading="tableStore.table.loading" class="pr10"> <div v-loading="tableStore.table.loading" class="pr10">
<el-row> <el-row>
<el-col :span="12" class="pd10"> <el-col :span="12" class="pd10">
<el-tag style="background: #339966;" class="tag" size="small">1</el-tag> <el-tag style="background: #339966" class="tag" size="small">1</el-tag>
<span style="color: #339966;" class="text">:无污染(0,1]</span> <span style="color: #339966" class="text">:无污染(0,1]</span>
<el-tag style="background: #3399ff;" class="tag" size="small">2</el-tag> <el-tag style="background: #3399ff" class="tag" size="small">2</el-tag>
<span style="color: #3399ff;" class="text">:轻微污染(1,1.2]</span> <span style="color: #3399ff" class="text">:轻微污染(1,1.2]</span>
<el-tag style="background: #ffcc33;" class="tag" size="small">3</el-tag> <el-tag style="background: #ffcc33" class="tag" size="small">3</el-tag>
<span style="color: #ffcc33;" class="text">:轻度污染(1.2,1.6]</span> <span style="color: #ffcc33" class="text">:轻度污染(1.2,1.6]</span>
<el-tag style="background: #ff9900;" class="tag" size="small">4</el-tag> <el-tag style="background: #ff9900" class="tag" size="small">4</el-tag>
<span style="color: #ff9900;" class="text">:中度污染(1.6,2]</span> <span style="color: #ff9900" class="text">:中度污染(1.6,2]</span>
<el-tag style="background: #cc0000;" class="tag" size="small">5</el-tag> <el-tag style="background: #cc0000" class="tag" size="small">5</el-tag>
<span style="color: #cc0000;" class="text">:重度污染(2,+)</span> <span style="color: #cc0000" class="text">:重度污染(2,+)</span>
<div :style="{ height: layout.height }" style="overflow-y: auto" class="mt10"> <div :style="{ height: layout.height }" style="overflow-y: auto" class="mt10">
<div class="cardBox"> <div class="cardBox">
<el-card v-for="(item, index) in tableStore.table.data" :key="index"> <el-card v-for="(item, index) in tableStore.table.data" :key="index">
<template #header> <template #header>
<div style="cursor: pointer;" @click="queryline(item, false)"> <div style="cursor: pointer" @click="queryline(item, false)">
<el-tag v-if="item.data == 3.14159 || item.data == 0" <el-tag
style="background: #ccc; color: #fff" size="small"> v-if="item.data == 3.14159 || item.data == 0"
style="background: #ccc; color: #fff"
size="small"
>
</el-tag> </el-tag>
<el-tag v-if="0 < item.data && item.data < 1 && item.data !== 3.14159" <el-tag
style="background: #339966; color: #fff" size="small"> v-if="0 < item.data && item.data < 1 && item.data !== 3.14159"
style="background: #339966; color: #fff"
size="small"
>
1 1
</el-tag> </el-tag>
<el-tag v-if="1 <= item.data && item.data < 1.2 && item.data !== 3.14159" <el-tag
style="background: #3399ff; color: #fff" size="small"> v-if="1 <= item.data && item.data < 1.2 && item.data !== 3.14159"
style="background: #3399ff; color: #fff"
size="small"
>
2 2
</el-tag> </el-tag>
<el-tag v-if="1.2 <= item.data && item.data < 1.6 && item.data !== 3.14159" <el-tag
style="background: #ffcc33; color: #fff" size="small"> v-if="1.2 <= item.data && item.data < 1.6 && item.data !== 3.14159"
style="background: #ffcc33; color: #fff"
size="small"
>
3 3
</el-tag> </el-tag>
<el-tag v-if="1.6 <= item.data && item.data < 2 && item.data !== 3.14159" <el-tag
style="background: #ff9900; color: #fff" size="small"> v-if="1.6 <= item.data && item.data < 2 && item.data !== 3.14159"
style="background: #ff9900; color: #fff"
size="small"
>
4 4
</el-tag> </el-tag>
<el-tag v-if="2 <= item.data && item.data && item.data !== 3.14159" <el-tag
style="background: #cc0000; color: #fff" size="small"> v-if="2 <= item.data && item.data && item.data !== 3.14159"
style="background: #cc0000; color: #fff"
size="small"
>
5 5
</el-tag> </el-tag>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</div> </div>
</template> </template>
<div class="card-content"> <div class="card-content">
<div class="card-item" v-for="(item1, index1) in item.children" :key="index1" <div
@click="queryline(item1, true)"> class="card-item"
<el-tag v-if="item1.data == 3.14159 || item1.data == 0" v-for="(item1, index1) in item.children"
style="background: #ccc; color: #fff" size="small"> :key="index1"
@click="queryline(item1, true)"
>
<el-tag
v-if="item1.data == 3.14159 || item1.data == 0"
style="background: #ccc; color: #fff"
size="small"
>
</el-tag> </el-tag>
<el-tag v-if="0 < item1.data && item1.data < 1 && item1.data !== 3.14159" <el-tag
style="background: #339966; color: #fff" size="small"> v-if="0 < item1.data && item1.data < 1 && item1.data !== 3.14159"
style="background: #339966; color: #fff"
size="small"
>
1 1
</el-tag> </el-tag>
<el-tag v-if="1 <= item1.data && item1.data < 1.2 && item1.data !== 3.14159" <el-tag
style="background: #3399ff; color: #fff" size="small"> v-if="1 <= item1.data && item1.data < 1.2 && item1.data !== 3.14159"
style="background: #3399ff; color: #fff"
size="small"
>
2 2
</el-tag> </el-tag>
<el-tag v-if="1.2 <= item1.data && item1.data < 1.6 && item1.data !== 3.14159" <el-tag
style="background: #ffcc33; color: #fff" size="small"> v-if="1.2 <= item1.data && item1.data < 1.6 && item1.data !== 3.14159"
style="background: #ffcc33; color: #fff"
size="small"
>
3 3
</el-tag> </el-tag>
<el-tag v-if="1.6 <= item1.data && item1.data < 2 && item1.data !== 3.14159" <el-tag
style="background: #ff9900; color: #fff" size="small"> v-if="1.6 <= item1.data && item1.data < 2 && item1.data !== 3.14159"
style="background: #ff9900; color: #fff"
size="small"
>
4 4
</el-tag> </el-tag>
<el-tag v-if="2 <= item1.data && item1.data && item1.data !== 3.14159" <el-tag
style="background: #cc0000; color: #fff" size="small"> v-if="2 <= item1.data && item1.data && item1.data !== 3.14159"
style="background: #cc0000; color: #fff"
size="small"
>
5 5
</el-tag> </el-tag>
<span class="xdf"> <span class="xdf">
<el-tooltip :show-arrow="false" :offset="-0" :content="item1.name" <el-tooltip
popper-class="atooltip" placement="bottom-start"> :show-arrow="false"
:offset="-0"
:content="item1.name"
popper-class="atooltip"
placement="bottom-start"
>
<div class="tooltipText"> <div class="tooltipText">
{{ item1.name }} {{ item1.name }}
</div> </div>
</el-tooltip> </el-tooltip>
</span> </span>
</div> </div>
</div> </div>
</el-card> </el-card>
</div> </div>
</div> </div>
</el-col> </el-col>
@@ -111,61 +153,54 @@
<my-echart class="tall" :options="echartList" /> <my-echart class="tall" :options="echartList" />
<div class="tall"> <div class="tall">
<vxe-table height="auto" auto-resize :data="tableStore.table.data" v-bind="defaultAttribute"> <vxe-table height="auto" auto-resize :data="tableStore.table.data" v-bind="defaultAttribute">
<vxe-column field="name" title="名称"></vxe-column> <vxe-column field="name" title="名称"></vxe-column>
<vxe-column field="zc" title="污染值"> <vxe-column field="zc" title="污染值">
<template #default="scope"> <template #default="scope">
<span v-if="scope.row.data == 3.14159" style="color: #000;"> <span v-if="scope.row.data == 3.14159" style="color: #000">暂无数据</span>
暂无数据 <span v-if="scope.row.data !== 3.14159" style="color: #000">
</span>
<span v-if="scope.row.data !== 3.14159" style="color: #000;">
{{ scope.row.data }} {{ scope.row.data }}
</span> </span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column field="zd" title="评估"> <vxe-column field="zd" title="评估">
<template #default="scope"> <template #default="scope">
<span v-if=" <span
0 <= scope.row.data && v-if="0 <= scope.row.data && scope.row.data < 1 && scope.row.data !== 3.14159"
scope.row.data < 1 && style="font-weight: bold; color: #339966"
scope.row.data !== 3.14159 >
" style=" font-weight: bold;color: #339966;">
无污染 无污染
</span> </span>
<span v-if=" <span
1 <= scope.row.data && v-if="1 <= scope.row.data && scope.row.data < 1.2 && scope.row.data !== 3.14159"
scope.row.data < 1.2 && style="font-weight: bold; color: #3399ff"
scope.row.data !== 3.14159 >
" style=" font-weight: bold;color: #3399ff;">
轻微污染 轻微污染
</span> </span>
<span v-if=" <span
1.2 <= scope.row.data && v-if="
scope.row.data < 1.6 && 1.2 <= scope.row.data && scope.row.data < 1.6 && scope.row.data !== 3.14159
scope.row.data !== 3.14159 "
" style=" font-weight: bold;color: #ffcc33;"> style="font-weight: bold; color: #ffcc33"
>
轻度污染 轻度污染
</span> </span>
<span v-if=" <span
1.6 <= scope.row.data && v-if="1.6 <= scope.row.data && scope.row.data < 2 && scope.row.data !== 3.14159"
scope.row.data < 2 && style="font-weight: bold; color: #ff9900"
scope.row.data !== 3.14159 >
" style=" font-weight: bold;color: #ff9900;">
中度污染 中度污染
</span> </span>
<span v-if=" <span
2 <= scope.row.data && scope.row.data && scope.row.data !== 3.14159 v-if="2 <= scope.row.data && scope.row.data && scope.row.data !== 3.14159"
" style=" font-weight: bold;color: #cc0000;"> style="font-weight: bold; color: #cc0000"
>
重度污染 重度污染
</span> </span>
<span v-if="scope.row.data == 3.14159" style="color: #000;"> <span v-if="scope.row.data == 3.14159" style="color: #000">暂无评估</span>
暂无评估
</span>
</template> </template>
</vxe-column> </vxe-column>
</vxe-table> </vxe-table>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
</div> </div>
@@ -196,7 +231,14 @@ const provinceDetailsRef = ref()
const rankingRef = ref() const rankingRef = ref()
const header = ref() const header = ref()
const options = dictData.getBasicData('Pollution_Statis', ['I_Neg', 'V_Inharm', 'V_Dev', 'V_Unbalance', 'Plt', 'Freq_Dev']) const options = dictData.getBasicData('Pollution_Statis', [
'I_Neg',
'V_Inharm',
'V_Dev',
'V_Unbalance',
'Plt',
'Freq_Dev'
])
const tableStore = new TableStore({ const tableStore = new TableStore({
url: '/harmonic-boot/PollutionSubstation/deptSubstationRelations', url: '/harmonic-boot/PollutionSubstation/deptSubstationRelations',
method: 'POST', method: 'POST',
@@ -204,10 +246,6 @@ const tableStore = new TableStore({
loadCallback: () => { loadCallback: () => {
histogram(tableStore.table.data) histogram(tableStore.table.data)
header.value.areaRef.change() header.value.areaRef.change()
} }
}) })
provide('tableStore', tableStore) provide('tableStore', tableStore)
@@ -219,9 +257,6 @@ tableStore.table.params.powerFlag = 2
tableStore.table.params.reportFlag = 3 tableStore.table.params.reportFlag = 3
tableStore.table.params.serverName = 'event-boot' tableStore.table.params.serverName = 'event-boot'
// 地图数处理 // 地图数处理
const rankingClick = () => { const rankingClick = () => {
rankingRef.value.open(tableStore.table.params) rankingRef.value.open(tableStore.table.params)
@@ -233,7 +268,7 @@ const queryline = (row: any, flag: boolean) => {
// 表格数据处理 // 表格数据处理
// 柱状图数据处理 // 柱状图数据处理
const histogram = (res: any) => { const histogram = (res: any) => {
console.log(123); console.log(123)
echartList.value = { echartList.value = {
title: { title: {
@@ -245,7 +280,23 @@ const histogram = (res: any) => {
var tips = '' var tips = ''
for (var i = 0; i < params.length; i++) { for (var i = 0; i < params.length; i++) {
tips += params[i].name + '</br/>' tips += params[i].name + '</br/>'
tips += '监测点数' + ':' + '&nbsp' + '&nbsp' + (params[i].value == 0.14159 ? '暂无数据' : params[i].value) + '</br/>' tips +=
'监测等级' +
':' +
'&nbsp' +
'&nbsp' +
(params[i].value == 0.14159
? '无污染'
: params[i].value < 1
? '无污染'
: params[i].value < 1.2
? '轻微污染'
: params[i].value < 1.6
? '轻度污染'
: params[i].value < 2
? '中度污染'
: '重度污染') +
'</br/>'
} }
return tips return tips
} }
@@ -282,14 +333,13 @@ const histogram = (res: any) => {
} }
return texts return texts
} }
}, }
}, },
options: { options: {
dataZoom: null, dataZoom: null,
series: [ series: [
{ {
type: 'bar', type: 'bar',
data: res.map((item: any) => { data: res.map((item: any) => {
return item.data == 3.14159 ? 0.14159 : item.data return item.data == 3.14159 ? 0.14159 : item.data
@@ -482,8 +532,7 @@ const histogram = (res: any) => {
} }
} }
] ]
}, }
} }
] ]
} }
@@ -514,7 +563,6 @@ const layout1 = mainHeight(93) as any
} }
:deep(.cardBox) { :deep(.cardBox) {
box-sizing: border-box; box-sizing: border-box;
overflow: auto; overflow: auto;
display: grid; display: grid;
@@ -527,8 +575,6 @@ const layout1 = mainHeight(93) as any
background-image: linear-gradient(var(--el-color-primary), var(--el-color-primary-light-3)); background-image: linear-gradient(var(--el-color-primary), var(--el-color-primary-light-3));
font-weight: bold; font-weight: bold;
.el-card__header { .el-card__header {
padding: 10px !important; padding: 10px !important;
color: #fff; color: #fff;
@@ -537,7 +583,6 @@ const layout1 = mainHeight(93) as any
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
} }
.el-card__body { .el-card__body {
@@ -557,7 +602,6 @@ const layout1 = mainHeight(93) as any
width: 50%; width: 50%;
display: flex; display: flex;
cursor: pointer; cursor: pointer;
} }
.xdf { .xdf {
@@ -573,11 +617,8 @@ const layout1 = mainHeight(93) as any
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
margin-left: 5px; margin-left: 5px;
}
} }
} }
}
} }
</style> </style>

View File

@@ -0,0 +1,301 @@
<template>
<div class="class-compopnents">
<!-- 容器用于放置所有课程分类 -->
<div class="class-container">
<!-- 循环生成可拖拽的课程分类 -->
<div
v-for="(item, index) in classTypeList"
class="class-type"
:key="index"
:style="{ 'background-color': item.color }"
:draggable="item.draggable"
@dragstart="onDragStart(index)"
@dragover.prevent="() => onDragOver(index)"
@dragend="onDragEnd"
:class="{ dragging: draggingIndex === index }"
>
{{ item.name }}
</div>
</div>
<div class="course-schedule-container">
<table>
<tbody>
<tr v-for="(item, index) in classScheduleCardList" :key="index">
<td
v-for="(v, i) in item.courseList"
:key="i"
:parentIndex="index"
@dragstart="e => tdDragStart(index, i, e)"
@dragover.prevent="e => tdDragOver(index, i, e)"
@dragleave="e => tdDragleave(index, i, e)"
@dragend="e => tdDragend(index, i, e)"
:draggable="v && v.draggable"
:style="{
'background-color': v ? v.color : '#fff',
width: '150px',
cursor: 'grab'
}"
>
<div class="course-name">
<span class="title notSelect">
{{ v ? v.name : '' }}
</span>
<div class="remove" v-if="v" @click.stop="() => remove(index, i)">+</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</template>
<script lang="ts" setup>
import { ref } from 'vue'
// 定义课程分类数据
const classTypeList = ref([
{ name: 'A1', color: '#8dedfb', draggable: true },
{ name: 'A2', color: '#f1957b', draggable: true },
{ name: 'A3', color: '#f6f1a9', draggable: true },
{ name: 'A4', color: '#8cdb27', draggable: true },
{ name: 'B1', color: '#d3dc28', draggable: true },
{ name: 'B2', color: '#e5b46f', draggable: true },
{ name: 'B3', color: '#656ef9', draggable: true },
{ name: 'B4', color: '#f6efa1', draggable: true }
])
const classScheduleCardList = ref<any>([
{
courseList: [null, null]
},
{
courseList: [null, null]
},
{
courseList: [null, null]
},
{
courseList: [null, null]
},
{
courseList: [null, null]
},
{
courseList: [null, null]
},
{
courseList: [null, null]
},
{
courseList: [null, null]
}
])
// 当前正在拖拽的元素索引
const draggingIndex = ref<number | null>(null)
// 拖拽开始:记录当前拖拽的索引
function onDragStart(index: number) {
draggingIndex.value = index
}
// 拖拽经过:动态调整拖拽顺序
function onDragOver(targetIndex: number) {
if (draggingIndex.value !== null && draggingIndex.value !== targetIndex) {
// 拖拽元素和目标位置互换
const draggedItem = classTypeList.value[draggingIndex.value]
classTypeList.value.splice(draggingIndex.value, 1) // 移除拖拽的元素
classTypeList.value.splice(targetIndex, 0, draggedItem) // 插入到目标位置
draggingIndex.value = targetIndex // 更新拖拽元素的当前索引
}
}
// 拖拽结束:清空拖拽状态
function onDragEnd() {
draggingIndex.value = null
currentTDinfo.value = null
processCourseData()
}
// 处理课程数据
function processCourseData() {
// 拖拽结束后, 将课程表进行处理,添加上 自定义删除的标识,避免其他元素移出后,将其置空
const list = JSON.parse(JSON.stringify(classScheduleCardList.value))
list.forEach((item: any) => {
item.courseList.forEach((v: any) => {
if (v) v.customDelete = true
})
})
classScheduleCardList.value = list
}
// 拖拽中的 td 元素
const dragingTdInfo = ref<any>(null)
// 移动到的 td 信息
const currentTDinfo = ref<any>(null)
// td 中开始拖拽拖拽
function tdDragStart(parentIndex: number, index: number, e: any) {
if (!classScheduleCardList.value[parentIndex].courseList[index]) return
const item = JSON.parse(JSON.stringify(classScheduleCardList.value[parentIndex].courseList[index]))
item.customDelete = false
dragingTdInfo.value = item
classScheduleCardList.value[parentIndex].courseList[index] = null
}
// 移动到 td 上触发
function tdDragOver(parentIndex: number, index: number, e: any) {
currentTDinfo.value = { parentIndex, index }
const currentTd = classScheduleCardList.value[parentIndex].courseList[index]
if (draggingIndex.value !== null && !currentTd) {
const draggedItem = classTypeList.value[draggingIndex.value]
// 将对应的课程数据 暂时 放入到td中
classScheduleCardList.value[parentIndex].courseList[index] = draggedItem
}
// td 中进行拖拽
if (dragingTdInfo.value && !currentTd) {
classScheduleCardList.value[parentIndex].courseList[index] = JSON.parse(JSON.stringify(dragingTdInfo.value))
}
}
// 课程在 td 上离开
function tdDragleave(parentIndex: number, index: number, event: any) {
// 检查 relatedTarget 是否在目标元素内
const relatedTarget = event.relatedTarget as HTMLElement
const isInside = relatedTarget?.closest('td') === event.currentTarget
if (!isInside) {
// 如果存在课程 return ,只有用户删除之后才可以添加新的课程
// 存在 customDelete 删除属性,只能用户主动删除才可以清空,其余情况 拖拽元素移出就 清空
const currentTd = classScheduleCardList.value[parentIndex].courseList[index]
// 从课程类型中拖拽到 td 中
if (draggingIndex.value !== null && currentTd && !currentTd.customDelete) {
classScheduleCardList.value[parentIndex].courseList[index] = null
}
// td 中进行拖拽
if (dragingTdInfo.value && !dragingTdInfo.value.customDelete && currentTd && !currentTd.customDelete) {
classScheduleCardList.value[parentIndex].courseList[index] = null
}
}
}
// td中拖拽课程结束
function tdDragend(parentIndex: number, index: number, e: any) {
const { parentIndex: currentParentIndex, index: currentIndex } = currentTDinfo.value
const currentTd = classScheduleCardList.value[currentParentIndex].courseList[currentIndex]
if (!currentTd) return
const isSameTd = currentParentIndex === parentIndex && currentIndex === index
const tdHasCourses = classScheduleCardList.value[currentParentIndex].courseList[currentIndex].customDelete
if (isSameTd || tdHasCourses) {
classScheduleCardList.value[parentIndex].courseList[index] = JSON.parse(JSON.stringify(dragingTdInfo.value))
}
dragingTdInfo.value = null
currentTDinfo.value = null
processCourseData()
}
// 删除
function remove(parentIndex: number, index: number) {
classScheduleCardList.value[parentIndex].courseList[index] = null
}
</script>
<style lang="scss" scoped>
.class-compopnents {
display: flex;
justify-content: flex-start;
}
.class-container {
display: flex;
flex-direction: column;
width: 120px;
margin-right: 20px;
}
.class-type {
width: 50px;
padding: 10px 10px;
border-radius: 10px;
margin-bottom: 10px;
text-align: center;
cursor: grab;
text-align: center;
user-select: none; /* 防止拖拽时选中文字 */
transition: transform 0.2s, background-color 0.2s;
&:hover {
transform: scale(1.05); /* 鼠标悬浮时的缩放效果 */
}
}
/* 正在拖拽的元素样式 */
.dragging {
opacity: 0.5;
transform: scale(1.1); /* 拖拽中的缩放效果 */
// background-color: #d3d3d3;
}
.class {
width: 100%;
height: 100%;
}
.course-schedule-container {
width: 100%;
height: 100%;
text-align: center;
}
table {
width: 300px;
border-radius: 10px;
}
.header-tr {
background-color: #f8f8f8;
color: #aaa;
}
.notSelect {
user-select: none;
}
.course-name {
width: 100%;
height: 100%;
position: relative;
.remove {
width: 20px;
height: 20px;
text-align: center;
line-height: 20px;
position: absolute;
top: -20px;
right: -20px;
font-size: 20px;
transform: rotate(45deg);
border-radius: 50%;
border: 1px solid #000;
cursor: pointer;
}
}
table,
th,
td {
border: 1px solid #ccc;
border-collapse: collapse; /* 消除双边框效果 */
transition: all 0.3s;
}
th,
td {
padding: 20px;
}
</style>

View File

@@ -8,6 +8,9 @@
<el-tab-pane label="终端在线率图表" name="2"> <el-tab-pane label="终端在线率图表" name="2">
<Echart /> <Echart />
</el-tab-pane> </el-tab-pane>
<!-- <el-tab-pane label="123" name="3">
<aaa />
</el-tab-pane> -->
</el-tabs> </el-tabs>
</div> </div>
</template> </template>
@@ -18,6 +21,7 @@ import { onMounted, reactive, ref, getCurrentInstance } from 'vue'
import { mainHeight } from '@/utils/layout' import { mainHeight } from '@/utils/layout'
import Table from './components/table.vue' import Table from './components/table.vue'
import Echart from './components/echart.vue' import Echart from './components/echart.vue'
import aaa from './components/123.vue'
defineOptions({ defineOptions({
name: 'harmonic-boot/area/OnlineRate' name: 'harmonic-boot/area/OnlineRate'
}) })

View File

@@ -12,7 +12,7 @@
<el-checkbox-group <el-checkbox-group
v-model="checkedVoltage" v-model="checkedVoltage"
@change="handleCheckedVoltageChange" @change="handleCheckedVoltageChange"
style="height: 72px; overflow-y: auto" style="height: 72px; overflow-y: auto;flex: 1"
> >
<el-checkbox v-for="(item, index) in grade" :label="item" :key="index">{{ item.name }}</el-checkbox> <el-checkbox v-for="(item, index) in grade" :label="item" :key="index">{{ item.name }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
@@ -30,7 +30,7 @@
<el-checkbox-group <el-checkbox-group
v-model="checkedSource" v-model="checkedSource"
@change="handleCheckedSourceChange" @change="handleCheckedSourceChange"
style="height: 72px; overflow-y: auto" style="height: 72px; overflow-y: auto;flex: 1"
> >
<el-checkbox v-for="(item, index) in type" :label="item" :key="index">{{ item.name }}</el-checkbox> <el-checkbox v-for="(item, index) in type" :label="item" :key="index">{{ item.name }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>

View File

@@ -1,98 +1,122 @@
<template> <template>
<div style='position: relative; height: 100%' v-loading='loading'> <div style="position: relative; height: 100%" v-loading="loading">
<div class="iconBox">
<div class='iconBox'> <div class="div">
<div class='div'> <img src="@/assets/jcd.png" alt="" />
<img src='@/assets/jcd.png' alt='' />
<span>变电站</span> <span>变电站</span>
</div> </div>
<div class='div'> <div class="div">
<img src='@/assets/rby.png' alt='' /> <img src="@/assets/rby.png" alt="" />
<span>热备用</span> <span>热备用</span>
</div> </div>
<div class='div'> <div class="div">
<img src='@/assets/ty.png' alt='' /> <img src="@/assets/ty.png" alt="" />
<span>停运</span> <span>停运</span>
</div> </div>
<div class='div'>投运</div> <div class="div">投运</div>
<div class='div' style='padding-left: 10px'> <div class="div" style="padding-left: 10px">
<span>通讯正常</span> <span>通讯正常</span>
</div> </div>
<div class='div' style='padding-left: 20px'> <div class="div" style="padding-left: 20px">
<img src='@/assets/txzcyzj.gif' alt='' /> <img src="@/assets/txzcyzj.gif" alt="" />
<span>有暂降</span> <span>有暂降</span>
</div> </div>
<div class='div' style='padding-left: 20px'> <div class="div" style="padding-left: 20px">
<img src='@/assets/txzcwzj.png' alt='' /> <img src="@/assets/txzcwzj.png" alt="" />
<span>无暂降</span> <span>无暂降</span>
</div> </div>
<div class='div' style='padding-left: 10px'> <div class="div" style="padding-left: 10px">
<span>通讯异常</span> <span>通讯异常</span>
</div> </div>
<div class='div' style='padding-left: 20px'> <div class="div" style="padding-left: 20px">
<img src='@/assets/txycyzj.gif' alt='' /> <img src="@/assets/txycyzj.gif" alt="" />
<span>有暂降</span> <span>有暂降</span>
</div> </div>
<div class='div' style='padding-left: 20px'> <div class="div" style="padding-left: 20px">
<img src='@/assets/txzdwzj.png' alt='' /> <img src="@/assets/txzdwzj.png" alt="" />
<span>无暂降</span> <span>无暂降</span>
</div> </div>
</div> </div>
<baidu-map class='bm-view' v-if="hackReset" :zoom='zoom' :map-click='false' :scroll-wheel-zoom='true' :center='center' <baidu-map
@ready='handler' @zoomend='syncCenterAndZoom' :dragging="true" > class="bm-view"
<bm-map-type :map-types="['BMAP_NORMAL_MAP', 'BMAP_HYBRID_MAP']" v-if="hackReset"
anchor='BMAP_ANCHOR_TOP_RIGHT'></bm-map-type> :zoom="zoom"
:map-click="false"
:scroll-wheel-zoom="true"
:center="center"
@ready="handler"
@zoomend="syncCenterAndZoom"
:dragging="true"
>
<bm-map-type
:map-types="['BMAP_NORMAL_MAP', 'BMAP_HYBRID_MAP']"
anchor="BMAP_ANCHOR_TOP_RIGHT"
></bm-map-type>
<!-- 线--> <!-- 线-->
<div v-if='zoom > 13'> <div v-if="zoom > 13">
<bm-polyline :path='path' v-for='(path, index) in polyline' :key='index'></bm-polyline> <bm-polyline :path="path" v-for="(path, index) in polyline" :key="index"></bm-polyline>
</div> </div>
<!-- 变电站--> <!-- 变电站-->
<template v-if='zoom > 13'> <template v-if="zoom > 13">
<bm-marker :position='path' v-for='path in siteList' :key='path.subId' :icon='path.icon' <bm-marker
@click='markerClick(path)'></bm-marker> :position="path"
v-for="path in siteList"
:key="path.subId"
:icon="path.icon"
@click="markerClick(path)"
></bm-marker>
</template> </template>
<!-- --> <!-- -->
<BmlMarkerClusterer maxZoom='12'> <BmlMarkerClusterer maxZoom="12">
<bm-marker :position='path' v-for='path in areaLineInfo' :key='path.lineId' :icon='path.icon' <bm-marker
@click='markerClick(path)'></bm-marker> :position="path"
v-for="path in areaLineInfo"
:key="path.lineId"
:icon="path.icon"
@click="markerClick(path)"
></bm-marker>
</BmlMarkerClusterer> </BmlMarkerClusterer>
<bm-marker :position='infoWindowPoint' :icon="{ url: '1', size: { width: 0, height: 0 } }"> <bm-marker :position="infoWindowPoint" :icon="{ url: '1', size: { width: 0, height: 0 } }">
<bm-info-window :show='infoWindowPoint.show' @close='infoWindowPoint.show = false'> <bm-info-window :show="infoWindowPoint.show" @close="infoWindowPoint.show = false">
<el-descriptions :title='infoWindowPoint.lineName' :column='1' v-if='infoWindowPoint.lineId'> <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.gdName }}</el-descriptions-item>
<el-descriptions-item label='变电站'>{{ infoWindowPoint.subName }}</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.voltageName }}</el-descriptions-item>
<el-descriptions-item label='网络参数'> <el-descriptions-item label="网络参数">
{{ infoWindowPoint.ip }} {{ infoWindowPoint.ip }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label='PT变化'>{{ infoWindowPoint.pt2 }}</el-descriptions-item> <el-descriptions-item label="PT变化">{{ infoWindowPoint.pt2 }}</el-descriptions-item>
<el-descriptions-item label='CT变化'>{{ infoWindowPoint.ct2 }}</el-descriptions-item> <el-descriptions-item label="CT变化">{{ infoWindowPoint.ct2 }}</el-descriptions-item>
<el-descriptions-item label='生产厂家'> <el-descriptions-item label="生产厂家">
{{ infoWindowPoint.manufacturer }} {{ infoWindowPoint.manufacturer }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label='终端状态'> <el-descriptions-item label="终端状态">
{{ {{
infoWindowPoint.runFlag == 0 ? '投运' : infoWindowPoint.runFlag == 1 ? '热备用' : '停运' infoWindowPoint.runFlag == 0 ? '投运' : infoWindowPoint.runFlag == 1 ? '热备用' : '停运'
}} }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label='通讯状态'> <el-descriptions-item label="通讯状态">
{{ infoWindowPoint.comFlag == 0 ? '中断' : '正常' }} {{ infoWindowPoint.comFlag == 0 ? '中断' : '正常' }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item v-if="props.showBut"> <el-descriptions-item v-if="props.showBut">
<el-button type='primary' size='small' @click='changeTab("2")'>事件统计</el-button> <el-button type="primary" size="small" @click="changeTab('2')">事件统计</el-button>
<el-button type='primary' size='small' @click='changeTab("3")'>事件分析</el-button> <el-button type="primary" size="small" @click="changeTab('3')">事件分析</el-button>
<el-button type='primary' size='small' @click='changeTab("4")'>运行情况</el-button> <el-button type="primary" size="small" @click="changeTab('4')">运行情况</el-button>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :title='infoWindowPoint.subName' :column='1' v-else-if='infoWindowPoint.subId' <el-descriptions
style='padding-top: 10px'></el-descriptions> :title="infoWindowPoint.subName"
:column="1"
v-else-if="infoWindowPoint.subId"
style="padding-top: 10px"
></el-descriptions>
</bm-info-window> </bm-info-window>
</bm-marker> </bm-marker>
</baidu-map> </baidu-map>
</div> </div>
</template> </template>
<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'
@@ -110,7 +134,6 @@ const props = withDefaults(defineProps<Props>(), {
mapList: [] mapList: []
}) })
const monitoringPoint = useMonitoringPoint() const monitoringPoint = useMonitoringPoint()
const adminInfo = useAdminInfo() const adminInfo = useAdminInfo()
const datePickerRef = ref() const datePickerRef = ref()
@@ -150,7 +173,6 @@ const handler = async ({ BMap, map }: any) => {
r = 0.01055 r = 0.01055
} }
item.children.forEach((val: any, i: number) => { item.children.forEach((val: any, i: number) => {
val.lng = item.lng + r * Math.cos((2 * Math.PI * i) / item.children.length) val.lng = item.lng + r * Math.cos((2 * Math.PI * i) / item.children.length)
val.lat = item.lat + r * Math.sin((2 * Math.PI * i) / item.children.length) val.lat = item.lat + r * Math.sin((2 * Math.PI * i) / item.children.length)
// 监测点图标 // 监测点图标
@@ -209,8 +231,8 @@ const handler = async ({ BMap, map }: any) => {
}) })
siteList.value = list siteList.value = list
center.value.lng = list[0].lng center.value.lng = list[0]?.lng || 0
center.value.lat = list[0].lat center.value.lat = list[0]?.lat || 0
watch( watch(
() => monitoringPoint.state.lineId, () => monitoringPoint.state.lineId,
(newLineId, oldLineId) => { (newLineId, oldLineId) => {
@@ -221,7 +243,10 @@ const handler = async ({ BMap, map }: any) => {
center.value.lat = value.lat center.value.lat = value.lat
infoWindowPoint.value = value infoWindowPoint.value = value
infoWindowPoint.value.show = true infoWindowPoint.value.show = true
monitoringPoint.setValue('lineName', value.manufacturer + '>' + value.gdName + '>' + value.subName + '>' + value.lineName) monitoringPoint.setValue(
'lineName',
value.manufacturer + '>' + value.gdName + '>' + value.subName + '>' + value.lineName
)
}, },
{ immediate: true } { immediate: true }
) )
@@ -245,17 +270,14 @@ onMounted(() => {
if (siteList.value.length == 0) { if (siteList.value.length == 0) {
setTimeout(() => { setTimeout(() => {
hackReset.value = false hackReset.value = false
}, 1000) }, 1000)
setTimeout(() => { setTimeout(() => {
hackReset.value = true hackReset.value = true
}, 2000) }, 2000)
} }
}) })
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.bm-view { .bm-view {
width: 100%; width: 100%;
height: 100%; height: 100%;

View File

@@ -1,87 +1,117 @@
<template> <template>
<div style='padding: 10px; display: flex; height: 100%' v-loading='loading'> <div style="padding: 10px; display: flex; height: 100%" v-loading="loading">
<div style='position: relative; flex: 1'> <div style="position: relative; flex: 1">
<div style='display: none'> <div style="display: none">
<DatePicker ref='datePickerRef'></DatePicker> <DatePicker ref="datePickerRef"></DatePicker>
</div> </div>
<div class='iconBox'> <div class="iconBox">
<div class='div'> <div class="div">
<img src='@/assets/jcd.png' alt='' /> <img src="@/assets/jcd.png" alt="" />
<span>变电站</span> <span>变电站</span>
</div> </div>
<div class='div'> <div class="div">
<img src='@/assets/rby.png' alt='' /> <img src="@/assets/rby.png" alt="" />
<span>热备用</span> <span>热备用</span>
</div> </div>
<div class='div'> <div class="div">
<img src='@/assets/ty.png' alt='' /> <img src="@/assets/ty.png" alt="" />
<span>停运</span> <span>停运</span>
</div> </div>
<div class='div'>投运</div> <div class="div">投运</div>
<div class='div' style='padding-left: 10px'> <div class="div" style="padding-left: 10px">
<span>通讯正常</span> <span>通讯正常</span>
</div> </div>
<div class='div' style='padding-left: 20px'> <div class="div" style="padding-left: 20px">
<img src='@/assets/txzcyzj.gif' alt='' /> <img src="@/assets/txzcyzj.gif" alt="" />
<span>有暂降</span> <span>有暂降</span>
</div> </div>
<div class='div' style='padding-left: 20px'> <div class="div" style="padding-left: 20px">
<img src='@/assets/txzcwzj.png' alt='' /> <img src="@/assets/txzcwzj.png" alt="" />
<span>无暂降</span> <span>无暂降</span>
</div> </div>
<div class='div' style='padding-left: 10px'> <div class="div" style="padding-left: 10px">
<span>通讯异常</span> <span>通讯异常</span>
</div> </div>
<div class='div' style='padding-left: 20px'> <div class="div" style="padding-left: 20px">
<img src='@/assets/txycyzj.gif' alt='' /> <img src="@/assets/txycyzj.gif" alt="" />
<span>有暂降</span> <span>有暂降</span>
</div> </div>
<div class='div' style='padding-left: 20px'> <div class="div" style="padding-left: 20px">
<img src='@/assets/txzdwzj.png' alt='' /> <img src="@/assets/txzdwzj.png" alt="" />
<span>无暂降</span> <span>无暂降</span>
</div> </div>
</div> </div>
<div class='selectBox'> <div class="selectBox">
<el-select @change='pointChange' :popper-append-to-body='false' filterable clearable v-model='lineId' <el-select
placeholder='输入监测点名称查询'> @change="pointChange"
<el-option v-for='item in areaLineInfo' :key='item.lineId' :label='item.lineName' :popper-append-to-body="false"
:value='item.lineId'></el-option> filterable
clearable
v-model="lineId"
placeholder="输入监测点名称查询"
>
<el-option
v-for="item in areaLineInfo"
:key="item.lineId"
:label="item.lineName"
:value="item.lineId"
></el-option>
</el-select> </el-select>
</div> </div>
<baidu-map class='bm-view' v-if="hackReset" :zoom='zoom' :map-click='false' :scroll-wheel-zoom='true' <baidu-map
:center='center' @ready='handler' :dragging="true" @zoomend='syncCenterAndZoom'> class="bm-view"
<bm-map-type :map-types="['BMAP_NORMAL_MAP', 'BMAP_HYBRID_MAP']" v-if="hackReset"
anchor='BMAP_ANCHOR_TOP_RIGHT'></bm-map-type> :zoom="zoom"
:map-click="false"
:scroll-wheel-zoom="true"
:center="center"
@ready="handler"
:dragging="true"
@zoomend="syncCenterAndZoom"
>
<bm-map-type
:map-types="['BMAP_NORMAL_MAP', 'BMAP_HYBRID_MAP']"
anchor="BMAP_ANCHOR_TOP_RIGHT"
></bm-map-type>
<!-- 线--> <!-- 线-->
<div v-if='zoom > 13'> <div v-if="zoom > 13">
<bm-polyline :path='path' v-for='(path, index) in polyline' :key='index'></bm-polyline> <bm-polyline :path="path" v-for="(path, index) in polyline" :key="index"></bm-polyline>
</div> </div>
<!-- 变电站--> <!-- 变电站-->
<template v-if='zoom > 13'> <template v-if="zoom > 13">
<bm-marker :position='path' v-for='path in siteList' :key='path.subId' :icon='path.icon' <bm-marker
@click='markerClick(path)'></bm-marker> :position="path"
v-for="path in siteList"
:key="path.subId"
:icon="path.icon"
@click="markerClick(path)"
></bm-marker>
</template> </template>
<!-- --> <!-- -->
<BmlMarkerClusterer maxZoom='12'> <BmlMarkerClusterer maxZoom="12">
<bm-marker :position='path' v-for='path in areaLineInfo' :key='path.lineId' :icon='path.icon' <bm-marker
@click='markerClick(path)'></bm-marker> :position="path"
v-for="path in areaLineInfo"
:key="path.lineId"
:icon="path.icon"
@click="markerClick(path)"
></bm-marker>
</BmlMarkerClusterer> </BmlMarkerClusterer>
<bm-marker :position='infoWindowPoint' :icon="{ url: '1', size: { width: 0, height: 0 } }"> <bm-marker :position="infoWindowPoint" :icon="{ url: '1', size: { width: 0, height: 0 } }">
<bm-info-window :show='infoWindowPoint.show' @close='infoWindowPoint.show = false'> <bm-info-window :show="infoWindowPoint.show" @close="infoWindowPoint.show = false">
<el-descriptions :title='infoWindowPoint.lineName' :column='1' v-if='infoWindowPoint.lineId'> <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.gdName }}</el-descriptions-item>
<el-descriptions-item label='变电站'>{{ infoWindowPoint.subName }}</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.voltageName }}</el-descriptions-item>
<el-descriptions-item label='网络参数'> <el-descriptions-item label="网络参数">
{{ infoWindowPoint.ip }} {{ infoWindowPoint.ip }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label='PT变化'>{{ infoWindowPoint.pt2 }}</el-descriptions-item> <el-descriptions-item label="PT变化">{{ infoWindowPoint.pt2 }}</el-descriptions-item>
<el-descriptions-item label='CT变化'>{{ infoWindowPoint.ct2 }}</el-descriptions-item> <el-descriptions-item label="CT变化">{{ infoWindowPoint.ct2 }}</el-descriptions-item>
<el-descriptions-item label='生产厂家'> <el-descriptions-item label="生产厂家">
{{ infoWindowPoint.manufacturer }} {{ infoWindowPoint.manufacturer }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label='终端状态'> <el-descriptions-item label="终端状态">
{{ {{
infoWindowPoint.runFlag == 0 infoWindowPoint.runFlag == 0
? '投运' ? '投运'
@@ -90,30 +120,34 @@
: '停运' : '停运'
}} }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label='通讯状态'> <el-descriptions-item label="通讯状态">
{{ infoWindowPoint.comFlag == 0 ? '中断' : '正常' }} {{ infoWindowPoint.comFlag == 0 ? '中断' : '正常' }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item> <el-descriptions-item>
<el-button type='primary' size='small' @click='lookPoint'>查看监测点</el-button> <el-button type="primary" size="small" @click="lookPoint">查看监测点</el-button>
<el-button type='primary' size='small' @click='lookEvent'> <el-button type="primary" size="small" @click="lookEvent">
未处理事件({{ infoWindowPoint.noDealCount }}) 未处理事件({{ infoWindowPoint.noDealCount }})
</el-button> </el-button>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-descriptions :title='infoWindowPoint.subName' :column='1' v-else-if='infoWindowPoint.subId' <el-descriptions
style='padding-top: 10px'></el-descriptions> :title="infoWindowPoint.subName"
:column="1"
v-else-if="infoWindowPoint.subId"
style="padding-top: 10px"
></el-descriptions>
</bm-info-window> </bm-info-window>
</bm-marker> </bm-marker>
</baidu-map> </baidu-map>
</div> </div>
<div style='width: 600px; height: 100%'> <div style="width: 600px; height: 100%">
<Right :params='params' v-if='params.deptIndex'></Right> <Right :params="params" v-if="params.deptIndex"></Right>
</div> </div>
<PopupEvent ref='popupEvent'></PopupEvent> <PopupEvent ref="popupEvent"></PopupEvent>
</div> </div>
</template> </template>
<script setup lang='ts'> <script setup lang="ts">
import { BmlMarkerClusterer } from 'vue-baidu-map-3x' import { BmlMarkerClusterer } from 'vue-baidu-map-3x'
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import { mainHeight } from '@/utils/layout' import { mainHeight } from '@/utils/layout'
@@ -238,9 +272,10 @@ const handler = async ({ BMap, map }: any) => {
loading.value = false loading.value = false
}, 0) }, 0)
siteList.value = list siteList.value = list
center.value.lng = areaLineInfo.value[0].lng center.value.lng = areaLineInfo.value[0]?.lng || 0
center.value.lat = areaLineInfo.value[0].lat center.value.lat = areaLineInfo.value[0]?.lat || 0
infoWindowPoint.value = areaLineInfo.value[0]
infoWindowPoint.value = areaLineInfo.value[0] || {}
infoWindowPoint.value.show = true infoWindowPoint.value.show = true
zoom.value = 13 zoom.value = 13
setTimeout(() => { setTimeout(() => {
@@ -254,6 +289,7 @@ const syncCenterAndZoom = (e: any) => {
const pointChange = (val: string) => { const pointChange = (val: string) => {
if (!val) return if (!val) return
let data = areaLineInfo.value.find((item: any) => item.lineId == val) let data = areaLineInfo.value.find((item: any) => item.lineId == val)
center.value.lng = data.lng center.value.lng = data.lng
center.value.lat = data.lat center.value.lat = data.lat
infoWindowPoint.value = data infoWindowPoint.value = data
@@ -277,8 +313,14 @@ const lookPoint = () => {
name: 'Descentsystem/monitoringpoint', name: 'Descentsystem/monitoringpoint',
query: { query: {
lineId: infoWindowPoint.value.lineId, lineId: infoWindowPoint.value.lineId,
lineName: infoWindowPoint.value.manufacturer + '>' + infoWindowPoint.value.gdName + '>' + infoWindowPoint.value.subName + '>' + infoWindowPoint.value.lineName lineName:
infoWindowPoint.value.manufacturer +
'>' +
infoWindowPoint.value.gdName +
'>' +
infoWindowPoint.value.subName +
'>' +
infoWindowPoint.value.lineName
} }
}) })
} }
@@ -288,18 +330,14 @@ onMounted(() => {
if (window.localStorage.getItem('BMAP_SECKEY') == null) { if (window.localStorage.getItem('BMAP_SECKEY') == null) {
hackReset.value = false hackReset.value = false
} }
}, 1000) }, 1000)
setTimeout(() => { setTimeout(() => {
hackReset.value = true hackReset.value = true
}, 2000) }, 2000)
} }
}) })
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.bm-view { .bm-view {
width: 100%; width: 100%;
height: 100%; height: 100%;