Compare commits
45 Commits
46c55d48ec
...
2025-12
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd09e24cf0 | ||
|
|
2a11891988 | ||
|
|
e7d90c3a73 | ||
|
|
72b1f39814 | ||
|
|
38028b5cb0 | ||
|
|
409999b37b | ||
|
|
0fc7b528d4 | ||
|
|
06764c073a | ||
|
|
26ff8087c6 | ||
|
|
83e57c92b4 | ||
|
|
a9245abb5c | ||
|
|
7a7c584217 | ||
|
|
bf3d033f39 | ||
|
|
42ce7aec5a | ||
|
|
17589e30da | ||
|
|
eb38fdd601 | ||
|
|
454d612a32 | ||
|
|
4dde761784 | ||
| 5f4f75d9dd | |||
|
|
cf7e5fa991 | ||
|
|
4f0dc512e2 | ||
|
|
a77b153ac8 | ||
|
|
dbb6a9f72b | ||
| 9567fe1295 | |||
|
|
a52021572a | ||
| d69a6e1e5d | |||
| a67535abbf | |||
|
|
dffc735edb | ||
|
|
38806367b4 | ||
|
|
6f770aa91d | ||
| dc32cc3bb7 | |||
|
|
d64d18f330 | ||
|
|
909f43e257 | ||
| 92aa66436e | |||
| 264f33302f | |||
|
|
7b9f5302d0 | ||
|
|
72d836020b | ||
|
|
67efef738a | ||
| 6918611d06 | |||
| 9f5b2ecc46 | |||
|
|
d30b8247cf | ||
| 0b61c4b7ba | |||
|
|
ff2b9db7b8 | ||
|
|
289900f9ff | ||
|
|
e87d05c587 |
5
.env.hainan
Normal file
5
.env.hainan
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
NODE_ENV = hainan
|
||||||
|
VITE_NAME="hainan"
|
||||||
|
# 电网一张图 地图图层
|
||||||
|
VITE_NARIMAP=null
|
||||||
|
VITE_NRGISCOMMON=null
|
||||||
8813
package-lock.json
generated
Normal file
8813
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -6,9 +6,11 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --mode dev",
|
"dev": "vite --mode dev",
|
||||||
"dev:jibei": "vite --mode jibei",
|
"dev:jibei": "vite --mode jibei",
|
||||||
|
"dev:hainan": "vite --mode hainan",
|
||||||
"dev:removeMode": "vite --mode removeMode",
|
"dev:removeMode": "vite --mode removeMode",
|
||||||
"build": "vite build --mode dev",
|
"build": "vite build --mode dev",
|
||||||
"build:jibei": "vite build --mode jibei",
|
"build:jibei": "vite build --mode jibei",
|
||||||
|
"build:hainan": "vite build --mode hainan",
|
||||||
"build:removeMode": "vite build --mode removeMode",
|
"build:removeMode": "vite build --mode removeMode",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
@@ -19,7 +21,7 @@
|
|||||||
"@form-create/element-ui": "^3.1.24",
|
"@form-create/element-ui": "^3.1.24",
|
||||||
"@fortawesome/fontawesome-free": "^6.5.1",
|
"@fortawesome/fontawesome-free": "^6.5.1",
|
||||||
"@kjgl77/datav-vue3": "^1.7.4",
|
"@kjgl77/datav-vue3": "^1.7.4",
|
||||||
"@vue-office/docx": "^1.6.2",
|
"@vue-office/docx": "^1.6.3",
|
||||||
"@vue-office/excel": "^1.7.8",
|
"@vue-office/excel": "^1.7.8",
|
||||||
"@vue-office/pdf": "^2.0.2",
|
"@vue-office/pdf": "^2.0.2",
|
||||||
"@vueuse/core": "^10.7.0",
|
"@vueuse/core": "^10.7.0",
|
||||||
|
|||||||
BIN
public/favicon4.ico
Normal file
BIN
public/favicon4.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -134,6 +134,22 @@ export function selectUserList(data: any) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//获取用户
|
||||||
|
export function selectUserAssessMentList(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/supervision-boot/userReport/selectUserAssessMentList',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//绑定用户
|
||||||
|
export function bindAssessmentId(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/supervision-boot/userReport/bindAssessmentId',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
//查询列表
|
//查询列表
|
||||||
export function getStatusManageList(data: any) {
|
export function getStatusManageList(data: any) {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
|
|||||||
@@ -172,5 +172,13 @@ export function getAreaPollution(data: any) {
|
|||||||
}
|
}
|
||||||
//场站级评估
|
//场站级评估
|
||||||
export function downPollutionSubCalc(data: any) {
|
export function downPollutionSubCalc(data: any) {
|
||||||
return request({ url: 'harmonic-boot/PollutionSubstation/downPollutionSubCalc', method: 'post', data })
|
return request({ url: '/harmonic-boot/PollutionSubstation/downPollutionSubCalc', method: 'post', data })
|
||||||
|
}
|
||||||
|
//监测点评价
|
||||||
|
export function limitTableDetail(data: any) {
|
||||||
|
return request({ url: '/device-boot/dataVerify/limitTableDetail', method: 'post', data })
|
||||||
|
}
|
||||||
|
//重要及敏感用户详情
|
||||||
|
export function downPollutionSensitiveUser(data: any) {
|
||||||
|
return request({ url: '/harmonic-boot/PollutionSubstation/downPollutionSensitiveUser', method: 'post', data })
|
||||||
}
|
}
|
||||||
@@ -6,7 +6,7 @@ export function getUndocumentednonlinearData() {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//获取入网评估报告审核数据
|
//获取系统接入方案审核数据
|
||||||
export function getReportreviewData() {
|
export function getReportreviewData() {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
url: '/Process-supervision/Reportreview/getReportreview',
|
url: '/Process-supervision/Reportreview/getReportreview',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import createAxios from '@/utils/request'
|
import createAxios from '@/utils/request'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
const SYSTEM_PREFIX = '/system-boot'
|
const SYSTEM_PREFIX = '/system-boot'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -7,8 +7,20 @@ const SYSTEM_PREFIX = '/system-boot'
|
|||||||
* @param file
|
* @param file
|
||||||
*/
|
*/
|
||||||
export const uploadFile = (file: any, path: string) => {
|
export const uploadFile = (file: any, path: string) => {
|
||||||
|
const regex = /\[|\]/g
|
||||||
|
// 替换规则:[ 换成 (,] 换成 )
|
||||||
|
|
||||||
|
const newFile = new File(
|
||||||
|
[file], // 原文件的二进制内容
|
||||||
|
file.name.replace(regex, match => (match === '[' ? '(' : ')')), // 新的文件名
|
||||||
|
{
|
||||||
|
type: file.type, // 复用原文件的MIME类型
|
||||||
|
lastModified: file.lastModified // 复用最后修改时间
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
let form = new FormData()
|
let form = new FormData()
|
||||||
form.append('file', file)
|
form.append('file', newFile)
|
||||||
form.append('path', path)
|
form.append('path', path)
|
||||||
return createAxios({
|
return createAxios({
|
||||||
url: SYSTEM_PREFIX + '/file/upload',
|
url: SYSTEM_PREFIX + '/file/upload',
|
||||||
@@ -17,6 +29,11 @@ export const uploadFile = (file: any, path: string) => {
|
|||||||
'Content-Type': 'multipart/form-data'
|
'Content-Type': 'multipart/form-data'
|
||||||
},
|
},
|
||||||
data: form
|
data: form
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == `A0000`) {
|
||||||
|
ElMessage.success('上传成功!')
|
||||||
|
return res
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,36 @@
|
|||||||
<div class="content unicode" style="display: block;">
|
<div class="content unicode" style="display: block;">
|
||||||
<ul class="icon_lists dib-box">
|
<ul class="icon_lists dib-box">
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">253_ipower</div>
|
||||||
|
<div class="code-name">&#xe782;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">电压</div>
|
||||||
|
<div class="code-name">&#xe665;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">三相电压幅值不平衡</div>
|
||||||
|
<div class="code-name">&#xe758;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">电压总谐波畸变率</div>
|
||||||
|
<div class="code-name">&#xe61e;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">闪变</div>
|
||||||
|
<div class="code-name">&#xe612;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont"></span>
|
<span class="icon iconfont"></span>
|
||||||
<div class="name">停运事件管理</div>
|
<div class="name">停运事件管理</div>
|
||||||
@@ -252,9 +282,9 @@
|
|||||||
<pre><code class="language-css"
|
<pre><code class="language-css"
|
||||||
>@font-face {
|
>@font-face {
|
||||||
font-family: 'iconfont';
|
font-family: 'iconfont';
|
||||||
src: url('iconfont.woff2?t=1764826411334') format('woff2'),
|
src: url('iconfont.woff2?t=1765612648830') format('woff2'),
|
||||||
url('iconfont.woff?t=1764826411334') format('woff'),
|
url('iconfont.woff?t=1765612648830') format('woff'),
|
||||||
url('iconfont.ttf?t=1764826411334') format('truetype');
|
url('iconfont.ttf?t=1765612648830') format('truetype');
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||||
@@ -280,6 +310,51 @@
|
|||||||
<div class="content font-class">
|
<div class="content font-class">
|
||||||
<ul class="icon_lists dib-box">
|
<ul class="icon_lists dib-box">
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-a-253_ipower"></span>
|
||||||
|
<div class="name">
|
||||||
|
253_ipower
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-a-253_ipower
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-dianya"></span>
|
||||||
|
<div class="name">
|
||||||
|
电压
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-dianya
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-sanxiangdianyafuzhibupingheng"></span>
|
||||||
|
<div class="name">
|
||||||
|
三相电压幅值不平衡
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-sanxiangdianyafuzhibupingheng
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-dianyazongxiebojibianshuai"></span>
|
||||||
|
<div class="name">
|
||||||
|
电压总谐波畸变率
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-dianyazongxiebojibianshuai
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-shanbian"></span>
|
||||||
|
<div class="name">
|
||||||
|
闪变
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-shanbian
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont icon-tingyunshijianguanli"></span>
|
<span class="icon iconfont icon-tingyunshijianguanli"></span>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -577,6 +652,46 @@
|
|||||||
<div class="content symbol">
|
<div class="content symbol">
|
||||||
<ul class="icon_lists dib-box">
|
<ul class="icon_lists dib-box">
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-a-253_ipower"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">253_ipower</div>
|
||||||
|
<div class="code-name">#icon-a-253_ipower</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-dianya"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">电压</div>
|
||||||
|
<div class="code-name">#icon-dianya</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-sanxiangdianyafuzhibupingheng"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">三相电压幅值不平衡</div>
|
||||||
|
<div class="code-name">#icon-sanxiangdianyafuzhibupingheng</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-dianyazongxiebojibianshuai"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">电压总谐波畸变率</div>
|
||||||
|
<div class="code-name">#icon-dianyazongxiebojibianshuai</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-shanbian"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">闪变</div>
|
||||||
|
<div class="code-name">#icon-shanbian</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
<use xlink:href="#icon-tingyunshijianguanli"></use>
|
<use xlink:href="#icon-tingyunshijianguanli"></use>
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'iconfont';
|
font-family: "iconfont"; /* Project id 3482754 */
|
||||||
src: url('/src/assets/font/iconfont.woff2?t=1764826411334') format('woff2'),
|
src: url('iconfont.woff2?t=1765612648830') format('woff2'),
|
||||||
url('/src/assets/font/iconfont.woff?t=1764826411334') format('woff'),
|
url('iconfont.woff?t=1765612648830') format('woff'),
|
||||||
url('/src/assets/font/iconfont.ttf?t=1764826411334') format('truetype');
|
url('iconfont.ttf?t=1765612648830') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
font-family: "iconfont" !important;
|
font-family: "iconfont" !important;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@@ -12,6 +13,26 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-a-253_ipower:before {
|
||||||
|
content: "\e782";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-dianya:before {
|
||||||
|
content: "\e665";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-sanxiangdianyafuzhibupingheng:before {
|
||||||
|
content: "\e758";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-dianyazongxiebojibianshuai:before {
|
||||||
|
content: "\e61e";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-shanbian:before {
|
||||||
|
content: "\e612";
|
||||||
|
}
|
||||||
|
|
||||||
.icon-tingyunshijianguanli:before {
|
.icon-tingyunshijianguanli:before {
|
||||||
content: "\e65d";
|
content: "\e65d";
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -5,6 +5,41 @@
|
|||||||
"css_prefix_text": "icon-",
|
"css_prefix_text": "icon-",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"icon_id": "33424624",
|
||||||
|
"name": "253_ipower",
|
||||||
|
"font_class": "a-253_ipower",
|
||||||
|
"unicode": "e782",
|
||||||
|
"unicode_decimal": 59266
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "12331657",
|
||||||
|
"name": "电压",
|
||||||
|
"font_class": "dianya",
|
||||||
|
"unicode": "e665",
|
||||||
|
"unicode_decimal": 58981
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "33073330",
|
||||||
|
"name": "三相电压幅值不平衡",
|
||||||
|
"font_class": "sanxiangdianyafuzhibupingheng",
|
||||||
|
"unicode": "e758",
|
||||||
|
"unicode_decimal": 59224
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "37400988",
|
||||||
|
"name": "电压总谐波畸变率",
|
||||||
|
"font_class": "dianyazongxiebojibianshuai",
|
||||||
|
"unicode": "e61e",
|
||||||
|
"unicode_decimal": 58910
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "43700638",
|
||||||
|
"name": "闪变",
|
||||||
|
"font_class": "shanbian",
|
||||||
|
"unicode": "e612",
|
||||||
|
"unicode_decimal": 58898
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "25458995",
|
"icon_id": "25458995",
|
||||||
"name": "停运事件管理",
|
"name": "停运事件管理",
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
src/assets/img/inlogo.png
Normal file
BIN
src/assets/img/inlogo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 12 KiB |
@@ -1,11 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="overflow: auto; height: 100vh">
|
<div style="overflow: auto; height: 100vh">
|
||||||
<vue-office-docx v-if="url.includes('.doc') || url.includes('.docx')" :src="url" />
|
<vue-office-docx v-if="urlKey.includes('.doc') || urlKey.includes('.docx')" :src="url" />
|
||||||
<vue-office-excel v-if="url.includes('.xls') || url.includes('.xlsx')" :src="url" :options="excelOptions" />
|
<vue-office-excel
|
||||||
|
v-if="urlKey.includes('.xls') || urlKey.includes('.xlsx')"
|
||||||
|
:src="url"
|
||||||
|
:options="excelOptions"
|
||||||
|
/>
|
||||||
<!-- <vue-office-pdf v-if="url.includes('.pdf')" :src="url" /> -->
|
<!-- <vue-office-pdf v-if="url.includes('.pdf')" :src="url" /> -->
|
||||||
<iframe v-if="url.includes('.pdf')" :src="url" style="width: 100%; height: 99%"></iframe>
|
<iframe v-if="urlKey.includes('.pdf')||urlKey.includes('.txt')" :src="url" style="width: 100%; height: 99%"></iframe>
|
||||||
<img v-if="url.includes('.png') || url.includes('.jpg') || url.includes('.gif') || url.includes('.bmp')"
|
<img
|
||||||
:src="url" />
|
v-if="
|
||||||
|
urlKey.includes('.png') || urlKey.includes('.jpg') || urlKey.includes('.gif') || urlKey.includes('.bmp')
|
||||||
|
"
|
||||||
|
:src="url"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
@@ -18,15 +26,35 @@ import VueOfficeDocx from '@vue-office/docx'
|
|||||||
import VueOfficeExcel from '@vue-office/excel'
|
import VueOfficeExcel from '@vue-office/excel'
|
||||||
//引入VueOfficePdf组件
|
//引入VueOfficePdf组件
|
||||||
import VueOfficePdf from '@vue-office/pdf'
|
import VueOfficePdf from '@vue-office/pdf'
|
||||||
const { push, options, currentRoute } = useRouter()
|
import { downloadFile } from '@/api/system-boot/file'
|
||||||
// const url = 'http://192.168.1.22:9009/excelreport' + currentRoute.value.href?.split('?')[1]
|
import { previewFile } from '@/utils/fileDownLoad'
|
||||||
|
|
||||||
const url = '/api-docx/excelreport' + currentRoute.value?.href?.split('?')[1]
|
const { push, options, currentRoute } = useRouter()
|
||||||
console.log("🚀 ~ url:", url)
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
const excelOptions = ref({
|
// const url = 'http://192.168.1.22:9009/excelreport' + currentRoute.value.href?.split('?')[1]
|
||||||
|
const url = ref('')
|
||||||
|
const excelOptions = ref({})
|
||||||
|
const urlKey = currentRoute.value?.href?.split('?')[1]
|
||||||
|
|
||||||
|
if (VITE_FLAG) {
|
||||||
|
url.value = '/api-docx/excelreport' + currentRoute.value?.href?.split('?')[1]
|
||||||
|
excelOptions.value = ref({
|
||||||
xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
|
xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
setTimeout(async () => {
|
||||||
|
|
||||||
|
const previewUrl = await previewFile(currentRoute.value?.href?.split('?')[1])
|
||||||
|
url.value = previewUrl
|
||||||
|
excelOptions.value = ref({
|
||||||
|
xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
|
||||||
|
})
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
// 从路由参数获取文件路径
|
||||||
|
|
||||||
console.log()
|
console.log()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -279,6 +279,27 @@ const getResultCss = (status) => {
|
|||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const getTaskNameItemType = (itemStatus: any) => {
|
||||||
|
if (itemStatus === 1) {
|
||||||
|
return '审批中'
|
||||||
|
}else if (itemStatus === 2) {
|
||||||
|
return '审批通过'
|
||||||
|
}else if (itemStatus === 3) {
|
||||||
|
return '审批不通过'
|
||||||
|
}else if (itemStatus === 4) {
|
||||||
|
return '已取消'
|
||||||
|
}else if (itemStatus === 5) {
|
||||||
|
return '退回'
|
||||||
|
} else if (itemStatus === 6) {
|
||||||
|
return '委派'
|
||||||
|
} else if (itemStatus === 7) {
|
||||||
|
return '审批通过中'
|
||||||
|
} else if (itemStatus === 0) {
|
||||||
|
return '待审批'
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
}
|
||||||
|
|
||||||
const getActivityOutgoing = (activity) => {
|
const getActivityOutgoing = (activity) => {
|
||||||
// 如果有 outgoing,则直接使用它
|
// 如果有 outgoing,则直接使用它
|
||||||
if (activity.outgoing && activity.outgoing.length > 0) {
|
if (activity.outgoing && activity.outgoing.length > 0) {
|
||||||
@@ -316,7 +337,9 @@ const elementHover = (element) => {
|
|||||||
!overlays.value && (overlays.value = bpmnModeler.get('overlays'))
|
!overlays.value && (overlays.value = bpmnModeler.get('overlays'))
|
||||||
// 展示信息
|
// 展示信息
|
||||||
// console.log(activityLists.value, 'activityLists.value')
|
// console.log(activityLists.value, 'activityLists.value')
|
||||||
// console.log(element.value, 'element.value')
|
if (element.value.type === 'bpmn:SequenceFlow') {
|
||||||
|
return
|
||||||
|
}
|
||||||
const activity = activityLists.value.find((m) => m.key === element.value.id)
|
const activity = activityLists.value.find((m) => m.key === element.value.id)
|
||||||
// console.log(activity, 'activityactivityactivityactivity')
|
// console.log(activity, 'activityactivityactivityactivity')
|
||||||
if (!activity) {
|
if (!activity) {
|
||||||
@@ -330,22 +353,22 @@ const elementHover = (element) => {
|
|||||||
if (element.value.type === 'bpmn:StartEvent' && processInstance.value) {
|
if (element.value.type === 'bpmn:StartEvent' && processInstance.value) {
|
||||||
html = `<p>发起人:${processInstance.value.startUser.name}</p>
|
html = `<p>发起人:${processInstance.value.startUser.name}</p>
|
||||||
<p>部门:${processInstance.value.startUser.deptName}</p>
|
<p>部门:${processInstance.value.startUser.deptName}</p>
|
||||||
<p>创建时间:${formatDate(processInstance.value.createTime)}`
|
<p>创建时间:${formatDate(processInstance.value.startTime)}`
|
||||||
} else if (element.value.type === 'bpmn:UserTask') {
|
} else if (element.value.type === 'bpmn:UserTask') {
|
||||||
let task = taskList.value.find((m) => m.id === activity.taskId) // 找到活动对应的 taskId
|
let task = taskList.value.find((m) => m.id === activity.taskId) // 找到活动对应的 taskId
|
||||||
if (!task) {
|
if (!task) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let optionData = getIntDictOptions(DICT_TYPE.BPM_TASK_STATUS)
|
// let optionData = getIntDictOptions(DICT_TYPE.BPM_TASK_STATUS)
|
||||||
let dataResult = ''
|
// let dataResult = ''
|
||||||
optionData.forEach((element) => {
|
// optionData.forEach((element) => {
|
||||||
if (element.value == task.status) {
|
// if (element.value == task.status) {
|
||||||
dataResult = element.label
|
// dataResult = element.label
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
html = `<p>审批人:${task.assigneeUser.name}</p>
|
html = `<p>审批人:${task.assigneeUser.name}</p>
|
||||||
<p>部门:${task.assigneeUser.deptName}</p>
|
<p>部门:${task.assigneeUser.deptName}</p>
|
||||||
<p>结果:${dataResult}</p>
|
<p>结果:${getTaskNameItemType(task.status)}</p>
|
||||||
<p>创建时间:${formatDate(task.createTime)}</p>`
|
<p>创建时间:${formatDate(task.createTime)}</p>`
|
||||||
// html = `<p>审批人:${task.assigneeUser.nickname}</p>
|
// html = `<p>审批人:${task.assigneeUser.nickname}</p>
|
||||||
// <p>部门:${task.assigneeUser.deptName}</p>
|
// <p>部门:${task.assigneeUser.deptName}</p>
|
||||||
@@ -368,20 +391,20 @@ const elementHover = (element) => {
|
|||||||
html += `<p>结束时间:${formatDate(activity.endTime)}</p>`
|
html += `<p>结束时间:${formatDate(activity.endTime)}</p>`
|
||||||
}
|
}
|
||||||
} else if (element.value.type === 'bpmn:EndEvent' && processInstance.value) {
|
} else if (element.value.type === 'bpmn:EndEvent' && processInstance.value) {
|
||||||
let optionData = getIntDictOptions(DICT_TYPE.BPM_TASK_STATUS)
|
// let optionData = getIntDictOptions(DICT_TYPE.BPM_TASK_STATUS)
|
||||||
let dataResult = ''
|
// let dataResult = ''
|
||||||
optionData.forEach((element) => {
|
// optionData.forEach((element) => {
|
||||||
if (element.value == processInstance.value.status) {
|
// if (element.value == processInstance.value.status) {
|
||||||
dataResult = element.label
|
// dataResult = element.label
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
html = `<p>结果:${dataResult}</p>`
|
// html = `<p>结果:${dataResult}</p>`
|
||||||
// html = `<p>结果:${getIntDictOptions(
|
// html = `<p>结果:${getIntDictOptions(
|
||||||
// DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
|
// DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
|
||||||
// processInstance.value.status
|
// processInstance.value.status
|
||||||
// )}</p>`
|
// )}</p>`
|
||||||
if (processInstance.value.endTime) {
|
if (processInstance.value.endTime) {
|
||||||
html += `<p>结束时间:${formatDate(processInstance.value.endTime)}</p>`
|
html = `<p>结束时间:${formatDate(processInstance.value.endTime)}</p>`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elementOverlayIds.value[element.value.id] = toRaw(overlays.value)?.add(element.value, {
|
elementOverlayIds.value[element.value.id] = toRaw(overlays.value)?.add(element.value, {
|
||||||
@@ -660,7 +683,7 @@ watch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
.element-overlays {
|
.element-overlays {
|
||||||
width: 200px;
|
width: 250px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
color: #fafafa;
|
color: #fafafa;
|
||||||
background: rgb(0 0 0 / 60%);
|
background: rgb(0 0 0 / 60%);
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="flex: 2" class="ml15">
|
<div style="flex: 2" class="ml15">
|
||||||
<div class="title">完整性统计</div>
|
<div class="title">终端运行统计</div>
|
||||||
|
|
||||||
<div class="mb5" style="height: 40px">
|
<div class="mb5" style="height: 40px">
|
||||||
<el-segmented
|
<el-segmented
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { color, gradeColor3 } from './color'
|
|||||||
import { useConfig } from '@/stores/config'
|
import { useConfig } from '@/stores/config'
|
||||||
const config = useConfig()
|
const config = useConfig()
|
||||||
// import { nextTick } from 'process'
|
// import { nextTick } from 'process'
|
||||||
const emit = defineEmits(['triggerPoint', 'group'])
|
const emit = defineEmits(['triggerPoint', 'group', 'echartClick'])
|
||||||
color[0] = config.layout.elementUiPrimary[0]
|
color[0] = config.layout.elementUiPrimary[0]
|
||||||
const chartRef = ref<HTMLDivElement>()
|
const chartRef = ref<HTMLDivElement>()
|
||||||
|
|
||||||
@@ -153,6 +153,9 @@ const initChart = () => {
|
|||||||
chart.on('click', function (params) {
|
chart.on('click', function (params) {
|
||||||
if (params.seriesName == '暂态触发点') {
|
if (params.seriesName == '暂态触发点') {
|
||||||
emit('triggerPoint', params.data)
|
emit('triggerPoint', params.data)
|
||||||
|
} else {
|
||||||
|
|
||||||
|
emit('echartClick', params)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ export const defaultAttribute: VxeTableProps = {
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
headerCellClassName: 'table-header-cell',
|
headerCellClassName: 'table-header-cell',
|
||||||
border: true,
|
border: true,
|
||||||
|
stripe: true,
|
||||||
size: 'small',
|
size: 'small',
|
||||||
columnConfig: { resizable: true },
|
columnConfig: { resizable: true },
|
||||||
rowConfig: { isCurrent: true, isHover: true },
|
rowConfig: { isCurrent: true, isHover: true },
|
||||||
@@ -13,6 +13,7 @@ export const defaultAttribute: VxeTableProps = {
|
|||||||
treeConfig: {
|
treeConfig: {
|
||||||
reserve: true
|
reserve: true
|
||||||
},
|
},
|
||||||
|
showOverflow: true,
|
||||||
showOverflow: true
|
showFooter:true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ const handlerHeight = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
const computedSearchRow = () => {
|
const computedSearchRow = () => {
|
||||||
if (!headerForm.value.$el) return
|
if (!headerForm.value?.$el) return
|
||||||
// 清空headerFormSecond.value.$el下的元素
|
// 清空headerFormSecond.value.$el下的元素
|
||||||
while (headerFormSecond.value.$el.firstChild) {
|
while (headerFormSecond.value.$el.firstChild) {
|
||||||
headerForm.value.$el.appendChild(headerFormSecond.value.$el.firstChild)
|
headerForm.value.$el.appendChild(headerFormSecond.value.$el.firstChild)
|
||||||
@@ -231,6 +231,26 @@ const setDatePicker = (list: any) => {
|
|||||||
const onResetForm = () => {
|
const onResetForm = () => {
|
||||||
//时间重置成默认值
|
//时间重置成默认值
|
||||||
datePickerRef.value?.setTheDate(3)
|
datePickerRef.value?.setTheDate(3)
|
||||||
|
|
||||||
|
if(props.showTimeAll){
|
||||||
|
timeAll.value = false
|
||||||
|
delete tableStore.table.params.searchBeginTime
|
||||||
|
delete tableStore.table.params.searchEndTime
|
||||||
|
delete tableStore.table.params.startTime
|
||||||
|
delete tableStore.table.params.endTime
|
||||||
|
delete tableStore.table.params.timeFlag
|
||||||
|
delete tableStore.table.params.interval
|
||||||
|
}
|
||||||
|
|
||||||
|
if (props.datePicker && timeAll.value) {
|
||||||
|
tableStore.table.params.searchBeginTime = datePickerRef.value.timeValue[0]
|
||||||
|
tableStore.table.params.searchEndTime = datePickerRef.value.timeValue[1]
|
||||||
|
tableStore.table.params.startTime = datePickerRef.value.timeValue[0]
|
||||||
|
tableStore.table.params.endTime = datePickerRef.value.timeValue[1]
|
||||||
|
tableStore.table.params.timeFlag = datePickerRef.value.timeFlag
|
||||||
|
tableStore.table.params.interval = datePickerRef.value.interval
|
||||||
|
}
|
||||||
|
|
||||||
tableStore.onTableAction('reset', {})
|
tableStore.onTableAction('reset', {})
|
||||||
}
|
}
|
||||||
const setTheDate = (val: any) => {
|
const setTheDate = (val: any) => {
|
||||||
@@ -238,7 +258,7 @@ const setTheDate = (val: any) => {
|
|||||||
}
|
}
|
||||||
// 导出
|
// 导出
|
||||||
const onExport = () => {
|
const onExport = () => {
|
||||||
console.log('导出')
|
console.log('222')
|
||||||
tableStore.onTableAction('export', { showAllFlag: true })
|
tableStore.onTableAction('export', { showAllFlag: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,15 +77,13 @@
|
|||||||
<SubstationDetails ref="SubstationRef" />
|
<SubstationDetails ref="SubstationRef" />
|
||||||
<!-- 监测点详情 -->
|
<!-- 监测点详情 -->
|
||||||
<MonitoringPointDetails ref="MonitoringPointRef" />
|
<MonitoringPointDetails ref="MonitoringPointRef" />
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import useCurrentInstance from '@/utils/useCurrentInstance'
|
import useCurrentInstance from '@/utils/useCurrentInstance'
|
||||||
import { ElTree } from 'element-plus'
|
import { ElTree } from 'element-plus'
|
||||||
import { ref, watch } from 'vue'
|
import { ref, watch, onMounted, nextTick } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import MonitoringPointDetails from './details/monitoringPointDetails.vue'
|
import MonitoringPointDetails from './details/monitoringPointDetails.vue'
|
||||||
import SubstationDetails from './details/substationDetails.vue'
|
import SubstationDetails from './details/substationDetails.vue'
|
||||||
@@ -110,6 +108,7 @@ const menuCollapse = ref(false)
|
|||||||
const MonitoringPointRef = ref()
|
const MonitoringPointRef = ref()
|
||||||
const SubstationRef = ref()
|
const SubstationRef = ref()
|
||||||
const filterText = ref('')
|
const filterText = ref('')
|
||||||
|
const treeRef = ref()
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
label: 'name',
|
label: 'name',
|
||||||
value: 'id'
|
value: 'id'
|
||||||
@@ -148,7 +147,7 @@ const onMenuCollapse = () => {
|
|||||||
}
|
}
|
||||||
// 查看详情
|
// 查看详情
|
||||||
const viewDetails = (data: any) => {
|
const viewDetails = (data: any) => {
|
||||||
console.log("🚀 ~ viewDetails ~ data:", data)
|
console.log('🚀 ~ viewDetails ~ data:', data)
|
||||||
if (data.level == 3) {
|
if (data.level == 3) {
|
||||||
// 变电站详情
|
// 变电站详情
|
||||||
// substationDetails
|
// substationDetails
|
||||||
@@ -194,12 +193,40 @@ const chooseNode = (value: string, data: any, node: any) => {
|
|||||||
// 没匹配到返回false
|
// 没匹配到返回false
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
// 等待树渲染完成
|
||||||
|
await nextTick()
|
||||||
|
// 可以等待更长时间确保树完全展开
|
||||||
|
})
|
||||||
|
|
||||||
|
const scrollToNode = (id: string) => {
|
||||||
|
console.log("🚀 ~ scrollToNode ~ id:", id)
|
||||||
|
if (!treeRef.value) return
|
||||||
|
|
||||||
|
// 获取目标节点的元素
|
||||||
|
const targetNode = treeRef.value.getNode(id)
|
||||||
|
if (!targetNode) return
|
||||||
|
|
||||||
|
// 获取节点的DOM元素
|
||||||
|
const nodeElement = document.querySelector(`[data-key="${id}"]`)
|
||||||
|
if (nodeElement) {
|
||||||
|
// 滚动到节点位置
|
||||||
|
nodeElement.scrollIntoView({
|
||||||
|
behavior: 'smooth', // 平滑滚动
|
||||||
|
block: 'center', // 垂直方向居中
|
||||||
|
inline: 'nearest' // 水平方向最近
|
||||||
|
})
|
||||||
|
|
||||||
|
// 如果需要高亮当前节点
|
||||||
|
treeRef.value.setCurrentKey(id)
|
||||||
|
}
|
||||||
|
}
|
||||||
// 添加树
|
// 添加树
|
||||||
const onAddTree = () => {
|
const onAddTree = () => {
|
||||||
emit('onAddTree')
|
emit('onAddTree')
|
||||||
}
|
}
|
||||||
const treeRef = ref<InstanceType<typeof ElTree>>()
|
defineExpose({ treeRef, scrollToNode })
|
||||||
defineExpose({ treeRef })
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
style="width: 100%; height: 100%"
|
style="width: 100%; height: 100%"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
default-expand-all
|
default-expand-all
|
||||||
|
|
||||||
@onAddTree="onAddTree"
|
@onAddTree="onAddTree"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -72,8 +71,28 @@ const loadData = (id?: any) => {
|
|||||||
const onAddTree = () => {
|
const onAddTree = () => {
|
||||||
emit('onAddTree')
|
emit('onAddTree')
|
||||||
}
|
}
|
||||||
|
const setKey = (id: string) => {
|
||||||
|
treeRef.value.treeRef.setCurrentKey(id)
|
||||||
|
return findNodeById(tree.value, id)
|
||||||
|
}
|
||||||
|
const findNodeById = (tree1: any, targetId: any) => {
|
||||||
|
for (const node of tree1) {
|
||||||
|
// 1. 当前节点匹配ID,直接返回该节点
|
||||||
|
if (node.id === targetId) {
|
||||||
|
return node
|
||||||
|
}
|
||||||
|
// 2. 当前节点有子节点,递归查找子节点
|
||||||
|
if (node.children && node.children.length > 0) {
|
||||||
|
const result: any = findNodeById(node.children, targetId)
|
||||||
|
// 子节点中找到结果,立即返回(终止递归)
|
||||||
|
if (result) return result
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 3. 遍历完未找到,返回null
|
||||||
|
return null
|
||||||
|
}
|
||||||
loadData()
|
loadData()
|
||||||
defineExpose({ loadData })
|
defineExpose({ loadData, setKey })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.point-tree {
|
.point-tree {
|
||||||
@@ -85,4 +104,3 @@ defineExpose({ loadData })
|
|||||||
border: 1px solid var(--el-border-color);
|
border: 1px solid var(--el-border-color);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@@ -14,9 +14,7 @@ import { useDictData } from '@/stores/dictData'
|
|||||||
import { getTerminalTreeForFive } from '@/api/device-boot/terminalTree'
|
import { getTerminalTreeForFive } from '@/api/device-boot/terminalTree'
|
||||||
import { useConfig } from '@/stores/config'
|
import { useConfig } from '@/stores/config'
|
||||||
import { defineProps } from 'vue'
|
import { defineProps } from 'vue'
|
||||||
import {
|
import { getTree } from '@/api/advance-boot/assess'
|
||||||
getTree
|
|
||||||
} from '@/api/advance-boot/assess'
|
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'pms/pointTree'
|
name: 'pms/pointTree'
|
||||||
@@ -46,25 +44,24 @@ const formData = ref({
|
|||||||
scale: null
|
scale: null
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
// 添加数据转换函数
|
// 添加数据转换函数
|
||||||
const transformTreeData = (data: any[]) => {
|
const transformTreeData = (data: any[]) => {
|
||||||
if (!data || !Array.isArray(data)) return [];
|
if (!data || !Array.isArray(data)) return []
|
||||||
return data.map(item => {
|
return data.map(item => {
|
||||||
// 创建新对象,确保不修改原始数据
|
// 创建新对象,确保不修改原始数据
|
||||||
const newItem: any = {
|
const newItem: any = {
|
||||||
name: item.treeName,
|
name: item.treeName,
|
||||||
id: item.treeId,
|
id: item.treeId,
|
||||||
children: []
|
children: []
|
||||||
};
|
}
|
||||||
|
|
||||||
// 递归处理子节点
|
// 递归处理子节点
|
||||||
if (item.children && Array.isArray(item.children)) {
|
if (item.children && Array.isArray(item.children)) {
|
||||||
newItem.children = transformTreeData(item.children);
|
newItem.children = transformTreeData(item.children)
|
||||||
|
}
|
||||||
|
return newItem
|
||||||
|
})
|
||||||
}
|
}
|
||||||
return newItem;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const loadData = () => {
|
const loadData = () => {
|
||||||
let obj = classificationData.find(function (i) {
|
let obj = classificationData.find(function (i) {
|
||||||
@@ -75,12 +72,15 @@ const loadData = () => {
|
|||||||
let nodeKey = ''
|
let nodeKey = ''
|
||||||
getTree({}).then(res => {
|
getTree({}).then(res => {
|
||||||
// 转换数据结构为指定格式
|
// 转换数据结构为指定格式
|
||||||
const transformedData = transformTreeData(res.data);
|
const transformedData = transformTreeData(res.data)
|
||||||
|
|
||||||
// 确保有数据再进行处理
|
// 确保有数据再进行处理
|
||||||
if (transformedData && transformedData.length > 0 &&
|
if (
|
||||||
transformedData[0].children && transformedData[0].children.length > 0) {
|
transformedData &&
|
||||||
|
transformedData.length > 0 &&
|
||||||
|
transformedData[0].children &&
|
||||||
|
transformedData[0].children.length > 0
|
||||||
|
) {
|
||||||
nodeKey = transformedData[0].children[0].id
|
nodeKey = transformedData[0].children[0].id
|
||||||
emit('init', transformedData[0].children[0])
|
emit('init', transformedData[0].children[0])
|
||||||
|
|
||||||
@@ -94,7 +94,15 @@ const loadData = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const scrollToNode = (id: string) => {
|
||||||
|
// 树滚动
|
||||||
|
treeRef.value.scrollToNode(id)
|
||||||
|
}
|
||||||
loadData()
|
loadData()
|
||||||
|
defineExpose({
|
||||||
|
tree,
|
||||||
|
scrollToNode
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.point-tree {
|
.point-tree {
|
||||||
|
|||||||
@@ -135,11 +135,17 @@ const loadData = () => {
|
|||||||
if (nodeKey) {
|
if (nodeKey) {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
treeRef.value.treeRef.setCurrentKey(nodeKey)
|
treeRef.value.treeRef.setCurrentKey(nodeKey)
|
||||||
|
|
||||||
// treeRef.value.treeRef.setExpandedKeys(nodeKey)
|
// treeRef.value.treeRef.setExpandedKeys(nodeKey)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const scrollToNode = (id: string) => {
|
||||||
|
// 树滚动
|
||||||
|
treeRef.value.scrollToNode(id)
|
||||||
|
}
|
||||||
|
defineExpose({ treeRef, scrollToNode, tree })
|
||||||
loadData()
|
loadData()
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="layout-logo">
|
<div class="layout-logo">
|
||||||
<img v-if="!config.layout.menuCollapse" class="logo-img" :src="getTheme.logoUrl" />
|
<img v-if="!config.layout.menuCollapse && getTheme && getTheme.logoUrl" class="logo-img" :src="getTheme.logoUrl" />
|
||||||
<!-- <div-->
|
<!-- <div-->
|
||||||
<!-- v-if="!config.layout.menuCollapse"-->
|
<!-- v-if="!config.layout.menuCollapse"-->
|
||||||
<!-- :style="{ color: config.getColorVal('menuActiveColor') }"-->
|
<!-- :style="{ color: config.getColorVal('menuActiveColor') }"-->
|
||||||
@@ -28,7 +28,9 @@ import { Session } from '@/utils/storage'
|
|||||||
import { setNavTabsWidth } from '@/utils/layout'
|
import { setNavTabsWidth } from '@/utils/layout'
|
||||||
|
|
||||||
const config = useConfig()
|
const config = useConfig()
|
||||||
const getTheme = JSON.parse(window.localStorage.getItem('getTheme') as string)
|
const getTheme = window.localStorage.getItem('getTheme')
|
||||||
|
? JSON.parse(window.localStorage.getItem('getTheme') as string)
|
||||||
|
: null
|
||||||
const onMenuCollapse = function () {
|
const onMenuCollapse = function () {
|
||||||
if (config.layout.shrink && !config.layout.menuCollapse) {
|
if (config.layout.shrink && !config.layout.menuCollapse) {
|
||||||
closeShade()
|
closeShade()
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<span class="nav-bar-title">
|
<span class="nav-bar-title">
|
||||||
{{ getTheme.name }}
|
{{ getTheme?.name || '' }}
|
||||||
<span style="font-size: 14px">({{ Version || 'v1.0.0' }})</span>
|
<span style="font-size: 14px">({{ Version || 'v1.0.0' }})</span>
|
||||||
<!-- <span style="font-size: 14px;" v-if="Version?.versionName">
|
<!-- <span style="font-size: 14px;" v-if="Version?.versionName">
|
||||||
({{ Version?.versionName }})
|
({{ Version?.versionName }})
|
||||||
@@ -28,8 +28,10 @@ import { getLastData } from '@/api/systerm'
|
|||||||
|
|
||||||
const Version: any = ref(null)
|
const Version: any = ref(null)
|
||||||
const config = useConfig()
|
const config = useConfig()
|
||||||
const getTheme = JSON.parse(window.localStorage.getItem('getTheme') as string)
|
const getTheme = window.localStorage.getItem('getTheme')
|
||||||
|
? JSON.parse(window.localStorage.getItem('getTheme') as string)
|
||||||
|
: { name: '' }
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'hainan'
|
||||||
const onMenuCollapse = () => {
|
const onMenuCollapse = () => {
|
||||||
showShade('ba-aside-menu-shade', () => {
|
showShade('ba-aside-menu-shade', () => {
|
||||||
config.setLayout('menuCollapse', true)
|
config.setLayout('menuCollapse', true)
|
||||||
@@ -37,10 +39,13 @@ const onMenuCollapse = () => {
|
|||||||
config.setLayout('menuCollapse', false)
|
config.setLayout('menuCollapse', false)
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
if(!VITE_FLAG){
|
||||||
getLastData({ versionType: 'WEB' }).then(res => {
|
getLastData({ versionType: 'WEB' }).then(res => {
|
||||||
Version.value = res.data.versionName
|
Version.value = res.data.versionName
|
||||||
})
|
})
|
||||||
document.title = getTheme.name
|
}
|
||||||
|
|
||||||
|
document.title = getTheme?.name || ''
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
33
src/main.ts
33
src/main.ts
@@ -16,12 +16,14 @@ import '@/assets/font/iconfont.css'
|
|||||||
import { ElDialog } from 'element-plus'
|
import { ElDialog } from 'element-plus'
|
||||||
import BaiduMap from 'vue-baidu-map-3x'
|
import BaiduMap from 'vue-baidu-map-3x'
|
||||||
import BaiduMapOffline from 'vue-baidu-map-offline'
|
import BaiduMapOffline from 'vue-baidu-map-offline'
|
||||||
|
|
||||||
import ExcelJS from 'exceljs'
|
import ExcelJS from 'exceljs'
|
||||||
import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx'
|
import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx'
|
||||||
// 方式1:NPM 安装,注入 ExcelJS 对象
|
// 方式1:NPM 安装,注入 ExcelJS 对象
|
||||||
VXETable.use(VXETablePluginExportXLSX, {
|
VXETable.use(VXETablePluginExportXLSX, {
|
||||||
ExcelJS
|
ExcelJS
|
||||||
})
|
})
|
||||||
|
// 全局注册 tooltip 组件
|
||||||
window.XEUtils = XEUtils
|
window.XEUtils = XEUtils
|
||||||
|
|
||||||
// 初始化多语言
|
// 初始化多语言
|
||||||
@@ -35,21 +37,21 @@ const setupAll = async () => {
|
|||||||
const app = createApp(App)
|
const app = createApp(App)
|
||||||
|
|
||||||
//开启离线地图
|
//开启离线地图
|
||||||
// app.use(BaiduMapOffline, {
|
app.use(BaiduMapOffline, {
|
||||||
// offline: true,
|
offline: true,
|
||||||
// offlineConfig: {
|
offlineConfig: {
|
||||||
// imgext: '.png',
|
imgext: '.png',
|
||||||
// customstyle: '',
|
customstyle: '',
|
||||||
// tiles_dir: '',
|
tiles_dir: '',
|
||||||
// tiles_hybrid: '',
|
tiles_hybrid: '',
|
||||||
// tiles_self: '',
|
tiles_self: '',
|
||||||
// tiles_v_dir: '',
|
tiles_v_dir: '',
|
||||||
// tiles_satellite_dir: '',
|
tiles_satellite_dir: '',
|
||||||
// tiles_road_dir: '',
|
tiles_road_dir: '',
|
||||||
// tiles_v_road_dir: '',
|
tiles_v_road_dir: '',
|
||||||
// home: './plugin/offline/'
|
home: './plugin/offline/'
|
||||||
// }
|
}
|
||||||
// })
|
})
|
||||||
app.use(BaiduMap, {
|
app.use(BaiduMap, {
|
||||||
// ak: 'Yp57V71dkOPiXjiN8VdcFRsVELzlVNKK',
|
// ak: 'Yp57V71dkOPiXjiN8VdcFRsVELzlVNKK',
|
||||||
ak: 'RpQi6WNFZ9tseKzhdwOQsXwFsoVntnsN',
|
ak: 'RpQi6WNFZ9tseKzhdwOQsXwFsoVntnsN',
|
||||||
@@ -61,6 +63,7 @@ const setupAll = async () => {
|
|||||||
app.use(pinia)
|
app.use(pinia)
|
||||||
app.use(ElementPlus)
|
app.use(ElementPlus)
|
||||||
app.use(VXETable)
|
app.use(VXETable)
|
||||||
|
|
||||||
;(app._context.components.ElDialog as typeof ElDialog).props.closeOnClickModal.default = false
|
;(app._context.components.ElDialog as typeof ElDialog).props.closeOnClickModal.default = false
|
||||||
registerIcons(app) // icons
|
registerIcons(app) // icons
|
||||||
|
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ export const useDictStore = defineStore('dict', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getDictByType(type: string) {
|
getDictByType(type: string) {
|
||||||
|
console.log("🚀 ~ type:", type)
|
||||||
if (!this.isSetDict) {
|
if (!this.isSetDict) {
|
||||||
this.setDictMap()
|
this.setDictMap()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -373,3 +373,4 @@ body,
|
|||||||
.w-e-scroll {
|
.w-e-scroll {
|
||||||
min-height: 200px !important;
|
min-height: 200px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -268,3 +268,8 @@
|
|||||||
.el-drawer__body {
|
.el-drawer__body {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.aLoad{
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
@@ -63,7 +63,10 @@
|
|||||||
.vxe-table--render-default .vxe-cell--radio:not(.is--disabled):hover .vxe-radio--icon {
|
.vxe-table--render-default .vxe-cell--radio:not(.is--disabled):hover .vxe-radio--icon {
|
||||||
color: var(--el-color-primary-light-5);
|
color: var(--el-color-primary-light-5);
|
||||||
}
|
}
|
||||||
|
.vxe-table--render-default .vxe-body--row.row--current,
|
||||||
|
.vxe-table--render-default .vxe-body--row.row--current:hover {
|
||||||
|
background-color: var(--el-color-primary-light-8);
|
||||||
|
}
|
||||||
// .vxe-table--render-default .is--disabled.vxe-cell--checkbox .vxe-checkbox--icon{
|
// .vxe-table--render-default .is--disabled.vxe-cell--checkbox .vxe-checkbox--icon{
|
||||||
// color: #fff0;
|
// color: #fff0;
|
||||||
// }
|
// }
|
||||||
@@ -77,14 +80,14 @@
|
|||||||
.vxe-modal--wrapper {
|
.vxe-modal--wrapper {
|
||||||
z-index: 5000 !important;
|
z-index: 5000 !important;
|
||||||
}
|
}
|
||||||
.vxe-table--body .vxe-body--row:nth-child(even) {
|
// .vxe-table--body .vxe-body--row:nth-child(even) {
|
||||||
background-color: #f9f9f9;
|
// background-color: #f9f9f9;
|
||||||
// background-color: var(--el-color-primary-light-9);
|
// // background-color: var(--el-color-primary-light-9);
|
||||||
}
|
// }
|
||||||
|
|
||||||
.vxe-table--body .vxe-body--row:nth-child(odd) {
|
// .vxe-table--body .vxe-body--row:nth-child(odd) {
|
||||||
background-color: #ffffff;
|
// background-color: #ffffff;
|
||||||
}
|
// }
|
||||||
.default-theme.splitpanes--vertical > .splitpanes__splitter,
|
.default-theme.splitpanes--vertical > .splitpanes__splitter,
|
||||||
.default-theme .splitpanes--vertical > .splitpanes__splitter {
|
.default-theme .splitpanes--vertical > .splitpanes__splitter {
|
||||||
width: 10px !important;
|
width: 10px !important;
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ export const getIntDictOptions = (dictType: string): NumberDictDataType[] => {
|
|||||||
value: parseInt(dict.value + '')
|
value: parseInt(dict.value + '')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
console.log("🚀 ~ getIntDictOptions ~ dictOption:", dictOption)
|
||||||
return dictOption
|
return dictOption
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
91
src/utils/fileDownLoad.ts
Normal file
91
src/utils/fileDownLoad.ts
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
import { downloadFile } from '@/api/system-boot/file'
|
||||||
|
// 下载文件
|
||||||
|
export const download = (urls: string) => {
|
||||||
|
//console.log('下载', urls)
|
||||||
|
|
||||||
|
downloadFile({ filePath: urls })
|
||||||
|
.then((res: any) => {
|
||||||
|
// 1. 确定文件MIME类型(优化:用更简洁的方式)
|
||||||
|
const getFileType = (url: string) => {
|
||||||
|
const ext = url.split('.').pop()?.toLowerCase() || ''
|
||||||
|
const mimeMap: Record<string, string> = {
|
||||||
|
pdf: 'application/pdf',
|
||||||
|
zip: 'application/zip',
|
||||||
|
doc: 'application/msword',
|
||||||
|
docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||||
|
xls: 'application/vnd.ms-excel',
|
||||||
|
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
|
png: 'image/png',
|
||||||
|
jpeg: 'image/jpeg',
|
||||||
|
jpg: 'image/jpg'
|
||||||
|
}
|
||||||
|
return mimeMap[ext] || ''
|
||||||
|
}
|
||||||
|
|
||||||
|
const blob = new Blob([res], { type: getFileType(urls) })
|
||||||
|
|
||||||
|
// 2. 提取文件名并保留原生后缀(核心修复点)
|
||||||
|
const fileName = urls.split('/').at(-1) || '下载文件' // 先提取URL最后一段(文件名)
|
||||||
|
|
||||||
|
// 3. 创建下载链接
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = url
|
||||||
|
link.download = fileName // 直接使用原文件名(保留后缀)
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
|
||||||
|
// 4. 清理资源(优化)
|
||||||
|
link.remove()
|
||||||
|
window.URL.revokeObjectURL(url) // 释放blob URL
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error('下载失败:', err)
|
||||||
|
// 可添加错误提示(如Toast)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function removeLastDotSuffix(str: string) {
|
||||||
|
// 找到最后一个 . 的位置
|
||||||
|
const lastDotIndex = str.lastIndexOf('.')
|
||||||
|
// 如果存在 .,截取到 . 之前的部分;否则返回原字符串
|
||||||
|
return lastDotIndex !== -1 ? str.slice(0, lastDotIndex) : str
|
||||||
|
}
|
||||||
|
|
||||||
|
// 预览文件
|
||||||
|
export const previewFile = async (urls: any) => {
|
||||||
|
//console.log('预览', urls)
|
||||||
|
let url = ''
|
||||||
|
//console.log('urls', decodeURI(urls))
|
||||||
|
await downloadFile({ filePath: decodeURI(urls) })
|
||||||
|
.then((res: any) => {
|
||||||
|
|
||||||
|
// 1. 确定文件MIME类型(优化:用更简洁的方式)
|
||||||
|
const getFileType = (url: string) => {
|
||||||
|
const ext = url.split('.').pop()?.toLowerCase() || ''
|
||||||
|
const mimeMap: Record<string, string> = {
|
||||||
|
pdf: 'application/pdf',
|
||||||
|
zip: 'application/zip',
|
||||||
|
doc: 'application/msword',
|
||||||
|
docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||||
|
xls: 'application/vnd.ms-excel',
|
||||||
|
xlsx: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||||
|
png: 'image/png',
|
||||||
|
jpeg: 'image/jpeg',
|
||||||
|
jpg: 'image/jpg'
|
||||||
|
}
|
||||||
|
return mimeMap[ext] || ''
|
||||||
|
}
|
||||||
|
|
||||||
|
const blob = new Blob([res], { type: getFileType(decodeURI(urls)) })
|
||||||
|
|
||||||
|
|
||||||
|
// 3. 创建下载链接
|
||||||
|
url = window.URL.createObjectURL(blob)
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error('下载失败:', err)
|
||||||
|
// 可添加错误提示(如Toast)
|
||||||
|
})
|
||||||
|
//console.log('url', url)
|
||||||
|
return url
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ import { ElLoading, ElNotification, type LoadingOptions } from 'element-plus'
|
|||||||
import { refreshToken } from '@/api/user-boot/user'
|
import { refreshToken } from '@/api/user-boot/user'
|
||||||
import router from '@/router/index'
|
import router from '@/router/index'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { debounce } from 'lodash-es';
|
import { debounce } from 'lodash-es'
|
||||||
let loginExpireTimer: any = null
|
let loginExpireTimer: any = null
|
||||||
window.requests = []
|
window.requests = []
|
||||||
window.tokenRefreshing = false
|
window.tokenRefreshing = false
|
||||||
@@ -84,7 +84,8 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
|
|||||||
config.url == '/system-boot/file/upload' ||
|
config.url == '/system-boot/file/upload' ||
|
||||||
config.url == '/harmonic-boot/grid/getAssessOverview' ||
|
config.url == '/harmonic-boot/grid/getAssessOverview' ||
|
||||||
config.url == '/system-boot/file/getFileVO' ||
|
config.url == '/system-boot/file/getFileVO' ||
|
||||||
config.url == '/harmonic-boot/gridDiagram/getGridDiagramAreaData'
|
config.url == '/harmonic-boot/gridDiagram/getGridDiagramAreaData' ||
|
||||||
|
config.url == '/supervision-boot/userReport/bindAssessmentId'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
removePending(config)
|
removePending(config)
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ export default class TableStore {
|
|||||||
* @param data 携带数据
|
* @param data 携带数据
|
||||||
*/
|
*/
|
||||||
onTableAction = (event: string, data: anyObj) => {
|
onTableAction = (event: string, data: anyObj) => {
|
||||||
|
|
||||||
const actionFun = new Map([
|
const actionFun = new Map([
|
||||||
[
|
[
|
||||||
'search',
|
'search',
|
||||||
@@ -202,6 +203,7 @@ export default class TableStore {
|
|||||||
'export',
|
'export',
|
||||||
() => {
|
() => {
|
||||||
// this.index()
|
// this.index()
|
||||||
|
console.log('export')
|
||||||
let params = { ...this.table.params, pageNum: 1, pageSize: this.table.total }
|
let params = { ...this.table.params, pageNum: 1, pageSize: this.table.total }
|
||||||
createAxios(
|
createAxios(
|
||||||
Object.assign(
|
Object.assign(
|
||||||
@@ -213,6 +215,7 @@ export default class TableStore {
|
|||||||
)
|
)
|
||||||
).then(res => {
|
).then(res => {
|
||||||
this.table.allData = filtration(res.data.records || res.data)
|
this.table.allData = filtration(res.data.records || res.data)
|
||||||
|
console.log('11111',this.table)
|
||||||
this.table.exportProcessingData && this.table.exportProcessingData()
|
this.table.exportProcessingData && this.table.exportProcessingData()
|
||||||
this.table.allFlag = data.showAllFlag || true
|
this.table.allFlag = data.showAllFlag || true
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ const tableStore: any = new TableStore({
|
|||||||
{ field: 'describe', title: '事件描述' },
|
{ field: 'describe', title: '事件描述' },
|
||||||
{ field: 'type', title: '事件类型', sortable: true },
|
{ field: 'type', title: '事件类型', sortable: true },
|
||||||
{ field: 'result', title: '操作结果', sortable: true },
|
{ field: 'result', title: '操作结果', sortable: true },
|
||||||
{ field: 'ip', title: '操作IP' },
|
{ field: 'ip', title: '操作IP' ,width:'120px'},
|
||||||
{ field: 'level', title: '事件等级', sortable: true }
|
{ field: 'level', title: '事件等级', sortable: true }
|
||||||
],
|
],
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const tableStore: any = new TableStore({
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ field: 'userName', title: '登录用户' },
|
{ field: 'userName', title: '登录用户' },
|
||||||
{ field: 'ip', title: '登录ip' },
|
{ field: 'ip', title: '登录ip' ,width:'120px'},
|
||||||
{ field: 'time', title: '登录时间' }
|
{ field: 'time', title: '登录时间' }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -56,8 +56,10 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="区域" prop="regionList">
|
<el-form-item label="区域" prop="regionList">
|
||||||
<el-cascader v-model="form.regionList" style="width: 100%" :props="props" :options="areaList" />
|
<!-- <el-cascader v-model="form.regionList" style="width: 100%" :props="props" :options="areaList" /> -->
|
||||||
|
<el-cascader v-model="form.regionList" :props="props" :options="areaList" style="width: 100%" placeholder="请选择区域" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="详细地址:" prop="area">
|
<el-form-item label="详细地址:" prop="area">
|
||||||
<el-input
|
<el-input
|
||||||
clearable
|
clearable
|
||||||
@@ -93,6 +95,8 @@ import { mainHeight } from '@/utils/layout'
|
|||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import equipment from './equipment.vue'
|
import equipment from './equipment.vue'
|
||||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||||
|
import { getAreaDept } from '@/api/harmonic-boot/area'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'estimate/photovoltaic'
|
name: 'estimate/photovoltaic'
|
||||||
})
|
})
|
||||||
@@ -104,7 +108,8 @@ const disabled = ref(false)
|
|||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const equipmentRef = ref()
|
const equipmentRef = ref()
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
const areaList: any = dictData.areaSelect()
|
//const areaList: any = dictData.areaSelect()
|
||||||
|
const areaList = ref([])
|
||||||
const userShow: any = ref('Power_Station_Users')
|
const userShow: any = ref('Power_Station_Users')
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
@@ -263,14 +268,20 @@ tableStore.table.params.userType = ''
|
|||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
const useChange = (e: string) => {
|
const useChange = (e: string) => {
|
||||||
userShow.value = uesrList.filter(item => item.id == e)[0].code
|
userShow.value = uesrList.filter(item => item.id == e)[0].code
|
||||||
}
|
}
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = async () => {
|
||||||
disabled.value = false
|
disabled.value = false
|
||||||
title.value = '新增承载能力待评估用户'
|
title.value = '新增承载能力待评估用户'
|
||||||
|
|
||||||
|
await getAreaDept().then(res => {
|
||||||
|
areaList.value = JSON.parse(JSON.stringify(res.data))
|
||||||
|
})
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
// 保存
|
// 保存
|
||||||
|
|||||||
@@ -218,6 +218,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
|
|||||||
import { ElButton } from 'element-plus'
|
import { ElButton } from 'element-plus'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import Bind from './bind.vue'
|
import Bind from './bind.vue'
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'hainan'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'BusinessAdministrator/TerminalManagement/FrontManagement'
|
name: 'BusinessAdministrator/TerminalManagement/FrontManagement'
|
||||||
})
|
})
|
||||||
@@ -270,7 +271,7 @@ const tableStore = new TableStore({
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '名称', field: 'name' },
|
{ title: '名称', field: 'name' },
|
||||||
{ title: 'IP', field: 'ip' },
|
{ title: 'IP', field: 'ip' ,width:'120px' },
|
||||||
{
|
{
|
||||||
title: '等级',
|
title: '等级',
|
||||||
field: 'nodeGrade',
|
field: 'nodeGrade',
|
||||||
@@ -338,6 +339,9 @@ const tableStore = new TableStore({
|
|||||||
type: 'warning',
|
type: 'warning',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
|
disabled: row => {
|
||||||
|
return VITE_FLAG
|
||||||
|
},
|
||||||
popconfirm: {
|
popconfirm: {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
:checkbox-config="{ labelField: 'name' }"
|
:checkbox-config="{ labelField: 'name' }"
|
||||||
>
|
>
|
||||||
<vxe-column field="name" align="left" title="电网拓扑" min-width="200" tree-node></vxe-column>
|
<vxe-column field="name" align="left" title="电网拓扑" min-width="200" tree-node></vxe-column>
|
||||||
<vxe-column field="ip" title="网络参数"></vxe-column>
|
<vxe-column field="ip" title="网络参数" width="120px"></vxe-column>
|
||||||
<vxe-column field="runFlag" title="终端状态" v-if="key == 0">
|
<vxe-column field="runFlag" title="终端状态" v-if="key == 0">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag v-if="row.runFlag === 0" type="success" size="small">投运</el-tag>
|
<el-tag v-if="row.runFlag === 0" type="success" size="small">投运</el-tag>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="version" title="版本信息"></vxe-column>
|
<vxe-column field="version" title="版本信息"></vxe-column>
|
||||||
<vxe-column field="ip" title="网络参数"></vxe-column>
|
<vxe-column field="ip" title="网络参数" width="120px"></vxe-column>
|
||||||
|
|
||||||
<vxe-column field="runFlag" title="终端状态">
|
<vxe-column field="runFlag" title="终端状态">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
|
<div v-if="detailLoading" class="loading">
|
||||||
|
<el-spin description="加载中..." />
|
||||||
|
</div>
|
||||||
|
<div v-else>
|
||||||
<el-descriptions :column="2" border>
|
<el-descriptions :column="2" border>
|
||||||
<el-descriptions-item label="所在地市">
|
<el-descriptions-item label="所在地市">
|
||||||
{{ detailData.city }}
|
{{ detailData.city }}
|
||||||
@@ -110,10 +114,7 @@
|
|||||||
>
|
>
|
||||||
{{ proviteData.agreementCapacity }}
|
{{ proviteData.agreementCapacity }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item
|
<el-descriptions-item label="装机容量(MW)">
|
||||||
label="装机容量(MW)"
|
|
||||||
|
|
||||||
>
|
|
||||||
{{ proviteData?.ratePower }}
|
{{ proviteData?.ratePower }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item
|
<el-descriptions-item
|
||||||
@@ -212,6 +213,7 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, reactive, watch } from 'vue'
|
import { onMounted, ref, reactive, watch } from 'vue'
|
||||||
@@ -485,7 +487,7 @@ const getProviteData = async () => {
|
|||||||
getFileNamePath(proviteData.value.additionalAttachments, 'additionalAttachments')
|
getFileNamePath(proviteData.value.additionalAttachments, 'additionalAttachments')
|
||||||
}
|
}
|
||||||
|
|
||||||
// 入网评估报告
|
// 系统接入方案
|
||||||
if (detailData.value.netInReport.length > 0) {
|
if (detailData.value.netInReport.length > 0) {
|
||||||
netInReportList.value = []
|
netInReportList.value = []
|
||||||
detailData.value.netInReport.forEach((item: any) => {
|
detailData.value.netInReport.forEach((item: any) => {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '事件描述', field: 'describe', align: 'center', showOverflow: true,minWidth: 200 },
|
{ title: '事件描述', field: 'describe', align: 'center', showOverflow: true,minWidth: 200 },
|
||||||
{ title: '事件类型', field: 'type', align: 'center', width: 160 },
|
{ title: '事件类型', field: 'type', align: 'center', width: 160 },
|
||||||
{ title: '操作结果', field: 'type', align: 'center', width: 100 },
|
{ title: '操作结果', field: 'type', align: 'center', width: 100 },
|
||||||
{ title: '操作IP', field: 'ip', align: 'center', width: 160 },
|
{ title: '操作IP', field: 'ip', align: 'center', width: 120 },
|
||||||
{ title: '事件等级', field: 'level', align: 'center', width: 100 }
|
{ title: '事件等级', field: 'level', align: 'center', width: 100 }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,346 +1,59 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main" :style="height">
|
<div class="default-main">
|
||||||
<!-- 算法库 -->
|
<el-tabs v-model="activeName" type="border-card">
|
||||||
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
<el-tab-pane label="总览" name="1" v-if="tabList.includes('1')">
|
||||||
<pane :size="size">
|
<overview v-if="activeName == '1'" @algorithm="algorithm" />
|
||||||
<algorithmTree
|
</el-tab-pane>
|
||||||
ref="treeRef"
|
<el-tab-pane label="算法库" name="2" v-if="tabList.includes('2')">
|
||||||
:default-expand-all="false"
|
<list v-if="activeName == '2'" ref="listRef" />
|
||||||
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
</el-tab-pane>
|
||||||
:current-node-key="monitoringPoint.state.lineId"
|
</el-tabs>
|
||||||
@node-click="handleNodeClick"
|
|
||||||
@init="handleNodeClick"
|
|
||||||
@onAddTree="onAddTree"
|
|
||||||
></algorithmTree>
|
|
||||||
</pane>
|
|
||||||
<pane style="background: #fff" :style="height">
|
|
||||||
<div class="boxTop">
|
|
||||||
<div>
|
|
||||||
<el-radio-group v-model="radio">
|
|
||||||
<el-radio-button v-for="(item, i) in dotList?.childrens" :label="item.name" :value="i" />
|
|
||||||
</el-radio-group>
|
|
||||||
</div>
|
|
||||||
<div v-if="information">
|
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
|
|
||||||
<el-button icon="el-icon-Edit" type="primary" @click="revise">修改</el-button>
|
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deletes">删除</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<div :style="heightTab">
|
|
||||||
<vxe-table height="auto" v-bind="defaultAttribute" :data="dotList?.childrens[radio]?.children">
|
|
||||||
<vxe-column field="name" title="算法名称"></vxe-column>
|
|
||||||
<vxe-column field="createTime" title="创建时间"></vxe-column>
|
|
||||||
|
|
||||||
<vxe-column field="period" title="计算周期">
|
|
||||||
<template #default="{ row }">
|
|
||||||
{{
|
|
||||||
row.period == 0
|
|
||||||
? '日'
|
|
||||||
: row.period == 1
|
|
||||||
? '月'
|
|
||||||
: row.period == 2
|
|
||||||
? '季'
|
|
||||||
: row.period == 3
|
|
||||||
? '年'
|
|
||||||
: ''
|
|
||||||
}}
|
|
||||||
</template>
|
|
||||||
</vxe-column>
|
|
||||||
<vxe-column field="source" title="数据来源"></vxe-column>
|
|
||||||
<!-- <vxe-column field="useFLag" title="是否启用">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-tag :type="row.useFLag === 1 ? 'success' : 'info'" effect="dark"
|
|
||||||
style="cursor: pointer" @click="change(row)">
|
|
||||||
{{ row.useFLag === 1 ? '是' : '否' }}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
</vxe-column> -->
|
|
||||||
<vxe-column field="definition" title="定义">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-button type="primary" link @click="view(row)">查看</el-button>
|
|
||||||
</template>
|
|
||||||
</vxe-column>
|
|
||||||
<!-- <vxe-column title="操作" width="150px">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-button type="primary" link @click="edit(row)">修改</el-button>
|
|
||||||
<el-button type="danger" link @click="del(row)">删除</el-button>
|
|
||||||
<el-popconfirm title="确定删除吗?" confirm-button-type='danger' @confirm="del(row)">
|
|
||||||
<template #reference>
|
|
||||||
<el-button type="danger" link>删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-popconfirm>
|
|
||||||
</template>
|
|
||||||
</vxe-column> -->
|
|
||||||
</vxe-table>
|
|
||||||
</div>
|
|
||||||
</pane>
|
|
||||||
</splitpanes>
|
|
||||||
<!-- 树弹框 -->
|
|
||||||
<addTree ref="addTreeRef" @getTree="treeRef.loadData(dotList.id)" />
|
|
||||||
<!-- 弹框 -->
|
|
||||||
<PopupEdit
|
|
||||||
ref="popupEditRef"
|
|
||||||
v-if="popupEditFlag"
|
|
||||||
@getTree="treeRef.loadData(dotList.id), (popupEditFlag = false)"
|
|
||||||
/>
|
|
||||||
<!-- 定义 -->
|
|
||||||
<el-dialog draggable v-model="viewFlag" title="定义" width="60%">
|
|
||||||
<div style="min-height: 300px; max-height: 55vh">
|
|
||||||
<div class="editor" ref="editorRef" v-html="summary" />
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
<!-- 删除 -->
|
|
||||||
<el-dialog draggable v-model="dialogVisible" title="请选择需要删除的数据" width="400">
|
|
||||||
<el-tree-select
|
|
||||||
v-model="TreeValue"
|
|
||||||
:data="TreeData"
|
|
||||||
filterable
|
|
||||||
check-strictly
|
|
||||||
:props="defaultProps"
|
|
||||||
default-expand-all
|
|
||||||
:render-after-expand="false"
|
|
||||||
/>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
|
||||||
<el-button type="primary" @click="del">删除</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, provide } from 'vue'
|
import { nextTick, ref, provide, onMounted } from 'vue'
|
||||||
import 'splitpanes/dist/splitpanes.css'
|
|
||||||
import { Splitpanes, Pane } from 'splitpanes'
|
|
||||||
import algorithmTree from '@/components/tree/pqs/algorithmTree.vue'
|
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import overview from './overview.vue'
|
||||||
import { getLineExport, getList, selectReleation } from '@/api/event-boot/report'
|
import list from './list.vue'
|
||||||
import addTree from './components/addTree.vue'
|
import { useRoute } from 'vue-router'
|
||||||
import PopupEdit from './components/form.vue'
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
const route = useRoute()
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
const Undocumented = ref()
|
||||||
import { deleteyById } from '@/api/supervision-boot/database/index'
|
const InterferenceUserTable = ref()
|
||||||
import { queryAllAlgorithmLibrary, updateAlgorithmLibrary } from '@/api/supervision-boot/database/index'
|
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
|
||||||
import katex from 'katex'
|
|
||||||
import 'katex/dist/katex.css'
|
|
||||||
const adminInfo = useAdminInfo()
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'database/algorithm'
|
name: 'supervision/interferencemanagement '
|
||||||
})
|
})
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const activeName = ref('1')
|
||||||
const height = mainHeight(20)
|
const id = ref('')
|
||||||
const heightTab = mainHeight(82)
|
const key = ref('')
|
||||||
const size = ref(23)
|
const listRef = ref()
|
||||||
const addTreeRef = ref()
|
const tabList = ref(['1', '2'])
|
||||||
const editorRef = ref()
|
|
||||||
const dialogVisible = ref(false)
|
|
||||||
const viewFlag = ref(false)
|
|
||||||
const popupEditFlag = ref(false)
|
|
||||||
const treeRef = ref()
|
|
||||||
const summary = ref('')
|
|
||||||
const popupEditRef = ref()
|
|
||||||
const TreeData = ref([])
|
|
||||||
const TreeValue = ref([])
|
|
||||||
const information = adminInfo.roleCode.includes('information_info')
|
|
||||||
|
|
||||||
const defaultProps = {
|
|
||||||
label: 'name',
|
|
||||||
value: 'id'
|
|
||||||
}
|
|
||||||
const dotList: any = ref()
|
|
||||||
|
|
||||||
const templatePolicy: any = ref([])
|
|
||||||
// const tableStore = new TableStore({
|
|
||||||
// url: '/supervision-boot/libalgorithm/queryAllAlgorithmLibrary',
|
|
||||||
// method: 'GET',
|
|
||||||
// column: [
|
|
||||||
// { title: '算法名称', field: 'name' },
|
|
||||||
// {
|
|
||||||
// title: '定义',
|
|
||||||
// field: 'name1'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '计算公式',
|
|
||||||
// field: 'name2'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '计算周期',
|
|
||||||
// field: 'name3'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '数据来源',
|
|
||||||
// field: 'name4'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '是否启用',
|
|
||||||
// field: 'name5',
|
|
||||||
// render: 'tag',
|
|
||||||
// effect: 'dark',
|
|
||||||
// custom: {
|
|
||||||
// 0: 'info',
|
|
||||||
// 1: 'success'
|
|
||||||
// },
|
|
||||||
// replaceValue: {
|
|
||||||
// 0: '否',
|
|
||||||
// 1: '是'
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// ],
|
|
||||||
// loadCallback: () => {}
|
|
||||||
// })
|
|
||||||
const radio = ref(0)
|
|
||||||
|
|
||||||
// 新增弹框
|
|
||||||
const addUser = () => {
|
|
||||||
popupEditFlag.value = true
|
|
||||||
setTimeout(() => {
|
|
||||||
popupEditRef.value.open({
|
|
||||||
title: '新增算法'
|
|
||||||
})
|
|
||||||
}, 100)
|
|
||||||
}
|
|
||||||
// 修改弹框
|
|
||||||
const revise = () => {
|
|
||||||
popupEditFlag.value = true
|
|
||||||
setTimeout(() => {
|
|
||||||
popupEditRef.value.open({
|
|
||||||
title: '修改算法',
|
|
||||||
row: dotList.value
|
|
||||||
})
|
|
||||||
}, 100)
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
let key = window.location.href.split('?')[0].slice(-1)
|
||||||
if (dom) {
|
const isNumber = /^\d$/.test(key)
|
||||||
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
if (isNumber) {
|
||||||
|
tabList.value = [key]
|
||||||
|
activeName.value = key
|
||||||
}
|
}
|
||||||
// tableStore.index()
|
|
||||||
})
|
})
|
||||||
|
const algorithm = (val: any) => {
|
||||||
const view = (row: any) => {
|
activeName.value = '2'
|
||||||
viewFlag.value = true
|
|
||||||
summary.value = row.definition
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const spans = document.querySelectorAll('span[data-value]')
|
listRef.value.getList(val)
|
||||||
// 遍历每个 span 标签
|
|
||||||
spans.forEach(function (span) {
|
|
||||||
let val = katex.renderToString(span.getAttribute('data-value'), {
|
|
||||||
throwOnError: false
|
|
||||||
})
|
|
||||||
// var newDiv = document.createElement('div');
|
|
||||||
var newDiv = span
|
|
||||||
newDiv.innerHTML = val
|
|
||||||
|
|
||||||
span.parentNode.replaceChild(newDiv, span)
|
|
||||||
})
|
|
||||||
}, 100)
|
}, 100)
|
||||||
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleNodeClick = (data: any, node: any) => {
|
|
||||||
if (data.pid != '0') {
|
|
||||||
dotList.value = data
|
|
||||||
radio.value = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const onAddTree = () => {
|
|
||||||
addTreeRef.value.open('新增')
|
|
||||||
}
|
|
||||||
const deletes = () => {
|
|
||||||
TreeValue.value = []
|
|
||||||
queryAllAlgorithmLibrary().then(res => {
|
|
||||||
TreeData.value = res.data
|
|
||||||
})
|
|
||||||
dialogVisible.value = true
|
|
||||||
}
|
|
||||||
// 删除
|
|
||||||
const del = () => {
|
|
||||||
if (TreeValue.value.length == 0) {
|
|
||||||
return ElMessage.warning('请选择数据')
|
|
||||||
}
|
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
deleteyById({ id: TreeValue.value }).then(res => {
|
|
||||||
ElMessage.success('删除成功')
|
|
||||||
dialogVisible.value = false
|
|
||||||
treeRef.value.loadData()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
// if (TreeValue.value.length > 0) {
|
|
||||||
// ElMessage.warning('请选择数据')
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
// 启用
|
|
||||||
const change = (row: any) => {
|
|
||||||
console.log('🚀 ~ change ~ row:', row)
|
|
||||||
ElMessageBox.confirm(`请确认是否${row.useFLag == 0 ? '启用' : '关闭'}算法?`, '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
type: 'warning'
|
|
||||||
}).then(() => {
|
|
||||||
updateAlgorithmLibrary({ ...row, useFLag: row.useFLag == 0 ? 1 : 0 }).then(res => {
|
|
||||||
ElMessage.success(row.useFLag == 0 ? '启用' : '关闭' + '成功')
|
|
||||||
treeRef.value.loadData(dotList.value.id)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
const layout = mainHeight(63) as any
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
|
||||||
.splitpanes.default-theme .splitpanes__pane {
|
|
||||||
background: #eaeef1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.grid-content {
|
<style lang="scss" scoped>
|
||||||
text-align: center;
|
.bars_w {
|
||||||
}
|
|
||||||
|
|
||||||
.el-divider--horizontal {
|
|
||||||
margin: 10px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mTop {
|
|
||||||
margin-top: 5px;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.boxTop {
|
|
||||||
height: 52px;
|
|
||||||
padding: 10px 10px 10px 0;
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.editor {
|
|
||||||
table {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
th,
|
:deep(.el-tabs__content) {
|
||||||
td {
|
height: v-bind('layout.height');
|
||||||
border: 1px solid black;
|
overflow-y: auto;
|
||||||
padding: 8px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
td {
|
|
||||||
background-color: #ffffff;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
359
src/views/pqs/database/algorithm/list.vue
Normal file
359
src/views/pqs/database/algorithm/list.vue
Normal file
@@ -0,0 +1,359 @@
|
|||||||
|
<template>
|
||||||
|
<div class="default-main" :style="height">
|
||||||
|
<!-- 算法库 -->
|
||||||
|
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
||||||
|
<pane :size="size">
|
||||||
|
<algorithmTree
|
||||||
|
ref="treeRef"
|
||||||
|
:default-expand-all="false"
|
||||||
|
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
||||||
|
:current-node-key="monitoringPoint.state.lineId"
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
@init="handleNodeClick"
|
||||||
|
@onAddTree="onAddTree"
|
||||||
|
></algorithmTree>
|
||||||
|
</pane>
|
||||||
|
<pane style="background: #fff; width: 100%" :style="height">
|
||||||
|
<div class="boxTop">
|
||||||
|
<div>
|
||||||
|
<el-radio-group v-model="radio">
|
||||||
|
<el-radio-button v-for="(item, i) in dotList?.childrens" :label="item.name" :value="i" />
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<div v-if="information">
|
||||||
|
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
|
||||||
|
<el-button icon="el-icon-Edit" type="primary" @click="revise">修改</el-button>
|
||||||
|
<el-button icon="el-icon-Delete" type="primary" @click="deletes">删除</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div :style="heightTab">
|
||||||
|
<vxe-table height="auto" v-bind="defaultAttribute" :data="dotList?.childrens[radio]?.children">
|
||||||
|
<vxe-column field="name" title="算法名称"></vxe-column>
|
||||||
|
<vxe-column field="createTime" title="创建时间"></vxe-column>
|
||||||
|
|
||||||
|
<vxe-column field="period" title="计算周期">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{
|
||||||
|
row.period == 0
|
||||||
|
? '日'
|
||||||
|
: row.period == 1
|
||||||
|
? '月'
|
||||||
|
: row.period == 2
|
||||||
|
? '季'
|
||||||
|
: row.period == 3
|
||||||
|
? '年'
|
||||||
|
: ''
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column field="source" title="数据来源"></vxe-column>
|
||||||
|
<!-- <vxe-column field="useFLag" title="是否启用">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag :type="row.useFLag === 1 ? 'success' : 'info'" effect="dark"
|
||||||
|
style="cursor: pointer" @click="change(row)">
|
||||||
|
{{ row.useFLag === 1 ? '是' : '否' }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</vxe-column> -->
|
||||||
|
<vxe-column field="definition" title="定义">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button type="primary" link @click="view(row)">查看</el-button>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<!-- <vxe-column title="操作" width="150px">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button type="primary" link @click="edit(row)">修改</el-button>
|
||||||
|
<el-button type="danger" link @click="del(row)">删除</el-button>
|
||||||
|
<el-popconfirm title="确定删除吗?" confirm-button-type='danger' @confirm="del(row)">
|
||||||
|
<template #reference>
|
||||||
|
<el-button type="danger" link>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-popconfirm>
|
||||||
|
</template>
|
||||||
|
</vxe-column> -->
|
||||||
|
</vxe-table>
|
||||||
|
</div>
|
||||||
|
</pane>
|
||||||
|
</splitpanes>
|
||||||
|
<!-- 树弹框 -->
|
||||||
|
<addTree ref="addTreeRef" @getTree="treeRef.loadData(dotList.id)" />
|
||||||
|
<!-- 弹框 -->
|
||||||
|
<PopupEdit
|
||||||
|
ref="popupEditRef"
|
||||||
|
v-if="popupEditFlag"
|
||||||
|
@getTree="treeRef.loadData(dotList.id), (popupEditFlag = false)"
|
||||||
|
/>
|
||||||
|
<!-- 定义 -->
|
||||||
|
<el-dialog draggable v-model="viewFlag" title="定义" width="60%">
|
||||||
|
<div style="min-height: 300px; max-height: 55vh">
|
||||||
|
<div class="editor" ref="editorRef" v-html="summary" />
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 删除 -->
|
||||||
|
<el-dialog draggable v-model="dialogVisible" title="请选择需要删除的数据" width="400">
|
||||||
|
<el-tree-select
|
||||||
|
v-model="TreeValue"
|
||||||
|
:data="TreeData"
|
||||||
|
filterable
|
||||||
|
check-strictly
|
||||||
|
:props="defaultProps"
|
||||||
|
default-expand-all
|
||||||
|
:render-after-expand="false"
|
||||||
|
/>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="del">删除</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onMounted, ref, provide, nextTick } from 'vue'
|
||||||
|
import 'splitpanes/dist/splitpanes.css'
|
||||||
|
import { Splitpanes, Pane } from 'splitpanes'
|
||||||
|
import algorithmTree from '@/components/tree/pqs/algorithmTree.vue'
|
||||||
|
import { mainHeight } from '@/utils/layout'
|
||||||
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
|
import { getLineExport, selectReleation } from '@/api/event-boot/report'
|
||||||
|
import addTree from './components/addTree.vue'
|
||||||
|
import PopupEdit from './components/form.vue'
|
||||||
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
import { deleteyById } from '@/api/supervision-boot/database/index'
|
||||||
|
import { queryAllAlgorithmLibrary, updateAlgorithmLibrary } from '@/api/supervision-boot/database/index'
|
||||||
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
|
import katex from 'katex'
|
||||||
|
import 'katex/dist/katex.css'
|
||||||
|
const adminInfo = useAdminInfo()
|
||||||
|
defineOptions({
|
||||||
|
name: 'database/algorithm'
|
||||||
|
})
|
||||||
|
const monitoringPoint = useMonitoringPoint()
|
||||||
|
const height = mainHeight(20)
|
||||||
|
const heightTab = mainHeight(82)
|
||||||
|
const size = ref(23)
|
||||||
|
const addTreeRef = ref()
|
||||||
|
const editorRef = ref()
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
const viewFlag = ref(false)
|
||||||
|
const popupEditFlag = ref(false)
|
||||||
|
const treeRef = ref()
|
||||||
|
const summary = ref('')
|
||||||
|
const popupEditRef = ref()
|
||||||
|
const TreeData = ref([])
|
||||||
|
const TreeValue = ref([])
|
||||||
|
const information = adminInfo.roleCode.includes('information_info')
|
||||||
|
|
||||||
|
const defaultProps = {
|
||||||
|
label: 'name',
|
||||||
|
value: 'id'
|
||||||
|
}
|
||||||
|
const dotList: any = ref()
|
||||||
|
|
||||||
|
const templatePolicy: any = ref([])
|
||||||
|
// const tableStore = new TableStore({
|
||||||
|
// url: '/supervision-boot/libalgorithm/queryAllAlgorithmLibrary',
|
||||||
|
// method: 'GET',
|
||||||
|
// column: [
|
||||||
|
// { title: '算法名称', field: 'name' },
|
||||||
|
// {
|
||||||
|
// title: '定义',
|
||||||
|
// field: 'name1'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '计算公式',
|
||||||
|
// field: 'name2'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '计算周期',
|
||||||
|
// field: 'name3'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '数据来源',
|
||||||
|
// field: 'name4'
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// title: '是否启用',
|
||||||
|
// field: 'name5',
|
||||||
|
// render: 'tag',
|
||||||
|
// effect: 'dark',
|
||||||
|
// custom: {
|
||||||
|
// 0: 'info',
|
||||||
|
// 1: 'success'
|
||||||
|
// },
|
||||||
|
// replaceValue: {
|
||||||
|
// 0: '否',
|
||||||
|
// 1: '是'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// ],
|
||||||
|
// loadCallback: () => {}
|
||||||
|
// })
|
||||||
|
const radio = ref(0)
|
||||||
|
|
||||||
|
// 新增弹框
|
||||||
|
const addUser = () => {
|
||||||
|
popupEditFlag.value = true
|
||||||
|
setTimeout(() => {
|
||||||
|
popupEditRef.value.open({
|
||||||
|
title: '新增算法'
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
|
// 修改弹框
|
||||||
|
const revise = () => {
|
||||||
|
popupEditFlag.value = true
|
||||||
|
setTimeout(() => {
|
||||||
|
popupEditRef.value.open({
|
||||||
|
title: '修改算法',
|
||||||
|
row: dotList.value
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
|
if (dom) {
|
||||||
|
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||||
|
}
|
||||||
|
// tableStore.index()
|
||||||
|
})
|
||||||
|
|
||||||
|
const view = (row: any) => {
|
||||||
|
viewFlag.value = true
|
||||||
|
summary.value = row.definition
|
||||||
|
setTimeout(() => {
|
||||||
|
const spans = document.querySelectorAll('span[data-value]')
|
||||||
|
// 遍历每个 span 标签
|
||||||
|
spans.forEach(function (span) {
|
||||||
|
let val = katex.renderToString(span.getAttribute('data-value'), {
|
||||||
|
throwOnError: false
|
||||||
|
})
|
||||||
|
// var newDiv = document.createElement('div');
|
||||||
|
var newDiv = span
|
||||||
|
newDiv.innerHTML = val
|
||||||
|
|
||||||
|
span.parentNode.replaceChild(newDiv, span)
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
|
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleNodeClick = (data: any, node: any) => {
|
||||||
|
if (data.pid != '0') {
|
||||||
|
dotList.value = data
|
||||||
|
radio.value = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const onAddTree = () => {
|
||||||
|
addTreeRef.value.open('新增')
|
||||||
|
}
|
||||||
|
const deletes = () => {
|
||||||
|
TreeValue.value = []
|
||||||
|
queryAllAlgorithmLibrary().then(res => {
|
||||||
|
TreeData.value = res.data
|
||||||
|
})
|
||||||
|
dialogVisible.value = true
|
||||||
|
}
|
||||||
|
// 删除
|
||||||
|
const del = () => {
|
||||||
|
if (TreeValue.value.length == 0) {
|
||||||
|
return ElMessage.warning('请选择数据')
|
||||||
|
}
|
||||||
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteyById({ id: TreeValue.value }).then(res => {
|
||||||
|
ElMessage.success('删除成功')
|
||||||
|
dialogVisible.value = false
|
||||||
|
treeRef.value.loadData()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// if (TreeValue.value.length > 0) {
|
||||||
|
// ElMessage.warning('请选择数据')
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
// 启用
|
||||||
|
const change = (row: any) => {
|
||||||
|
console.log('🚀 ~ change ~ row:', row)
|
||||||
|
ElMessageBox.confirm(`请确认是否${row.useFLag == 0 ? '启用' : '关闭'}算法?`, '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
updateAlgorithmLibrary({ ...row, useFLag: row.useFLag == 0 ? 1 : 0 }).then(res => {
|
||||||
|
ElMessage.success(row.useFLag == 0 ? '启用' : '关闭' + '成功')
|
||||||
|
treeRef.value.loadData(dotList.value.id)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const getList = (val: any) => {
|
||||||
|
setTimeout(async () => {
|
||||||
|
dotList.value = await treeRef.value.setKey(val.data.pid)
|
||||||
|
await dotList.value?.childrens.forEach((item: any, i: number) => {
|
||||||
|
if (item.id == val.data.id) {
|
||||||
|
radio.value = i
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
defineExpose({
|
||||||
|
getList
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.splitpanes.default-theme .splitpanes__pane {
|
||||||
|
background: #eaeef1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-content {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-divider--horizontal {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mTop {
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxTop {
|
||||||
|
height: 52px;
|
||||||
|
padding: 10px 10px 10px 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor {
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
th,
|
||||||
|
td {
|
||||||
|
border: 1px solid black;
|
||||||
|
padding: 8px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
196
src/views/pqs/database/algorithm/overview.vue
Normal file
196
src/views/pqs/database/algorithm/overview.vue
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
<template>
|
||||||
|
<div class="default-main pt50" :style="height">
|
||||||
|
<!-- 算法库 -->
|
||||||
|
<!-- -->
|
||||||
|
|
||||||
|
<MyEchart :options="echartList" style="width: 100%" :style="height" @echart-click="echartClick"></MyEchart>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onMounted, ref, provide } from 'vue'
|
||||||
|
import 'splitpanes/dist/splitpanes.css'
|
||||||
|
|
||||||
|
import { mainHeight } from '@/utils/layout'
|
||||||
|
|
||||||
|
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
import { queryAllAlgorithmLibrary, updateAlgorithmLibrary } from '@/api/supervision-boot/database/index'
|
||||||
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
|
import 'katex/dist/katex.css'
|
||||||
|
import { useConfig } from '@/stores/config'
|
||||||
|
const router = useRouter()
|
||||||
|
const config = useConfig()
|
||||||
|
const adminInfo = useAdminInfo()
|
||||||
|
defineOptions({
|
||||||
|
name: 'database/algorithm'
|
||||||
|
})
|
||||||
|
const emits = defineEmits(['algorithm'])
|
||||||
|
const height = mainHeight(20)
|
||||||
|
const size = ref(23)
|
||||||
|
|
||||||
|
const popupEditFlag = ref(false)
|
||||||
|
|
||||||
|
const popupEditRef = ref()
|
||||||
|
const TreeList: any = ref([])
|
||||||
|
|
||||||
|
const echartList = ref({})
|
||||||
|
|
||||||
|
const dotList: any = ref()
|
||||||
|
|
||||||
|
const radio = ref(0)
|
||||||
|
|
||||||
|
// 新增弹框
|
||||||
|
const addUser = () => {
|
||||||
|
popupEditFlag.value = true
|
||||||
|
setTimeout(() => {
|
||||||
|
popupEditRef.value.open({
|
||||||
|
title: '新增算法'
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
|
if (dom) {
|
||||||
|
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||||
|
}
|
||||||
|
info()
|
||||||
|
// tableStore.index()
|
||||||
|
})
|
||||||
|
|
||||||
|
const info = () => {
|
||||||
|
queryAllAlgorithmLibrary().then(async res => {
|
||||||
|
TreeList.value = await setTreeAllNodeExpand([
|
||||||
|
{
|
||||||
|
name: '算法库',
|
||||||
|
level: 0,
|
||||||
|
children: res.data
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
echartList.value = {
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
type: 'tree',
|
||||||
|
data: TreeList.value,
|
||||||
|
top: '20',
|
||||||
|
bottom: '40',
|
||||||
|
left: '20',
|
||||||
|
symbolSize: 7,
|
||||||
|
label: {
|
||||||
|
position: 'left',
|
||||||
|
verticalAlign: 'middle',
|
||||||
|
align: 'left',
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: 600,
|
||||||
|
backgroundColor: config.layout.elementUiPrimary[0],
|
||||||
|
color: '#fff',
|
||||||
|
borderRadius: 5,
|
||||||
|
formatter: function (params) {
|
||||||
|
return [`{name|${params.data.name}}`]
|
||||||
|
},
|
||||||
|
rich: {
|
||||||
|
name: {
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: 'bold',
|
||||||
|
padding: [10, 10]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
leaves: {
|
||||||
|
label: {
|
||||||
|
position: 'left',
|
||||||
|
verticalAlign: 'middle',
|
||||||
|
fontWeight: 600,
|
||||||
|
align: 'left'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
edgeShape: 'polyline', // 折线连接线
|
||||||
|
roam: true, // 可移动,可缩放
|
||||||
|
expandAndCollapse: false,
|
||||||
|
animationDuration: 550,
|
||||||
|
animationDurationUpdate: 750
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 点击echart
|
||||||
|
const echartClick = (params: any) => {
|
||||||
|
if(params.data.level == 3){
|
||||||
|
emits('algorithm', params)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const setTreeAllNodeExpand = (treeData: any) => {
|
||||||
|
if (!treeData) return []
|
||||||
|
// 兼容单对象/数组两种树数据格式
|
||||||
|
const data = Array.isArray(treeData) ? treeData : [treeData]
|
||||||
|
return data.map(node => {
|
||||||
|
// 深拷贝节点,彻底隔离原数据
|
||||||
|
const newNode = {
|
||||||
|
...node,
|
||||||
|
collapsed: node.level <= 2 ? false : true // 强制添加展开属性
|
||||||
|
}
|
||||||
|
// 递归处理子节点
|
||||||
|
if (node.children && node.children.length > 0) {
|
||||||
|
newNode.children = setTreeAllNodeExpand(node.children)
|
||||||
|
}
|
||||||
|
return newNode
|
||||||
|
})
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.splitpanes.default-theme .splitpanes__pane {
|
||||||
|
background: #eaeef1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid-content {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-divider--horizontal {
|
||||||
|
margin: 10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mTop {
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.boxTop {
|
||||||
|
height: 52px;
|
||||||
|
padding: 10px 10px 10px 0;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor {
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
th,
|
||||||
|
td {
|
||||||
|
border: 1px solid black;
|
||||||
|
padding: 8px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.button {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -50,6 +50,7 @@ import { ref, reactive } from 'vue'
|
|||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
import { getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
||||||
import { Download, View } from '@element-plus/icons-vue'
|
import { Download, View } from '@element-plus/icons-vue'
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const tableData: any = ref({
|
const tableData: any = ref({
|
||||||
|
|
||||||
|
|||||||
@@ -52,12 +52,18 @@ const num = ref(0)
|
|||||||
const url = ref('')
|
const url = ref('')
|
||||||
const excelOptions = ref({})
|
const excelOptions = ref({})
|
||||||
const information = adminInfo.roleCode.includes('information_info')
|
const information = adminInfo.roleCode.includes('information_info')
|
||||||
|
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
const open = (row: any) => {
|
const open = (row: any) => {
|
||||||
// console.log('🚀 ~ open ~ row:', row)
|
// console.log('🚀 ~ open ~ row:', row)
|
||||||
// url.value = row
|
// url.value = row
|
||||||
drawer.value = true
|
drawer.value = true
|
||||||
|
if(VITE_FLAG){
|
||||||
url.value = `/api-docx/excelreport` + row
|
url.value = `/api-docx/excelreport` + row
|
||||||
excelOptions.value = { xls: row.split('.')[1] == 'xls' ? true : false }
|
excelOptions.value = { xls: row.split('.')[1] == 'xls' ? true : false }
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
// getFileNameAndFilePath({ filePath: row }).then(res => {
|
// getFileNameAndFilePath({ filePath: row }).then(res => {
|
||||||
// url.value = res.data.url
|
// url.value = res.data.url
|
||||||
// })
|
// })
|
||||||
|
|||||||
@@ -20,13 +20,13 @@
|
|||||||
<el-empty v-if="url.length == 0" description="暂无数据" class="custom-empty"
|
<el-empty v-if="url.length == 0" description="暂无数据" class="custom-empty"
|
||||||
:style="`height: calc(${height.height} - 60px);`" />
|
:style="`height: calc(${height.height} - 60px);`" />
|
||||||
<div :style="`height: calc(${height.height} - 60px);overflow: auto;`" v-else>
|
<div :style="`height: calc(${height.height} - 60px);overflow: auto;`" v-else>
|
||||||
<vue-office-docx v-if="url.includes('.doc') || url.includes('.docx')" :src="url" />
|
<vue-office-docx v-if="urlKey.includes('.doc') || urlKey.includes('.docx')" :src="url" />
|
||||||
<vue-office-excel v-if="url.includes('.xls') || url.includes('.xlsx')" :src="url"
|
<vue-office-excel v-if="urlKey.includes('.xls') || urlKey.includes('.xlsx')" :src="url"
|
||||||
:options="excelOptions" />
|
:options="excelOptions" />
|
||||||
<!-- <vue-office-pdf v-if="url.includes('.pdf')" :src="url"/> -->
|
<!-- <vue-office-pdf v-if="url.includes('.pdf')" :src="url"/> -->
|
||||||
<iframe v-if="url.includes('.pdf')" :src="url" style="width: 100%; height: 99%"></iframe>
|
<iframe v-if="urlKey.includes('.pdf')" :src="url" style="width: 100%; height: 99%"></iframe>
|
||||||
<img v-if="
|
<img v-if="
|
||||||
url.includes('.png') || url.includes('.jpg') || url.includes('.gif') || url.includes('.bmp')
|
urlKey.includes('.png') || urlKey.includes('.jpg') || urlKey.includes('.gif') || urlKey.includes('.bmp')
|
||||||
" :src="url" />
|
" :src="url" />
|
||||||
</div>
|
</div>
|
||||||
</pane>
|
</pane>
|
||||||
@@ -56,6 +56,7 @@ import VueOfficeExcel from '@vue-office/excel'
|
|||||||
import VueOfficePdf from '@vue-office/pdf'
|
import VueOfficePdf from '@vue-office/pdf'
|
||||||
import { deleteyLibstandard } from '@/api/supervision-boot/database/index'
|
import { deleteyLibstandard } from '@/api/supervision-boot/database/index'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
|
import {previewFile } from '@/utils/fileDownLoad'
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'database/standard'
|
name: 'database/standard'
|
||||||
@@ -77,6 +78,8 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const urlKey=ref('')
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
const handleNodeClick = (data: any, node: any) => {
|
const handleNodeClick = (data: any, node: any) => {
|
||||||
console.log("🚀 ~ handleNodeClick ~ data:", data)
|
console.log("🚀 ~ handleNodeClick ~ data:", data)
|
||||||
dotList.value = data
|
dotList.value = data
|
||||||
@@ -84,10 +87,16 @@ const handleNodeClick = (data: any, node: any) => {
|
|||||||
flag.value = false
|
flag.value = false
|
||||||
if (data?.url != null && data?.url != '') {
|
if (data?.url != null && data?.url != '') {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
|
urlKey.value = data.url
|
||||||
setTimeout(() => {
|
setTimeout(async () => {
|
||||||
|
if(VITE_FLAG){
|
||||||
url.value = `/api-docx/excelreport` + data.url
|
url.value = `/api-docx/excelreport` + data.url
|
||||||
excelOptions.value = { xls: data.url.split('.')[1] == 'xls' ? true : false }
|
excelOptions.value = { xls: data.url.split('.')[1] == 'xls' ? true : false }
|
||||||
|
}else{
|
||||||
|
const previewUrl = await previewFile(data.url);
|
||||||
|
url.value = previewUrl;
|
||||||
|
}
|
||||||
|
|
||||||
// getFileNameAndFilePath({ filePath: data.url }).then(res => {
|
// getFileNameAndFilePath({ filePath: data.url }).then(res => {
|
||||||
// url.value = res.data.url
|
// url.value = res.data.url
|
||||||
// })
|
// })
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
const information = adminInfo.roleCode.includes('information_info')
|
const information = adminInfo.roleCode.includes('information_info')
|
||||||
const popupEditRef = ref()
|
const popupEditRef = ref()
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
@@ -59,6 +59,9 @@ const tableStore = new TableStore({
|
|||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
|
// disabled: row => {
|
||||||
|
// return !VITE_FLAG
|
||||||
|
// },
|
||||||
click: row => {
|
click: row => {
|
||||||
window.open(window.location.origin + '/#/previewFile?' + row.url)
|
window.open(window.location.origin + '/#/previewFile?' + row.url)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'lineName', title: '监测点名称', minWidth: '180' },
|
{ field: 'lineName', title: '监测点名称', minWidth: '180' },
|
||||||
{ field: 'gdName', title: '供电公司', minWidth: '120' },
|
{ field: 'gdName', title: '供电公司', minWidth: '120' },
|
||||||
{ field: 'subName', title: '变电站', minWidth: '150' },
|
{ field: 'subName', title: '变电站', minWidth: '150' },
|
||||||
{ field: 'ip', title: '网络参数', minWidth: '110' },
|
{ field: 'ip', title: '网络参数' ,width:'120px' },
|
||||||
{ field: 'scale', title: '电压等级', minWidth: '110' },
|
{ field: 'scale', title: '电压等级', minWidth: '110' },
|
||||||
// {
|
// {
|
||||||
// field: 'advanceType',
|
// field: 'advanceType',
|
||||||
|
|||||||
@@ -75,11 +75,11 @@ const tableStore = new TableStore({
|
|||||||
yData = []
|
yData = []
|
||||||
chartsData.value.map((item: any) => {
|
chartsData.value.map((item: any) => {
|
||||||
xData.push(item.type)
|
xData.push(item.type)
|
||||||
if (item.single == 0 || item.single == 3.14159) {
|
// if (item.single == 0 || item.single == 3.14159) {
|
||||||
yData.push(1)
|
// yData.push(0)
|
||||||
} else {
|
// } else {
|
||||||
yData.push(item.single)
|
yData.push(item.single)
|
||||||
}
|
//}
|
||||||
})
|
})
|
||||||
// tableStore.table.data.type
|
// tableStore.table.data.type
|
||||||
const legendColorList = ['#0099CC', '#9A6601', '#CCCCCC', '#FFFFFF']
|
const legendColorList = ['#0099CC', '#9A6601', '#CCCCCC', '#FFFFFF']
|
||||||
@@ -111,7 +111,19 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
formatter: function (params: any) {
|
||||||
|
var tips = ''
|
||||||
|
for (var i = 0; i < params.length; i++) {
|
||||||
|
if (params[i].value == 3.14159) {
|
||||||
|
tips += params[i].name + '</br>'
|
||||||
|
tips += params[i].marker + '完整性:暂无数据'
|
||||||
|
} else {
|
||||||
|
tips += params[i].name + '</br>'
|
||||||
|
tips += params[i].marker + '完整性:' + params[i].value.toFixed(2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tips
|
||||||
|
}
|
||||||
// formatter: function (params: any) {
|
// formatter: function (params: any) {
|
||||||
// var tips = `<div style="min-width:80px;display:flex;justify-content:space-between;align-items:center">
|
// var tips = `<div style="min-width:80px;display:flex;justify-content:space-between;align-items:center">
|
||||||
// <span style="margin-left:5px;dislpay:block;min-width:80px;color:#000">${params[0].name}</span></div>`
|
// <span style="margin-left:5px;dislpay:block;min-width:80px;color:#000">${params[0].name}</span></div>`
|
||||||
@@ -181,7 +193,21 @@ const tableStore = new TableStore({
|
|||||||
|
|
||||||
// 定制显示(按顺序)
|
// 定制显示(按顺序)
|
||||||
color: function (params) {
|
color: function (params) {
|
||||||
if (params.value >= 90) {
|
if (params.value == 3.14159) {
|
||||||
|
return new echarts.graphic.LinearGradient(
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#ccc'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
false
|
||||||
|
)
|
||||||
|
} else if (params.value >= 90) {
|
||||||
return new echarts.graphic.LinearGradient(
|
return new echarts.graphic.LinearGradient(
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
@@ -209,7 +235,7 @@ const tableStore = new TableStore({
|
|||||||
],
|
],
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
} else if (params.value > 0.5 && params.value <= 60) {
|
} else if (params.value > 0 && params.value <= 60) {
|
||||||
return new echarts.graphic.LinearGradient(
|
return new echarts.graphic.LinearGradient(
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
@@ -223,7 +249,7 @@ const tableStore = new TableStore({
|
|||||||
],
|
],
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
} else if (params.value > 0 && params.value <= 0.5) {
|
} else if (params.value == 0) {
|
||||||
return new echarts.graphic.LinearGradient(
|
return new echarts.graphic.LinearGradient(
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button type="primary" icon="el-icon-Tickets" @click="makeUp">补招</el-button>
|
<el-button type="primary" icon="el-icon-Tickets" @click="makeUp" v-if="!VITE_FLAG">补招</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
</div>
|
</div>
|
||||||
@@ -113,6 +113,7 @@ const adminInfo = useAdminInfo()
|
|||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/harmonic/getIntegrityData'
|
name: 'harmonic-boot/harmonic/getIntegrityData'
|
||||||
})
|
})
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'hainan'
|
||||||
const logRef = ref()
|
const logRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const chartsRef = ref()
|
const chartsRef = ref()
|
||||||
@@ -194,7 +195,7 @@ const tableStore = new TableStore({
|
|||||||
{
|
{
|
||||||
title: '网络参数',
|
title: '网络参数',
|
||||||
field: 'ip',
|
field: 'ip',
|
||||||
align: 'center',
|
align: 'center',width:'120px',
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,10 +109,10 @@ const tableStore = new TableStore({
|
|||||||
for (var i = 0; i < params.length; i++) {
|
for (var i = 0; i < params.length; i++) {
|
||||||
if (params[i].value == 1) {
|
if (params[i].value == 1) {
|
||||||
tips += params[i].name + '</br>'
|
tips += params[i].name + '</br>'
|
||||||
tips += '在线率:暂无数据'
|
tips += params[i].marker + '在线率:暂无数据'
|
||||||
} else {
|
} else {
|
||||||
tips += params[i].name + '</br>'
|
tips += params[i].name + '</br>'
|
||||||
tips += '在线率:' + params[i].value.toFixed(2)
|
tips += params[i].marker + '在线率:' + params[i].value.toFixed(2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tips
|
return tips
|
||||||
|
|||||||
@@ -131,6 +131,12 @@ import TableHeader from '@/components/table/header/index.vue'
|
|||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import charts from './components/charts.vue'
|
import charts from './components/charts.vue'
|
||||||
|
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'device-boot/getOnlineRateData'
|
||||||
|
})
|
||||||
|
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const chartsRef = ref()
|
const chartsRef = ref()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
@@ -199,7 +205,7 @@ const tableStore = new TableStore({
|
|||||||
{
|
{
|
||||||
title: '网络参数',
|
title: '网络参数',
|
||||||
field: 'ip',
|
field: 'ip',
|
||||||
align: 'center',
|
align: 'center' ,width:'120px',
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,6 +164,7 @@ provide('tableStore', tableStore)
|
|||||||
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
||||||
tableStore.table.params.monitorFlag = 2
|
tableStore.table.params.monitorFlag = 2
|
||||||
tableStore.table.params.powerFlag = sign[0]?.algoDescribe || 0
|
tableStore.table.params.powerFlag = sign[0]?.algoDescribe || 0
|
||||||
|
|
||||||
tableStore.table.params.statisticalType = {}
|
tableStore.table.params.statisticalType = {}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
贡献度计算
|
贡献度计算
|
||||||
<div style="font-size: 14px; font-weight: 500">
|
<div style="font-size: 14px; font-weight: 500">
|
||||||
<!-- {{ dotList.alias || '' }} -->
|
<!-- {{ dotList.alias || '' }} -->
|
||||||
<span class="monitoring-point">当前位置:{{ dotList.alias || '' }}</span>
|
<span class="monitoring-point1">当前位置:{{ dotList.alias || '' }}</span>
|
||||||
<back-component />
|
<back-component />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -598,7 +598,7 @@ onMounted(() => {
|
|||||||
width: 300px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.monitoring-point {
|
.monitoring-point1 {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--el-color-primary);
|
color: var(--el-color-primary);
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
<!-- 模版 -->
|
<!-- 模版 -->
|
||||||
<TableHeader datePicker showExport :showReset="false" ref="TableHeaderRef">
|
<TableHeader datePicker showExport :showReset="false" ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="关键字">
|
<!-- <el-form-item label="关键字">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" />
|
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" />
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button type="primary" icon="el-icon-CreditCard"
|
<el-button type="primary" icon="el-icon-CreditCard"
|
||||||
@@ -41,7 +41,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '供电公司', field: 'gdName' },
|
{ title: '供电公司', field: 'gdName' },
|
||||||
{ title: '变电站', field: 'subName' },
|
{ title: '变电站', field: 'subName' },
|
||||||
{ title: '终端名称', field: 'devName' },
|
{ title: '终端名称', field: 'devName' },
|
||||||
{ title: 'IP', field: 'ip' },
|
{ title: 'IP', field: 'ip' ,width:'120px' },
|
||||||
{ title: '监测点名称', field: 'lineName' },
|
{ title: '监测点名称', field: 'lineName' },
|
||||||
{ title: '类型', field: 'dataType' },
|
{ title: '类型', field: 'dataType' },
|
||||||
{ title: '谐波次数', field: 'dataTimes' },
|
{ title: '谐波次数', field: 'dataTimes' },
|
||||||
|
|||||||
@@ -1,408 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="tab-content">
|
|
||||||
<TableHeader datePicker ref="tableHeaderRef" @selectChange="handleSelectChange" >
|
|
||||||
<template #select>
|
|
||||||
<el-form-item label="区域">
|
|
||||||
<el-cascader
|
|
||||||
v-bind="$attrs"
|
|
||||||
:options="areOptions"
|
|
||||||
:props="cascaderProps"
|
|
||||||
v-model="selectedArea"
|
|
||||||
@change="handleFilterChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="统计类型">
|
|
||||||
<el-select
|
|
||||||
v-model="tableStore.table.params.statisticalType"
|
|
||||||
value-key="id"
|
|
||||||
placeholder="请选择统计类型"
|
|
||||||
@change="handleStatisticalTypeChange"
|
|
||||||
>
|
|
||||||
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="电网标志">
|
|
||||||
<el-select
|
|
||||||
v-model="tableStore.table.params.powerFlag"
|
|
||||||
placeholder="请选择电网标志"
|
|
||||||
@change="handleFilterChange"
|
|
||||||
>
|
|
||||||
<el-option label="全部" value="0"></el-option>
|
|
||||||
<el-option label="电网侧" value="1"></el-option>
|
|
||||||
<el-option label="非电网侧" value="2"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="筛选数据">
|
|
||||||
<el-input
|
|
||||||
v-model="searchKeyword"
|
|
||||||
placeholder="请输入变电站/终端/监测点"
|
|
||||||
clearable
|
|
||||||
@input="handleFilterChange"
|
|
||||||
:show-word-limit=true
|
|
||||||
:maxlength="32"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
|
||||||
<template #operation>
|
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出</el-button>
|
|
||||||
</template>
|
|
||||||
</TableHeader>
|
|
||||||
|
|
||||||
<div v-loading="tableStore.table.loading" class="main-container">
|
|
||||||
<vxe-table
|
|
||||||
class="full-height-table"
|
|
||||||
ref="tableRef"
|
|
||||||
auto-resize
|
|
||||||
:data="tableStore.table.data"
|
|
||||||
v-bind="defaultAttribute"
|
|
||||||
:height="tableHeight"
|
|
||||||
resizable
|
|
||||||
show-overflow
|
|
||||||
>
|
|
||||||
<vxe-column title="序号" width="80" type="seq" align="center"></vxe-column>
|
|
||||||
<vxe-column field="gdName" title="供电公司" align="center" min-width="120" ></vxe-column>
|
|
||||||
<vxe-column field="subStationName" :show-overflow="true" title="变电站" align="center" min-width="150"></vxe-column>
|
|
||||||
<vxe-column field="devName" title="终端名称" align="center" min-width="120"></vxe-column>
|
|
||||||
<!-- <vxe-column field="devType" title="终端型号" align="center" min-width="150"></vxe-column> -->
|
|
||||||
<!-- <vxe-column field="loginTime" title="投运时间" align="center" min-width="120"></vxe-column> -->
|
|
||||||
<vxe-column field="lineName" title="监测点名称" align="center" min-width="150" :formatter="formatMonitorId"></vxe-column>
|
|
||||||
<!-- <vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column> -->
|
|
||||||
<!-- <vxe-column field="lineVoltage" title="监测点电压等级" align="center" min-width="120"></vxe-column> -->
|
|
||||||
<!-- <vxe-column field="loadType" title="干扰源类型" align="center" min-width="120"></vxe-column> -->
|
|
||||||
<!-- <vxe-column field="objName" title="监测对象名称" align="center" min-width="150" :formatter="formatMonitorId"></vxe-column> -->
|
|
||||||
<!-- <vxe-column field="interval" title="统计间隔" align="center" min-width="100" :formatter="formatMonitorId"></vxe-column> -->
|
|
||||||
<!-- <vxe-column field="onlineRate" title="在线率(%)" align="center" min-width="100"></vxe-column> -->
|
|
||||||
<!-- <vxe-column field="integrity" title="完整率(%)" align="center" min-width="100"></vxe-column> -->
|
|
||||||
<vxe-column field="harmonicValue" :title="harmonicValueTitle" align="center" min-width="120"></vxe-column>
|
|
||||||
<!-- <vxe-column field="upCounts" title="暂升次数(次)" align="center" min-width="100"></vxe-column> -->
|
|
||||||
<!-- <vxe-column field="downCounts" title="电压暂降(次)" align="center" min-width="100"></vxe-column> -->
|
|
||||||
<!-- <vxe-column field="breakCounts" title="短时中断(次)" align="center" min-width="100"></vxe-column> -->
|
|
||||||
<!-- <vxe-column field="monitorId" title="一类监测点" align="center" min-width="120" :formatter="formatMonitorId"></vxe-column> -->
|
|
||||||
</vxe-table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pagination-container">
|
|
||||||
<el-pagination
|
|
||||||
:current-page="tableStore.table.params.pageNum"
|
|
||||||
:page-size="tableStore.table.params.pageSize"
|
|
||||||
:page-sizes="[10, 20, 50, 100]"
|
|
||||||
background
|
|
||||||
layout="sizes, total, prev, pager, next, jumper"
|
|
||||||
:total="tableStore.table.total"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
class="custom-pagination"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref, onMounted, provide, onBeforeUnmount, computed, watch } from 'vue'
|
|
||||||
import TableStore from '@/utils/tableStore'
|
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
|
||||||
import { useDictData } from '@/stores/dictData'
|
|
||||||
import { debounce } from 'lodash-es'
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
active: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const emit = defineEmits(['initialized'])
|
|
||||||
|
|
||||||
const dictData = useDictData()
|
|
||||||
const options = dictData.getBasicData('Pollution_Calc')
|
|
||||||
const tableHeight = ref(500)
|
|
||||||
const tableRef = ref()
|
|
||||||
const tableHeaderRef = ref()
|
|
||||||
|
|
||||||
const selectedArea = ref()
|
|
||||||
const areOptions: any = dictData.state.area
|
|
||||||
const allData = ref<PollutionItem[]>([])
|
|
||||||
const searchKeyword = ref('')
|
|
||||||
const harmonicValueTitle = ref('谐波电压污染值')
|
|
||||||
|
|
||||||
const cascaderProps = {
|
|
||||||
label: 'name',
|
|
||||||
value: 'id',
|
|
||||||
checkStrictly: true,
|
|
||||||
emitPath: false
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PollutionItem {
|
|
||||||
gdName?: string
|
|
||||||
subStationName?: string
|
|
||||||
devName?: string
|
|
||||||
lineName?: string
|
|
||||||
powerFlag?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
const formatMonitorId = (row: any) => {
|
|
||||||
return row.cellValue || '/'
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleSelectChange = (isExpanded: boolean) => {
|
|
||||||
if (isExpanded) {
|
|
||||||
tableHeight.value = tableHeight.value - 55
|
|
||||||
} else {
|
|
||||||
tableHeight.value = tableHeight.value + 55
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const calculateTableHeight = () => {
|
|
||||||
const windowHeight = window.innerHeight
|
|
||||||
const headerHeight = 160
|
|
||||||
const paginationHeight = 120
|
|
||||||
const padding = 30
|
|
||||||
const calculatedHeight = windowHeight - headerHeight - paginationHeight - padding
|
|
||||||
tableHeight.value = Math.max(calculatedHeight, 300)
|
|
||||||
}
|
|
||||||
|
|
||||||
const debouncedCalculateTableHeight = debounce(() => {
|
|
||||||
calculateTableHeight()
|
|
||||||
}, 300)
|
|
||||||
|
|
||||||
const filteredData = computed(() => {
|
|
||||||
let result = [...allData.value]
|
|
||||||
|
|
||||||
if (selectedArea.value) {
|
|
||||||
let areaName = ''
|
|
||||||
let areaLevel = -1
|
|
||||||
const findAreaName = (areas: any[]) => {
|
|
||||||
for (const area of areas) {
|
|
||||||
if (area.id === selectedArea.value) {
|
|
||||||
areaName = area.name
|
|
||||||
areaLevel = area.level !== undefined ? area.level : -1
|
|
||||||
break
|
|
||||||
}
|
|
||||||
if (area.children && area.children.length > 0) {
|
|
||||||
findAreaName(area.children)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
findAreaName(areOptions)
|
|
||||||
|
|
||||||
if (areaName && areaLevel > 1) {
|
|
||||||
result = result.filter(item => item.gdName && item.gdName.includes(areaName))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tableStore.table.params.powerFlag === '1') {
|
|
||||||
result = result.filter(item => item.powerFlag && !item.powerFlag.includes('非'))
|
|
||||||
} else if (tableStore.table.params.powerFlag === '2') {
|
|
||||||
result = result.filter(item => item.powerFlag && item.powerFlag.includes('非'))
|
|
||||||
}
|
|
||||||
|
|
||||||
if (searchKeyword.value) {
|
|
||||||
const keyword = searchKeyword.value.toLowerCase()
|
|
||||||
result = result.filter(item =>
|
|
||||||
(item.subStationName && item.subStationName.toLowerCase().includes(keyword)) ||
|
|
||||||
(item.devName && item.devName.toLowerCase().includes(keyword)) ||
|
|
||||||
(item.lineName && item.lineName.toLowerCase().includes(keyword))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
return result
|
|
||||||
})
|
|
||||||
|
|
||||||
const currentPageData = computed(() => {
|
|
||||||
const pageSize = tableStore.table.params.pageSize
|
|
||||||
const pageNum = tableStore.table.params.pageNum
|
|
||||||
const start = (pageNum - 1) * pageSize
|
|
||||||
const end = start + pageSize
|
|
||||||
return filteredData.value.slice(start, end)
|
|
||||||
})
|
|
||||||
|
|
||||||
const updateTotal = computed(() => {
|
|
||||||
return filteredData.value.length
|
|
||||||
})
|
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
|
||||||
url: '/harmonic-boot/PollutionSubstation/downPollutionLineCalc',
|
|
||||||
method: 'POST',
|
|
||||||
column: [],
|
|
||||||
beforeSearchFun: () => {
|
|
||||||
delete tableStore.table.params.deptIndex
|
|
||||||
delete tableStore.table.params.interval
|
|
||||||
delete tableStore.table.params.searchEndTime
|
|
||||||
delete tableStore.table.params.searchBeginTime
|
|
||||||
delete tableStore.table.params.timeFlag
|
|
||||||
},
|
|
||||||
loadCallback: () => {
|
|
||||||
allData.value = tableStore.table.data || []
|
|
||||||
tableStore.table.total = updateTotal.value
|
|
||||||
tableStore.table.data = currentPageData.value
|
|
||||||
},
|
|
||||||
resetCallback: () => {
|
|
||||||
clearQueryParams()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => areOptions,
|
|
||||||
(newOptions) => {
|
|
||||||
if (newOptions && newOptions.length > 0) {
|
|
||||||
selectedArea.value = newOptions[0].id
|
|
||||||
tableStore.table.params.id = newOptions[0].id
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ immediate: true }
|
|
||||||
)
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => options,
|
|
||||||
(newOptions) => {
|
|
||||||
if (newOptions && newOptions.length > 0) {
|
|
||||||
if (!tableStore.table.params.statisticalType) {
|
|
||||||
tableStore.table.params.statisticalType = newOptions[0]
|
|
||||||
tableStore.table.params.ids = [newOptions[0].id]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ immediate: true }
|
|
||||||
)
|
|
||||||
|
|
||||||
tableStore.table.params.powerFlag = "0"
|
|
||||||
tableStore.table.params.isUpToGrid = 0
|
|
||||||
tableStore.table.params.type = 1
|
|
||||||
|
|
||||||
const handleStatisticalTypeChange = (newVal: { id: any }) => {
|
|
||||||
if (newVal) {
|
|
||||||
tableStore.table.params.statisticalType = newVal
|
|
||||||
tableStore.table.params.ids = [newVal.id]
|
|
||||||
if (newVal.name) {
|
|
||||||
harmonicValueTitle.value = newVal.name + '污染值'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 重新调用接口
|
|
||||||
tableStore.index()
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleFilterChange = () => {
|
|
||||||
tableStore.table.params.pageNum = 1
|
|
||||||
tableStore.table.data = currentPageData.value
|
|
||||||
tableStore.table.total = updateTotal.value
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleSizeChange = (val: number) => {
|
|
||||||
tableStore.table.params.pageSize = val
|
|
||||||
tableStore.table.params.pageNum = 1
|
|
||||||
tableStore.table.data = currentPageData.value
|
|
||||||
tableStore.table.total = updateTotal.value
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleCurrentChange = (val: number) => {
|
|
||||||
tableStore.table.params.pageNum = val
|
|
||||||
tableStore.table.data = currentPageData.value
|
|
||||||
tableStore.table.total = updateTotal.value
|
|
||||||
}
|
|
||||||
|
|
||||||
const exportEvent = () => {
|
|
||||||
const allFilteredData = filteredData.value
|
|
||||||
tableRef.value.exportData({
|
|
||||||
filename: '监测点评估-污染值报告',
|
|
||||||
sheetName: 'Sheet1',
|
|
||||||
type: 'xlsx',
|
|
||||||
useStyle: true,
|
|
||||||
data: allFilteredData,
|
|
||||||
columnFilterMethod: function (column, $columnIndex) {
|
|
||||||
return !(column.$columnIndex === 0)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
if (props.active) {
|
|
||||||
tableStore.index()
|
|
||||||
emit('initialized', 'pollutionReport')
|
|
||||||
}
|
|
||||||
calculateTableHeight()
|
|
||||||
window.addEventListener('resize', debouncedCalculateTableHeight)
|
|
||||||
})
|
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
|
||||||
window.removeEventListener('resize', debouncedCalculateTableHeight)
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
const clearQueryParams = () => {
|
|
||||||
// 将区域恢复成第一层
|
|
||||||
if (areOptions && areOptions.length > 0) {
|
|
||||||
selectedArea.value = areOptions[0].id
|
|
||||||
tableStore.table.params.id = areOptions[0].id
|
|
||||||
}
|
|
||||||
|
|
||||||
// 清空搜索关键词
|
|
||||||
searchKeyword.value = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
refresh: () => {
|
|
||||||
// 清空查询参数
|
|
||||||
clearQueryParams()
|
|
||||||
tableHeaderRef.value.setTheDate(3)
|
|
||||||
tableStore.index()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.pagination-container {
|
|
||||||
border: 1px solid #ebeef5;
|
|
||||||
border-top: none;
|
|
||||||
padding: 10px;
|
|
||||||
margin: 0 0 5px 0;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination) {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination .el-pagination__sizes) {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination .el-pagination__total) {
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination .el-pagination__jump) {
|
|
||||||
margin-left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 响应式处理 */
|
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
:deep(.custom-pagination) {
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: stretch;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination .el-pagination__total) {
|
|
||||||
margin-right: 0;
|
|
||||||
order: 1;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination .el-pagination__sizes) {
|
|
||||||
order: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination .btn-prev),
|
|
||||||
:deep(.custom-pagination .el-pager),
|
|
||||||
:deep(.custom-pagination .btn-next),
|
|
||||||
:deep(.custom-pagination .el-pagination__jump) {
|
|
||||||
order: 3;
|
|
||||||
justify-content: center;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1,520 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="tab-content">
|
|
||||||
<TableHeader datePicker ref="tableHeaderRef" @selectChange="handleSelectChange">
|
|
||||||
<template #select>
|
|
||||||
<el-form-item label="区域">
|
|
||||||
<el-cascader
|
|
||||||
v-bind="$attrs"
|
|
||||||
:options="areOptions"
|
|
||||||
:props="cascaderProps"
|
|
||||||
v-model="selectedArea"
|
|
||||||
@change="handleFilterChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="统计类型">
|
|
||||||
<el-select
|
|
||||||
v-model="tableStore.table.params.statisticalType"
|
|
||||||
value-key="id"
|
|
||||||
placeholder="请选择统计类型"
|
|
||||||
@change="handleStatisticalTypeChange"
|
|
||||||
>
|
|
||||||
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="电网标志">
|
|
||||||
<el-select
|
|
||||||
v-model="tableStore.table.params.powerFlag"
|
|
||||||
placeholder="请选择电网标志"
|
|
||||||
@change="handleFilterChange"
|
|
||||||
>
|
|
||||||
<el-option label="全部" value="0"></el-option>
|
|
||||||
<el-option label="电网侧" value="1"></el-option>
|
|
||||||
<el-option label="非电网侧" value="2"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="筛选数据">
|
|
||||||
<el-input
|
|
||||||
v-model="searchKeyword"
|
|
||||||
placeholder="请输入变电站"
|
|
||||||
clearable
|
|
||||||
@input="handleFilterChange"
|
|
||||||
:show-word-limit=true
|
|
||||||
:maxlength="32"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
|
||||||
<template #operation>
|
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出</el-button>
|
|
||||||
</template>
|
|
||||||
</TableHeader>
|
|
||||||
|
|
||||||
<div v-loading="tableStore.table.loading" class="main-container">
|
|
||||||
<vxe-table
|
|
||||||
class="full-height-table"
|
|
||||||
ref="tableRef"
|
|
||||||
auto-resize
|
|
||||||
:data="tableStore.table.data"
|
|
||||||
v-bind="defaultAttribute"
|
|
||||||
:height="tableHeight"
|
|
||||||
resizable
|
|
||||||
show-overflow
|
|
||||||
>
|
|
||||||
<vxe-column title="序号" width="80" type="seq" align="center"></vxe-column>
|
|
||||||
<vxe-column field="gdName" title="供电公司" align="center" min-width="120" ></vxe-column>
|
|
||||||
<vxe-column field="subStationName" :show-overflow="true" title="变电站" align="center" min-width="150"></vxe-column>
|
|
||||||
<vxe-column field="subVStationValue" :title="harmonicValueTitle" align="center" min-width="150"></vxe-column>
|
|
||||||
<vxe-column field="subVoltage" title="变电站电压等级" align="center" min-width="150"></vxe-column>
|
|
||||||
<vxe-column title="操作" width="150" align="center">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-button size="small" type="primary" @click="showDetailDialog(row)">监测点详情</el-button>
|
|
||||||
</template>
|
|
||||||
</vxe-column>
|
|
||||||
</vxe-table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pagination-container">
|
|
||||||
<el-pagination
|
|
||||||
:current-page="tableStore.table.params.pageNum"
|
|
||||||
:page-size="tableStore.table.params.pageSize"
|
|
||||||
:page-sizes="[10, 20, 50, 100]"
|
|
||||||
background
|
|
||||||
layout="sizes, total, prev, pager, next, jumper"
|
|
||||||
:total="tableStore.table.total"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
class="custom-pagination"/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 添加弹窗 -->
|
|
||||||
<el-dialog draggable
|
|
||||||
v-model="detailDialogVisible"
|
|
||||||
:title="detailDialogTitle"
|
|
||||||
width="1000px"
|
|
||||||
|
|
||||||
>
|
|
||||||
<div v-loading="detailLoading">
|
|
||||||
<div style="margin-bottom: 10px; text-align: right;">
|
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="exportDetailEvent">导出</el-button>
|
|
||||||
</div>
|
|
||||||
<vxe-table
|
|
||||||
ref="detailTableRef"
|
|
||||||
:data="detailData"
|
|
||||||
auto-resize
|
|
||||||
v-bind="defaultAttribute"
|
|
||||||
resizable
|
|
||||||
show-overflow
|
|
||||||
height="400px"
|
|
||||||
>
|
|
||||||
<vxe-column title="序号" width="60" type="seq" align="center"></vxe-column>
|
|
||||||
|
|
||||||
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
|
|
||||||
<vxe-column field="devName" title="终端名称" align="center" min-width="120"></vxe-column>
|
|
||||||
<vxe-column field="devType" title="终端型号" align="center" min-width="100"></vxe-column>
|
|
||||||
<vxe-column field="manufacturer" title="终端厂家" align="center" min-width="120"></vxe-column>
|
|
||||||
<vxe-column field="loginTime" title="投运时间" align="center" min-width="120"></vxe-column>
|
|
||||||
<vxe-column field="interval" title="统计间隔" align="center" min-width="100"></vxe-column>
|
|
||||||
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
|
|
||||||
<vxe-column field="vharmonicValue" title="监测点污染值" align="center" min-width="120"></vxe-column>
|
|
||||||
</vxe-table>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
|
|
||||||
import { ref, onMounted, provide, onBeforeUnmount, computed, watch } from 'vue'
|
|
||||||
import TableStore from '@/utils/tableStore'
|
|
||||||
|
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
|
||||||
import { useDictData } from '@/stores/dictData'
|
|
||||||
import { debounce } from 'lodash-es'
|
|
||||||
|
|
||||||
const props = defineProps({
|
|
||||||
active: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const emit = defineEmits(['initialized'])
|
|
||||||
|
|
||||||
const dictData = useDictData()
|
|
||||||
const options = dictData.getBasicData('Pollution_Calc')
|
|
||||||
const tableHeight = ref(500)
|
|
||||||
const tableRef = ref()
|
|
||||||
const tableHeaderRef = ref()
|
|
||||||
const detailTableRef = ref()
|
|
||||||
const selectedArea = ref()
|
|
||||||
const areOptions: any = dictData.state.area
|
|
||||||
const allData = ref<PollutionItem[]>([])
|
|
||||||
const searchKeyword = ref('')
|
|
||||||
const harmonicValueTitle = ref('电站谐波电压污染值')
|
|
||||||
const detailDialogVisible = ref(false)
|
|
||||||
const detailDialogTitle = ref('')
|
|
||||||
const detailLoading = ref(false)
|
|
||||||
const detailData = ref<PollutionItem[]>([])
|
|
||||||
const originalTableData = ref<any[]>([])
|
|
||||||
|
|
||||||
// 方法
|
|
||||||
const showDetailDialog = (row) => {
|
|
||||||
detailDialogTitle.value = `${row.subStationName} - 监测点详情`
|
|
||||||
loadDetailData(row)
|
|
||||||
detailDialogVisible.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const loadDetailData = async (row) => {
|
|
||||||
detailLoading.value = true
|
|
||||||
try {
|
|
||||||
// 从原始数据中查找该变电站的详细信息
|
|
||||||
const originalItem = originalTableData.value.find(
|
|
||||||
item => item.subStationName === row.subStationName
|
|
||||||
)
|
|
||||||
|
|
||||||
if (originalItem && originalItem.powerFlagPollutionList) {
|
|
||||||
const detailList: PollutionItem[] = []
|
|
||||||
originalItem.powerFlagPollutionList.forEach((point: any) => {
|
|
||||||
detailList.push({
|
|
||||||
|
|
||||||
lineName: processNullValue(point.lineName),
|
|
||||||
devName: processNullValue(point.devName),
|
|
||||||
devType: processNullValue(point.devType),
|
|
||||||
manufacturer: processNullValue(point.manufacturer),
|
|
||||||
loginTime: processNullValue(point.loginTime),
|
|
||||||
interval: processNullValue(point.interval),
|
|
||||||
powerFlag: processNullValue(point.powerFlag),
|
|
||||||
vharmonicValue: processNullValue(point.vharmonicValue)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
detailData.value = detailList
|
|
||||||
} else {
|
|
||||||
detailData.value = []
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('加载详情数据失败:', error)
|
|
||||||
detailData.value = []
|
|
||||||
} finally {
|
|
||||||
detailLoading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const cascaderProps = {
|
|
||||||
label: 'name',
|
|
||||||
value: 'id',
|
|
||||||
checkStrictly: true,
|
|
||||||
emitPath: false
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PollutionItem {
|
|
||||||
gdName?: string
|
|
||||||
subStationName?: string
|
|
||||||
subVStationValue?: string
|
|
||||||
subVoltage?: string
|
|
||||||
devName?: string
|
|
||||||
lineName?: string
|
|
||||||
powerFlag?: string
|
|
||||||
devType?: string
|
|
||||||
manufacturer?: string
|
|
||||||
loginTime?: string
|
|
||||||
interval?: string
|
|
||||||
vharmonicValue?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleSelectChange = (isExpanded: boolean) => {
|
|
||||||
if (isExpanded) {
|
|
||||||
tableHeight.value = tableHeight.value - 55
|
|
||||||
} else {
|
|
||||||
tableHeight.value = tableHeight.value + 55
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const calculateTableHeight = () => {
|
|
||||||
const windowHeight = window.innerHeight
|
|
||||||
const headerHeight = 160
|
|
||||||
const paginationHeight = 120
|
|
||||||
const padding = 30
|
|
||||||
const calculatedHeight = windowHeight - headerHeight - paginationHeight - padding
|
|
||||||
tableHeight.value = Math.max(calculatedHeight, 300)
|
|
||||||
}
|
|
||||||
|
|
||||||
const debouncedCalculateTableHeight = debounce(() => {
|
|
||||||
calculateTableHeight()
|
|
||||||
}, 300)
|
|
||||||
|
|
||||||
const filteredData = computed(() => {
|
|
||||||
let result = [...allData.value]
|
|
||||||
|
|
||||||
if (selectedArea.value) {
|
|
||||||
let areaName = ''
|
|
||||||
let areaLevel = -1
|
|
||||||
const findAreaName = (areas: any[]) => {
|
|
||||||
for (const area of areas) {
|
|
||||||
if (area.id === selectedArea.value) {
|
|
||||||
areaName = area.name
|
|
||||||
areaLevel = area.level !== undefined ? area.level : -1
|
|
||||||
break
|
|
||||||
}
|
|
||||||
if (area.children && area.children.length > 0) {
|
|
||||||
findAreaName(area.children)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
findAreaName(areOptions)
|
|
||||||
|
|
||||||
if (areaName && areaLevel > 1) {
|
|
||||||
result = result.filter(item => item.gdName && item.gdName.includes(areaName))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tableStore.table.params.powerFlag === '1') {
|
|
||||||
result = result.filter(item => item.powerFlag && !item.powerFlag.includes('非'))
|
|
||||||
} else if (tableStore.table.params.powerFlag === '2') {
|
|
||||||
result = result.filter(item => item.powerFlag && item.powerFlag.includes('非'))
|
|
||||||
}
|
|
||||||
|
|
||||||
if (searchKeyword.value) {
|
|
||||||
const keyword = searchKeyword.value.toLowerCase()
|
|
||||||
result = result.filter(item =>
|
|
||||||
(item.subStationName && item.subStationName.toLowerCase().includes(keyword)) ||
|
|
||||||
(item.devName && item.devName.toLowerCase().includes(keyword)) ||
|
|
||||||
(item.lineName && item.lineName.toLowerCase().includes(keyword))
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
return result
|
|
||||||
})
|
|
||||||
|
|
||||||
const currentPageData = computed(() => {
|
|
||||||
const pageSize = tableStore.table.params.pageSize
|
|
||||||
const pageNum = tableStore.table.params.pageNum
|
|
||||||
const start = (pageNum - 1) * pageSize
|
|
||||||
const end = start + pageSize
|
|
||||||
return filteredData.value.slice(start, end)
|
|
||||||
})
|
|
||||||
|
|
||||||
const updateTotal = computed(() => {
|
|
||||||
return filteredData.value.length
|
|
||||||
})
|
|
||||||
|
|
||||||
const processNullValue = (value: any) => {
|
|
||||||
return value === null || value === undefined || value === '' || value === 'null'? '/' : value
|
|
||||||
}
|
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
|
||||||
url: '/harmonic-boot/PollutionSubstation/downPollutionSubCalc',
|
|
||||||
method: 'POST',
|
|
||||||
column: [],
|
|
||||||
beforeSearchFun: () => {
|
|
||||||
delete tableStore.table.params.deptIndex
|
|
||||||
delete tableStore.table.params.interval
|
|
||||||
delete tableStore.table.params.searchEndTime
|
|
||||||
delete tableStore.table.params.searchBeginTime
|
|
||||||
delete tableStore.table.params.timeFlag
|
|
||||||
},
|
|
||||||
loadCallback: () => {
|
|
||||||
// 保存原始数据以便后续查询
|
|
||||||
originalTableData.value = [...(tableStore.table.data || [])]
|
|
||||||
|
|
||||||
const expandedData: PollutionItem[] = [];
|
|
||||||
|
|
||||||
(tableStore.table.data || []).forEach((item: any) => {
|
|
||||||
expandedData.push({
|
|
||||||
gdName: processNullValue(item.gdName),
|
|
||||||
subStationName: processNullValue(item.subStationName),
|
|
||||||
subVStationValue: processNullValue(item.subVStationValue),
|
|
||||||
subVoltage: processNullValue(item.subVoltage)
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
allData.value = expandedData;
|
|
||||||
tableStore.table.total = updateTotal.value;
|
|
||||||
tableStore.table.data = currentPageData.value;
|
|
||||||
},
|
|
||||||
resetCallback: () => {
|
|
||||||
clearQueryParams()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => areOptions,
|
|
||||||
(newOptions) => {
|
|
||||||
if (newOptions && newOptions.length > 0) {
|
|
||||||
selectedArea.value = newOptions[0].id
|
|
||||||
tableStore.table.params.id = newOptions[0].id
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ immediate: true }
|
|
||||||
)
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => options,
|
|
||||||
(newOptions) => {
|
|
||||||
if (newOptions && newOptions.length > 0) {
|
|
||||||
if (!tableStore.table.params.statisticalType) {
|
|
||||||
tableStore.table.params.statisticalType = newOptions[0]
|
|
||||||
tableStore.table.params.ids = [newOptions[0].id]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ immediate: true }
|
|
||||||
)
|
|
||||||
|
|
||||||
tableStore.table.params.powerFlag = "0"
|
|
||||||
tableStore.table.params.isUpToGrid = 0
|
|
||||||
tableStore.table.params.type = 1
|
|
||||||
|
|
||||||
const handleStatisticalTypeChange = (newVal: { id: any }) => {
|
|
||||||
if (newVal) {
|
|
||||||
tableStore.table.params.statisticalType = newVal
|
|
||||||
tableStore.table.params.ids = [newVal.id]
|
|
||||||
if (newVal.name) {
|
|
||||||
harmonicValueTitle.value = '电站' + newVal.name + '污染值'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 重新调用接口
|
|
||||||
tableStore.index()
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleFilterChange = () => {
|
|
||||||
tableStore.table.params.pageNum = 1
|
|
||||||
tableStore.table.data = currentPageData.value
|
|
||||||
tableStore.table.total = updateTotal.value
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleSizeChange = (val: number) => {
|
|
||||||
tableStore.table.params.pageSize = val
|
|
||||||
tableStore.table.params.pageNum = 1
|
|
||||||
tableStore.table.data = currentPageData.value
|
|
||||||
tableStore.table.total = updateTotal.value
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleCurrentChange = (val: number) => {
|
|
||||||
tableStore.table.params.pageNum = val
|
|
||||||
tableStore.table.data = currentPageData.value
|
|
||||||
tableStore.table.total = updateTotal.value
|
|
||||||
}
|
|
||||||
|
|
||||||
const exportEvent = () => {
|
|
||||||
const allFilteredData = filteredData.value
|
|
||||||
tableRef.value.exportData({
|
|
||||||
filename: '场站级评估-污染值报告',
|
|
||||||
sheetName: 'Sheet1',
|
|
||||||
type: 'xlsx',
|
|
||||||
useStyle: true,
|
|
||||||
data: allFilteredData,
|
|
||||||
columnFilterMethod: function (column: any) {
|
|
||||||
return !(
|
|
||||||
column.column.title === '操作'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 导出详情数据的方法
|
|
||||||
const exportDetailEvent = () => {
|
|
||||||
detailTableRef.value.exportData({
|
|
||||||
filename: detailDialogTitle.value,
|
|
||||||
sheetName: 'Sheet1',
|
|
||||||
type: 'xlsx',
|
|
||||||
useStyle: true,
|
|
||||||
data: detailData.value,
|
|
||||||
columnFilterMethod({ column }) {
|
|
||||||
// 导出所有列,包括隐藏列
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
if (props.active) {
|
|
||||||
tableStore.index()
|
|
||||||
emit('initialized', 'pollutionReport')
|
|
||||||
}
|
|
||||||
calculateTableHeight()
|
|
||||||
window.addEventListener('resize', debouncedCalculateTableHeight)
|
|
||||||
})
|
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
|
||||||
window.removeEventListener('resize', debouncedCalculateTableHeight)
|
|
||||||
})
|
|
||||||
|
|
||||||
const clearQueryParams = () => {
|
|
||||||
// 将区域恢复成第一层
|
|
||||||
if (areOptions && areOptions.length > 0) {
|
|
||||||
selectedArea.value = areOptions[0].id
|
|
||||||
tableStore.table.params.id = areOptions[0].id
|
|
||||||
}
|
|
||||||
|
|
||||||
// 清空搜索关键词
|
|
||||||
searchKeyword.value = ''
|
|
||||||
}
|
|
||||||
|
|
||||||
defineExpose({
|
|
||||||
refresh: () => {
|
|
||||||
clearQueryParams()
|
|
||||||
tableHeaderRef.value.setTheDate(3)
|
|
||||||
tableStore.index()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.pagination-container {
|
|
||||||
border: 1px solid #ebeef5;
|
|
||||||
border-top: none;
|
|
||||||
padding: 10px;
|
|
||||||
margin: 0 0 5px 0;
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination) {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination .el-pagination__sizes) {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination .el-pagination__total) {
|
|
||||||
margin-right: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination .el-pagination__jump) {
|
|
||||||
margin-left: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 响应式处理 */
|
|
||||||
@media screen and (max-width: 768px) {
|
|
||||||
:deep(.custom-pagination) {
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: stretch;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination .el-pagination__total) {
|
|
||||||
margin-right: 0;
|
|
||||||
order: 1;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination .el-pagination__sizes) {
|
|
||||||
order: 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.custom-pagination .btn-prev),
|
|
||||||
:deep(.custom-pagination .el-pager),
|
|
||||||
:deep(.custom-pagination .btn-next),
|
|
||||||
:deep(.custom-pagination .el-pagination__jump) {
|
|
||||||
order: 3;
|
|
||||||
justify-content: center;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -0,0 +1,430 @@
|
|||||||
|
<template>
|
||||||
|
<div class="tab-content">
|
||||||
|
<TableHeader datePicker ref="tableHeaderRef" @selectChange="handleSelectChange">
|
||||||
|
<template #select>
|
||||||
|
<el-form-item label="区域">
|
||||||
|
<el-cascader
|
||||||
|
v-bind="$attrs"
|
||||||
|
:options="areOptions"
|
||||||
|
:props="cascaderProps"
|
||||||
|
v-model="selectedArea"
|
||||||
|
@change="handleFilterChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="统计类型">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.statisticalType"
|
||||||
|
value-key="id"
|
||||||
|
placeholder="请选择统计类型"
|
||||||
|
@change="handleStatisticalTypeChange"
|
||||||
|
>
|
||||||
|
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="电网标志">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.powerFlag"
|
||||||
|
placeholder="请选择电网标志"
|
||||||
|
@change="handleFilterChange"
|
||||||
|
>
|
||||||
|
<el-option label="全部" value="0"></el-option>
|
||||||
|
<el-option label="电网侧" value="1"></el-option>
|
||||||
|
<el-option label="非电网侧" value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="筛选数据">
|
||||||
|
<el-input
|
||||||
|
v-model="searchKeyword"
|
||||||
|
placeholder="请输入变电站/终端/监测点"
|
||||||
|
clearable
|
||||||
|
@input="handleFilterChange"
|
||||||
|
:show-word-limit="true"
|
||||||
|
:maxlength="32"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template #operation>
|
||||||
|
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出</el-button>
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
|
||||||
|
<div v-loading="tableStore.table.loading" class="main-container">
|
||||||
|
<vxe-table
|
||||||
|
class="full-height-table"
|
||||||
|
ref="tableRef"
|
||||||
|
auto-resize
|
||||||
|
:data="tableStore.table.data"
|
||||||
|
v-bind="defaultAttribute"
|
||||||
|
:height="tableHeight"
|
||||||
|
resizable
|
||||||
|
show-overflow
|
||||||
|
>
|
||||||
|
<vxe-column title="序号" width="80" type="seq" align="center"></vxe-column>
|
||||||
|
<vxe-column field="gdName" title="供电公司" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column
|
||||||
|
field="subStationName"
|
||||||
|
:show-overflow="true"
|
||||||
|
title="变电站"
|
||||||
|
align="center"
|
||||||
|
min-width="150"
|
||||||
|
></vxe-column>
|
||||||
|
<vxe-column field="devName" title="终端名称" align="center" min-width="120"></vxe-column>
|
||||||
|
<!-- <vxe-column field="devType" title="终端型号" align="center" min-width="150"></vxe-column> -->
|
||||||
|
<!-- <vxe-column field="loginTime" title="投运时间" align="center" min-width="120"></vxe-column> -->
|
||||||
|
<vxe-column
|
||||||
|
field="lineName"
|
||||||
|
title="监测点名称"
|
||||||
|
align="center"
|
||||||
|
min-width="150"
|
||||||
|
:formatter="formatMonitorId"
|
||||||
|
></vxe-column>
|
||||||
|
<!-- <vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column> -->
|
||||||
|
<!-- <vxe-column field="lineVoltage" title="监测点电压等级" align="center" min-width="120"></vxe-column> -->
|
||||||
|
<!-- <vxe-column field="loadType" title="干扰源类型" align="center" min-width="120"></vxe-column> -->
|
||||||
|
<!-- <vxe-column field="objName" title="监测对象名称" align="center" min-width="150" :formatter="formatMonitorId"></vxe-column> -->
|
||||||
|
<!-- <vxe-column field="interval" title="统计间隔" align="center" min-width="100" :formatter="formatMonitorId"></vxe-column> -->
|
||||||
|
<!-- <vxe-column field="onlineRate" title="在线率(%)" align="center" min-width="100"></vxe-column> -->
|
||||||
|
<!-- <vxe-column field="integrity" title="完整率(%)" align="center" min-width="100"></vxe-column> -->
|
||||||
|
<vxe-column
|
||||||
|
field="harmonicValue"
|
||||||
|
:title="harmonicValueTitle"
|
||||||
|
align="center"
|
||||||
|
min-width="120"
|
||||||
|
></vxe-column>
|
||||||
|
<!-- <vxe-column field="upCounts" title="暂升次数(次)" align="center" min-width="100"></vxe-column> -->
|
||||||
|
<!-- <vxe-column field="downCounts" title="电压暂降(次)" align="center" min-width="100"></vxe-column> -->
|
||||||
|
<!-- <vxe-column field="breakCounts" title="短时中断(次)" align="center" min-width="100"></vxe-column> -->
|
||||||
|
<!-- <vxe-column field="monitorId" title="一类监测点" align="center" min-width="120" :formatter="formatMonitorId"></vxe-column> -->
|
||||||
|
</vxe-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination-container">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="tableStore.table.params.pageNum"
|
||||||
|
:page-size="tableStore.table.params.pageSize"
|
||||||
|
:page-sizes="[10, 20, 50, 100, 200]"
|
||||||
|
background
|
||||||
|
layout="sizes, total, prev, pager, next, jumper"
|
||||||
|
:total="tableStore.table.total"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
class="custom-pagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted, provide, onBeforeUnmount, computed, watch } from 'vue'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { debounce } from 'lodash-es'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
active: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const emit = defineEmits(['initialized'])
|
||||||
|
|
||||||
|
const dictData = useDictData()
|
||||||
|
const options = dictData.getBasicData('Pollution_Calc')
|
||||||
|
const tableHeight = ref(500)
|
||||||
|
const tableRef = ref()
|
||||||
|
const tableHeaderRef = ref()
|
||||||
|
|
||||||
|
const selectedArea = ref()
|
||||||
|
const areOptions: any = dictData.state.area
|
||||||
|
const allData = ref<PollutionItem[]>([])
|
||||||
|
const searchKeyword = ref('')
|
||||||
|
const harmonicValueTitle = ref('谐波电压污染值')
|
||||||
|
|
||||||
|
const cascaderProps = {
|
||||||
|
label: 'name',
|
||||||
|
value: 'id',
|
||||||
|
checkStrictly: true,
|
||||||
|
emitPath: false
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PollutionItem {
|
||||||
|
gdName?: string
|
||||||
|
subStationName?: string
|
||||||
|
devName?: string
|
||||||
|
lineName?: string
|
||||||
|
powerFlag?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatMonitorId = (row: any) => {
|
||||||
|
return row.cellValue || '/'
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSelectChange = (isExpanded: boolean) => {
|
||||||
|
if (isExpanded) {
|
||||||
|
tableHeight.value = tableHeight.value - 55
|
||||||
|
} else {
|
||||||
|
tableHeight.value = tableHeight.value + 55
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const calculateTableHeight = () => {
|
||||||
|
const windowHeight = window.innerHeight
|
||||||
|
const headerHeight = 160
|
||||||
|
const paginationHeight = 120
|
||||||
|
const padding = 30
|
||||||
|
const calculatedHeight = windowHeight - headerHeight - paginationHeight - padding
|
||||||
|
tableHeight.value = Math.max(calculatedHeight, 300)
|
||||||
|
}
|
||||||
|
|
||||||
|
const debouncedCalculateTableHeight = debounce(() => {
|
||||||
|
calculateTableHeight()
|
||||||
|
}, 300)
|
||||||
|
|
||||||
|
const filteredData = computed(() => {
|
||||||
|
let result = [...allData.value]
|
||||||
|
|
||||||
|
if (selectedArea.value) {
|
||||||
|
let areaName = ''
|
||||||
|
let areaLevel = -1
|
||||||
|
const findAreaName = (areas: any[]) => {
|
||||||
|
for (const area of areas) {
|
||||||
|
if (area.id === selectedArea.value) {
|
||||||
|
areaName = area.name
|
||||||
|
areaLevel = area.level !== undefined ? area.level : -1
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if (area.children && area.children.length > 0) {
|
||||||
|
findAreaName(area.children)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
findAreaName(areOptions)
|
||||||
|
|
||||||
|
if (areaName && areaLevel > 1) {
|
||||||
|
result = result.filter(item => item.gdName && item.gdName.includes(areaName))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tableStore.table.params.powerFlag === '1') {
|
||||||
|
result = result.filter(item => item.powerFlag && !item.powerFlag.includes('非'))
|
||||||
|
} else if (tableStore.table.params.powerFlag === '2') {
|
||||||
|
result = result.filter(item => item.powerFlag && item.powerFlag.includes('非'))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (searchKeyword.value) {
|
||||||
|
const keyword = searchKeyword.value.toLowerCase()
|
||||||
|
result = result.filter(
|
||||||
|
item =>
|
||||||
|
(item.subStationName && item.subStationName.toLowerCase().includes(keyword)) ||
|
||||||
|
(item.devName && item.devName.toLowerCase().includes(keyword)) ||
|
||||||
|
(item.lineName && item.lineName.toLowerCase().includes(keyword))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
|
||||||
|
const currentPageData = computed(() => {
|
||||||
|
const pageSize = tableStore.table.params.pageSize
|
||||||
|
const pageNum = tableStore.table.params.pageNum
|
||||||
|
const start = (pageNum - 1) * pageSize
|
||||||
|
const end = start + pageSize
|
||||||
|
return filteredData.value.slice(start, end)
|
||||||
|
})
|
||||||
|
|
||||||
|
const updateTotal = computed(() => {
|
||||||
|
return filteredData.value.length
|
||||||
|
})
|
||||||
|
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
url: '/harmonic-boot/PollutionSubstation/downPollutionLineCalc',
|
||||||
|
method: 'POST',
|
||||||
|
column: [],
|
||||||
|
beforeSearchFun: () => {
|
||||||
|
delete tableStore.table.params.deptIndex
|
||||||
|
delete tableStore.table.params.interval
|
||||||
|
delete tableStore.table.params.searchEndTime
|
||||||
|
delete tableStore.table.params.searchBeginTime
|
||||||
|
delete tableStore.table.params.timeFlag
|
||||||
|
},
|
||||||
|
loadCallback: () => {
|
||||||
|
allData.value = tableStore.table.data || []
|
||||||
|
tableStore.table.total = updateTotal.value
|
||||||
|
tableStore.table.data = currentPageData.value
|
||||||
|
},
|
||||||
|
resetCallback: () => {
|
||||||
|
clearQueryParams()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => areOptions,
|
||||||
|
newOptions => {
|
||||||
|
if (newOptions && newOptions.length > 0) {
|
||||||
|
selectedArea.value = newOptions[0].id
|
||||||
|
tableStore.table.params.id = newOptions[0].id
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => options,
|
||||||
|
newOptions => {
|
||||||
|
if (newOptions && newOptions.length > 0) {
|
||||||
|
if (!tableStore.table.params.statisticalType) {
|
||||||
|
tableStore.table.params.statisticalType = newOptions[0]
|
||||||
|
tableStore.table.params.ids = [newOptions[0].id]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
|
tableStore.table.params.powerFlag = '0'
|
||||||
|
tableStore.table.params.isUpToGrid = 0
|
||||||
|
tableStore.table.params.type = 1
|
||||||
|
|
||||||
|
const handleStatisticalTypeChange = (newVal: { id: any }) => {
|
||||||
|
|
||||||
|
if (newVal) {
|
||||||
|
tableStore.table.params.statisticalType = newVal
|
||||||
|
tableStore.table.params.ids = [newVal.id]
|
||||||
|
if (newVal.name) {
|
||||||
|
harmonicValueTitle.value = newVal.name + '污染值'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 重新调用接口
|
||||||
|
tableStore.index()
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleFilterChange = () => {
|
||||||
|
tableStore.table.params.pageNum = 1
|
||||||
|
tableStore.table.data = currentPageData.value
|
||||||
|
tableStore.table.total = updateTotal.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSizeChange = (val: number) => {
|
||||||
|
tableStore.table.params.pageSize = val
|
||||||
|
tableStore.table.params.pageNum = 1
|
||||||
|
tableStore.table.data = currentPageData.value
|
||||||
|
tableStore.table.total = updateTotal.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleCurrentChange = (val: number) => {
|
||||||
|
tableStore.table.params.pageNum = val
|
||||||
|
tableStore.table.data = currentPageData.value
|
||||||
|
tableStore.table.total = updateTotal.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const exportEvent = () => {
|
||||||
|
const allFilteredData = filteredData.value
|
||||||
|
tableRef.value.exportData({
|
||||||
|
filename: '监测点评估-污染值报告',
|
||||||
|
sheetName: 'Sheet1',
|
||||||
|
type: 'xlsx',
|
||||||
|
useStyle: true,
|
||||||
|
data: allFilteredData,
|
||||||
|
columnFilterMethod: function (column, $columnIndex) {
|
||||||
|
return !(column.$columnIndex === 0)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (props.active) {
|
||||||
|
tableStore.index()
|
||||||
|
emit('initialized', 'pollutionReport')
|
||||||
|
}
|
||||||
|
calculateTableHeight()
|
||||||
|
window.addEventListener('resize', debouncedCalculateTableHeight)
|
||||||
|
})
|
||||||
|
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
window.removeEventListener('resize', debouncedCalculateTableHeight)
|
||||||
|
})
|
||||||
|
|
||||||
|
const clearQueryParams = () => {
|
||||||
|
// 将区域恢复成第一层
|
||||||
|
if (areOptions && areOptions.length > 0) {
|
||||||
|
selectedArea.value = areOptions[0].id
|
||||||
|
tableStore.table.params.id = areOptions[0].id
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清空搜索关键词
|
||||||
|
searchKeyword.value = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
refresh: (name?: any) => {
|
||||||
|
// 清空查询参数
|
||||||
|
clearQueryParams()
|
||||||
|
tableHeaderRef.value.setTheDate(3)
|
||||||
|
if (name) {
|
||||||
|
searchKeyword.value = name
|
||||||
|
}
|
||||||
|
tableStore.index()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pagination-container {
|
||||||
|
border: 1px solid #ebeef5;
|
||||||
|
border-top: none;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 0 0 5px 0;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination) {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination .el-pagination__sizes) {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination .el-pagination__total) {
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination .el-pagination__jump) {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式处理 */
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
:deep(.custom-pagination) {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination .el-pagination__total) {
|
||||||
|
margin-right: 0;
|
||||||
|
order: 1;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination .el-pagination__sizes) {
|
||||||
|
order: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination .btn-prev),
|
||||||
|
:deep(.custom-pagination .el-pager),
|
||||||
|
:deep(.custom-pagination .btn-next),
|
||||||
|
:deep(.custom-pagination .el-pagination__jump) {
|
||||||
|
order: 3;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,510 @@
|
|||||||
|
<template>
|
||||||
|
<div class="tab-content">
|
||||||
|
<TableHeader datePicker ref="tableHeaderRef" @selectChange="handleSelectChange">
|
||||||
|
<template #select>
|
||||||
|
<el-form-item label="区域">
|
||||||
|
<el-cascader
|
||||||
|
v-bind="$attrs"
|
||||||
|
:options="areOptions"
|
||||||
|
:props="cascaderProps"
|
||||||
|
v-model="selectedArea"
|
||||||
|
@change="handleFilterChange"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="统计类型">
|
||||||
|
<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 label="电网标志">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.powerFlag"
|
||||||
|
placeholder="请选择电网标志"
|
||||||
|
@change="handleFilterChange"
|
||||||
|
>
|
||||||
|
<el-option label="全部" value="0"></el-option>
|
||||||
|
<el-option label="电网侧" value="1"></el-option>
|
||||||
|
<el-option label="非电网侧" value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="筛选数据">
|
||||||
|
<el-input
|
||||||
|
v-model="searchKeyword"
|
||||||
|
placeholder="请输入变电站"
|
||||||
|
clearable
|
||||||
|
@input="handleFilterChange"
|
||||||
|
:show-word-limit="true"
|
||||||
|
:maxlength="32"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template #operation>
|
||||||
|
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出</el-button>
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
|
||||||
|
<div v-loading="tableStore.table.loading" class="main-container">
|
||||||
|
<vxe-table
|
||||||
|
class="full-height-table"
|
||||||
|
ref="tableRef"
|
||||||
|
auto-resize
|
||||||
|
:data="tableStore.table.data"
|
||||||
|
v-bind="defaultAttribute"
|
||||||
|
:height="tableHeight"
|
||||||
|
resizable
|
||||||
|
show-overflow
|
||||||
|
>
|
||||||
|
<vxe-column title="序号" width="80" type="seq" align="center"></vxe-column>
|
||||||
|
<vxe-column field="gdName" title="供电公司" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column
|
||||||
|
field="subStationName"
|
||||||
|
:show-overflow="true"
|
||||||
|
title="变电站"
|
||||||
|
align="center"
|
||||||
|
min-width="150"
|
||||||
|
></vxe-column>
|
||||||
|
<vxe-column
|
||||||
|
field="subVStationValue"
|
||||||
|
:title="harmonicValueTitle"
|
||||||
|
align="center"
|
||||||
|
min-width="150"
|
||||||
|
></vxe-column>
|
||||||
|
<vxe-column field="subVoltage" title="变电站电压等级" align="center" min-width="150"></vxe-column>
|
||||||
|
<vxe-column title="操作" width="150" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button size="small" type="primary" link @click="showDetailDialog(row)">
|
||||||
|
监测点污染详情
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
</vxe-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination-container">
|
||||||
|
<el-pagination
|
||||||
|
:current-page="tableStore.table.params.pageNum"
|
||||||
|
:page-size="tableStore.table.params.pageSize"
|
||||||
|
:page-sizes="[10, 20, 50, 100, 200]"
|
||||||
|
background
|
||||||
|
layout="sizes, total, prev, pager, next, jumper"
|
||||||
|
:total="tableStore.table.total"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
class="custom-pagination"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 添加弹窗 -->
|
||||||
|
<el-dialog draggable v-model="detailDialogVisible" :title="detailDialogTitle" width="1000px">
|
||||||
|
<div v-loading="detailLoading">
|
||||||
|
<div style="margin-bottom: 10px; text-align: right">
|
||||||
|
<el-button icon="el-icon-Download" type="primary" @click="exportDetailEvent">导出</el-button>
|
||||||
|
</div>
|
||||||
|
<vxe-table
|
||||||
|
ref="detailTableRef"
|
||||||
|
:data="detailData"
|
||||||
|
auto-resize
|
||||||
|
v-bind="defaultAttribute"
|
||||||
|
resizable
|
||||||
|
show-overflow
|
||||||
|
height="400px"
|
||||||
|
>
|
||||||
|
<vxe-column title="序号" width="60" type="seq" align="center"></vxe-column>
|
||||||
|
|
||||||
|
<vxe-column title="序号" width="60" type="seq" align="center"></vxe-column>
|
||||||
|
<vxe-column field="subName" title="变电站名称" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="objName" title="监测对象名称" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="loadType" title="干扰源类型" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
|
||||||
|
<vxe-column field="vharmonicValue" title="监测点污染值" align="center" min-width="120"></vxe-column>
|
||||||
|
</vxe-table>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted, provide, onBeforeUnmount, computed, watch } from 'vue'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
|
||||||
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { debounce } from 'lodash-es'
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
active: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const emit = defineEmits(['initialized'])
|
||||||
|
|
||||||
|
const dictData = useDictData()
|
||||||
|
const options = dictData.getBasicData('Pollution_Calc')
|
||||||
|
const tableHeight = ref(500)
|
||||||
|
const tableRef = ref()
|
||||||
|
const tableHeaderRef = ref()
|
||||||
|
const detailTableRef = ref()
|
||||||
|
const selectedArea = ref()
|
||||||
|
const areOptions: any = dictData.state.area
|
||||||
|
const allData = ref<PollutionItem[]>([])
|
||||||
|
const searchKeyword = ref('')
|
||||||
|
const harmonicValueTitle = ref('电站谐波电压污染值')
|
||||||
|
const detailDialogVisible = ref(false)
|
||||||
|
const detailDialogTitle = ref('')
|
||||||
|
const detailLoading = ref(false)
|
||||||
|
const detailData = ref<PollutionItem[]>([])
|
||||||
|
const originalTableData = ref<any[]>([])
|
||||||
|
|
||||||
|
// 方法
|
||||||
|
const showDetailDialog = row => {
|
||||||
|
detailDialogTitle.value = `${row.subStationName} - 监测点污染详情`
|
||||||
|
loadDetailData(row)
|
||||||
|
detailDialogVisible.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const loadDetailData = async row => {
|
||||||
|
detailLoading.value = true
|
||||||
|
try {
|
||||||
|
// 从原始数据中查找该变电站的详细信息
|
||||||
|
const originalItem = originalTableData.value.find(item => item.subStationName === row.subStationName)
|
||||||
|
|
||||||
|
if (originalItem && originalItem.powerFlagPollutionList) {
|
||||||
|
const detailList: PollutionItem[] = []
|
||||||
|
// originalItem.powerFlagPollutionList.forEach((point: any) => {
|
||||||
|
// detailList.push({
|
||||||
|
// lineName: processNullValue(point.lineName),
|
||||||
|
// devName: processNullValue(point.devName),
|
||||||
|
// devType: processNullValue(point.devType),
|
||||||
|
// manufacturer: processNullValue(point.manufacturer),
|
||||||
|
// loginTime: processNullValue(point.loginTime),
|
||||||
|
// interval: processNullValue(point.interval),
|
||||||
|
// powerFlag: processNullValue(point.powerFlag),
|
||||||
|
// vharmonicValue: processNullValue(point.vharmonicValue)
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
detailData.value = originalItem.powerFlagPollutionList //detailList
|
||||||
|
} else {
|
||||||
|
detailData.value = []
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('加载详情数据失败:', error)
|
||||||
|
detailData.value = []
|
||||||
|
} finally {
|
||||||
|
detailLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const cascaderProps = {
|
||||||
|
label: 'name',
|
||||||
|
value: 'id',
|
||||||
|
checkStrictly: true,
|
||||||
|
emitPath: false
|
||||||
|
}
|
||||||
|
|
||||||
|
interface PollutionItem {
|
||||||
|
gdName?: string
|
||||||
|
subStationName?: string
|
||||||
|
subVStationValue?: string
|
||||||
|
subVoltage?: string
|
||||||
|
devName?: string
|
||||||
|
lineName?: string
|
||||||
|
powerFlag?: string
|
||||||
|
devType?: string
|
||||||
|
manufacturer?: string
|
||||||
|
loginTime?: string
|
||||||
|
interval?: string
|
||||||
|
vharmonicValue?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSelectChange = (isExpanded: boolean) => {
|
||||||
|
if (isExpanded) {
|
||||||
|
tableHeight.value = tableHeight.value - 55
|
||||||
|
} else {
|
||||||
|
tableHeight.value = tableHeight.value + 55
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const calculateTableHeight = () => {
|
||||||
|
const windowHeight = window.innerHeight
|
||||||
|
const headerHeight = 160
|
||||||
|
const paginationHeight = 120
|
||||||
|
const padding = 30
|
||||||
|
const calculatedHeight = windowHeight - headerHeight - paginationHeight - padding
|
||||||
|
tableHeight.value = Math.max(calculatedHeight, 300)
|
||||||
|
}
|
||||||
|
|
||||||
|
const debouncedCalculateTableHeight = debounce(() => {
|
||||||
|
calculateTableHeight()
|
||||||
|
}, 300)
|
||||||
|
|
||||||
|
const filteredData = computed(() => {
|
||||||
|
let result = [...allData.value]
|
||||||
|
|
||||||
|
if (selectedArea.value) {
|
||||||
|
let areaName = ''
|
||||||
|
let areaLevel = -1
|
||||||
|
const findAreaName = (areas: any[]) => {
|
||||||
|
for (const area of areas) {
|
||||||
|
if (area.id === selectedArea.value) {
|
||||||
|
areaName = area.name
|
||||||
|
areaLevel = area.level !== undefined ? area.level : -1
|
||||||
|
break
|
||||||
|
}
|
||||||
|
if (area.children && area.children.length > 0) {
|
||||||
|
findAreaName(area.children)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
findAreaName(areOptions)
|
||||||
|
|
||||||
|
if (areaName && areaLevel > 1) {
|
||||||
|
result = result.filter(item => item.gdName && item.gdName.includes(areaName))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tableStore.table.params.powerFlag === '1') {
|
||||||
|
result = result.filter(item => item.powerFlag && !item.powerFlag.includes('非'))
|
||||||
|
} else if (tableStore.table.params.powerFlag === '2') {
|
||||||
|
result = result.filter(item => item.powerFlag && item.powerFlag.includes('非'))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (searchKeyword.value) {
|
||||||
|
const keyword = searchKeyword.value.toLowerCase()
|
||||||
|
result = result.filter(
|
||||||
|
item =>
|
||||||
|
(item.subStationName && item.subStationName.toLowerCase().includes(keyword)) ||
|
||||||
|
(item.devName && item.devName.toLowerCase().includes(keyword)) ||
|
||||||
|
(item.lineName && item.lineName.toLowerCase().includes(keyword))
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return result
|
||||||
|
})
|
||||||
|
|
||||||
|
const currentPageData = computed(() => {
|
||||||
|
const pageSize = tableStore.table.params.pageSize
|
||||||
|
const pageNum = tableStore.table.params.pageNum
|
||||||
|
const start = (pageNum - 1) * pageSize
|
||||||
|
const end = start + pageSize
|
||||||
|
return filteredData.value.slice(start, end)
|
||||||
|
})
|
||||||
|
|
||||||
|
const updateTotal = computed(() => {
|
||||||
|
return filteredData.value.length
|
||||||
|
})
|
||||||
|
|
||||||
|
const processNullValue = (value: any) => {
|
||||||
|
return value === null || value === undefined || value === '' || value === 'null' ? '/' : value
|
||||||
|
}
|
||||||
|
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
url: '/harmonic-boot/PollutionSubstation/downPollutionSubCalc',
|
||||||
|
method: 'POST',
|
||||||
|
column: [],
|
||||||
|
beforeSearchFun: () => {
|
||||||
|
delete tableStore.table.params.deptIndex
|
||||||
|
delete tableStore.table.params.interval
|
||||||
|
delete tableStore.table.params.searchEndTime
|
||||||
|
delete tableStore.table.params.searchBeginTime
|
||||||
|
delete tableStore.table.params.timeFlag
|
||||||
|
tableStore.table.params.ids = [tableStore.table.params.statisticalType.id]
|
||||||
|
},
|
||||||
|
loadCallback: () => {
|
||||||
|
// 保存原始数据以便后续查询
|
||||||
|
originalTableData.value = [...(tableStore.table.data || [])]
|
||||||
|
|
||||||
|
const expandedData: PollutionItem[] = []
|
||||||
|
|
||||||
|
;(tableStore.table.data || []).forEach((item: any) => {
|
||||||
|
expandedData.push({
|
||||||
|
gdName: processNullValue(item.gdName),
|
||||||
|
subStationName: processNullValue(item.subStationName),
|
||||||
|
subVStationValue: processNullValue(item.subVStationValue),
|
||||||
|
subVoltage: processNullValue(item.subVoltage)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
harmonicValueTitle.value = tableStore.table.params.statisticalType.name + '污染值'
|
||||||
|
allData.value = expandedData
|
||||||
|
tableStore.table.total = updateTotal.value
|
||||||
|
tableStore.table.data = currentPageData.value
|
||||||
|
},
|
||||||
|
resetCallback: () => {
|
||||||
|
clearQueryParams()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => areOptions,
|
||||||
|
newOptions => {
|
||||||
|
if (newOptions && newOptions.length > 0) {
|
||||||
|
selectedArea.value = newOptions[0].id
|
||||||
|
tableStore.table.params.id = newOptions[0].id
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => options,
|
||||||
|
newOptions => {
|
||||||
|
if (newOptions && newOptions.length > 0) {
|
||||||
|
if (!tableStore.table.params.statisticalType) {
|
||||||
|
tableStore.table.params.statisticalType = newOptions[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
|
tableStore.table.params.powerFlag = '0'
|
||||||
|
tableStore.table.params.isUpToGrid = 0
|
||||||
|
tableStore.table.params.type = 1
|
||||||
|
|
||||||
|
const handleFilterChange = () => {
|
||||||
|
tableStore.table.params.pageNum = 1
|
||||||
|
tableStore.table.data = currentPageData.value
|
||||||
|
tableStore.table.total = updateTotal.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSizeChange = (val: number) => {
|
||||||
|
tableStore.table.params.pageSize = val
|
||||||
|
tableStore.table.params.pageNum = 1
|
||||||
|
tableStore.table.data = currentPageData.value
|
||||||
|
tableStore.table.total = updateTotal.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleCurrentChange = (val: number) => {
|
||||||
|
tableStore.table.params.pageNum = val
|
||||||
|
tableStore.table.data = currentPageData.value
|
||||||
|
tableStore.table.total = updateTotal.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const exportEvent = () => {
|
||||||
|
const allFilteredData = filteredData.value
|
||||||
|
tableRef.value.exportData({
|
||||||
|
filename: '场站级评估-污染值报告',
|
||||||
|
sheetName: 'Sheet1',
|
||||||
|
type: 'xlsx',
|
||||||
|
useStyle: true,
|
||||||
|
data: allFilteredData,
|
||||||
|
columnFilterMethod: function (column: any) {
|
||||||
|
return !(column.column.title === '操作')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出详情数据的方法
|
||||||
|
const exportDetailEvent = () => {
|
||||||
|
detailTableRef.value.exportData({
|
||||||
|
filename: detailDialogTitle.value,
|
||||||
|
sheetName: 'Sheet1',
|
||||||
|
type: 'xlsx',
|
||||||
|
useStyle: true,
|
||||||
|
data: detailData.value,
|
||||||
|
columnFilterMethod({ column }) {
|
||||||
|
// 导出所有列,包括隐藏列
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (props.active) {
|
||||||
|
tableStore.index()
|
||||||
|
emit('initialized', 'pollutionReport')
|
||||||
|
}
|
||||||
|
calculateTableHeight()
|
||||||
|
window.addEventListener('resize', debouncedCalculateTableHeight)
|
||||||
|
})
|
||||||
|
|
||||||
|
onBeforeUnmount(() => {
|
||||||
|
window.removeEventListener('resize', debouncedCalculateTableHeight)
|
||||||
|
})
|
||||||
|
|
||||||
|
const clearQueryParams = () => {
|
||||||
|
// 将区域恢复成第一层
|
||||||
|
if (areOptions && areOptions.length > 0) {
|
||||||
|
selectedArea.value = areOptions[0].id
|
||||||
|
tableStore.table.params.id = areOptions[0].id
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清空搜索关键词
|
||||||
|
searchKeyword.value = ''
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
refresh: (statisticalType?: string) => {
|
||||||
|
tableStore.table.params.statisticalType = options.filter(item => item.id == statisticalType)[0] || options[0]
|
||||||
|
|
||||||
|
clearQueryParams()
|
||||||
|
tableHeaderRef.value.setTheDate(3)
|
||||||
|
tableStore.index()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.pagination-container {
|
||||||
|
border: 1px solid #ebeef5;
|
||||||
|
border-top: none;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 0 0 5px 0;
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination) {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination .el-pagination__sizes) {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination .el-pagination__total) {
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination .el-pagination__jump) {
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 响应式处理 */
|
||||||
|
@media screen and (max-width: 768px) {
|
||||||
|
:deep(.custom-pagination) {
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination .el-pagination__total) {
|
||||||
|
margin-right: 0;
|
||||||
|
order: 1;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination .el-pagination__sizes) {
|
||||||
|
order: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.custom-pagination .btn-prev),
|
||||||
|
:deep(.custom-pagination .el-pager),
|
||||||
|
:deep(.custom-pagination .btn-next),
|
||||||
|
:deep(.custom-pagination .el-pagination__jump) {
|
||||||
|
order: 3;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,173 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<TableHeader datePicker area ref="TableHeaderRef" showExport>
|
||||||
|
<template #select>
|
||||||
|
<el-form-item label="统计类型">
|
||||||
|
<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 label="电网标志">
|
||||||
|
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
||||||
|
<el-option label="全部" :value="0"></el-option>
|
||||||
|
<el-option label="电网侧" :value="1"></el-option>
|
||||||
|
<el-option label="非电网侧" :value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="筛选数据">
|
||||||
|
<el-input
|
||||||
|
v-model="tableStore.table.params.searchValue"
|
||||||
|
placeholder="请输入变电站/终端/监测点"
|
||||||
|
clearable
|
||||||
|
:show-word-limit="true"
|
||||||
|
:maxlength="32"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #operation>
|
||||||
|
<!-- <el-button icon="el-icon-Download" type="primary">导出</el-button> -->
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef" />
|
||||||
|
<!-- 添加弹窗 -->
|
||||||
|
<el-dialog draggable v-model="detailDialogVisible" :title="detailDialogTitle" width="1000px">
|
||||||
|
<div v-loading="detailLoading">
|
||||||
|
<div style="margin-bottom: 10px; text-align: right">
|
||||||
|
<el-button icon="el-icon-Download" type="primary" @click="exportDetailEvent">导出</el-button>
|
||||||
|
</div>
|
||||||
|
<vxe-table
|
||||||
|
ref="detailTableRef"
|
||||||
|
:data="detailData"
|
||||||
|
auto-resize
|
||||||
|
v-bind="defaultAttribute"
|
||||||
|
resizable
|
||||||
|
show-overflow
|
||||||
|
height="400px"
|
||||||
|
>
|
||||||
|
<vxe-column title="序号" width="60" type="seq" align="center"></vxe-column>
|
||||||
|
<vxe-column field="subName" title="变电站名称" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="objName" title="监测对象名称" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="loadType" title="干扰源类型" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
|
||||||
|
<vxe-column field="vharmonicValue" title="监测点污染值" align="center" min-width="120"></vxe-column>
|
||||||
|
</vxe-table>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import Table from '@/components/table/index.vue'
|
||||||
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
|
import { mainHeight } from '@/utils/layout'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||||
|
//
|
||||||
|
const detailDialogVisible = ref(false)
|
||||||
|
const detailLoading = ref(false)
|
||||||
|
const detailDialogTitle = ref('')
|
||||||
|
const detailData = ref([])
|
||||||
|
const dictData = useDictData()
|
||||||
|
const detailTableRef = ref()
|
||||||
|
const lineList = dictData.getBasicData('Line_Type')
|
||||||
|
const options = dictData.getBasicData('Pollution_Calc')
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
url: '/harmonic-boot/PollutionSubstation/getAreaPollution',
|
||||||
|
publicHeight: 65,
|
||||||
|
isWebPaging: true,
|
||||||
|
method: 'POST',
|
||||||
|
filename: '区域级评估',
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
width: 80,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'deptName',
|
||||||
|
title: '区域',
|
||||||
|
minWidth: 100
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'score',
|
||||||
|
title: '污染值',
|
||||||
|
minWidth: 150
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
width: '180',
|
||||||
|
fixed: 'right',
|
||||||
|
render: 'buttons',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '监测点污染详情',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
|
||||||
|
click: row => {
|
||||||
|
detailDialogTitle.value = row.deptName + '监测点污染详情'
|
||||||
|
detailLoading.value = true
|
||||||
|
detailData.value = row.powerFlagPollutionList
|
||||||
|
detailDialogVisible.value = true
|
||||||
|
detailLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
beforeSearchFun: () => {
|
||||||
|
tableStore.table.params.id = tableStore.table.params.deptIndex
|
||||||
|
tableStore.table.params.ids = [tableStore.table.params.statisticalType?.id]
|
||||||
|
},
|
||||||
|
loadCallback: () => {
|
||||||
|
tableStore.table.column[2].title = tableStore.table.params.statisticalType.name + '污染值'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
|
tableStore.table.params.statisticalType = options[0]
|
||||||
|
tableStore.table.params.searchState = '0'
|
||||||
|
tableStore.table.params.lineRunFlag = 0
|
||||||
|
|
||||||
|
// 导出详情数据的方法
|
||||||
|
const exportDetailEvent = () => {
|
||||||
|
detailTableRef.value.exportData({
|
||||||
|
filename: detailDialogTitle.value,
|
||||||
|
sheetName: 'Sheet1',
|
||||||
|
type: 'xlsx',
|
||||||
|
useStyle: true,
|
||||||
|
data: detailData.value,
|
||||||
|
columnFilterMethod: function (column: any) {
|
||||||
|
return !(column.$columnIndex === 0)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
onMounted(() => {
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
const setSearchValue = (val: string) => {
|
||||||
|
tableStore.table.params.searchValue = val
|
||||||
|
tableStore.index()
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
setSearchValue
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<TableHeader datePicker area ref="TableHeaderRef" showExport>
|
||||||
|
<template #select>
|
||||||
|
<el-form-item label="统计类型">
|
||||||
|
<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 label="筛选数据">
|
||||||
|
<el-input
|
||||||
|
v-model="tableStore.table.params.searchValue"
|
||||||
|
placeholder="请输入项目名称"
|
||||||
|
clearable
|
||||||
|
:show-word-limit="true"
|
||||||
|
:maxlength="32"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #operation>
|
||||||
|
<!-- <el-button icon="el-icon-Download" type="primary">导出</el-button> -->
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef" />
|
||||||
|
<!-- 添加弹窗 -->
|
||||||
|
<el-dialog draggable v-model="detailDialogVisible" :title="detailDialogTitle" width="1000px">
|
||||||
|
<div v-loading="detailLoading">
|
||||||
|
<div style="margin-bottom: 10px; text-align: right">
|
||||||
|
<el-button icon="el-icon-Download" type="primary" @click="exportDetailEvent">导出</el-button>
|
||||||
|
</div>
|
||||||
|
<vxe-table
|
||||||
|
ref="detailTableRef"
|
||||||
|
:data="detailData"
|
||||||
|
auto-resize
|
||||||
|
v-bind="defaultAttribute"
|
||||||
|
resizable
|
||||||
|
show-overflow
|
||||||
|
height="400px"
|
||||||
|
>
|
||||||
|
<vxe-column title="序号" width="60" type="seq" align="center"></vxe-column>
|
||||||
|
<vxe-column field="subName" title="变电站名称" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="objName" title="监测对象名称" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="loadType" title="干扰源类型" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
|
||||||
|
<vxe-column field="vharmonicValue" title="监测点污染值" align="center" min-width="120"></vxe-column>
|
||||||
|
</vxe-table>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import Table from '@/components/table/index.vue'
|
||||||
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
|
import { mainHeight } from '@/utils/layout'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||||
|
//
|
||||||
|
const detailDialogVisible = ref(false)
|
||||||
|
const detailLoading = ref(false)
|
||||||
|
const detailDialogTitle = ref('')
|
||||||
|
const detailData = ref([])
|
||||||
|
const dictData = useDictData()
|
||||||
|
const detailTableRef = ref()
|
||||||
|
const lineList = dictData.getBasicData('Line_Type')
|
||||||
|
const options = dictData.getBasicData('Pollution_Calc')
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
url: '/harmonic-boot/PollutionSubstation/downPollutionSensitiveUser',
|
||||||
|
publicHeight: 65,
|
||||||
|
isWebPaging: true,
|
||||||
|
method: 'POST',
|
||||||
|
filename: '敏感及重要用户评估',
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
width: 80,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'gdName',
|
||||||
|
title: '供电公司',
|
||||||
|
width: 150
|
||||||
|
},
|
||||||
|
|
||||||
|
{ field: 'subStationName', title: '变电站', minWidth: 150 },
|
||||||
|
{ field: 'projectName', title: '项目名称', minWidth: 150 },
|
||||||
|
{
|
||||||
|
field: 'subValue',
|
||||||
|
title: '污染值',
|
||||||
|
width: 150,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue == null ? '暂未安装监测点' : row.cellValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
width: '180',
|
||||||
|
fixed: 'right',
|
||||||
|
render: 'buttons',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '监测点污染详情',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.subValue == null
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
detailDialogTitle.value = '监测点污染详情'
|
||||||
|
console.log('🚀 ~ row:', row)
|
||||||
|
detailLoading.value = true
|
||||||
|
detailData.value = row.powerFlagPollutionList
|
||||||
|
detailDialogVisible.value = true
|
||||||
|
detailLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
beforeSearchFun: () => {
|
||||||
|
tableStore.table.params.deptId = tableStore.table.params.deptIndex
|
||||||
|
tableStore.table.params.ids = [tableStore.table.params.statisticalType?.id]
|
||||||
|
},
|
||||||
|
loadCallback: () => {
|
||||||
|
tableStore.table.column[4].title = tableStore.table.params.statisticalType.name + '污染值'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
|
tableStore.table.params.statisticalType = options[0]
|
||||||
|
tableStore.table.params.powerFlag = 0
|
||||||
|
tableStore.table.params.isUpToGrid = 0
|
||||||
|
// 导出详情数据的方法
|
||||||
|
const exportDetailEvent = () => {
|
||||||
|
detailTableRef.value.exportData({
|
||||||
|
filename: detailDialogTitle.value,
|
||||||
|
sheetName: 'Sheet1',
|
||||||
|
type: 'xlsx',
|
||||||
|
useStyle: true,
|
||||||
|
data: detailData.value,
|
||||||
|
columnFilterMethod: function (column: any) {
|
||||||
|
return !(column.$columnIndex === 0)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
onMounted(() => {
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
const setSearchValue = (val: string) => {
|
||||||
|
tableStore.table.params.searchValue = val
|
||||||
|
tableStore.index()
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
setSearchValue
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -2,19 +2,17 @@
|
|||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<el-tabs v-model="activeTab" type="border-card" @tab-change="handleTabChange">
|
<el-tabs v-model="activeTab" type="border-card" @tab-change="handleTabChange">
|
||||||
<el-tab-pane label="监测点评估" name="pollutionReport">
|
<el-tab-pane label="监测点评估" name="pollutionReport">
|
||||||
<MonitoringPointTab
|
<MonitoringPointTab ref="monitoringPointTabRef" :active="activeTab === 'pollutionReport'" />
|
||||||
ref="monitoringPointTabRef"
|
|
||||||
:active="activeTab === 'pollutionReport'"
|
|
||||||
|
|
||||||
/>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
<el-tab-pane label="场站级评估" name="anotherReport">
|
<el-tab-pane label="场站级评估" name="anotherReport">
|
||||||
<SubstationTab
|
<SubstationTab ref="substationTabRef" :active="activeTab === 'anotherReport'" />
|
||||||
ref="substationTabRef"
|
</el-tab-pane>
|
||||||
:active="activeTab === 'anotherReport'"
|
<el-tab-pane label="区域级评估" name="3">
|
||||||
|
<regionalAssessment v-if="activeTab == '3'" />
|
||||||
/>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="敏感及重要用户评估" name="4">
|
||||||
|
<userEvaluation ref="userEvaluationRef" v-if="activeTab == '4'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@@ -22,9 +20,12 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import MonitoringPointTab from './MonitoringPointTab.vue'
|
import MonitoringPointTab from './components/MonitoringPointTab.vue'
|
||||||
import SubstationTab from './SubstationTab.vue'
|
import SubstationTab from './components/SubstationTab.vue'
|
||||||
|
import regionalAssessment from './components/regionalAssessment.vue'
|
||||||
|
import userEvaluation from './components/userEvaluation.vue'
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
|
const route = useRoute()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/qydetailedAnalysis/pollutionReport'
|
name: 'harmonic-boot/qydetailedAnalysis/pollutionReport'
|
||||||
})
|
})
|
||||||
@@ -32,18 +33,38 @@ defineOptions({
|
|||||||
const activeTab = ref('pollutionReport')
|
const activeTab = ref('pollutionReport')
|
||||||
const monitoringPointTabRef = ref()
|
const monitoringPointTabRef = ref()
|
||||||
const substationTabRef = ref()
|
const substationTabRef = ref()
|
||||||
|
const userEvaluationRef = ref()
|
||||||
|
|
||||||
const handleTabChange = (tabName: string) => {
|
const handleTabChange = (tabName: string) => {
|
||||||
if (tabName === 'pollutionReport' && monitoringPointTabRef.value) {
|
if (tabName === 'pollutionReport' && monitoringPointTabRef.value) {
|
||||||
|
|
||||||
monitoringPointTabRef.value.refresh()
|
monitoringPointTabRef.value.refresh()
|
||||||
} else if (tabName === 'anotherReport' && substationTabRef.value) {
|
} else if (tabName === 'anotherReport' && substationTabRef.value) {
|
||||||
substationTabRef.value.refresh()
|
substationTabRef.value.refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
watch(
|
||||||
|
() => route.query.t,
|
||||||
|
async (newValue, oldValue) => {
|
||||||
|
if (route.fullPath.includes('harmonic-boot/qydetailedAnalysis/pollutionReport')) {
|
||||||
|
let type = (route.query.type as string) || 'null'
|
||||||
|
if (type == 'null') {
|
||||||
|
} else if (type == '1') {
|
||||||
|
activeTab.value = 'pollutionReport'
|
||||||
|
setTimeout(() => {
|
||||||
|
monitoringPointTabRef.value.refresh((route.query.name as string) || 'null')
|
||||||
|
}, 500)
|
||||||
|
} else if (type == '2') {
|
||||||
|
activeTab.value = 'anotherReport'
|
||||||
|
setTimeout(() => {
|
||||||
|
substationTabRef.value.refresh((route.query.statisticalType as string) || 'null')
|
||||||
|
}, 500)
|
||||||
|
} else if (type == '4') {
|
||||||
|
activeTab.value = '4'
|
||||||
|
setTimeout(() => {
|
||||||
|
userEvaluationRef.value.setSearchValue((route.query.name as string) || '')
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ deep: true, immediate: true }
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
|
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
|
||||||
{
|
{
|
||||||
field: 'ip',
|
field: 'ip',
|
||||||
title: '网络参数',
|
title: '网络参数' ,width:'120px',
|
||||||
formatter: ({ row }: any) => {
|
formatter: ({ row }: any) => {
|
||||||
return row.ip || '/'
|
return row.ip || '/'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
|
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
|
||||||
{
|
{
|
||||||
field: 'ip',
|
field: 'ip',
|
||||||
title: '网络参数',
|
title: '网络参数' ,width:'120px',
|
||||||
formatter: ({ row }: any) => {
|
formatter: ({ row }: any) => {
|
||||||
return row.ip || '/'
|
return row.ip || '/'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -154,11 +154,7 @@
|
|||||||
<vxe-column type="seq" title="序号" width="80px">
|
<vxe-column type="seq" title="序号" width="80px">
|
||||||
<template #default="{ rowIndex }">
|
<template #default="{ rowIndex }">
|
||||||
<span>
|
<span>
|
||||||
{{
|
{{ (pageNum - 1) * pageSize + rowIndex + 1 }}
|
||||||
(tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize +
|
|
||||||
rowIndex +
|
|
||||||
1
|
|
||||||
}}
|
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
@@ -167,7 +163,7 @@
|
|||||||
<vxe-column field="subStation" title="变电站" minWidth="110px"></vxe-column>
|
<vxe-column field="subStation" title="变电站" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="manufacturer" title="终端厂家" minWidth="110px"></vxe-column>
|
<vxe-column field="manufacturer" title="终端厂家" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="deviceName" title="终端名称" minWidth="110px"></vxe-column>
|
<vxe-column field="deviceName" title="终端名称" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="ip" title="终端IP" :formatter="formatter" width="130px"></vxe-column>
|
<vxe-column field="ip" title="终端IP" :formatter="formatter" width="120px"></vxe-column>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
field="lineName"
|
field="lineName"
|
||||||
title="监测点名称"
|
title="监测点名称"
|
||||||
@@ -216,7 +212,7 @@
|
|||||||
import TableStore from '@/utils/tableStore'
|
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 { onMounted, provide, ref } from 'vue'
|
import { onMounted, provide, ref, watch } from 'vue'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
@@ -225,7 +221,8 @@ import { getMonitorVerifyDay } from '@/api/device-boot/dataVerify'
|
|||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/harmonic/getIntegrityData'
|
name: 'harmonic-boot/harmonic/getIntegrityData'
|
||||||
})
|
})
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
|
const route = useRoute()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
//字典获取监督对象类型
|
//字典获取监督对象类型
|
||||||
const pageHeight = mainHeight(97)
|
const pageHeight = mainHeight(97)
|
||||||
@@ -490,6 +487,23 @@ onMounted(() => {
|
|||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route.query.t,
|
||||||
|
async (newValue, oldValue) => {
|
||||||
|
if (route.fullPath.includes('harmonic-boot/harmonic/getIntegrityData')) {
|
||||||
|
let type = (route.query.type as string) || 'null'
|
||||||
|
if (type == 'null') {
|
||||||
|
} else if (type == '1') {
|
||||||
|
setTimeout(() => {
|
||||||
|
tableStore.table.params.searchValue = (route.query.name as string) || ''
|
||||||
|
tableStore.index()
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ deep: true, immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
tableStore.table.params.name = ''
|
tableStore.table.params.name = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'name', title: '电网拓扑', width: 350, align: 'left', treeNode: true },
|
{ field: 'name', title: '电网拓扑', width: 350, align: 'left', treeNode: true },
|
||||||
{
|
{
|
||||||
field: 'ip',
|
field: 'ip',
|
||||||
title: '网络参数',
|
title: '网络参数' ,width:'120px',
|
||||||
formatter: ({ row }: any) => {
|
formatter: ({ row }: any) => {
|
||||||
return row.ip || '/'
|
return row.ip || '/'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -152,11 +152,7 @@
|
|||||||
<vxe-column type="seq" title="序号" width="80px">
|
<vxe-column type="seq" title="序号" width="80px">
|
||||||
<template #default="{ rowIndex }">
|
<template #default="{ rowIndex }">
|
||||||
<span>
|
<span>
|
||||||
{{
|
{{ (pageNum - 1) * pageSize + rowIndex + 1 }}
|
||||||
(tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize +
|
|
||||||
rowIndex +
|
|
||||||
1
|
|
||||||
}}
|
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
@@ -165,7 +161,7 @@
|
|||||||
<vxe-column field="subStation" title="变电站" minWidth="110px"></vxe-column>
|
<vxe-column field="subStation" title="变电站" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="manufacturer" title="终端厂家" minWidth="110px"></vxe-column>
|
<vxe-column field="manufacturer" title="终端厂家" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="deviceName" title="终端名称" minWidth="110px"></vxe-column>
|
<vxe-column field="deviceName" title="终端名称" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="ip" title="终端IP" :formatter="formatter" width="130px"></vxe-column>
|
<vxe-column field="ip" title="终端IP" :formatter="formatter" width="120px"></vxe-column>
|
||||||
<vxe-column field="runFlag" title="运行状态" width="90px">
|
<vxe-column field="runFlag" title="运行状态" width="90px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag
|
<el-tag
|
||||||
@@ -217,7 +213,8 @@ import { getMonitorVerifyDay } from '@/api/device-boot/dataVerify'
|
|||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/harmonic/getIntegrityData'
|
name: 'harmonic-boot/harmonic/getIntegrityData'
|
||||||
})
|
})
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
|
const route = useRoute()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
//字典获取监督对象类型
|
//字典获取监督对象类型
|
||||||
const pageHeight = mainHeight(97)
|
const pageHeight = mainHeight(97)
|
||||||
@@ -480,6 +477,22 @@ onMounted(() => {
|
|||||||
|
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
watch(
|
||||||
|
() => route.query.t,
|
||||||
|
async (newValue, oldValue) => {
|
||||||
|
if (route.fullPath.includes('harmonic-boot/area/OnlineRate')) {
|
||||||
|
let type = (route.query.type as string) || 'null'
|
||||||
|
if (type == 'null') {
|
||||||
|
} else if (type == '1') {
|
||||||
|
setTimeout(() => {
|
||||||
|
tableStore.table.params.searchValue = (route.query.name as string) || ''
|
||||||
|
tableStore.index()
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ deep: true, immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
tableStore.table.params.name = ''
|
tableStore.table.params.name = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|||||||
@@ -0,0 +1,74 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<TableHeader datePicker ref="TableHeaderRef">
|
||||||
|
<template v-slot:select>
|
||||||
|
<el-form-item label="超标指标">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.targetId"
|
||||||
|
clearable
|
||||||
|
|
||||||
|
collapse-tags
|
||||||
|
collapse-tags-tooltip
|
||||||
|
placeholder="请选择超标指标"
|
||||||
|
>
|
||||||
|
<el-option v-for="item in exceeded" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { nextTick, onMounted, reactive, ref } from 'vue'
|
||||||
|
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||||
|
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||||
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||||
|
import Table from '@/components/table/index.vue'
|
||||||
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
const dictData = useDictData()
|
||||||
|
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||||
|
const monitoringPoint = useMonitoringPoint()
|
||||||
|
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
url: '/supervision-boot/onlineMonitor/overLimitDetail',
|
||||||
|
publicHeight: 80,
|
||||||
|
isWebPaging: true,
|
||||||
|
method: 'POST',
|
||||||
|
filename: '监测点台账',
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
width: 70,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'time',
|
||||||
|
title: '日期',
|
||||||
|
width: '140px'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'overLimitInfo',
|
||||||
|
title: '越限详情'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
beforeSearchFun: () => {
|
||||||
|
tableStore.table.params.lineId = monitoringPoint.state.lineId
|
||||||
|
}
|
||||||
|
})
|
||||||
|
tableStore.table.params.targetId = exceeded.filter(item => item.code == 'Total_Indicator')[0].id
|
||||||
|
? exceeded.filter(item => item.code == 'Total_Indicator')[0].id
|
||||||
|
: ''
|
||||||
|
onMounted(() => {
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
</script>
|
||||||
|
<style></style>
|
||||||
@@ -41,9 +41,9 @@
|
|||||||
<el-tab-pane label="监测点运行状态" name="6" lazy v-if="!isReload">
|
<el-tab-pane label="监测点运行状态" name="6" lazy v-if="!isReload">
|
||||||
<Yunxingzhuangtai v-if="activeName == '6'" />
|
<Yunxingzhuangtai v-if="activeName == '6'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="实时数据" name="7" lazy v-if="!isReload && !VITE_FLAG">
|
<!-- <el-tab-pane label="实时数据" name="7" lazy v-if="!isReload && !VITE_FLAG">
|
||||||
<Shishishuju v-if="activeName == '7'" />
|
<Shishishuju v-if="activeName == '7'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane> -->
|
||||||
<el-tab-pane label="统计报表" name="8" lazy v-if="!isReload && VITE_FLAG">
|
<el-tab-pane label="统计报表" name="8" lazy v-if="!isReload && VITE_FLAG">
|
||||||
<StatisticalReport v-if="activeName == '8'" />
|
<StatisticalReport v-if="activeName == '8'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@@ -64,23 +64,25 @@ import { defineOptions, watch, onMounted, ref, nextTick } from 'vue'
|
|||||||
import 'splitpanes/dist/splitpanes.css'
|
import 'splitpanes/dist/splitpanes.css'
|
||||||
import { Splitpanes, Pane } from 'splitpanes'
|
import { Splitpanes, Pane } from 'splitpanes'
|
||||||
import PointTree from '@/components/tree/pqs/pointTree.vue'
|
import PointTree from '@/components/tree/pqs/pointTree.vue'
|
||||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import Wentaizonghepinggu from './wentaizonghepinggu/index.vue'
|
import Wentaizonghepinggu from './wentaizonghepinggu/index.vue'
|
||||||
import Wentaizhibiaohegelv from './wentaizhibiaohegelv/index.vue'
|
import Wentaizhibiaohegelv from './wentaizhibiaohegelv/index.vue'
|
||||||
import Wentaishujufenxi from './wentaishujufenxi/index.vue'
|
import Wentaishujufenxi from './wentaishujufenxi/index.vue'
|
||||||
import Xiebopingpu from './xiebopingpu/index.vue'
|
import Xiebopingpu from './xiebopingpu/index.vue'
|
||||||
import Gaojingshujutongji from './gaojingshujutongji/index.vue'
|
import Gaojingshujutongji from './gaojingshujutongji/index_JB.vue'
|
||||||
import Yunxingzhuangtai from './yunxingzhuangtai/index.vue'
|
import Yunxingzhuangtai from './yunxingzhuangtai/index.vue'
|
||||||
import Shishishuju from './shishishuju/index.vue'
|
import Shishishuju from './shishishuju/index.vue'
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
import StatisticalReport from './statisticalReport/index.vue'
|
import StatisticalReport from './statisticalReport/index.vue'
|
||||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||||
|
import { id } from 'element-plus/es/locale'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/monitor/online'
|
name: 'harmonic-boot/monitor/online'
|
||||||
})
|
})
|
||||||
|
const route = useRoute()
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const pointTree = ref()
|
const pointTree = ref()
|
||||||
const size = ref(23)
|
const size = ref(23)
|
||||||
@@ -121,7 +123,9 @@ watch(
|
|||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
watch(
|
watch(
|
||||||
() => monitoringPoint.state.lineId,
|
() => {
|
||||||
|
return monitoringPoint.state.lineId
|
||||||
|
},
|
||||||
() => {
|
() => {
|
||||||
// 刷新页面
|
// 刷新页面
|
||||||
isReload.value = true
|
isReload.value = true
|
||||||
@@ -130,6 +134,49 @@ watch(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route.query.t,
|
||||||
|
async (newValue, oldValue) => {
|
||||||
|
if (route.fullPath.includes('harmonic-boot/monitor/online')) {
|
||||||
|
let type = (route.query.type as string) || 'null'
|
||||||
|
let lineId = (route.query.id as string) || 'null'
|
||||||
|
if (type == 'null') {
|
||||||
|
} else {
|
||||||
|
setTimeout(() => {
|
||||||
|
monitoringPoint.setValue('lineId', lineId)
|
||||||
|
//
|
||||||
|
// pointTree.value.tree
|
||||||
|
activeName.value = type
|
||||||
|
setTimeout(() => {
|
||||||
|
pointTree.value.scrollToNode(lineId)
|
||||||
|
|
||||||
|
monitoringPoint.setValue('lineName', findNodeByTreeId(pointTree.value.tree, lineId).alias)
|
||||||
|
}, 500)
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ deep: true, immediate: true }
|
||||||
|
)
|
||||||
|
// 递归函数(同上)
|
||||||
|
const findNodeByTreeId = (treeData: any, id: any) => {
|
||||||
|
for (const node of treeData) {
|
||||||
|
if (node.id == id) return node
|
||||||
|
if (node.children && Array.isArray(node.children) && node.children.length) {
|
||||||
|
const found: any = findNodeByTreeId(node.children, id)
|
||||||
|
if (found) return found
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
// 调用示例
|
||||||
|
const getTargetNode = () => {
|
||||||
|
const targetId = '9b7adecf588b4110acb7018f297592a7'
|
||||||
|
const node = findNodeByTreeId(treeData.value, targetId)
|
||||||
|
console.log('Vue中找到的节点:', node)
|
||||||
|
}
|
||||||
const changeTab = (e: string) => {
|
const changeTab = (e: string) => {
|
||||||
activeName.value = e
|
activeName.value = e
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ const loading = ref(false)
|
|||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
TableHeaderRef.value.setTheDate(4)
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
if (dom) {
|
if (dom) {
|
||||||
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||||
@@ -116,7 +117,7 @@ getTemplateByDept({ id: dictData.state.area[0].id })
|
|||||||
Template.value = res.data[0]
|
Template.value = res.data[0]
|
||||||
reportForm.value = res.data[0]?.reportForm
|
reportForm.value = res.data[0]?.reportForm
|
||||||
showTree.value = true
|
showTree.value = true
|
||||||
tableStore.index()
|
TableHeaderRef.value.onComSearch()
|
||||||
})
|
})
|
||||||
.catch((err: any) => {
|
.catch((err: any) => {
|
||||||
showTree.value = true
|
showTree.value = true
|
||||||
@@ -140,11 +141,11 @@ const exportReport = () => {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
let form = new FormData()
|
let form = new FormData()
|
||||||
form.append('isUrl', false)
|
form.append('isUrl', false)
|
||||||
form.append('lineIndex', dotList.value.id)
|
form.append('lineIndex', monitoringPoint.state.lineId)
|
||||||
form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0])
|
form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0])
|
||||||
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
|
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
|
||||||
form.append('type', 0)
|
form.append('type', 0)
|
||||||
form.append('name', dotList.value.name)
|
form.append('name', monitoringPoint.state.lineName.split('>').pop())
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: '下载报告中,请稍等.....',
|
message: '下载报告中,请稍等.....',
|
||||||
duration: 1000
|
duration: 1000
|
||||||
@@ -159,7 +160,7 @@ const exportReport = () => {
|
|||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download =
|
link.download =
|
||||||
dotList.value.name +
|
monitoringPoint.state.lineName.split('>').pop() +
|
||||||
TableHeaderRef.value.datePickerRef.timeValue[0] +
|
TableHeaderRef.value.datePickerRef.timeValue[0] +
|
||||||
'_' +
|
'_' +
|
||||||
TableHeaderRef.value.datePickerRef.timeValue[1] // 设置下载的文件名
|
TableHeaderRef.value.datePickerRef.timeValue[1] // 设置下载的文件名
|
||||||
|
|||||||
@@ -1448,7 +1448,7 @@ const rendering = () => {
|
|||||||
}
|
}
|
||||||
const getEcharts = () => {
|
const getEcharts = () => {
|
||||||
list.value.forEach((item: any, i: number) => {
|
list.value.forEach((item: any, i: number) => {
|
||||||
console.log('🚀 ~ getEcharts ~ item:', item)
|
|
||||||
|
|
||||||
const values = item.value && item.value.length > 0 ? item.value.map(k => k[1]) : [0]
|
const values = item.value && item.value.length > 0 ? item.value.map(k => k[1]) : [0]
|
||||||
let [min, max] = yMethod([item.maxValue, item.minValue, ...values])
|
let [min, max] = yMethod([item.maxValue, item.minValue, ...values])
|
||||||
@@ -1490,8 +1490,12 @@ const getEcharts = () => {
|
|||||||
let tips = ''
|
let tips = ''
|
||||||
tips += '时刻:' + params[0].data[0] + '</br/>'
|
tips += '时刻:' + params[0].data[0] + '</br/>'
|
||||||
for (let i = 0; i < params.length; i++) {
|
for (let i = 0; i < params.length; i++) {
|
||||||
|
|
||||||
|
|
||||||
if (params[i].seriesName == '暂态触发点') {
|
if (params[i].seriesName == '暂态触发点') {
|
||||||
|
|
||||||
tips += ''
|
tips += ''
|
||||||
|
|
||||||
return tips
|
return tips
|
||||||
}
|
}
|
||||||
if (params[i].seriesName == 'A相谐波电流方向') {
|
if (params[i].seriesName == 'A相谐波电流方向') {
|
||||||
@@ -1526,41 +1530,50 @@ const getEcharts = () => {
|
|||||||
let str = (params[i].value[1] * 1).toString()
|
let str = (params[i].value[1] * 1).toString()
|
||||||
let reg = str.indexOf('.') > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g
|
let reg = str.indexOf('.') > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g
|
||||||
let str1 = str.replace(reg, '$1,')
|
let str1 = str.replace(reg, '$1,')
|
||||||
|
let cleanStr = str1.replace(/,/g, '')
|
||||||
|
let num = Number(cleanStr)
|
||||||
tips +=
|
tips +=
|
||||||
params[i].marker +
|
params[i].marker +
|
||||||
params[i].seriesName.replace('(kV)', '') +
|
params[i].seriesName.replace('(kV)', '') +
|
||||||
':' +
|
':' +
|
||||||
(Number.isNaN(Number(str1)) ? '/' : str1) +
|
(Number.isNaN(Number(num)) ? '/' : num) +
|
||||||
'kV<br/>'
|
'kV<br/>'
|
||||||
} else if (params[i].seriesName == '零序电压(V)' || params[i].seriesName == '负序电压(V)') {
|
} else if (params[i].seriesName == '零序电压(V)' || params[i].seriesName == '负序电压(V)') {
|
||||||
let str = (params[i].value[1] * 1).toString()
|
let str = (params[i].value[1] * 1).toString()
|
||||||
let reg = str.indexOf('.') > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g
|
let reg = str.indexOf('.') > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g
|
||||||
let str1 = str.replace(reg, '$1,')
|
let str1 = str.replace(reg, '$1,')
|
||||||
|
let cleanStr = str1.replace(/,/g, '')
|
||||||
|
let num = Number(cleanStr)
|
||||||
tips +=
|
tips +=
|
||||||
params[i].marker +
|
params[i].marker +
|
||||||
params[i].seriesName.replace('(V)', '') +
|
params[i].seriesName.replace('(V)', '') +
|
||||||
':' +
|
':' +
|
||||||
(Number.isNaN(Number(str1)) ? '/' : str1) +
|
(Number.isNaN(Number(num)) ? '/' : num) +
|
||||||
'V<br/>'
|
'V<br/>'
|
||||||
} else if (params[i].seriesName !== '正序电压(kV)') {
|
} else if (params[i].seriesName !== '正序电压(kV)') {
|
||||||
let str = (params[i].value[1] * 1).toString()
|
let str = (params[i].value[1] * 1).toString()
|
||||||
let reg = str.indexOf('.') > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g
|
let reg = str.indexOf('.') > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g
|
||||||
let str1 = str.replace(reg, '$1,')
|
let str1 = str.replace(reg, '$1,')
|
||||||
|
let cleanStr = str1.replace(/,/g, '')
|
||||||
|
let num = Number(cleanStr)
|
||||||
tips +=
|
tips +=
|
||||||
params[i].marker +
|
params[i].marker +
|
||||||
params[i].seriesName +
|
params[i].seriesName +
|
||||||
':' +
|
':' +
|
||||||
(Number.isNaN(Number(str1)) ? '/' : str1) +
|
(Number.isNaN(Number(num)) ? '/' : num) +
|
||||||
'<br/>'
|
'<br/>'
|
||||||
} else {
|
} else {
|
||||||
let str = (params[i].value[2] * 1).toString()
|
let str = (params[i].value[2] * 1).toString()
|
||||||
|
|
||||||
let reg = str.indexOf('.') > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g
|
let reg = str.indexOf('.') > -1 ? /(\d)(?=(\d{3})+\.)/g : /(\d)(?=(?:\d{3})+$)/g
|
||||||
let str1 = str.replace(reg, '$1,')
|
let str1 = str.replace(reg, '$1,')
|
||||||
|
let cleanStr = str1.replace(/,/g, '')
|
||||||
|
let num = Number(cleanStr)
|
||||||
tips +=
|
tips +=
|
||||||
params[i].marker +
|
params[i].marker +
|
||||||
params[i].seriesName +
|
params[i].seriesName +
|
||||||
':' +
|
':' +
|
||||||
(Number.isNaN(Number(str1)) ? '/' : str1) +
|
(Number.isNaN(Number(num)) ? '/' : num) +
|
||||||
'<br/>'
|
'<br/>'
|
||||||
|
|
||||||
let str2 = (params[i].value[3] * 1).toString()
|
let str2 = (params[i].value[3] * 1).toString()
|
||||||
@@ -1575,6 +1588,8 @@ const getEcharts = () => {
|
|||||||
':' +
|
':' +
|
||||||
(Number.isNaN(Number(str2)) ? '/' : str2) +
|
(Number.isNaN(Number(str2)) ? '/' : str2) +
|
||||||
'<br/>'
|
'<br/>'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1796,7 +1811,6 @@ const getEcharts = () => {
|
|||||||
echarts.connect('group')
|
echarts.connect('group')
|
||||||
}
|
}
|
||||||
const conditionChange = () => {
|
const conditionChange = () => {
|
||||||
console.log(123)
|
|
||||||
|
|
||||||
//判断一个指标时
|
//判断一个指标时
|
||||||
if (formData.condition.length == 1) {
|
if (formData.condition.length == 1) {
|
||||||
@@ -1935,7 +1949,7 @@ const conditionChange = () => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
//console.log('🚀 ~ setTimeout ~ tableHeaderRef.value:', tableHeaderRef.value)
|
//console.log('🚀 ~ setTimeout ~ tableHeaderRef.value:', tableHeaderRef.value)
|
||||||
|
|
||||||
tableHeaderRef.value && tableHeaderRef.value?.computedSearchRow()
|
//tableHeaderRef.value && tableHeaderRef.value?.computedSearchRow()
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -231,14 +231,14 @@ const init = () => {
|
|||||||
},
|
},
|
||||||
backgroundColor: 'rgba(0,0,0,0.55)',
|
backgroundColor: 'rgba(0,0,0,0.55)',
|
||||||
formatter: function (params: any) {
|
formatter: function (params: any) {
|
||||||
//console.log(params)
|
console.log(params)
|
||||||
let msg = ''
|
let msg = ''
|
||||||
msg += params[0].name + '<br/>'
|
msg += params[0].name
|
||||||
for (let i in params) {
|
for (let i in params) {
|
||||||
if (params[i].data == 3.14159) {
|
if (params[i].data == 3.14159) {
|
||||||
msg +=params[i].marker+ params[i].seriesName + ': 暂无数据<br/>'
|
msg += '(' + params[i].seriesName + ')' + '<br/>' + params[i].marker + ': 暂无数据<br/>'
|
||||||
} else {
|
} else {
|
||||||
msg += params[i].marker+ params[i].seriesName + ': ' + params[i].data + '<br/>'
|
msg += '(' + params[i].seriesName + ')' + '<br/>' + params[i].marker + ': ' + params[i].data + '<br/>'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return msg
|
return msg
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出excel</el-button>
|
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出excel</el-button>
|
||||||
<el-button icon="el-icon-Download" :loading="loading" @click="exportReport" type="primary">
|
<el-button icon="el-icon-Download" :loading="loading" @click="exportReport" type="primary" v-if="VITE_FLAG">
|
||||||
下载报告
|
下载报告
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
@@ -69,6 +69,7 @@ import { ElMessage } from 'element-plus'
|
|||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/xieboReport'
|
name: 'harmonic-boot/xieboReport'
|
||||||
})
|
})
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
const showTree = ref(false)
|
const showTree = ref(false)
|
||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const size = ref(23)
|
const size = ref(23)
|
||||||
@@ -77,7 +78,7 @@ const TableHeaderRef = ref()
|
|||||||
const dotList: any = ref({})
|
const dotList: any = ref({})
|
||||||
const Template: any = ref({})
|
const Template: any = ref({})
|
||||||
const reportForm: any = ref('')
|
const reportForm: any = ref('')
|
||||||
|
const name = ref('')
|
||||||
const templatePolicy: any = ref([])
|
const templatePolicy: any = ref([])
|
||||||
const reportFormList: any = ref([
|
const reportFormList: any = ref([
|
||||||
{
|
{
|
||||||
@@ -100,6 +101,7 @@ const tableStore = new TableStore({
|
|||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.tempId = Template.value.id
|
tableStore.table.params.tempId = Template.value.id
|
||||||
tableStore.table.params.lineId = dotList.value.id
|
tableStore.table.params.lineId = dotList.value.id
|
||||||
|
name.value = dotList.value.name
|
||||||
},
|
},
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data.forEach((item: any) => {
|
tableStore.table.data.forEach((item: any) => {
|
||||||
@@ -162,7 +164,15 @@ const handleNodeClick = (data: any, node: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const exportEvent = () => {
|
const exportEvent = () => {
|
||||||
exportExcel(luckysheet.getAllSheets(), '统计报表下载')
|
// 基础获取
|
||||||
|
const now = new Date()
|
||||||
|
const year = now.getFullYear() // 4位年份
|
||||||
|
const month = now.getMonth() + 1 // 月份0-11,需+1
|
||||||
|
const day = now.getDate() // 日期1-31
|
||||||
|
|
||||||
|
// 格式化YYYY - MM - DD(补零)
|
||||||
|
const formattedDate = `${year}${String(month).padStart(2, '0')}${String(day).padStart(2, '0')}`
|
||||||
|
exportExcel(luckysheet.getAllSheets(), name.value + formattedDate)
|
||||||
}
|
}
|
||||||
const exportReport = () => {
|
const exportReport = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'businessType', title: '行业类型' , minWidth: 100},
|
{ field: 'businessType', title: '行业类型' , minWidth: 100},
|
||||||
|
|
||||||
{ field: 'devName', title: '终端名称', minWidth: 80 },
|
{ field: 'devName', title: '终端名称', minWidth: 80 },
|
||||||
{ field: 'ip', title: '网络参数' , minWidth: 100},
|
{ field: 'ip', title: '网络参数' ,width:'120px'},
|
||||||
|
|
||||||
// { field: 'comFlag', title: '通讯状态' , minWidth: 100},
|
// { field: 'comFlag', title: '通讯状态' , minWidth: 100},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'manufacturer', title: '厂家', minWidth: 100 },
|
{ field: 'manufacturer', title: '厂家', minWidth: 100 },
|
||||||
|
|
||||||
{ field: 'devName', title: '终端名称', minWidth: 80 },
|
{ field: 'devName', title: '终端名称', minWidth: 80 },
|
||||||
{ field: 'ip', title: '网络参数', minWidth: 100 },
|
{ field: 'ip', title: '网络参数' ,width:'120px' },
|
||||||
{ field: 'loginTime', title: '投运时间', minWidth: 100 },
|
{ field: 'loginTime', title: '投运时间', minWidth: 100 },
|
||||||
{ field: 'devType', title: '终端型号', minWidth: 100 },
|
{ field: 'devType', title: '终端型号', minWidth: 100 },
|
||||||
{ field: 'port', title: '端口', minWidth: 100 },
|
{ field: 'port', title: '端口', minWidth: 100 },
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ const options: any = dictData.getBasicData('Pollution_Statis').filter(item => {
|
|||||||
return item
|
return item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const contaminate = ref(options[0].id)
|
const contaminate = ref(options[0]?.id)
|
||||||
const rowList: any = ref({})
|
const rowList: any = ref({})
|
||||||
const trendEChart: any = ref({})
|
const trendEChart: any = ref({})
|
||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
|
|||||||
@@ -10,15 +10,19 @@
|
|||||||
<div class="boxSteps">
|
<div class="boxSteps">
|
||||||
<el-steps>
|
<el-steps>
|
||||||
<template v-for="(item, i) in Voltage">
|
<template v-for="(item, i) in Voltage">
|
||||||
<el-step :class="active == i ? 'highlight' : ''" :title="item.name"
|
<el-step
|
||||||
@click="handleClick(i)"></el-step>
|
:class="active == i ? 'highlight' : ''"
|
||||||
|
:title="item.name"
|
||||||
|
@click="handleClick(i)"
|
||||||
|
></el-step>
|
||||||
</template>
|
</template>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(item, i) in evaluationData" class="evaluationData">
|
<div v-for="(item, i) in evaluationData" class="evaluationData">
|
||||||
<el-row style="width: 100%">
|
<el-row style="width: 100%">
|
||||||
<el-col :span="12" style="display: flex">
|
<el-col :span="12" style="display: flex">
|
||||||
<img :src="url[i]" />
|
<!-- <img :src="url[i]" /> -->
|
||||||
|
<span :class="`iconfont ${url[i]} icoColor`"></span>
|
||||||
<span>{{ item.targetName }}</span>
|
<span>{{ item.targetName }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" style="display: flex">
|
<el-col :span="12" style="display: flex">
|
||||||
@@ -66,11 +70,11 @@ const Voltage: any = dictData.getBasicData('Dev_Voltage_Stand').filter(item => {
|
|||||||
|
|
||||||
const chartRef = ref<HTMLDivElement>()
|
const chartRef = ref<HTMLDivElement>()
|
||||||
const url: any = [
|
const url: any = [
|
||||||
new URL(`@/assets/img/PLPC.png`, import.meta.url),
|
'icon-frequency',
|
||||||
new URL(`@/assets/img/DYPC.png`, import.meta.url),
|
'icon-dianya',
|
||||||
new URL(`@/assets/img/JBL.png`, import.meta.url),
|
'icon-dianyazongxiebojibianshuai',
|
||||||
new URL(`@/assets/img/SXDY.png`, import.meta.url),
|
'icon-sanxiangdianyafuzhibupingheng',
|
||||||
new URL(`@/assets/img/SB.png`, import.meta.url)
|
'icon-a-253_ipower'
|
||||||
]
|
]
|
||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
|
|
||||||
@@ -199,6 +203,7 @@ const handleClick = (i: any) => {
|
|||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@import '@/assets/font/iconfont.css';
|
||||||
:deep(.el-select) {
|
:deep(.el-select) {
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
}
|
}
|
||||||
@@ -283,4 +288,9 @@ defineExpose({ open })
|
|||||||
// color: var(--el-color-primary) !important;
|
// color: var(--el-color-primary) !important;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
.icoColor {
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
margin: 0 20px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -61,20 +61,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 监测点指标统计 -->
|
<!-- 资产性质 -->
|
||||||
<div :style="`height:calc(${boxHeight.height} + 50px)`">
|
<div :style="`height:calc(${boxHeight.height} + 50px)`">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>监测点指标统计</span>
|
<span>资产性质</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex" class="mt2">
|
<div style="display: flex" class="mt2">
|
||||||
<img src="@/assets/img/FGX.png" />
|
<img src="@/assets/img/FGX.png" />
|
||||||
</div>
|
</div>
|
||||||
<div :style="`height:calc(${boxHeight.height} + 20px);overflow-y: auto;`">
|
<div :style="`height:calc(${boxHeight.height} + 20px);overflow-y: auto;`">
|
||||||
<div v-for="item in countList">
|
<div v-for="item in countList">
|
||||||
<!-- <div class="title mt5" style="font-weight: 500">
|
<div class="title mt5" style="font-weight: 500">
|
||||||
<img src="@/assets/img/TJ.png" />
|
<!-- <img src="@/assets/img/TJ.png" />
|
||||||
{{ item.title }}
|
{{ item.title }} -->
|
||||||
</div> -->
|
</div>
|
||||||
<div
|
<div
|
||||||
class="card-Box mt10"
|
class="card-Box mt10"
|
||||||
:style="`height:calc((${boxHeight.height} - 20px )/ 2);`"
|
:style="`height:calc((${boxHeight.height} - 20px )/ 2);`"
|
||||||
@@ -95,33 +95,44 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
数据完整性:
|
数据完整性:
|
||||||
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate }}%</span>
|
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate || 0 }}%</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
在线率:
|
在线率:
|
||||||
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate }}%</span>
|
<span style="color: #2dcd28; cursor: text">{{ val.onLineRate || 0 }}%</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 监测点指标统计 -->
|
<!-- 资产性质 -->
|
||||||
<div :style="`height:calc(${boxHeight.height} - 55px)`">
|
<div :style="`height:calc(${boxHeight.height} - 55px)`">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>监测运行统计</span>
|
<span>监测运行统计</span>
|
||||||
|
<div class="titleNum">
|
||||||
|
( 合格:
|
||||||
|
<span class="mr10" style="color: #2dcd28" @click="LookMap(linList[0].lineListOne, [], 0)">
|
||||||
|
{{ linList[0].lineNumOne || 0 }}
|
||||||
|
</span>
|
||||||
|
告警:
|
||||||
|
<span style="color: #a52a2a" @click="LookMap(linList[0].lineListOne, [], 0)">
|
||||||
|
{{ linList[0].lineNumTwo || 0 }}
|
||||||
|
</span>
|
||||||
|
)
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex" class="mt2">
|
<div style="display: flex" class="mt2">
|
||||||
<img src="@/assets/img/FGX.png" />
|
<img src="@/assets/img/FGX.png" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :style="`height:calc(${boxHeight.height} - 100px);overflow-y: auto;`" class="BoxA mt10">
|
<div :style="`height:calc(${boxHeight.height} - 100px);overflow-y: auto;`" class="BoxA mt10">
|
||||||
<div class="card-Box" v-for="item in linList">
|
<div class="card-Box" v-for="item in linList.slice(1)">
|
||||||
<div>
|
<div class="num num2">
|
||||||
|
<div style="text-align: left">
|
||||||
<span class="line"></span>
|
<span class="line"></span>
|
||||||
<span class="vol">{{ item.title[0] }}</span>
|
<i class="vol">{{ item.title[0] }}</i>
|
||||||
</div>
|
</div>
|
||||||
<div class="num">
|
|
||||||
<div>
|
<div>
|
||||||
{{ item.title[1] }}:
|
{{ item.title[1] }}:
|
||||||
<span style="color: #2dcd28" @click="LookMap(item.lineListOne, [], 0)">
|
<span style="color: #2dcd28" @click="LookMap(item.lineListOne, [], 0)">
|
||||||
@@ -297,9 +308,10 @@ const countList: any = ref([
|
|||||||
title: '电网侧监测点',
|
title: '电网侧监测点',
|
||||||
num: 0,
|
num: 0,
|
||||||
onLineNum: 0,
|
onLineNum: 0,
|
||||||
integrityRate: 0
|
integrityRate: 0,
|
||||||
|
onLineRate: 0
|
||||||
},
|
},
|
||||||
{ title: '非电网侧监测点', num: 0, onLineNum: 0, integrityRate: 0 }
|
{ title: '非电网侧监测点', num: 0, onLineNum: 0, integrityRate: 0, onLineRate: 0 }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
// {
|
// {
|
||||||
@@ -379,7 +391,7 @@ const info = async (row: any) => {
|
|||||||
numOneList: []
|
numOneList: []
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// 监测点指标统计
|
// 资产性质
|
||||||
getGridDiagramStatistics(form).then(res => {
|
getGridDiagramStatistics(form).then(res => {
|
||||||
countList.value[0].children[0] = { title: '电网侧监测点', ...res.data.data[0] }
|
countList.value[0].children[0] = { title: '电网侧监测点', ...res.data.data[0] }
|
||||||
countList.value[0].children[1] = { title: '非电网侧监测点', ...res.data.data[1] }
|
countList.value[0].children[1] = { title: '非电网侧监测点', ...res.data.data[1] }
|
||||||
@@ -519,13 +531,13 @@ defineExpose({ info, show })
|
|||||||
// grid-template-rows: 1fr 1fr;
|
// grid-template-rows: 1fr 1fr;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-evenly;
|
justify-content: space-around;
|
||||||
// align-items: center;
|
// align-items: center;
|
||||||
margin: 0 5px 5px;
|
margin: 0 5px 5px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: #edededc0;
|
background-color: #edededc0;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
min-height: 60px;
|
min-height: 40px;
|
||||||
max-height: 120px;
|
max-height: 120px;
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
@@ -554,7 +566,7 @@ defineExpose({ info, show })
|
|||||||
.num1 {
|
.num1 {
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
grid-template-rows: auto auto;
|
grid-template-rows: auto auto;
|
||||||
gap: 8px;
|
gap: 15px;
|
||||||
div {
|
div {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
@@ -563,12 +575,16 @@ defineExpose({ info, show })
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.num2 {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr 1fr !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.BoxA {
|
.BoxA {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr;
|
||||||
grid-template-rows: 1fr 1fr;
|
grid-template-rows: 1fr 1fr 1fr;
|
||||||
|
|
||||||
// grid-template-rows: 80px;
|
// grid-template-rows: 80px;
|
||||||
.num {
|
.num {
|
||||||
@@ -619,4 +635,13 @@ defineExpose({ info, show })
|
|||||||
:deep(.el-dialog__body) {
|
:deep(.el-dialog__body) {
|
||||||
max-height: none !important;
|
max-height: none !important;
|
||||||
}
|
}
|
||||||
|
.titleNum {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin-left: 5px;
|
||||||
|
span {
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,15 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 综合评估详情 -->
|
<!-- 综合评估详情 -->
|
||||||
<el-dialog draggable title="区域污染值统计" v-model="dialogVisible" width="1400px">
|
<el-dialog draggable title="稳态电能质量水平评估" v-model="dialogVisible" width="1400px">
|
||||||
|
<div class="title mb5">
|
||||||
|
<span>区域污染水平评估</span>
|
||||||
|
</div>
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<div style="width: 400px">
|
<div style="width: 400px">
|
||||||
<vxe-table
|
<vxe-table
|
||||||
v-bind="defaultAttribute"
|
v-bind="defaultAttribute"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
@current-change="currentChangeEvent"
|
@cell-click="currentChangeEvent"
|
||||||
height="240px"
|
height="250px"
|
||||||
:row-config="{ isCurrent: true, isHover: true }"
|
:row-config="{ isCurrent: true, isHover: true }"
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
|
style="cursor: pointer"
|
||||||
>
|
>
|
||||||
<vxe-column field="deptName" title="地市" />
|
<vxe-column field="deptName" title="地市" />
|
||||||
<vxe-column field="score" title="污染值" sortable>
|
<vxe-column field="score" title="污染值" sortable>
|
||||||
@@ -26,14 +30,22 @@
|
|||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="ml10" style="width: 990px">
|
<div class="ml10" style="width: 990px">
|
||||||
<vxe-table v-bind="defaultAttribute" v-loading="loadingTab" ref="vxeRef" height="240px" :data="subdata">
|
<vxe-table
|
||||||
<vxe-column type="seq" width="70"></vxe-column>
|
v-bind="defaultAttribute"
|
||||||
<vxe-column field="devName" title="终端名称"></vxe-column>
|
@cell-click="clickAttribute"
|
||||||
<vxe-column field="lineName" title="监测点名称" />
|
v-loading="loadingTab"
|
||||||
<vxe-column field="powerFlag" title="电网标志" />
|
ref="vxeRef"
|
||||||
<vxe-column field="devType" title="终端型号"></vxe-column>
|
height="250px"
|
||||||
<vxe-column field="manufacturer" title="终端厂家"></vxe-column>
|
:data="subdata"
|
||||||
<vxe-column field="vharmonicValue" title="污染值" sortable>
|
style="cursor: pointer"
|
||||||
|
>
|
||||||
|
<vxe-column type="seq" width="70" title="序号"></vxe-column>
|
||||||
|
<vxe-column field="subName" title="变电站名称" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="objName" title="监测对象名称" align="center" min-width="100"></vxe-column>
|
||||||
|
<vxe-column field="loadType" title="干扰源类型" align="center" min-width="100"></vxe-column>
|
||||||
|
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
|
||||||
|
<vxe-column field="vharmonicValue" title="污染值" sortable min-width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<span
|
||||||
:style="{
|
:style="{
|
||||||
@@ -47,19 +59,27 @@
|
|||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 300px; margin-top: 10px; position: relative" v-loading="loading">
|
<div class="title mb5 mt10">
|
||||||
<!-- <div style="position: absolute; width: 100px; top: 0px; right: 0px; z-index: 1">
|
<span>敏感及重要用户评估</span>
|
||||||
<el-radio-group v-model="city" size="small" @change="analysis">
|
</div>
|
||||||
<el-radio-button label="0">省</el-radio-button>
|
<div style="height: 265px; position: relative" v-loading="loading">
|
||||||
<el-radio-button label="1">市</el-radio-button>
|
<vxe-table
|
||||||
</el-radio-group>
|
v-bind="defaultAttribute"
|
||||||
<el-radio-group v-model="type" size="small" @change="analysis">
|
ref="tableRef1"
|
||||||
<el-radio-button label="1">年</el-radio-button>
|
@cell-click="pollutionClick"
|
||||||
<el-radio-button label="3">月</el-radio-button>
|
height="265px"
|
||||||
</el-radio-group>
|
:row-config="{ isCurrent: true, isHover: true }"
|
||||||
</div> -->
|
:data="pollutionValueList"
|
||||||
|
style="cursor: pointer"
|
||||||
|
>
|
||||||
|
<vxe-column title="序号" width="60" type="seq"></vxe-column>
|
||||||
|
<vxe-column field="gdName" title="供电公司" Width="150" />
|
||||||
|
<vxe-column field="subStationName" title="变电站" />
|
||||||
|
<vxe-column field="projectName" title="项目名称" />
|
||||||
|
<vxe-column field="subValue" title="谐波电压污染值" width="150" />
|
||||||
|
</vxe-table>
|
||||||
|
|
||||||
<MyEChart style="height: 300px" :options="picEChart" />
|
<!-- <MyEChart style="height: 300px" :options="picEChart" @echartClick="echartClick" /> -->
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -68,7 +88,9 @@ import { ref, nextTick } from 'vue'
|
|||||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { getAssessDetail, getAssessTrend, downPollutionSubCalc } from '@/api/device-boot/panorama'
|
import { getAssessDetail, getAssessTrend, downPollutionSensitiveUser } from '@/api/device-boot/panorama'
|
||||||
|
import { useRoute } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const dialogVisible: any = ref(false)
|
const dialogVisible: any = ref(false)
|
||||||
const rowList: any = ref({})
|
const rowList: any = ref({})
|
||||||
@@ -78,6 +100,7 @@ const loading = ref(false)
|
|||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
const subdata: any = ref([])
|
const subdata: any = ref([])
|
||||||
const picEChart = ref()
|
const picEChart = ref()
|
||||||
|
const pollutionValueList = ref([])
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const loadingTab = ref(false)
|
const loadingTab = ref(false)
|
||||||
const PollutionList = dictData.getBasicData('Pollution_Calc').filter(item => item.name == '谐波电压')
|
const PollutionList = dictData.getBasicData('Pollution_Calc').filter(item => item.name == '谐波电压')
|
||||||
@@ -108,49 +131,49 @@ const currentChangeEvent = async () => {
|
|||||||
const analysis = () => {
|
const analysis = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
let time = rowList.value.searchBeginTime.slice(0, 4) + `-01-01`
|
let time = rowList.value.searchBeginTime.slice(0, 4) + `-01-01`
|
||||||
downPollutionSubCalc({ ...rowList.value, ids: [PollutionList[0].id] }).then(res => {
|
downPollutionSensitiveUser({ ...rowList.value, ids: [PollutionList[0].id], deptId: rowList.value.id }).then(res => {
|
||||||
const first10Items = res.data.slice(0, 10)
|
pollutionValueList.value = res.data.filter((item: any) => item.subValue != null)
|
||||||
picEChart.value = {
|
// const first10Items = res.data.slice(0, 10)
|
||||||
title: {
|
// picEChart.value = {
|
||||||
text: '污染值排名前十变电站'
|
// title: {
|
||||||
},
|
// text: '污染值排名前十敏感及重要用户'
|
||||||
|
// },
|
||||||
|
|
||||||
xAxis: {
|
// xAxis: {
|
||||||
name: '',
|
// name: '',
|
||||||
data: first10Items.map((item: any) => item.subStationName),
|
// data: first10Items.map((item: any) => item.projectName.split('(')[0].trim()),
|
||||||
axisLabel: {
|
// axisLabel: {
|
||||||
rotate: 30, // 核心:倾斜 45 度(推荐 30/45/60,角度太大易读性差)
|
// rotate: 20 // 核心:倾斜 45 度(推荐 30/45/60,角度太大易读性差)
|
||||||
|
// }
|
||||||
}
|
// },
|
||||||
},
|
// grid: {
|
||||||
grid: {
|
// bottom: 10
|
||||||
bottom: 10
|
// },
|
||||||
},
|
// legend: {
|
||||||
legend: {
|
// show: false
|
||||||
show: false
|
// },
|
||||||
},
|
// yAxis: {
|
||||||
yAxis: {
|
// name: ''
|
||||||
name: ''
|
// },
|
||||||
},
|
// options: {
|
||||||
options: {
|
// dataZoom: false,
|
||||||
dataZoom: false,
|
// series: [
|
||||||
series: [
|
// {
|
||||||
{
|
// // name: time[i],
|
||||||
// name: time[i],
|
// name: '污染值',
|
||||||
name: '污染值',
|
// type: 'bar',
|
||||||
type: 'bar',
|
// data: first10Items.map((item: any) => item.subValue),
|
||||||
data: first10Items.map((item: any) => item.subVStationValue),
|
// itemStyle: {
|
||||||
itemStyle: {
|
// color: function (params) {
|
||||||
color: function (params) {
|
// // params.value 是当前柱子的数值
|
||||||
// params.value 是当前柱子的数值
|
// const value = params.value
|
||||||
const value = params.value
|
// return setColor(value)
|
||||||
return setColor(value)
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// ]
|
||||||
]
|
// }
|
||||||
}
|
// }
|
||||||
}
|
|
||||||
|
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
@@ -170,6 +193,26 @@ const setColor = val => {
|
|||||||
? '#00B07D'
|
? '#00B07D'
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
|
const pollutionClick = (res: any) => {
|
||||||
|
router.push({
|
||||||
|
name: 'harmonic-boot/qydetailedAnalysis/pollutionReport',
|
||||||
|
query: {
|
||||||
|
type: '4',
|
||||||
|
name: res.row.projectName,
|
||||||
|
t: Date.now()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const clickAttribute = (row: any) => {
|
||||||
|
router.push({
|
||||||
|
name: 'harmonic-boot/qydetailedAnalysis/pollutionReport',
|
||||||
|
query: {
|
||||||
|
type: '1',
|
||||||
|
name: row.row.lineName,
|
||||||
|
t: Date.now()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -199,4 +242,19 @@ defineExpose({ open })
|
|||||||
:deep(.el-select) {
|
:deep(.el-select) {
|
||||||
min-width: 80px !important;
|
min-width: 80px !important;
|
||||||
}
|
}
|
||||||
|
.title {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-weight: 550;
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.WarningFilled {
|
||||||
|
width: 16px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -19,17 +19,33 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>分布统计</span>
|
<span>分布统计</span>
|
||||||
<el-select
|
<el-radio-group v-model="statisticalType" size="small">
|
||||||
|
<el-radio-button v-for="item in options" :label="item.code" @change="statiStics">
|
||||||
|
{{ item.name }}
|
||||||
|
</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
<!-- <el-select
|
||||||
v-model="statisticalType"
|
v-model="statisticalType"
|
||||||
value-key="id"
|
value-key="id"
|
||||||
style="width: 120px; margin-right: 80px"
|
style="width: 120px; margin-right: 80px"
|
||||||
@change="statiStics"
|
@change="statiStics"
|
||||||
>
|
>
|
||||||
<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> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="pie">
|
<div class="pie">
|
||||||
<MyEChart style="height: 260px" :options="picEChart" />
|
<!-- <MyEChart style="height: 260px" :options="picEChart" /> -->
|
||||||
|
<MyEChart style="height: 260px; width: 50%" :options="picEChart" @echartClick="echartClick" />
|
||||||
|
<el-table size="small" height="260px" style="width: 50%" :data="picList">
|
||||||
|
<el-table-column prop="orgName" width="90px" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.orgName.split('(')[0].trim() }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="integrityRate" label="完整性(%)" align="center"></el-table-column>
|
||||||
|
<el-table-column prop="onLineRate" label="在线率(%)" align="center" />
|
||||||
|
<el-table-column prop="outOfStandardRate" label="超标占比(%)" align="center" />
|
||||||
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -55,19 +71,22 @@ import { useDictData } from '@/stores/dictData'
|
|||||||
import { getGridDiagramLineTendency, getGridDiagramLineData, getHalfReport } from '@/api/device-boot/panorama'
|
import { getGridDiagramLineTendency, getGridDiagramLineData, getHalfReport } from '@/api/device-boot/panorama'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const dialogVisible: any = ref(false)
|
const dialogVisible: any = ref(false)
|
||||||
|
const picList: any = ref([])
|
||||||
const Voltage = dictData.getBasicData('Dev_Voltage_Stand')
|
const Voltage = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
const options = dictData.getBasicData('Statistical_Type', ['Report_Type', 'Power_Network'])
|
const options = dictData.getBasicData('Statistical_Type', ['Report_Type', 'Power_Network', 'JB_Power_Flag'])
|
||||||
|
console.log("🚀 ~ options:", options)
|
||||||
const time = ref('1')
|
const time = ref('1')
|
||||||
const statisticalType = ref(options[0])
|
const statisticalType = ref('Load_Type')
|
||||||
const loadTypeArr = dictData.getBasicData('Interference_Source')
|
const loadTypeArr = dictData.getBasicData('Interference_Source')
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
const rowList: any = ref({})
|
const rowList: any = ref({})
|
||||||
const trendEChart: any = ref()
|
const trendEChart: any = ref()
|
||||||
|
|
||||||
const picEChart = ref()
|
const picEChart = ref()
|
||||||
const open = async (row: any) => {
|
const open = async (row: any) => {
|
||||||
|
statisticalType.value = 'Load_Type'
|
||||||
time.value = '1'
|
time.value = '1'
|
||||||
rowList.value = {
|
rowList.value = {
|
||||||
deviceInfoParam: {
|
deviceInfoParam: {
|
||||||
@@ -141,52 +160,65 @@ const analysis = (e: any) => {
|
|||||||
}
|
}
|
||||||
// 统计
|
// 统计
|
||||||
const statiStics = () => {
|
const statiStics = () => {
|
||||||
getGridDiagramLineData({ ...rowList.value, statisticalType: statisticalType.value }).then(res => {
|
getGridDiagramLineData({
|
||||||
|
...rowList.value,
|
||||||
|
statisticalType: options.filter((item: any) => item.code == statisticalType.value)[0]
|
||||||
|
}).then(res => {
|
||||||
|
picList.value = res.data
|
||||||
|
let picData: any = []
|
||||||
|
const total = res.data.reduce((sum, item) => {
|
||||||
|
const num = (item.orgName.match(/\((\d+)\)/) || [])[1] || 0
|
||||||
|
return sum + Number(num)
|
||||||
|
}, 0)
|
||||||
|
|
||||||
|
res.data.forEach((item: any) => {
|
||||||
|
let value = (item.orgName.match(/\((\d+)\)/) || [])[1] || 0
|
||||||
|
picData.push({
|
||||||
|
value: value,
|
||||||
|
name: item.orgName,
|
||||||
|
proportion: (value / total).toFixed(2)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
picEChart.value = {
|
picEChart.value = {
|
||||||
title: {
|
tooltip: {
|
||||||
text: ''
|
trigger: 'item',
|
||||||
|
formatter: '{b}: 占比 {d}% '
|
||||||
|
},
|
||||||
|
|
||||||
|
legend: {
|
||||||
|
show: false
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
data: res.data.map((item: any) => item.orgName)
|
show: false
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: '%',
|
show: false
|
||||||
min: 0,
|
|
||||||
max: 100
|
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
dataZoom: null,
|
dataZoom: null,
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '数据完整性',
|
type: 'pie',
|
||||||
type: 'bar',
|
startAngle: 360,
|
||||||
|
center: ['50%', '55%'],
|
||||||
|
radius: ['40%', '60%'],
|
||||||
|
endAngle: 0,
|
||||||
|
labelLine: {
|
||||||
|
length: 8,
|
||||||
|
length2: 30,
|
||||||
|
show: true
|
||||||
|
},
|
||||||
|
label: {
|
||||||
|
padding: [0, -30],
|
||||||
|
formatter: '{b}\n\n'
|
||||||
|
},
|
||||||
|
itemStyle: {
|
||||||
|
borderColor: '#fff',
|
||||||
|
borderWidth: 1
|
||||||
|
},
|
||||||
|
|
||||||
data: res.data.map((item: any) => item.integrityRate),
|
data: picData.sort((a, b) => b.value - a.value)
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: 'top',
|
|
||||||
fontSize: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '在线率',
|
|
||||||
type: 'bar',
|
|
||||||
data: res.data.map((item: any) => item.onLineRate),
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: 'top',
|
|
||||||
fontSize: 12
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '超标监测点占比',
|
|
||||||
type: 'bar',
|
|
||||||
data: res.data.map((item: any) => item.outOfStandardRate),
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: 'top',
|
|
||||||
fontSize: 12
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -206,6 +238,18 @@ const handleClose = () => {
|
|||||||
tableData.value = []
|
tableData.value = []
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
}
|
}
|
||||||
|
const echartClick = (params: any) => {
|
||||||
|
console.log('🚀 ~ echartClick ~ params:', params.name.split('(')[0])
|
||||||
|
router.push({
|
||||||
|
name: 'Supervision/Terminaldetection',
|
||||||
|
query: {
|
||||||
|
type: 'lodType',
|
||||||
|
name: params.name.split('(')[0],
|
||||||
|
statisticalType:statisticalType.value,
|
||||||
|
t: Date.now()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -0,0 +1,153 @@
|
|||||||
|
<template>
|
||||||
|
<div class="propInfo" v-if="show">
|
||||||
|
<div class="top">
|
||||||
|
<el-form :inline="false" label-width="auto">
|
||||||
|
<el-form-item label=" 筛选数据">
|
||||||
|
<el-input v-model="value" size="small" clearable placeholder="请输入关键字进行筛选"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="电网标志">
|
||||||
|
<el-select v-model="powerFlag" placeholder="请选择电网标志">
|
||||||
|
<el-option label="全部" value="0"></el-option>
|
||||||
|
<el-option label="电网侧" value="1"></el-option>
|
||||||
|
<el-option label="非电网侧" value="2"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
</el-form>
|
||||||
|
<Close class="ico" @click="show = false" />
|
||||||
|
</div>
|
||||||
|
<vxe-table
|
||||||
|
height="200px"
|
||||||
|
:data="filterDataByKeyword(dataList, value)"
|
||||||
|
size="mini"
|
||||||
|
border
|
||||||
|
ref="tableRef"
|
||||||
|
align="center"
|
||||||
|
showOverflow
|
||||||
|
v-loading="loading"
|
||||||
|
:row-config="{ isCurrent: true, isHover: true }"
|
||||||
|
:columnConfig="{ resizable: true }"
|
||||||
|
@cell-click="currentChangeEvent"
|
||||||
|
style="z-index: 0"
|
||||||
|
>
|
||||||
|
<vxe-column type="seq" title="序号" width="70px"></vxe-column>
|
||||||
|
<vxe-column field="gdName" title="供电公司"></vxe-column>
|
||||||
|
<vxe-column field="subName" title="变电站名称"></vxe-column>
|
||||||
|
<!-- <vxe-column field="deviceName" title="终端名称"></vxe-column> -->
|
||||||
|
<!-- <vxe-column field="ip" title="IP"></vxe-column> -->
|
||||||
|
<vxe-column field="lineName" title="监测点名称"></vxe-column>
|
||||||
|
<vxe-column field="powerFlag" title="电网标志">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.powerFlag == 0 ? '电网侧' : '非电网侧' }}
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<!-- <vxe-column field="loadType" title="干扰源"></vxe-column> -->
|
||||||
|
<vxe-column field="loadType" title="干扰源类型"></vxe-column>
|
||||||
|
<vxe-column field="objName" title="监测对象"></vxe-column>
|
||||||
|
</vxe-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onMounted, nextTick, ref, provide } from 'vue'
|
||||||
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
|
import { Close } from '@element-plus/icons-vue'
|
||||||
|
const emit = defineEmits(['flyTo'])
|
||||||
|
const value = ref('')
|
||||||
|
const tableRef = ref()
|
||||||
|
const dataList = ref([])
|
||||||
|
const loading = ref(false)
|
||||||
|
const powerFlag = ref('0')
|
||||||
|
const open = (data: any) => {
|
||||||
|
dataList.value = []
|
||||||
|
loading.value = true
|
||||||
|
show.value = true
|
||||||
|
setTimeout(() => {
|
||||||
|
dataList.value = data.sort((a, b) => b.vharmonicValue - a.vharmonicValue)
|
||||||
|
loading.value = false
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据关键字过滤数据,匹配gdName/subName/deviceName字段
|
||||||
|
* @param {Array} data - 原始数据数组
|
||||||
|
* @param {string} keyword - 过滤关键字(支持多关键字空格分隔,忽略大小写)
|
||||||
|
* @returns {Array} 过滤后的结果数组
|
||||||
|
*/
|
||||||
|
function filterDataByKeyword(data, keyword) {
|
||||||
|
// 空关键字直接返回全部数据
|
||||||
|
if (!keyword || keyword.trim() === '') {
|
||||||
|
return [...data] // 返回新数组,避免修改原数据
|
||||||
|
}
|
||||||
|
|
||||||
|
// 处理关键字:转小写、去除首尾空格、拆分多关键字(空格分隔)
|
||||||
|
const keywords = keyword
|
||||||
|
.trim()
|
||||||
|
.toLowerCase()
|
||||||
|
.split(/\s+/)
|
||||||
|
.filter(k => k)
|
||||||
|
|
||||||
|
// 无有效关键字时返回全部
|
||||||
|
if (keywords.length === 0) {
|
||||||
|
return [...data]
|
||||||
|
}
|
||||||
|
|
||||||
|
// 过滤逻辑
|
||||||
|
return data.filter(item => {
|
||||||
|
// 提取需要匹配的三个字段,统一转小写(忽略大小写)
|
||||||
|
const gdName = (item.gdName || '').toLowerCase()
|
||||||
|
const subName = (item.subName || '').toLowerCase()
|
||||||
|
const deviceName = (item.deviceName || '').toLowerCase()
|
||||||
|
const ip = (item.ip || '').toLowerCase()
|
||||||
|
const lineName = (item.lineName || '').toLowerCase()
|
||||||
|
|
||||||
|
// 多关键字需全部匹配(逻辑与)
|
||||||
|
return keywords.every(key => {
|
||||||
|
// 只要有一个字段包含关键字,就匹配成功
|
||||||
|
return (
|
||||||
|
gdName.includes(key) ||
|
||||||
|
subName.includes(key) ||
|
||||||
|
deviceName.includes(key) ||
|
||||||
|
ip.includes(key) ||
|
||||||
|
lineName.includes(key)
|
||||||
|
)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const currentChangeEvent = () => {
|
||||||
|
// tableRef.value.getCurrentRecord()
|
||||||
|
console.log('🚀 ~ currentChangeEvent ~ tableRef.value.getCurrentRecord():', tableRef.value.getCurrentRecord())
|
||||||
|
let data = tableRef.value.getCurrentRecord()
|
||||||
|
emit('flyTo', { coordinate: [data.lng, data.lat] }, 16)
|
||||||
|
}
|
||||||
|
|
||||||
|
const show = ref(false)
|
||||||
|
defineExpose({ open, show })
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.propInfo {
|
||||||
|
position: absolute;
|
||||||
|
width: 48%;
|
||||||
|
bottom: 10px;
|
||||||
|
left: 26%;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 10px;
|
||||||
|
// z-index: 1;
|
||||||
|
}
|
||||||
|
.vxe-table--render-default.size--mini .vxe-body--column:not(.col--ellipsis),
|
||||||
|
.vxe-table--render-default.size--mini .vxe-footer--column:not(.col--ellipsis),
|
||||||
|
.vxe-table--render-default.size--mini .vxe-header--column:not(.col--ellipsis) {
|
||||||
|
padding: 5px;
|
||||||
|
}
|
||||||
|
.top {
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
background-color: #fff;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.ico {
|
||||||
|
height: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -18,14 +18,14 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>
|
<span class="text-style" @click="jump">
|
||||||
污染告警
|
污染告警
|
||||||
<el-popover placement="right" :width="190" trigger="hover">
|
<el-popover placement="right" :width="190" trigger="hover">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<WarningFilled class="WarningFilled" />
|
<WarningFilled class="WarningFilled" />
|
||||||
</template>
|
</template>
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<span style="color: #00B07D">无污染:0</span>
|
<span style="color: #00b07d">无污染:0</span>
|
||||||
<br />
|
<br />
|
||||||
<span style="color: #3399ff">轻微污染:(0 , 100]</span>
|
<span style="color: #3399ff">轻微污染:(0 , 100]</span>
|
||||||
<br />
|
<br />
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<span style="color: #ff9900">中度污染:(1000 , 10000]</span>
|
<span style="color: #ff9900">中度污染:(1000 , 10000]</span>
|
||||||
<br />
|
<br />
|
||||||
<span style="color: #A52a2a">重度污染:(10000</span>
|
<span style="color: #a52a2a">重度污染:(10000</span>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</span>
|
</span>
|
||||||
@@ -51,12 +51,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- :style="i == 3 ? `margin-left: 20%;` : ``" -->
|
<!-- :style="i == 3 ? `margin-left: 20%;` : ``" -->
|
||||||
<div class="pie">
|
<div class="pie">
|
||||||
<MyEChart
|
<MyEChart v-for="(item, i) in picEChart" @click="echartClick" class="MyEChart" :options="item" />
|
||||||
v-for="(item, i) in picEChart"
|
|
||||||
|
|
||||||
class="MyEChart"
|
|
||||||
:options="item"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@@ -72,7 +67,7 @@
|
|||||||
<vxe-column field="num3" sortable title="轻度污染数量" :formatter="formatter" />
|
<vxe-column field="num3" sortable title="轻度污染数量" :formatter="formatter" />
|
||||||
<vxe-column field="num4" sortable title="中度污染数量" :formatter="formatter" />
|
<vxe-column field="num4" sortable title="中度污染数量" :formatter="formatter" />
|
||||||
<vxe-column field="num5" sortable title="重度污染数量" :formatter="formatter" />
|
<vxe-column field="num5" sortable title="重度污染数量" :formatter="formatter" />
|
||||||
<vxe-column field="num6" sortable title="暂无数据数量" :formatter="formatter" />
|
<!-- <vxe-column field="num6" sortable title="暂无数据数量" :formatter="formatter" /> -->
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -82,9 +77,10 @@ import { ref } from 'vue'
|
|||||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
|
|
||||||
import { WarningFilled } from '@element-plus/icons-vue'
|
import { WarningFilled } from '@element-plus/icons-vue'
|
||||||
import { getPollutionAlarmList, getPollutionAlarmData, getGridDiagramSubTendency } from '@/api/device-boot/panorama'
|
import { getPollutionAlarmList, getPollutionAlarmData, getGridDiagramSubTendency } from '@/api/device-boot/panorama'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const dialogVisible: any = ref(false)
|
const dialogVisible: any = ref(false)
|
||||||
const time = ref('1')
|
const time = ref('1')
|
||||||
@@ -95,7 +91,7 @@ const options: any = dictData.getBasicData('Pollution_Calc')
|
|||||||
// return item
|
// return item
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
const contaminate = ref(options[0].id)
|
const contaminate = ref(options[0]?.id)
|
||||||
const rowList: any = ref({})
|
const rowList: any = ref({})
|
||||||
const trendEChart: any = ref({})
|
const trendEChart: any = ref({})
|
||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
@@ -290,8 +286,7 @@ const contaminateC = () => {
|
|||||||
let a3 = tableData.value.reduce((t, item) => t + (item.num3 - 0 || 0), 0)
|
let a3 = tableData.value.reduce((t, item) => t + (item.num3 - 0 || 0), 0)
|
||||||
let a4 = tableData.value.reduce((t, item) => t + (item.num4 - 0 || 0), 0)
|
let a4 = tableData.value.reduce((t, item) => t + (item.num4 - 0 || 0), 0)
|
||||||
let a5 = tableData.value.reduce((t, item) => t + (item.num5 - 0 || 0), 0)
|
let a5 = tableData.value.reduce((t, item) => t + (item.num5 - 0 || 0), 0)
|
||||||
let a6 = tableData.value.reduce((t, item) => t + (item.num6 - 0 || 0), 0)
|
let total = a1 + a2 + a3 + a4 + a5
|
||||||
let total = a1 + a2 + a3 + a4 + a5 + a6
|
|
||||||
// if (rowList.value.isUpToGrid == 0) {
|
// if (rowList.value.isUpToGrid == 0) {
|
||||||
// data = res.data.info
|
// data = res.data.info
|
||||||
// } else {
|
// } else {
|
||||||
@@ -331,11 +326,7 @@ const contaminateC = () => {
|
|||||||
{
|
{
|
||||||
value: ((a5 / total || 0) * 100).toFixed(2),
|
value: ((a5 / total || 0) * 100).toFixed(2),
|
||||||
name: `重度污染:${a5}座`
|
name: `重度污染:${a5}座`
|
||||||
},
|
}
|
||||||
{
|
|
||||||
value: ((a6 / total || 0) * 100).toFixed(2),
|
|
||||||
name: `暂无数据:${a6}座`
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
const color = ['#00B07D', '#3399ff', '#ffcc33', '#ff9900', '#A52a2a', '#ccc']
|
const color = ['#00B07D', '#3399ff', '#ffcc33', '#ff9900', '#A52a2a', '#ccc']
|
||||||
|
|
||||||
@@ -500,6 +491,17 @@ const handleClose = () => {
|
|||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const jump = () => {
|
||||||
|
router.push({
|
||||||
|
name: 'harmonic-boot/qydetailedAnalysis/pollutionReport',
|
||||||
|
query: {
|
||||||
|
type: '2',
|
||||||
|
statisticalType: contaminate.value,
|
||||||
|
t: Date.now()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -531,4 +533,10 @@ defineExpose({ open })
|
|||||||
:deep(.el-dialog__body) {
|
:deep(.el-dialog__body) {
|
||||||
max-height: none !important;
|
max-height: none !important;
|
||||||
}
|
}
|
||||||
|
.text-style {
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: underline;
|
||||||
|
text-decoration-color: var(--el-color-primary);
|
||||||
|
text-underline-offset: 4px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -10,15 +10,19 @@
|
|||||||
<div class="boxSteps">
|
<div class="boxSteps">
|
||||||
<el-steps>
|
<el-steps>
|
||||||
<template v-for="(item, i) in Voltage">
|
<template v-for="(item, i) in Voltage">
|
||||||
<el-step :class="active == i ? 'highlight' : ''" :title="item.name"
|
<el-step
|
||||||
@click="handleClick(i)"></el-step>
|
:class="active == i ? 'highlight' : ''"
|
||||||
|
:title="item.name"
|
||||||
|
@click="handleClick(i)"
|
||||||
|
></el-step>
|
||||||
</template>
|
</template>
|
||||||
</el-steps>
|
</el-steps>
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(item, i) in evaluationData" class="evaluationData">
|
<div v-for="(item, i) in evaluationData" class="evaluationData">
|
||||||
<el-row style="width: 100%">
|
<el-row style="width: 100%">
|
||||||
<el-col :span="12" style="display: flex">
|
<el-col :span="12" style="display: flex">
|
||||||
<img :src="url[i]" />
|
<span :class="`iconfont ${url[i]} icoColor`"></span>
|
||||||
|
<!-- <img :src="url[i]" /> -->
|
||||||
<span>{{ item.targetName }}</span>
|
<span>{{ item.targetName }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" style="display: flex">
|
<el-col :span="12" style="display: flex">
|
||||||
@@ -90,11 +94,16 @@ const Voltage: any = dictData.getBasicData('Dev_Voltage_Stand').filter(item => {
|
|||||||
|
|
||||||
const chartRef = ref<HTMLDivElement>()
|
const chartRef = ref<HTMLDivElement>()
|
||||||
const url: any = [
|
const url: any = [
|
||||||
new URL(`@/assets/img/PLPC.png`, import.meta.url),
|
'icon-frequency',
|
||||||
new URL(`@/assets/img/DYPC.png`, import.meta.url),
|
'icon-dianya',
|
||||||
new URL(`@/assets/img/JBL.png`, import.meta.url),
|
'icon-dianyazongxiebojibianshuai',
|
||||||
new URL(`@/assets/img/SXDY.png`, import.meta.url),
|
'icon-sanxiangdianyafuzhibupingheng',
|
||||||
new URL(`@/assets/img/SB.png`, import.meta.url)
|
'icon-a-253_ipower'
|
||||||
|
// new URL(`@/assets/img/PLPC.png`, import.meta.url),
|
||||||
|
// new URL(`@/assets/img/DYPC.png`, import.meta.url),
|
||||||
|
// new URL(`@/assets/img/JBL.png`, import.meta.url),
|
||||||
|
// new URL(`@/assets/img/SXDY.png`, import.meta.url),
|
||||||
|
// new URL(`@/assets/img/SB.png`, import.meta.url)
|
||||||
]
|
]
|
||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
const title = ['频率偏差(超标)', '电压偏差(超标)', '电压总谐波畸变率(超标)', '闪变(超标)', '三相电压不平衡度(超标)']
|
const title = ['频率偏差(超标)', '电压偏差(超标)', '电压总谐波畸变率(超标)', '闪变(超标)', '三相电压不平衡度(超标)']
|
||||||
@@ -108,7 +117,8 @@ const echart = (row: any) => {
|
|||||||
|
|
||||||
let chart = echarts.init(chartRef.value as HTMLDivElement)
|
let chart = echarts.init(chartRef.value as HTMLDivElement)
|
||||||
|
|
||||||
let dataname = ['频率偏差(Hz)',
|
let dataname = [
|
||||||
|
'频率偏差(Hz)',
|
||||||
'电压偏差(%)',
|
'电压偏差(%)',
|
||||||
'电压总谐波畸变率(%)',
|
'电压总谐波畸变率(%)',
|
||||||
'三相电压不平衡度(%)',
|
'三相电压不平衡度(%)',
|
||||||
@@ -116,7 +126,8 @@ const echart = (row: any) => {
|
|||||||
'谐波电压(%)',
|
'谐波电压(%)',
|
||||||
'谐波电流(%)',
|
'谐波电流(%)',
|
||||||
'间谐波电压(%)',
|
'间谐波电压(%)',
|
||||||
'负序电流(A)']
|
'负序电流(A)'
|
||||||
|
]
|
||||||
// let datamax = [100, 100, 100, 100, 100, 100]
|
// let datamax = [100, 100, 100, 100, 100, 100]
|
||||||
let indicator = []
|
let indicator = []
|
||||||
for (let i = 0; i < dataname.length; i++) {
|
for (let i = 0; i < dataname.length; i++) {
|
||||||
@@ -247,6 +258,7 @@ const handleClick = (i: any) => {
|
|||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@import '@/assets/font/iconfont.css';
|
||||||
:deep(.el-select) {
|
:deep(.el-select) {
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
}
|
}
|
||||||
@@ -335,4 +347,9 @@ defineExpose({ open })
|
|||||||
:deep(.el-dialog__body) {
|
:deep(.el-dialog__body) {
|
||||||
max-height: none !important;
|
max-height: none !important;
|
||||||
}
|
}
|
||||||
|
.icoColor{
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
margin: 0 20px;
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog draggable title="技术监督统计" v-model="dialogVisible" width="1400px">
|
<el-dialog draggable title="技术监督统计" v-model="dialogVisible" width="1400px">
|
||||||
<div>
|
<div>
|
||||||
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="320px" :data="tableData">
|
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="325px" :data="tableData">
|
||||||
<vxe-column field="orgName" title="区域" />
|
<vxe-column field="orgName" title="区域" />
|
||||||
<vxe-column field="abnormalNum" title="异常问题总数" />
|
<vxe-column field="abnormalNum" title="异常问题总数" />
|
||||||
<vxe-column field="workNum" title="工单总数" />
|
<vxe-column field="workNum" title="工单总数" />
|
||||||
|
|||||||
@@ -1,14 +1,35 @@
|
|||||||
<!-- 暂态 -->
|
<!-- 暂态 -->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog draggable title="暂态电能质量水平评估统计" v-model="dialogVisible" width="1400px">
|
<el-dialog draggable title="暂态电能质量水平评估统计" v-model="dialogVisible" width="1400px">
|
||||||
|
<div v-loading="loading">
|
||||||
<div>
|
<div>
|
||||||
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="360px" :data="tableData">
|
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="365px" :data="tableData">
|
||||||
<vxe-column field="name" title="区域" />
|
<vxe-column field="name" title="区域" />
|
||||||
|
|
||||||
<vxe-column sortable field="sagTimes" title="暂降次数" />
|
<vxe-column sortable field="sagTimes" title="暂降次数">
|
||||||
<vxe-column sortable field="swellTimes" title="暂升次数" />
|
<template #default="{ row }">
|
||||||
<vxe-column sortable field="interruptTimes" title="短时中断次数" />
|
<span class="text-style" @click="transientOpen(row.sagTimesIds, row.name, '暂降')">
|
||||||
|
{{ row.sagTimes }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column sortable field="swellTimes" title="暂升次数">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span class="text-style" @click="transientOpen(row.swellTimesIds, row.name, '暂升')">
|
||||||
|
{{ row.swellTimes }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column sortable field="interruptTimes" title="短时中断次数">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span
|
||||||
|
class="text-style"
|
||||||
|
@click="transientOpen(row.interruptTimesIds, row.name, '短时中断')"
|
||||||
|
>
|
||||||
|
{{ row.interruptTimes }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
<vxe-colgroup title="暂态严重度占比">
|
<vxe-colgroup title="暂态严重度占比">
|
||||||
<vxe-column sortable field="rate90" title="SARFI-90" />
|
<vxe-column sortable field="rate90" title="SARFI-90" />
|
||||||
<vxe-column sortable field="rate50" title="SARFI-50" />
|
<vxe-column sortable field="rate50" title="SARFI-50" />
|
||||||
@@ -38,27 +59,39 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- 暂态详情 -->
|
||||||
|
<transientDetails ref="transientRef" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { getEventReason, getEventDetailByList } from '@/api/device-boot/panorama'
|
import { getEventReason, getEventDetailByList } from '@/api/device-boot/panorama'
|
||||||
|
import transientDetails from './transientDetails.vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
const dialogVisible: any = ref(false)
|
const dialogVisible: any = ref(false)
|
||||||
|
const transientRef = ref()
|
||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
const descentData = ref([])
|
const descentData = ref([])
|
||||||
const resembleData = ref([])
|
const resembleData = ref([])
|
||||||
|
|
||||||
const picEChart = ref({})
|
const picEChart = ref({})
|
||||||
const picEChart1 = ref({})
|
const picEChart1 = ref({})
|
||||||
|
const loading = ref(false)
|
||||||
const open = async (row: any) => {
|
const open = async (row: any) => {
|
||||||
getEventDetailByList({ ...row, deviceInfoParam: row }).then((res: any) => {
|
const [year, , day] = row.startTime.split('-')
|
||||||
|
dialogVisible.value = true
|
||||||
|
loading.value = true
|
||||||
|
getEventDetailByList({
|
||||||
|
...row,
|
||||||
|
deviceInfoParam: row,
|
||||||
|
searchBeginTime: `${year}-01-${day}`,
|
||||||
|
startTime: `${year}-01-${day}`
|
||||||
|
}).then((res: any) => {
|
||||||
tableData.value = res.data
|
tableData.value = res.data
|
||||||
})
|
})
|
||||||
getEventReason(row).then(res => {
|
await getEventReason({ ...row, searchBeginTime: `${year}-01-${day}`, startTime: `${year}-01-${day}` }).then(res => {
|
||||||
descentData.value = res.data.reason
|
descentData.value = res.data.reason
|
||||||
resembleData.value = res.data.type
|
resembleData.value = res.data.type
|
||||||
picEChart.value = {
|
picEChart.value = {
|
||||||
@@ -128,7 +161,14 @@ const open = async (row: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
dialogVisible.value = true
|
loading.value = false
|
||||||
|
}
|
||||||
|
// 查看详情
|
||||||
|
const transientOpen = (row: any, name: string, type: string) => {
|
||||||
|
if (row == null || row?.length == 0) {
|
||||||
|
return ElMessage.info('暂无详情')
|
||||||
|
}
|
||||||
|
transientRef.value.open(row, name, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
@@ -150,4 +190,8 @@ defineExpose({ open })
|
|||||||
:deep(.el-dialog__body) {
|
:deep(.el-dialog__body) {
|
||||||
max-height: none !important;
|
max-height: none !important;
|
||||||
}
|
}
|
||||||
|
.text-style {
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -19,6 +19,10 @@
|
|||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>分布统计</span>
|
<span>分布统计</span>
|
||||||
|
<el-radio-group v-model="type" size="small" @change="getGridDiagramDev">
|
||||||
|
<el-radio-button label="1">区域</el-radio-button>
|
||||||
|
<el-radio-button label="3">终端厂家</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="pie">
|
<div class="pie">
|
||||||
<MyEChart style="height: 260px; width: 50%" :options="picEChart" />
|
<MyEChart style="height: 260px; width: 50%" :options="picEChart" />
|
||||||
@@ -77,11 +81,12 @@ const dialogVisible: any = ref(false)
|
|||||||
const time = ref('1')
|
const time = ref('1')
|
||||||
const rowList: any = ref({})
|
const rowList: any = ref({})
|
||||||
const tableData: any = ref()
|
const tableData: any = ref()
|
||||||
|
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type', 'Voltage_Level', 'Load_Type'])
|
||||||
|
|
||||||
const picList = ref([])
|
const picList = ref([])
|
||||||
|
const type = ref('1')
|
||||||
const trendEChart: any = ref({})
|
const trendEChart: any = ref({})
|
||||||
|
const loadingTab = ref(false)
|
||||||
const picEChart = ref()
|
const picEChart = ref()
|
||||||
const open = async (row: any) => {
|
const open = async (row: any) => {
|
||||||
time.value = '1'
|
time.value = '1'
|
||||||
@@ -97,13 +102,49 @@ const open = async (row: any) => {
|
|||||||
analysis(1)
|
analysis(1)
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
//分布统计
|
//分布统计
|
||||||
getGridDiagramDevData(rowList.value).then(res => {
|
getGridDiagramDev()
|
||||||
picList.value = res.data
|
// 列表
|
||||||
|
getGridDiagramDevDataList({
|
||||||
|
deviceInfoParam: {
|
||||||
|
...row,
|
||||||
|
serverName: 'pqs-common',
|
||||||
|
ids: [row.id],
|
||||||
|
runFlag: [],
|
||||||
|
comFlag: [],
|
||||||
|
manufacturer: dictData.getBasicData('Dev_Manufacturers'),
|
||||||
|
statisticalType: dictData.getBasicData('Statistical_Type', ['Report_Type'])[0]
|
||||||
|
},
|
||||||
|
...row,
|
||||||
|
serverName: 'pqs-common',
|
||||||
|
ids: [row.id],
|
||||||
|
runFlag: [],
|
||||||
|
comFlag: [],
|
||||||
|
manufacturer: dictData.getBasicData('Dev_Manufacturers'),
|
||||||
|
statisticalType: dictData.getBasicData('Statistical_Type', ['Report_Type'])[0]
|
||||||
|
}).then((res: any) => {
|
||||||
|
tableData.value = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const getGridDiagramDev = async () => {
|
||||||
|
loadingTab.value = true
|
||||||
|
let data = JSON.parse(JSON.stringify(rowList.value))
|
||||||
|
data.deviceInfoParam.statisticalType = type.value == '1' ? classificationData[0] : classificationData[1]
|
||||||
|
data.statisticalType = type.value == '1' ? classificationData[0] : classificationData[1]
|
||||||
|
|
||||||
|
await getGridDiagramDevData(data).then((res: any) => {
|
||||||
|
const total = res.data.reduce((sum, item) => {
|
||||||
|
return sum + item.devCount
|
||||||
|
}, 0)
|
||||||
|
|
||||||
|
picList.value = type.value == '1' ? res.data : res.data.filter((item: any) => item.devCount != 0)
|
||||||
let picData: any = []
|
let picData: any = []
|
||||||
res.data.forEach((item: any) => {
|
picList.value = picList.value.sort((a, b) => b.devCount - a.devCount)
|
||||||
|
picList.value.forEach((item: any) => {
|
||||||
picData.push({
|
picData.push({
|
||||||
value: item.devCount,
|
value: item.devCount,
|
||||||
name: `${item.orgName}`,
|
name: `${item.orgName}(${item.devCount})`,
|
||||||
|
proportion: (item.devCount / total).toFixed(2),
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: item.onlineEvaluate < 60 ? 'red' : item.onlineEvaluate < 90 ? 'orange' : 'green'
|
color: item.onlineEvaluate < 60 ? 'red' : item.onlineEvaluate < 90 ? 'orange' : 'green'
|
||||||
}
|
}
|
||||||
@@ -113,7 +154,7 @@ const open = async (row: any) => {
|
|||||||
picEChart.value = {
|
picEChart.value = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item',
|
trigger: 'item',
|
||||||
formatter: '{b} :在运终端数 {c} 台'
|
formatter: '{b}: 占比 {d}% '
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
show: false
|
show: false
|
||||||
@@ -153,29 +194,8 @@ const open = async (row: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 列表
|
loadingTab.value = false
|
||||||
getGridDiagramDevDataList({
|
|
||||||
deviceInfoParam: {
|
|
||||||
...row,
|
|
||||||
serverName: 'pqs-common',
|
|
||||||
ids: [row.id],
|
|
||||||
runFlag: [],
|
|
||||||
comFlag: [],
|
|
||||||
manufacturer: dictData.getBasicData('Dev_Manufacturers'),
|
|
||||||
statisticalType: dictData.getBasicData('Statistical_Type', ['Report_Type'])[0]
|
|
||||||
},
|
|
||||||
...row,
|
|
||||||
serverName: 'pqs-common',
|
|
||||||
ids: [row.id],
|
|
||||||
runFlag: [],
|
|
||||||
comFlag: [],
|
|
||||||
manufacturer: dictData.getBasicData('Dev_Manufacturers'),
|
|
||||||
statisticalType: dictData.getBasicData('Statistical_Type', ['Report_Type'])[0]
|
|
||||||
}).then((res: any) => {
|
|
||||||
tableData.value = res.data
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const analysis = (e: any) => {
|
const analysis = (e: any) => {
|
||||||
let time = rowList.value.searchBeginTime.slice(0, 4) + `-01-01`
|
let time = rowList.value.searchBeginTime.slice(0, 4) + `-01-01`
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,80 @@
|
|||||||
|
<!-- 暂态 -->
|
||||||
|
<template>
|
||||||
|
<el-dialog draggable :title="title" v-model="dialogVisible" width="800px">
|
||||||
|
<vxe-table
|
||||||
|
v-bind="defaultAttribute"
|
||||||
|
ref="vxeRef"
|
||||||
|
height="360px"
|
||||||
|
:data="tableData"
|
||||||
|
@cell-click="currentChangeEvent"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
>
|
||||||
|
<vxe-column title="序号" width="70" type="seq"></vxe-column>
|
||||||
|
<vxe-column field="lineName" title="监测点名称" />
|
||||||
|
<vxe-column field="subName" title="变电站名称"></vxe-column>
|
||||||
|
<vxe-column field="devName" title="终端名称"></vxe-column>
|
||||||
|
<vxe-column sortable field="count" :title="types + '次数'"></vxe-column>
|
||||||
|
</vxe-table>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
|
import { getEventDetailByList } from '@/api/device-boot/panorama'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
const router = useRouter()
|
||||||
|
const dictData = useDictData()
|
||||||
|
const dialogVisible: any = ref(false)
|
||||||
|
const list = dictData.getBasicData('Event_Statis')
|
||||||
|
const tableData: any = ref([])
|
||||||
|
const title = ref('详情')
|
||||||
|
const types = ref('')
|
||||||
|
// Event_Statis
|
||||||
|
const open = async (row: any, name: string, type: string) => {
|
||||||
|
types.value = type
|
||||||
|
title.value = name + type + '详情'
|
||||||
|
tableData.value = row
|
||||||
|
|
||||||
|
dialogVisible.value = true
|
||||||
|
}
|
||||||
|
const currentChangeEvent = (row: any) => {
|
||||||
|
router.push({
|
||||||
|
name: 'Descentsystem/transientList',
|
||||||
|
query: {
|
||||||
|
type: '1',
|
||||||
|
name:row.row.lineName,
|
||||||
|
dicData: types.value,
|
||||||
|
t: Date.now()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 跳转暂态列表
|
||||||
|
|
||||||
|
// 查看详情
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.statistics-main {
|
||||||
|
// height: 300px;
|
||||||
|
display: grid;
|
||||||
|
width: 100%;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
|
||||||
|
.statistics-box {
|
||||||
|
// height: 300px;
|
||||||
|
// display: flex;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 2fr 1fr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:deep(.el-dialog__body) {
|
||||||
|
max-height: none !important;
|
||||||
|
}
|
||||||
|
.text-style {
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -3,32 +3,38 @@
|
|||||||
<DatePicker ref="datePickerRef" style="display: none" theCurrentTime />
|
<DatePicker ref="datePickerRef" style="display: none" theCurrentTime />
|
||||||
<el-page-header :icon="ArrowLeft" @back="emit('back')">
|
<el-page-header :icon="ArrowLeft" @back="emit('back')">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span style="font-size: 16px">{{ dropList.lineName }}详情 </span>
|
<span style="">{{ dropList.gdName }}_{{ dropList.bdName }}_{{ dropList.lineName }}</span>
|
||||||
<span style="font-weight: 500">最新数据时间:</span>
|
<span style="font-weight: 500" class="ml20">最新数据时间:</span>
|
||||||
<span style="color: var(--color-primary-default)">{{ dropList.updateTime }}</span>
|
<span style="color: var(--el-color-primary)">{{ dropList.updateTime }}</span>
|
||||||
<span style="font-weight: 500" class="ml20">统计日期:</span>
|
<span style="font-weight: 500" class="ml20">统计日期:</span>
|
||||||
<span style="color: var(--color-primary-default)">
|
<span style="color: var(--el-color-primary)">
|
||||||
{{ getTimeOfTheMonth('3')[0] + '至' + getTimeOfTheMonth('3')[1] }}
|
{{ getTimeOfTheMonth('3')[0] + '至' + getTimeOfTheMonth('3')[1] }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-page-header>
|
</el-page-header>
|
||||||
<el-row :gutter="20" class="mt10" :style="`height:${rowHeight}`">
|
<el-row :gutter="20" class="mt10" :style="`height:${rowHeight}`">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<h3 class="mb10 iconBox">
|
<h3 class="mb10 iconBox text-style" @click="clickLinName">
|
||||||
<span></span>
|
<span></span>
|
||||||
台账信息
|
台账信息
|
||||||
</h3>
|
</h3>
|
||||||
<el-descriptions title="" border :column="2">
|
<el-descriptions title="" label-width="100px" border :column="2" size="small">
|
||||||
<el-descriptions-item label="监测点名称" width="140px">
|
<el-descriptions-item label="变电站名称">
|
||||||
|
{{ dropList.bdName }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="监测点名称">
|
||||||
{{ dropList.lineName }}
|
{{ dropList.lineName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="监测对象名称">
|
||||||
|
{{ dropList.objName }}
|
||||||
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="所属厂家">{{ dropList.manufacturer }}</el-descriptions-item>
|
<el-descriptions-item label="所属厂家">{{ dropList.manufacturer }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="电压等级">{{ dropList.scale }}</el-descriptions-item>
|
<el-descriptions-item label="电压等级">{{ dropList.scale }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="投运日期">{{ dropList.loginTime }}</el-descriptions-item>
|
<el-descriptions-item label="投运日期">{{ dropList.loginTime }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="PT">{{ dropList.pt }}</el-descriptions-item>
|
<!-- <el-descriptions-item label="PT">{{ dropList.pt }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="CT">{{ dropList.ct }}</el-descriptions-item>
|
<el-descriptions-item label="CT">{{ dropList.ct }}</el-descriptions-item> -->
|
||||||
<el-descriptions-item label="干扰源类型">{{ dropList.loadType }}</el-descriptions-item>
|
<el-descriptions-item label="干扰源类型">{{ dropList.loadType }}</el-descriptions-item>
|
||||||
<el-descriptions-item label="通讯状态" width="140px">
|
<el-descriptions-item label="通讯状态">
|
||||||
<el-tag size="small" :type="dropList.comFlag == '正常' ? 'success' : 'danger'" effect="dark">
|
<el-tag size="small" :type="dropList.comFlag == '正常' ? 'success' : 'danger'" effect="dark">
|
||||||
{{ dropList.comFlag }}
|
{{ dropList.comFlag }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
@@ -36,9 +42,12 @@
|
|||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<h3 class="mb10 iconBox">
|
<h3
|
||||||
|
class="mb10 iconBox text-style"
|
||||||
|
@click="TargetData.info == 1 ? clickAlarm(5) : TargetData.info == 2 ? Integrity() : ''"
|
||||||
|
>
|
||||||
<span></span>
|
<span></span>
|
||||||
告警明细 (天)
|
告警天数
|
||||||
</h3>
|
</h3>
|
||||||
<el-descriptions title="" border :column="2" size="small">
|
<el-descriptions title="" border :column="2" size="small">
|
||||||
<el-descriptions-item width="140px" label="告警原因">
|
<el-descriptions-item width="140px" label="告警原因">
|
||||||
@@ -78,6 +87,43 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<h3 class="mb10 iconBox text-style" @click="clickAlarm(8)">
|
||||||
|
<span></span>
|
||||||
|
告警明细
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<!-- <vxe-table
|
||||||
|
height="200px"
|
||||||
|
:data="evaluationData"
|
||||||
|
size="mini"
|
||||||
|
border
|
||||||
|
align="center"
|
||||||
|
showOverflow
|
||||||
|
:columnConfig="{ resizable: true }"
|
||||||
|
>
|
||||||
|
<vxe-column field="targetName" title="供电公司"></vxe-column>
|
||||||
|
<vxe-column field="avg" title="幅值"></vxe-column>
|
||||||
|
<vxe-column field="xz" title="最大限值"></vxe-column>
|
||||||
|
|
||||||
|
</vxe-table> -->
|
||||||
|
<!-- ${rowHeight} -->
|
||||||
|
<el-table :data="evaluationData.filter((item) => item.avg != 3.14159)" v-loading='loading' :height='`calc(${rowHeight} - 31px)`' size="small" border >
|
||||||
|
<el-table-column prop="targetName" align="center" label="指标名称" />
|
||||||
|
<el-table-column prop="avg" align="center" label="最大越限幅值">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ Math.floor(row.avg * 100) / 100 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="xz" align="center" label="限值">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.xz == 3.14159 ? '/' : row.xz }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20" class="mt10" :style="`height:${rowHeight}`">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<h3 class="mb10 iconBox">
|
<h3 class="mb10 iconBox">
|
||||||
<span></span>
|
<span></span>
|
||||||
@@ -92,75 +138,16 @@
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
|
||||||
<el-row :gutter="20" class="mt10" :style="`height:${rowHeight}`">
|
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<h3 class="mb10 iconBox">
|
<h3 class="mb10 iconBox text-style" @click="clickAlarm(2)">
|
||||||
<span></span>
|
|
||||||
监测点总体评价结论
|
|
||||||
</h3>
|
|
||||||
|
|
||||||
<div class="evaluationData">
|
|
||||||
<el-row style="width: 96%" class="row pb5">
|
|
||||||
<el-col :span="12" style="display: flex">
|
|
||||||
<span>{{ dropList.lineName }}</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12" style="display: flex">
|
|
||||||
<div>
|
|
||||||
综合评估得分:
|
|
||||||
<span
|
|
||||||
class="conclusion"
|
|
||||||
:class="
|
|
||||||
dropList.assessData == '特质'
|
|
||||||
? 'background1'
|
|
||||||
: dropList.assessData == '较差'
|
|
||||||
? 'background2'
|
|
||||||
: dropList.assessData == '极差'
|
|
||||||
? 'background3'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ dropList.assessData }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row style="width: 96%" v-for="(item, i) in evaluationData" class="row pb4 pt3">
|
|
||||||
<el-col :span="14" style="display: flex; align-items: center">
|
|
||||||
<img :src="url[i]" />
|
|
||||||
<span style="line-height: 20px">{{ item.targetName }}</span>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="10" style="display: flex; align-items: center">
|
|
||||||
<div style="width: 100%">
|
|
||||||
评估得分:
|
|
||||||
<span
|
|
||||||
class="conclusion"
|
|
||||||
:class="
|
|
||||||
item.avg == '特质'
|
|
||||||
? 'background1'
|
|
||||||
: item.avg == '较差'
|
|
||||||
? 'background2'
|
|
||||||
: item.avg == '极差'
|
|
||||||
? 'background3'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ item.avg }}
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<h3 class="mb10 iconBox">
|
|
||||||
<span></span>
|
<span></span>
|
||||||
稳态指标合格率
|
稳态指标合格率
|
||||||
</h3>
|
</h3>
|
||||||
<div :style="`height: calc(${rowHeight} - 31px)`" ref="chartRef"></div>
|
|
||||||
|
<div :style="`height: calc(${rowHeight} - 31px); `" ref="chartRef"></div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<h3 class="mb10 iconBox">
|
<h3 class="mb10 iconBox text-style" @click="clickTransient()">
|
||||||
<span></span>
|
<span></span>
|
||||||
暂态事件统计
|
暂态事件统计
|
||||||
</h3>
|
</h3>
|
||||||
@@ -199,10 +186,11 @@ import {
|
|||||||
lineQualifiedDetail,
|
lineQualifiedDetail,
|
||||||
getLineAssess,
|
getLineAssess,
|
||||||
getEventDetailByLineId,
|
getEventDetailByLineId,
|
||||||
getGridDiagramTargetData
|
getGridDiagramTargetData,
|
||||||
|
limitTableDetail
|
||||||
} from '@/api/device-boot/panorama'
|
} from '@/api/device-boot/panorama'
|
||||||
import { formatter } from 'element-plus'
|
import { formatter } from 'element-plus'
|
||||||
|
const loading=ref(false)
|
||||||
const emit = defineEmits(['back'])
|
const emit = defineEmits(['back'])
|
||||||
const dropList: any = ref({})
|
const dropList: any = ref({})
|
||||||
const TargetData: any = ref({})
|
const TargetData: any = ref({})
|
||||||
@@ -386,41 +374,66 @@ const open = async (id: string) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
loading.value = true
|
||||||
// 监测点总体评价结论
|
// 监测点总体评价结论
|
||||||
getLineAssess({
|
limitTableDetail({
|
||||||
lineId: id,
|
lineId: id,
|
||||||
startTime: datePickerRef.value.timeValue[0],
|
monitorIds: [id],
|
||||||
endTime: datePickerRef.value.timeValue[1]
|
searchBeginTime: datePickerRef.value.timeValue[0],
|
||||||
|
searchEndTime: datePickerRef.value.timeValue[1],
|
||||||
|
searchState: 0,
|
||||||
|
lineRunFlag: 0
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
dropList.value.assessData = res.data.assessLevel
|
// dropList.value.assessData = res.data.assessLevel
|
||||||
evaluationData.value = [
|
evaluationData.value = [
|
||||||
{
|
{
|
||||||
targetName: '频率偏差(Hz)',
|
targetName: '频率偏差',
|
||||||
avg: res.data.freqAssessLevel,
|
avg: res.data.freqData,
|
||||||
sd: res.data.freqQualifyData
|
xz: res.data.freqLimit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
targetName: '电压偏差(%)',
|
targetName: '电压偏差',
|
||||||
avg: res.data.vdevAssessLevel,
|
avg: res.data.vdevData,
|
||||||
sd: res.data.vdevQualifyData
|
xz: res.data.vdevLimit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
targetName: '电压总谐波畸变率(%)',
|
targetName: '谐波电流',
|
||||||
avg: res.data.harmAssessLevel,
|
avg: res.data.iharmData,
|
||||||
sd: res.data.harmQualifyData
|
xz: res.data.iharmLimit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
targetName: '三相电压不平衡度(%)',
|
targetName: '负序电流',
|
||||||
avg: res.data.unbalanceAssessLevel,
|
avg: res.data.inegData,
|
||||||
sd: res.data.unbalanceQualifyData
|
xz: res.data.inegLimit
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetName: '间谐波电压',
|
||||||
|
avg: res.data.inuharmData,
|
||||||
|
xz: res.data.inuharmLimit
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
targetName: '电压总谐波畸变率',
|
||||||
|
avg: res.data.uaberranceData,
|
||||||
|
xz: res.data.uaberranceLimit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
targetName: '闪变',
|
targetName: '闪变',
|
||||||
avg: res.data.flickerAssessLevel,
|
avg: res.data.flickerData,
|
||||||
sd: res.data.flickerQualifyData
|
xz: res.data.flickerLimit
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetName: '谐波电压',
|
||||||
|
avg: res.data.uharmData,
|
||||||
|
xz: res.data.uharmLimit
|
||||||
|
},
|
||||||
|
{
|
||||||
|
targetName: '三相电压不平衡度',
|
||||||
|
avg: res.data.unbalanceData,
|
||||||
|
xz: res.data.unbalanceLimit
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
loading.value = false
|
||||||
})
|
})
|
||||||
// 稳态指标合格率
|
// 稳态指标合格率
|
||||||
|
|
||||||
@@ -687,15 +700,58 @@ const echart = (row: any) => {
|
|||||||
// 跳转
|
// 跳转
|
||||||
const Integrity = () => {
|
const Integrity = () => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'harmonic-boot/harmonic/getIntegrityData'
|
name: 'harmonic-boot/harmonic/getIntegrityData',
|
||||||
})
|
query: {
|
||||||
|
type: '1',
|
||||||
|
name: dropList.value.lineName,
|
||||||
|
t: Date.now()
|
||||||
}
|
}
|
||||||
const OnlineRate = () => {
|
|
||||||
router.push({
|
|
||||||
name: 'harmonic-boot/area/OnlineRate'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const OnlineRate = () => {
|
||||||
|
router.push({
|
||||||
|
name: 'harmonic-boot/area/OnlineRate',
|
||||||
|
query: {
|
||||||
|
type: '1',
|
||||||
|
name: dropList.value.devName,
|
||||||
|
t: Date.now()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 跳转在线监测点
|
||||||
|
const clickAlarm = (value: any) => {
|
||||||
|
router.push({
|
||||||
|
name: 'harmonic-boot/monitor/online',
|
||||||
|
query: {
|
||||||
|
type: value,
|
||||||
|
id: lineId.value,
|
||||||
|
t: Date.now()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 跳转暂态列表
|
||||||
|
const clickTransient = () => {
|
||||||
|
router.push({
|
||||||
|
name: 'Descentsystem/transientList',
|
||||||
|
query: {
|
||||||
|
type: '1',
|
||||||
|
name: dropList.value.lineName,
|
||||||
|
t: Date.now()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 跳转台账信息
|
||||||
|
const clickLinName = () => {
|
||||||
|
router.push({
|
||||||
|
name: 'Supervision/Terminaldetection',
|
||||||
|
query: {
|
||||||
|
type: '5',
|
||||||
|
name: dropList.value.lineName,
|
||||||
|
t: Date.now()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// open('4c87b7dff2281254fc55c25a4da31506')
|
// open('4c87b7dff2281254fc55c25a4da31506')
|
||||||
})
|
})
|
||||||
@@ -735,7 +791,7 @@ defineExpose({ open })
|
|||||||
|
|
||||||
.iconBox {
|
.iconBox {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
span {
|
span {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 3px;
|
width: 3px;
|
||||||
@@ -767,4 +823,13 @@ defineExpose({ open })
|
|||||||
background-color: #a52a2a;
|
background-color: #a52a2a;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
:deep(.el-table--small .el-table__cell) {
|
||||||
|
padding: 2px 0 !important;
|
||||||
|
}
|
||||||
|
.text-style {
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: underline;
|
||||||
|
text-decoration-color: var(--el-color-primary);
|
||||||
|
text-underline-offset: 4px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -19,6 +19,12 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<!-- <el-button @click="showPsrmap" class="psrmapBut">电网图层</el-button> -->
|
||||||
|
<el-checkbox-group v-model="group" @change="showPsrmap" size="small" class="psrmapBut">
|
||||||
|
<el-checkbox-button value="1" label="电网图层"></el-checkbox-button>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
<!-- 搜索内容展示 -->
|
<!-- 搜索内容展示 -->
|
||||||
<div class="query-box-wrap collapse" v-show="showWrap">
|
<div class="query-box-wrap collapse" v-show="showWrap">
|
||||||
<div v-if="QueryList.length == 0" class="collapse_none">查询无结果</div>
|
<div v-if="QueryList.length == 0" class="collapse_none">查询无结果</div>
|
||||||
@@ -50,6 +56,8 @@
|
|||||||
展开搜索结果
|
展开搜索结果
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- 点击弹框 -->
|
||||||
|
<propInfo ref="propInfoRef" @flyTo="flyTo"/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -63,7 +71,8 @@ import { getGridDiagramAreaData } from '@/api/device-boot/panorama'
|
|||||||
import { Search } from '@element-plus/icons-vue'
|
import { Search } from '@element-plus/icons-vue'
|
||||||
import '@/assets/panorama/narimap.css'
|
import '@/assets/panorama/narimap.css'
|
||||||
import '@/assets/panorama/nrgisCommon.css'
|
import '@/assets/panorama/nrgisCommon.css'
|
||||||
const emit = defineEmits(['changeValue', 'drop', 'show'])
|
import propInfo from '@/views/pqs/qualityInspeection/panorama/components/details/propInfo.vue'
|
||||||
|
const emit = defineEmits(['changeValue', 'drop', 'show', 'setLine'])
|
||||||
const prop = defineProps({
|
const prop = defineProps({
|
||||||
lineInfo: {
|
lineInfo: {
|
||||||
type: Boolean
|
type: Boolean
|
||||||
@@ -77,6 +86,7 @@ const datePickerRef = ref()
|
|||||||
const form: any = ref({})
|
const form: any = ref({})
|
||||||
const colorKey = ref('')
|
const colorKey = ref('')
|
||||||
const PopKey = ref(2)
|
const PopKey = ref(2)
|
||||||
|
const propInfoRef = ref()
|
||||||
const assessList: any = ref([])
|
const assessList: any = ref([])
|
||||||
const linList: any = ref([])
|
const linList: any = ref([])
|
||||||
const QueryList: any = ref([])
|
const QueryList: any = ref([])
|
||||||
@@ -144,7 +154,7 @@ narimap.Require(
|
|||||||
// ['PSRMap', 'Components.Query', 'Marker'],
|
// ['PSRMap', 'Components.Query', 'Marker'],
|
||||||
() => {
|
() => {
|
||||||
if (narimap.Config.examples.notlogin) {
|
if (narimap.Config.examples.notlogin) {
|
||||||
initMap(narimap.Config.styles.sjRaster)
|
initMap(narimap.Config.styles.sjDark)
|
||||||
} else {
|
} else {
|
||||||
//电网GIS地图服务登录
|
//电网GIS地图服务登录
|
||||||
narimap.SGAuth.login()
|
narimap.SGAuth.login()
|
||||||
@@ -156,7 +166,7 @@ narimap.Require(
|
|||||||
}
|
}
|
||||||
|
|
||||||
//默认打开电网GIS影像图
|
//默认打开电网GIS影像图
|
||||||
initMap(narimap.Config.styles.sjRaster)
|
initMap(narimap.Config.styles.sjDark)
|
||||||
})
|
})
|
||||||
.catch((err: any) => {
|
.catch((err: any) => {
|
||||||
console.log('错误', err)
|
console.log('错误', err)
|
||||||
@@ -278,7 +288,6 @@ const addSource = async () => {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// ]
|
// ]
|
||||||
console.log('🚀 ~ sourceList:', sourceList.value)
|
|
||||||
|
|
||||||
if (map.value.getSource('themeData')) {
|
if (map.value.getSource('themeData')) {
|
||||||
map.value.getSource('themeData').setData({
|
map.value.getSource('themeData').setData({
|
||||||
@@ -353,30 +362,52 @@ const addSource = async () => {
|
|||||||
*/
|
*/
|
||||||
'heatmap-opacity': 1
|
'heatmap-opacity': 1
|
||||||
},
|
},
|
||||||
maxzoom: 12
|
maxzoom: 12,
|
||||||
|
layout: {
|
||||||
|
visibility: 'none'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const changeHeat = e => {
|
||||||
|
map.value.setLayoutProperty('earthquakes-paint', 'visibility', e ? 'visible' : 'none')
|
||||||
|
}
|
||||||
|
const psrmap = ref(null)
|
||||||
// 添加变电站线路
|
// 添加变电站线路
|
||||||
const addLine = () => {
|
const addLine = () => {
|
||||||
//添加电网图层
|
//添加电网图层
|
||||||
let psrmap = new narimap.PSRMap(map.value, {
|
psrmap.value = new narimap.PSRMap(map.value, {
|
||||||
orgId: orgId.value == '1100F3DE20806FADE050007F01006CBE' ? '' : orgId.value
|
orgId: orgId.value == '1100F3DE20806FADE050007F01006CBE' ? '' : orgId.value
|
||||||
|
// disableFilterByUserAuth:new narimap.Config.examples.disableFilterByUserAuth
|
||||||
})
|
})
|
||||||
psrmap.addPSR()
|
psrmap.value.addPSR()
|
||||||
|
|
||||||
initDeviceCard()
|
initDeviceCard()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
psrmap.filterByDomain(1)
|
// psrmap.filterByDomain(1)
|
||||||
}, 0)
|
}, 0)
|
||||||
|
|
||||||
|
psrmap.value.on('load', () => {
|
||||||
|
// 显示电网图层
|
||||||
|
// psrmap.value.hide()
|
||||||
|
})
|
||||||
//添加电网要素点击事件
|
//添加电网要素点击事件
|
||||||
psrmap.on('click', (features: any) => {
|
psrmap.value.on('click', (features: any) => {
|
||||||
console.log(features)
|
console.log(features)
|
||||||
showCollapse.value = false
|
showCollapse.value = false
|
||||||
|
|
||||||
if (inputQuery.value.length == 0) showWrap.value = false
|
if (inputQuery.value.length == 0) showWrap.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const group = ref(['1'])
|
||||||
|
const showPsrmap = e => {
|
||||||
|
if (e.length > 0) {
|
||||||
|
psrmap.value.show()
|
||||||
|
} else {
|
||||||
|
psrmap.value.hide()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const propInfoShow=ref(false)
|
||||||
// 添加变电站弹框
|
// 添加变电站弹框
|
||||||
const initDeviceCard = () => {
|
const initDeviceCard = () => {
|
||||||
deviceCard.value && deviceCard.value.close()
|
deviceCard.value && deviceCard.value.close()
|
||||||
@@ -401,10 +432,13 @@ const initDeviceCard = () => {
|
|||||||
deviceCard.value.on('click', (res: any) => {
|
deviceCard.value.on('click', (res: any) => {
|
||||||
if (res.button.id == 'nariPopupViewDetail') {
|
if (res.button.id == 'nariPopupViewDetail') {
|
||||||
emit('show', true)
|
emit('show', true)
|
||||||
|
propInfoShow.value=propInfoRef.value.show
|
||||||
|
propInfoRef.value.show=false
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
document.querySelectorAll('.nari-tabs__close')[0].onclick = function (v: any) {
|
document.querySelectorAll('.nari-tabs__close')[0].onclick = function (v: any) {
|
||||||
emit('show', false)
|
emit('show', false)
|
||||||
|
propInfoRef.value.show=propInfoShow.value
|
||||||
}
|
}
|
||||||
}, 10)
|
}, 10)
|
||||||
})
|
})
|
||||||
@@ -726,6 +760,7 @@ const addLayer = () => {
|
|||||||
|
|
||||||
const PollutionList = dictData.getBasicData('Pollution_Calc').filter(item => item.name == '谐波电压')
|
const PollutionList = dictData.getBasicData('Pollution_Calc').filter(item => item.name == '谐波电压')
|
||||||
//添加多个监测点
|
//添加多个监测点
|
||||||
|
const lineData = ref([])
|
||||||
const addMarkers = async (row?: any, key?: any, num?: any) => {
|
const addMarkers = async (row?: any, key?: any, num?: any) => {
|
||||||
if (map.value == null) return
|
if (map.value == null) return
|
||||||
let params = {
|
let params = {
|
||||||
@@ -740,7 +775,7 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
|
|||||||
statisticalType: {},
|
statisticalType: {},
|
||||||
...row
|
...row
|
||||||
}
|
}
|
||||||
|
lineData.value = []
|
||||||
let { data } = await getAreaLineInfo(params)
|
let { data } = await getAreaLineInfo(params)
|
||||||
|
|
||||||
let r = 0.0035
|
let r = 0.0035
|
||||||
@@ -756,6 +791,7 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
item.children.forEach((val: any, i: number) => {
|
item.children.forEach((val: any, i: number) => {
|
||||||
|
lineData.value.push(val)
|
||||||
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)
|
||||||
val.imageUrl =
|
val.imageUrl =
|
||||||
@@ -796,18 +832,6 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let num = 20
|
|
||||||
if (val.vharmonicValue > 10000) {
|
|
||||||
num = 100
|
|
||||||
} else if (val.vharmonicValue > 1000) {
|
|
||||||
num = 80
|
|
||||||
} else if (val.vharmonicValue > 100) {
|
|
||||||
num = 60
|
|
||||||
} else if (val.vharmonicValue > 0) {
|
|
||||||
num = 40
|
|
||||||
} else {
|
|
||||||
num = 20
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceList.value.push({
|
sourceList.value.push({
|
||||||
type: 'Feature',
|
type: 'Feature',
|
||||||
@@ -817,12 +841,16 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
|
|||||||
},
|
},
|
||||||
properties: {
|
properties: {
|
||||||
value: val.vharmonicValue || 0
|
value: val.vharmonicValue || 0
|
||||||
// value: num //10 //val.vharmonicValue || 0
|
|
||||||
// value: 0
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
console.log('🚀 ~ addMarkers ~ num:', key)
|
||||||
|
|
||||||
|
if (key != undefined) {
|
||||||
|
propInfoRef.value.open(lineData.value)
|
||||||
|
// emit('setLine', lineData.value)
|
||||||
|
}
|
||||||
|
|
||||||
if (flag.value) {
|
if (flag.value) {
|
||||||
linList.value = [...tempFeatureZ, ...tempFeatureT]
|
linList.value = [...tempFeatureZ, ...tempFeatureT]
|
||||||
@@ -1150,7 +1178,7 @@ const createMapSelectorComponent = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ locatePositions, addMarkers, grids, DeviceQ, radiusPop, flyTo })
|
defineExpose({ locatePositions, addMarkers, grids, DeviceQ, radiusPop, flyTo, changeHeat })
|
||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -61,10 +61,10 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 监测点指标统计 -->
|
<!-- 资产性质 -->
|
||||||
<div :style="`height:calc(${boxHeight.height} + 50px)`">
|
<div :style="`height:calc(${boxHeight.height} + 50px)`">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>监测点指标统计</span>
|
<span>资产性质</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex" class="mt2">
|
<div style="display: flex" class="mt2">
|
||||||
<img src="@/assets/img/FGX.png" />
|
<img src="@/assets/img/FGX.png" />
|
||||||
@@ -97,33 +97,48 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
数据完整性:
|
数据完整性:
|
||||||
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate }}%</span>
|
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate || 0 }}%</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
在线率:
|
在线率:
|
||||||
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate }}%</span>
|
<span style="color: #2dcd28; cursor: text">{{ val.onLineRate || 0 }}%</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 监测点指标统计 -->
|
<!-- 资产性质 -->
|
||||||
<div :style="`height:calc(${boxHeight.height} - 55px)`">
|
<div :style="`height:calc(${boxHeight.height} - 55px)`">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>监测运行统计</span>
|
<span>监测运行统计</span>
|
||||||
|
<div class="titleNum">
|
||||||
|
( 合格:
|
||||||
|
<span class="mr10" style="color: #2dcd28" @click="LookMap(linList[0].lineListOne, [], 0)">
|
||||||
|
{{ linList[0].lineNumOne || 0 }}
|
||||||
|
</span>
|
||||||
|
告警:
|
||||||
|
<span style="color: #a52a2a" @click="LookMap(linList[0].lineListTwo, [], 1)">
|
||||||
|
{{ linList[0].lineNumTwo || 0 }}
|
||||||
|
</span>
|
||||||
|
)
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex" class="mt2">
|
<div style="display: flex" class="mt2">
|
||||||
<img src="@/assets/img/FGX.png" />
|
<img src="@/assets/img/FGX.png" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :style="`height:calc(${boxHeight.height} - 100px);overflow-y: auto;`" class="BoxA mt10">
|
<div :style="`height:calc(${boxHeight.height} - 100px);overflow-y: auto;`" class="BoxA mt10">
|
||||||
<div class="card-Box" v-for="item in linList">
|
<div class="card-Box" v-for="item in linList.slice(1)">
|
||||||
<div>
|
<!-- <div>
|
||||||
<span class="line"></span>
|
<span class="line"></span>
|
||||||
<span class="vol">{{ item.title[0] }}</span>
|
<span class="vol">{{ item.title[0] }}</span>
|
||||||
|
</div> -->
|
||||||
|
<div class="num num2">
|
||||||
|
<div style="text-align: left">
|
||||||
|
<span class="line"></span>
|
||||||
|
<i class="vol">{{ item.title[0] }}</i>
|
||||||
</div>
|
</div>
|
||||||
<div class="num">
|
|
||||||
<div>
|
<div>
|
||||||
{{ item.title[1] }}:
|
{{ item.title[1] }}:
|
||||||
<span style="color: #2dcd28" @click="LookMap(item.lineListOne, [], 0)">
|
<span style="color: #2dcd28" @click="LookMap(item.lineListOne, [], 0)">
|
||||||
@@ -148,12 +163,12 @@
|
|||||||
@click="show = !show"
|
@click="show = !show"
|
||||||
src="@/assets/img/QH.png"
|
src="@/assets/img/QH.png"
|
||||||
/>
|
/>
|
||||||
<div class="legeng">
|
<!-- <div class="legeng">
|
||||||
<div v-for="item in legengList">
|
<div v-for="item in legengList">
|
||||||
<span :style="`background-color: ${item.color};`"></span>
|
<span :style="`background-color: ${item.color};`"></span>
|
||||||
<span>{{ item.title }}</span>
|
<span>{{ item.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<!-- 变电站详情 -->
|
<!-- 变电站详情 -->
|
||||||
<stand ref="standRef" />
|
<stand ref="standRef" />
|
||||||
@@ -305,9 +320,10 @@ const countList: any = ref([
|
|||||||
title: '电网侧监测点',
|
title: '电网侧监测点',
|
||||||
num: 0,
|
num: 0,
|
||||||
onLineNum: 0,
|
onLineNum: 0,
|
||||||
integrityRate: 0
|
integrityRate: 0,
|
||||||
|
onLineRate: 0
|
||||||
},
|
},
|
||||||
{ title: '非电网侧监测点', num: 0, onLineNum: 0, integrityRate: 0 }
|
{ title: '非电网侧监测点', num: 0, onLineNum: 0, integrityRate: 0, onLineRate: 0 }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
// {
|
// {
|
||||||
@@ -409,7 +425,7 @@ const info = async (row: any) => {
|
|||||||
numOneList: []
|
numOneList: []
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
// 监测点指标统计
|
// 资产性质
|
||||||
getGridDiagramStatistics(form).then(res => {
|
getGridDiagramStatistics(form).then(res => {
|
||||||
countList.value[0].children[0] = { title: '电网侧监测点', ...res.data.data[0] }
|
countList.value[0].children[0] = { title: '电网侧监测点', ...res.data.data[0] }
|
||||||
countList.value[0].children[1] = { title: '非电网侧监测点', ...res.data.data[1] }
|
countList.value[0].children[1] = { title: '非电网侧监测点', ...res.data.data[1] }
|
||||||
@@ -549,13 +565,13 @@ defineExpose({ info, show })
|
|||||||
// grid-template-rows: 1fr 1fr;
|
// grid-template-rows: 1fr 1fr;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-evenly;
|
justify-content: space-around;
|
||||||
// align-items: center;
|
// align-items: center;
|
||||||
margin: 0 5px 5px;
|
margin: 0 5px 5px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: #edededc0;
|
background-color: #edededc0;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
min-height: 60px;
|
min-height: 40px;
|
||||||
// max-height: 120px;
|
// max-height: 120px;
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
@@ -581,10 +597,11 @@ defineExpose({ info, show })
|
|||||||
font-weight: 550;
|
font-weight: 550;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.num1 {
|
.num1 {
|
||||||
grid-template-columns: 1fr 1fr; /* 核心:改为2列,均分宽度 */
|
grid-template-columns: 1fr 1fr; /* 核心:改为2列,均分宽度 */
|
||||||
grid-template-rows: auto auto;
|
grid-template-rows: auto auto;
|
||||||
gap: 8px; /* 可选:子元素间距,提升美观度 */
|
gap: 15px; /* 可选:子元素间距,提升美观度 */
|
||||||
div {
|
div {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
@@ -594,12 +611,16 @@ defineExpose({ info, show })
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.num2 {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr 1fr !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.BoxA {
|
.BoxA {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr;
|
||||||
grid-template-rows: 1fr 1fr;
|
grid-template-rows: 1fr 1fr 1fr;
|
||||||
|
|
||||||
// grid-template-rows: 80px;
|
// grid-template-rows: 80px;
|
||||||
.num {
|
.num {
|
||||||
@@ -655,7 +676,7 @@ defineExpose({ info, show })
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: -75px;
|
right: -78px;
|
||||||
width: 70px;
|
width: 70px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
@@ -679,4 +700,13 @@ defineExpose({ info, show })
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.titleNum {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: normal;
|
||||||
|
margin-left: 5px;
|
||||||
|
span {
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -4,11 +4,21 @@
|
|||||||
<!-- 综合评估 -->
|
<!-- 综合评估 -->
|
||||||
<div style="height: 110px">
|
<div style="height: 110px">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>
|
<span>稳态电能质量水平评估</span>
|
||||||
稳态综合评估
|
<span class="info" @click="open(0)">
|
||||||
|
详情
|
||||||
|
<ArrowRight style="width: 12px" />
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex" class="mt2">
|
||||||
|
<img src="@/assets/img/FGX.png" />
|
||||||
|
</div>
|
||||||
|
<div class="mt10 TJTop">
|
||||||
|
<img src="@/assets/img/TJ.png" />
|
||||||
|
区域污染水平评估
|
||||||
<el-popover placement="right" :width="190" trigger="hover">
|
<el-popover placement="right" :width="190" trigger="hover">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<WarningFilled class="WarningFilled" />
|
<WarningFilled class="WarningFilled ml5" />
|
||||||
</template>
|
</template>
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<span style="color: #00b07d">无污染:0</span>
|
<span style="color: #00b07d">无污染:0</span>
|
||||||
@@ -22,39 +32,15 @@
|
|||||||
<span style="color: #a52a2a">重度污染:(10000</span>
|
<span style="color: #a52a2a">重度污染:(10000</span>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</span>
|
<el-switch
|
||||||
<span class="info" @click="open(0)">
|
v-model="heat"
|
||||||
详情
|
class="ml5"
|
||||||
<ArrowRight style="width: 12px" />
|
@change="changeHeat"
|
||||||
</span>
|
size="small"
|
||||||
</div>
|
inline-prompt
|
||||||
<div style="display: flex" class="mt2">
|
active-text="热力图"
|
||||||
<img src="@/assets/img/FGX.png" />
|
inactive-text="热力图"
|
||||||
</div>
|
/>
|
||||||
<div class="mt10 TJTop">
|
|
||||||
<!-- <img src="@/assets/img/TJ.png" />
|
|
||||||
综合评估得分:
|
|
||||||
<span
|
|
||||||
:style="{
|
|
||||||
color:
|
|
||||||
assessList.score == 3.14159
|
|
||||||
? ''
|
|
||||||
: assessList.score > 4.5
|
|
||||||
? '#339966'
|
|
||||||
: assessList.score > 4
|
|
||||||
? '#2b7fd3'
|
|
||||||
: assessList.score > 3
|
|
||||||
? '#ffcc33'
|
|
||||||
: assessList.score > 2
|
|
||||||
? '#97017e'
|
|
||||||
: assessList.score > 0
|
|
||||||
? '#A52a2a'
|
|
||||||
: ''
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
{{ assessList.score == 3.14159 ? '/' : assessList.score }}
|
|
||||||
|
|
||||||
</span> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="evaluate">
|
<div class="evaluate">
|
||||||
<div v-for="item in assessList" style="min-width: 60px">
|
<div v-for="item in assessList" style="min-width: 60px">
|
||||||
@@ -80,16 +66,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 稳态电能质量水平评估 -->
|
<!-- 稳态电能质量水平评估 -->
|
||||||
<div>
|
<div>
|
||||||
<div class="title">
|
<!-- <div class="title">
|
||||||
<span>稳态电能质量水平评估</span>
|
<span>稳态电能质量水平评估</span>
|
||||||
<span class="info" @click="open(1)">
|
<span class="info" @click="open(1)">
|
||||||
详情
|
详情
|
||||||
<ArrowRight style="width: 12px" />
|
<ArrowRight style="width: 12px" />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div> -->
|
||||||
<div style="display: flex" class="mt2">
|
<!-- <div style="display: flex" class="mt2">
|
||||||
<img src="@/assets/img/FGX.png" />
|
<img src="@/assets/img/FGX.png" />
|
||||||
</div>
|
</div> -->
|
||||||
<div :style="boxHeight" class="boxR">
|
<div :style="boxHeight" class="boxR">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="TJTop">
|
<div class="TJTop">
|
||||||
@@ -256,6 +242,7 @@ import {
|
|||||||
getEventLevelEvaluation,
|
getEventLevelEvaluation,
|
||||||
getSupervisionData
|
getSupervisionData
|
||||||
} from '@/api/device-boot/panorama'
|
} from '@/api/device-boot/panorama'
|
||||||
|
const emit = defineEmits(['changeHeat'])
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const show = ref(false)
|
const show = ref(false)
|
||||||
const height = mainHeight(30)
|
const height = mainHeight(30)
|
||||||
@@ -309,6 +296,7 @@ const options = ref([
|
|||||||
value: '9'
|
value: '9'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
const heat = ref(false)
|
||||||
const technology: any = ref({})
|
const technology: any = ref({})
|
||||||
const harmonicType = ref('6')
|
const harmonicType = ref('6')
|
||||||
const transientNum = ref([0, 0])
|
const transientNum = ref([0, 0])
|
||||||
@@ -375,7 +363,10 @@ const open = (e: number) => {
|
|||||||
techniqueRef.value.open(formRow.value)
|
techniqueRef.value.open(formRow.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const setColor = val => {
|
const changeHeat = (e: any) => {
|
||||||
|
emit('changeHeat', e)
|
||||||
|
}
|
||||||
|
const setColor = (val: any) => {
|
||||||
return val == 3.14159
|
return val == 3.14159
|
||||||
? ''
|
? ''
|
||||||
: val > 10000
|
: val > 10000
|
||||||
@@ -390,7 +381,7 @@ const setColor = val => {
|
|||||||
? '#00B07D'
|
? '#00B07D'
|
||||||
: ''
|
: ''
|
||||||
}
|
}
|
||||||
const setVal = val => {
|
const setVal = (val: any) => {
|
||||||
return val == 3.14159
|
return val == 3.14159
|
||||||
? '/'
|
? '/'
|
||||||
: val > 10000
|
: val > 10000
|
||||||
@@ -447,7 +438,13 @@ const harmonicChange = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const transientChange = () => {
|
const transientChange = () => {
|
||||||
getEventLevelEvaluation({ ...formRow.value, ids: [value.value] }).then(res => {
|
const [year, , day] = formRow.value.startTime.split('-') //`${year}-01-${day}`
|
||||||
|
getEventLevelEvaluation({
|
||||||
|
...formRow.value,
|
||||||
|
ids: [value.value],
|
||||||
|
searchBeginTime: `${year}-01-${day}`,
|
||||||
|
startTime: `${year}-01-${day}`
|
||||||
|
}).then(res => {
|
||||||
let data = []
|
let data = []
|
||||||
transientNum.value = [0, 0]
|
transientNum.value = [0, 0]
|
||||||
if (formRow.value.isUpToGrid == 0) {
|
if (formRow.value.isUpToGrid == 0) {
|
||||||
@@ -497,14 +494,15 @@ defineExpose({ info, show })
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #757575;
|
color: #757575;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
.WarningFilled {
|
.WarningFilled {
|
||||||
width: 12px;
|
width: 12px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
.TJTop {
|
.TJTop {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
img {
|
img {
|
||||||
height: 1.2rem;
|
height: 1.2rem;
|
||||||
width: 1.2rem;
|
width: 1.2rem;
|
||||||
@@ -512,7 +510,7 @@ defineExpose({ info, show })
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.evaluate {
|
.evaluate {
|
||||||
margin: 10px 0;
|
margin: 5px 0 10px 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|||||||
@@ -7,7 +7,12 @@
|
|||||||
.Icon {
|
.Icon {
|
||||||
width: 30px;
|
width: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
background-image: url('@/assets/icons/网公司.svg');
|
background-color: var(--el-color-primary);
|
||||||
|
border-radius: 5px;
|
||||||
|
background-image: url('@/assets/img/inlogo.png');
|
||||||
|
background-size: 25px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
}
|
}
|
||||||
.el-input__icon {
|
.el-input__icon {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
@@ -200,3 +205,16 @@
|
|||||||
width: 450px;
|
width: 450px;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
.psrmapBut {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 103px;
|
||||||
|
right: 60px;
|
||||||
|
// z-index: 0.1;
|
||||||
|
}
|
||||||
|
#nrDeviceCard {
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.nari-devicecard-popup) {
|
||||||
|
display: none!important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,14 +4,19 @@
|
|||||||
<DatePicker ref="datePickerRef" style="display: none" theCurrentTime />
|
<DatePicker ref="datePickerRef" style="display: none" theCurrentTime />
|
||||||
<el-form :inline="true" :model="form" class="demo-form-inline">
|
<el-form :inline="true" :model="form" class="demo-form-inline">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<Area ref="areaRef" :show-all-levels="false" v-model="form.orgNo" style="width: 100px"
|
<Area
|
||||||
@changeValue="changeValue" />
|
ref="areaRef"
|
||||||
|
:show-all-levels="false"
|
||||||
|
v-model="form.orgNo"
|
||||||
|
style="width: 100px"
|
||||||
|
@changeValue="changeValue"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<!-- <el-form-item>
|
||||||
<el-select v-model="form.isUpToGrid" style="width: 100px" @change="info">
|
<el-select v-model="form.isUpToGrid" style="width: 100px" @change="info">
|
||||||
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id" />
|
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="Icon" @click="reset">
|
<div class="Icon" @click="reset">
|
||||||
<Icon name="fa fa-refresh" />
|
<Icon name="fa fa-refresh" />
|
||||||
@@ -21,13 +26,19 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 地图 -->
|
<!-- 地图 -->
|
||||||
<Map v-if="VITE_FLAG" ref="mapRef" @changeValue="changeValue" :lineInfo="lineInfo" @drop="drop"
|
<Map
|
||||||
@show="infoShow" />
|
v-if="VITE_FLAG"
|
||||||
|
ref="mapRef"
|
||||||
|
@changeValue="changeValue"
|
||||||
|
:lineInfo="lineInfo"
|
||||||
|
@drop="drop"
|
||||||
|
@show="infoShow"
|
||||||
|
/>
|
||||||
<div v-show="lineInfo">
|
<div v-show="lineInfo">
|
||||||
<!-- 省级 -->
|
<!-- 省级 -->
|
||||||
<div v-show="control == 1">
|
<div v-show="control == 1">
|
||||||
<mapL ref="mapLRef" class="mapL" @LookMap="LookMap" @GridDiagram="GridDiagram" />
|
<mapL ref="mapLRef" class="mapL" @LookMap="LookMap" @GridDiagram="GridDiagram" />
|
||||||
<mapR ref="mapRRef" class="mapR" />
|
<mapR ref="mapRRef" class="mapR" @changeHeat="changeHeat" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 市级 -->
|
<!-- 市级 -->
|
||||||
<!-- <div v-show="control == 4"> -->
|
<!-- <div v-show="control == 4"> -->
|
||||||
@@ -102,6 +113,15 @@ const changeValue = (e: any) => {
|
|||||||
|
|
||||||
info()
|
info()
|
||||||
}
|
}
|
||||||
|
// 热力图开关
|
||||||
|
const changeHeat = (e: boolean) => {
|
||||||
|
console.log('🚀 ~ changeHeat ~ e:', e)
|
||||||
|
|
||||||
|
mapRef.value.changeHeat(e)
|
||||||
|
if (e) {
|
||||||
|
mapRef.value.flyTo({ coordinate: [116.84428600000001, 40.57707185292256] }, 6.409267680647425)
|
||||||
|
}
|
||||||
|
}
|
||||||
//点击监测点详情
|
//点击监测点详情
|
||||||
const drop = (id: string) => {
|
const drop = (id: string) => {
|
||||||
lineInfo.value = false
|
lineInfo.value = false
|
||||||
@@ -178,6 +198,7 @@ const info = () => {
|
|||||||
form.value.type = datePickerRef.value.interval
|
form.value.type = datePickerRef.value.interval
|
||||||
|
|
||||||
VITE_FLAG ? mapRef.value.grids(form.value) : ''
|
VITE_FLAG ? mapRef.value.grids(form.value) : ''
|
||||||
|
VITE_FLAG ? mapRef.value.addMarkers() : ''
|
||||||
if (control.value == 1) {
|
if (control.value == 1) {
|
||||||
mapLRef.value.info(form.value)
|
mapLRef.value.info(form.value)
|
||||||
mapRRef.value.info(form.value)
|
mapRRef.value.info(form.value)
|
||||||
@@ -197,9 +218,10 @@ const reset = () => {
|
|||||||
changeValue({ data: dictData.state.area[0] })
|
changeValue({ data: dictData.state.area[0] })
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// info()
|
nextTick(() => {
|
||||||
|
// datePickerRef.value.setTheDate(1)
|
||||||
changeValue({ data: dictData.state.area[0] })
|
changeValue({ data: dictData.state.area[0] })
|
||||||
// aaa()
|
})
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -254,7 +276,7 @@ onMounted(() => {
|
|||||||
.mapR {
|
.mapR {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
// z-index: 1;
|
z-index: 1;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,12 +28,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终端厂家:">
|
<el-form-item label="终端厂家:">
|
||||||
<el-select
|
<el-select v-model="tableStore.table.params.manufacturer" clearable placeholder="请选择终端厂家">
|
||||||
v-model="tableStore.table.params.manufacturer"
|
|
||||||
clearable
|
|
||||||
|
|
||||||
placeholder="请选择终端厂家"
|
|
||||||
>
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in terminaloption"
|
v-for="item in terminaloption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -128,7 +123,7 @@
|
|||||||
<MyEchart :options="options"></MyEchart>
|
<MyEchart :options="options"></MyEchart>
|
||||||
</div>
|
</div>
|
||||||
<el-form :inline="true" class="form">
|
<el-form :inline="true" class="form">
|
||||||
<el-form-item label="告警持续天数"></el-form-item>
|
<!-- <el-form-item label="告警持续天数"></el-form-item>
|
||||||
<el-form-item label="告警阀值(天)">
|
<el-form-item label="告警阀值(天)">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="tableStore.table.params.alarmDayLimit"
|
v-model="tableStore.table.params.alarmDayLimit"
|
||||||
@@ -144,6 +139,13 @@
|
|||||||
:step="1"
|
:step="1"
|
||||||
step-strictly
|
step-strictly
|
||||||
/>
|
/>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="数据筛选">
|
||||||
|
<el-input
|
||||||
|
placeholder="请输入监测点名称/终端名称"
|
||||||
|
v-model="tableStore.table.params.searchValue"
|
||||||
|
clearable
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="form_but">
|
<el-form-item class="form_but">
|
||||||
<el-button type="primary" @click="MonitorVerify" icon="el-icon-Search">查询</el-button>
|
<el-button type="primary" @click="MonitorVerify" icon="el-icon-Search">查询</el-button>
|
||||||
@@ -167,7 +169,7 @@
|
|||||||
<vxe-column field="monitorName" title="监测点名称"></vxe-column>
|
<vxe-column field="monitorName" title="监测点名称"></vxe-column>
|
||||||
<vxe-column field="manufacturer" title="终端厂家"></vxe-column>
|
<vxe-column field="manufacturer" title="终端厂家"></vxe-column>
|
||||||
<vxe-column field="devName" title="所属终端名称"></vxe-column>
|
<vxe-column field="devName" title="所属终端名称"></vxe-column>
|
||||||
<vxe-column field="ip" title="IP">
|
<vxe-column field="ip" title="IP" width="120px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ decryptFromBase64(row.ip) }}
|
{{ decryptFromBase64(row.ip) }}
|
||||||
</template>
|
</template>
|
||||||
@@ -243,7 +245,7 @@ const tableStore = new TableStore({
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
showPage: false,
|
showPage: false,
|
||||||
filename: '稳态告警统计',
|
filename: '稳态告警统计',
|
||||||
publicHeight: 470,
|
publicHeight: 480,
|
||||||
column: [],
|
column: [],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog draggable width="1350px" class="cn-operate-dialog" v-model="dialogVisible" :title="title">
|
<el-dialog draggable width="1400px" class="cn-operate-dialog" v-model="dialogVisible" :title="title">
|
||||||
<div style="display: flex" v-loading="loading">
|
<div style="display: flex" v-loading="loading">
|
||||||
<div :style="height1" class="mr10 box" style="width: 500px">
|
<div :style="height1" class="mr10 box" style="width: 550px">
|
||||||
<vxe-table
|
<vxe-table
|
||||||
height="auto"
|
height="auto"
|
||||||
:data="TableData"
|
:data="TableData"
|
||||||
@@ -11,17 +11,66 @@
|
|||||||
@current-change="currentChangeEvent"
|
@current-change="currentChangeEvent"
|
||||||
>
|
>
|
||||||
<vxe-column type="seq" title="序号" width="60px"></vxe-column>
|
<vxe-column type="seq" title="序号" width="60px"></vxe-column>
|
||||||
<vxe-column field="date" title="日期"></vxe-column>
|
<!-- <vxe-column field="date" title="日期"></vxe-column> -->
|
||||||
<vxe-column field="bdName" title="所属电站(场站)" width="120px"></vxe-column>
|
<vxe-column field="bdName" title="所属电站(场站)"></vxe-column>
|
||||||
<vxe-column field="monitorName" title="监测点名称" width="120px"></vxe-column>
|
<vxe-column field="monitorName" title="监测点名称"></vxe-column>
|
||||||
<vxe-column field="timeSum" title="告警时间(分钟)" width="80px"></vxe-column>
|
<vxe-column field="timeSum" title="告警天数" width="80px">
|
||||||
|
<template v-slot="{ row }">
|
||||||
|
{{ row.dateTargetList?.length }}
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :style="height" style="width: 820px" v-loading="loading1">
|
<div style="width: 820px" v-loading="loading1">
|
||||||
|
<el-form :inline="true" class="form">
|
||||||
|
<el-form-item label="统计日期">
|
||||||
|
<el-select
|
||||||
|
v-model="timeList"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择告警天数"
|
||||||
|
style="width: 180px"
|
||||||
|
@change="change"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dateList"
|
||||||
|
:key="item.date"
|
||||||
|
:label="item.date"
|
||||||
|
:value="item.date"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="统计指标" v-if="numKey != 0">
|
||||||
|
<el-select
|
||||||
|
v-model="targetKey"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
placeholder="请选择指标"
|
||||||
|
style="width: 150px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in targetList"
|
||||||
|
:key="item.key"
|
||||||
|
:label="item.targetName"
|
||||||
|
:value="item.key"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item class="form_but">
|
||||||
|
<span class="mr20">
|
||||||
|
告警时间:
|
||||||
|
<span class="title">{{ timeSum }}</span>
|
||||||
|
分钟
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<el-button type="primary" @click="init" icon="el-icon-Search">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div :style="height">
|
||||||
<vxe-table
|
<vxe-table
|
||||||
height="auto"
|
height="auto"
|
||||||
:data="TableData1.slice((pageNum - 1) * pageSize, pageNum * pageSize)"
|
:data="TableData1?.slice((pageNum - 1) * pageSize, pageNum * pageSize)"
|
||||||
v-bind="defaultAttribute"
|
v-bind="defaultAttribute"
|
||||||
>
|
>
|
||||||
<vxe-column type="seq" title="序号" width="80px">
|
<vxe-column type="seq" title="序号" width="80px">
|
||||||
@@ -29,7 +78,7 @@
|
|||||||
<span>{{ (pageNum - 1) * pageSize + rowIndex + 1 }}</span>
|
<span>{{ (pageNum - 1) * pageSize + rowIndex + 1 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="time" title="时间" :formatter="formatter"></vxe-column>
|
<vxe-column field="time" width="150px" title="时间" :formatter="formatter"></vxe-column>
|
||||||
<vxe-column field="targetName" title="指标类型" min-width="100px"></vxe-column>
|
<vxe-column field="targetName" title="指标类型" min-width="100px"></vxe-column>
|
||||||
<vxe-column field="phaseType" title="相别" width="80px">
|
<vxe-column field="phaseType" title="相别" width="80px">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
@@ -39,7 +88,12 @@
|
|||||||
|
|
||||||
<vxe-column field="type" title="数据类型" width="105px" :formatter="formatter"></vxe-column>
|
<vxe-column field="type" title="数据类型" width="105px" :formatter="formatter"></vxe-column>
|
||||||
<vxe-column field="val" title="值" width="85px" :formatter="formatter"></vxe-column>
|
<vxe-column field="val" title="值" width="85px" :formatter="formatter"></vxe-column>
|
||||||
<vxe-column field="overLimitValue" title="限值" width="85px" :formatter="formatter"></vxe-column>
|
<vxe-column
|
||||||
|
field="overLimitValue"
|
||||||
|
title="限值"
|
||||||
|
width="85px"
|
||||||
|
:formatter="formatter"
|
||||||
|
></vxe-column>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
<div class="table-pagination">
|
<div class="table-pagination">
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@@ -48,50 +102,54 @@
|
|||||||
:page-sizes="[10, 20, 50, 100, 200]"
|
:page-sizes="[10, 20, 50, 100, 200]"
|
||||||
background
|
background
|
||||||
layout="sizes,total, ->, prev, pager, next, jumper"
|
layout="sizes,total, ->, prev, pager, next, jumper"
|
||||||
:total="TableData1.length"
|
:total="TableData1?.length || 0"
|
||||||
></el-pagination>
|
></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, inject } from 'vue'
|
import { ref, inject } from 'vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { reactive } from 'vue'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { monitorLimitTable, monitorLimitTableDetail } from '@/api/device-boot/dataVerify'
|
import { monitorLimitTable, monitorLimitTableDetail } from '@/api/device-boot/dataVerify'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
const dictData = useDictData()
|
|
||||||
const StatisList = dictData.getBasicData('Steady_Statis')
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const height1 = mainHeight(-110, 2)
|
const height1 = mainHeight(-110, 2)
|
||||||
const height = mainHeight(10, 2)
|
const height = mainHeight(90, 2)
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const loading1 = ref(false)
|
const loading1 = ref(false)
|
||||||
const TableData = ref([])
|
const TableData = ref([])
|
||||||
const TableData1 = ref([])
|
const TableData1 = ref([])
|
||||||
|
const dateList: any = ref([])
|
||||||
const pageNum = ref(1)
|
const pageNum = ref(1)
|
||||||
const pageSize = ref(20)
|
const pageSize = ref(20)
|
||||||
const numKey = ref(0)
|
const numKey = ref(0)
|
||||||
const targetKey = ref('')
|
const targetKey = ref('')
|
||||||
const clickRow = ref({})
|
const targetList: any = ref([])
|
||||||
|
const timeSum = ref('')
|
||||||
|
const timeList = ref('')
|
||||||
|
const showColumn = ref(true)
|
||||||
|
|
||||||
const open = (data: anyObj, time: string[], num: number) => {
|
const open = (data: anyObj, time: string[], num: number) => {
|
||||||
// title.value = (num == 0 ? data.targetName : data.monitorName) + '_告警详情展示'
|
// title.value = (num == 0 ? data.targetName : data.monitorName) + '_告警监测点详情'
|
||||||
loading.value = true
|
loading.value = true
|
||||||
title.value = '告警监测点详情'
|
title.value = '告警监测点详情'
|
||||||
numKey.value = num
|
|
||||||
targetKey.value = data.key
|
|
||||||
TableData.value = []
|
TableData.value = []
|
||||||
|
numKey.value = num
|
||||||
|
targetKey.value = data.key || ''
|
||||||
monitorLimitTable({
|
monitorLimitTable({
|
||||||
monitorIds: num == 0 ? data.ids : [data.monitorId],
|
monitorIds: num == 0 ? data.ids : [data.monitorId],
|
||||||
targetKey: num == 0 ? data.key : '',
|
targetKey: num == 0 ? data.key : '',
|
||||||
searchBeginTime: time[0],
|
searchBeginTime: time[0],
|
||||||
searchEndTime: time[1]
|
searchEndTime: time[1]
|
||||||
})
|
})
|
||||||
.then(async(res) => {
|
.then(async res => {
|
||||||
TableData.value = res.data
|
TableData.value = res.data
|
||||||
await tableRef.value.setCurrentRow(TableData.value[0])
|
await tableRef.value.setCurrentRow(TableData.value[0])
|
||||||
await currentChangeEvent()
|
await currentChangeEvent()
|
||||||
@@ -103,16 +161,28 @@ const open = (data: anyObj, time: string[], num: number) => {
|
|||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
const currentChangeEvent = () => {
|
const currentChangeEvent = () => {
|
||||||
|
let data = tableRef.value.getCurrentRecord()
|
||||||
|
|
||||||
|
dateList.value = data.dateTargetList
|
||||||
|
targetList.value = dateList.value[0].targetKeys
|
||||||
|
timeList.value = data.dateTargetList[0].date
|
||||||
|
|
||||||
|
init()
|
||||||
|
}
|
||||||
|
const init = () => {
|
||||||
|
if (timeList.value == '') return ElMessage.warning('请选择告警天数!')
|
||||||
loading1.value = true
|
loading1.value = true
|
||||||
clickRow.value = tableRef.value.getCurrentRecord()
|
|
||||||
TableData1.value = []
|
TableData1.value = []
|
||||||
|
let data = tableRef.value.getCurrentRecord()
|
||||||
monitorLimitTableDetail({
|
monitorLimitTableDetail({
|
||||||
monitorIds: [clickRow.value.monitorId],
|
monitorIds: [data.monitorId],
|
||||||
searchBeginTime: clickRow.value.date,
|
searchBeginTime: timeList.value,
|
||||||
targetKey: numKey.value == 0 ? targetKey.value : ''
|
targetKey: targetKey.value || '' //numKey.value == 0 ? targetKey.value : ''
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
TableData1.value = res.data
|
timeSum.value = res.data.timeSum
|
||||||
|
TableData1.value = res.data.time
|
||||||
|
showColumn.value = res.data[0]?.featureAmplitude == null ? true : false
|
||||||
loading1.value = false
|
loading1.value = false
|
||||||
pageNum.value = 1
|
pageNum.value = 1
|
||||||
})
|
})
|
||||||
@@ -120,9 +190,37 @@ const currentChangeEvent = () => {
|
|||||||
loading1.value = false
|
loading1.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const change = () => {
|
||||||
|
if (timeList.value == '') targetKey.value = ''
|
||||||
|
let list = dateList.value
|
||||||
|
.filter(item => timeList.value == item.date)
|
||||||
|
?.map(item => {
|
||||||
|
return item.targetKeys
|
||||||
|
})
|
||||||
|
.flat()
|
||||||
|
targetList.value = deduplicateByKey(list)
|
||||||
|
if (!targetList.value.some(item => item.key == targetKey.value) ) {
|
||||||
|
targetKey.value = ''
|
||||||
|
}
|
||||||
|
console.log('🚀 ~ change ~ targetList.value:', targetList.value)
|
||||||
|
}
|
||||||
|
// 核心去重逻辑
|
||||||
|
function deduplicateByKey(data) {
|
||||||
|
// 使用Map存储唯一key,保证顺序且去重
|
||||||
|
const uniqueMap = new Map()
|
||||||
|
data.forEach(item => {
|
||||||
|
if (!uniqueMap.has(item.key)) {
|
||||||
|
uniqueMap.set(item.key, item)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// 转换为数组并按sort排序
|
||||||
|
const deduplicatedData = Array.from(uniqueMap.values())
|
||||||
|
return deduplicatedData
|
||||||
|
}
|
||||||
const formatter = (row: any) => {
|
const formatter = (row: any) => {
|
||||||
if (row.column.field == 'time') {
|
if (row.column.field == 'time') {
|
||||||
return clickRow.value.date + ' ' + row.cellValue
|
return timeList.value + ' ' + row.cellValue
|
||||||
} else if (row.column.field == 'type') {
|
} else if (row.column.field == 'type') {
|
||||||
return row.cellValue === 'null' ? '/' : row.cellValue
|
return row.cellValue === 'null' ? '/' : row.cellValue
|
||||||
} else {
|
} else {
|
||||||
@@ -148,4 +246,18 @@ defineExpose({ open })
|
|||||||
// background-color: var(--el-color-primary-light-8) !important;
|
// background-color: var(--el-color-primary-light-8) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.form {
|
||||||
|
position: relative;
|
||||||
|
.form_but {
|
||||||
|
position: absolute;
|
||||||
|
right: -22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.title {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
:deep(.el-select) {
|
||||||
|
min-width: 100px !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user