联调台账变更推送
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 获取区域中断终端
|
||||
export function getTerminalTreeForFive(data:any) {
|
||||
export function getTerminalTreeForFive(data: any) {
|
||||
return request({
|
||||
url: '/device-boot/terminalTree/getTerminalTreeForFive',
|
||||
method: 'post',
|
||||
data: data,
|
||||
data: data
|
||||
})
|
||||
}
|
||||
}
|
||||
// 台账变更推送
|
||||
export function ledgerChangePush() {
|
||||
return request({
|
||||
url: '/device-boot/device/ledgerChangePush',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button type="primary" icon="el-icon-Sort" @click="changePush">台账变更推送</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef"></Table>
|
||||
</div>
|
||||
@@ -22,6 +25,8 @@ import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { ledgerChangePush } from '@/api/device-boot/terminalTree'
|
||||
defineOptions({
|
||||
name: 'BusinessAdministrator/LogManagement/TerminalLog'
|
||||
})
|
||||
@@ -41,11 +46,14 @@ const tableStore = new TableStore({
|
||||
}
|
||||
},
|
||||
// { title: '名称', field: 'name', width: '200' },
|
||||
{ title: '日志类型', field: 'logsType', width: '250',
|
||||
{
|
||||
title: '日志类型',
|
||||
field: 'logsType',
|
||||
width: '250',
|
||||
formatter: (row: any) => {
|
||||
return fontdveoption.find((item: any) => item.id == row.cellValue)?.name
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: '更改人员',
|
||||
@@ -62,6 +70,21 @@ const tableStore = new TableStore({
|
||||
],
|
||||
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.searchValue = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
@@ -124,7 +124,6 @@
|
||||
<el-tag v-if="row.comFlag === 1" type="success" size="small">正常</el-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
|
||||
<vxe-column title="操作" width="160">
|
||||
<template #default="{ row }">
|
||||
<!-- <el-button v-if="row.level === 4" type="primary" size="small" link @click="uesdealia(row)">
|
||||
|
||||
@@ -2514,7 +2514,7 @@ const queryNodeContent = () => {
|
||||
return
|
||||
}
|
||||
|
||||
if (nodeData.value.plevel == 6) {
|
||||
if (nodeData.value.level>= 400) {
|
||||
setDown()
|
||||
}
|
||||
let data = {
|
||||
|
||||
@@ -3,107 +3,149 @@
|
||||
<TableHeader datePicker ref="header">
|
||||
<template v-slot:select>
|
||||
<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-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-DataAnalysis"
|
||||
@click="rankingClick(null, true)">排名前10监测点</el-button>
|
||||
<el-button type="primary" icon="el-icon-DataAnalysis" @click="rankingClick(null, true)">
|
||||
排名前10监测点
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<div v-loading="tableStore.table.loading" class="pr10">
|
||||
<el-row>
|
||||
<el-col :span="12" class="pd10">
|
||||
<el-tag style="background: #339966;" class="tag" size="small">1级</el-tag>
|
||||
<span style="color: #339966;" class="text">:无污染(0,1]</span>
|
||||
<el-tag style="background: #3399ff;" class="tag" size="small">2级</el-tag>
|
||||
<span style="color: #3399ff;" class="text">:轻微污染(1,1.2]</span>
|
||||
<el-tag style="background: #ffcc33;" class="tag" size="small">3级</el-tag>
|
||||
<span style="color: #ffcc33;" class="text">:轻度污染(1.2,1.6]</span>
|
||||
<el-tag style="background: #ff9900;" class="tag" size="small">4级</el-tag>
|
||||
<span style="color: #ff9900;" class="text">:中度污染(1.6,2]</span>
|
||||
<el-tag style="background: #cc0000;" class="tag" size="small">5级</el-tag>
|
||||
<span style="color: #cc0000;" class="text">:重度污染(2,+∞)</span>
|
||||
<el-tag style="background: #339966" class="tag" size="small">1级</el-tag>
|
||||
<span style="color: #339966" class="text">:无污染(0,1]</span>
|
||||
<el-tag style="background: #3399ff" class="tag" size="small">2级</el-tag>
|
||||
<span style="color: #3399ff" class="text">:轻微污染(1,1.2]</span>
|
||||
<el-tag style="background: #ffcc33" class="tag" size="small">3级</el-tag>
|
||||
<span style="color: #ffcc33" class="text">:轻度污染(1.2,1.6]</span>
|
||||
<el-tag style="background: #ff9900" class="tag" size="small">4级</el-tag>
|
||||
<span style="color: #ff9900" class="text">:中度污染(1.6,2]</span>
|
||||
<el-tag style="background: #cc0000" class="tag" size="small">5级</el-tag>
|
||||
<span style="color: #cc0000" class="text">:重度污染(2,+∞)</span>
|
||||
<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">
|
||||
<template #header>
|
||||
<div style="cursor: pointer;" @click="queryline(item, false)">
|
||||
<el-tag v-if="item.data == 3.14159 || item.data == 0"
|
||||
style="background: #ccc; color: #fff" size="small">
|
||||
<div style="cursor: pointer" @click="queryline(item, false)">
|
||||
<el-tag
|
||||
v-if="item.data == 3.14159 || item.data == 0"
|
||||
style="background: #ccc; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
无
|
||||
</el-tag>
|
||||
<el-tag v-if="0 < item.data && item.data < 1 && item.data !== 3.14159"
|
||||
style="background: #339966; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="0 < item.data && item.data < 1 && item.data !== 3.14159"
|
||||
style="background: #339966; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
1级
|
||||
</el-tag>
|
||||
<el-tag v-if="1 <= item.data && item.data < 1.2 && item.data !== 3.14159"
|
||||
style="background: #3399ff; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="1 <= item.data && item.data < 1.2 && item.data !== 3.14159"
|
||||
style="background: #3399ff; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
2级
|
||||
</el-tag>
|
||||
<el-tag v-if="1.2 <= item.data && item.data < 1.6 && item.data !== 3.14159"
|
||||
style="background: #ffcc33; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="1.2 <= item.data && item.data < 1.6 && item.data !== 3.14159"
|
||||
style="background: #ffcc33; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
3级
|
||||
</el-tag>
|
||||
<el-tag v-if="1.6 <= item.data && item.data < 2 && item.data !== 3.14159"
|
||||
style="background: #ff9900; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="1.6 <= item.data && item.data < 2 && item.data !== 3.14159"
|
||||
style="background: #ff9900; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
4级
|
||||
</el-tag>
|
||||
<el-tag v-if="2 <= item.data && item.data && item.data !== 3.14159"
|
||||
style="background: #cc0000; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="2 <= item.data && item.data && item.data !== 3.14159"
|
||||
style="background: #cc0000; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
5级
|
||||
</el-tag>
|
||||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
<div class="card-content">
|
||||
<div class="card-item" v-for="(item1, index1) in item.children" :key="index1"
|
||||
@click="queryline(item1, true)">
|
||||
<el-tag v-if="item1.data == 3.14159 || item1.data == 0"
|
||||
style="background: #ccc; color: #fff" size="small">
|
||||
<div
|
||||
class="card-item"
|
||||
v-for="(item1, index1) in item.children"
|
||||
: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 v-if="0 < item1.data && item1.data < 1 && item1.data !== 3.14159"
|
||||
style="background: #339966; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="0 < item1.data && item1.data < 1 && item1.data !== 3.14159"
|
||||
style="background: #339966; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
1级
|
||||
</el-tag>
|
||||
<el-tag v-if="1 <= item1.data && item1.data < 1.2 && item1.data !== 3.14159"
|
||||
style="background: #3399ff; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="1 <= item1.data && item1.data < 1.2 && item1.data !== 3.14159"
|
||||
style="background: #3399ff; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
2级
|
||||
</el-tag>
|
||||
<el-tag v-if="1.2 <= item1.data && item1.data < 1.6 && item1.data !== 3.14159"
|
||||
style="background: #ffcc33; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="1.2 <= item1.data && item1.data < 1.6 && item1.data !== 3.14159"
|
||||
style="background: #ffcc33; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
3级
|
||||
</el-tag>
|
||||
<el-tag v-if="1.6 <= item1.data && item1.data < 2 && item1.data !== 3.14159"
|
||||
style="background: #ff9900; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="1.6 <= item1.data && item1.data < 2 && item1.data !== 3.14159"
|
||||
style="background: #ff9900; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
4级
|
||||
</el-tag>
|
||||
<el-tag v-if="2 <= item1.data && item1.data && item1.data !== 3.14159"
|
||||
style="background: #cc0000; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="2 <= item1.data && item1.data && item1.data !== 3.14159"
|
||||
style="background: #cc0000; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
5级
|
||||
</el-tag>
|
||||
<span class="xdf">
|
||||
<el-tooltip :show-arrow="false" :offset="-0" :content="item1.name"
|
||||
popper-class="atooltip" placement="bottom-start">
|
||||
|
||||
<el-tooltip
|
||||
:show-arrow="false"
|
||||
:offset="-0"
|
||||
:content="item1.name"
|
||||
popper-class="atooltip"
|
||||
placement="bottom-start"
|
||||
>
|
||||
<div class="tooltipText">
|
||||
{{ item1.name }}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -111,61 +153,54 @@
|
||||
<my-echart class="tall" :options="echartList" />
|
||||
<div class="tall">
|
||||
<vxe-table height="auto" auto-resize :data="tableStore.table.data" v-bind="defaultAttribute">
|
||||
|
||||
<vxe-column field="name" title="名称"></vxe-column>
|
||||
<vxe-column field="zc" title="污染值">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.data == 3.14159" style="color: #000;">
|
||||
暂无数据
|
||||
</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 v-if="scope.row.data !== 3.14159" style="color: #000">
|
||||
{{ scope.row.data }}
|
||||
</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="zd" title="评估">
|
||||
<template #default="scope">
|
||||
<span v-if="
|
||||
0 <= scope.row.data &&
|
||||
scope.row.data < 1 &&
|
||||
scope.row.data !== 3.14159
|
||||
" style=" font-weight: bold;color: #339966;">
|
||||
<span
|
||||
v-if="0 <= scope.row.data && scope.row.data < 1 && scope.row.data !== 3.14159"
|
||||
style="font-weight: bold; color: #339966"
|
||||
>
|
||||
无污染
|
||||
</span>
|
||||
<span v-if="
|
||||
1 <= scope.row.data &&
|
||||
scope.row.data < 1.2 &&
|
||||
scope.row.data !== 3.14159
|
||||
" style=" font-weight: bold;color: #3399ff;">
|
||||
<span
|
||||
v-if="1 <= scope.row.data && scope.row.data < 1.2 && scope.row.data !== 3.14159"
|
||||
style="font-weight: bold; color: #3399ff"
|
||||
>
|
||||
轻微污染
|
||||
</span>
|
||||
<span v-if="
|
||||
1.2 <= scope.row.data &&
|
||||
scope.row.data < 1.6 &&
|
||||
scope.row.data !== 3.14159
|
||||
" style=" font-weight: bold;color: #ffcc33;">
|
||||
<span
|
||||
v-if="
|
||||
1.2 <= scope.row.data && scope.row.data < 1.6 && scope.row.data !== 3.14159
|
||||
"
|
||||
style="font-weight: bold; color: #ffcc33"
|
||||
>
|
||||
轻度污染
|
||||
</span>
|
||||
<span v-if="
|
||||
1.6 <= scope.row.data &&
|
||||
scope.row.data < 2 &&
|
||||
scope.row.data !== 3.14159
|
||||
" style=" font-weight: bold;color: #ff9900;">
|
||||
<span
|
||||
v-if="1.6 <= scope.row.data && scope.row.data < 2 && scope.row.data !== 3.14159"
|
||||
style="font-weight: bold; color: #ff9900"
|
||||
>
|
||||
中度污染
|
||||
</span>
|
||||
<span v-if="
|
||||
2 <= scope.row.data && scope.row.data && scope.row.data !== 3.14159
|
||||
" style=" font-weight: bold;color: #cc0000;">
|
||||
<span
|
||||
v-if="2 <= scope.row.data && scope.row.data && scope.row.data !== 3.14159"
|
||||
style="font-weight: bold; color: #cc0000"
|
||||
>
|
||||
重度污染
|
||||
</span>
|
||||
<span v-if="scope.row.data == 3.14159" style="color: #000;">
|
||||
暂无评估
|
||||
</span>
|
||||
<span v-if="scope.row.data == 3.14159" style="color: #000">暂无评估</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@@ -196,7 +231,14 @@ const provinceDetailsRef = ref()
|
||||
const rankingRef = 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({
|
||||
url: '/harmonic-boot/PollutionSubstation/deptSubstationRelations',
|
||||
method: 'POST',
|
||||
@@ -204,10 +246,6 @@ const tableStore = new TableStore({
|
||||
loadCallback: () => {
|
||||
histogram(tableStore.table.data)
|
||||
header.value.areaRef.change()
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
@@ -219,9 +257,6 @@ tableStore.table.params.powerFlag = 2
|
||||
tableStore.table.params.reportFlag = 3
|
||||
tableStore.table.params.serverName = 'event-boot'
|
||||
|
||||
|
||||
|
||||
|
||||
// 地图数处理
|
||||
const rankingClick = () => {
|
||||
rankingRef.value.open(tableStore.table.params)
|
||||
@@ -233,7 +268,7 @@ const queryline = (row: any, flag: boolean) => {
|
||||
// 表格数据处理
|
||||
// 柱状图数据处理
|
||||
const histogram = (res: any) => {
|
||||
console.log(123);
|
||||
console.log(123)
|
||||
|
||||
echartList.value = {
|
||||
title: {
|
||||
@@ -245,7 +280,23 @@ const histogram = (res: any) => {
|
||||
var tips = ''
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
tips += params[i].name + '</br/>'
|
||||
tips += '监测点数' + ':' + ' ' + ' ' + (params[i].value == 0.14159 ? '暂无数据' : params[i].value) + '</br/>'
|
||||
tips +=
|
||||
'监测等级' +
|
||||
':' +
|
||||
' ' +
|
||||
' ' +
|
||||
(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
|
||||
}
|
||||
@@ -256,7 +307,7 @@ const histogram = (res: any) => {
|
||||
data: res.map((item: any) => item.name)
|
||||
},
|
||||
yAxis: {
|
||||
name: '等级',// 给X轴加单位
|
||||
name: '等级', // 给X轴加单位
|
||||
min: 0,
|
||||
max: 2,
|
||||
interval: 0.2,
|
||||
@@ -282,14 +333,13 @@ const histogram = (res: any) => {
|
||||
}
|
||||
return texts
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
options: {
|
||||
dataZoom: null,
|
||||
series: [
|
||||
{
|
||||
|
||||
type: 'bar',
|
||||
data: res.map((item: any) => {
|
||||
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) {
|
||||
|
||||
box-sizing: border-box;
|
||||
overflow: auto;
|
||||
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));
|
||||
font-weight: bold;
|
||||
|
||||
|
||||
|
||||
.el-card__header {
|
||||
padding: 10px !important;
|
||||
color: #fff;
|
||||
@@ -537,7 +583,6 @@ const layout1 = mainHeight(93) as any
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.el-card__body {
|
||||
@@ -557,7 +602,6 @@ const layout1 = mainHeight(93) as any
|
||||
width: 50%;
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.xdf {
|
||||
@@ -573,11 +617,8 @@ const layout1 = mainHeight(93) as any
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-left: 5px;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -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>
|
||||
@@ -8,6 +8,9 @@
|
||||
<el-tab-pane label="终端在线率图表" name="2">
|
||||
<Echart />
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="123" name="3">
|
||||
<aaa />
|
||||
</el-tab-pane> -->
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
@@ -18,6 +21,7 @@ import { onMounted, reactive, ref, getCurrentInstance } from 'vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import Table from './components/table.vue'
|
||||
import Echart from './components/echart.vue'
|
||||
import aaa from './components/123.vue'
|
||||
defineOptions({
|
||||
name: 'harmonic-boot/area/OnlineRate'
|
||||
})
|
||||
|
||||
@@ -75,7 +75,7 @@ const tableStore = new TableStore({
|
||||
field: 'testRunState',
|
||||
title: '试运行状态',
|
||||
minWidth: 100,
|
||||
render: 'tag',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'primary',
|
||||
2: 'success',
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<el-checkbox-group
|
||||
v-model="checkedVoltage"
|
||||
@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-group>
|
||||
@@ -30,7 +30,7 @@
|
||||
<el-checkbox-group
|
||||
v-model="checkedSource"
|
||||
@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-group>
|
||||
|
||||
@@ -1,98 +1,122 @@
|
||||
<template>
|
||||
<div style='position: relative; height: 100%' v-loading='loading'>
|
||||
|
||||
<div class='iconBox'>
|
||||
<div class='div'>
|
||||
<img src='@/assets/jcd.png' alt='' />
|
||||
<div style="position: relative; height: 100%" v-loading="loading">
|
||||
<div class="iconBox">
|
||||
<div class="div">
|
||||
<img src="@/assets/jcd.png" alt="" />
|
||||
<span>变电站</span>
|
||||
</div>
|
||||
<div class='div'>
|
||||
<img src='@/assets/rby.png' alt='' />
|
||||
<div class="div">
|
||||
<img src="@/assets/rby.png" alt="" />
|
||||
<span>热备用</span>
|
||||
</div>
|
||||
<div class='div'>
|
||||
<img src='@/assets/ty.png' alt='' />
|
||||
<div class="div">
|
||||
<img src="@/assets/ty.png" alt="" />
|
||||
<span>停运</span>
|
||||
</div>
|
||||
<div class='div'>投运</div>
|
||||
<div class='div' style='padding-left: 10px'>
|
||||
<div class="div">投运</div>
|
||||
<div class="div" style="padding-left: 10px">
|
||||
<span>通讯正常</span>
|
||||
</div>
|
||||
<div class='div' style='padding-left: 20px'>
|
||||
<img src='@/assets/txzcyzj.gif' alt='' />
|
||||
<div class="div" style="padding-left: 20px">
|
||||
<img src="@/assets/txzcyzj.gif" alt="" />
|
||||
<span>有暂降</span>
|
||||
</div>
|
||||
<div class='div' style='padding-left: 20px'>
|
||||
<img src='@/assets/txzcwzj.png' alt='' />
|
||||
<div class="div" style="padding-left: 20px">
|
||||
<img src="@/assets/txzcwzj.png" alt="" />
|
||||
<span>无暂降</span>
|
||||
</div>
|
||||
<div class='div' style='padding-left: 10px'>
|
||||
<div class="div" style="padding-left: 10px">
|
||||
<span>通讯异常</span>
|
||||
</div>
|
||||
<div class='div' style='padding-left: 20px'>
|
||||
<img src='@/assets/txycyzj.gif' alt='' />
|
||||
<div class="div" style="padding-left: 20px">
|
||||
<img src="@/assets/txycyzj.gif" alt="" />
|
||||
<span>有暂降</span>
|
||||
</div>
|
||||
<div class='div' style='padding-left: 20px'>
|
||||
<img src='@/assets/txzdwzj.png' alt='' />
|
||||
<div class="div" style="padding-left: 20px">
|
||||
<img src="@/assets/txzdwzj.png" alt="" />
|
||||
<span>无暂降</span>
|
||||
</div>
|
||||
</div>
|
||||
<baidu-map class='bm-view' v-if="hackReset" :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>
|
||||
<baidu-map
|
||||
class="bm-view"
|
||||
v-if="hackReset"
|
||||
: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'>
|
||||
<bm-polyline :path='path' v-for='(path, index) in polyline' :key='index'></bm-polyline>
|
||||
<div v-if="zoom > 13">
|
||||
<bm-polyline :path="path" v-for="(path, index) in polyline" :key="index"></bm-polyline>
|
||||
</div>
|
||||
<!-- 变电站-->
|
||||
<template v-if='zoom > 13'>
|
||||
<bm-marker :position='path' v-for='path in siteList' :key='path.subId' :icon='path.icon'
|
||||
@click='markerClick(path)'></bm-marker>
|
||||
<template v-if="zoom > 13">
|
||||
<bm-marker
|
||||
:position="path"
|
||||
v-for="path in siteList"
|
||||
:key="path.subId"
|
||||
:icon="path.icon"
|
||||
@click="markerClick(path)"
|
||||
></bm-marker>
|
||||
</template>
|
||||
<!-- 点 -->
|
||||
<BmlMarkerClusterer maxZoom='12'>
|
||||
<bm-marker :position='path' v-for='path in areaLineInfo' :key='path.lineId' :icon='path.icon'
|
||||
@click='markerClick(path)'></bm-marker>
|
||||
<BmlMarkerClusterer maxZoom="12">
|
||||
<bm-marker
|
||||
:position="path"
|
||||
v-for="path in areaLineInfo"
|
||||
:key="path.lineId"
|
||||
:icon="path.icon"
|
||||
@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='网络参数'>
|
||||
<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.pt2 }}</el-descriptions-item>
|
||||
<el-descriptions-item label='CT变化'>{{ infoWindowPoint.ct2 }}</el-descriptions-item>
|
||||
<el-descriptions-item label='生产厂家'>
|
||||
<el-descriptions-item label="PT变化">{{ infoWindowPoint.pt2 }}</el-descriptions-item>
|
||||
<el-descriptions-item label="CT变化">{{ infoWindowPoint.ct2 }}</el-descriptions-item>
|
||||
<el-descriptions-item label="生产厂家">
|
||||
{{ infoWindowPoint.manufacturer }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label='终端状态'>
|
||||
<el-descriptions-item label="终端状态">
|
||||
{{
|
||||
infoWindowPoint.runFlag == 0 ? '投运' : infoWindowPoint.runFlag == 1 ? '热备用' : '停运'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label='通讯状态'>
|
||||
<el-descriptions-item label="通讯状态">
|
||||
{{ infoWindowPoint.comFlag == 0 ? '中断' : '正常' }}
|
||||
</el-descriptions-item>
|
||||
<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("3")'>事件分析</el-button>
|
||||
<el-button type='primary' size='small' @click='changeTab("4")'>运行情况</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('4')">运行情况</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>
|
||||
<el-descriptions
|
||||
:title="infoWindowPoint.subName"
|
||||
:column="1"
|
||||
v-else-if="infoWindowPoint.subId"
|
||||
style="padding-top: 10px"
|
||||
></el-descriptions>
|
||||
</bm-info-window>
|
||||
</bm-marker>
|
||||
</baidu-map>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
<script setup lang="ts">
|
||||
import { BmlMarkerClusterer } from 'vue-baidu-map-3x'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import { getAreaLineInfo } from '@/api/event-boot/areaInfo'
|
||||
@@ -107,10 +131,9 @@ interface Props {
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
showBut: true,
|
||||
mapList:[]
|
||||
mapList: []
|
||||
})
|
||||
|
||||
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const adminInfo = useAdminInfo()
|
||||
const datePickerRef = ref()
|
||||
@@ -132,7 +155,7 @@ const siteList = ref<any>([])
|
||||
const polyline = ref<any>([])
|
||||
const lineId = ref('')
|
||||
const handler = async ({ BMap, map }: any) => {
|
||||
let data = props.mapList
|
||||
let data = props.mapList
|
||||
let r = 0.0035
|
||||
let list = data.filter((item: any) => item.lng != 0)
|
||||
list.forEach((item: any) => {
|
||||
@@ -150,7 +173,6 @@ const handler = async ({ BMap, map }: any) => {
|
||||
r = 0.01055
|
||||
}
|
||||
item.children.forEach((val: any, i: number) => {
|
||||
|
||||
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)
|
||||
// 监测点图标
|
||||
@@ -209,8 +231,8 @@ const handler = async ({ BMap, map }: any) => {
|
||||
})
|
||||
siteList.value = list
|
||||
|
||||
center.value.lng = list[0].lng
|
||||
center.value.lat = list[0].lat
|
||||
center.value.lng = list[0]?.lng || 0
|
||||
center.value.lat = list[0]?.lat || 0
|
||||
watch(
|
||||
() => monitoringPoint.state.lineId,
|
||||
(newLineId, oldLineId) => {
|
||||
@@ -221,7 +243,10 @@ const handler = async ({ BMap, map }: any) => {
|
||||
center.value.lat = value.lat
|
||||
infoWindowPoint.value = value
|
||||
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 }
|
||||
)
|
||||
@@ -245,17 +270,14 @@ onMounted(() => {
|
||||
if (siteList.value.length == 0) {
|
||||
setTimeout(() => {
|
||||
hackReset.value = false
|
||||
|
||||
}, 1000)
|
||||
setTimeout(() => {
|
||||
hackReset.value = true
|
||||
|
||||
}, 2000)
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
<style lang="scss" scoped>
|
||||
.bm-view {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -1,119 +1,153 @@
|
||||
<template>
|
||||
<div style='padding: 10px; display: flex; height: 100%' v-loading='loading'>
|
||||
<div style='position: relative; flex: 1'>
|
||||
<div style='display: none'>
|
||||
<DatePicker ref='datePickerRef'></DatePicker>
|
||||
<div style="padding: 10px; display: flex; height: 100%" v-loading="loading">
|
||||
<div style="position: relative; flex: 1">
|
||||
<div style="display: none">
|
||||
<DatePicker ref="datePickerRef"></DatePicker>
|
||||
</div>
|
||||
<div class='iconBox'>
|
||||
<div class='div'>
|
||||
<img src='@/assets/jcd.png' alt='' />
|
||||
<div class="iconBox">
|
||||
<div class="div">
|
||||
<img src="@/assets/jcd.png" alt="" />
|
||||
<span>变电站</span>
|
||||
</div>
|
||||
<div class='div'>
|
||||
<img src='@/assets/rby.png' alt='' />
|
||||
<div class="div">
|
||||
<img src="@/assets/rby.png" alt="" />
|
||||
<span>热备用</span>
|
||||
</div>
|
||||
<div class='div'>
|
||||
<img src='@/assets/ty.png' alt='' />
|
||||
<div class="div">
|
||||
<img src="@/assets/ty.png" alt="" />
|
||||
<span>停运</span>
|
||||
</div>
|
||||
<div class='div'>投运</div>
|
||||
<div class='div' style='padding-left: 10px'>
|
||||
<div class="div">投运</div>
|
||||
<div class="div" style="padding-left: 10px">
|
||||
<span>通讯正常</span>
|
||||
</div>
|
||||
<div class='div' style='padding-left: 20px'>
|
||||
<img src='@/assets/txzcyzj.gif' alt='' />
|
||||
<div class="div" style="padding-left: 20px">
|
||||
<img src="@/assets/txzcyzj.gif" alt="" />
|
||||
<span>有暂降</span>
|
||||
</div>
|
||||
<div class='div' style='padding-left: 20px'>
|
||||
<img src='@/assets/txzcwzj.png' alt='' />
|
||||
<div class="div" style="padding-left: 20px">
|
||||
<img src="@/assets/txzcwzj.png" alt="" />
|
||||
<span>无暂降</span>
|
||||
</div>
|
||||
<div class='div' style='padding-left: 10px'>
|
||||
<div class="div" style="padding-left: 10px">
|
||||
<span>通讯异常</span>
|
||||
</div>
|
||||
<div class='div' style='padding-left: 20px'>
|
||||
<img src='@/assets/txycyzj.gif' alt='' />
|
||||
<div class="div" style="padding-left: 20px">
|
||||
<img src="@/assets/txycyzj.gif" alt="" />
|
||||
<span>有暂降</span>
|
||||
</div>
|
||||
<div class='div' style='padding-left: 20px'>
|
||||
<img src='@/assets/txzdwzj.png' alt='' />
|
||||
<div class="div" style="padding-left: 20px">
|
||||
<img src="@/assets/txzdwzj.png" alt="" />
|
||||
<span>无暂降</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class='selectBox'>
|
||||
<el-select @change='pointChange' :popper-append-to-body='false' filterable clearable v-model='lineId'
|
||||
placeholder='输入监测点名称查询'>
|
||||
<el-option v-for='item in areaLineInfo' :key='item.lineId' :label='item.lineName'
|
||||
:value='item.lineId'></el-option>
|
||||
<div class="selectBox">
|
||||
<el-select
|
||||
@change="pointChange"
|
||||
:popper-append-to-body="false"
|
||||
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>
|
||||
</div>
|
||||
<baidu-map class='bm-view' v-if="hackReset" :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>
|
||||
<baidu-map
|
||||
class="bm-view"
|
||||
v-if="hackReset"
|
||||
: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'>
|
||||
<bm-polyline :path='path' v-for='(path, index) in polyline' :key='index'></bm-polyline>
|
||||
|
||||
<div v-if="zoom > 13">
|
||||
<bm-polyline :path="path" v-for="(path, index) in polyline" :key="index"></bm-polyline>
|
||||
</div>
|
||||
<!-- 变电站-->
|
||||
<template v-if='zoom > 13'>
|
||||
<bm-marker :position='path' v-for='path in siteList' :key='path.subId' :icon='path.icon'
|
||||
@click='markerClick(path)'></bm-marker>
|
||||
<template v-if="zoom > 13">
|
||||
<bm-marker
|
||||
:position="path"
|
||||
v-for="path in siteList"
|
||||
:key="path.subId"
|
||||
:icon="path.icon"
|
||||
@click="markerClick(path)"
|
||||
></bm-marker>
|
||||
</template>
|
||||
<!-- 点 -->
|
||||
<BmlMarkerClusterer maxZoom='12'>
|
||||
<bm-marker :position='path' v-for='path in areaLineInfo' :key='path.lineId' :icon='path.icon'
|
||||
@click='markerClick(path)'></bm-marker>
|
||||
<BmlMarkerClusterer maxZoom="12">
|
||||
<bm-marker
|
||||
:position="path"
|
||||
v-for="path in areaLineInfo"
|
||||
:key="path.lineId"
|
||||
:icon="path.icon"
|
||||
@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='网络参数'>
|
||||
<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.pt2 }}</el-descriptions-item>
|
||||
<el-descriptions-item label='CT变化'>{{ infoWindowPoint.ct2 }}</el-descriptions-item>
|
||||
<el-descriptions-item label='生产厂家'>
|
||||
<el-descriptions-item label="PT变化">{{ infoWindowPoint.pt2 }}</el-descriptions-item>
|
||||
<el-descriptions-item label="CT变化">{{ infoWindowPoint.ct2 }}</el-descriptions-item>
|
||||
<el-descriptions-item label="生产厂家">
|
||||
{{ infoWindowPoint.manufacturer }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label='终端状态'>
|
||||
<el-descriptions-item label="终端状态">
|
||||
{{
|
||||
infoWindowPoint.runFlag == 0
|
||||
? '投运'
|
||||
: infoWindowPoint.runFlag == 1
|
||||
? '热备用'
|
||||
: '停运'
|
||||
? '热备用'
|
||||
: '停运'
|
||||
}}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label='通讯状态'>
|
||||
<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'>
|
||||
<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>
|
||||
<el-descriptions
|
||||
:title="infoWindowPoint.subName"
|
||||
:column="1"
|
||||
v-else-if="infoWindowPoint.subId"
|
||||
style="padding-top: 10px"
|
||||
></el-descriptions>
|
||||
</bm-info-window>
|
||||
</bm-marker>
|
||||
</baidu-map>
|
||||
</div>
|
||||
<div style='width: 600px; height: 100%'>
|
||||
<Right :params='params' v-if='params.deptIndex'></Right>
|
||||
<div style="width: 600px; height: 100%">
|
||||
<Right :params="params" v-if="params.deptIndex"></Right>
|
||||
</div>
|
||||
<PopupEvent ref='popupEvent'></PopupEvent>
|
||||
<PopupEvent ref="popupEvent"></PopupEvent>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang='ts'>
|
||||
<script setup lang="ts">
|
||||
import { BmlMarkerClusterer } from 'vue-baidu-map-3x'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
@@ -238,9 +272,10 @@ const handler = async ({ BMap, map }: any) => {
|
||||
loading.value = false
|
||||
}, 0)
|
||||
siteList.value = list
|
||||
center.value.lng = areaLineInfo.value[0].lng
|
||||
center.value.lat = areaLineInfo.value[0].lat
|
||||
infoWindowPoint.value = areaLineInfo.value[0]
|
||||
center.value.lng = areaLineInfo.value[0]?.lng || 0
|
||||
center.value.lat = areaLineInfo.value[0]?.lat || 0
|
||||
|
||||
infoWindowPoint.value = areaLineInfo.value[0] || {}
|
||||
infoWindowPoint.value.show = true
|
||||
zoom.value = 13
|
||||
setTimeout(() => {
|
||||
@@ -254,6 +289,7 @@ const syncCenterAndZoom = (e: any) => {
|
||||
const pointChange = (val: string) => {
|
||||
if (!val) return
|
||||
let data = areaLineInfo.value.find((item: any) => item.lineId == val)
|
||||
|
||||
center.value.lng = data.lng
|
||||
center.value.lat = data.lat
|
||||
infoWindowPoint.value = data
|
||||
@@ -277,8 +313,14 @@ const lookPoint = () => {
|
||||
name: 'Descentsystem/monitoringpoint',
|
||||
query: {
|
||||
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) {
|
||||
hackReset.value = false
|
||||
}
|
||||
|
||||
|
||||
}, 1000)
|
||||
setTimeout(() => {
|
||||
hackReset.value = true
|
||||
|
||||
}, 2000)
|
||||
}
|
||||
|
||||
})
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
<style lang="scss" scoped>
|
||||
.bm-view {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
Reference in New Issue
Block a user