Compare commits
24 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d69a6e1e5d | |||
| a67535abbf | |||
|
|
dffc735edb | ||
|
|
38806367b4 | ||
|
|
6f770aa91d | ||
| dc32cc3bb7 | |||
|
|
d64d18f330 | ||
|
|
909f43e257 | ||
| 92aa66436e | |||
| 264f33302f | |||
|
|
7b9f5302d0 | ||
|
|
72d836020b | ||
|
|
67efef738a | ||
| 6918611d06 | |||
| 9f5b2ecc46 | |||
|
|
d30b8247cf | ||
| 0b61c4b7ba | |||
|
|
ff2b9db7b8 | ||
|
|
289900f9ff | ||
|
|
e87d05c587 | ||
| 46c55d48ec | |||
| b36f765d07 | |||
|
|
0fe2d2b911 | ||
|
|
8c41a8fc77 |
BIN
public/favicon4.ico
Normal file
BIN
public/favicon4.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -1,32 +1,47 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
import { DEVICE_BOOT } from '@/utils/constantRequest'
|
import { DEVICE_BOOT } from '@/utils/constantRequest'
|
||||||
|
|
||||||
const MAPPING_PATH = DEVICE_BOOT + '/line'
|
const MAPPING_PATH = DEVICE_BOOT + '/line'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询终端详细信息
|
* 查询终端详细信息
|
||||||
*/
|
*/
|
||||||
export const getDeviceDetailData = (id: string) => {
|
export const getDeviceDetailData = (id: string) => {
|
||||||
return request({
|
return request({
|
||||||
url: MAPPING_PATH + '/getDeviceDetailData?id=' + id,
|
url: MAPPING_PATH + '/getDeviceDetailData?id=' + id,
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询监测点详细信息
|
* 查询监测点详细信息
|
||||||
*/
|
*/
|
||||||
export const getLineDetailData = (id: string) => {
|
export const getLineDetailData = (id: string) => {
|
||||||
return request({
|
return request({
|
||||||
url: MAPPING_PATH + '/getLineDetailData?id=' + id,
|
url: MAPPING_PATH + '/getLineDetailData?id=' + id,
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getSubstationSelect = () => {
|
export const getSubstationSelect = () => {
|
||||||
return request({
|
return request({
|
||||||
url: 'device-boot/substation/getSubstationSelect',
|
url: 'device-boot/substation/getSubstationSelect',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 查询变电站详情
|
||||||
|
export const getSubstationSelectLine = (id: string) => {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/line/getSubstationData',
|
||||||
|
method: 'post',
|
||||||
|
data: [id]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 查询监测点
|
||||||
|
export const getLineOverLimitData = (id: string) => {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/line/getLineOverLimitData?id=' + id,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -165,3 +165,20 @@ export function getSupervisionDetailsData(data: any) {
|
|||||||
export function getSupervisionCityDetailsData(data: any) {
|
export function getSupervisionCityDetailsData(data: any) {
|
||||||
return request({ url: '/supervision-boot/gridDiagram/getSupervisionCityDetailsData', method: 'post', data })
|
return request({ url: '/supervision-boot/gridDiagram/getSupervisionCityDetailsData', method: 'post', data })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//区域污染值统计
|
||||||
|
export function getAreaPollution(data: any) {
|
||||||
|
return request({ url: '/harmonic-boot/PollutionSubstation/getAreaPollution', method: 'post', data })
|
||||||
|
}
|
||||||
|
//场站级评估
|
||||||
|
export function downPollutionSubCalc(data: any) {
|
||||||
|
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'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,6 +17,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
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +55,7 @@ export const downloadFile = (filePath: any) => {
|
|||||||
/**
|
/**
|
||||||
* 获取文件的短期url展示
|
* 获取文件的短期url展示
|
||||||
*/
|
*/
|
||||||
export const getFileUrl = (params:any) => {
|
export const getFileUrl = (params: any) => {
|
||||||
let form = new FormData()
|
let form = new FormData()
|
||||||
// form.append('filePath', filePath)
|
// form.append('filePath', filePath)
|
||||||
return createAxios({
|
return createAxios({
|
||||||
|
|||||||
@@ -54,6 +54,54 @@
|
|||||||
<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">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">停运事件管理</div>
|
||||||
|
<div class="code-name">&#xe65d;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">在运设备</div>
|
||||||
|
<div class="code-name">&#xe604;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">异常类_14非智能表在运异常</div>
|
||||||
|
<div class="code-name">&#xe666;</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>
|
||||||
@@ -234,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=1744179175277') format('woff2'),
|
src: url('iconfont.woff2?t=1765612648830') format('woff2'),
|
||||||
url('iconfont.woff?t=1744179175277') format('woff'),
|
url('iconfont.woff?t=1765612648830') format('woff'),
|
||||||
url('iconfont.ttf?t=1744179175277') format('truetype');
|
url('iconfont.ttf?t=1765612648830') format('truetype');
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||||
@@ -262,6 +310,78 @@
|
|||||||
<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">
|
||||||
|
<span class="icon iconfont icon-tingyunshijianguanli"></span>
|
||||||
|
<div class="name">
|
||||||
|
停运事件管理
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-tingyunshijianguanli
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-zaiyunshebei"></span>
|
||||||
|
<div class="name">
|
||||||
|
在运设备
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-zaiyunshebei
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-yichanglei_14feizhinengbiaozaiyunyichang"></span>
|
||||||
|
<div class="name">
|
||||||
|
异常类_14非智能表在运异常
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-yichanglei_14feizhinengbiaozaiyunyichang
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont icon-zonghepingjia1"></span>
|
<span class="icon iconfont icon-zonghepingjia1"></span>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -532,6 +652,70 @@
|
|||||||
<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">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-tingyunshijianguanli"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">停运事件管理</div>
|
||||||
|
<div class="code-name">#icon-tingyunshijianguanli</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-zaiyunshebei"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">在运设备</div>
|
||||||
|
<div class="code-name">#icon-zaiyunshebei</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-yichanglei_14feizhinengbiaozaiyunyichang"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">异常类_14非智能表在运异常</div>
|
||||||
|
<div class="code-name">#icon-yichanglei_14feizhinengbiaozaiyunyichang</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-zonghepingjia1"></use>
|
<use xlink:href="#icon-zonghepingjia1"></use>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 3482754 */
|
font-family: "iconfont"; /* Project id 3482754 */
|
||||||
src: url('iconfont.woff2?t=1744179175277') format('woff2'),
|
src: url('iconfont.woff2?t=1765612648830') format('woff2'),
|
||||||
url('iconfont.woff?t=1744179175277') format('woff'),
|
url('iconfont.woff?t=1765612648830') format('woff'),
|
||||||
url('iconfont.ttf?t=1744179175277') format('truetype');
|
url('iconfont.ttf?t=1765612648830') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
@@ -13,6 +13,38 @@
|
|||||||
-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 {
|
||||||
|
content: "\e65d";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-zaiyunshebei:before {
|
||||||
|
content: "\e604";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-yichanglei_14feizhinengbiaozaiyunyichang:before {
|
||||||
|
content: "\e666";
|
||||||
|
}
|
||||||
|
|
||||||
.icon-zonghepingjia1:before {
|
.icon-zonghepingjia1:before {
|
||||||
content: "\e82f";
|
content: "\e82f";
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -5,6 +5,62 @@
|
|||||||
"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",
|
||||||
|
"name": "停运事件管理",
|
||||||
|
"font_class": "tingyunshijianguanli",
|
||||||
|
"unicode": "e65d",
|
||||||
|
"unicode_decimal": 58973
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "35341056",
|
||||||
|
"name": "在运设备",
|
||||||
|
"font_class": "zaiyunshebei",
|
||||||
|
"unicode": "e604",
|
||||||
|
"unicode_decimal": 58884
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "22630860",
|
||||||
|
"name": "异常类_14非智能表在运异常",
|
||||||
|
"font_class": "yichanglei_14feizhinengbiaozaiyunyichang",
|
||||||
|
"unicode": "e666",
|
||||||
|
"unicode_decimal": 58982
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "32402696",
|
"icon_id": "32402696",
|
||||||
"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 |
@@ -6,7 +6,7 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
<TableHeader :showSearch="false">
|
<TableHeader :showSearch="false">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="日期">
|
<el-form-item label="统计时间">
|
||||||
<DatePicker ref="datePickerRef" :nextFlag="false" :theCurrentTime="true"></DatePicker>
|
<DatePicker ref="datePickerRef" :nextFlag="false" :theCurrentTime="true"></DatePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -18,14 +18,22 @@ 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'
|
||||||
|
import { downloadFile } from '@/api/system-boot/file'
|
||||||
const { push, options, currentRoute } = useRouter()
|
const { push, options, currentRoute } = useRouter()
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
// const url = 'http://192.168.1.22:9009/excelreport' + currentRoute.value.href?.split('?')[1]
|
// const url = 'http://192.168.1.22:9009/excelreport' + currentRoute.value.href?.split('?')[1]
|
||||||
|
const url = ref('')
|
||||||
|
const excelOptions = ref({})
|
||||||
|
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
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
//下载
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
const url = '/api-docx/excelreport' + currentRoute.value?.href?.split('?')[1]
|
|
||||||
console.log("🚀 ~ url:", url)
|
|
||||||
const excelOptions = ref({
|
|
||||||
xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
|
|
||||||
})
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
console.log()
|
console.log()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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%);
|
||||||
|
|||||||
@@ -1,491 +1,491 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="panel-tab__content">
|
<div class="panel-tab__content">
|
||||||
<el-table :data="elementListenersList" size="small" border>
|
<el-table :data="elementListenersList" size="small" border>
|
||||||
<el-table-column label="序号" width="80px" type="index" />
|
<el-table-column label="序号" width="80px" type="index" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="事件类型"
|
label="事件类型"
|
||||||
min-width="80px"
|
min-width="80px"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
:formatter="(row) => listenerEventTypeObject[row.event]"
|
:formatter="(row) => listenerEventTypeObject[row.event]"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="事件id" min-width="80px" prop="id" show-overflow-tooltip />
|
<el-table-column label="事件id" min-width="80px" prop="id" show-overflow-tooltip />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="监听器类型"
|
label="监听器类型"
|
||||||
min-width="80px"
|
min-width="80px"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
:formatter="(row) => listenerTypeObject[row.listenerType]"
|
:formatter="(row) => listenerTypeObject[row.listenerType]"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="操作" width="90px">
|
<el-table-column label="操作" width="90px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" link @click="openListenerForm(scope.row, scope.$index)"
|
<el-button size="small" link @click="openListenerForm(scope.row, scope.$index)"
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
<el-divider direction="vertical" />
|
<el-divider direction="vertical" />
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
style="color: #ff4d4f"
|
style="color: #ff4d4f"
|
||||||
@click="removeListener(scope.row, scope.$index)"
|
@click="removeListener(scope.row, scope.$index)"
|
||||||
>移除</el-button
|
>移除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="element-drawer__button">
|
<div class="element-drawer__button">
|
||||||
<XButton
|
<XButton
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
preIcon="ep:plus"
|
preIcon="ep:plus"
|
||||||
title="添加监听器"
|
title="添加监听器"
|
||||||
@click="openListenerForm(null)"
|
@click="openListenerForm(null)"
|
||||||
/>
|
/>
|
||||||
<XButton
|
<XButton
|
||||||
type="success"
|
type="success"
|
||||||
preIcon="ep:select"
|
preIcon="ep:select"
|
||||||
title="选择监听器"
|
title="选择监听器"
|
||||||
size="small"
|
size="small"
|
||||||
@click="openProcessListenerDialog"
|
@click="openProcessListenerDialog"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 监听器 编辑/创建 部分 -->
|
<!-- 监听器 编辑/创建 部分 -->
|
||||||
<el-drawer
|
<el-drawer
|
||||||
v-model="listenerFormModelVisible"
|
v-model="listenerFormModelVisible"
|
||||||
title="任务监听器"
|
title="任务监听器"
|
||||||
:size="`${width}px`"
|
:size="`${width}px`"
|
||||||
append-to-body
|
append-to-body
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
>
|
>
|
||||||
<el-form size="small" :model="listenerForm" label-width="96px" ref="listenerFormRef">
|
<el-form size="small" :model="listenerForm" label-width="96px" ref="listenerFormRef">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="事件类型"
|
label="事件类型"
|
||||||
prop="event"
|
prop="event"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
||||||
>
|
>
|
||||||
<el-select v-model="listenerForm.event">
|
<el-select v-model="listenerForm.event">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="i in Object.keys(listenerEventTypeObject)"
|
v-for="i in Object.keys(listenerEventTypeObject)"
|
||||||
:key="i"
|
:key="i"
|
||||||
:label="listenerEventTypeObject[i]"
|
:label="listenerEventTypeObject[i]"
|
||||||
:value="i"
|
:value="i"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="监听器ID"
|
label="监听器ID"
|
||||||
prop="id"
|
prop="id"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
||||||
>
|
>
|
||||||
<el-input v-model="listenerForm.id" clearable />
|
<el-input v-model="listenerForm.id" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="监听器类型"
|
label="监听器类型"
|
||||||
prop="listenerType"
|
prop="listenerType"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
||||||
>
|
>
|
||||||
<el-select v-model="listenerForm.listenerType">
|
<el-select v-model="listenerForm.listenerType">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="i in Object.keys(listenerTypeObject)"
|
v-for="i in Object.keys(listenerTypeObject)"
|
||||||
:key="i"
|
:key="i"
|
||||||
:label="listenerTypeObject[i]"
|
:label="listenerTypeObject[i]"
|
||||||
:value="i"
|
:value="i"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="listenerForm.listenerType === 'classListener'"
|
v-if="listenerForm.listenerType === 'classListener'"
|
||||||
label="Java类"
|
label="Java类"
|
||||||
prop="class"
|
prop="class"
|
||||||
key="listener-class"
|
key="listener-class"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
||||||
>
|
>
|
||||||
<el-input v-model="listenerForm.class" clearable />
|
<el-input v-model="listenerForm.class" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="listenerForm.listenerType === 'expressionListener'"
|
v-if="listenerForm.listenerType === 'expressionListener'"
|
||||||
label="表达式"
|
label="表达式"
|
||||||
prop="expression"
|
prop="expression"
|
||||||
key="listener-expression"
|
key="listener-expression"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
||||||
>
|
>
|
||||||
<el-input v-model="listenerForm.expression" clearable />
|
<el-input v-model="listenerForm.expression" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="listenerForm.listenerType === 'delegateExpressionListener'"
|
v-if="listenerForm.listenerType === 'delegateExpressionListener'"
|
||||||
label="代理表达式"
|
label="代理表达式"
|
||||||
prop="delegateExpression"
|
prop="delegateExpression"
|
||||||
key="listener-delegate"
|
key="listener-delegate"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
||||||
>
|
>
|
||||||
<el-input v-model="listenerForm.delegateExpression" clearable />
|
<el-input v-model="listenerForm.delegateExpression" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<template v-if="listenerForm.listenerType === 'scriptListener'">
|
<template v-if="listenerForm.listenerType === 'scriptListener'">
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="脚本格式"
|
label="脚本格式"
|
||||||
prop="scriptFormat"
|
prop="scriptFormat"
|
||||||
key="listener-script-format"
|
key="listener-script-format"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'], message: '请填写脚本格式' }"
|
:rules="{ required: true, trigger: ['blur', 'change'], message: '请填写脚本格式' }"
|
||||||
>
|
>
|
||||||
<el-input v-model="listenerForm.scriptFormat" clearable />
|
<el-input v-model="listenerForm.scriptFormat" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="脚本类型"
|
label="脚本类型"
|
||||||
prop="scriptType"
|
prop="scriptType"
|
||||||
key="listener-script-type"
|
key="listener-script-type"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'], message: '请选择脚本类型' }"
|
:rules="{ required: true, trigger: ['blur', 'change'], message: '请选择脚本类型' }"
|
||||||
>
|
>
|
||||||
<el-select v-model="listenerForm.scriptType">
|
<el-select v-model="listenerForm.scriptType">
|
||||||
<el-option label="内联脚本" value="inlineScript" />
|
<el-option label="内联脚本" value="inlineScript" />
|
||||||
<el-option label="外部脚本" value="externalScript" />
|
<el-option label="外部脚本" value="externalScript" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="listenerForm.scriptType === 'inlineScript'"
|
v-if="listenerForm.scriptType === 'inlineScript'"
|
||||||
label="脚本内容"
|
label="脚本内容"
|
||||||
prop="value"
|
prop="value"
|
||||||
key="listener-script"
|
key="listener-script"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'], message: '请填写脚本内容' }"
|
:rules="{ required: true, trigger: ['blur', 'change'], message: '请填写脚本内容' }"
|
||||||
>
|
>
|
||||||
<el-input v-model="listenerForm.value" clearable />
|
<el-input v-model="listenerForm.value" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="listenerForm.scriptType === 'externalScript'"
|
v-if="listenerForm.scriptType === 'externalScript'"
|
||||||
label="资源地址"
|
label="资源地址"
|
||||||
prop="resource"
|
prop="resource"
|
||||||
key="listener-resource"
|
key="listener-resource"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'], message: '请填写资源地址' }"
|
:rules="{ required: true, trigger: ['blur', 'change'], message: '请填写资源地址' }"
|
||||||
>
|
>
|
||||||
<el-input v-model="listenerForm.resource" clearable />
|
<el-input v-model="listenerForm.resource" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-if="listenerForm.event === 'timeout'">
|
<template v-if="listenerForm.event === 'timeout'">
|
||||||
<el-form-item label="定时器类型" prop="eventDefinitionType" key="eventDefinitionType">
|
<el-form-item label="定时器类型" prop="eventDefinitionType" key="eventDefinitionType">
|
||||||
<el-select v-model="listenerForm.eventDefinitionType">
|
<el-select v-model="listenerForm.eventDefinitionType">
|
||||||
<el-option label="日期" value="date" />
|
<el-option label="统计时间" value="date" />
|
||||||
<el-option label="持续时长" value="duration" />
|
<el-option label="持续时长" value="duration" />
|
||||||
<el-option label="循环" value="cycle" />
|
<el-option label="循环" value="cycle" />
|
||||||
<el-option label="无" value="null" />
|
<el-option label="无" value="null" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="!!listenerForm.eventDefinitionType && listenerForm.eventDefinitionType !== 'null'"
|
v-if="!!listenerForm.eventDefinitionType && listenerForm.eventDefinitionType !== 'null'"
|
||||||
label="定时器"
|
label="定时器"
|
||||||
prop="eventTimeDefinitions"
|
prop="eventTimeDefinitions"
|
||||||
key="eventTimeDefinitions"
|
key="eventTimeDefinitions"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'], message: '请填写定时器配置' }"
|
:rules="{ required: true, trigger: ['blur', 'change'], message: '请填写定时器配置' }"
|
||||||
>
|
>
|
||||||
<el-input v-model="listenerForm.eventTimeDefinitions" clearable />
|
<el-input v-model="listenerForm.eventTimeDefinitions" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-divider />
|
<el-divider />
|
||||||
<p class="listener-filed__title">
|
<p class="listener-filed__title">
|
||||||
<span><Icon icon="ep:menu" />注入字段:</span>
|
<span><Icon icon="ep:menu" />注入字段:</span>
|
||||||
<el-button size="small" type="primary" @click="openListenerFieldForm(null)"
|
<el-button size="small" type="primary" @click="openListenerFieldForm(null)"
|
||||||
>添加字段</el-button
|
>添加字段</el-button
|
||||||
>
|
>
|
||||||
</p>
|
</p>
|
||||||
<el-table
|
<el-table
|
||||||
:data="fieldsListOfListener"
|
:data="fieldsListOfListener"
|
||||||
size="small"
|
size="small"
|
||||||
max-height="240"
|
max-height="240"
|
||||||
fit
|
fit
|
||||||
border
|
border
|
||||||
style="flex: none"
|
style="flex: none"
|
||||||
>
|
>
|
||||||
<el-table-column label="序号" width="80px" type="index" />
|
<el-table-column label="序号" width="80px" type="index" />
|
||||||
<el-table-column label="字段名称" min-width="100px" prop="name" />
|
<el-table-column label="字段名称" min-width="100px" prop="name" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="字段类型"
|
label="字段类型"
|
||||||
min-width="80px"
|
min-width="80px"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
:formatter="(row) => fieldTypeObject[row.fieldType]"
|
:formatter="(row) => fieldTypeObject[row.fieldType]"
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="字段值/表达式"
|
label="字段值/表达式"
|
||||||
min-width="100px"
|
min-width="100px"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
:formatter="(row) => row.string || row.expression"
|
:formatter="(row) => row.string || row.expression"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="操作" width="100px">
|
<el-table-column label="操作" width="100px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" link @click="openListenerFieldForm(scope.row, scope.$index)"
|
<el-button size="small" link @click="openListenerFieldForm(scope.row, scope.$index)"
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
<el-divider direction="vertical" />
|
<el-divider direction="vertical" />
|
||||||
<el-button
|
<el-button
|
||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
style="color: #ff4d4f"
|
style="color: #ff4d4f"
|
||||||
@click="removeListenerField(scope.row, scope.$index)"
|
@click="removeListenerField(scope.row, scope.$index)"
|
||||||
>移除</el-button
|
>移除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<div class="element-drawer__button">
|
<div class="element-drawer__button">
|
||||||
<el-button size="small" @click="listenerFormModelVisible = false">取 消</el-button>
|
<el-button size="small" @click="listenerFormModelVisible = false">取 消</el-button>
|
||||||
<el-button size="small" type="primary" @click="saveListenerConfig">保 存</el-button>
|
<el-button size="small" type="primary" @click="saveListenerConfig">保 存</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
<!-- 注入西段 编辑/创建 部分 -->
|
<!-- 注入西段 编辑/创建 部分 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
title="字段配置"
|
title="字段配置"
|
||||||
v-model="listenerFieldFormModelVisible"
|
v-model="listenerFieldFormModelVisible"
|
||||||
width="600px"
|
width="600px"
|
||||||
append-to-body
|
append-to-body
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form
|
||||||
:model="listenerFieldForm"
|
:model="listenerFieldForm"
|
||||||
size="small"
|
size="small"
|
||||||
label-width="96px"
|
label-width="96px"
|
||||||
ref="listenerFieldFormRef"
|
ref="listenerFieldFormRef"
|
||||||
style="height: 136px"
|
style="height: 136px"
|
||||||
>
|
>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="字段名称:"
|
label="字段名称:"
|
||||||
prop="name"
|
prop="name"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
||||||
>
|
>
|
||||||
<el-input v-model="listenerFieldForm.name" clearable />
|
<el-input v-model="listenerFieldForm.name" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="字段类型:"
|
label="字段类型:"
|
||||||
prop="fieldType"
|
prop="fieldType"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
||||||
>
|
>
|
||||||
<el-select v-model="listenerFieldForm.fieldType">
|
<el-select v-model="listenerFieldForm.fieldType">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="i in Object.keys(fieldTypeObject)"
|
v-for="i in Object.keys(fieldTypeObject)"
|
||||||
:key="i"
|
:key="i"
|
||||||
:label="fieldTypeObject[i]"
|
:label="fieldTypeObject[i]"
|
||||||
:value="i"
|
:value="i"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="listenerFieldForm.fieldType === 'string'"
|
v-if="listenerFieldForm.fieldType === 'string'"
|
||||||
label="字段值:"
|
label="字段值:"
|
||||||
prop="string"
|
prop="string"
|
||||||
key="field-string"
|
key="field-string"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
||||||
>
|
>
|
||||||
<el-input v-model="listenerFieldForm.string" clearable />
|
<el-input v-model="listenerFieldForm.string" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
v-if="listenerFieldForm.fieldType === 'expression'"
|
v-if="listenerFieldForm.fieldType === 'expression'"
|
||||||
label="表达式:"
|
label="表达式:"
|
||||||
prop="expression"
|
prop="expression"
|
||||||
key="field-expression"
|
key="field-expression"
|
||||||
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
:rules="{ required: true, trigger: ['blur', 'change'] }"
|
||||||
>
|
>
|
||||||
<el-input v-model="listenerFieldForm.expression" clearable />
|
<el-input v-model="listenerFieldForm.expression" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button size="small" @click="listenerFieldFormModelVisible = false">取 消</el-button>
|
<el-button size="small" @click="listenerFieldFormModelVisible = false">取 消</el-button>
|
||||||
<el-button size="small" type="primary" @click="saveListenerFiled">确 定</el-button>
|
<el-button size="small" type="primary" @click="saveListenerFiled">确 定</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 选择弹窗 -->
|
<!-- 选择弹窗 -->
|
||||||
<ProcessListenerDialog ref="processListenerDialogRef" @select="selectProcessListener" />
|
<ProcessListenerDialog ref="processListenerDialogRef" @select="selectProcessListener" />
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ElMessageBox } from 'element-plus'
|
import { ElMessageBox } from 'element-plus'
|
||||||
import { createListenerObject, updateElementExtensions } from '../../utils'
|
import { createListenerObject, updateElementExtensions } from '../../utils'
|
||||||
import {
|
import {
|
||||||
initListenerForm,
|
initListenerForm,
|
||||||
initListenerType,
|
initListenerType,
|
||||||
eventType,
|
eventType,
|
||||||
listenerType,
|
listenerType,
|
||||||
fieldType,
|
fieldType,
|
||||||
initListenerForm2
|
initListenerForm2
|
||||||
} from './utilSelf'
|
} from './utilSelf'
|
||||||
import ProcessListenerDialog from '@/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue'
|
import ProcessListenerDialog from '@/components/bpmnProcessDesigner/package/penal/listeners/ProcessListenerDialog.vue'
|
||||||
|
|
||||||
defineOptions({ name: 'UserTaskListeners' })
|
defineOptions({ name: 'UserTaskListeners' })
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: String,
|
id: String,
|
||||||
type: String
|
type: String
|
||||||
})
|
})
|
||||||
const prefix = inject('prefix')
|
const prefix = inject('prefix')
|
||||||
const width = inject('width')
|
const width = inject('width')
|
||||||
const elementListenersList = ref<any[]>([])
|
const elementListenersList = ref<any[]>([])
|
||||||
const listenerEventTypeObject = ref(eventType)
|
const listenerEventTypeObject = ref(eventType)
|
||||||
const listenerTypeObject = ref(listenerType)
|
const listenerTypeObject = ref(listenerType)
|
||||||
const listenerFormModelVisible = ref(false)
|
const listenerFormModelVisible = ref(false)
|
||||||
const listenerForm = ref<any>({})
|
const listenerForm = ref<any>({})
|
||||||
const fieldTypeObject = ref(fieldType)
|
const fieldTypeObject = ref(fieldType)
|
||||||
const fieldsListOfListener = ref<any[]>([])
|
const fieldsListOfListener = ref<any[]>([])
|
||||||
const listenerFieldFormModelVisible = ref(false) // 监听器 注入字段表单弹窗 显示状态
|
const listenerFieldFormModelVisible = ref(false) // 监听器 注入字段表单弹窗 显示状态
|
||||||
const editingListenerIndex = ref(-1) // 监听器所在下标,-1 为新增
|
const editingListenerIndex = ref(-1) // 监听器所在下标,-1 为新增
|
||||||
const editingListenerFieldIndex = ref(-1) // 字段所在下标,-1 为新增
|
const editingListenerFieldIndex = ref(-1) // 字段所在下标,-1 为新增
|
||||||
const listenerFieldForm = ref<any>({}) // 监听器 注入字段 详情表单
|
const listenerFieldForm = ref<any>({}) // 监听器 注入字段 详情表单
|
||||||
const bpmnElement = ref()
|
const bpmnElement = ref()
|
||||||
const bpmnElementListeners = ref()
|
const bpmnElementListeners = ref()
|
||||||
const otherExtensionList = ref()
|
const otherExtensionList = ref()
|
||||||
const listenerFormRef = ref()
|
const listenerFormRef = ref()
|
||||||
const listenerFieldFormRef = ref()
|
const listenerFieldFormRef = ref()
|
||||||
const bpmnInstances = () => (window as any)?.bpmnInstances
|
const bpmnInstances = () => (window as any)?.bpmnInstances
|
||||||
|
|
||||||
const resetListenersList = () => {
|
const resetListenersList = () => {
|
||||||
// console.log(
|
// console.log(
|
||||||
// bpmnInstances().bpmnElement,
|
// bpmnInstances().bpmnElement,
|
||||||
// 'window.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElement'
|
// 'window.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElementwindow.bpmnInstances.bpmnElement'
|
||||||
// )
|
// )
|
||||||
bpmnElement.value = bpmnInstances().bpmnElement
|
bpmnElement.value = bpmnInstances().bpmnElement
|
||||||
otherExtensionList.value = []
|
otherExtensionList.value = []
|
||||||
bpmnElementListeners.value =
|
bpmnElementListeners.value =
|
||||||
bpmnElement.value.businessObject?.extensionElements?.values.filter(
|
bpmnElement.value.businessObject?.extensionElements?.values.filter(
|
||||||
(ex) => ex.$type === `${prefix}:TaskListener`
|
(ex) => ex.$type === `${prefix}:TaskListener`
|
||||||
) ?? []
|
) ?? []
|
||||||
elementListenersList.value = bpmnElementListeners.value.map((listener) =>
|
elementListenersList.value = bpmnElementListeners.value.map((listener) =>
|
||||||
initListenerType(listener)
|
initListenerType(listener)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
const openListenerForm = (listener, index?) => {
|
const openListenerForm = (listener, index?) => {
|
||||||
if (listener) {
|
if (listener) {
|
||||||
listenerForm.value = initListenerForm(listener)
|
listenerForm.value = initListenerForm(listener)
|
||||||
editingListenerIndex.value = index
|
editingListenerIndex.value = index
|
||||||
} else {
|
} else {
|
||||||
listenerForm.value = {}
|
listenerForm.value = {}
|
||||||
editingListenerIndex.value = -1 // 标记为新增
|
editingListenerIndex.value = -1 // 标记为新增
|
||||||
}
|
}
|
||||||
if (listener && listener.fields) {
|
if (listener && listener.fields) {
|
||||||
fieldsListOfListener.value = listener.fields.map((field) => ({
|
fieldsListOfListener.value = listener.fields.map((field) => ({
|
||||||
...field,
|
...field,
|
||||||
fieldType: field.string ? 'string' : 'expression'
|
fieldType: field.string ? 'string' : 'expression'
|
||||||
}))
|
}))
|
||||||
} else {
|
} else {
|
||||||
fieldsListOfListener.value = []
|
fieldsListOfListener.value = []
|
||||||
listenerForm.value['fields'] = []
|
listenerForm.value['fields'] = []
|
||||||
}
|
}
|
||||||
// 打开侧边栏并清楚验证状态
|
// 打开侧边栏并清楚验证状态
|
||||||
listenerFormModelVisible.value = true
|
listenerFormModelVisible.value = true
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (listenerFormRef.value) listenerFormRef.value.clearValidate()
|
if (listenerFormRef.value) listenerFormRef.value.clearValidate()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 移除监听器
|
// 移除监听器
|
||||||
const removeListener = (listener, index?) => {
|
const removeListener = (listener, index?) => {
|
||||||
console.log(listener, 'listener')
|
console.log(listener, 'listener')
|
||||||
ElMessageBox.confirm('确认移除该监听器吗?', '提示', {
|
ElMessageBox.confirm('确认移除该监听器吗?', '提示', {
|
||||||
confirmButtonText: '确 认',
|
confirmButtonText: '确 认',
|
||||||
cancelButtonText: '取 消'
|
cancelButtonText: '取 消'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
bpmnElementListeners.value.splice(index, 1)
|
bpmnElementListeners.value.splice(index, 1)
|
||||||
elementListenersList.value.splice(index, 1)
|
elementListenersList.value.splice(index, 1)
|
||||||
updateElementExtensions(
|
updateElementExtensions(
|
||||||
bpmnElement.value,
|
bpmnElement.value,
|
||||||
otherExtensionList.value.concat(bpmnElementListeners.value)
|
otherExtensionList.value.concat(bpmnElementListeners.value)
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.catch(() => console.info('操作取消'))
|
.catch(() => console.info('操作取消'))
|
||||||
}
|
}
|
||||||
// 保存监听器
|
// 保存监听器
|
||||||
const saveListenerConfig = async () => {
|
const saveListenerConfig = async () => {
|
||||||
let validateStatus = await listenerFormRef.value.validate()
|
let validateStatus = await listenerFormRef.value.validate()
|
||||||
if (!validateStatus) return // 验证不通过直接返回
|
if (!validateStatus) return // 验证不通过直接返回
|
||||||
const listenerObject = createListenerObject(listenerForm.value, true, prefix)
|
const listenerObject = createListenerObject(listenerForm.value, true, prefix)
|
||||||
if (editingListenerIndex.value === -1) {
|
if (editingListenerIndex.value === -1) {
|
||||||
bpmnElementListeners.value.push(listenerObject)
|
bpmnElementListeners.value.push(listenerObject)
|
||||||
elementListenersList.value.push(listenerForm.value)
|
elementListenersList.value.push(listenerForm.value)
|
||||||
} else {
|
} else {
|
||||||
bpmnElementListeners.value.splice(editingListenerIndex.value, 1, listenerObject)
|
bpmnElementListeners.value.splice(editingListenerIndex.value, 1, listenerObject)
|
||||||
elementListenersList.value.splice(editingListenerIndex.value, 1, listenerForm.value)
|
elementListenersList.value.splice(editingListenerIndex.value, 1, listenerForm.value)
|
||||||
}
|
}
|
||||||
// 保存其他配置
|
// 保存其他配置
|
||||||
otherExtensionList.value =
|
otherExtensionList.value =
|
||||||
bpmnElement.value.businessObject?.extensionElements?.values?.filter(
|
bpmnElement.value.businessObject?.extensionElements?.values?.filter(
|
||||||
(ex) => ex.$type !== `${prefix}:TaskListener`
|
(ex) => ex.$type !== `${prefix}:TaskListener`
|
||||||
) ?? []
|
) ?? []
|
||||||
updateElementExtensions(
|
updateElementExtensions(
|
||||||
bpmnElement.value,
|
bpmnElement.value,
|
||||||
otherExtensionList.value.concat(bpmnElementListeners.value)
|
otherExtensionList.value.concat(bpmnElementListeners.value)
|
||||||
)
|
)
|
||||||
// 4. 隐藏侧边栏
|
// 4. 隐藏侧边栏
|
||||||
listenerFormModelVisible.value = false
|
listenerFormModelVisible.value = false
|
||||||
listenerForm.value = {}
|
listenerForm.value = {}
|
||||||
}
|
}
|
||||||
// 打开监听器字段编辑弹窗
|
// 打开监听器字段编辑弹窗
|
||||||
const openListenerFieldForm = (field, index?) => {
|
const openListenerFieldForm = (field, index?) => {
|
||||||
listenerFieldForm.value = field ? JSON.parse(JSON.stringify(field)) : {}
|
listenerFieldForm.value = field ? JSON.parse(JSON.stringify(field)) : {}
|
||||||
editingListenerFieldIndex.value = field ? index : -1
|
editingListenerFieldIndex.value = field ? index : -1
|
||||||
listenerFieldFormModelVisible.value = true
|
listenerFieldFormModelVisible.value = true
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
if (listenerFieldFormRef.value) listenerFieldFormRef.value.clearValidate()
|
if (listenerFieldFormRef.value) listenerFieldFormRef.value.clearValidate()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 保存监听器注入字段
|
// 保存监听器注入字段
|
||||||
const saveListenerFiled = async () => {
|
const saveListenerFiled = async () => {
|
||||||
let validateStatus = await listenerFieldFormRef.value.validate()
|
let validateStatus = await listenerFieldFormRef.value.validate()
|
||||||
if (!validateStatus) return // 验证不通过直接返回
|
if (!validateStatus) return // 验证不通过直接返回
|
||||||
if (editingListenerFieldIndex.value === -1) {
|
if (editingListenerFieldIndex.value === -1) {
|
||||||
fieldsListOfListener.value.push(listenerFieldForm.value)
|
fieldsListOfListener.value.push(listenerFieldForm.value)
|
||||||
listenerForm.value.fields.push(listenerFieldForm.value)
|
listenerForm.value.fields.push(listenerFieldForm.value)
|
||||||
} else {
|
} else {
|
||||||
fieldsListOfListener.value.splice(editingListenerFieldIndex.value, 1, listenerFieldForm.value)
|
fieldsListOfListener.value.splice(editingListenerFieldIndex.value, 1, listenerFieldForm.value)
|
||||||
listenerForm.value.fields.splice(editingListenerFieldIndex.value, 1, listenerFieldForm.value)
|
listenerForm.value.fields.splice(editingListenerFieldIndex.value, 1, listenerFieldForm.value)
|
||||||
}
|
}
|
||||||
listenerFieldFormModelVisible.value = false
|
listenerFieldFormModelVisible.value = false
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
listenerFieldForm.value = {}
|
listenerFieldForm.value = {}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 移除监听器字段
|
// 移除监听器字段
|
||||||
const removeListenerField = (field, index) => {
|
const removeListenerField = (field, index) => {
|
||||||
console.log(field, 'field')
|
console.log(field, 'field')
|
||||||
ElMessageBox.confirm('确认移除该字段吗?', '提示', {
|
ElMessageBox.confirm('确认移除该字段吗?', '提示', {
|
||||||
confirmButtonText: '确 认',
|
confirmButtonText: '确 认',
|
||||||
cancelButtonText: '取 消'
|
cancelButtonText: '取 消'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
fieldsListOfListener.value.splice(index, 1)
|
fieldsListOfListener.value.splice(index, 1)
|
||||||
listenerForm.value.fields.splice(index, 1)
|
listenerForm.value.fields.splice(index, 1)
|
||||||
})
|
})
|
||||||
.catch(() => console.info('操作取消'))
|
.catch(() => console.info('操作取消'))
|
||||||
}
|
}
|
||||||
|
|
||||||
// 打开监听器弹窗
|
// 打开监听器弹窗
|
||||||
const processListenerDialogRef = ref()
|
const processListenerDialogRef = ref()
|
||||||
const openProcessListenerDialog = async () => {
|
const openProcessListenerDialog = async () => {
|
||||||
processListenerDialogRef.value.open('task')
|
processListenerDialogRef.value.open('task')
|
||||||
}
|
}
|
||||||
const selectProcessListener = (listener) => {
|
const selectProcessListener = (listener) => {
|
||||||
const listenerForm = initListenerForm2(listener)
|
const listenerForm = initListenerForm2(listener)
|
||||||
const listenerObject = createListenerObject(listenerForm, true, prefix)
|
const listenerObject = createListenerObject(listenerForm, true, prefix)
|
||||||
bpmnElementListeners.value.push(listenerObject)
|
bpmnElementListeners.value.push(listenerObject)
|
||||||
elementListenersList.value.push(listenerForm)
|
elementListenersList.value.push(listenerForm)
|
||||||
|
|
||||||
// 保存其他配置
|
// 保存其他配置
|
||||||
otherExtensionList.value =
|
otherExtensionList.value =
|
||||||
bpmnElement.value.businessObject?.extensionElements?.values?.filter(
|
bpmnElement.value.businessObject?.extensionElements?.values?.filter(
|
||||||
(ex) => ex.$type !== `${prefix}:TaskListener`
|
(ex) => ex.$type !== `${prefix}:TaskListener`
|
||||||
) ?? []
|
) ?? []
|
||||||
updateElementExtensions(
|
updateElementExtensions(
|
||||||
bpmnElement.value,
|
bpmnElement.value,
|
||||||
otherExtensionList.value.concat(bpmnElementListeners.value)
|
otherExtensionList.value.concat(bpmnElementListeners.value)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.id,
|
() => props.id,
|
||||||
(val) => {
|
(val) => {
|
||||||
val &&
|
val &&
|
||||||
val.length &&
|
val.length &&
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
resetListenersList()
|
resetListenersList()
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -204,6 +204,7 @@ const tableStore: any = new TableStore({
|
|||||||
tableStore.table.params.deptId = dictData.state.area[0].id
|
tableStore.table.params.deptId = dictData.state.area[0].id
|
||||||
tableStore.table.params.alarmDayLimit = 5
|
tableStore.table.params.alarmDayLimit = 5
|
||||||
tableStore.table.params.warnDayLimit = 1
|
tableStore.table.params.warnDayLimit = 1
|
||||||
|
tableStore.table.params.lineRunFlag = 0
|
||||||
const echart = () => {
|
const echart = () => {
|
||||||
percentage.value = {
|
percentage.value = {
|
||||||
color: ['#FF9100'],
|
color: ['#FF9100'],
|
||||||
@@ -364,6 +365,7 @@ watch(
|
|||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@import '@/assets/font/iconfont.css';
|
||||||
.monitoringPoints {
|
.monitoringPoints {
|
||||||
display: flex;
|
display: flex;
|
||||||
.statistics {
|
.statistics {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<div class="divBox mt10">
|
<div class="divBox mt10">
|
||||||
<span class="iconfont icon-igw-f-warning-data" style="color: #ff6600"></span>
|
<span class="iconfont icon-igw-f-warning-data" style="color: #ff6600"></span>
|
||||||
<span class="divBox_title">低于90%监测点数</span>
|
<span class="divBox_title">低于90%监测点数</span>
|
||||||
<span class="divBox_num" style="color: #ff6600">
|
<span class="divBox_num" style="color: #57bc6e">
|
||||||
{{ monitoringPoints.abnormalNum }}
|
{{ monitoringPoints.abnormalNum }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
{{ o.citTotalNum }}
|
{{ o.citTotalNum }}
|
||||||
</span>
|
</span>
|
||||||
<!-- 低于90%监测点数 -->
|
<!-- 低于90%监测点数 -->
|
||||||
<span style="flex: 1; color: #ff9100" class="text">
|
<span style="flex: 1; color: #388e3c" class="text">
|
||||||
{{ o.citBelowNum }}
|
{{ o.citBelowNum }}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
@@ -179,10 +179,17 @@ const tableStore: any = new TableStore({
|
|||||||
monitoringPoints.value.runNum = tableStore.table.data.totalNum
|
monitoringPoints.value.runNum = tableStore.table.data.totalNum
|
||||||
monitoringPoints.value.abnormalNum = tableStore.table.data.belowNum
|
monitoringPoints.value.abnormalNum = tableStore.table.data.belowNum
|
||||||
monitoringPoints.value.totalOnlineRate = tableStore.table.data.totalOnlineRate - 0
|
monitoringPoints.value.totalOnlineRate = tableStore.table.data.totalOnlineRate - 0
|
||||||
abnormal.value = tableStore.table.data.citDetailList
|
abnormal.value = tableStore.table.data.citDetailList.filter((k: any) => {
|
||||||
|
if (tableStore.table.params.statisticalType.name == '终端厂家') {
|
||||||
|
return k.citTotalNum != 0
|
||||||
|
} else {
|
||||||
|
return k.citName != '上送国网' && k.citName != '非上送国网'
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
||||||
|
tableStore.table.params.lineRunFlag = 0
|
||||||
const echart = () => {
|
const echart = () => {
|
||||||
percentage.value = {
|
percentage.value = {
|
||||||
color: ['#FF9100'],
|
color: ['#FF9100'],
|
||||||
@@ -340,6 +347,7 @@ watch(
|
|||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@import '@/assets/font/iconfont.css';
|
||||||
.monitoringPoints {
|
.monitoringPoints {
|
||||||
display: flex;
|
display: flex;
|
||||||
.statistics {
|
.statistics {
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<div class="divBox mt10">
|
<div class="divBox mt10">
|
||||||
<span class="iconfont icon-igw-f-warning-data" style="color: #ff6600"></span>
|
<span class="iconfont icon-igw-f-warning-data" style="color: #ff6600"></span>
|
||||||
<span class="divBox_title">低于90%终端数</span>
|
<span class="divBox_title">低于90%终端数</span>
|
||||||
<span class="divBox_num" style="color: #ff6600">
|
<span class="divBox_num" style="color: #57bc6e">
|
||||||
{{ monitoringPoints.abnormalNum }}
|
{{ monitoringPoints.abnormalNum }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
{{ o.citTotalNum }}
|
{{ o.citTotalNum }}
|
||||||
</span>
|
</span>
|
||||||
<!-- 低于90%终端数 -->
|
<!-- 低于90%终端数 -->
|
||||||
<span style="flex: 1; color: #ff9100" class="text">
|
<span style="flex: 1; color: #388e3c" class="text">
|
||||||
{{ o.citBelowNum }}
|
{{ o.citBelowNum }}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
@@ -177,10 +177,18 @@ const tableStore: any = new TableStore({
|
|||||||
monitoringPoints.value.runNum = tableStore.table.data.totalNum
|
monitoringPoints.value.runNum = tableStore.table.data.totalNum
|
||||||
monitoringPoints.value.abnormalNum = tableStore.table.data.belowNum
|
monitoringPoints.value.abnormalNum = tableStore.table.data.belowNum
|
||||||
monitoringPoints.value.totalOnlineRate = tableStore.table.data.totalOnlineRate - 0
|
monitoringPoints.value.totalOnlineRate = tableStore.table.data.totalOnlineRate - 0
|
||||||
abnormal.value = tableStore.table.data.citDetailList
|
abnormal.value = tableStore.table.data.citDetailList.filter((k: any) => {
|
||||||
|
if (tableStore.table.params.statisticalType.name == '终端厂家') {
|
||||||
|
return k.citTotalNum != 0
|
||||||
|
} else {
|
||||||
|
return k.citName != '上送国网' && k.citName != '非上送国网'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
||||||
|
tableStore.table.params.lineRunFlag = 0
|
||||||
const echart = () => {
|
const echart = () => {
|
||||||
percentage.value = {
|
percentage.value = {
|
||||||
color: ['#FF9100'],
|
color: ['#FF9100'],
|
||||||
@@ -338,6 +346,7 @@ watch(
|
|||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@import '@/assets/font/iconfont.css';
|
||||||
.monitoringPoints {
|
.monitoringPoints {
|
||||||
display: flex;
|
display: flex;
|
||||||
.statistics {
|
.statistics {
|
||||||
|
|||||||
@@ -18,29 +18,53 @@
|
|||||||
>
|
>
|
||||||
<div style="flex: 1">
|
<div style="flex: 1">
|
||||||
<div class="title">终端统计</div>
|
<div class="title">终端统计</div>
|
||||||
<div style="height: 135px" class="box1">
|
<div
|
||||||
<div class="boxDiv hexagon">
|
class="box1"
|
||||||
<div style="color: #fff">{{ statisticsList.allNum }}</div>
|
:style="{
|
||||||
<div class="mt10 divBot">总数</div>
|
height: `calc(${prop.height} - ${headerHeight}px + ${fullscreen ? 0 : 56}px - 30px )`,
|
||||||
|
overflow: 'auto'
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<div class="statistics">
|
||||||
|
<div class="divBox div1">
|
||||||
|
<span class="iconfont icon-qiyezongshu" style="color: #57bc6e"></span>
|
||||||
|
<span class="divBox_title">终端总数</span>
|
||||||
|
<span class="divBox_num text-style" style="color: #57bc6e">
|
||||||
|
{{ statisticsList.allNum }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="divBox div2">
|
||||||
|
<span class="iconfont icon-zaiyunshebei" style="color: #67c23a"></span>
|
||||||
|
<span class="divBox_title">在运终端数</span>
|
||||||
|
<span class="divBox_num text-style" style="color: #67c23a">
|
||||||
|
{{ statisticsList.runNum }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="boxDiv hexagon hexagon1">
|
|
||||||
<div style="color: #fff">{{ statisticsList.runNum }}</div>
|
<div class="statistics">
|
||||||
<div class="mt10 divBot">在运</div>
|
<div class="divBox div3">
|
||||||
</div>
|
<span
|
||||||
</div>
|
class="iconfont icon-yichanglei_14feizhinengbiaozaiyunyichang"
|
||||||
<div style="height: 135px" class="box1">
|
style="color: #ffbf00"
|
||||||
<div class="boxDiv hexagon hexagon2">
|
></span>
|
||||||
<div style="color: #fff">{{ statisticsList.checkNum }}</div>
|
<span class="divBox_title">调试终端数</span>
|
||||||
<div class="mt10 divBot">调试</div>
|
<span class="divBox_num text-style" style="color: #ffbf00">
|
||||||
</div>
|
{{ statisticsList.checkNum }}
|
||||||
<div class="boxDiv hexagon hexagon3">
|
</span>
|
||||||
<div style="color: #fff">{{ statisticsList.stopRunNum }}</div>
|
</div>
|
||||||
<div class="mt10 divBot">停运</div>
|
<div class="divBox div4">
|
||||||
|
<span class="iconfont icon-tingyunshijianguanli" style="color: #f56c6c"></span>
|
||||||
|
<span class="divBox_title">停运终端数</span>
|
||||||
|
<span class="divBox_num text-style" style="color: #f56c6c">
|
||||||
|
{{ statisticsList.stopRunNum }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</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
|
||||||
@@ -65,7 +89,7 @@
|
|||||||
<span style="width: 90px">终端总数</span>
|
<span style="width: 90px">终端总数</span>
|
||||||
<span style="flex: 1">完整性(%)</span>
|
<span style="flex: 1">完整性(%)</span>
|
||||||
<span style="flex: 1">在线率(%)</span>
|
<span style="flex: 1">在线率(%)</span>
|
||||||
<span style="flex: 1">合格率(%)</span>
|
<span style="flex: 1">异常率(%)</span>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:style="{
|
:style="{
|
||||||
@@ -84,7 +108,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<sp
|
<sp
|
||||||
style="flex: 1; color: #ff9100"
|
style="flex: 1; color: #388e3c"
|
||||||
class="text"
|
class="text"
|
||||||
:class="` ${o.integrity < 90 ? 'text-red' : ''}`"
|
:class="` ${o.integrity < 90 ? 'text-red' : ''}`"
|
||||||
>
|
>
|
||||||
@@ -99,7 +123,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
style="flex: 1; color: #388e3c"
|
style="flex: 1; color: #388e3c"
|
||||||
:class="` ${o.qualified < 90 ? 'text-red' : ''}`"
|
:class="` ${o.qualified > 10 ? 'text-red' : ''}`"
|
||||||
class="text"
|
class="text"
|
||||||
>
|
>
|
||||||
{{ o.qualified }}
|
{{ o.qualified }}
|
||||||
@@ -205,11 +229,17 @@ const tableStore: any = new TableStore({
|
|||||||
statisticsList.value.checkNum = totalData.value.filter(item => item.runFlag === '调试').length
|
statisticsList.value.checkNum = totalData.value.filter(item => item.runFlag === '调试').length
|
||||||
statisticsList.value.stopRunNum = totalData.value.filter(item => item.runFlag === '停运').length
|
statisticsList.value.stopRunNum = totalData.value.filter(item => item.runFlag === '停运').length
|
||||||
|
|
||||||
abnormal.value = tableStore.table.data
|
abnormal.value = tableStore.table.data.filter((k: any) => {
|
||||||
|
if (tableStore.table.params.statisticalType.name == '终端厂家') {
|
||||||
|
return k.count != 0
|
||||||
|
} else {
|
||||||
|
return k.name != '上送国网' && k.name != '非上送国网'
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
||||||
|
tableStore.table.params.lineRunFlag = 0
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -234,6 +264,7 @@ watch(
|
|||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@import '@/assets/font/iconfont.css';
|
||||||
.monitoringPoints {
|
.monitoringPoints {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
@@ -344,32 +375,7 @@ watch(
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
.box1 {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-around;
|
|
||||||
.boxDiv {
|
|
||||||
// flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
position: relative;
|
|
||||||
margin: 0 5px;
|
|
||||||
|
|
||||||
div:nth-child(1) {
|
|
||||||
position: absolute;
|
|
||||||
font-size: 30px;
|
|
||||||
top: -10px;
|
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
.divBot {
|
|
||||||
font-size: 16px;
|
|
||||||
position: absolute;
|
|
||||||
top: 20px;
|
|
||||||
}
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.hexagon {
|
.hexagon {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
@@ -427,4 +433,44 @@ watch(
|
|||||||
border-top: 27.5px solid #a52a2a;
|
border-top: 27.5px solid #a52a2a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.statistics {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
.divBox {
|
||||||
|
width: 100%;
|
||||||
|
height: 70px;
|
||||||
|
padding: 10px;
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
.iconfont {
|
||||||
|
font-size: 40px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
.divBox_title {
|
||||||
|
font-weight: 550;
|
||||||
|
}
|
||||||
|
.divBox_num {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 550;
|
||||||
|
margin-left: auto;
|
||||||
|
font-family: AlimamaDongFangDaKai;
|
||||||
|
}
|
||||||
|
align-items: center;
|
||||||
|
// text-align: center;
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
.div1 {
|
||||||
|
background-color: #eef8f0;
|
||||||
|
}
|
||||||
|
.div2 {
|
||||||
|
background-color: #67c23a24;
|
||||||
|
}
|
||||||
|
.div3 {
|
||||||
|
background-color: #ffbf0024;
|
||||||
|
}
|
||||||
|
.div4 {
|
||||||
|
background-color: #f56c6c24;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -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)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
export let color = [
|
export const color = [
|
||||||
'#07CCCA',
|
'#07CCCA',
|
||||||
'#00BFF5',
|
'#00BFF5',
|
||||||
'#FFBF00',
|
'#FFBF00',
|
||||||
'#77DA63',
|
'#77DA63',
|
||||||
'#D5FF6B',
|
'#D5FF6B',
|
||||||
'#Ff6600',
|
'#Ff6600',
|
||||||
'#FF9100',
|
'#FF9100',
|
||||||
'#5B6E96',
|
'#5B6E96',
|
||||||
'#66FFCC',
|
'#66FFCC',
|
||||||
'#B3B'
|
'#B266FF',
|
||||||
]
|
'#FF6680',
|
||||||
export const gradeColor3 = ['#339966', '#FFCC33', '#A52a2a']
|
'#40A0FF',
|
||||||
export const gradeColor5 = ['#00CC00', '#99CC99', '#FF9900', '#996600', '#A52a2a']
|
'#33CC99'
|
||||||
|
]
|
||||||
|
export const gradeColor3 = ['#339966', '#FFCC33', '#A52a2a']
|
||||||
|
export const gradeColor5 = ['#00CC00', '#99CC99', '#FF9900', '#996600', '#A52a2a']
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
>
|
>
|
||||||
<el-form-item v-if="datePicker" style="grid-column: span 2; max-width: 630px">
|
<el-form-item v-if="datePicker" style="grid-column: span 2; max-width: 630px">
|
||||||
<template #label>
|
<template #label>
|
||||||
<el-checkbox v-if="showTimeAll" v-model="timeAll" label="时间" />
|
<el-checkbox v-if="showTimeAll" v-model="timeAll" label="统计时间" />
|
||||||
<span v-else>{{ dateLabel }}</span>
|
<span v-else>{{ dateLabel }}</span>
|
||||||
</template>
|
</template>
|
||||||
<DatePicker
|
<DatePicker
|
||||||
@@ -111,7 +111,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
showReset: true,
|
showReset: true,
|
||||||
showExport: false,
|
showExport: false,
|
||||||
showTimeAll: false,
|
showTimeAll: false,
|
||||||
dateLabel: '时间'
|
dateLabel: '统计日期'
|
||||||
})
|
})
|
||||||
// 动态计算table高度
|
// 动态计算table高度
|
||||||
const resizeObserver = new ResizeObserver(entries => {
|
const resizeObserver = new ResizeObserver(entries => {
|
||||||
@@ -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,16 @@ const setDatePicker = (list: any) => {
|
|||||||
const onResetForm = () => {
|
const onResetForm = () => {
|
||||||
//时间重置成默认值
|
//时间重置成默认值
|
||||||
datePickerRef.value?.setTheDate(3)
|
datePickerRef.value?.setTheDate(3)
|
||||||
|
|
||||||
|
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 +248,7 @@ const setTheDate = (val: any) => {
|
|||||||
}
|
}
|
||||||
// 导出
|
// 导出
|
||||||
const onExport = () => {
|
const onExport = () => {
|
||||||
console.log('导出')
|
|
||||||
tableStore.onTableAction('export', { showAllFlag: true })
|
tableStore.onTableAction('export', { showAllFlag: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
205
src/components/tree/details/monitoringPointDetails.vue
Normal file
205
src/components/tree/details/monitoringPointDetails.vue
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog draggable v-model="dialogVisible" :title="title" width="1200px">
|
||||||
|
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="监测点详情" name="tab1">
|
||||||
|
<el-descriptions :column="3" border label-width="150px">
|
||||||
|
<el-descriptions-item label="项目工程">
|
||||||
|
{{ details.areaName }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="项目单位">
|
||||||
|
{{ details.gdName }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="所属变电站">
|
||||||
|
{{ details.bdName }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="电压等级">
|
||||||
|
{{ details.scale }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="终端厂家">
|
||||||
|
{{ details.manufacturer }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="终端名称">
|
||||||
|
{{ details.devName }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="网络参数">
|
||||||
|
{{ details.ip }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="监测点名称">
|
||||||
|
{{ details.lineName }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="监测点序号">
|
||||||
|
{{ details.id }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="通讯状态">
|
||||||
|
{{ details.comFlag }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="干扰源类型">
|
||||||
|
{{ details.loadType }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="监测点对象名称">
|
||||||
|
{{ details.objName }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="接线方式">
|
||||||
|
{{ details.ptType }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="PT变比">
|
||||||
|
{{ details.pt }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="CT变比">
|
||||||
|
{{ details.ct }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="基准容量(MVA)">
|
||||||
|
{{ details.standardCapacity }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="最小短路容量(MVA)">
|
||||||
|
{{ details.shortCapacity }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="供电设备容量(MVA)">
|
||||||
|
{{ details.devCapacity }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="用户协议容量(MVA)">
|
||||||
|
{{ details.dealCapacity }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="监测点限值" name="tab2">
|
||||||
|
<el-descriptions :column="3" border label-width="250px">
|
||||||
|
<el-descriptions-item label="电压偏差上限值(%)">
|
||||||
|
{{ limitValue.voltageDev }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="电压偏差下限值(%)">
|
||||||
|
{{ limitValue.uvoltageDev }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="频率偏差限值(Hz)">
|
||||||
|
{{ limitValue.freqDev }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="三相电压不平衡度限值(%)">
|
||||||
|
{{ limitValue.ubalance }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="负序电流限值(A)">
|
||||||
|
{{ limitValue.ineg }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="长时闪变限值(%)">
|
||||||
|
{{ limitValue.flicker }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="电压总畸变率限值(%)">
|
||||||
|
{{ limitValue.uaberrance }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="奇次谐波电压含有率限值(%)">
|
||||||
|
{{ limitValue.oddHarm }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="偶次谐波电压含有率限值(%)">
|
||||||
|
{{ limitValue.evenHarm }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="3次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm3 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="4次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm4 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="5次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm5 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="6次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm6 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="7次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm7 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="8次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm8 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="9次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm9 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="10次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm10 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="11次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm11 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="12次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm12 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="13次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm13 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="14次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm14 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="15次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm15 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="16次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm16 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="17次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm17 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="18次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm18 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="19次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm19 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="20次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm20 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="21次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm21 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="22次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm22 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="23次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm23 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="24次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm24 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="25次谐波电流幅值限值(A)">
|
||||||
|
{{ limitValue.iharm25 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="0.5-1.5次间谐波电压含有率限值(%)">
|
||||||
|
{{ limitValue.inUharm }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="2.5-15.5次谐波电压含有率限值(%)">
|
||||||
|
{{ limitValue.inUharm16 }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, inject } from 'vue'
|
||||||
|
import { getLineOverLimitData, getLineDetailData } from '@/api/device-boot/line'
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
const title = ref('')
|
||||||
|
const activeName = ref('tab1')
|
||||||
|
const details: any = ref([])
|
||||||
|
const limitValue: any = ref([])
|
||||||
|
const open = (data: any) => {
|
||||||
|
details.value = []
|
||||||
|
limitValue.value = []
|
||||||
|
activeName.value = 'tab1'
|
||||||
|
title.value = data.name.replace(/([^)]*)/g, '') + '_详情'
|
||||||
|
|
||||||
|
getLineDetailData(data.id).then(res => {
|
||||||
|
details.value = res.data
|
||||||
|
|
||||||
|
})
|
||||||
|
getLineOverLimitData(data.id).then(res => {
|
||||||
|
limitValue.value = res.data
|
||||||
|
})
|
||||||
|
|
||||||
|
dialogVisible.value = true
|
||||||
|
}
|
||||||
|
const handleClick = (tab: any, event: Event) => {}
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-upload-list__item) {
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
34
src/components/tree/details/substationDetails.vue
Normal file
34
src/components/tree/details/substationDetails.vue
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog draggable v-model="dialogVisible" :title="title" width="500px">
|
||||||
|
<el-descriptions class="margin-top" :column="1" border label-width="150px">
|
||||||
|
<el-descriptions-item label="变电站名称">{{ list[0]?.srbName }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="电压等级">{{ list[0]?.scale }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="经度">{{ list[0]?.coordY }}</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="纬度">{{ list[0]?.coordX }}</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, inject } from 'vue'
|
||||||
|
import { getSubstationSelectLine } from '@/api/device-boot/line'
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
const title = ref('')
|
||||||
|
const list: any = ref([])
|
||||||
|
const open = (data: any) => {
|
||||||
|
list.value = []
|
||||||
|
title.value = data.name.replace(/([^)]*)/g, '') + '_详情'
|
||||||
|
|
||||||
|
getSubstationSelectLine(data.id).then(res => {
|
||||||
|
list.value = res.data
|
||||||
|
})
|
||||||
|
|
||||||
|
dialogVisible.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
:deep(.el-upload-list__item) {
|
||||||
|
width: 400px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,162 +1,272 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :style="{ width: menuCollapse ? '40px' : props.width }" style="transition: all 0.3s; overflow: hidden">
|
<div :style="{ width: menuCollapse ? '40px' : props.width }" style="transition: all 0.3s; overflow: hidden">
|
||||||
<Icon v-show="menuCollapse" @click="onMenuCollapse" :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
|
<Icon
|
||||||
:class="menuCollapse ? 'unfold' : ''" size="18" class="fold ml10 mt20 menu-collapse"
|
v-show="menuCollapse"
|
||||||
style="cursor: pointer" />
|
@click="onMenuCollapse"
|
||||||
<div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1 }">
|
:name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
|
||||||
<div style="display: flex; align-items: center" class="mb10">
|
:class="menuCollapse ? 'unfold' : ''"
|
||||||
<el-input v-model="filterText" placeholder="请输入内容" clearable maxlength="10" show-word-limit @input="change">
|
size="18"
|
||||||
<template #prefix>
|
class="fold ml10 mt20 menu-collapse"
|
||||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
style="cursor: pointer"
|
||||||
</template>
|
/>
|
||||||
</el-input>
|
<div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1 }">
|
||||||
<Icon @click="onMenuCollapse" :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
|
<div style="display: flex; align-items: center" class="mb10">
|
||||||
:class="menuCollapse ? 'unfold' : ''" size="18" class="fold ml10 menu-collapse"
|
<el-input
|
||||||
style="cursor: pointer" v-if="props.canExpand" />
|
v-model="filterText"
|
||||||
<el-button icon="el-icon-Plus" v-if="props.addTree" type="primary" class="ml10"
|
placeholder="请输入内容"
|
||||||
@click="onAddTree">新增</el-button>
|
clearable
|
||||||
</div>
|
maxlength="10"
|
||||||
<el-tree style="flex: 1; overflow: auto" ref="treeRef" :props="defaultProps" highlight-current
|
show-word-limit
|
||||||
:filter-node-method="filterNode" node-key="id" v-bind="$attrs">
|
@input="change"
|
||||||
<template #default="{ node, data }">
|
>
|
||||||
<span class="custom-tree-node">
|
<template #prefix>
|
||||||
<Icon :name="data.icon" style="font-size: 16px" :style="{ color: data.color }"
|
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||||
v-if="data.icon" />
|
</template>
|
||||||
<span style="margin-left: 4px">{{ node.label }}</span>
|
</el-input>
|
||||||
</span>
|
<Icon
|
||||||
</template>
|
@click="onMenuCollapse"
|
||||||
</el-tree>
|
:name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
|
||||||
</div>
|
:class="menuCollapse ? 'unfold' : ''"
|
||||||
</div>
|
size="18"
|
||||||
</template>
|
class="fold ml10 menu-collapse"
|
||||||
|
style="cursor: pointer"
|
||||||
<script lang="ts" setup>
|
v-if="props.canExpand"
|
||||||
import useCurrentInstance from '@/utils/useCurrentInstance'
|
/>
|
||||||
import { ElTree } from 'element-plus'
|
<el-button icon="el-icon-Plus" v-if="props.addTree" type="primary" class="ml10" @click="onAddTree">
|
||||||
import { ref, watch } from 'vue'
|
新增
|
||||||
import { ElMessage } from 'element-plus'
|
</el-button>
|
||||||
defineOptions({
|
</div>
|
||||||
name: 'govern/tree'
|
<el-tree
|
||||||
})
|
style="flex: 1; overflow: auto"
|
||||||
const emit = defineEmits(['onAddTree'])
|
ref="treeRef"
|
||||||
interface Props {
|
:props="defaultProps"
|
||||||
width?: string
|
highlight-current
|
||||||
canExpand?: boolean
|
:filter-node-method="filterNode"
|
||||||
addTree?: boolean
|
node-key="id"
|
||||||
}
|
v-bind="$attrs"
|
||||||
|
>
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
<template #default="{ node, data }">
|
||||||
width: '280px',
|
<span class="custom-tree-node">
|
||||||
canExpand: true,
|
<Icon
|
||||||
addTree: false
|
:name="data.icon"
|
||||||
})
|
style="font-size: 16px"
|
||||||
const { proxy } = useCurrentInstance()
|
:style="{ color: data.color }"
|
||||||
const menuCollapse = ref(false)
|
v-if="data.icon"
|
||||||
const filterText = ref('')
|
/>
|
||||||
const defaultProps = {
|
|
||||||
label: 'name',
|
<el-tooltip
|
||||||
value: 'id'
|
class="box-item"
|
||||||
}
|
effect="customized"
|
||||||
const specialCharsPattern = /[`~!@$%^&*\-+=<>?:"{}|,.\/;'\\[\]·~!@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、~]/g;
|
placement="bottom-start"
|
||||||
const change=(val) => {
|
:offset="0"
|
||||||
|
v-if="data.level == 6"
|
||||||
|
>
|
||||||
if (specialCharsPattern.test(val)) {
|
<template #content>
|
||||||
ElMessage.warning('禁止输入特殊字符!')
|
<el-button type="primary" plain @click="viewDetails(data)">
|
||||||
filterText.value = val.replace(/[`~!@$%^&*\-+=<>?:"{}|,.\/;'\\[\]·~!@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、~]/g, "")
|
{{ data.level == 3 ? '变电站详情' : '监测点详情' }}
|
||||||
console.log("🚀 ~ change ~ filterText.value:", filterText.value)
|
</el-button>
|
||||||
|
</template>
|
||||||
treeRef.value!.filter(filterText.value)
|
<span style="margin-left: 4px">{{ node.label }}</span>
|
||||||
}else{
|
</el-tooltip>
|
||||||
treeRef.value!.filter(filterText.value)
|
<span v-else style="margin-left: 4px">{{ node.label }}</span>
|
||||||
}
|
</span>
|
||||||
}
|
</template>
|
||||||
// watch(filterText, val => {
|
</el-tree>
|
||||||
|
</div>
|
||||||
// console.log("🚀 ~ val:", specialCharsPattern.test(val))
|
<!-- 变电站详情 -->
|
||||||
// if (specialCharsPattern.test(val)) {
|
<SubstationDetails ref="SubstationRef" />
|
||||||
// ElMessage.warning('禁止输入特殊字符!')
|
<!-- 监测点详情 -->
|
||||||
// filterText.value = val.replace(/[`~!@$%^&*\-+=<>?:"{}|,.\/;'\\[\]·~!@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、~]/g, "")
|
<MonitoringPointDetails ref="MonitoringPointRef" />
|
||||||
// console.log("🚀 ~ filterText.value:", filterText.value)
|
</div>
|
||||||
// treeRef.value!.filter(filterText.value)
|
</template>
|
||||||
// }else{
|
|
||||||
// treeRef.value!.filter(filterText.value)
|
<script lang="ts" setup>
|
||||||
// }
|
import useCurrentInstance from '@/utils/useCurrentInstance'
|
||||||
|
import { ElTree } from 'element-plus'
|
||||||
// })
|
import { ref, watch, onMounted, nextTick } from 'vue'
|
||||||
const onMenuCollapse = () => {
|
import { ElMessage } from 'element-plus'
|
||||||
menuCollapse.value = !menuCollapse.value
|
import MonitoringPointDetails from './details/monitoringPointDetails.vue'
|
||||||
proxy.eventBus.emit('cnTreeCollapse', menuCollapse)
|
import SubstationDetails from './details/substationDetails.vue'
|
||||||
}
|
|
||||||
const filterNode = (value: string, data: any, node: any) => {
|
defineOptions({
|
||||||
if (!value) return true
|
name: 'govern/tree'
|
||||||
// return data.name.includes(value)
|
})
|
||||||
if (data.name) {
|
const emit = defineEmits(['onAddTree'])
|
||||||
|
interface Props {
|
||||||
return chooseNode(value, data, node)
|
width?: string
|
||||||
}
|
canExpand?: boolean
|
||||||
}
|
addTree?: boolean
|
||||||
|
}
|
||||||
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配,则返回该节点以及其下的所有子节点;如果参数是子节点,则返回该节点的父节点。name是中文字符,enName是英文字符.
|
|
||||||
const chooseNode = (value: string, data: any, node: any) => {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
width: '280px',
|
||||||
if (data.name.indexOf(value) !== -1) {
|
canExpand: true,
|
||||||
return true
|
addTree: false
|
||||||
}
|
})
|
||||||
const level = node.level
|
const { proxy } = useCurrentInstance()
|
||||||
// 如果传入的节点本身就是一级节点就不用校验了
|
const menuCollapse = ref(false)
|
||||||
if (level === 1) {
|
const MonitoringPointRef = ref()
|
||||||
return false
|
const SubstationRef = ref()
|
||||||
}
|
const filterText = ref('')
|
||||||
// 先取当前节点的父节点
|
const treeRef = ref()
|
||||||
let parentData = node.parent
|
const defaultProps = {
|
||||||
// 遍历当前节点的父节点
|
label: 'name',
|
||||||
let index = 0
|
value: 'id'
|
||||||
while (index < level - 1) {
|
}
|
||||||
// 如果匹配到直接返回,此处name值是中文字符,enName是英文字符。判断匹配中英文过滤
|
const specialCharsPattern = /[`~!@$%^&*\-+=<>?:"{}|,.\/;'\\[\]·~!@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、~]/g
|
||||||
if (parentData.data.name.indexOf(value) !== -1) {
|
const change = val => {
|
||||||
return true
|
if (specialCharsPattern.test(val)) {
|
||||||
}
|
ElMessage.warning('禁止输入特殊字符!')
|
||||||
// 否则的话再往上一层做匹配
|
filterText.value = val.replace(
|
||||||
parentData = parentData.parent
|
/[`~!@$%^&*\-+=<>?:"{}|,.\/;'\\[\]·~!@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、~]/g,
|
||||||
index++
|
''
|
||||||
}
|
)
|
||||||
// 没匹配到返回false
|
console.log('🚀 ~ change ~ filterText.value:', filterText.value)
|
||||||
return false
|
|
||||||
}
|
treeRef.value!.filter(filterText.value)
|
||||||
// 添加树
|
} else {
|
||||||
const onAddTree = () => {
|
treeRef.value!.filter(filterText.value)
|
||||||
emit('onAddTree')
|
}
|
||||||
}
|
}
|
||||||
const treeRef = ref<InstanceType<typeof ElTree>>()
|
// watch(filterText, val => {
|
||||||
defineExpose({ treeRef })
|
|
||||||
</script>
|
// console.log("🚀 ~ val:", specialCharsPattern.test(val))
|
||||||
|
// if (specialCharsPattern.test(val)) {
|
||||||
<style lang="scss" scoped>
|
// ElMessage.warning('禁止输入特殊字符!')
|
||||||
.cn-tree {
|
// filterText.value = val.replace(/[`~!@$%^&*\-+=<>?:"{}|,.\/;'\\[\]·~!@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、~]/g, "")
|
||||||
flex-shrink: 0;
|
// console.log("🚀 ~ filterText.value:", filterText.value)
|
||||||
display: flex;
|
// treeRef.value!.filter(filterText.value)
|
||||||
flex-direction: column;
|
// }else{
|
||||||
box-sizing: border-box;
|
// treeRef.value!.filter(filterText.value)
|
||||||
padding: 10px;
|
// }
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
// })
|
||||||
|
const onMenuCollapse = () => {
|
||||||
:deep(.el-tree) {
|
menuCollapse.value = !menuCollapse.value
|
||||||
border: 1px solid var(--el-border-color);
|
proxy.eventBus.emit('cnTreeCollapse', menuCollapse)
|
||||||
}
|
}
|
||||||
|
// 查看详情
|
||||||
:deep(.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content) {
|
const viewDetails = (data: any) => {
|
||||||
background-color: var(--el-color-primary-light-7);
|
console.log('🚀 ~ viewDetails ~ data:', data)
|
||||||
}
|
if (data.level == 3) {
|
||||||
|
// 变电站详情
|
||||||
.menu-collapse {
|
// substationDetails
|
||||||
color: var(--el-color-primary);
|
SubstationRef.value.open(data)
|
||||||
}
|
} else {
|
||||||
}
|
// 监测点详情
|
||||||
|
MonitoringPointRef.value.open(data)
|
||||||
.custom-tree-node {
|
}
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
// proxy.eventBus.emit('viewDetails', data)
|
||||||
}
|
}
|
||||||
</style>
|
const filterNode = (value: string, data: any, node: any) => {
|
||||||
|
if (!value) return true
|
||||||
|
// return data.name.includes(value)
|
||||||
|
if (data.name) {
|
||||||
|
return chooseNode(value, data, node)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配,则返回该节点以及其下的所有子节点;如果参数是子节点,则返回该节点的父节点。name是中文字符,enName是英文字符.
|
||||||
|
const chooseNode = (value: string, data: any, node: any) => {
|
||||||
|
if (data.name.indexOf(value) !== -1) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
const level = node.level
|
||||||
|
// 如果传入的节点本身就是一级节点就不用校验了
|
||||||
|
if (level === 1) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// 先取当前节点的父节点
|
||||||
|
let parentData = node.parent
|
||||||
|
// 遍历当前节点的父节点
|
||||||
|
let index = 0
|
||||||
|
while (index < level - 1) {
|
||||||
|
// 如果匹配到直接返回,此处name值是中文字符,enName是英文字符。判断匹配中英文过滤
|
||||||
|
if (parentData.data.name.indexOf(value) !== -1) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
// 否则的话再往上一层做匹配
|
||||||
|
parentData = parentData.parent
|
||||||
|
index++
|
||||||
|
}
|
||||||
|
// 没匹配到返回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 = () => {
|
||||||
|
emit('onAddTree')
|
||||||
|
}
|
||||||
|
defineExpose({ treeRef, scrollToNode })
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.cn-tree {
|
||||||
|
flex-shrink: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10px;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
:deep(.el-tree) {
|
||||||
|
border: 1px solid var(--el-border-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content) {
|
||||||
|
background-color: var(--el-color-primary-light-7);
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu-collapse {
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-tree-node {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style>
|
||||||
|
.el-popper.is-customized {
|
||||||
|
/* Set padding to ensure the height is 32px */
|
||||||
|
padding: 0;
|
||||||
|
background: var(--el-color-primary-light-3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-popper.is-customized .el-popper__arrow::before {
|
||||||
|
background: var(--el-color-primary-light-3);
|
||||||
|
right: 0;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
</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) {
|
||||||
@@ -73,19 +70,22 @@ const loadData = () => {
|
|||||||
let form = JSON.parse(JSON.stringify(formData.value))
|
let form = JSON.parse(JSON.stringify(formData.value))
|
||||||
form.statisticalType = classificationData.find((item: any) => item.id == form.statisticalType)
|
form.statisticalType = classificationData.find((item: any) => item.id == form.statisticalType)
|
||||||
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])
|
||||||
|
|
||||||
tree.value = transformedData
|
tree.value = transformedData
|
||||||
|
|
||||||
if (nodeKey) {
|
if (nodeKey) {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
treeRef.value.treeRef.setCurrentKey(nodeKey)
|
treeRef.value.treeRef.setCurrentKey(nodeKey)
|
||||||
@@ -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">
|
||||||
|
|||||||
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;
|
||||||
|
}
|
||||||
@@ -8,29 +8,31 @@ $primary-light: #3f6ad8;
|
|||||||
// --ba-background
|
// --ba-background
|
||||||
$bg-color: () !default;
|
$bg-color: () !default;
|
||||||
$bg-color: map.merge(
|
$bg-color: map.merge(
|
||||||
(
|
(
|
||||||
'': #edf0f3,
|
'': #edf0f3,
|
||||||
'overlay': #ffffff,
|
'overlay': #ffffff
|
||||||
),
|
),
|
||||||
$bg-color
|
$bg-color
|
||||||
);
|
);
|
||||||
|
|
||||||
// --ba-border-color
|
// --ba-border-color
|
||||||
$border-color: () !default;
|
$border-color: () !default;
|
||||||
$border-color: map.merge(
|
$border-color: map.merge(
|
||||||
(
|
(
|
||||||
'': #f6f6f6,
|
'': #f6f6f6
|
||||||
),
|
),
|
||||||
$border-color
|
$border-color
|
||||||
);
|
);
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
@include set-css-var-value('main-space', $main-space);
|
@include set-css-var-value('main-space', $main-space);
|
||||||
@include set-css-var-value('color-primary-light', $primary-light);
|
@include set-css-var-value('color-primary-light', $primary-light);
|
||||||
@include set-component-css-var('bg-color', $bg-color);
|
@include set-component-css-var('bg-color', $bg-color);
|
||||||
@include set-component-css-var('border-color', $border-color);
|
@include set-component-css-var('border-color', $border-color);
|
||||||
// --vxe-table-row-current-background-color: var(--el-color-primary-light-7);
|
--vxe-ui-table-row-current-background-color: var(--el-color-primary-light-8);
|
||||||
// --vxe-table-row-hover-background-color: var(--el-color-primary-light-9);
|
--vxe-ui-table-row-hover-current-background-color: var(--el-color-primary-light-8);
|
||||||
// --vxe-table-row-hover-current-background-color: var(--el-color-primary-light-7);
|
// --vxe-table-row-current-background-color: var(--el-color-primary-light-7);
|
||||||
// --vxe-table-row-hover-striped-background-color: var(--el-color-primary-light-9);
|
// --vxe-table-row-hover-background-color: var(--el-color-primary-light-9);
|
||||||
|
// --vxe-table-row-hover-current-background-color: var(--el-color-primary-light-7);
|
||||||
|
// --vxe-table-row-hover-striped-background-color: var(--el-color-primary-light-9);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
.vxe-header--row {
|
.vxe-header--row {
|
||||||
background: var(--vxe-table-header-background-color);
|
background: var(--vxe-table-header-background-color);
|
||||||
color: var(--vxe-table-header-font-color);
|
color: var(--vxe-table-header-font-color);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is--checked.vxe-checkbox,
|
.is--checked.vxe-checkbox,
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
.vxe-table--render-default .is--indeterminate.vxe-cell--checkbox,
|
.vxe-table--render-default .is--indeterminate.vxe-cell--checkbox,
|
||||||
.vxe-table--render-default .is--indeterminate.vxe-cell--checkbox .vxe-checkbox--icon,
|
.vxe-table--render-default .is--indeterminate.vxe-cell--checkbox .vxe-checkbox--icon,
|
||||||
.vxe-table--render-default .is--checked.vxe-cell--radio .vxe-radio--icon {
|
.vxe-table--render-default .is--checked.vxe-cell--radio .vxe-radio--icon {
|
||||||
color: var(--el-color-primary-light-3);
|
color: var(--el-color-primary-light-3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.vxe-checkbox:not(.is--disabled):hover .vxe-checkbox--icon,
|
.vxe-checkbox:not(.is--disabled):hover .vxe-checkbox--icon,
|
||||||
@@ -38,40 +38,41 @@
|
|||||||
.vxe-export--panel-column-option:not(.is--disabled):hover .vxe-radio--icon,
|
.vxe-export--panel-column-option:not(.is--disabled):hover .vxe-radio--icon,
|
||||||
.vxe-table--filter-option:not(.is--disabled):hover .vxe-radio--icon,
|
.vxe-table--filter-option:not(.is--disabled):hover .vxe-radio--icon,
|
||||||
.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--tooltip-wrapper {
|
.vxe-table--tooltip-wrapper {
|
||||||
z-index: 10000 !important;
|
z-index: 10000 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is--disabled {
|
.is--disabled {
|
||||||
background-color: var(--vxe-input-disabled-color);
|
background-color: var(--vxe-input-disabled-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
}
|
}
|
||||||
|
|
||||||
.default-theme.splitpanes--vertical > .splitpanes__splitter:after,
|
.default-theme.splitpanes--vertical > .splitpanes__splitter:after,
|
||||||
.default-theme .splitpanes--vertical > .splitpanes__splitter:after {
|
.default-theme .splitpanes--vertical > .splitpanes__splitter:after {
|
||||||
background-color: #000 !important;
|
background-color: #000 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.default-theme.splitpanes--vertical > .splitpanes__splitter:before,
|
.default-theme.splitpanes--vertical > .splitpanes__splitter:before,
|
||||||
.default-theme .splitpanes--vertical > .splitpanes__splitter:before {
|
.default-theme .splitpanes--vertical > .splitpanes__splitter:before {
|
||||||
background-color: #000 !important;
|
background-color: #000 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
42
src/utils/fileDownLoad.ts
Normal file
42
src/utils/fileDownLoad.ts
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
import { downloadFile } from '@/api/system-boot/file'
|
||||||
|
// 下载文件
|
||||||
|
export const download = (urls: string) => {
|
||||||
|
console.log("🚀 ~ download ~ urls:", urls)
|
||||||
|
downloadFile({ filePath: urls }).then((res: any) => {
|
||||||
|
let blob = new Blob([res], {
|
||||||
|
type: urls.includes('.pdf')
|
||||||
|
? 'application/pdf'
|
||||||
|
: urls.includes('.zip')
|
||||||
|
? 'application/zip'
|
||||||
|
: urls.includes('.doc')
|
||||||
|
? 'application/msword'
|
||||||
|
: urls.includes('.docx')
|
||||||
|
? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||||
|
: urls.includes('.xls')
|
||||||
|
? 'application/vnd.ms-excel'
|
||||||
|
: urls.includes('.xlsx')
|
||||||
|
? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||||
|
: urls.includes('.png')
|
||||||
|
? 'image/png'
|
||||||
|
: urls.includes('.jpeg')
|
||||||
|
? 'image/jpeg'
|
||||||
|
: urls.includes('.jpg')
|
||||||
|
? 'image/jpg'
|
||||||
|
: ''
|
||||||
|
})
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a')
|
||||||
|
let name = removeLastDotSuffix(urls.split('/')[2])
|
||||||
|
link.href = url
|
||||||
|
link.download = name
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
link.remove()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function removeLastDotSuffix(str: string) {
|
||||||
|
// 找到最后一个 . 的位置
|
||||||
|
const lastDotIndex = str.lastIndexOf('.')
|
||||||
|
// 如果存在 .,截取到 . 之前的部分;否则返回原字符串
|
||||||
|
return lastDotIndex !== -1 ? str.slice(0, lastDotIndex) : str
|
||||||
|
}
|
||||||
@@ -362,3 +362,4 @@ export function getTimeOfTheMonth(key: string): [string, string] {
|
|||||||
throw new Error('Invalid key')
|
throw new Error('Invalid key')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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.allData)
|
||||||
this.table.exportProcessingData && this.table.exportProcessingData()
|
this.table.exportProcessingData && this.table.exportProcessingData()
|
||||||
this.table.allFlag = data.showAllFlag || true
|
this.table.allFlag = data.showAllFlag || true
|
||||||
})
|
})
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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: '登录时间' }
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<pane style="background: #fff">
|
<pane style="background: #fff">
|
||||||
<TableHeader :showSearch="false" v-show="props.rowList.id == undefined">
|
<TableHeader :showSearch="false" v-show="props.rowList.id == undefined">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="时间">
|
<el-form-item label="统计时间">
|
||||||
<DatePicker ref="datePickerRef"></DatePicker>
|
<DatePicker ref="datePickerRef"></DatePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -205,7 +205,7 @@ const props = defineProps(['rowList'])
|
|||||||
const harmonic = harmonicOptions.filter(item => item.value < 26)
|
const harmonic = harmonicOptions.filter(item => item.value < 26)
|
||||||
const currentLod = ref(false)
|
const currentLod = ref(false)
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const size = ref(0)
|
const size = ref(23)
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const datePickerRef = ref()
|
const datePickerRef = ref()
|
||||||
const height = mainHeight(80).height
|
const height = mainHeight(80).height
|
||||||
|
|||||||
@@ -270,7 +270,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',
|
||||||
@@ -332,29 +332,29 @@ const tableStore = new TableStore({
|
|||||||
formData.value = JSON.parse(JSON.stringify(row))
|
formData.value = JSON.parse(JSON.stringify(row))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: 'edit',
|
// name: 'edit',
|
||||||
title: '重启',
|
// title: '重启',
|
||||||
type: 'warning',
|
// type: 'warning',
|
||||||
icon: 'el-icon-Delete',
|
// icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
// render: 'confirmButton',
|
||||||
popconfirm: {
|
// popconfirm: {
|
||||||
confirmButtonText: '确认',
|
// confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
// cancelButtonText: '取消',
|
||||||
confirmButtonType: 'warning',
|
// confirmButtonType: 'warning',
|
||||||
title: '确定重启吗?'
|
// title: '确定重启吗?'
|
||||||
},
|
// },
|
||||||
click: row => {
|
// click: row => {
|
||||||
askRestartProcess({
|
// askRestartProcess({
|
||||||
deviceRebootType: null,
|
// deviceRebootType: null,
|
||||||
nodeId: row.id,
|
// nodeId: row.id,
|
||||||
processNo: 1
|
// processNo: 1
|
||||||
}).then(res => {
|
// }).then(res => {
|
||||||
ElMessage.success('重启成功')
|
// ElMessage.success('重启成功')
|
||||||
tableStore.index()
|
// tableStore.index()
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'del',
|
name: 'del',
|
||||||
@@ -579,7 +579,7 @@ const addMenu = () => {}
|
|||||||
:deep(.default) {
|
:deep(.default) {
|
||||||
display: flex;
|
display: flex;
|
||||||
.row--current {
|
.row--current {
|
||||||
background-color: var(--el-color-primary-light-8) !important;
|
// background-color: var(--el-color-primary-light-8) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.custom-tree-node {
|
.custom-tree-node {
|
||||||
|
|||||||
@@ -1,355 +1,355 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main" style="position: relative">
|
<div class="default-main" style="position: relative">
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="终端型号">
|
<el-form-item label="终端型号">
|
||||||
<el-select v-model="tableStore.table.params.teriminal" clearable placeholder="请选择终端型号">
|
<el-select v-model="tableStore.table.params.teriminal" clearable placeholder="请选择终端型号">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in teriminaloption"
|
v-for="item in teriminaloption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终端状态">
|
<el-form-item label="终端状态">
|
||||||
<el-select v-model="tableStore.table.params.teriminalstatus" clearable placeholder="请选择终端状态">
|
<el-select v-model="tableStore.table.params.teriminalstatus" clearable placeholder="请选择终端状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in teriminalstatusoption"
|
v-for="item in teriminalstatusoption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="通讯状态">
|
<el-form-item label="通讯状态">
|
||||||
<el-select v-model="tableStore.table.params.state" clearable placeholder="请选择通讯状态">
|
<el-select v-model="tableStore.table.params.state" clearable placeholder="请选择通讯状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stateoption"
|
v-for="item in stateoption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="程序版本">
|
<el-form-item label="程序版本">
|
||||||
<el-select v-model="tableStore.table.params.program" clearable placeholder="请选择程序版本">
|
<el-select v-model="tableStore.table.params.program" clearable placeholder="请选择程序版本">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in programoption"
|
v-for="item in programoption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="筛选">
|
<el-form-item label="筛选数据">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.filterName"
|
v-model="tableStore.table.params.filterName"
|
||||||
@keyup="searchEvent"
|
@keyup="searchEvent"
|
||||||
placeholder="输入关键字筛选"
|
placeholder="输入关键字筛选"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Download" @click="add">导出</el-button>
|
<el-button icon="el-icon-Download" @click="add">导出</el-button>
|
||||||
<el-button icon="el-icon-Check" @click="add">批量升级</el-button>
|
<el-button icon="el-icon-Check" @click="add">批量升级</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div :style="`height: calc(${tableStore.table.height} + 58px)`">
|
<div :style="`height: calc(${tableStore.table.height} + 58px)`">
|
||||||
<vxe-table
|
<vxe-table
|
||||||
v-loading="tableStore.table.loading"
|
v-loading="tableStore.table.loading"
|
||||||
height="auto"
|
height="auto"
|
||||||
auto-resize
|
auto-resize
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
v-bind="defaultAttribute"
|
v-bind="defaultAttribute"
|
||||||
:data="treeData"
|
:data="treeData"
|
||||||
show-overflow
|
show-overflow
|
||||||
:tree-config="{ transform: true, parentField: 'uPid', rowField: 'uId' }"
|
:tree-config="{ transform: true, parentField: 'uPid', rowField: 'uId' }"
|
||||||
:scroll-y="{ enabled: true }"
|
:scroll-y="{ enabled: true }"
|
||||||
>
|
>
|
||||||
<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="devType" title="终端型号" :formatter="formFilter"></vxe-column>
|
<vxe-column field="devType" title="终端型号" :formatter="formFilter"></vxe-column>
|
||||||
<vxe-column field="versionName" title="版本号"></vxe-column>
|
<vxe-column field="versionName" title="版本号"></vxe-column>
|
||||||
<vxe-column field="protocol" title="协议版本"></vxe-column>
|
<vxe-column field="protocol" title="协议版本"></vxe-column>
|
||||||
<vxe-column field="versionDate" title="版本日期"></vxe-column>
|
<vxe-column field="versionDate" title="版本日期"></vxe-column>
|
||||||
<vxe-column field="runFlag" title="终端状态">
|
<vxe-column field="runFlag" title="终端状态">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag v-if="row.runFlag === 0" style="color: #fff; background: #0099cc" size="small">
|
<el-tag v-if="row.runFlag === 0" style="color: #fff; background: #0099cc" size="small">
|
||||||
投运
|
投运
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="row.runFlag === 1" style="color: #fff; background: #996600" size="small">
|
<el-tag v-if="row.runFlag === 1" style="color: #fff; background: #996600" size="small">
|
||||||
检修
|
检修
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="row.runFlag === 2" style="color: #fff; background: #A52a2a" size="small">
|
<el-tag v-if="row.runFlag === 2" style="color: #fff; background: #A52a2a" size="small">
|
||||||
停运
|
停运
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="comFlag" title="通讯状态">
|
<vxe-column field="comFlag" title="通讯状态">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag v-if="row.comFlag === 0" style="color: #fff; background: #A52a2a" size="small">
|
<el-tag v-if="row.comFlag === 0" style="color: #fff; background: #A52a2a" size="small">
|
||||||
中断
|
中断
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="row.comFlag === 1" style="color: #fff; background: #2e8b57" size="small">
|
<el-tag v-if="row.comFlag === 1" style="color: #fff; background: #2e8b57" size="small">
|
||||||
正常
|
正常
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="updateBy" title="升级人员">
|
<vxe-column field="updateBy" title="升级人员">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span v-if="row.updateBy == null || row.updateBy == '/'">--</span>
|
<span v-if="row.updateBy == null || row.updateBy == '/'">--</span>
|
||||||
<span v-else>{{ row.updateBy }}</span>
|
<span v-else>{{ row.updateBy }}</span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="updateTime" title="最新升级时间"></vxe-column>
|
<vxe-column field="updateTime" title="最新升级时间"></vxe-column>
|
||||||
<vxe-column title="操作" min-width="100">
|
<vxe-column title="操作" min-width="100">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-if="row.level == 4" size="small" link @click="updateprogram(row)">升级</el-button>
|
<el-button v-if="row.level == 4" size="small" link @click="updateprogram(row)">升级</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-if="row.level == 4"
|
v-if="row.level == 4"
|
||||||
:disabled="row.state == 1 ? true : false"
|
:disabled="row.state == 1 ? true : false"
|
||||||
size="small"
|
size="small"
|
||||||
link
|
link
|
||||||
@click="queryview(row)"
|
@click="queryview(row)"
|
||||||
>
|
>
|
||||||
日志查看
|
日志查看
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
draggable
|
draggable
|
||||||
v-model="dialogVisible"
|
v-model="dialogVisible"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:title="protitle + '#终端升级日志查看'"
|
:title="protitle + '#终端升级日志查看'"
|
||||||
width="70%"
|
width="70%"
|
||||||
>
|
>
|
||||||
<div :style="{ height: dialogHeight.height }">
|
<div :style="{ height: dialogHeight.height }">
|
||||||
<vxe-table height="auto" auto-resize :data="logtableData" v-bind="defaultAttribute">
|
<vxe-table height="auto" auto-resize :data="logtableData" v-bind="defaultAttribute">
|
||||||
<vxe-column field="devTypeName" align="center" title="终端序号"></vxe-column>
|
<vxe-column field="devTypeName" align="center" title="终端序号"></vxe-column>
|
||||||
<vxe-column field="versionId" align="center" title="版本序号"></vxe-column>
|
<vxe-column field="versionId" align="center" title="版本序号"></vxe-column>
|
||||||
<vxe-column field="flag" align="center" title="版本状态" width="100">
|
<vxe-column field="flag" align="center" title="版本状态" width="100">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag v-if="row.flag == true" style="color: #fff; background: #fc0">前期版本</el-tag>
|
<el-tag v-if="row.flag == true" style="color: #fff; background: #fc0">前期版本</el-tag>
|
||||||
<el-tag v-if="row.flag == false" style="color: #fff; background: #0c0">当前版本</el-tag>
|
<el-tag v-if="row.flag == false" style="color: #fff; background: #0c0">当前版本</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="result" align="center" title="升级结果" width="100">
|
<vxe-column field="result" align="center" title="升级结果" width="100">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag v-if="row.result == false" style="color: #fff; background: #f30">升级失败</el-tag>
|
<el-tag v-if="row.result == false" style="color: #fff; background: #f30">升级失败</el-tag>
|
||||||
<el-tag v-if="row.result == true" style="color: #fff; background: #093">升级成功</el-tag>
|
<el-tag v-if="row.result == true" style="color: #fff; background: #093">升级成功</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="state" align="center" title="状态" width="100">
|
<vxe-column field="state" align="center" title="状态" width="100">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag v-if="row.state == false" style="color: #fff; background: #f30">删除</el-tag>
|
<el-tag v-if="row.state == false" style="color: #fff; background: #f30">删除</el-tag>
|
||||||
<el-tag v-if="row.state == true" style="color: #fff; background: #093">正常</el-tag>
|
<el-tag v-if="row.state == true" style="color: #fff; background: #093">正常</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="createBy" align="center" title="创建用户"></vxe-column>
|
<vxe-column field="createBy" align="center" title="创建用户"></vxe-column>
|
||||||
<vxe-column field="createTime" align="center" title="创建时间"></vxe-column>
|
<vxe-column field="createTime" align="center" title="创建时间"></vxe-column>
|
||||||
<vxe-column field="updateTime" align="center" title="升级时间"></vxe-column>
|
<vxe-column field="updateTime" align="center" title="升级时间"></vxe-column>
|
||||||
<vxe-column field="updateBy" align="center" title="升级人员"></vxe-column>
|
<vxe-column field="updateBy" align="center" title="升级人员"></vxe-column>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 升级 -->
|
<!-- 升级 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
draggable
|
draggable
|
||||||
v-model="prodialogVisible"
|
v-model="prodialogVisible"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
:title="protitle + '#终端程序升级'"
|
:title="protitle + '#终端程序升级'"
|
||||||
width="40%"
|
width="40%"
|
||||||
>
|
>
|
||||||
<el-col v-for="(item, index) in percentageoption" :key="index">
|
<el-col v-for="(item, index) in percentageoption" :key="index">
|
||||||
<span style="font-size: 14px; font-weight: bold">{{ item.name }}</span>
|
<span style="font-size: 14px; font-weight: bold">{{ item.name }}</span>
|
||||||
:
|
:
|
||||||
<el-progress
|
<el-progress
|
||||||
:text-inside="true"
|
:text-inside="true"
|
||||||
:stroke-width="24"
|
:stroke-width="24"
|
||||||
:percentage="item.percentage"
|
:percentage="item.percentage"
|
||||||
:status="item.status"
|
:status="item.status"
|
||||||
:format="format"
|
:format="format"
|
||||||
></el-progress>
|
></el-progress>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { getTerminalUpLog } from '@/api/device-boot/Business'
|
import { getTerminalUpLog } from '@/api/device-boot/Business'
|
||||||
import XEUtils from 'xe-utils'
|
import XEUtils from 'xe-utils'
|
||||||
import { getDevTypeList } from '@/api/device-boot/modelManage'
|
import { getDevTypeList } from '@/api/device-boot/modelManage'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'BusinessAdministrator/TerminalManagement/ProgramManagement'
|
name: 'BusinessAdministrator/TerminalManagement/ProgramManagement'
|
||||||
})
|
})
|
||||||
|
|
||||||
const pageHeight = mainHeight(83)
|
const pageHeight = mainHeight(83)
|
||||||
const dialogHeight = mainHeight(300)
|
const dialogHeight = mainHeight(300)
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const teriminaloption: any = ref([])
|
const teriminaloption: any = ref([])
|
||||||
const teriminalstatusoption = ref([
|
const teriminalstatusoption = ref([
|
||||||
{ name: '全部', id: '' },
|
{ name: '全部', id: '' },
|
||||||
{ name: '投运', id: 0 },
|
{ name: '投运', id: 0 },
|
||||||
{ name: '检修', id: 1 },
|
{ name: '检修', id: 1 },
|
||||||
{ name: '停运', id: 2 }
|
{ name: '停运', id: 2 }
|
||||||
])
|
])
|
||||||
const stateoption = ref([
|
const stateoption = ref([
|
||||||
{ name: '全部', id: '' },
|
{ name: '全部', id: '' },
|
||||||
{ name: '正常', id: 1 },
|
{ name: '正常', id: 1 },
|
||||||
{ name: '中断', id: 0 }
|
{ name: '中断', id: 0 }
|
||||||
])
|
])
|
||||||
const prodialogVisible = ref(false)
|
const prodialogVisible = ref(false)
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const protitle = ref('')
|
const protitle = ref('')
|
||||||
const treeData: any = ref([])
|
const treeData: any = ref([])
|
||||||
const treeDataCopy: any = ref([])
|
const treeDataCopy: any = ref([])
|
||||||
//进度条对象
|
//进度条对象
|
||||||
const percentageoption = ref([
|
const percentageoption = ref([
|
||||||
{
|
{
|
||||||
name: '1号测试终端',
|
name: '1号测试终端',
|
||||||
status: 'exception',
|
status: 'exception',
|
||||||
percentage: 20
|
percentage: 20
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '2号测试终端',
|
name: '2号测试终端',
|
||||||
status: 'warning',
|
status: 'warning',
|
||||||
percentage: 50
|
percentage: 50
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '3号测试终端',
|
name: '3号测试终端',
|
||||||
status: 'success',
|
status: 'success',
|
||||||
percentage: 90
|
percentage: 90
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
const programoption: any = ref([])
|
const programoption: any = ref([])
|
||||||
const logtableData: any = ref([])
|
const logtableData: any = ref([])
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const status = ref('')
|
const status = ref('')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/device-boot/version/getTerminalVersionList',
|
url: '/device-boot/version/getTerminalVersionList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [],
|
column: [],
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
// tableStore.table.data.forEach((item: any) => {
|
// tableStore.table.data.forEach((item: any) => {
|
||||||
// if (item.children.length > 0) {
|
// if (item.children.length > 0) {
|
||||||
// item.id = item.children[0].pid
|
// item.id = item.children[0].pid
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
treeData.value = tree2List(tableStore.table.data, Math.random() * 1000)
|
treeData.value = tree2List(tableStore.table.data, Math.random() * 1000)
|
||||||
treeDataCopy.value = JSON.parse(JSON.stringify(treeData.value))
|
treeDataCopy.value = JSON.parse(JSON.stringify(treeData.value))
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
tableRef.value.setAllTreeExpand(true)
|
tableRef.value.setAllTreeExpand(true)
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.teriminal = ''
|
tableStore.table.params.teriminal = ''
|
||||||
tableStore.table.params.state = ''
|
tableStore.table.params.state = ''
|
||||||
tableStore.table.params.program = ''
|
tableStore.table.params.program = ''
|
||||||
tableStore.table.params.searchEvent = ''
|
tableStore.table.params.searchEvent = ''
|
||||||
tableStore.table.params.filterName = ''
|
tableStore.table.params.filterName = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
const tree2List = (list: any, id: any) => {
|
const tree2List = (list: any, id: any) => {
|
||||||
//存储结果的数组
|
//存储结果的数组
|
||||||
let arr: any = []
|
let arr: any = []
|
||||||
// 遍历 tree 数组
|
// 遍历 tree 数组
|
||||||
list.forEach((item: any) => {
|
list.forEach((item: any) => {
|
||||||
item.uPid = id
|
item.uPid = id
|
||||||
item.uId = Math.random() * 1000
|
item.uId = Math.random() * 1000
|
||||||
|
|
||||||
// 判断item是否存在children
|
// 判断item是否存在children
|
||||||
if (!item.children) return arr.push(item)
|
if (!item.children) return arr.push(item)
|
||||||
// 函数递归,对children数组进行tree2List的转换
|
// 函数递归,对children数组进行tree2List的转换
|
||||||
const children = tree2List(item.children, item.uId)
|
const children = tree2List(item.children, item.uId)
|
||||||
// 删除item的children属性
|
// 删除item的children属性
|
||||||
delete item.children
|
delete item.children
|
||||||
// 把item和children数组添加至结果数组
|
// 把item和children数组添加至结果数组
|
||||||
//..children: 意思是把children数组展开
|
//..children: 意思是把children数组展开
|
||||||
arr.push(item, ...children)
|
arr.push(item, ...children)
|
||||||
})
|
})
|
||||||
// 返回结果数组
|
// 返回结果数组
|
||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
|
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.searchState = 0
|
tableStore.table.params.searchState = 0
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getDevTypeList().then(res => {
|
getDevTypeList().then(res => {
|
||||||
teriminaloption.value = res.data
|
teriminaloption.value = res.data
|
||||||
})
|
})
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
const add = () => {}
|
const add = () => {}
|
||||||
const updateprogram = (row: any) => {
|
const updateprogram = (row: any) => {
|
||||||
protitle.value = row.name
|
protitle.value = row.name
|
||||||
prodialogVisible.value = true
|
prodialogVisible.value = true
|
||||||
}
|
}
|
||||||
const queryview = (row: any) => {
|
const queryview = (row: any) => {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
protitle.value = row.name
|
protitle.value = row.name
|
||||||
let data = {
|
let data = {
|
||||||
id: row.id
|
id: row.id
|
||||||
}
|
}
|
||||||
getTerminalUpLog(data).then((res: any) => {
|
getTerminalUpLog(data).then((res: any) => {
|
||||||
logtableData.value = res.data
|
logtableData.value = res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const format = (percentage: any) => {
|
const format = (percentage: any) => {
|
||||||
if (percentage <= 100 && percentage >= 90) {
|
if (percentage <= 100 && percentage >= 90) {
|
||||||
status.value = 'success'
|
status.value = 'success'
|
||||||
return percentage === 100 ? '升级成功' : `${percentage}%`
|
return percentage === 100 ? '升级成功' : `${percentage}%`
|
||||||
} else if (percentage > 0 && percentage < 50) {
|
} else if (percentage > 0 && percentage < 50) {
|
||||||
status.value = 'exception'
|
status.value = 'exception'
|
||||||
return percentage <= 20 ? '升级失败' + percentage + '%' : `${percentage}%`
|
return percentage <= 20 ? '升级失败' + percentage + '%' : `${percentage}%`
|
||||||
} else if (percentage > 0 && percentage <= 50) {
|
} else if (percentage > 0 && percentage <= 50) {
|
||||||
status.value = 'warning'
|
status.value = 'warning'
|
||||||
return percentage <= 50 ? '升级中断' : `${percentage}%`
|
return percentage <= 50 ? '升级中断' : `${percentage}%`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const formFilter = (row: any) => {
|
const formFilter = (row: any) => {
|
||||||
let title = '/'
|
let title = '/'
|
||||||
if (row.cellValue != null) {
|
if (row.cellValue != null) {
|
||||||
teriminaloption.value.forEach((item: any) => {
|
teriminaloption.value.forEach((item: any) => {
|
||||||
if (item.id == row.cellValue) {
|
if (item.id == row.cellValue) {
|
||||||
title = item.name
|
title = item.name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return title
|
return title
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表格过滤
|
// 表格过滤
|
||||||
const searchEvent = debounce(e => {
|
const searchEvent = debounce(e => {
|
||||||
const filterVal = XEUtils.toValueString(tableStore.table.params.filterName).trim().toLowerCase()
|
const filterVal = XEUtils.toValueString(tableStore.table.params.filterName).trim().toLowerCase()
|
||||||
if (filterVal) {
|
if (filterVal) {
|
||||||
const options = { children: 'children' }
|
const options = { children: 'children' }
|
||||||
const searchProps = ['name']
|
const searchProps = ['name']
|
||||||
const rest = XEUtils.searchTree(
|
const rest = XEUtils.searchTree(
|
||||||
treeDataCopy,
|
treeDataCopy,
|
||||||
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
|
|
||||||
treeData.value = rest
|
treeData.value = rest
|
||||||
|
|
||||||
// 搜索之后默认展开所有子节点
|
// 搜索之后默认展开所有子节点
|
||||||
} else {
|
} else {
|
||||||
treeData.value = treeDataCopy
|
treeData.value = treeDataCopy
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
const $table = tableRef.value
|
const $table = tableRef.value
|
||||||
if ($table) {
|
if ($table) {
|
||||||
$table.setAllTreeExpand(true)
|
$table.setAllTreeExpand(true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -1,282 +1,282 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main" style="position: relative">
|
<div class="default-main" style="position: relative">
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="终端型号">
|
<el-form-item label="终端型号">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.devType"
|
v-model="tableStore.table.params.devType"
|
||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择终端型号"
|
placeholder="请选择终端型号"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in teriminaloption"
|
v-for="item in teriminaloption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终端状态">
|
<el-form-item label="终端状态">
|
||||||
<el-select v-model="tableStore.table.params.runFlag" clearable placeholder="请选择终端状态">
|
<el-select v-model="tableStore.table.params.runFlag" clearable placeholder="请选择终端状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in teriminalstatusoption"
|
v-for="item in teriminalstatusoption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="通讯状态">
|
<el-form-item label="通讯状态">
|
||||||
<el-select v-model="tableStore.table.params.comFlag" clearable placeholder="请选择通讯状态">
|
<el-select v-model="tableStore.table.params.comFlag" clearable placeholder="请选择通讯状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stateoption"
|
v-for="item in stateoption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="筛选">
|
<el-form-item label="筛选数据">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.filterName"
|
v-model="tableStore.table.params.filterName"
|
||||||
@keyup="searchEvent"
|
@keyup="searchEvent"
|
||||||
clearable
|
clearable
|
||||||
placeholder="输入关键字筛选"
|
placeholder="输入关键字筛选"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button type="primary" icon="el-icon-DataLine" @click="manage('终端状态管理', 0)">
|
<el-button type="primary" icon="el-icon-DataLine" @click="manage('终端状态管理', 0)">
|
||||||
终端状态管理
|
终端状态管理
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- <el-button type="primary" icon="el-icon-Operation" @click="manage('流量套餐配置', 1)">
|
<!-- <el-button type="primary" icon="el-icon-Operation" @click="manage('流量套餐配置', 1)">
|
||||||
流量套餐配置
|
流量套餐配置
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
<!-- <el-button type="primary" icon="el-icon-Menu" @click="manage('流量策略配置', 2)">
|
<!-- <el-button type="primary" icon="el-icon-Menu" @click="manage('流量策略配置', 2)">
|
||||||
流量策略配置
|
流量策略配置
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button type="primary" icon="el-icon-Histogram" @click="liultjData">流量统计</el-button> -->
|
<el-button type="primary" icon="el-icon-Histogram" @click="liultjData">流量统计</el-button> -->
|
||||||
<!-- <el-button type="primary" icon="el-icon-Setting" @click="resect">重启前置程序</el-button> -->
|
<!-- <el-button type="primary" icon="el-icon-Setting" @click="resect">重启前置程序</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div :style="`height: calc(${tableStore.table.height} + 58px)`">
|
<div :style="`height: calc(${tableStore.table.height} + 58px)`">
|
||||||
<vxe-table
|
<vxe-table
|
||||||
v-loading="tableStore.table.loading"
|
v-loading="tableStore.table.loading"
|
||||||
height="auto"
|
height="auto"
|
||||||
auto-resize
|
auto-resize
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
v-bind="defaultAttribute"
|
v-bind="defaultAttribute"
|
||||||
:data="treeData"
|
:data="treeData"
|
||||||
show-overflow
|
show-overflow
|
||||||
:tree-config="{ transform: true, parentField: 'uPid', rowField: 'uId' }"
|
:tree-config="{ transform: true, parentField: 'uPid', rowField: 'uId' }"
|
||||||
:scroll-y="{ enabled: true }"
|
:scroll-y="{ enabled: true }"
|
||||||
:checkbox-config="{ labelField: 'name' }"
|
:checkbox-config="{ labelField: 'name' }"
|
||||||
>
|
>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
field="name"
|
field="name"
|
||||||
align="left"
|
align="left"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
title="电网拓扑"
|
title="电网拓扑"
|
||||||
min-width="200"
|
min-width="200"
|
||||||
tree-node
|
tree-node
|
||||||
></vxe-column>
|
></vxe-column>
|
||||||
<vxe-column field="devType" title="终端型号">
|
<vxe-column field="devType" title="终端型号">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ teriminaloption.find((item: any) => item.id === row.devType)?.name }}
|
{{ teriminaloption.find((item: any) => item.id === row.devType)?.name }}
|
||||||
</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 }">
|
||||||
<el-tag v-if="row.runFlag === 0" type="success" :disable-transitions="true" size="small">投运</el-tag>
|
<el-tag v-if="row.runFlag === 0" type="success" :disable-transitions="true" size="small">投运</el-tag>
|
||||||
<el-tag v-if="row.runFlag === 1" type="warning" :disable-transitions="true" size="small">检修</el-tag>
|
<el-tag v-if="row.runFlag === 1" type="warning" :disable-transitions="true" size="small">检修</el-tag>
|
||||||
<el-tag v-if="row.runFlag === 2" type="danger" :disable-transitions="true" size="small">停运</el-tag>
|
<el-tag v-if="row.runFlag === 2" type="danger" :disable-transitions="true" size="small">停运</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="comFlag" title="通讯状态">
|
<vxe-column field="comFlag" title="通讯状态">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag v-if="row.comFlag === 0" type="danger" :disable-transitions="true" size="small">中断</el-tag>
|
<el-tag v-if="row.comFlag === 0" type="danger" :disable-transitions="true" size="small">中断</el-tag>
|
||||||
<el-tag v-if="row.comFlag === 1" type="success" :disable-transitions="true" size="small">正常</el-tag>
|
<el-tag v-if="row.comFlag === 1" type="success" :disable-transitions="true" size="small">正常</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column title="操作" width="160">
|
<vxe-column title="操作" width="160">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<!-- <el-button v-if="row.level === 4" type="primary" size="small" link @click="uesdealia(row)">
|
<!-- <el-button v-if="row.level === 4" type="primary" size="small" link @click="uesdealia(row)">
|
||||||
终端详情
|
终端详情
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
<el-button v-if="row.level === 4" type="primary" size="small" link @click="log(row)">
|
<el-button v-if="row.level === 4" type="primary" size="small" link @click="log(row)">
|
||||||
查看日志
|
查看日志
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
<!-- 终端详情 -->
|
<!-- 终端详情 -->
|
||||||
<detail ref="detailRef" />
|
<detail ref="detailRef" />
|
||||||
<!-- 配置 -->
|
<!-- 配置 -->
|
||||||
<disposition ref="dispositionRef" @onSubmit="tableStore.index()" />
|
<disposition ref="dispositionRef" @onSubmit="tableStore.index()" />
|
||||||
<!-- 日志 -->
|
<!-- 日志 -->
|
||||||
<Log ref="logRef" v-if="logFlag" @close="logFlag = false" />
|
<Log ref="logRef" v-if="logFlag" @close="logFlag = false" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick, reactive } from 'vue'
|
import { ref, onMounted, provide, nextTick, reactive } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { getDevTypeList } from '@/api/device-boot/modelManage'
|
import { getDevTypeList } from '@/api/device-boot/modelManage'
|
||||||
import XEUtils from 'xe-utils'
|
import XEUtils from 'xe-utils'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
|
|
||||||
import disposition from './components/disposition.vue'
|
import disposition from './components/disposition.vue'
|
||||||
import detail from './components/detail.vue'
|
import detail from './components/detail.vue'
|
||||||
import Log from './components/log.vue'
|
import Log from './components/log.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'BusinessAdministrator/TerminalManagement/TerminalManagement'
|
name: 'BusinessAdministrator/TerminalManagement/TerminalManagement'
|
||||||
})
|
})
|
||||||
const dispositionRef = ref()
|
const dispositionRef = ref()
|
||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
const logRef = ref()
|
const logRef = ref()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const logFlag = ref(false)
|
const logFlag = ref(false)
|
||||||
const teriminaloption: any = ref([])
|
const teriminaloption: any = ref([])
|
||||||
|
|
||||||
const teriminalstatusoption = ref([
|
const teriminalstatusoption = ref([
|
||||||
{ name: '全部', id: '' },
|
{ name: '全部', id: '' },
|
||||||
{ name: '投运', id: 0 },
|
{ name: '投运', id: 0 },
|
||||||
{ name: '检修', id: 1 },
|
{ name: '检修', id: 1 },
|
||||||
{ name: '停运', id: 2 }
|
{ name: '停运', id: 2 }
|
||||||
])
|
])
|
||||||
const stateoption = ref([
|
const stateoption = ref([
|
||||||
{ name: '全部', id: '' },
|
{ name: '全部', id: '' },
|
||||||
{ name: '正常', id: 1 },
|
{ name: '正常', id: 1 },
|
||||||
{ name: '中断', id: 0 }
|
{ name: '中断', id: 0 }
|
||||||
])
|
])
|
||||||
const treeData: any = ref([])
|
const treeData: any = ref([])
|
||||||
const treeDataCopy: any = ref([])
|
const treeDataCopy: any = ref([])
|
||||||
|
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/device-boot/maintain/getTerminalMainList',
|
url: '/device-boot/maintain/getTerminalMainList',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [],
|
column: [],
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
treeData.value = tree2List(tableStore.table.data, Math.random() * 1000)
|
treeData.value = tree2List(tableStore.table.data, Math.random() * 1000)
|
||||||
treeDataCopy.value = JSON.parse(JSON.stringify(treeData.value))
|
treeDataCopy.value = JSON.parse(JSON.stringify(treeData.value))
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
tableRef.value.setAllTreeExpand(true)
|
tableRef.value.setAllTreeExpand(true)
|
||||||
}, 0)
|
}, 0)
|
||||||
searchEvent()
|
searchEvent()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.devType = ''
|
tableStore.table.params.devType = ''
|
||||||
tableStore.table.params.runFlag = ''
|
tableStore.table.params.runFlag = ''
|
||||||
tableStore.table.params.comFlag = ''
|
tableStore.table.params.comFlag = ''
|
||||||
tableStore.table.params.filterName = ''
|
tableStore.table.params.filterName = ''
|
||||||
// 处理大数据卡顿
|
// 处理大数据卡顿
|
||||||
const tree2List = (list: any, id: any) => {
|
const tree2List = (list: any, id: any) => {
|
||||||
//存储结果的数组
|
//存储结果的数组
|
||||||
let arr: any = []
|
let arr: any = []
|
||||||
// 遍历 tree 数组
|
// 遍历 tree 数组
|
||||||
list.forEach((item: any) => {
|
list.forEach((item: any) => {
|
||||||
item.uPid = id
|
item.uPid = id
|
||||||
item.uId = Math.random() * 1000
|
item.uId = Math.random() * 1000
|
||||||
|
|
||||||
// 判断item是否存在children
|
// 判断item是否存在children
|
||||||
if (!item.children) return arr.push(item)
|
if (!item.children) return arr.push(item)
|
||||||
// 函数递归,对children数组进行tree2List的转换
|
// 函数递归,对children数组进行tree2List的转换
|
||||||
const children = tree2List(item.children, item.uId)
|
const children = tree2List(item.children, item.uId)
|
||||||
// 删除item的children属性
|
// 删除item的children属性
|
||||||
delete item.children
|
delete item.children
|
||||||
// 把item和children数组添加至结果数组
|
// 把item和children数组添加至结果数组
|
||||||
//..children: 意思是把children数组展开
|
//..children: 意思是把children数组展开
|
||||||
arr.push(item, ...children)
|
arr.push(item, ...children)
|
||||||
})
|
})
|
||||||
// 返回结果数组
|
// 返回结果数组
|
||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.searchState = 0
|
tableStore.table.params.searchState = 0
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getDevTypeList().then(res => {
|
getDevTypeList().then(res => {
|
||||||
teriminaloption.value = res.data
|
teriminaloption.value = res.data
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 终端状态管理
|
// 终端状态管理
|
||||||
const manage = (name: string, key: number) => {
|
const manage = (name: string, key: number) => {
|
||||||
const $table = tableRef.value
|
const $table = tableRef.value
|
||||||
if ($table) {
|
if ($table) {
|
||||||
const selectRecords = $table
|
const selectRecords = $table
|
||||||
.getCheckboxRecords()
|
.getCheckboxRecords()
|
||||||
.filter((item: any) => item.level == 4)
|
.filter((item: any) => item.level == 4)
|
||||||
.map(item => item.id)
|
.map(item => item.id)
|
||||||
console.log('🚀 ~ deviceData ~ selectRecords:', selectRecords)
|
console.log('🚀 ~ deviceData ~ selectRecords:', selectRecords)
|
||||||
if (selectRecords.length == 0) {
|
if (selectRecords.length == 0) {
|
||||||
return ElMessage({
|
return ElMessage({
|
||||||
message: '请至少选择一台装置',
|
message: '请至少选择一台装置',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
dispositionRef.value.open({
|
dispositionRef.value.open({
|
||||||
title: name,
|
title: name,
|
||||||
id: selectRecords,
|
id: selectRecords,
|
||||||
key: key
|
key: key
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 流量统计
|
// 流量统计
|
||||||
const liultjData = () => {}
|
const liultjData = () => {}
|
||||||
// 重启前置程序
|
// 重启前置程序
|
||||||
const resect = () => {}
|
const resect = () => {}
|
||||||
|
|
||||||
// 终端详情
|
// 终端详情
|
||||||
const uesdealia = (row: any) => {
|
const uesdealia = (row: any) => {
|
||||||
detailRef.value.open(row)
|
detailRef.value.open(row)
|
||||||
}
|
}
|
||||||
// 流量详情
|
// 流量详情
|
||||||
const log = (row: any) => {
|
const log = (row: any) => {
|
||||||
logFlag.value = true
|
logFlag.value = true
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
logRef.value.open(row)
|
logRef.value.open(row)
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表格过滤
|
// 表格过滤
|
||||||
const searchEvent = debounce(() => {
|
const searchEvent = debounce(() => {
|
||||||
const filterVal = XEUtils.toValueString(tableStore.table.params.filterName).trim().toLowerCase()
|
const filterVal = XEUtils.toValueString(tableStore.table.params.filterName).trim().toLowerCase()
|
||||||
if (filterVal) {
|
if (filterVal) {
|
||||||
const options = { children: 'children' }
|
const options = { children: 'children' }
|
||||||
const searchProps = ['name']
|
const searchProps = ['name']
|
||||||
const rest = XEUtils.searchTree(
|
const rest = XEUtils.searchTree(
|
||||||
treeDataCopy.value,
|
treeDataCopy.value,
|
||||||
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
treeData.value = rest
|
treeData.value = rest
|
||||||
|
|
||||||
// 搜索之后默认展开所有子节点
|
// 搜索之后默认展开所有子节点
|
||||||
} else {
|
} else {
|
||||||
treeData.value = treeDataCopy.value
|
treeData.value = treeDataCopy.value
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
const $table = tableRef.value
|
const $table = tableRef.value
|
||||||
if ($table) {
|
if ($table) {
|
||||||
$table.setAllTreeExpand(true)
|
$table.setAllTreeExpand(true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 500)
|
}, 500)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -54,14 +54,17 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="right: 500px; position: absolute; overflow: hidden">
|
<el-form-item style="right: 500px; position: absolute; overflow: hidden">
|
||||||
<LocationInformation style="width: 16px; margin-right: 8px; color: var(--el-color-primary)" />
|
<LocationInformation
|
||||||
<span style="font-size: 16px; font-weight: bold; color: var(--el-color-primary)">当前操作节点:</span>
|
style="width: 16px; margin-right: 8px; color: var(--el-color-primary)"
|
||||||
|
/>
|
||||||
|
<span style="font-size: 16px; font-weight: bold; color: var(--el-color-primary)">
|
||||||
|
当前操作节点:
|
||||||
|
</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="right: 0; position: absolute; overflow: hidden">
|
<el-form-item style="right: 0; position: absolute; overflow: hidden">
|
||||||
<div class="title" :class="titleList.length > 5 ? 'titleScroll' : ''">
|
<div class="title" :class="titleList.length > 5 ? 'titleScroll' : ''">
|
||||||
<span v-for="(item, index) in titleList">{{ index == 0 ? '' : ' > ' }}{{ item }}</span>
|
<span v-for="(item, index) in titleList">{{ index == 0 ? '' : ' > ' }}{{ item }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div id="scrollBox" :style="{ height: Height.height }" style="overflow-y: auto">
|
<div id="scrollBox" :style="{ height: Height.height }" style="overflow-y: auto">
|
||||||
@@ -1691,7 +1694,7 @@ import { useDictData } from '@/stores/dictData'
|
|||||||
import { ref, reactive, onMounted } from 'vue'
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { getYwZtSubstation } from '@/api/device-boot/device'
|
import { getYwZtSubstation } from '@/api/device-boot/device'
|
||||||
const size = ref(0)
|
const size = ref(23)
|
||||||
const TerminalRef = ref()
|
const TerminalRef = ref()
|
||||||
const pageHeight = mainHeight(20)
|
const pageHeight = mainHeight(20)
|
||||||
const Height = mainHeight(100)
|
const Height = mainHeight(100)
|
||||||
@@ -2024,12 +2027,12 @@ const latff: any = ref((rule: any, value: any, callback: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const plevel = ref(0)
|
const plevel = ref(0)
|
||||||
const nodeDataList=ref()
|
const nodeDataList = ref()
|
||||||
const nodeEventList=ref()
|
const nodeEventList = ref()
|
||||||
const nodeLevel1=ref(0)
|
const nodeLevel1 = ref(0)
|
||||||
const nodeClick = (e: anyObj, data: any) => {
|
const nodeClick = (e: anyObj, data: any) => {
|
||||||
nodeDataList.value = data
|
nodeDataList.value = data
|
||||||
nodeEventList.value = e
|
nodeEventList.value = e
|
||||||
plevel.value = data.data.plevel
|
plevel.value = data.data.plevel
|
||||||
treeClickCount.value++
|
treeClickCount.value++
|
||||||
if (treeClickCount.value > 2) return
|
if (treeClickCount.value > 2) return
|
||||||
@@ -2338,7 +2341,9 @@ const next = async () => {
|
|||||||
break
|
break
|
||||||
case 600:
|
case 600:
|
||||||
addLine()
|
addLine()
|
||||||
selectChanged(AddProjectBO.value.deviceParam[deviceIndex.value].subVoltageParam[busBarIndex.value].scale)
|
selectChanged(
|
||||||
|
AddProjectBO.value.deviceParam[deviceIndex.value].subVoltageParam[busBarIndex.value].scale
|
||||||
|
)
|
||||||
nextfalg.value = false
|
nextfalg.value = false
|
||||||
break
|
break
|
||||||
case 700:
|
case 700:
|
||||||
@@ -2355,8 +2360,7 @@ const black = () => {
|
|||||||
busBarIndex.value = '0'
|
busBarIndex.value = '0'
|
||||||
deviceIndex.value = '0'
|
deviceIndex.value = '0'
|
||||||
lineIndex.value = '0'
|
lineIndex.value = '0'
|
||||||
nodeClick(nodeEventList.value,nodeDataList.value)
|
nodeClick(nodeEventList.value, nodeDataList.value)
|
||||||
|
|
||||||
}
|
}
|
||||||
// 确认提交
|
// 确认提交
|
||||||
const onsubmit = () => {
|
const onsubmit = () => {
|
||||||
@@ -3073,7 +3077,7 @@ const setDown = () => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
if (dom) {
|
if (dom) {
|
||||||
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||||
}
|
}
|
||||||
if (VITE_FLAG) {
|
if (VITE_FLAG) {
|
||||||
getYwZtSubstation({ orgId: '' }).then(res => {
|
getYwZtSubstation({ orgId: '' }).then(res => {
|
||||||
|
|||||||
@@ -110,10 +110,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
|
||||||
@@ -485,7 +482,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) => {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader :showSearch="false" v-show="flag">
|
<TableHeader :showSearch="false" v-show="flag">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="日期">
|
<el-form-item label="统计时间">
|
||||||
<DatePicker
|
<DatePicker
|
||||||
ref="datePickerRef"
|
ref="datePickerRef"
|
||||||
:nextFlag="false"
|
:nextFlag="false"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
<TableHeader :showSearch="false">
|
<TableHeader :showSearch="false">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="日期">
|
<el-form-item label="统计时间">
|
||||||
<DatePicker ref="datePickerRef" :nextFlag="false" :theCurrentTime="true"></DatePicker>
|
<DatePicker ref="datePickerRef" :nextFlag="false" :theCurrentTime="true"></DatePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -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,341 +1,346 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main" :style="height">
|
<div class="default-main" :style="height">
|
||||||
<!-- 算法库 -->
|
<!-- 算法库 -->
|
||||||
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
||||||
<pane :size="size">
|
<pane :size="size">
|
||||||
<algorithmTree ref="treeRef" :default-expand-all="false"
|
<algorithmTree
|
||||||
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
ref="treeRef"
|
||||||
:current-node-key="monitoringPoint.state.lineId" @node-click="handleNodeClick"
|
:default-expand-all="false"
|
||||||
@init="handleNodeClick" @onAddTree="onAddTree"></algorithmTree>
|
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
||||||
</pane>
|
:current-node-key="monitoringPoint.state.lineId"
|
||||||
<pane style="background: #fff" :style="height">
|
@node-click="handleNodeClick"
|
||||||
<div class="boxTop">
|
@init="handleNodeClick"
|
||||||
<div>
|
@onAddTree="onAddTree"
|
||||||
<el-radio-group v-model="radio">
|
></algorithmTree>
|
||||||
<el-radio-button v-for="(item, i) in dotList?.childrens" :label="item.name" :value="i" />
|
</pane>
|
||||||
</el-radio-group>
|
<pane style="background: #fff" :style="height">
|
||||||
</div>
|
<div class="boxTop">
|
||||||
<div v-if="information">
|
<div>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addUser">
|
<el-radio-group v-model="radio">
|
||||||
新增
|
<el-radio-button v-for="(item, i) in dotList?.childrens" :label="item.name" :value="i" />
|
||||||
</el-button>
|
</el-radio-group>
|
||||||
<el-button icon="el-icon-Edit" type="primary" @click="revise">修改</el-button>
|
</div>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deletes">删除</el-button>
|
<div v-if="information">
|
||||||
</div>
|
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
|
||||||
</div>
|
<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 :style="heightTab">
|
</div>
|
||||||
<vxe-table height="auto" v-bind="defaultAttribute" :data="dotList?.childrens[radio]?.children">
|
</div>
|
||||||
<vxe-column field="name" title="算法名称"></vxe-column>
|
|
||||||
<vxe-column field="createTime" title="创建时间"></vxe-column>
|
<div :style="heightTab">
|
||||||
|
<vxe-table height="auto" v-bind="defaultAttribute" :data="dotList?.childrens[radio]?.children">
|
||||||
<vxe-column field="period" title="计算周期">
|
<vxe-column field="name" title="算法名称"></vxe-column>
|
||||||
<template #default="{ row }">
|
<vxe-column field="createTime" title="创建时间"></vxe-column>
|
||||||
{{
|
|
||||||
row.period == 0
|
<vxe-column field="period" title="计算周期">
|
||||||
? '日'
|
<template #default="{ row }">
|
||||||
: row.period == 1
|
{{
|
||||||
? '月'
|
row.period == 0
|
||||||
: row.period == 2
|
? '日'
|
||||||
? '季'
|
: row.period == 1
|
||||||
: row.period == 3
|
? '月'
|
||||||
? '年'
|
: row.period == 2
|
||||||
: ''
|
? '季'
|
||||||
}}
|
: row.period == 3
|
||||||
</template>
|
? '年'
|
||||||
</vxe-column>
|
: ''
|
||||||
<vxe-column field="source" title="数据来源"></vxe-column>
|
}}
|
||||||
<!-- <vxe-column field="useFLag" title="是否启用">
|
</template>
|
||||||
<template #default="{ row }">
|
</vxe-column>
|
||||||
<el-tag :type="row.useFLag === 1 ? 'success' : 'info'" effect="dark"
|
<vxe-column field="source" title="数据来源"></vxe-column>
|
||||||
style="cursor: pointer" @click="change(row)">
|
<!-- <vxe-column field="useFLag" title="是否启用">
|
||||||
{{ row.useFLag === 1 ? '是' : '否' }}
|
<template #default="{ row }">
|
||||||
</el-tag>
|
<el-tag :type="row.useFLag === 1 ? 'success' : 'info'" effect="dark"
|
||||||
</template>
|
style="cursor: pointer" @click="change(row)">
|
||||||
</vxe-column> -->
|
{{ row.useFLag === 1 ? '是' : '否' }}
|
||||||
<vxe-column field="definition" title="定义">
|
</el-tag>
|
||||||
<template #default="{ row }">
|
</template>
|
||||||
|
</vxe-column> -->
|
||||||
<el-button type="primary" link @click="view(row)">查看</el-button>
|
<vxe-column field="definition" title="定义">
|
||||||
</template>
|
<template #default="{ row }">
|
||||||
|
<el-button type="primary" link @click="view(row)">查看</el-button>
|
||||||
</vxe-column>
|
</template>
|
||||||
<!-- <vxe-column title="操作" width="150px">
|
</vxe-column>
|
||||||
<template #default="{ row }">
|
<!-- <vxe-column title="操作" width="150px">
|
||||||
<el-button type="primary" link @click="edit(row)">修改</el-button>
|
<template #default="{ row }">
|
||||||
<el-button type="danger" link @click="del(row)">删除</el-button>
|
<el-button type="primary" link @click="edit(row)">修改</el-button>
|
||||||
<el-popconfirm title="确定删除吗?" confirm-button-type='danger' @confirm="del(row)">
|
<el-button type="danger" link @click="del(row)">删除</el-button>
|
||||||
<template #reference>
|
<el-popconfirm title="确定删除吗?" confirm-button-type='danger' @confirm="del(row)">
|
||||||
<el-button type="danger" link>删除</el-button>
|
<template #reference>
|
||||||
</template>
|
<el-button type="danger" link>删除</el-button>
|
||||||
</el-popconfirm>
|
</template>
|
||||||
</template>
|
</el-popconfirm>
|
||||||
</vxe-column> -->
|
</template>
|
||||||
</vxe-table>
|
</vxe-column> -->
|
||||||
</div>
|
</vxe-table>
|
||||||
</pane>
|
</div>
|
||||||
</splitpanes>
|
</pane>
|
||||||
<!-- 树弹框 -->
|
</splitpanes>
|
||||||
<addTree ref="addTreeRef" @getTree="treeRef.loadData(dotList.id)" />
|
<!-- 树弹框 -->
|
||||||
<!-- 弹框 -->
|
<addTree ref="addTreeRef" @getTree="treeRef.loadData(dotList.id)" />
|
||||||
<PopupEdit ref="popupEditRef" v-if="popupEditFlag"
|
<!-- 弹框 -->
|
||||||
@getTree="treeRef.loadData(dotList.id), (popupEditFlag = false)" />
|
<PopupEdit
|
||||||
<!-- 定义 -->
|
ref="popupEditRef"
|
||||||
<el-dialog draggable v-model="viewFlag" title="定义" width="60%">
|
v-if="popupEditFlag"
|
||||||
<div style="min-height: 300px; max-height: 55vh;">
|
@getTree="treeRef.loadData(dotList.id), (popupEditFlag = false)"
|
||||||
<div class="editor" ref="editorRef" v-html="summary" />
|
/>
|
||||||
|
<!-- 定义 -->
|
||||||
</div>
|
<el-dialog draggable v-model="viewFlag" title="定义" width="60%">
|
||||||
</el-dialog>
|
<div style="min-height: 300px; max-height: 55vh">
|
||||||
<!-- 删除 -->
|
<div class="editor" ref="editorRef" v-html="summary" />
|
||||||
<el-dialog draggable v-model="dialogVisible" title="请选择需要删除的数据" width="400">
|
</div>
|
||||||
<el-tree-select v-model="TreeValue" :data="TreeData" filterable check-strictly :props="defaultProps"
|
</el-dialog>
|
||||||
default-expand-all :render-after-expand="false" />
|
<!-- 删除 -->
|
||||||
<template #footer>
|
<el-dialog draggable v-model="dialogVisible" title="请选择需要删除的数据" width="400">
|
||||||
<div class="dialog-footer">
|
<el-tree-select
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
v-model="TreeValue"
|
||||||
<el-button type="primary" @click="del">删除</el-button>
|
:data="TreeData"
|
||||||
</div>
|
filterable
|
||||||
</template>
|
check-strictly
|
||||||
</el-dialog>
|
:props="defaultProps"
|
||||||
</div>
|
default-expand-all
|
||||||
</template>
|
:render-after-expand="false"
|
||||||
<script setup lang="ts">
|
/>
|
||||||
import { onMounted, ref, provide } from 'vue'
|
<template #footer>
|
||||||
import 'splitpanes/dist/splitpanes.css'
|
<div class="dialog-footer">
|
||||||
import { Splitpanes, Pane } from 'splitpanes'
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
import algorithmTree from '@/components/tree/pqs/algorithmTree.vue'
|
<el-button type="primary" @click="del">删除</el-button>
|
||||||
import { mainHeight } from '@/utils/layout'
|
</div>
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
</template>
|
||||||
import { getLineExport, getList, selectReleation } from '@/api/event-boot/report'
|
</el-dialog>
|
||||||
import addTree from './components/addTree.vue'
|
</div>
|
||||||
import PopupEdit from './components/form.vue'
|
</template>
|
||||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
<script setup lang="ts">
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { onMounted, ref, provide } from 'vue'
|
||||||
import { deleteyById } from '@/api/supervision-boot/database/index'
|
import 'splitpanes/dist/splitpanes.css'
|
||||||
import { queryAllAlgorithmLibrary, updateAlgorithmLibrary } from '@/api/supervision-boot/database/index'
|
import { Splitpanes, Pane } from 'splitpanes'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import algorithmTree from '@/components/tree/pqs/algorithmTree.vue'
|
||||||
import katex from "katex";
|
import { mainHeight } from '@/utils/layout'
|
||||||
import "katex/dist/katex.css";
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
const adminInfo = useAdminInfo()
|
import { getLineExport, getList, selectReleation } from '@/api/event-boot/report'
|
||||||
defineOptions({
|
import addTree from './components/addTree.vue'
|
||||||
name: 'database/algorithm'
|
import PopupEdit from './components/form.vue'
|
||||||
})
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||||
const monitoringPoint = useMonitoringPoint()
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
const height = mainHeight(20)
|
import { deleteyById } from '@/api/supervision-boot/database/index'
|
||||||
const heightTab = mainHeight(82)
|
import { queryAllAlgorithmLibrary, updateAlgorithmLibrary } from '@/api/supervision-boot/database/index'
|
||||||
const size = ref(0)
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
const addTreeRef = ref()
|
import katex from 'katex'
|
||||||
const editorRef = ref()
|
import 'katex/dist/katex.css'
|
||||||
const dialogVisible = ref(false)
|
const adminInfo = useAdminInfo()
|
||||||
const viewFlag = ref(false)
|
defineOptions({
|
||||||
const popupEditFlag = ref(false)
|
name: 'database/algorithm'
|
||||||
const treeRef = ref()
|
})
|
||||||
const summary = ref('')
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const popupEditRef = ref()
|
const height = mainHeight(20)
|
||||||
const TreeData = ref([])
|
const heightTab = mainHeight(82)
|
||||||
const TreeValue = ref([])
|
const size = ref(23)
|
||||||
const information = adminInfo.roleCode.includes('information_info')
|
const addTreeRef = ref()
|
||||||
|
const editorRef = ref()
|
||||||
const defaultProps = {
|
const dialogVisible = ref(false)
|
||||||
label: 'name',
|
const viewFlag = ref(false)
|
||||||
value: 'id'
|
const popupEditFlag = ref(false)
|
||||||
}
|
const treeRef = ref()
|
||||||
const dotList: any = ref()
|
const summary = ref('')
|
||||||
|
const popupEditRef = ref()
|
||||||
const templatePolicy: any = ref([])
|
const TreeData = ref([])
|
||||||
// const tableStore = new TableStore({
|
const TreeValue = ref([])
|
||||||
// url: '/supervision-boot/libalgorithm/queryAllAlgorithmLibrary',
|
const information = adminInfo.roleCode.includes('information_info')
|
||||||
// method: 'GET',
|
|
||||||
// column: [
|
const defaultProps = {
|
||||||
// { title: '算法名称', field: 'name' },
|
label: 'name',
|
||||||
// {
|
value: 'id'
|
||||||
// title: '定义',
|
}
|
||||||
// field: 'name1'
|
const dotList: any = ref()
|
||||||
// },
|
|
||||||
// {
|
const templatePolicy: any = ref([])
|
||||||
// title: '计算公式',
|
// const tableStore = new TableStore({
|
||||||
// field: 'name2'
|
// url: '/supervision-boot/libalgorithm/queryAllAlgorithmLibrary',
|
||||||
// },
|
// method: 'GET',
|
||||||
// {
|
// column: [
|
||||||
// title: '计算周期',
|
// { title: '算法名称', field: 'name' },
|
||||||
// field: 'name3'
|
// {
|
||||||
// },
|
// title: '定义',
|
||||||
// {
|
// field: 'name1'
|
||||||
// title: '数据来源',
|
// },
|
||||||
// field: 'name4'
|
// {
|
||||||
// },
|
// title: '计算公式',
|
||||||
// {
|
// field: 'name2'
|
||||||
// title: '是否启用',
|
// },
|
||||||
// field: 'name5',
|
// {
|
||||||
// render: 'tag',
|
// title: '计算周期',
|
||||||
// effect: 'dark',
|
// field: 'name3'
|
||||||
// custom: {
|
// },
|
||||||
// 0: 'info',
|
// {
|
||||||
// 1: 'success'
|
// title: '数据来源',
|
||||||
// },
|
// field: 'name4'
|
||||||
// replaceValue: {
|
// },
|
||||||
// 0: '否',
|
// {
|
||||||
// 1: '是'
|
// title: '是否启用',
|
||||||
// }
|
// field: 'name5',
|
||||||
// }
|
// render: 'tag',
|
||||||
// ],
|
// effect: 'dark',
|
||||||
// loadCallback: () => {}
|
// custom: {
|
||||||
// })
|
// 0: 'info',
|
||||||
const radio = ref(0)
|
// 1: 'success'
|
||||||
|
// },
|
||||||
// 新增弹框
|
// replaceValue: {
|
||||||
const addUser = () => {
|
// 0: '否',
|
||||||
popupEditFlag.value = true
|
// 1: '是'
|
||||||
setTimeout(() => {
|
// }
|
||||||
popupEditRef.value.open({
|
// }
|
||||||
title: '新增算法'
|
// ],
|
||||||
})
|
// loadCallback: () => {}
|
||||||
}, 100)
|
// })
|
||||||
}
|
const radio = ref(0)
|
||||||
// 修改弹框
|
|
||||||
const revise = () => {
|
// 新增弹框
|
||||||
popupEditFlag.value = true
|
const addUser = () => {
|
||||||
setTimeout(() => {
|
popupEditFlag.value = true
|
||||||
popupEditRef.value.open({
|
setTimeout(() => {
|
||||||
title: '修改算法',
|
popupEditRef.value.open({
|
||||||
row: dotList.value
|
title: '新增算法'
|
||||||
})
|
})
|
||||||
}, 100)
|
}, 100)
|
||||||
}
|
}
|
||||||
|
// 修改弹框
|
||||||
onMounted(() => {
|
const revise = () => {
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
popupEditFlag.value = true
|
||||||
if (dom) {
|
setTimeout(() => {
|
||||||
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
popupEditRef.value.open({
|
||||||
}
|
title: '修改算法',
|
||||||
// tableStore.index()
|
row: dotList.value
|
||||||
})
|
})
|
||||||
|
}, 100)
|
||||||
const view = (row: any) => {
|
}
|
||||||
|
|
||||||
viewFlag.value = true
|
onMounted(() => {
|
||||||
summary.value = row.definition
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
setTimeout(() => {
|
if (dom) {
|
||||||
|
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||||
const spans = document.querySelectorAll('span[data-value]');
|
}
|
||||||
// 遍历每个 span 标签
|
// tableStore.index()
|
||||||
spans.forEach(function (span) {
|
})
|
||||||
|
|
||||||
let val = katex.renderToString(span.getAttribute('data-value'), {
|
const view = (row: any) => {
|
||||||
throwOnError: false,
|
viewFlag.value = true
|
||||||
})
|
summary.value = row.definition
|
||||||
// var newDiv = document.createElement('div');
|
setTimeout(() => {
|
||||||
var newDiv = span
|
const spans = document.querySelectorAll('span[data-value]')
|
||||||
newDiv.innerHTML = val;
|
// 遍历每个 span 标签
|
||||||
|
spans.forEach(function (span) {
|
||||||
span.parentNode.replaceChild(newDiv, span);
|
let val = katex.renderToString(span.getAttribute('data-value'), {
|
||||||
});
|
throwOnError: false
|
||||||
|
})
|
||||||
}, 100)
|
// var newDiv = document.createElement('div');
|
||||||
|
var newDiv = span
|
||||||
//
|
newDiv.innerHTML = val
|
||||||
}
|
|
||||||
|
span.parentNode.replaceChild(newDiv, span)
|
||||||
|
})
|
||||||
const handleNodeClick = (data: any, node: any) => {
|
}, 100)
|
||||||
if (data.pid != '0') {
|
|
||||||
dotList.value = data
|
//
|
||||||
radio.value = 0
|
}
|
||||||
}
|
|
||||||
}
|
const handleNodeClick = (data: any, node: any) => {
|
||||||
const onAddTree = () => {
|
if (data.pid != '0') {
|
||||||
addTreeRef.value.open('新增')
|
dotList.value = data
|
||||||
}
|
radio.value = 0
|
||||||
const deletes = () => {
|
}
|
||||||
TreeValue.value = []
|
}
|
||||||
queryAllAlgorithmLibrary().then(res => {
|
const onAddTree = () => {
|
||||||
TreeData.value = res.data
|
addTreeRef.value.open('新增')
|
||||||
})
|
}
|
||||||
dialogVisible.value = true
|
const deletes = () => {
|
||||||
}
|
TreeValue.value = []
|
||||||
// 删除
|
queryAllAlgorithmLibrary().then(res => {
|
||||||
const del = () => {
|
TreeData.value = res.data
|
||||||
if (TreeValue.value.length == 0) {
|
})
|
||||||
return ElMessage.warning('请选择数据')
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
// 删除
|
||||||
confirmButtonText: '确定',
|
const del = () => {
|
||||||
cancelButtonText: '取消',
|
if (TreeValue.value.length == 0) {
|
||||||
type: 'warning'
|
return ElMessage.warning('请选择数据')
|
||||||
}).then(() => {
|
}
|
||||||
deleteyById({ id: TreeValue.value }).then(res => {
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
ElMessage.success('删除成功')
|
confirmButtonText: '确定',
|
||||||
dialogVisible.value = false
|
cancelButtonText: '取消',
|
||||||
treeRef.value.loadData()
|
type: 'warning'
|
||||||
})
|
}).then(() => {
|
||||||
})
|
deleteyById({ id: TreeValue.value }).then(res => {
|
||||||
|
ElMessage.success('删除成功')
|
||||||
// if (TreeValue.value.length > 0) {
|
dialogVisible.value = false
|
||||||
// ElMessage.warning('请选择数据')
|
treeRef.value.loadData()
|
||||||
// return
|
})
|
||||||
// }
|
})
|
||||||
}
|
|
||||||
// 启用
|
// if (TreeValue.value.length > 0) {
|
||||||
const change = (row: any) => {
|
// ElMessage.warning('请选择数据')
|
||||||
console.log('🚀 ~ change ~ row:', row)
|
// return
|
||||||
ElMessageBox.confirm(`请确认是否${row.useFLag == 0 ? '启用' : '关闭'}算法?`, '提示', {
|
// }
|
||||||
confirmButtonText: '确定',
|
}
|
||||||
cancelButtonText: '取消',
|
// 启用
|
||||||
type: 'warning'
|
const change = (row: any) => {
|
||||||
}).then(() => {
|
console.log('🚀 ~ change ~ row:', row)
|
||||||
updateAlgorithmLibrary({ ...row, useFLag: row.useFLag == 0 ? 1 : 0 }).then(res => {
|
ElMessageBox.confirm(`请确认是否${row.useFLag == 0 ? '启用' : '关闭'}算法?`, '提示', {
|
||||||
ElMessage.success(row.useFLag == 0 ? '启用' : '关闭' + '成功')
|
confirmButtonText: '确定',
|
||||||
treeRef.value.loadData(dotList.value.id)
|
cancelButtonText: '取消',
|
||||||
})
|
type: 'warning'
|
||||||
})
|
}).then(() => {
|
||||||
}
|
updateAlgorithmLibrary({ ...row, useFLag: row.useFLag == 0 ? 1 : 0 }).then(res => {
|
||||||
</script>
|
ElMessage.success(row.useFLag == 0 ? '启用' : '关闭' + '成功')
|
||||||
<style lang="scss">
|
treeRef.value.loadData(dotList.value.id)
|
||||||
.splitpanes.default-theme .splitpanes__pane {
|
})
|
||||||
background: #eaeef1;
|
})
|
||||||
}
|
}
|
||||||
|
</script>
|
||||||
.grid-content {
|
<style lang="scss">
|
||||||
text-align: center;
|
.splitpanes.default-theme .splitpanes__pane {
|
||||||
}
|
background: #eaeef1;
|
||||||
|
}
|
||||||
.el-divider--horizontal {
|
|
||||||
margin: 10px 0;
|
.grid-content {
|
||||||
}
|
text-align: center;
|
||||||
|
}
|
||||||
.mTop {
|
|
||||||
margin-top: 5px;
|
.el-divider--horizontal {
|
||||||
margin-bottom: 5px;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.boxTop {
|
.mTop {
|
||||||
height: 52px;
|
margin-top: 5px;
|
||||||
padding: 10px 10px 10px 0;
|
margin-bottom: 5px;
|
||||||
display: flex;
|
}
|
||||||
justify-content: space-between;
|
|
||||||
}
|
.boxTop {
|
||||||
|
height: 52px;
|
||||||
.editor {
|
padding: 10px 10px 10px 0;
|
||||||
table {
|
display: flex;
|
||||||
width: 100%;
|
justify-content: space-between;
|
||||||
border-collapse: collapse;
|
}
|
||||||
}
|
|
||||||
|
.editor {
|
||||||
th,
|
table {
|
||||||
td {
|
width: 100%;
|
||||||
border: 1px solid black;
|
border-collapse: collapse;
|
||||||
padding: 8px;
|
}
|
||||||
text-align: center;
|
|
||||||
}
|
th,
|
||||||
|
td {
|
||||||
th {
|
border: 1px solid black;
|
||||||
background-color: #f2f2f2;
|
padding: 8px;
|
||||||
font-weight: bold;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
th {
|
||||||
background-color: #ffffff;
|
background-color: #f2f2f2;
|
||||||
}
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
td {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<div style="display: flex;align-items: center;">
|
<div style="display: flex;align-items: center;">
|
||||||
<div>{{ item.name }}</div>
|
<div>{{ item.name }}</div>
|
||||||
|
|
||||||
<el-icon class="elView" v-if="item.name" @click="view(item)">
|
<el-icon class="elView" v-if="item.name && VITE_FLAG" @click="view(item)">
|
||||||
<View />
|
<View />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
<el-icon class="elView" v-if="item.name" @click="download(item)">
|
<el-icon class="elView" v-if="item.name" @click="download(item)">
|
||||||
@@ -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 VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const tableData: any = ref({
|
const tableData: any = ref({
|
||||||
|
|
||||||
|
|||||||
@@ -36,8 +36,8 @@
|
|||||||
//引入相关样式
|
//引入相关样式
|
||||||
import '@vue-office/excel/lib/index.css'
|
import '@vue-office/excel/lib/index.css'
|
||||||
//引入VueOfficeDocx组件
|
//引入VueOfficeDocx组件
|
||||||
import VueOfficeDocx from '@vue-office/docx'
|
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'
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
@@ -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
|
||||||
url.value = `/api-docx/excelreport` + row
|
if(VITE_FLAG){
|
||||||
excelOptions.value = { xls: row.split('.')[1] == 'xls' ? true : false }
|
url.value = `/api-docx/excelreport` + row
|
||||||
|
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
|
||||||
// })
|
// })
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div >
|
||||||
<TableHeader ref="TableHeaderRef">
|
<TableHeader ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="名称">
|
<el-form-item label="名称">
|
||||||
@@ -26,6 +26,7 @@ const tableStore = new TableStore({
|
|||||||
url: '/supervision-boot/libModel/pageLibModelQuery',
|
url: '/supervision-boot/libModel/pageLibModelQuery',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
showPage: true, // 确保启用分页
|
showPage: true, // 确保启用分页
|
||||||
|
publicHeight: 60,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: '典型设备',
|
title: '典型设备',
|
||||||
|
|||||||
@@ -1,15 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div>
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="名称">
|
<el-form-item label="名称">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" clearable
|
<el-input
|
||||||
placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
|
v-model="tableStore.table.params.searchValue"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入搜索名称"
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" isGroup/>
|
<Table ref="tableRef" isGroup />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="tsx">
|
<script setup lang="tsx">
|
||||||
@@ -23,7 +27,8 @@ const tableRef = ref()
|
|||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/libModel/pageLibModelQuery',
|
url: '/supervision-boot/libModel/pageLibModelQuery',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
publicHeight: 60,
|
||||||
|
column: [
|
||||||
{
|
{
|
||||||
title: '谐波源',
|
title: '谐波源',
|
||||||
children: [
|
children: [
|
||||||
@@ -32,12 +37,14 @@ const tableStore = new TableStore({
|
|||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: '80',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (
|
||||||
|
(tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'name', title: '名称',minWidth: 200 },
|
{ field: 'name', title: '名称', minWidth: 200 },
|
||||||
{ field: 'voltage', title: '电压等级',minWidth: 200 },
|
{ field: 'voltage', title: '电压等级', minWidth: 200 },
|
||||||
{ field: 'capacity', title: '容量',minWidth: 200 }
|
{ field: 'capacity', title: '容量', minWidth: 200 }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -50,13 +57,13 @@ const tableStore = new TableStore({
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 在请求发送前处理参数
|
// 在请求发送前处理参数
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.pageSize = 100
|
tableStore.table.params.pageSize = 100
|
||||||
},
|
},
|
||||||
resetCallback: () => {
|
resetCallback: () => {
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
},
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.type = 1
|
tableStore.table.params.type = 1
|
||||||
@@ -70,5 +77,4 @@ const queryData = () => {
|
|||||||
defineExpose({
|
defineExpose({
|
||||||
queryData
|
queryData
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,212 +1,219 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main" :style="height">
|
<div class="default-main" :style="height">
|
||||||
<!-- 标准库 -->
|
<!-- 标准库 -->
|
||||||
|
|
||||||
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
||||||
<pane :size="size">
|
<pane :size="size">
|
||||||
<standardTree ref="treeRef"
|
<standardTree ref="treeRef"
|
||||||
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
||||||
:current-node-key="monitoringPoint.state.lineId" @node-click="handleNodeClick"
|
:current-node-key="monitoringPoint.state.lineId" @node-click="handleNodeClick"
|
||||||
@init="handleNodeClick"></standardTree>
|
@init="handleNodeClick"></standardTree>
|
||||||
</pane>
|
</pane>
|
||||||
<pane style="background: #fff" :style="height">
|
<pane style="background: #fff" :style="height">
|
||||||
<div class="pd10" style="display: flex; justify-content: end">
|
<div class="pd10" style="display: flex; justify-content: end">
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addUser" v-if="information">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addUser" v-if="information">新增</el-button>
|
||||||
<el-button icon="el-icon-Edit" type="primary" @click="editUser" v-if="information">修改</el-button>
|
<el-button icon="el-icon-Edit" type="primary" @click="editUser" v-if="information">修改</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven"
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven"
|
||||||
v-if="information">删除</el-button>
|
v-if="information">删除</el-button>
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="download" v-if="flag">下载</el-button>
|
<el-button icon="el-icon-Download" type="primary" @click="download" v-if="flag">下载</el-button>
|
||||||
</div>
|
</div>
|
||||||
<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="url.includes('.doc') || url.includes('.docx')" :src="url" />
|
||||||
<vue-office-excel v-if="url.includes('.xls') || url.includes('.xlsx')" :src="url"
|
<vue-office-excel v-if="url.includes('.xls') || url.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="url.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')
|
url.includes('.png') || url.includes('.jpg') || url.includes('.gif') || url.includes('.bmp')
|
||||||
" :src="url" />
|
" :src="url" />
|
||||||
</div>
|
</div>
|
||||||
</pane>
|
</pane>
|
||||||
</splitpanes>
|
</splitpanes>
|
||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
|
|
||||||
<addTree ref="addTreeRef" @onSubmit="treeRef.loadData(dotList.id)"></addTree>
|
<addTree ref="addTreeRef" @onSubmit="treeRef.loadData(dotList.id)"></addTree>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref, provide } from 'vue'
|
import { onMounted, ref, provide } from 'vue'
|
||||||
import 'splitpanes/dist/splitpanes.css'
|
import 'splitpanes/dist/splitpanes.css'
|
||||||
import { Splitpanes, Pane } from 'splitpanes'
|
import { Splitpanes, Pane } from 'splitpanes'
|
||||||
import standardTree from '@/components/tree/pqs/standardTree.vue'
|
import standardTree from '@/components/tree/pqs/standardTree.vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import addTree from './components/addTree.vue'
|
import addTree from './components/addTree.vue'
|
||||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
import { getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
||||||
|
|
||||||
//引入相关样式
|
//引入相关样式
|
||||||
import '@vue-office/excel/lib/index.css'
|
import '@vue-office/excel/lib/index.css'
|
||||||
//引入VueOfficeDocx组件
|
//引入VueOfficeDocx组件
|
||||||
import VueOfficeDocx from '@vue-office/docx'
|
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'
|
||||||
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'
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'database/standard'
|
name: 'database/standard'
|
||||||
})
|
})
|
||||||
const excelOptions = ref({})
|
const excelOptions = ref({})
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const size = ref(0)
|
const size = ref(23)
|
||||||
const treeRef = ref()
|
const treeRef = ref()
|
||||||
const addTreeRef = ref()
|
const addTreeRef = ref()
|
||||||
const url = ref('')
|
const url = ref('')
|
||||||
const dotList: any = ref({})
|
const dotList: any = ref({})
|
||||||
const flag: any = ref(false)
|
const flag: any = ref(false)
|
||||||
const information = adminInfo.roleCode.includes('information_info')
|
const information = adminInfo.roleCode.includes('information_info')
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
if (dom) {
|
if (dom) {
|
||||||
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const handleNodeClick = (data: any, node: any) => {
|
|
||||||
console.log("🚀 ~ handleNodeClick ~ data:", data)
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
dotList.value = data
|
const handleNodeClick = (data: any, node: any) => {
|
||||||
url.value = ''
|
console.log("🚀 ~ handleNodeClick ~ data:", data)
|
||||||
flag.value = false
|
dotList.value = data
|
||||||
if (data?.url != null && data?.url != '') {
|
url.value = ''
|
||||||
flag.value = true
|
flag.value = false
|
||||||
|
if (data?.url != null && data?.url != '') {
|
||||||
setTimeout(() => {
|
flag.value = true
|
||||||
url.value = `/api-docx/excelreport` + data.url
|
|
||||||
excelOptions.value = { xls: data.url.split('.')[1] == 'xls' ? true : false }
|
setTimeout(() => {
|
||||||
// getFileNameAndFilePath({ filePath: data.url }).then(res => {
|
if(VITE_FLAG){
|
||||||
// url.value = res.data.url
|
url.value = `/api-docx/excelreport` + data.url
|
||||||
// })
|
excelOptions.value = { xls: data.url.split('.')[1] == 'xls' ? true : false }
|
||||||
}, 100)
|
}else{
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 删除
|
|
||||||
const deleteEven = () => {
|
// getFileNameAndFilePath({ filePath: data.url }).then(res => {
|
||||||
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
// url.value = res.data.url
|
||||||
confirmButtonText: '确定',
|
// })
|
||||||
cancelButtonText: '取消',
|
}, 100)
|
||||||
type: 'warning'
|
}
|
||||||
}).then(() => {
|
}
|
||||||
deleteyLibstandard({ id: dotList.value.id }).then(() => {
|
// 删除
|
||||||
ElMessage({
|
const deleteEven = () => {
|
||||||
type: 'success',
|
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
|
||||||
message: '删除成功!'
|
confirmButtonText: '确定',
|
||||||
})
|
cancelButtonText: '取消',
|
||||||
setTimeout(() => {
|
type: 'warning'
|
||||||
treeRef.value.loadData()
|
}).then(() => {
|
||||||
}, 100)
|
deleteyLibstandard({ id: dotList.value.id }).then(() => {
|
||||||
})
|
ElMessage({
|
||||||
})
|
type: 'success',
|
||||||
}
|
message: '删除成功!'
|
||||||
const addUser = () => {
|
})
|
||||||
addTreeRef.value.open('新增')
|
setTimeout(() => {
|
||||||
}
|
treeRef.value.loadData()
|
||||||
const editUser = () => {
|
}, 100)
|
||||||
addTreeRef.value.open('修改', dotList.value)
|
})
|
||||||
}
|
})
|
||||||
// 下载
|
}
|
||||||
const download = () => {
|
const addUser = () => {
|
||||||
let url = dotList.value.url
|
addTreeRef.value.open('新增')
|
||||||
let urls = url
|
}
|
||||||
let name = url.match(/\/([^/]+)\.(\w+)$/)[1]
|
const editUser = () => {
|
||||||
downloadFile({ filePath: url }).then((res: any) => {
|
addTreeRef.value.open('修改', dotList.value)
|
||||||
let blob = new Blob([res], {
|
}
|
||||||
type: urls.includes('.pdf')
|
// 下载
|
||||||
? 'application/pdf'
|
const download = () => {
|
||||||
: urls.includes('.docx')
|
let url = dotList.value.url
|
||||||
? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
let urls = url
|
||||||
: urls.includes('.xls')
|
let name = url.match(/\/([^/]+)\.(\w+)$/)[1]
|
||||||
? 'application/vnd.ms-excel'
|
downloadFile({ filePath: url }).then((res: any) => {
|
||||||
: urls.includes('.xlsx')
|
let blob = new Blob([res], {
|
||||||
? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
type: urls.includes('.pdf')
|
||||||
: urls.includes('.png')
|
? 'application/pdf'
|
||||||
? 'image/png'
|
: urls.includes('.docx')
|
||||||
: urls.includes('.jpeg')
|
? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
||||||
? 'image/jpeg'
|
: urls.includes('.xls')
|
||||||
: urls.includes('.jpg')
|
? 'application/vnd.ms-excel'
|
||||||
? 'image/jpg'
|
: urls.includes('.xlsx')
|
||||||
: ''
|
? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||||
})
|
: urls.includes('.png')
|
||||||
const url = window.URL.createObjectURL(blob)
|
? 'image/png'
|
||||||
const link = document.createElement('a')
|
: urls.includes('.jpeg')
|
||||||
link.href = url
|
? 'image/jpeg'
|
||||||
link.download = name
|
: urls.includes('.jpg')
|
||||||
document.body.appendChild(link)
|
? 'image/jpg'
|
||||||
link.click()
|
: ''
|
||||||
link.remove()
|
})
|
||||||
})
|
const url = window.URL.createObjectURL(blob)
|
||||||
}
|
const link = document.createElement('a')
|
||||||
</script>
|
link.href = url
|
||||||
<style lang="scss" scoped>
|
link.download = name
|
||||||
.splitpanes.default-theme .splitpanes__pane {
|
document.body.appendChild(link)
|
||||||
background: #eaeef1;
|
link.click()
|
||||||
}
|
link.remove()
|
||||||
|
})
|
||||||
.grid-content {
|
}
|
||||||
text-align: center;
|
</script>
|
||||||
}
|
<style lang="scss" scoped>
|
||||||
|
.splitpanes.default-theme .splitpanes__pane {
|
||||||
.divBox {
|
background: #eaeef1;
|
||||||
width: 250px;
|
}
|
||||||
height: 31px;
|
|
||||||
margin: auto;
|
.grid-content {
|
||||||
line-height: 32px;
|
text-align: center;
|
||||||
border: 1px solid #c9c9c9;
|
}
|
||||||
|
|
||||||
&:hover {
|
.divBox {
|
||||||
border: 1px solid #002255;
|
width: 250px;
|
||||||
}
|
height: 31px;
|
||||||
}
|
margin: auto;
|
||||||
|
line-height: 32px;
|
||||||
.box {
|
border: 1px solid #c9c9c9;
|
||||||
padding: 10px;
|
|
||||||
// margin-top: 10px;
|
&:hover {
|
||||||
overflow-y: auto;
|
border: 1px solid #002255;
|
||||||
font-size: 15px;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-divider--horizontal {
|
.box {
|
||||||
margin: 10px 0;
|
padding: 10px;
|
||||||
}
|
// margin-top: 10px;
|
||||||
|
overflow-y: auto;
|
||||||
.mTop {
|
font-size: 15px;
|
||||||
margin-top: 5px;
|
}
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
.el-divider--horizontal {
|
||||||
|
margin: 10px 0;
|
||||||
/* 自定义 el-empty 的样式 */
|
}
|
||||||
:deep(.custom-empty) {
|
|
||||||
display: flex;
|
.mTop {
|
||||||
justify-content: center;
|
margin-top: 5px;
|
||||||
align-items: center;
|
margin-bottom: 5px;
|
||||||
height: 100%;
|
}
|
||||||
/* 调整高度 */
|
|
||||||
padding: 20px;
|
/* 自定义 el-empty 的样式 */
|
||||||
|
:deep(.custom-empty) {
|
||||||
/* 调整内边距 */
|
display: flex;
|
||||||
.el-empty__image {
|
justify-content: center;
|
||||||
display: none;
|
align-items: center;
|
||||||
/* 隐藏默认图片 */
|
height: 100%;
|
||||||
}
|
/* 调整高度 */
|
||||||
|
padding: 20px;
|
||||||
.el-empty__description {
|
|
||||||
font-size: 14px;
|
/* 调整内边距 */
|
||||||
/* 调整字体大小 */
|
.el-empty__image {
|
||||||
color: var(--vxe-font-color);
|
display: none;
|
||||||
}
|
/* 隐藏默认图片 */
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
.el-empty__description {
|
||||||
|
font-size: 14px;
|
||||||
|
/* 调整字体大小 */
|
||||||
|
color: var(--vxe-font-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,282 +1,282 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<div v-show="view">
|
<div v-show="view">
|
||||||
<TableHeader datePicker area showExport>
|
<TableHeader datePicker area showExport>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="筛选">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入关键字筛选" />
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入关键字筛选" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="统计类型:">
|
<el-form-item label="统计类型:">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.statisticalType"
|
v-model="tableStore.table.params.statisticalType"
|
||||||
value-key="id"
|
value-key="id"
|
||||||
placeholder="请选择统计类型"
|
placeholder="请选择统计类型"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in classificationData"
|
v-for="item in classificationData"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item"
|
:value="item"
|
||||||
></el-option>
|
></el-option>
|
||||||
</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.scale"
|
v-model="tableStore.table.params.scale"
|
||||||
multiple
|
multiple
|
||||||
collapse-tags
|
collapse-tags
|
||||||
clearable
|
clearable
|
||||||
value-key="id"
|
value-key="id"
|
||||||
placeholder="请选择电压等级"
|
placeholder="请选择电压等级"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in voltageleveloption"
|
v-for="item in voltageleveloption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item"
|
:value="item"
|
||||||
></el-option>
|
></el-option>
|
||||||
</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"
|
v-model="tableStore.table.params.manufacturer"
|
||||||
multiple
|
multiple
|
||||||
collapse-tags
|
collapse-tags
|
||||||
clearable
|
clearable
|
||||||
value-key="id"
|
value-key="id"
|
||||||
placeholder="请选择终端厂家"
|
placeholder="请选择终端厂家"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in terminaloption"
|
v-for="item in terminaloption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item"
|
:value="item"
|
||||||
></el-option>
|
></el-option>
|
||||||
</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.loadType"
|
v-model="tableStore.table.params.loadType"
|
||||||
multiple
|
multiple
|
||||||
collapse-tags
|
collapse-tags
|
||||||
clearable
|
clearable
|
||||||
value-key="id"
|
value-key="id"
|
||||||
placeholder="请选择干扰源类型"
|
placeholder="请选择干扰源类型"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in interfereoption"
|
v-for="item in interfereoption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item"
|
:value="item"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:operation>
|
<template v-slot:operation>
|
||||||
<el-button :icon="Download" type="primary" @click="download">下载波形</el-button>
|
<el-button :icon="Download" type="primary" @click="download">下载波形</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :checkboxConfig="checkboxConfig" />
|
<Table ref="tableRef" :checkboxConfig="checkboxConfig" />
|
||||||
</div>
|
</div>
|
||||||
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view">
|
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view">
|
||||||
<waveForm ref="waveFormRef" senior :boxoList="boxoList" :wp="wp" @backbxlb="backbxlb" />
|
<waveForm ref="waveFormRef" senior :boxoList="boxoList" :wp="wp" @backbxlb="backbxlb" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide } from 'vue'
|
import { ref, onMounted, provide } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import { Download } from '@element-plus/icons-vue'
|
import { Download } from '@element-plus/icons-vue'
|
||||||
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 { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import waveForm from '@/components/echarts/waveForm.vue'
|
import waveForm from '@/components/echarts/waveForm.vue'
|
||||||
import { getMonitorEventAnalyseWave } from '@/api/event-boot/transient'
|
import { getMonitorEventAnalyseWave } from '@/api/event-boot/transient'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { ElMessageBox, ElMessage } from 'element-plus'
|
import { ElMessageBox, ElMessage } from 'element-plus'
|
||||||
import { VxeTablePropTypes } from 'vxe-table'
|
import { VxeTablePropTypes } from 'vxe-table'
|
||||||
import { downloadWaveFile } from '@/api/event-boot/transient'
|
import { downloadWaveFile } from '@/api/event-boot/transient'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/area/TransientEventList'
|
name: 'harmonic-boot/area/TransientEventList'
|
||||||
})
|
})
|
||||||
const pageHeight = mainHeight(20)
|
const pageHeight = mainHeight(20)
|
||||||
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
|
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
|
||||||
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
|
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
|
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
|
||||||
const interfereoption = dictData.getBasicData('Interference_Source')
|
const interfereoption = dictData.getBasicData('Interference_Source')
|
||||||
const eventList = dictData.getBasicData('Event_Statis')
|
const eventList = dictData.getBasicData('Event_Statis')
|
||||||
const view = ref(true)
|
const view = ref(true)
|
||||||
const view2 = ref(false)
|
const view2 = ref(false)
|
||||||
const waveFormRef = ref()
|
const waveFormRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/event-boot/transient/getTransientValue',
|
url: '/event-boot/transient/getTransientValue',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ width: '60', type: 'checkbox' },
|
{ width: '60', type: 'checkbox' },
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '60',
|
width: '60',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'startTime', title: '暂降发生时刻', minWidth: '180' },
|
{ field: 'startTime', title: '暂降发生时刻', minWidth: '180' },
|
||||||
{ 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',
|
||||||
// title: '暂降类型',
|
// title: '暂降类型',
|
||||||
// minWidth: '90',
|
// minWidth: '90',
|
||||||
// formatter: (row: any) => {
|
// formatter: (row: any) => {
|
||||||
// return row.cellValue || '其他'
|
// return row.cellValue || '其他'
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
field: 'advanceReason',
|
field: 'advanceReason',
|
||||||
title: '暂降原因',
|
title: '暂降原因',
|
||||||
minWidth: '90',
|
minWidth: '90',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue || '其他'
|
return row.cellValue || '其他'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'eventType',
|
field: 'eventType',
|
||||||
title: '暂态统计类型',
|
title: '暂态统计类型',
|
||||||
minWidth: '120',
|
minWidth: '120',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return eventList.filter(item => item.id === row.cellValue)[0]?.name
|
return eventList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// field: 'severity', title: '严重度', minWidth: "80", formatter: (row: any) => {
|
// field: 'severity', title: '严重度', minWidth: "80", formatter: (row: any) => {
|
||||||
// return row.cellValue.toFixed(2)
|
// return row.cellValue.toFixed(2)
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
{
|
{
|
||||||
field: 'featureAmplitude',
|
field: 'featureAmplitude',
|
||||||
title: '暂降幅值(%)',
|
title: '暂降幅值(%)',
|
||||||
minWidth: '110',
|
minWidth: '110',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (row.cellValue * 100).toFixed(2)
|
return (row.cellValue * 100).toFixed(2)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'eventDescribe',
|
field: 'eventDescribe',
|
||||||
title: '暂降深度(%)',
|
title: '暂降深度(%)',
|
||||||
minWidth: '110',
|
minWidth: '110',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
let data: any = (100 - row.row.featureAmplitude * 100).toFixed(2)
|
let data: any = (100 - row.row.featureAmplitude * 100).toFixed(2)
|
||||||
|
|
||||||
return data >= 0 ? data : '/'
|
return data >= 0 ? data : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ field: 'duration', title: '持续时间(s)', minWidth: '100' },
|
{ field: 'duration', title: '持续时间(s)', minWidth: '100' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: '120',
|
width: '120',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '波形分析',
|
title: '波形分析',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.fileFlag == 0
|
return row.fileFlag == 0
|
||||||
},
|
},
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: async row => {
|
click: async row => {
|
||||||
view.value = false
|
view.value = false
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
waveFormRef.value.open(row)
|
waveFormRef.value.open(row)
|
||||||
}, 100)
|
}, 100)
|
||||||
// row.loading = true
|
// row.loading = true
|
||||||
// boxoList.value = row
|
// boxoList.value = row
|
||||||
// await getMonitorEventAnalyseWave({ id: row.eventId, systemType: 0 })
|
// await getMonitorEventAnalyseWave({ id: row.eventId, systemType: 0 })
|
||||||
// .then(res => {
|
// .then(res => {
|
||||||
// row.loading = false
|
// row.loading = false
|
||||||
// if (res != undefined) {
|
// if (res != undefined) {
|
||||||
// wp.value = res.data
|
// wp.value = res.data
|
||||||
// view.value = false
|
// view.value = false
|
||||||
// view2.value = true
|
// view2.value = true
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
// .catch(() => {
|
// .catch(() => {
|
||||||
// row.loading = false
|
// row.loading = false
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '暂无波形',
|
title: '暂无波形',
|
||||||
type: '',
|
type: '',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return row.fileFlag != 0
|
return row.fileFlag != 0
|
||||||
},
|
},
|
||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton'
|
render: 'basicButton'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {}
|
loadCallback: () => {}
|
||||||
})
|
})
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.statisticalType = classificationData.filter(item => item.name == '电网拓扑')[0]
|
tableStore.table.params.statisticalType = classificationData.filter(item => item.name == '电网拓扑')[0]
|
||||||
tableStore.table.params.scale = []
|
tableStore.table.params.scale = []
|
||||||
tableStore.table.params.manufacturer = []
|
tableStore.table.params.manufacturer = []
|
||||||
tableStore.table.params.loadType = []
|
tableStore.table.params.loadType = []
|
||||||
|
|
||||||
tableStore.table.params.monitorFlag = 2
|
tableStore.table.params.monitorFlag = 2
|
||||||
tableStore.table.params.powerFlag = 2
|
tableStore.table.params.powerFlag = 2
|
||||||
tableStore.table.params.statFlag = true
|
tableStore.table.params.statFlag = true
|
||||||
tableStore.table.params.isType = 0
|
tableStore.table.params.isType = 0
|
||||||
const boxoList = ref({})
|
const boxoList = ref({})
|
||||||
const wp = ref({})
|
const wp = ref({})
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig<any>>({
|
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig<any>>({
|
||||||
checkMethod: ({ row }) => {
|
checkMethod: ({ row }) => {
|
||||||
return row.fileFlag === 1
|
return row.fileFlag === 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const backbxlb = () => {
|
const backbxlb = () => {
|
||||||
view.value = true
|
view.value = true
|
||||||
view2.value = false
|
view2.value = false
|
||||||
}
|
}
|
||||||
// 下载波形
|
// 下载波形
|
||||||
const download = () => {
|
const download = () => {
|
||||||
if (!tableStore.table.selection.length) {
|
if (!tableStore.table.selection.length) {
|
||||||
ElMessage.warning('请选择数据')
|
ElMessage.warning('请选择数据')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
downloadWaveFile({
|
downloadWaveFile({
|
||||||
lineId: tableStore.table.selection.map((item: any) => item.eventId)
|
lineId: tableStore.table.selection.map((item: any) => item.eventId)
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
if (res.type == 'application/json') {
|
if (res.type == 'application/json') {
|
||||||
ElMessage.warning('暂无可下载的波形文件!')
|
ElMessage.warning('暂无可下载的波形文件!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ElMessage.info('下载中......')
|
ElMessage.info('下载中......')
|
||||||
let blob = new Blob([res], { type: 'application/zip' }) // console.log(blob) // var href = window.URL.createObjectURL(blob); //创建下载的链接
|
let blob = new Blob([res], { type: 'application/zip' }) // console.log(blob) // var href = window.URL.createObjectURL(blob); //创建下载的链接
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '波形分析下载' // 设置下载的文件名
|
link.download = '波形分析下载' // 设置下载的文件名
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link) //释放标签
|
document.body.removeChild(link) //释放标签
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -194,7 +194,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 : '/'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,7 +199,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 : '/'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -194,7 +194,7 @@ const dotList: any = ref({})
|
|||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const heightB = mainHeight(70)
|
const heightB = mainHeight(70)
|
||||||
const harmonic = harmonicOptions.slice(1)
|
const harmonic = harmonicOptions.slice(1)
|
||||||
const size = ref(0)
|
const size = ref(23)
|
||||||
const showTabs = ref(false)
|
const showTabs = ref(false)
|
||||||
const loadDataOptions: any = ref([])
|
const loadDataOptions: any = ref([])
|
||||||
const form: any = reactive({
|
const form: any = reactive({
|
||||||
@@ -571,7 +571,7 @@ const group = (chart: any, myChartDom: any) => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
if (dom) {
|
if (dom) {
|
||||||
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||||
}
|
}
|
||||||
userDataList({
|
userDataList({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@@ -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,517 +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
|
|
||||||
v-model="detailDialogVisible"
|
|
||||||
:title="detailDialogTitle"
|
|
||||||
|
|
||||||
>
|
|
||||||
<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
|
|
||||||
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 }) => {
|
||||||
|
console.log('🚀 ~ handleStatisticalTypeChange ~ newVal:', newVal)
|
||||||
|
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>
|
||||||
@@ -1,30 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<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"
|
</el-tab-pane>
|
||||||
:active="activeTab === 'pollutionReport'"
|
|
||||||
|
<el-tab-pane label="场站级评估" name="anotherReport">
|
||||||
/>
|
<SubstationTab ref="substationTabRef" :active="activeTab === 'anotherReport'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="区域级评估" name="3">
|
||||||
<el-tab-pane label="场站级评估" name="anotherReport">
|
<regionalAssessment v-if="activeTab == '3'" />
|
||||||
<SubstationTab
|
</el-tab-pane>
|
||||||
ref="substationTabRef"
|
<el-tab-pane label="敏感及重要用户评估" name="4">
|
||||||
:active="activeTab === 'anotherReport'"
|
<userEvaluation ref="userEvaluationRef" v-if="activeTab == '4'" />
|
||||||
|
</el-tab-pane>
|
||||||
/>
|
</el-tabs>
|
||||||
</el-tab-pane>
|
</div>
|
||||||
</el-tabs>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<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>
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'name', title: '电网拓扑', minWidth: '150' },
|
{ field: 'name', title: '电网拓扑', minWidth: '150' },
|
||||||
{
|
{
|
||||||
field: 'onlineMonitorNumber',
|
field: 'onlineMonitorNumber',
|
||||||
title: '在线监测点数量(个)',
|
title: '在运监测点数(个)',
|
||||||
minWidth: '100px',
|
minWidth: '100px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader :showSearch="false" v-show="flag">
|
<TableHeader :showSearch="false" v-show="flag">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="日期">
|
<el-form-item label="统计时间">
|
||||||
<DatePicker
|
<DatePicker
|
||||||
ref="datePickerRef"
|
ref="datePickerRef"
|
||||||
:nextFlag="false"
|
:nextFlag="false"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="筛选">
|
<el-form-item label="筛选数据">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.filterName"
|
v-model="tableStore.table.params.filterName"
|
||||||
@keyup="searchEvent"
|
@keyup="searchEvent"
|
||||||
@@ -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 || '/'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="筛选">
|
<el-form-item label="筛选数据">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.filterName"
|
v-model="tableStore.table.params.filterName"
|
||||||
@keyup="searchEvent"
|
@keyup="searchEvent"
|
||||||
@@ -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 || '/'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader date-picker ref="TableHeaderRef" :dateLabel="`数据统计时间`">
|
<TableHeader date-picker ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="运行状态">
|
<el-form-item label="运行状态">
|
||||||
<el-select v-model="tableStore.table.params.lineRunFlag" clearable placeholder="请选择运行状态">
|
<el-select v-model="tableStore.table.params.lineRunFlag" clearable placeholder="请选择运行状态">
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="筛选">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.filterName" placeholder="输入关键字筛选" />
|
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入监测点名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
<span class="divBox_title">低于90%监测点数</span>
|
<span class="divBox_title">低于90%监测点数</span>
|
||||||
<span
|
<span
|
||||||
class="divBox_num text-style"
|
class="divBox_num text-style"
|
||||||
style="color: #ff6600"
|
style="color: #57bc6e"
|
||||||
@click="totalTable(90, '低于90%监测点_')"
|
@click="totalTable(90, '低于90%监测点_')"
|
||||||
>
|
>
|
||||||
{{ monitoringPoints.abnormalNum }}
|
{{ monitoringPoints.abnormalNum }}
|
||||||
@@ -56,7 +56,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="echartTitle">
|
<div class="echartTitle">
|
||||||
<div>总的数据完整性</div>
|
<div>总的数据完整性</div>
|
||||||
<div>{{ monitoringPoints.totalOnlineRate }}%</div>
|
<div>
|
||||||
|
{{ monitoringPoints.totalOnlineRate > 100 ? 100 : monitoringPoints.totalOnlineRate }}%
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 30px">
|
<div style="height: 30px">
|
||||||
<MyEchart :options="percentage"></MyEchart>
|
<MyEchart :options="percentage"></MyEchart>
|
||||||
@@ -115,7 +117,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<!-- 低于90%监测点数 -->
|
<!-- 低于90%监测点数 -->
|
||||||
<span
|
<span
|
||||||
style="flex: 1; color: #ff9100"
|
style="flex: 1; color: #388e3c"
|
||||||
class="text text-style"
|
class="text text-style"
|
||||||
@click="renderTable(o.detailList, 90, o.citName + '_低于90%监测点_')"
|
@click="renderTable(o.detailList, 90, o.citName + '_低于90%监测点_')"
|
||||||
>
|
>
|
||||||
@@ -152,21 +154,22 @@
|
|||||||
<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>
|
||||||
<vxe-column field="cit" title="所在地市" width="110px"></vxe-column>
|
<vxe-column field="cit" title="所在地市" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="company" title="供电公司"></vxe-column>
|
<vxe-column field="company" title="供电公司" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="subStation" title="变电站"></vxe-column>
|
<vxe-column field="subStation" title="变电站" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="manufacturer" title="终端厂家"></vxe-column>
|
<vxe-column field="manufacturer" title="终端厂家" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="deviceName" title="终端名称"></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="lineName" title="监测点名称" :formatter="formatter"></vxe-column>
|
<vxe-column
|
||||||
|
field="lineName"
|
||||||
|
title="监测点名称"
|
||||||
|
:formatter="formatter"
|
||||||
|
minWidth="110px"
|
||||||
|
></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
|
||||||
@@ -209,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'
|
||||||
@@ -218,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)
|
||||||
@@ -267,7 +271,13 @@ const tableStore = new TableStore({
|
|||||||
monitoringPoints.value.runNum = tableStore.table.data.totalNum
|
monitoringPoints.value.runNum = tableStore.table.data.totalNum
|
||||||
monitoringPoints.value.abnormalNum = tableStore.table.data.belowNum
|
monitoringPoints.value.abnormalNum = tableStore.table.data.belowNum
|
||||||
monitoringPoints.value.totalOnlineRate = tableStore.table.data.totalOnlineRate - 0
|
monitoringPoints.value.totalOnlineRate = tableStore.table.data.totalOnlineRate - 0
|
||||||
abnormal.value = tableStore.table.data.citDetailList
|
abnormal.value = tableStore.table.data.citDetailList.filter((k: any) => {
|
||||||
|
if (tableStore.table.params.statisticalType.name == '终端厂家') {
|
||||||
|
return k.citTotalNum != 0
|
||||||
|
} else {
|
||||||
|
return k.citName != '上送国网' && k.citName != '非上送国网'
|
||||||
|
}
|
||||||
|
})
|
||||||
// 合并子集数据 并去重
|
// 合并子集数据 并去重
|
||||||
totalData.value = Array.from(
|
totalData.value = Array.from(
|
||||||
tableStore.table.data.citDetailList
|
tableStore.table.data.citDetailList
|
||||||
@@ -348,7 +358,13 @@ const echart = () => {
|
|||||||
name: '异常占比',
|
name: '异常占比',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barWidth: 13,
|
barWidth: 13,
|
||||||
data: [monitoringPoints.value.totalOnlineRate == 0 ? '' : monitoringPoints.value.totalOnlineRate],
|
data: [
|
||||||
|
monitoringPoints.value.totalOnlineRate == 0
|
||||||
|
? ''
|
||||||
|
: monitoringPoints.value.totalOnlineRate > 100
|
||||||
|
? 100
|
||||||
|
: monitoringPoints.value.totalOnlineRate
|
||||||
|
],
|
||||||
z: 0,
|
z: 0,
|
||||||
zlevel: 0,
|
zlevel: 0,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
@@ -413,7 +429,8 @@ const echart = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
||||||
tableStore.table.params.lineRunFlag = ''
|
tableStore.table.params.lineRunFlag = 0
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
|
|
||||||
const formatter = (row: any) => {
|
const formatter = (row: any) => {
|
||||||
return row.cellValue || '/'
|
return row.cellValue || '/'
|
||||||
@@ -470,10 +487,28 @@ 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>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@import '@/assets/font/iconfont.css';
|
||||||
.card-list {
|
.card-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
.monitoringPoints {
|
.monitoringPoints {
|
||||||
|
|||||||
@@ -1,216 +1,216 @@
|
|||||||
<template>
|
<template>
|
||||||
<TableHeader area datePicker ref="TableHeaderRef">
|
<TableHeader area datePicker ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="筛选">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.filterName" @keyup="searchEvent" placeholder="输入关键字筛选" />
|
<el-input v-model="tableStore.table.params.filterName" @keyup="searchEvent" placeholder="输入关键字筛选" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="统计类型:">
|
<el-form-item label="统计类型:">
|
||||||
<el-select v-model="tableStore.table.params.statisticalType" value-key="id" placeholder="请选择统计类型">
|
<el-select v-model="tableStore.table.params.statisticalType" value-key="id" placeholder="请选择统计类型">
|
||||||
<el-option v-for="item in classificationData" :key="item.id" :label="item.name"
|
<el-option v-for="item in classificationData" :key="item.id" :label="item.name"
|
||||||
:value="item"></el-option>
|
:value="item"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="电压等级:">
|
<el-form-item label="电压等级:">
|
||||||
<el-select v-model="tableStore.table.params.scale" multiple collapse-tags clearable value-key="id"
|
<el-select v-model="tableStore.table.params.scale" multiple collapse-tags clearable value-key="id"
|
||||||
placeholder="请选择电压等级">
|
placeholder="请选择电压等级">
|
||||||
<el-option v-for="item in voltageleveloption" :key="item.id" :label="item.name"
|
<el-option v-for="item in voltageleveloption" :key="item.id" :label="item.name"
|
||||||
:value="item"></el-option>
|
:value="item"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终端厂家:">
|
<el-form-item label="终端厂家:">
|
||||||
<el-select v-model="tableStore.table.params.manufacturer" multiple collapse-tags clearable
|
<el-select v-model="tableStore.table.params.manufacturer" multiple collapse-tags clearable
|
||||||
value-key="id" placeholder="请选择终端厂家">
|
value-key="id" placeholder="请选择终端厂家">
|
||||||
<el-option v-for="item in terminaloption" :key="item.id" :label="item.name"
|
<el-option v-for="item in terminaloption" :key="item.id" :label="item.name"
|
||||||
:value="item"></el-option>
|
:value="item"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="干扰源类型:">
|
<el-form-item label="干扰源类型:">
|
||||||
<el-select v-model="tableStore.table.params.loadType" multiple collapse-tags clearable value-key="id"
|
<el-select v-model="tableStore.table.params.loadType" multiple collapse-tags clearable value-key="id"
|
||||||
placeholder="请选择干扰源类型">
|
placeholder="请选择干扰源类型">
|
||||||
<el-option v-for="item in interfereoption" :key="item.id" :label="item.name"
|
<el-option v-for="item in interfereoption" :key="item.id" :label="item.name"
|
||||||
:value="item"></el-option>
|
:value="item"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" :tree-config="{ transform: true, parentField: 'uPid', rowField: 'uId' }"
|
<Table ref="tableRef" :tree-config="{ transform: true, parentField: 'uPid', rowField: 'uId' }"
|
||||||
:scroll-y="{ enabled: true }" :key="num" />
|
:scroll-y="{ enabled: true }" :key="num" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from '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 TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { debounce } from 'lodash-es'
|
import { debounce } from 'lodash-es'
|
||||||
import XEUtils from 'xe-utils'
|
import XEUtils from 'xe-utils'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const num = ref(0)
|
const num = ref(0)
|
||||||
|
|
||||||
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
|
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
|
||||||
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
|
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
|
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
|
||||||
const interfereoption = dictData.getBasicData('Interference_Source')
|
const interfereoption = dictData.getBasicData('Interference_Source')
|
||||||
const treeDataCopy: any = ref([])
|
const treeDataCopy: any = ref([])
|
||||||
const treeData: any = ref([])
|
const treeData: any = ref([])
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/device-boot/terminalOnlineRateData/getOnlineRateData',
|
url: '/device-boot/terminalOnlineRateData/getOnlineRateData',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
showPage: false,
|
showPage: false,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ 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 || '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'dataName',
|
field: 'dataName',
|
||||||
title: '终端名称',
|
title: '终端名称',
|
||||||
formatter: ({ row }: any) => {
|
formatter: ({ row }: any) => {
|
||||||
return row.dataName || '/'
|
return row.dataName || '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'manufacturer',
|
field: 'manufacturer',
|
||||||
title: '厂家',
|
title: '厂家',
|
||||||
formatter: ({ row }: any) => {
|
formatter: ({ row }: any) => {
|
||||||
return row.manufacturer || '/'
|
return row.manufacturer || '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'comFlag',
|
field: 'comFlag',
|
||||||
title: '通讯状态',
|
title: '通讯状态',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'danger',
|
0: 'danger',
|
||||||
1: 'success',
|
1: 'success',
|
||||||
3: 'info'
|
3: 'info'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '中断',
|
0: '中断',
|
||||||
1: '正常',
|
1: '正常',
|
||||||
3: '/'
|
3: '/'
|
||||||
}
|
}
|
||||||
// formatter: ({ row }: any) => {
|
// formatter: ({ row }: any) => {
|
||||||
// return row.comFlag || '/'
|
// return row.comFlag || '/'
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'updateTime',
|
field: 'updateTime',
|
||||||
title: '最新数据时间',
|
title: '最新数据时间',
|
||||||
formatter: ({ row }: any) => {
|
formatter: ({ row }: any) => {
|
||||||
return row.updateTime || '/'
|
return row.updateTime || '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'onlineRate',
|
field: 'onlineRate',
|
||||||
title: '在线率(%)',
|
title: '在线率(%)',
|
||||||
formatter: ({ row }: any) => {
|
formatter: ({ row }: any) => {
|
||||||
return row.onlineRate == 3.14159 ? '暂无数据' : row.onlineRate.toFixed(2)
|
return row.onlineRate == 3.14159 ? '暂无数据' : row.onlineRate.toFixed(2)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'assess',
|
field: 'assess',
|
||||||
title: '评估',
|
title: '评估',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
custom: {
|
custom: {
|
||||||
0: 'info',
|
0: 'info',
|
||||||
1: 'danger',
|
1: 'danger',
|
||||||
2: 'warning',
|
2: 'warning',
|
||||||
3: 'success'
|
3: 'success'
|
||||||
},
|
},
|
||||||
replaceValue: {
|
replaceValue: {
|
||||||
0: '暂无数据',
|
0: '暂无数据',
|
||||||
1: '不合格',
|
1: '不合格',
|
||||||
2: '合格',
|
2: '合格',
|
||||||
3: '优秀'
|
3: '优秀'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.options.column[0].title = tableStore.table.params.statisticalType.name
|
tableStore.options.column[0].title = tableStore.table.params.statisticalType.name
|
||||||
},
|
},
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
tableRef.value.getRef().setAllTreeExpand(true)
|
tableRef.value.getRef().setAllTreeExpand(true)
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
treeData.value = tree2List(tableStore.table.data, Math.random() * 1000)
|
treeData.value = tree2List(tableStore.table.data, Math.random() * 1000)
|
||||||
treeDataCopy.value = JSON.parse(JSON.stringify(treeData.value))
|
treeDataCopy.value = JSON.parse(JSON.stringify(treeData.value))
|
||||||
tableStore.table.data = treeData.value
|
tableStore.table.data = treeData.value
|
||||||
tableStore.table.params.filterName=''
|
tableStore.table.params.filterName=''
|
||||||
searchEvent()
|
searchEvent()
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.statisticalType = classificationData.filter(item => item.name == '电网拓扑')[0]
|
tableStore.table.params.statisticalType = classificationData.filter(item => item.name == '电网拓扑')[0]
|
||||||
tableStore.table.params.monitorFlag = 2
|
tableStore.table.params.monitorFlag = 2
|
||||||
tableStore.table.params.powerFlag = 2
|
tableStore.table.params.powerFlag = 2
|
||||||
tableStore.table.params.serverName = 'harmonicBoot'
|
tableStore.table.params.serverName = 'harmonicBoot'
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
const tree2List = (list: any, id: any) => {
|
const tree2List = (list: any, id: any) => {
|
||||||
//存储结果的数组
|
//存储结果的数组
|
||||||
let arr: any = []
|
let arr: any = []
|
||||||
// 遍历 tree 数组
|
// 遍历 tree 数组
|
||||||
list.forEach((item: any) => {
|
list.forEach((item: any) => {
|
||||||
item.uPid = id
|
item.uPid = id
|
||||||
item.uId = (Math.random() * 1000)
|
item.uId = (Math.random() * 1000)
|
||||||
item.comFlag = item.comFlag == null ? 3 : item.comFlag
|
item.comFlag = item.comFlag == null ? 3 : item.comFlag
|
||||||
item.assess = item.onlineRate == 3.14159 ? 0 : item.onlineRate < 60 ? 1 : item.onlineRate < 90 ? 2 : 3
|
item.assess = item.onlineRate == 3.14159 ? 0 : item.onlineRate < 60 ? 1 : item.onlineRate < 90 ? 2 : 3
|
||||||
// 判断item是否存在children
|
// 判断item是否存在children
|
||||||
if (!item.children) return arr.push(item)
|
if (!item.children) return arr.push(item)
|
||||||
// 函数递归,对children数组进行tree2List的转换
|
// 函数递归,对children数组进行tree2List的转换
|
||||||
const children = tree2List(item.children, item.uId)
|
const children = tree2List(item.children, item.uId)
|
||||||
// 删除item的children属性
|
// 删除item的children属性
|
||||||
delete item.children
|
delete item.children
|
||||||
// 把item和children数组添加至结果数组
|
// 把item和children数组添加至结果数组
|
||||||
//..children: 意思是把children数组展开
|
//..children: 意思是把children数组展开
|
||||||
arr.push(item, ...children)
|
arr.push(item, ...children)
|
||||||
})
|
})
|
||||||
// 返回结果数组
|
// 返回结果数组
|
||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
// 表格过滤
|
// 表格过滤
|
||||||
const searchEvent = debounce(() => {
|
const searchEvent = debounce(() => {
|
||||||
const filterVal = XEUtils.toValueString(tableStore.table.params.filterName).trim().toLowerCase()
|
const filterVal = XEUtils.toValueString(tableStore.table.params.filterName).trim().toLowerCase()
|
||||||
|
|
||||||
if (filterVal) {
|
if (filterVal) {
|
||||||
const options = { children: 'children' }
|
const options = { children: 'children' }
|
||||||
const searchProps = ['name']
|
const searchProps = ['name']
|
||||||
|
|
||||||
const rest = XEUtils.searchTree(
|
const rest = XEUtils.searchTree(
|
||||||
treeDataCopy.value,
|
treeDataCopy.value,
|
||||||
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
||||||
options
|
options
|
||||||
)
|
)
|
||||||
console.log("🚀 ~ searchEvent ~ rest:", rest)
|
console.log("🚀 ~ searchEvent ~ rest:", rest)
|
||||||
|
|
||||||
tableStore.table.data = rest
|
tableStore.table.data = rest
|
||||||
|
|
||||||
// 搜索之后默认展开所有子节点
|
// 搜索之后默认展开所有子节点
|
||||||
} else {
|
} else {
|
||||||
tableStore.table.data = treeDataCopy.value
|
tableStore.table.data = treeDataCopy.value
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
const $table = tableRef.value.getRef()
|
const $table = tableRef.value.getRef()
|
||||||
if ($table) {
|
if ($table) {
|
||||||
$table.setAllTreeExpand(true)
|
$table.setAllTreeExpand(true)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 500)
|
}, 500)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader date-picker ref="TableHeaderRef" :dateLabel="`数据统计时间`">
|
<TableHeader date-picker ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="运行状态">
|
<el-form-item label="运行状态">
|
||||||
<el-select v-model="tableStore.table.params.lineRunFlag" clearable placeholder="请选择运行状态">
|
<el-select v-model="tableStore.table.params.lineRunFlag" clearable placeholder="请选择运行状态">
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="筛选">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.filterName" placeholder="输入关键字筛选" />
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入终端名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -34,7 +34,11 @@
|
|||||||
<div class="divBox">
|
<div class="divBox">
|
||||||
<span class="iconfont icon-qiyezongshu" style="color: #57bc6e"></span>
|
<span class="iconfont icon-qiyezongshu" style="color: #57bc6e"></span>
|
||||||
<span class="divBox_title">终端总数</span>
|
<span class="divBox_title">终端总数</span>
|
||||||
<span class="divBox_num text-style" style="color: #57bc6e" @click="totalTable(100001, '')">
|
<span
|
||||||
|
class="divBox_num text-style"
|
||||||
|
style="color: #57bc6e"
|
||||||
|
@click="totalTable(100001, '')"
|
||||||
|
>
|
||||||
{{ monitoringPoints.runNum }}
|
{{ monitoringPoints.runNum }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -43,7 +47,7 @@
|
|||||||
<span class="divBox_title">低于90%终端数</span>
|
<span class="divBox_title">低于90%终端数</span>
|
||||||
<span
|
<span
|
||||||
class="divBox_num text-style"
|
class="divBox_num text-style"
|
||||||
style="color: #ff6600"
|
style="color: #57bc6e"
|
||||||
@click="totalTable(90, '低于90%终端_')"
|
@click="totalTable(90, '低于90%终端_')"
|
||||||
>
|
>
|
||||||
{{ monitoringPoints.abnormalNum }}
|
{{ monitoringPoints.abnormalNum }}
|
||||||
@@ -111,7 +115,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<!-- 低于90%终端数 -->
|
<!-- 低于90%终端数 -->
|
||||||
<span
|
<span
|
||||||
style="flex: 1; color: #ff9100"
|
style="flex: 1; color: #388e3c"
|
||||||
class="text text-style"
|
class="text text-style"
|
||||||
@click="renderTable(o.detailList, 90, o.citName + '_低于90%终端_')"
|
@click="renderTable(o.detailList, 90, o.citName + '_低于90%终端_')"
|
||||||
>
|
>
|
||||||
@@ -148,20 +152,16 @@
|
|||||||
<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>
|
||||||
<vxe-column field="cit" title="所在地市" width="110px"></vxe-column>
|
<vxe-column field="cit" title="所在地市" width="110px"></vxe-column>
|
||||||
<vxe-column field="company" title="供电公司"></vxe-column>
|
<vxe-column field="company" title="供电公司" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="subStation" title="变电站"></vxe-column>
|
<vxe-column field="subStation" title="变电站" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="manufacturer" title="终端厂家"></vxe-column>
|
<vxe-column field="manufacturer" title="终端厂家" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="deviceName" title="终端名称"></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
|
||||||
@@ -200,6 +200,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
// import '@/assets/font/iconfont.css'
|
||||||
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'
|
||||||
@@ -212,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)
|
||||||
@@ -262,10 +264,19 @@ const tableStore = new TableStore({
|
|||||||
monitoringPoints.value.runNum = tableStore.table.data.totalNum
|
monitoringPoints.value.runNum = tableStore.table.data.totalNum
|
||||||
monitoringPoints.value.abnormalNum = tableStore.table.data.belowNum
|
monitoringPoints.value.abnormalNum = tableStore.table.data.belowNum
|
||||||
monitoringPoints.value.totalOnlineRate = tableStore.table.data.totalOnlineRate - 0
|
monitoringPoints.value.totalOnlineRate = tableStore.table.data.totalOnlineRate - 0
|
||||||
abnormal.value = tableStore.table.data.citDetailList
|
abnormal.value = tableStore.table.data.citDetailList.filter((k: any) => {
|
||||||
|
if (tableStore.table.params.statisticalType.name == '终端厂家') {
|
||||||
|
return k.citTotalNum != 0
|
||||||
|
} else {
|
||||||
|
return k.citName != '上送国网' && k.citName != '非上送国网'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.log(123, tableStore.table.params.statisticalType.name)
|
||||||
|
|
||||||
// 合并子集数据 并去重
|
// 合并子集数据 并去重
|
||||||
totalData.value = Array.from(
|
totalData.value = Array.from(
|
||||||
tableStore.table.data.citDetailList
|
tableStore.table.data.citDetailList
|
||||||
|
|
||||||
.map((item: any) => item.detailList)
|
.map((item: any) => item.detailList)
|
||||||
.flat()
|
.flat()
|
||||||
.reduce((map: any, item: any) => {
|
.reduce((map: any, item: any) => {
|
||||||
@@ -409,7 +420,8 @@ const echart = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
||||||
tableStore.table.params.lineRunFlag = ''
|
tableStore.table.params.lineRunFlag = 0
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
|
|
||||||
const formatter = (row: any) => {
|
const formatter = (row: any) => {
|
||||||
return row.cellValue || '/'
|
return row.cellValue || '/'
|
||||||
@@ -465,11 +477,28 @@ 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)
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@import '@/assets/font/iconfont.css';
|
||||||
.card-list {
|
.card-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
.monitoringPoints {
|
.monitoringPoints {
|
||||||
|
|||||||
@@ -1,430 +1,430 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="display: flex; flex-direction: column; height: 100%; position: relative">
|
<div style="display: flex; flex-direction: column; height: 100%; position: relative">
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<el-form-item label="多监测点">
|
<el-form-item label="多监测点">
|
||||||
<el-checkbox v-model="checked" @change="checkChange" />
|
<el-checkbox v-model="checked" @change="checkChange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="日期">
|
<el-form-item label="统计时间">
|
||||||
<DatePicker ref="datePickerRef" ></DatePicker>
|
<DatePicker ref="datePickerRef" ></DatePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="指标类型:">
|
<el-form-item label="指标类型:">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="formData.condition"
|
v-model="formData.condition"
|
||||||
multiple
|
multiple
|
||||||
collapse-tags
|
collapse-tags
|
||||||
:multiple-limit="5"
|
:multiple-limit="5"
|
||||||
filterable
|
filterable
|
||||||
placeholder="请选择指标"
|
placeholder="请选择指标"
|
||||||
@change="conditionChange"
|
@change="conditionChange"
|
||||||
>
|
>
|
||||||
<el-option-group v-for="group in indexOptions" :key="group.label" :label="group.label">
|
<el-option-group v-for="group in indexOptions" :key="group.label" :label="group.label">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in group.options"
|
v-for="item in group.options"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-option-group>
|
</el-option-group>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="谐波次数:" v-if="showXieBoCiShu">
|
<el-form-item label="谐波次数:" v-if="showXieBoCiShu">
|
||||||
<el-select style="width: 100%" v-model="formData.harmonic" placeholder="请选择谐波">
|
<el-select style="width: 100%" v-model="formData.harmonic" placeholder="请选择谐波">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in harmonicOptions"
|
v-for="item in harmonicOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="showJianXieBoCiShu" label="间谐波次数:">
|
<el-form-item v-if="showJianXieBoCiShu" label="间谐波次数:">
|
||||||
<el-select style="width: 100%" v-model="formData.inHarmonic" placeholder="请选择间谐波">
|
<el-select style="width: 100%" v-model="formData.inHarmonic" placeholder="请选择间谐波">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in inharmonicOptions"
|
v-for="item in inharmonicOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="init" icon="el-icon-Search">查询</el-button>
|
<el-button type="primary" @click="init" icon="el-icon-Search">查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="flex: 1; overflow: hidden" class="mt10" v-loading="loading">
|
<div style="flex: 1; overflow: hidden" class="mt10" v-loading="loading">
|
||||||
<vxe-table height="auto" v-bind="defaultAttribute" :data="tableData">
|
<vxe-table height="auto" v-bind="defaultAttribute" :data="tableData">
|
||||||
<vxe-column field="subName" title="变电站" min-width="120px"></vxe-column>
|
<vxe-column field="subName" title="变电站" min-width="120px"></vxe-column>
|
||||||
<vxe-column field="lineName" title="监测点名称" min-width="120px"></vxe-column>
|
<vxe-column field="lineName" title="监测点名称" min-width="120px"></vxe-column>
|
||||||
<vxe-column field="targetName" title="指标类型" min-width="120px"></vxe-column>
|
<vxe-column field="targetName" title="指标类型" min-width="120px"></vxe-column>
|
||||||
<vxe-column field="phaseType" title="相别" min-width="100px"></vxe-column>
|
<vxe-column field="phaseType" title="相别" min-width="100px"></vxe-column>
|
||||||
<vxe-column field="scale" title="电压等级" min-width="100px"></vxe-column>
|
<vxe-column field="scale" title="电压等级" min-width="100px"></vxe-column>
|
||||||
<vxe-column field="timeId" title="时间" min-width="130px"></vxe-column>
|
<vxe-column field="timeId" title="时间" min-width="130px"></vxe-column>
|
||||||
<vxe-column field="unit" title="单位" min-width="100px"></vxe-column>
|
<vxe-column field="unit" title="单位" min-width="100px"></vxe-column>
|
||||||
<vxe-column field="maxData" title="最大值(%)" min-width="100px">
|
<vxe-column field="maxData" title="最大值(%)" min-width="100px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@click="showCharts(scope.row, 3, '最大值')"
|
@click="showCharts(scope.row, 3, '最大值')"
|
||||||
:style="{ color: scope.row.statisticalType === 3 ? '#A52a2a' : '#07d75a' }"
|
:style="{ color: scope.row.statisticalType === 3 ? '#A52a2a' : '#07d75a' }"
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
{{ scope.row.maxData }}
|
{{ scope.row.maxData }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="scope.row.statisticalType === 3.14159">/</el-button>
|
<el-button v-if="scope.row.statisticalType === 3.14159">/</el-button>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="minData" title="最小值(%)" min-width="100px">
|
<vxe-column field="minData" title="最小值(%)" min-width="100px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@click="showCharts(scope.row, 2, '最小值')"
|
@click="showCharts(scope.row, 2, '最小值')"
|
||||||
:style="{ color: scope.row.statisticalType === 2 ? '#A52a2a' : '#07d75a' }"
|
:style="{ color: scope.row.statisticalType === 2 ? '#A52a2a' : '#07d75a' }"
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
{{ scope.row.minData }}
|
{{ scope.row.minData }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="scope.row.statisticalType === 3.14159">/</el-button>
|
<el-button v-if="scope.row.statisticalType === 3.14159">/</el-button>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="avgData" title="平均值(%)" min-width="100px">
|
<vxe-column field="avgData" title="平均值(%)" min-width="100px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@click="showCharts(scope.row, 1, '平均值')"
|
@click="showCharts(scope.row, 1, '平均值')"
|
||||||
:style="{ color: scope.row.statisticalType === 1 ? '#A52a2a' : '#07d75a' }"
|
:style="{ color: scope.row.statisticalType === 1 ? '#A52a2a' : '#07d75a' }"
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
{{ scope.row.avgData }}
|
{{ scope.row.avgData }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="scope.row.statisticalType === 3.14159">/</el-button>
|
<el-button v-if="scope.row.statisticalType === 3.14159">/</el-button>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="cp95Data" title="CP95值(%)" min-width="100px">
|
<vxe-column field="cp95Data" title="CP95值(%)" min-width="100px">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@click="showCharts(scope.row, 4, 'CP95值')"
|
@click="showCharts(scope.row, 4, 'CP95值')"
|
||||||
:style="{ color: scope.row.statisticalType === 4 ? '#A52a2a' : '#07d75a' }"
|
:style="{ color: scope.row.statisticalType === 4 ? '#A52a2a' : '#07d75a' }"
|
||||||
type="text"
|
type="text"
|
||||||
size="small"
|
size="small"
|
||||||
>
|
>
|
||||||
{{ scope.row.cp95Data }}
|
{{ scope.row.cp95Data }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="scope.row.statisticalType === 3.14159">/</el-button>
|
<el-button v-if="scope.row.statisticalType === 3.14159">/</el-button>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
<SecondSheet v-if="options" style="background: #fff; z-index: 10">
|
<SecondSheet v-if="options" style="background: #fff; z-index: 10">
|
||||||
<el-button
|
<el-button
|
||||||
style="position: absolute; right: 0; top: 0; cursor: pointer; z-index: 3"
|
style="position: absolute; right: 0; top: 0; cursor: pointer; z-index: 3"
|
||||||
icon="el-icon-Back"
|
icon="el-icon-Back"
|
||||||
size="small"
|
size="small"
|
||||||
@click="close"
|
@click="close"
|
||||||
>
|
>
|
||||||
返回
|
返回
|
||||||
</el-button>
|
</el-button>
|
||||||
<MyEChart :options="options"></MyEChart>
|
<MyEChart :options="options"></MyEChart>
|
||||||
</SecondSheet>
|
</SecondSheet>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { nextTick, onMounted, reactive, ref } from 'vue'
|
import { nextTick, onMounted, reactive, ref } from 'vue'
|
||||||
import { Close } from '@element-plus/icons-vue'
|
import { Close } from '@element-plus/icons-vue'
|
||||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||||
import { indexOptions, harmonicOptions, inharmonicOptions } from '@/utils/dictionary'
|
import { indexOptions, harmonicOptions, inharmonicOptions } from '@/utils/dictionary'
|
||||||
import { getHistoryTableData, getHistoryLineData } from '@/api/harmonic-boot/normLimit'
|
import { getHistoryTableData, getHistoryLineData } from '@/api/harmonic-boot/normLimit'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import SecondSheet from '@/components/secondSheet/index.vue'
|
import SecondSheet from '@/components/secondSheet/index.vue'
|
||||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||||
|
|
||||||
const datePickerRef = ref()
|
const datePickerRef = ref()
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const checked = ref(monitoringPoint.state.showCheckBox)
|
const checked = ref(monitoringPoint.state.showCheckBox)
|
||||||
const formData = reactive<{
|
const formData = reactive<{
|
||||||
lineId: string[]
|
lineId: string[]
|
||||||
searchBeginTime: string
|
searchBeginTime: string
|
||||||
searchEndTime: string
|
searchEndTime: string
|
||||||
condition: string[]
|
condition: string[]
|
||||||
harmonic: number
|
harmonic: number
|
||||||
inHarmonic: number
|
inHarmonic: number
|
||||||
}>({
|
}>({
|
||||||
lineId: [],
|
lineId: [],
|
||||||
searchBeginTime: '',
|
searchBeginTime: '',
|
||||||
searchEndTime: '',
|
searchEndTime: '',
|
||||||
condition: ['10', '11', '12'],
|
condition: ['10', '11', '12'],
|
||||||
harmonic: 2,
|
harmonic: 2,
|
||||||
inHarmonic: 1
|
inHarmonic: 1
|
||||||
})
|
})
|
||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
const showXieBoCiShu = ref(false)
|
const showXieBoCiShu = ref(false)
|
||||||
const showJianXieBoCiShu = ref(false)
|
const showJianXieBoCiShu = ref(false)
|
||||||
const options = ref<any>(null)
|
const options = ref<any>(null)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
const init = () => {
|
const init = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
formData.lineId = checked.value ? monitoringPoint.state.lineIds : [monitoringPoint.state.lineId]
|
formData.lineId = checked.value ? monitoringPoint.state.lineIds : [monitoringPoint.state.lineId]
|
||||||
formData.searchBeginTime = datePickerRef.value.timeValue[0]
|
formData.searchBeginTime = datePickerRef.value.timeValue[0]
|
||||||
formData.searchEndTime = datePickerRef.value.timeValue[1]
|
formData.searchEndTime = datePickerRef.value.timeValue[1]
|
||||||
getHistoryTableData(formData).then((res: any) => {
|
getHistoryTableData(formData).then((res: any) => {
|
||||||
tableData.value = res.data.map((item: any) => {
|
tableData.value = res.data.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
maxData: item.maxData.toFixed(2),
|
maxData: item.maxData.toFixed(2),
|
||||||
minData: item.minData.toFixed(2),
|
minData: item.minData.toFixed(2),
|
||||||
avgData: item.avgData.toFixed(2),
|
avgData: item.avgData.toFixed(2),
|
||||||
cp95Data: item.cp95Data.toFixed(2)
|
cp95Data: item.cp95Data.toFixed(2)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const checkChange = () => {
|
const checkChange = () => {
|
||||||
if (checked.value) {
|
if (checked.value) {
|
||||||
monitoringPoint.setShowCheckBox(true)
|
monitoringPoint.setShowCheckBox(true)
|
||||||
} else {
|
} else {
|
||||||
monitoringPoint.setShowCheckBox(false)
|
monitoringPoint.setShowCheckBox(false)
|
||||||
init()
|
init()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const close = () => {
|
const close = () => {
|
||||||
console.log('====================================')
|
console.log('====================================')
|
||||||
console.log(2123123)
|
console.log(2123123)
|
||||||
console.log('====================================')
|
console.log('====================================')
|
||||||
options.value = null
|
options.value = null
|
||||||
}
|
}
|
||||||
const showCharts = (row: any, valueType: number, name: string) => {
|
const showCharts = (row: any, valueType: number, name: string) => {
|
||||||
getHistoryLineData({
|
getHistoryLineData({
|
||||||
lineId: row.lineId,
|
lineId: row.lineId,
|
||||||
number: row.number,
|
number: row.number,
|
||||||
phaseType: row.phaseType,
|
phaseType: row.phaseType,
|
||||||
searchTime: row.timeId,
|
searchTime: row.timeId,
|
||||||
targetCode: row.targetCode,
|
targetCode: row.targetCode,
|
||||||
valueType
|
valueType
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
options.value = {
|
options.value = {
|
||||||
title: {
|
title: {
|
||||||
text: row.subName + ' ' + row.lineName + ' ' + row.targetName + ' ' + row.phaseType + '相' + name
|
text: row.subName + ' ' + row.lineName + ' ' + row.targetName + ' ' + row.phaseType + '相' + name
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
name: '时间',
|
name: '时间',
|
||||||
data: res.data[0]?.value.map((item: any[]) => item[0])
|
data: res.data[0]?.value.map((item: any[]) => item[0])
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: '%',
|
name: '%',
|
||||||
type: 'value'
|
type: 'value'
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: name,
|
name: name,
|
||||||
data: res.data[0]?.value.map((item: any[]) => item[1]),
|
data: res.data[0]?.value.map((item: any[]) => item[1]),
|
||||||
type: 'line'
|
type: 'line'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
options: {
|
options: {
|
||||||
grid: {
|
grid: {
|
||||||
top: '50px',
|
top: '50px',
|
||||||
left: '40px',
|
left: '40px',
|
||||||
right: '60px',
|
right: '60px',
|
||||||
bottom: '10px',
|
bottom: '10px',
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
dataZoom: null
|
dataZoom: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const conditionChange = () => {
|
const conditionChange = () => {
|
||||||
//判断一个指标时
|
//判断一个指标时
|
||||||
if (formData.condition.length == 1) {
|
if (formData.condition.length == 1) {
|
||||||
if (
|
if (
|
||||||
formData.condition.includes('40') ||
|
formData.condition.includes('40') ||
|
||||||
formData.condition.includes('43') ||
|
formData.condition.includes('43') ||
|
||||||
formData.condition.includes('44') ||
|
formData.condition.includes('44') ||
|
||||||
formData.condition.includes('45')
|
formData.condition.includes('45')
|
||||||
) {
|
) {
|
||||||
showXieBoCiShu.value = true
|
showXieBoCiShu.value = true
|
||||||
} else {
|
} else {
|
||||||
showXieBoCiShu.value = false
|
showXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
formData.condition.includes('46') ||
|
formData.condition.includes('46') ||
|
||||||
// formData.condition.includes('47') ||
|
// formData.condition.includes('47') ||
|
||||||
// formData.condition.includes('48') ||
|
// formData.condition.includes('48') ||
|
||||||
formData.condition.includes('49')
|
formData.condition.includes('49')
|
||||||
) {
|
) {
|
||||||
showJianXieBoCiShu.value = true
|
showJianXieBoCiShu.value = true
|
||||||
} else {
|
} else {
|
||||||
showJianXieBoCiShu.value = false
|
showJianXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//判断2个指标时
|
//判断2个指标时
|
||||||
if (formData.condition.length == 2) {
|
if (formData.condition.length == 2) {
|
||||||
if (
|
if (
|
||||||
formData.condition.includes('40') ||
|
formData.condition.includes('40') ||
|
||||||
formData.condition.includes('43') ||
|
formData.condition.includes('43') ||
|
||||||
formData.condition.includes('44') ||
|
formData.condition.includes('44') ||
|
||||||
(formData.condition.includes('45') && formData.condition.includes('46')) ||
|
(formData.condition.includes('45') && formData.condition.includes('46')) ||
|
||||||
// formData.condition.includes('47') ||
|
// formData.condition.includes('47') ||
|
||||||
// formData.condition.includes('48') ||
|
// formData.condition.includes('48') ||
|
||||||
formData.condition.includes('49')
|
formData.condition.includes('49')
|
||||||
) {
|
) {
|
||||||
showXieBoCiShu.value = true
|
showXieBoCiShu.value = true
|
||||||
showJianXieBoCiShu.value = true
|
showJianXieBoCiShu.value = true
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
formData.condition.includes('40') ||
|
formData.condition.includes('40') ||
|
||||||
formData.condition.includes('43') ||
|
formData.condition.includes('43') ||
|
||||||
formData.condition.includes('44') ||
|
formData.condition.includes('44') ||
|
||||||
formData.condition.includes('45')
|
formData.condition.includes('45')
|
||||||
) {
|
) {
|
||||||
showXieBoCiShu.value = true
|
showXieBoCiShu.value = true
|
||||||
} else {
|
} else {
|
||||||
showXieBoCiShu.value = false
|
showXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
formData.condition.includes('46') ||
|
formData.condition.includes('46') ||
|
||||||
// formData.condition.includes('47') ||
|
// formData.condition.includes('47') ||
|
||||||
// formData.condition.includes('48') ||
|
// formData.condition.includes('48') ||
|
||||||
formData.condition.includes('49')
|
formData.condition.includes('49')
|
||||||
) {
|
) {
|
||||||
showJianXieBoCiShu.value = true
|
showJianXieBoCiShu.value = true
|
||||||
} else {
|
} else {
|
||||||
showJianXieBoCiShu.value = false
|
showJianXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//判断3个指标时
|
//判断3个指标时
|
||||||
if (formData.condition.length == 3) {
|
if (formData.condition.length == 3) {
|
||||||
if (
|
if (
|
||||||
(formData.condition.includes('40') ||
|
(formData.condition.includes('40') ||
|
||||||
formData.condition.includes('43') ||
|
formData.condition.includes('43') ||
|
||||||
formData.condition.includes('44') ||
|
formData.condition.includes('44') ||
|
||||||
formData.condition.includes('45')) &&
|
formData.condition.includes('45')) &&
|
||||||
(formData.condition.includes('46') ||
|
(formData.condition.includes('46') ||
|
||||||
// formData.condition.includes('47') ||
|
// formData.condition.includes('47') ||
|
||||||
// formData.condition.includes('48') ||
|
// formData.condition.includes('48') ||
|
||||||
formData.condition.includes('49'))
|
formData.condition.includes('49'))
|
||||||
) {
|
) {
|
||||||
showXieBoCiShu.value = true
|
showXieBoCiShu.value = true
|
||||||
showJianXieBoCiShu.value = true
|
showJianXieBoCiShu.value = true
|
||||||
} else {
|
} else {
|
||||||
showXieBoCiShu.value = false
|
showXieBoCiShu.value = false
|
||||||
showJianXieBoCiShu.value = false
|
showJianXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
formData.condition.includes('46') ||
|
formData.condition.includes('46') ||
|
||||||
// formData.condition.includes('47') ||
|
// formData.condition.includes('47') ||
|
||||||
// formData.condition.includes('48') ||
|
// formData.condition.includes('48') ||
|
||||||
formData.condition.includes('49')
|
formData.condition.includes('49')
|
||||||
) {
|
) {
|
||||||
showJianXieBoCiShu.value = true
|
showJianXieBoCiShu.value = true
|
||||||
} else {
|
} else {
|
||||||
showJianXieBoCiShu.value = false
|
showJianXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
formData.condition.includes('40') ||
|
formData.condition.includes('40') ||
|
||||||
formData.condition.includes('43') ||
|
formData.condition.includes('43') ||
|
||||||
formData.condition.includes('44') ||
|
formData.condition.includes('44') ||
|
||||||
formData.condition.includes('45')
|
formData.condition.includes('45')
|
||||||
) {
|
) {
|
||||||
showXieBoCiShu.value = true
|
showXieBoCiShu.value = true
|
||||||
} else {
|
} else {
|
||||||
showXieBoCiShu.value = false
|
showXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//判断4个指标时
|
//判断4个指标时
|
||||||
if (formData.condition.length == 4) {
|
if (formData.condition.length == 4) {
|
||||||
if (
|
if (
|
||||||
(formData.condition.includes('40') ||
|
(formData.condition.includes('40') ||
|
||||||
formData.condition.includes('43') ||
|
formData.condition.includes('43') ||
|
||||||
formData.condition.includes('44') ||
|
formData.condition.includes('44') ||
|
||||||
formData.condition.includes('45')) &&
|
formData.condition.includes('45')) &&
|
||||||
(formData.condition.includes('46') ||
|
(formData.condition.includes('46') ||
|
||||||
// formData.condition.includes('47') ||
|
// formData.condition.includes('47') ||
|
||||||
// formData.condition.includes('48') ||
|
// formData.condition.includes('48') ||
|
||||||
formData.condition.includes('49'))
|
formData.condition.includes('49'))
|
||||||
) {
|
) {
|
||||||
showXieBoCiShu.value = true
|
showXieBoCiShu.value = true
|
||||||
showJianXieBoCiShu.value = true
|
showJianXieBoCiShu.value = true
|
||||||
} else {
|
} else {
|
||||||
showXieBoCiShu.value = false
|
showXieBoCiShu.value = false
|
||||||
showJianXieBoCiShu.value = false
|
showJianXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
formData.condition.includes('46') ||
|
formData.condition.includes('46') ||
|
||||||
// formData.condition.includes('47') ||
|
// formData.condition.includes('47') ||
|
||||||
// formData.condition.includes('48') ||
|
// formData.condition.includes('48') ||
|
||||||
formData.condition.includes('49')
|
formData.condition.includes('49')
|
||||||
) {
|
) {
|
||||||
showJianXieBoCiShu.value = true
|
showJianXieBoCiShu.value = true
|
||||||
} else {
|
} else {
|
||||||
showJianXieBoCiShu.value = false
|
showJianXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
formData.condition.includes('40') ||
|
formData.condition.includes('40') ||
|
||||||
formData.condition.includes('43') ||
|
formData.condition.includes('43') ||
|
||||||
formData.condition.includes('44') ||
|
formData.condition.includes('44') ||
|
||||||
formData.condition.includes('45')
|
formData.condition.includes('45')
|
||||||
) {
|
) {
|
||||||
showXieBoCiShu.value = true
|
showXieBoCiShu.value = true
|
||||||
} else {
|
} else {
|
||||||
showXieBoCiShu.value = false
|
showXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//判断5个指标时
|
//判断5个指标时
|
||||||
if (formData.condition.length == 5) {
|
if (formData.condition.length == 5) {
|
||||||
if (
|
if (
|
||||||
(formData.condition.includes('40') ||
|
(formData.condition.includes('40') ||
|
||||||
formData.condition.includes('43') ||
|
formData.condition.includes('43') ||
|
||||||
formData.condition.includes('44') ||
|
formData.condition.includes('44') ||
|
||||||
formData.condition.includes('45')) &&
|
formData.condition.includes('45')) &&
|
||||||
(formData.condition.includes('46') ||
|
(formData.condition.includes('46') ||
|
||||||
// formData.condition.includes('47') ||
|
// formData.condition.includes('47') ||
|
||||||
// formData.condition.includes('48') ||
|
// formData.condition.includes('48') ||
|
||||||
formData.condition.includes('49'))
|
formData.condition.includes('49'))
|
||||||
) {
|
) {
|
||||||
showXieBoCiShu.value = true
|
showXieBoCiShu.value = true
|
||||||
showJianXieBoCiShu.value = true
|
showJianXieBoCiShu.value = true
|
||||||
} else {
|
} else {
|
||||||
showXieBoCiShu.value = false
|
showXieBoCiShu.value = false
|
||||||
showJianXieBoCiShu.value = false
|
showJianXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
formData.condition.includes('46') ||
|
formData.condition.includes('46') ||
|
||||||
// formData.condition.includes('47') ||
|
// formData.condition.includes('47') ||
|
||||||
// formData.condition.includes('48') ||
|
// formData.condition.includes('48') ||
|
||||||
formData.condition.includes('49')
|
formData.condition.includes('49')
|
||||||
) {
|
) {
|
||||||
showJianXieBoCiShu.value = true
|
showJianXieBoCiShu.value = true
|
||||||
} else {
|
} else {
|
||||||
showJianXieBoCiShu.value = false
|
showJianXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
formData.condition.includes('40') ||
|
formData.condition.includes('40') ||
|
||||||
formData.condition.includes('43') ||
|
formData.condition.includes('43') ||
|
||||||
formData.condition.includes('44') ||
|
formData.condition.includes('44') ||
|
||||||
formData.condition.includes('45')
|
formData.condition.includes('45')
|
||||||
) {
|
) {
|
||||||
showXieBoCiShu.value = true
|
showXieBoCiShu.value = true
|
||||||
} else {
|
} else {
|
||||||
showXieBoCiShu.value = false
|
showXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//判断无指标时
|
//判断无指标时
|
||||||
if (formData.condition.length == 0) {
|
if (formData.condition.length == 0) {
|
||||||
showJianXieBoCiShu.value = false
|
showJianXieBoCiShu.value = false
|
||||||
showXieBoCiShu.value = false
|
showXieBoCiShu.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style></style>
|
<style></style>
|
||||||
|
|||||||
@@ -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,11 +41,11 @@
|
|||||||
<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>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<!-- <div
|
<!-- <div
|
||||||
@@ -64,33 +64,35 @@ 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(0)
|
const size = ref(23)
|
||||||
const isReload = ref(false)
|
const isReload = ref(false)
|
||||||
const height = mainHeight(40)
|
const height = mainHeight(40)
|
||||||
const activeName = ref('2')
|
const activeName = ref('2')
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
if (dom) {
|
if (dom) {
|
||||||
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
const handleNodeClick = (data: any, node: any) => {
|
const handleNodeClick = (data: any, node: any) => {
|
||||||
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,46 +1,44 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="" :style="height">
|
<div class="" :style="height">
|
||||||
|
<TableHeader ref="TableHeaderRef" datePicker @selectChange="selectChange">
|
||||||
<TableHeader ref="TableHeaderRef" datePicker @selectChange="selectChange">
|
<template v-slot:select>
|
||||||
<template v-slot:select>
|
<el-form-item label="模板策略">
|
||||||
<el-form-item label="模板策略">
|
<el-select v-model="Template" @change="changetype" placeholder="请选择模版" value-key="id">
|
||||||
<el-select v-model="Template" @change="changetype" placeholder="请选择模版" value-key="id">
|
<el-option
|
||||||
<el-option
|
v-for="item in templatePolicy"
|
||||||
v-for="item in templatePolicy"
|
:key="item.id"
|
||||||
:key="item.id"
|
:label="item.name"
|
||||||
:label="item.name"
|
:value="item"
|
||||||
:value="item"
|
></el-option>
|
||||||
></el-option>
|
</el-select>
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</el-form-item>
|
<el-form-item label="报表类型">
|
||||||
<el-form-item label="报表类型">
|
<el-input readonly type="text" value="分析报表"></el-input>
|
||||||
<el-input readonly type="text" value="分析报表"></el-input>
|
<!-- <el-select-->
|
||||||
<!-- <el-select-->
|
<!-- :disabled="true"-->
|
||||||
<!-- :disabled="true"-->
|
<!-- v-model="reportForm"-->
|
||||||
<!-- v-model="reportForm"-->
|
<!-- :popper-append-to-body="false"-->
|
||||||
<!-- :popper-append-to-body="false"-->
|
<!-- placeholder="请选择报表类型"-->
|
||||||
<!-- placeholder="请选择报表类型"-->
|
<!-- >-->
|
||||||
<!-- >-->
|
<!-- <el-option-->
|
||||||
<!-- <el-option-->
|
<!-- v-for="item in reportFormList"-->
|
||||||
<!-- v-for="item in reportFormList"-->
|
<!-- :key="item.value"-->
|
||||||
<!-- :key="item.value"-->
|
<!-- :label="item.label"-->
|
||||||
<!-- :label="item.label"-->
|
<!-- :value="item.value"-->
|
||||||
<!-- :value="item.value"-->
|
<!-- ></el-option>-->
|
||||||
<!-- ></el-option>-->
|
<!-- </el-select>-->
|
||||||
<!-- </el-select>-->
|
</el-form-item>
|
||||||
</el-form-item>
|
</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">
|
下载报告
|
||||||
下载报告
|
</el-button>
|
||||||
</el-button>
|
</template>
|
||||||
</template>
|
</TableHeader>
|
||||||
</TableHeader>
|
<div class="box">
|
||||||
<div class="box">
|
<div id="luckysheet" :style="`height: calc(${tableStore.table.height} )`"></div>
|
||||||
<div id="luckysheet" :style="`height: calc(${tableStore.table.height} )`"></div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -63,7 +61,7 @@ defineOptions({
|
|||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const showTree = ref(false)
|
const showTree = ref(false)
|
||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const size = ref(0)
|
const size = ref(23)
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const dotList: any = ref({})
|
const dotList: any = ref({})
|
||||||
@@ -79,7 +77,7 @@ const tableStore = new TableStore({
|
|||||||
publicHeight: 30,
|
publicHeight: 30,
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.tempId = Template.value.id
|
tableStore.table.params.tempId = Template.value.id
|
||||||
tableStore.table.params.lineId =monitoringPoint.state.lineId
|
tableStore.table.params.lineId = monitoringPoint.state.lineId
|
||||||
},
|
},
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data.forEach((item: any) => {
|
tableStore.table.data.forEach((item: any) => {
|
||||||
@@ -109,7 +107,7 @@ provide('tableStore', tableStore)
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
if (dom) {
|
if (dom) {
|
||||||
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
getTemplateByDept({ id: dictData.state.area[0].id })
|
getTemplateByDept({ id: dictData.state.area[0].id })
|
||||||
@@ -135,21 +133,18 @@ const selectChange = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const exportEvent = () => {
|
const exportEvent = () => {
|
||||||
exportExcel(luckysheet.getAllSheets(), '统计报表下载')
|
exportExcel(luckysheet.getAllSheets(), '统计报表下载')
|
||||||
}
|
}
|
||||||
const exportReport = () => {
|
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
|
||||||
@@ -164,7 +159,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] // 设置下载的文件名
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<el-form-item label="多监测点">
|
<el-form-item label="多监测点">
|
||||||
<el-checkbox v-model="checked" @change="checkChange" />
|
<el-checkbox v-model="checked" @change="checkChange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="日期">
|
<el-form-item label="统计时间">
|
||||||
<DatePicker ref="datePickerRef" :theCurrentTime="true"></DatePicker>
|
<DatePicker ref="datePickerRef" :theCurrentTime="true"></DatePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="指标类型:">
|
<el-form-item label="指标类型:">
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,315 +1,315 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="display: flex; flex-direction: column; height: 100%">
|
<div style="display: flex; flex-direction: column; height: 100%">
|
||||||
<TableHeader ref="TableHeaderRef" :showSearch="false">
|
<TableHeader ref="TableHeaderRef" :showSearch="false">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="日期">
|
<el-form-item label="统计时间">
|
||||||
<DatePicker ref="datePickerRef"></DatePicker>
|
<DatePicker ref="datePickerRef"></DatePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="对比">
|
<el-form-item label="对比">
|
||||||
<el-select v-model="searchType" clearable placeholder="可选择同比、环比">
|
<el-select v-model="searchType" clearable placeholder="可选择同比、环比">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in searchTypeOptions"
|
v-for="item in searchTypeOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value"
|
:value="item.value"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:operation>
|
<template v-slot:operation>
|
||||||
<el-button type="primary" @click="init" icon="el-icon-Search">查询</el-button>
|
<el-button type="primary" @click="init" icon="el-icon-Search">查询</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
|
|
||||||
<div style="flex: 1" class="mt10" v-loading="loading">
|
<div style="flex: 1" class="mt10" v-loading="loading">
|
||||||
<my-echart :options="options" />
|
<my-echart :options="options" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { nextTick, onMounted, reactive, ref } from 'vue'
|
import { nextTick, onMounted, reactive, ref } from 'vue'
|
||||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||||
import { getSteadyData } from '@/api/harmonic-boot/pollution'
|
import { getSteadyData } from '@/api/harmonic-boot/pollution'
|
||||||
import { gradeColor3 } from '@/components/echarts/color'
|
import { gradeColor3 } from '@/components/echarts/color'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: []
|
column: []
|
||||||
})
|
})
|
||||||
const datePickerRef = ref()
|
const datePickerRef = ref()
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
searchBeginTime: '',
|
searchBeginTime: '',
|
||||||
searchEndTime: '',
|
searchEndTime: '',
|
||||||
periodBeginTime: '',
|
periodBeginTime: '',
|
||||||
periodEndTime: ''
|
periodEndTime: ''
|
||||||
})
|
})
|
||||||
const options = ref({})
|
const options = ref({})
|
||||||
const searchType = ref('')
|
const searchType = ref('')
|
||||||
const searchTypeOptions = [
|
const searchTypeOptions = [
|
||||||
{
|
{
|
||||||
label: '同比',
|
label: '同比',
|
||||||
value: '1'
|
value: '1'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '环比',
|
label: '环比',
|
||||||
value: '2'
|
value: '2'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const gradeNames = ['优质', '良好', '一般', '较差', '极差']
|
const gradeNames = ['优质', '良好', '一般', '较差', '极差']
|
||||||
const init = () => {
|
const init = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
formData.id = monitoringPoint.state.lineId
|
formData.id = monitoringPoint.state.lineId
|
||||||
formData.searchBeginTime = datePickerRef.value.timeValue[0]
|
formData.searchBeginTime = datePickerRef.value.timeValue[0]
|
||||||
formData.searchEndTime = datePickerRef.value.timeValue[1]
|
formData.searchEndTime = datePickerRef.value.timeValue[1]
|
||||||
if (searchType.value == '1') {
|
if (searchType.value == '1') {
|
||||||
;[formData.periodBeginTime, formData.periodEndTime] = datePickerRef.value.getYearOnYear(
|
;[formData.periodBeginTime, formData.periodEndTime] = datePickerRef.value.getYearOnYear(
|
||||||
formData.searchBeginTime,
|
formData.searchBeginTime,
|
||||||
formData.searchEndTime
|
formData.searchEndTime
|
||||||
)
|
)
|
||||||
} else if (searchType.value == '2') {
|
} else if (searchType.value == '2') {
|
||||||
;[formData.periodBeginTime, formData.periodEndTime] = datePickerRef.value.getMonthOnMonth(
|
;[formData.periodBeginTime, formData.periodEndTime] = datePickerRef.value.getMonthOnMonth(
|
||||||
formData.searchBeginTime,
|
formData.searchBeginTime,
|
||||||
formData.searchEndTime
|
formData.searchEndTime
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
formData.periodBeginTime = ''
|
formData.periodBeginTime = ''
|
||||||
formData.periodEndTime = ''
|
formData.periodEndTime = ''
|
||||||
}
|
}
|
||||||
getSteadyData(formData).then((res: any) => {
|
getSteadyData(formData).then((res: any) => {
|
||||||
const { steadyInfoData, steadyInfoList } = res.data
|
const { steadyInfoData, steadyInfoList } = res.data
|
||||||
let yData = [],
|
let yData = [],
|
||||||
yData2 = []
|
yData2 = []
|
||||||
for (let i = 0; i < steadyInfoList.length; i++) {
|
for (let i = 0; i < steadyInfoList.length; i++) {
|
||||||
// if (steadyInfoList[i] == 3.1415) {
|
// if (steadyInfoList[i] == 3.1415) {
|
||||||
// steadyInfoList[i] = 1
|
// steadyInfoList[i] = 1
|
||||||
// yData.push(steadyInfoList[i])
|
// yData.push(steadyInfoList[i])
|
||||||
// } else if (steadyInfoList[i] == 3.14159) {
|
// } else if (steadyInfoList[i] == 3.14159) {
|
||||||
// steadyInfoList[i] = 1
|
// steadyInfoList[i] = 1
|
||||||
// yData.push(steadyInfoList[i])
|
// yData.push(steadyInfoList[i])
|
||||||
// } else if (steadyInfoList[i] !== 3.14159) {
|
// } else if (steadyInfoList[i] !== 3.14159) {
|
||||||
yData.push(steadyInfoList[i])
|
yData.push(steadyInfoList[i])
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
for (let i = 0; i < steadyInfoData.length; i++) {
|
for (let i = 0; i < steadyInfoData.length; i++) {
|
||||||
yData2.push(steadyInfoData[i])
|
yData2.push(steadyInfoData[i])
|
||||||
// if (steadyInfoData[i] == 3.14159) {
|
// if (steadyInfoData[i] == 3.14159) {
|
||||||
// steadyInfoData[i] = 0
|
// steadyInfoData[i] = 0
|
||||||
// yData2.push(steadyInfoData[i])
|
// yData2.push(steadyInfoData[i])
|
||||||
// } else if (steadyInfoData[i] == 3.14159) {
|
// } else if (steadyInfoData[i] == 3.14159) {
|
||||||
// steadyInfoData[i] = 0
|
// steadyInfoData[i] = 0
|
||||||
// yData2.push(steadyInfoData[i])
|
// yData2.push(steadyInfoData[i])
|
||||||
// } else if (steadyInfoData[i] !== 3.14159) {
|
// } else if (steadyInfoData[i] !== 3.14159) {
|
||||||
// yData2.push(steadyInfoData[i])
|
// yData2.push(steadyInfoData[i])
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
let series: any[] = [
|
let series: any[] = [
|
||||||
{
|
{
|
||||||
name: formData.searchBeginTime + '至' + formData.searchEndTime,
|
name: formData.searchBeginTime + '至' + formData.searchEndTime,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barMaxWidth: 30,
|
barMaxWidth: 30,
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'top',
|
position: 'top',
|
||||||
distance: 2,
|
distance: 2,
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontWeight: 'bolder'
|
fontWeight: 'bolder'
|
||||||
},
|
},
|
||||||
data: yData,
|
data: yData,
|
||||||
markLine: {
|
markLine: {
|
||||||
silent: false,
|
silent: false,
|
||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
name: '',
|
name: '',
|
||||||
yAxis: 100,
|
yAxis: 100,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: gradeColor3[0]
|
color: gradeColor3[0]
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
formatter: '优质',
|
formatter: '优质',
|
||||||
color: gradeColor3[0]
|
color: gradeColor3[0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '',
|
name: '',
|
||||||
yAxis: 90,
|
yAxis: 90,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: gradeColor3[1]
|
color: gradeColor3[1]
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
color: gradeColor3[1],
|
color: gradeColor3[1],
|
||||||
formatter: '良好'
|
formatter: '良好'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '',
|
name: '',
|
||||||
yAxis: 60,
|
yAxis: 60,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: gradeColor3[2]
|
color: gradeColor3[2]
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
color: gradeColor3[2],
|
color: gradeColor3[2],
|
||||||
formatter: '合格'
|
formatter: '合格'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: (params: any) => {
|
color: (params: any) => {
|
||||||
if (params.value > 90) {
|
if (params.value > 90) {
|
||||||
return gradeColor3[0]
|
return gradeColor3[0]
|
||||||
} else if (params.value > 60) {
|
} else if (params.value > 60) {
|
||||||
return gradeColor3[1]
|
return gradeColor3[1]
|
||||||
} else if (params.value == 3.14159) {
|
} else if (params.value == 3.14159) {
|
||||||
return '#ccc'
|
return '#ccc'
|
||||||
} else {
|
} else {
|
||||||
return gradeColor3[2]
|
return gradeColor3[2]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
if (searchType.value) {
|
if (searchType.value) {
|
||||||
series.push({
|
series.push({
|
||||||
name: formData.periodBeginTime + '至' + formData.periodEndTime,
|
name: formData.periodBeginTime + '至' + formData.periodEndTime,
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
barMaxWidth: 30,
|
barMaxWidth: 30,
|
||||||
// label: {
|
// label: {
|
||||||
// show: true,
|
// show: true,
|
||||||
// position: 'top',
|
// position: 'top',
|
||||||
// distance: 2,
|
// distance: 2,
|
||||||
// color: '#fff',
|
// color: '#fff',
|
||||||
// fontWeight: 'bolder'
|
// fontWeight: 'bolder'
|
||||||
// },
|
// },
|
||||||
data: yData2,
|
data: yData2,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: (params: any) => {
|
color: (params: any) => {
|
||||||
if (params.value > 90) {
|
if (params.value > 90) {
|
||||||
return gradeColor3[0]
|
return gradeColor3[0]
|
||||||
} else if (params.value > 60) {
|
} else if (params.value > 60) {
|
||||||
return gradeColor3[1]
|
return gradeColor3[1]
|
||||||
} else if (params.value == 3.14159) {
|
} else if (params.value == 3.14159) {
|
||||||
return '#ccc'
|
return '#ccc'
|
||||||
} else {
|
} else {
|
||||||
return gradeColor3[2]
|
return gradeColor3[2]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
options.value = {
|
options.value = {
|
||||||
title: {
|
title: {
|
||||||
text: '稳态指标合格率'
|
text: '稳态指标合格率'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'shadow',
|
type: 'shadow',
|
||||||
label: {
|
label: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontStyle: 'normal',
|
fontStyle: 'normal',
|
||||||
opacity: 0.35,
|
opacity: 0.35,
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
},
|
},
|
||||||
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 + '<br/>'
|
||||||
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].marker+ params[i].seriesName + ': 暂无数据<br/>'
|
||||||
} else {
|
} else {
|
||||||
msg += params[i].marker+ params[i].seriesName + ': ' + params[i].data + '<br/>'
|
msg += params[i].marker+ params[i].seriesName + ': ' + params[i].data + '<br/>'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return msg
|
return msg
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
name: '指标类型',
|
name: '指标类型',
|
||||||
type: 'category',
|
type: 'category',
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
width: 1
|
width: 1
|
||||||
},
|
},
|
||||||
symbol: ['none', 'arrow']
|
symbol: ['none', 'arrow']
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontFamily: 'dinproRegular'
|
fontFamily: 'dinproRegular'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
'频率偏差',
|
'频率偏差',
|
||||||
'闪变',
|
'闪变',
|
||||||
'三相电压不平衡',
|
'三相电压不平衡',
|
||||||
'谐波电压',
|
'谐波电压',
|
||||||
'谐波电流',
|
'谐波电流',
|
||||||
'电压偏差',
|
'电压偏差',
|
||||||
'负序电流',
|
'负序电流',
|
||||||
'间谐波电压含有率'
|
'间谐波电压含有率'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{
|
{
|
||||||
name: '%',
|
name: '%',
|
||||||
type: 'value',
|
type: 'value',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 100,
|
max: 100,
|
||||||
position: 'left',
|
position: 'left',
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
width: 1
|
width: 1
|
||||||
},
|
},
|
||||||
symbol: ['none', 'arrow']
|
symbol: ['none', 'arrow']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
position: 'left',
|
position: 'left',
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
symbol: ['none', 'arrow']
|
symbol: ['none', 'arrow']
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
//分割线配置
|
//分割线配置
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#fff'
|
color: '#fff'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
series
|
series
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style></style>
|
<style></style>
|
||||||
|
|||||||
@@ -1,212 +1,212 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="display: flex; flex-direction: column; height: 100%">
|
<div style="display: flex; flex-direction: column; height: 100%">
|
||||||
<el-form :inline="true">
|
<el-form :inline="true">
|
||||||
<el-form-item label="日期">
|
<el-form-item label="统计时间">
|
||||||
<DatePicker ref="datePickerRef"></DatePicker>
|
<DatePicker ref="datePickerRef"></DatePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="init" icon="el-icon-Search">查询</el-button>
|
<el-button type="primary" @click="init" icon="el-icon-Search">查询</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="flex: 1" class="mt10">
|
<div style="flex: 1" class="mt10">
|
||||||
<my-echart :options="options" />
|
<my-echart :options="options" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { nextTick, onMounted, reactive, ref } from 'vue'
|
import { nextTick, onMounted, reactive, ref } from 'vue'
|
||||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||||
import { getQualityAssessData } from '@/api/harmonic-boot/asses'
|
import { getQualityAssessData } from '@/api/harmonic-boot/asses'
|
||||||
import { gradeColor5 } from '@/components/echarts/color'
|
import { gradeColor5 } from '@/components/echarts/color'
|
||||||
const datePickerRef = ref()
|
const datePickerRef = ref()
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: '',
|
id: '',
|
||||||
searchBeginTime: '',
|
searchBeginTime: '',
|
||||||
searchEndTime: '',
|
searchEndTime: '',
|
||||||
periodBeginTime: '',
|
periodBeginTime: '',
|
||||||
periodEndTime: ''
|
periodEndTime: ''
|
||||||
})
|
})
|
||||||
const options = ref({})
|
const options = ref({})
|
||||||
const gradeNames = ['优质', '良好', '一般', '较差', '极差']
|
const gradeNames = ['优质', '良好', '一般', '较差', '极差']
|
||||||
const grade = gradeColor5.map((item, index) => {
|
const grade = gradeColor5.map((item, index) => {
|
||||||
return {
|
return {
|
||||||
name: gradeNames[index],
|
name: gradeNames[index],
|
||||||
color: item
|
color: item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
if (!monitoringPoint.state.lineId) {
|
if (!monitoringPoint.state.lineId) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
formData.id = monitoringPoint.state.lineId
|
formData.id = monitoringPoint.state.lineId
|
||||||
formData.searchBeginTime = datePickerRef.value.timeValue[0]
|
formData.searchBeginTime = datePickerRef.value.timeValue[0]
|
||||||
formData.searchEndTime = datePickerRef.value.timeValue[1]
|
formData.searchEndTime = datePickerRef.value.timeValue[1]
|
||||||
getQualityAssessData(formData).then((res: any) => {
|
getQualityAssessData(formData).then((res: any) => {
|
||||||
let data = res.data.syn[0]
|
let data = res.data.syn[0]
|
||||||
if (data == 3.14159) {
|
if (data == 3.14159) {
|
||||||
data = 0.25
|
data = 0.25
|
||||||
} else if (data == 3.1415) {
|
} else if (data == 3.1415) {
|
||||||
data = 0.15
|
data = 0.15
|
||||||
}
|
}
|
||||||
options.value = {
|
options.value = {
|
||||||
title: {
|
title: {
|
||||||
text: '稳态综合评估',
|
text: '稳态综合评估',
|
||||||
x: 'center',
|
x: 'center',
|
||||||
y: '0%'
|
y: '0%'
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item',
|
trigger: 'item',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'shadow',
|
type: 'shadow',
|
||||||
label: {
|
label: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontStyle: 'normal',
|
fontStyle: 'normal',
|
||||||
|
|
||||||
opacity: 0.35,
|
opacity: 0.35,
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
},
|
},
|
||||||
borderColor: '#fff',
|
borderColor: '#fff',
|
||||||
backgroundColor: 'rgba(0,0,0,0.55)',
|
backgroundColor: 'rgba(0,0,0,0.55)',
|
||||||
formatter: function (params: any) {
|
formatter: function (params: any) {
|
||||||
if (params.value >= 5) {
|
if (params.value >= 5) {
|
||||||
return params.name + ' : ' + '优质'
|
return params.name + ' : ' + '优质'
|
||||||
} else if (params.value > 4 && params.value <= 5) {
|
} else if (params.value > 4 && params.value <= 5) {
|
||||||
return params.name + ' : ' + '良好'
|
return params.name + ' : ' + '良好'
|
||||||
} else if (params.value > 3 && params.value <= 4) {
|
} else if (params.value > 3 && params.value <= 4) {
|
||||||
return params.name + ' : ' + '合格'
|
return params.name + ' : ' + '合格'
|
||||||
} else if (params.value > 2 && params.value <= 3) {
|
} else if (params.value > 2 && params.value <= 3) {
|
||||||
return params.name + ' : ' + '较差'
|
return params.name + ' : ' + '较差'
|
||||||
} else if (params.value <= 2 && params.value >= 1) {
|
} else if (params.value <= 2 && params.value >= 1) {
|
||||||
return params.name + ' : ' + '极差'
|
return params.name + ' : ' + '极差'
|
||||||
} else if (params.value >= 0.25 && params.value < 1) {
|
} else if (params.value >= 0.25 && params.value < 1) {
|
||||||
return params.name + ' : ' + '暂无数据'
|
return params.name + ' : ' + '暂无数据'
|
||||||
} else if (params.value <= 0.15 && params.value >= 0) {
|
} else if (params.value <= 0.15 && params.value >= 0) {
|
||||||
return params.name + ' : ' + '/'
|
return params.name + ' : ' + '/'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
xAxis: [
|
xAxis: [
|
||||||
{
|
{
|
||||||
name: '指标',
|
name: '指标',
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: ['稳态综合评估'],
|
data: ['稳态综合评估'],
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
margin: 10
|
margin: 10
|
||||||
},
|
},
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
symbol: ['none', 'arrow']
|
symbol: ['none', 'arrow']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: '等级',
|
name: '等级',
|
||||||
type: 'value',
|
type: 'value',
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 5,
|
max: 5,
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
show: true,
|
show: true,
|
||||||
// 这里重新定义就可以
|
// 这里重新定义就可以
|
||||||
formatter: function (value: number) {
|
formatter: function (value: number) {
|
||||||
var texts = []
|
var texts = []
|
||||||
if (value === 1) {
|
if (value === 1) {
|
||||||
texts.push('1级')
|
texts.push('1级')
|
||||||
} else if (value === 2) {
|
} else if (value === 2) {
|
||||||
texts.push('2级')
|
texts.push('2级')
|
||||||
} else if (value === 3) {
|
} else if (value === 3) {
|
||||||
texts.push('3级')
|
texts.push('3级')
|
||||||
} else if (value === 4) {
|
} else if (value === 4) {
|
||||||
texts.push('4级')
|
texts.push('4级')
|
||||||
} else if (value === 5) {
|
} else if (value === 5) {
|
||||||
texts.push('5级')
|
texts.push('5级')
|
||||||
}
|
}
|
||||||
return texts
|
return texts
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
symbol: ['none', 'arrow']
|
symbol: ['none', 'arrow']
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '综合评估',
|
name: '综合评估',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
label: {
|
label: {
|
||||||
show: true,
|
show: true,
|
||||||
position: 'top',
|
position: 'top',
|
||||||
distance: 2,
|
distance: 2,
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontWeight: 'bolder'
|
fontWeight: 'bolder'
|
||||||
},
|
},
|
||||||
barWidth: '45',
|
barWidth: '45',
|
||||||
data: [
|
data: [
|
||||||
{
|
{
|
||||||
value: data
|
value: data
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
markLine: {
|
markLine: {
|
||||||
silent: false,
|
silent: false,
|
||||||
symbol: 'circle',
|
symbol: 'circle',
|
||||||
data: grade.map((item, index) => {
|
data: grade.map((item, index) => {
|
||||||
return {
|
return {
|
||||||
yAxis: grade.length - index,
|
yAxis: grade.length - index,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: item.color
|
color: item.color
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
color: item.color,
|
color: item.color,
|
||||||
formatter: item.name
|
formatter: item.name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: (params: any) => {
|
color: (params: any) => {
|
||||||
if (params.value > 5) {
|
if (params.value > 5) {
|
||||||
return gradeColor5[0]
|
return gradeColor5[0]
|
||||||
} else if (params.value > 4) {
|
} else if (params.value > 4) {
|
||||||
return gradeColor5[1]
|
return gradeColor5[1]
|
||||||
} else if (params.value > 3) {
|
} else if (params.value > 3) {
|
||||||
return gradeColor5[2]
|
return gradeColor5[2]
|
||||||
} else if (params.value > 2) {
|
} else if (params.value > 2) {
|
||||||
return gradeColor5[3]
|
return gradeColor5[3]
|
||||||
} else {
|
} else {
|
||||||
return gradeColor5[4]
|
return gradeColor5[4]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
options: {
|
options: {
|
||||||
dataZoom: null
|
dataZoom: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
<style></style>
|
<style></style>
|
||||||
|
|||||||
@@ -1,136 +1,136 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="display: flex; flex-direction: column; height: 100%">
|
<div style="display: flex; flex-direction: column; height: 100%">
|
||||||
<TableHeader ref="TableHeaderRef" :showSearch="false">
|
<TableHeader ref="TableHeaderRef" :showSearch="false">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="日期">
|
<el-form-item label="统计时间">
|
||||||
<DatePicker ref="datePickerRef"></DatePicker>
|
<DatePicker ref="datePickerRef"></DatePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="指标">
|
<el-form-item label="指标">
|
||||||
<el-radio-group v-model="formData.harmState">
|
<el-radio-group v-model="formData.harmState">
|
||||||
<el-radio-button :label="0">谐波电压含有率</el-radio-button>
|
<el-radio-button :label="0">谐波电压含有率</el-radio-button>
|
||||||
<el-radio-button :label="1">谐波电流幅值</el-radio-button>
|
<el-radio-button :label="1">谐波电流幅值</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:operation>
|
<template v-slot:operation>
|
||||||
<el-button type="primary" @click="init" icon="el-icon-Search">查询</el-button>
|
<el-button type="primary" @click="init" icon="el-icon-Search">查询</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
|
|
||||||
<vxe-table :data="analysisData" v-bind="defaultAttribute">
|
<vxe-table :data="analysisData" v-bind="defaultAttribute">
|
||||||
<vxe-column field="name" title="指标" width="140px"></vxe-column>
|
<vxe-column field="name" title="指标" width="140px"></vxe-column>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
:field="index.toString()"
|
:field="index.toString()"
|
||||||
:title="item + 1 + '次'"
|
:title="item + 1 + '次'"
|
||||||
v-for="(item, index) in 49"
|
v-for="(item, index) in 49"
|
||||||
width="80px"
|
width="80px"
|
||||||
></vxe-column>
|
></vxe-column>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
<div style="flex: 1" class="mt10" v-loading="loading">
|
<div style="flex: 1" class="mt10" v-loading="loading">
|
||||||
<my-echart :options="options" />
|
<my-echart :options="options" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { nextTick, onMounted, reactive, ref } from 'vue'
|
import { nextTick, onMounted, reactive, ref } from 'vue'
|
||||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||||
import { getHarmInHarmData } from '@/api/harmonic-boot/inHarm'
|
import { getHarmInHarmData } from '@/api/harmonic-boot/inHarm'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: []
|
column: []
|
||||||
})
|
})
|
||||||
const datePickerRef = ref()
|
const datePickerRef = ref()
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
id: monitoringPoint.state.lineId,
|
id: monitoringPoint.state.lineId,
|
||||||
searchBeginTime: '',
|
searchBeginTime: '',
|
||||||
searchEndTime: '',
|
searchEndTime: '',
|
||||||
harmState: 0
|
harmState: 0
|
||||||
})
|
})
|
||||||
const analysisData = ref<any>([])
|
const analysisData = ref<any>([])
|
||||||
const options = ref({})
|
const options = ref({})
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
formData.id = monitoringPoint.state.lineId
|
formData.id = monitoringPoint.state.lineId
|
||||||
formData.searchBeginTime = datePickerRef.value.timeValue[0]
|
formData.searchBeginTime = datePickerRef.value.timeValue[0]
|
||||||
formData.searchEndTime = datePickerRef.value.timeValue[1]
|
formData.searchEndTime = datePickerRef.value.timeValue[1]
|
||||||
getHarmInHarmData(formData).then((res: any) => {
|
getHarmInHarmData(formData).then((res: any) => {
|
||||||
let xName = ''
|
let xName = ''
|
||||||
analysisData.value = []
|
analysisData.value = []
|
||||||
if (formData.harmState === 1) {
|
if (formData.harmState === 1) {
|
||||||
xName = 'A'
|
xName = 'A'
|
||||||
analysisData.value.push(
|
analysisData.value.push(
|
||||||
{
|
{
|
||||||
name: '谐波电流幅值(A)',
|
name: '谐波电流幅值(A)',
|
||||||
originData: res.data.harmInHarmValue.map((item: number) =>
|
originData: res.data.harmInHarmValue.map((item: number) =>
|
||||||
item == null || item == 3.14159 ? 0.14159 : Math.floor(item * 1000) / 1000
|
item == null || item == 3.14159 ? 0.14159 : Math.floor(item * 1000) / 1000
|
||||||
),
|
),
|
||||||
...res.data.harmInHarmValue.map((item: number) =>
|
...res.data.harmInHarmValue.map((item: number) =>
|
||||||
item == null || item == 3.14159 ? '/' : Math.floor(item * 1000) / 1000
|
item == null || item == 3.14159 ? '/' : Math.floor(item * 1000) / 1000
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '国标限值(A)',
|
name: '国标限值(A)',
|
||||||
originData: res.data.harmInOverLimit,
|
originData: res.data.harmInOverLimit,
|
||||||
...res.data.harmInOverLimit
|
...res.data.harmInOverLimit
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
xName = '%'
|
xName = '%'
|
||||||
analysisData.value.push(
|
analysisData.value.push(
|
||||||
{
|
{
|
||||||
name: '谐波电压含有率(%)',
|
name: '谐波电压含有率(%)',
|
||||||
originData: res.data.harmInHarmValue.map((item: number) =>
|
originData: res.data.harmInHarmValue.map((item: number) =>
|
||||||
item == null || item == 3.14159 ? 0.14159 : Math.floor(item * 1000) / 1000
|
item == null || item == 3.14159 ? 0.14159 : Math.floor(item * 1000) / 1000
|
||||||
),
|
),
|
||||||
...res.data.harmInHarmValue.map((item: number) =>
|
...res.data.harmInHarmValue.map((item: number) =>
|
||||||
item == null || item == 3.14159 ? '/' : Math.floor(item * 1000) / 1000
|
item == null || item == 3.14159 ? '/' : Math.floor(item * 1000) / 1000
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '国标限值(%)',
|
name: '国标限值(%)',
|
||||||
originData: res.data.harmInOverLimit,
|
originData: res.data.harmInOverLimit,
|
||||||
...res.data.harmInOverLimit
|
...res.data.harmInOverLimit
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
options.value = {
|
options.value = {
|
||||||
xAxis: {
|
xAxis: {
|
||||||
name: '次数',
|
name: '次数',
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Array.from({ length: 49 }, (_, i) => `${i + 2}次`)
|
data: Array.from({ length: 49 }, (_, i) => `${i + 2}次`)
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: xName,
|
name: xName,
|
||||||
type: 'value'
|
type: 'value'
|
||||||
},
|
},
|
||||||
color: ['#2E8B57', '#DAA520'],
|
color: ['#2E8B57', '#DAA520'],
|
||||||
series: analysisData.value.map((item: any) => {
|
series: analysisData.value.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
data: item.originData,
|
data: item.originData,
|
||||||
type: 'bar'
|
type: 'bar'
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
options: {
|
options: {
|
||||||
// dataZoom: null
|
// dataZoom: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div style="display: flex; flex-direction: column; height: 100%">
|
<div style="display: flex; flex-direction: column; height: 100%">
|
||||||
<TableHeader ref="TableHeaderRef" :showSearch="false">
|
<TableHeader ref="TableHeaderRef" :showSearch="false">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="日期">
|
<el-form-item label="统计时间">
|
||||||
<DatePicker ref="datePickerRef"></DatePicker>
|
<DatePicker ref="datePickerRef"></DatePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="对比">
|
<el-form-item label="对比">
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
const showTree = ref(false)
|
const showTree = ref(false)
|
||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const size = ref(0)
|
const size = ref(23)
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const dotList: any = ref({})
|
const dotList: any = ref({})
|
||||||
@@ -129,7 +129,7 @@ provide('tableStore', tableStore)
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
if (dom) {
|
if (dom) {
|
||||||
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
getTemplateByDept({ id: dictData.state.area[0].id })
|
getTemplateByDept({ id: dictData.state.area[0].id })
|
||||||
@@ -165,7 +165,6 @@ const exportEvent = () => {
|
|||||||
exportExcel(luckysheet.getAllSheets(), '统计报表下载')
|
exportExcel(luckysheet.getAllSheets(), '统计报表下载')
|
||||||
}
|
}
|
||||||
const exportReport = () => {
|
const exportReport = () => {
|
||||||
|
|
||||||
loading.value = true
|
loading.value = true
|
||||||
let form = new FormData()
|
let form = new FormData()
|
||||||
form.append('isUrl', false)
|
form.append('isUrl', false)
|
||||||
|
|||||||
@@ -1,152 +1,171 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='default-main' :style='height'>
|
<div class="default-main" :style="height">
|
||||||
<splitpanes style='height: 100%' class='default-theme' id='navigation-splitpanes'>
|
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
||||||
<pane :size='size'>
|
<pane :size="size">
|
||||||
<PointTree :default-expand-all='false' @node-click='handleNodeClick' @init='handleNodeClick'>
|
<PointTree
|
||||||
</PointTree>
|
:default-expand-all="false"
|
||||||
</pane>
|
@node-click="handleNodeClick"
|
||||||
<pane style='background: #fff' :style='height'>
|
@init="handleNodeClick"
|
||||||
<TableHeader ref='TableHeaderRef' datePicker :show-search='false'>
|
></PointTree>
|
||||||
<template v-slot:select>
|
</pane>
|
||||||
<el-form-item label='客户名称'>
|
<pane style="background: #fff" :style="height">
|
||||||
<el-input v-model='tableStore.table.params.crmName' maxlength='32' show-word-limit clearable
|
<TableHeader ref="TableHeaderRef" datePicker :show-search="false">
|
||||||
placeholder='请输入客户名称' />
|
<template v-slot:select>
|
||||||
</el-form-item>
|
<el-form-item label="客户名称">
|
||||||
<el-form-item label='报表编号'>
|
<el-input
|
||||||
<el-input v-model='tableStore.table.params.reportNumber' clearable
|
v-model="tableStore.table.params.crmName"
|
||||||
placeholder='请输入报表编号' maxlength='12' show-word-limit />
|
maxlength="32"
|
||||||
</el-form-item>
|
show-word-limit
|
||||||
</template>
|
clearable
|
||||||
<template #operation>
|
placeholder="请输入客户名称"
|
||||||
<el-upload :show-file-list='false' ref='uploadRef' action='' accept='.png,.jpg'
|
/>
|
||||||
:on-change='choose' :auto-upload='false'>
|
</el-form-item>
|
||||||
<template #trigger>
|
<el-form-item label="报表编号">
|
||||||
<el-button icon='el-icon-Upload' type='primary' class='mr10 ml10'>上传接线图</el-button>
|
<el-input
|
||||||
</template>
|
v-model="tableStore.table.params.reportNumber"
|
||||||
</el-upload>
|
clearable
|
||||||
<el-button icon='el-icon-Download' type='primary' @click='exportEvent'>生成</el-button>
|
placeholder="请输入报表编号"
|
||||||
</template>
|
maxlength="12"
|
||||||
</TableHeader>
|
show-word-limit
|
||||||
<div class='box'>
|
/>
|
||||||
<div id='luckysheet'>
|
</el-form-item>
|
||||||
<img width='100%' :style='`height: calc(${tableStore.table.height} + 40px)`'
|
</template>
|
||||||
src='@/assets/img/jss.png' />
|
<template #operation>
|
||||||
</div>
|
<el-upload
|
||||||
</div>
|
:show-file-list="false"
|
||||||
</pane>
|
ref="uploadRef"
|
||||||
</splitpanes>
|
action=""
|
||||||
</div>
|
accept=".png,.jpg"
|
||||||
</template>
|
:on-change="choose"
|
||||||
|
:auto-upload="false"
|
||||||
<script setup lang='ts'>
|
>
|
||||||
import { onMounted, ref, provide } from 'vue'
|
<template #trigger>
|
||||||
import 'splitpanes/dist/splitpanes.css'
|
<el-button icon="el-icon-Upload" type="primary" class="mr10 ml10">上传接线图</el-button>
|
||||||
import { Splitpanes, Pane } from 'splitpanes'
|
</template>
|
||||||
import TableStore from '@/utils/tableStore'
|
</el-upload>
|
||||||
import PointTree from '@/components/tree/pqs/pointTree.vue'
|
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">生成</el-button>
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
</template>
|
||||||
import { useDictData } from '@/stores/dictData'
|
</TableHeader>
|
||||||
import { mainHeight } from '@/utils/layout'
|
<div class="box">
|
||||||
import { exportModel } from '@/api/process-boot/reportForms'
|
<div id="luckysheet">
|
||||||
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
<img
|
||||||
import type { UploadProps, UploadUserFile } from 'element-plus'
|
width="100%"
|
||||||
|
:style="`height: calc(${tableStore.table.height} + 40px)`"
|
||||||
defineOptions({
|
src="@/assets/img/jss.png"
|
||||||
// name: 'harmonic-boot/report/word'
|
/>
|
||||||
})
|
</div>
|
||||||
const height = mainHeight(20)
|
</div>
|
||||||
const size = ref(0)
|
</pane>
|
||||||
const dictData = useDictData()
|
</splitpanes>
|
||||||
const TableHeaderRef = ref()
|
</div>
|
||||||
const dotList: any = ref({})
|
</template>
|
||||||
const Template: any = ref({})
|
|
||||||
const uploadList: any = ref([])
|
<script setup lang="ts">
|
||||||
|
import { onMounted, ref, provide } from 'vue'
|
||||||
const tableStore = new TableStore({
|
import 'splitpanes/dist/splitpanes.css'
|
||||||
url: '',
|
import { Splitpanes, Pane } from 'splitpanes'
|
||||||
method: 'POST',
|
import TableStore from '@/utils/tableStore'
|
||||||
column: [],
|
import PointTree from '@/components/tree/pqs/pointTree.vue'
|
||||||
beforeSearchFun: () => {
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
},
|
import { useDictData } from '@/stores/dictData'
|
||||||
loadCallback: () => {
|
import { mainHeight } from '@/utils/layout'
|
||||||
}
|
import { exportModel } from '@/api/process-boot/reportForms'
|
||||||
})
|
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||||
provide('tableStore', tableStore)
|
import type { UploadProps, UploadUserFile } from 'element-plus'
|
||||||
|
|
||||||
onMounted(() => {
|
defineOptions({
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
// name: 'harmonic-boot/report/word'
|
||||||
|
})
|
||||||
|
const height = mainHeight(20)
|
||||||
if (dom) {
|
const size = ref(23)
|
||||||
|
const dictData = useDictData()
|
||||||
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
const TableHeaderRef = ref()
|
||||||
}
|
const dotList: any = ref({})
|
||||||
})
|
const Template: any = ref({})
|
||||||
|
const uploadList: any = ref([])
|
||||||
|
|
||||||
const handleNodeClick = (data: any, node: any) => {
|
const tableStore = new TableStore({
|
||||||
dotList.value = data
|
url: '',
|
||||||
}
|
method: 'POST',
|
||||||
// 上传
|
column: [],
|
||||||
const choose = (files: any) => {
|
beforeSearchFun: () => {},
|
||||||
const isJPG = files.raw.type === 'image/jpg'
|
loadCallback: () => {}
|
||||||
const isPNG = files.raw.type === 'image/png'
|
})
|
||||||
if (!isJPG && !isPNG) {
|
provide('tableStore', tableStore)
|
||||||
ElMessage.warning('上传文件只能是 JPG/PNG 格式!')
|
|
||||||
return false
|
onMounted(() => {
|
||||||
}
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
|
|
||||||
uploadList.value = files
|
if (dom) {
|
||||||
ElMessage.success('上传成功')
|
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||||
}
|
}
|
||||||
// 生成
|
})
|
||||||
const exportEvent = () => {
|
|
||||||
if (dotList.value.level != 6) {
|
const handleNodeClick = (data: any, node: any) => {
|
||||||
return ElMessage.warning('请选择监测点进行报告生成!')
|
dotList.value = data
|
||||||
}
|
}
|
||||||
|
// 上传
|
||||||
let form = new FormData()
|
const choose = (files: any) => {
|
||||||
form.append('lineIndex', dotList.value.id)
|
const isJPG = files.raw.type === 'image/jpg'
|
||||||
form.append('name', dotList.value.name)
|
const isPNG = files.raw.type === 'image/png'
|
||||||
form.append('crmName', tableStore.table.params.crmName || '')
|
if (!isJPG && !isPNG) {
|
||||||
form.append('reportNumber', tableStore.table.params.reportNumber || '')
|
ElMessage.warning('上传文件只能是 JPG/PNG 格式!')
|
||||||
form.append('type', '0')
|
return false
|
||||||
form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0])
|
}
|
||||||
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
|
|
||||||
console.log('🚀 ~ exportEvent ~ uploadList.value:', uploadList.value?.raw)
|
uploadList.value = files
|
||||||
form.append('file', uploadList.value?.raw || '')
|
ElMessage.success('上传成功')
|
||||||
// 特殊字符正则表达式
|
}
|
||||||
const specialCharRegex = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/
|
// 生成
|
||||||
if (specialCharRegex.test(tableStore.table.params.crmName) || specialCharRegex.test(tableStore.table.params.reportNumber)) {
|
const exportEvent = () => {
|
||||||
ElNotification({
|
if (dotList.value.level != 6) {
|
||||||
type: 'error',
|
return ElMessage.warning('请选择监测点进行报告生成!')
|
||||||
message: '包含特殊字符,请注意修改!'
|
}
|
||||||
})
|
|
||||||
}else{
|
let form = new FormData()
|
||||||
ElMessage('生成报告中...')
|
form.append('lineIndex', dotList.value.id)
|
||||||
exportModel(form).then((res: any) => {
|
form.append('name', dotList.value.name)
|
||||||
let blob = new Blob([res], {
|
form.append('crmName', tableStore.table.params.crmName || '')
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
form.append('reportNumber', tableStore.table.params.reportNumber || '')
|
||||||
})
|
form.append('type', '0')
|
||||||
// createObjectURL(blob); //创建下载的链接
|
form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0])
|
||||||
const url = window.URL.createObjectURL(blob)
|
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
|
||||||
const link = document.createElement('a') // 创建a标签
|
console.log('🚀 ~ exportEvent ~ uploadList.value:', uploadList.value?.raw)
|
||||||
link.href = url
|
form.append('file', uploadList.value?.raw || '')
|
||||||
link.download = dotList.value.name // 设置下载的文件名
|
// 特殊字符正则表达式
|
||||||
document.body.appendChild(link)
|
const specialCharRegex = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/
|
||||||
link.click() //执行下载
|
if (
|
||||||
document.body.removeChild(link)
|
specialCharRegex.test(tableStore.table.params.crmName) ||
|
||||||
})
|
specialCharRegex.test(tableStore.table.params.reportNumber)
|
||||||
}
|
) {
|
||||||
|
ElNotification({
|
||||||
}
|
type: 'error',
|
||||||
</script>
|
message: '包含特殊字符,请注意修改!'
|
||||||
<style lang='scss'>
|
})
|
||||||
.splitpanes.default-theme .splitpanes__pane {
|
} else {
|
||||||
background: #eaeef1;
|
ElMessage('生成报告中...')
|
||||||
}
|
exportModel(form).then((res: any) => {
|
||||||
|
let blob = new Blob([res], {
|
||||||
.box {
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||||
padding: 10px;
|
})
|
||||||
}
|
// createObjectURL(blob); //创建下载的链接
|
||||||
</style>
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a') // 创建a标签
|
||||||
|
link.href = url
|
||||||
|
link.download = dotList.value.name // 设置下载的文件名
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click() //执行下载
|
||||||
|
document.body.removeChild(link)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.splitpanes.default-theme .splitpanes__pane {
|
||||||
|
background: #eaeef1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -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([])
|
||||||
|
|||||||
@@ -1,343 +1,343 @@
|
|||||||
<!-- 稳态 -->
|
<!-- 稳态 -->
|
||||||
<template>
|
<template>
|
||||||
<!-- 终端 -->
|
<!-- 终端 -->
|
||||||
<el-dialog draggable title="稳态电能质量水平评估统计" v-model="dialogVisible" width="1400px">
|
<el-dialog draggable title="稳态电能质量水平评估统计" v-model="dialogVisible" width="1400px">
|
||||||
<el-row style="height: 300px" :gutter="20">
|
<el-row style="height: 300px" :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>稳态电能质量水平评估</span>
|
<span>稳态电能质量水平评估</span>
|
||||||
</div>
|
</div>
|
||||||
<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
|
<el-step
|
||||||
:class="active == i ? 'highlight' : ''"
|
:class="active == i ? 'highlight' : ''"
|
||||||
:title="item.name"
|
:title="item.name"
|
||||||
@click="handleClick(i)"
|
@click="handleClick(i)"
|
||||||
></el-step>
|
></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>{{ 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">
|
||||||
<div style="width: 150px">
|
<div style="width: 150px">
|
||||||
均值:
|
均值:
|
||||||
<span style="color: #339966">{{ item.avg == 3.14159 ? '--' : item.avg }}</span>
|
<span style="color: #339966">{{ item.avg == 3.14159 ? '--' : item.avg }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
标准差:
|
标准差:
|
||||||
<span style="color: #ff9900">{{ item.avg == 3.14159 ? '--' : item.sd }}</span>
|
<span style="color: #ff9900">{{ item.avg == 3.14159 ? '--' : item.sd }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>稳态电能质量超标占比环比变化</span>
|
<span>稳态电能质量超标占比环比变化</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="pie">
|
<div class="pie">
|
||||||
<div style="height: 250px; width: 100%" ref="chartRef"></div>
|
<div style="height: 250px; width: 100%" ref="chartRef"></div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div>
|
<div>
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span>区域稳态电能质量水平评估</span>
|
<span>区域稳态电能质量水平评估</span>
|
||||||
</div>
|
</div>
|
||||||
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="365px" :data="tableData">
|
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="365px" :data="tableData">
|
||||||
<vxe-column field="deptName" title="区域" />
|
<vxe-column field="deptName" title="区域" />
|
||||||
<vxe-column sortable field="onlineNum" title="在线监测点数量(个)" />
|
<vxe-column sortable field="onlineNum" title="在运监测点数(个)" />
|
||||||
<vxe-column sortable field="overNum" title="超标监测点数量(个)" />
|
<vxe-column sortable field="overNum" title="超标监测点数量(个)" />
|
||||||
<vxe-column sortable field="overRatio" title="超标监测点占比(%)" />
|
<vxe-column sortable field="overRatio" title="超标监测点占比(%)" />
|
||||||
|
|
||||||
<vxe-colgroup :title="item" v-for="(item, i) in title">
|
<vxe-colgroup :title="item" v-for="(item, i) in title">
|
||||||
<vxe-column title="监测点数 " field="overNum">
|
<vxe-column title="监测点数 " field="overNum">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.list == null ? '' : scope.row.list[i].overNum }}</span>
|
<span>{{ scope.row.list == null ? '' : scope.row.list[i].overNum }}</span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column title="天数" field="overDay">
|
<vxe-column title="天数" field="overDay">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.list == null ? '' : scope.row.list[i].overDay }}</span>
|
<span>{{ scope.row.list == null ? '' : scope.row.list[i].overDay }}</span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
</vxe-colgroup>
|
</vxe-colgroup>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, nextTick } from 'vue'
|
import { ref, nextTick } from 'vue'
|
||||||
import echarts from '@/components/echarts/echarts'
|
import echarts from '@/components/echarts/echarts'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { color } from '@/components/echarts/color'
|
import { color } from '@/components/echarts/color'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { getEvaluationData, evaluationDetail, evaluationRatio } from '@/api/device-boot/panorama'
|
import { getEvaluationData, evaluationDetail, evaluationRatio } from '@/api/device-boot/panorama'
|
||||||
const dialogVisible: any = ref(false)
|
const dialogVisible: any = ref(false)
|
||||||
const rowList = ref({})
|
const rowList = ref({})
|
||||||
const active: any = ref(1)
|
const active: any = ref(1)
|
||||||
const evaluationData: any = ref([])
|
const evaluationData: any = ref([])
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const Voltage: any = dictData.getBasicData('Dev_Voltage_Stand').filter(item => {
|
const Voltage: any = dictData.getBasicData('Dev_Voltage_Stand').filter(item => {
|
||||||
if (item.code == '35kV' || item.code == '500kV' || item.code == '220kV' || item.code == '110kV') {
|
if (item.code == '35kV' || item.code == '500kV' || item.code == '220kV' || item.code == '110kV') {
|
||||||
return item
|
return item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const chartRef = ref<HTMLDivElement>()
|
const chartRef = ref<HTMLDivElement>()
|
||||||
const url: any = [
|
const url: any = [
|
||||||
new URL(`@/assets/img/PLPC.png`, import.meta.url),
|
new URL(`@/assets/img/PLPC.png`, import.meta.url),
|
||||||
new URL(`@/assets/img/DYPC.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/JBL.png`, import.meta.url),
|
||||||
new URL(`@/assets/img/SXDY.png`, import.meta.url),
|
new URL(`@/assets/img/SXDY.png`, import.meta.url),
|
||||||
new URL(`@/assets/img/SB.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 = ['频率偏差(超标)', '电压偏差(超标)', '电压总谐波畸变率(超标)', '闪变(超标)', '三相电压不平衡度(超标)']
|
||||||
|
|
||||||
const echart = (row: any) => {
|
const echart = (row: any) => {
|
||||||
let maxList: any = []
|
let maxList: any = []
|
||||||
row.forEach((item: any) => {
|
row.forEach((item: any) => {
|
||||||
maxList.push(...(item.ratioList || [0]))
|
maxList.push(...(item.ratioList || [0]))
|
||||||
})
|
})
|
||||||
let max = Math.max(...maxList) > 50 ? 100 : 50
|
let max = Math.max(...maxList) > 50 ? 100 : 50
|
||||||
|
|
||||||
let chart = echarts.init(chartRef.value as HTMLDivElement)
|
let chart = echarts.init(chartRef.value as HTMLDivElement)
|
||||||
|
|
||||||
let dataname = [
|
let dataname = [
|
||||||
'频率偏差(Hz)',
|
'频率偏差(Hz)',
|
||||||
'电压偏差(%)',
|
'电压偏差(%)',
|
||||||
'电压总谐波畸变率(%)',
|
'电压总谐波畸变率(%)',
|
||||||
'三相电压不平衡度(%)',
|
'三相电压不平衡度(%)',
|
||||||
'闪变',
|
'闪变',
|
||||||
'谐波电压(%)',
|
'谐波电压(%)',
|
||||||
'谐波电流(%)',
|
'谐波电流(%)',
|
||||||
'间谐波电压(%)',
|
'间谐波电压(%)',
|
||||||
'负序电流(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++) {
|
||||||
indicator.push({
|
indicator.push({
|
||||||
name: dataname[i],
|
name: dataname[i],
|
||||||
max: max
|
max: max
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
let option: any = {
|
let option: any = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item',
|
trigger: 'item',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
type: 'shadow',
|
type: 'shadow',
|
||||||
label: {
|
label: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontSize: 16
|
fontSize: 16
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
fontStyle: 'normal',
|
fontStyle: 'normal',
|
||||||
opacity: 0.35,
|
opacity: 0.35,
|
||||||
fontSize: 14
|
fontSize: 14
|
||||||
},
|
},
|
||||||
backgroundColor: 'rgba(0,0,0,0.55)',
|
backgroundColor: 'rgba(0,0,0,0.55)',
|
||||||
borderWidth: 0,
|
borderWidth: 0,
|
||||||
position: 'bottom'
|
position: 'bottom'
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: row.map((item: any) => item.time),
|
data: row.map((item: any) => item.time),
|
||||||
type: 'scroll',
|
type: 'scroll',
|
||||||
orient: 'vertical',
|
orient: 'vertical',
|
||||||
icon: 'roundRect',
|
icon: 'roundRect',
|
||||||
right: '20',
|
right: '20',
|
||||||
|
|
||||||
itemGap: 10,
|
itemGap: 10,
|
||||||
itemWidth: 16,
|
itemWidth: 16,
|
||||||
itemHeight: 16,
|
itemHeight: 16,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: '15',
|
fontSize: '15',
|
||||||
color: '#656565'
|
color: '#656565'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
radar: {
|
radar: {
|
||||||
center: ['50%', '60%'],
|
center: ['50%', '60%'],
|
||||||
radius: '60%',
|
radius: '60%',
|
||||||
startAngle: 90,
|
startAngle: 90,
|
||||||
splitNumber: 5,
|
splitNumber: 5,
|
||||||
splitArea: {
|
splitArea: {
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
color: ['#FFFFFF', '#F5F9FF'].reverse()
|
color: ['#FFFFFF', '#F5F9FF'].reverse()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#D2E4F8'
|
color: '#D2E4F8'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: true,
|
show: true,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#D2E4F8'
|
color: '#D2E4F8'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
name: {
|
name: {
|
||||||
formatter: '{value}',
|
formatter: '{value}',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#656565',
|
color: '#656565',
|
||||||
fontSize: 15
|
fontSize: 15
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
indicator: indicator
|
indicator: indicator
|
||||||
},
|
},
|
||||||
|
|
||||||
series: []
|
series: []
|
||||||
}
|
}
|
||||||
|
|
||||||
row.forEach((item: any, i: any) => {
|
row.forEach((item: any, i: any) => {
|
||||||
option.series.push({
|
option.series.push({
|
||||||
name: item.time,
|
name: item.time,
|
||||||
type: 'radar',
|
type: 'radar',
|
||||||
symbol: 'none',
|
symbol: 'none',
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
color: color[i + 1]
|
color: color[i + 1]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
color: color[i + 1]
|
color: color[i + 1]
|
||||||
},
|
},
|
||||||
data: [item.ratioList]
|
data: [item.ratioList]
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
chart.setOption(option)
|
chart.setOption(option)
|
||||||
}
|
}
|
||||||
|
|
||||||
const open = async (row: any) => {
|
const open = async (row: any) => {
|
||||||
rowList.value = row
|
rowList.value = row
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
// 稳态电能质量水平评估
|
// 稳态电能质量水平评估
|
||||||
handleClick(0)
|
handleClick(0)
|
||||||
//环比
|
//环比
|
||||||
evaluationRatio(row).then(res => {
|
evaluationRatio(row).then(res => {
|
||||||
echart(res.data)
|
echart(res.data)
|
||||||
})
|
})
|
||||||
// 稳态电能质量水平评估详细列表
|
// 稳态电能质量水平评估详细列表
|
||||||
evaluationDetail(row).then(res => {
|
evaluationDetail(row).then(res => {
|
||||||
tableData.value = res.data
|
tableData.value = res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 点击电压等级
|
// 点击电压等级
|
||||||
const handleClick = (i: any) => {
|
const handleClick = (i: any) => {
|
||||||
active.value = i
|
active.value = i
|
||||||
getEvaluationData({
|
getEvaluationData({
|
||||||
...rowList.value,
|
...rowList.value,
|
||||||
voltageLevel: Voltage[i].id
|
voltageLevel: Voltage[i].id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
evaluationData.value = res.data
|
evaluationData.value = res.data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
:deep(.el-select) {
|
:deep(.el-select) {
|
||||||
min-width: 80px;
|
min-width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-weight: 550;
|
font-weight: 550;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pie {
|
.pie {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
|
|
||||||
.evaluationData {
|
.evaluationData {
|
||||||
height: 33px;
|
height: 33px;
|
||||||
margin: 8px 30px;
|
margin: 8px 30px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
box-shadow: 1px 1px 1px 1px #e8e3e3;
|
box-shadow: 1px 1px 1px 1px #e8e3e3;
|
||||||
display: flex;
|
display: flex;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
line-height: 35px;
|
line-height: 35px;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 25px;
|
height: 25px;
|
||||||
width: 25px;
|
width: 25px;
|
||||||
margin: 4px 20px 0px 30px;
|
margin: 4px 20px 0px 30px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-steps {
|
.el-steps {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-step__icon) {
|
:deep(.el-step__icon) {
|
||||||
border: none;
|
border: none;
|
||||||
background: #ccc;
|
background: #ccc;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
width: 15px;
|
width: 15px;
|
||||||
height: 15px;
|
height: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-step__icon-inner) {
|
:deep(.el-step__icon-inner) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.boxSteps) {
|
:deep(.boxSteps) {
|
||||||
border-radius: 50px;
|
border-radius: 50px;
|
||||||
width: 60%;
|
width: 60%;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
|
|
||||||
.el-step__title {
|
.el-step__title {
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin-left: -10px;
|
margin-left: -10px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #000 !important;
|
color: #000 !important;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -50px;
|
top: -50px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.highlight) {
|
:deep(.highlight) {
|
||||||
.el-step__icon {
|
.el-step__icon {
|
||||||
background: var(--el-color-primary);
|
background: var(--el-color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-step__title {
|
.el-step__title {
|
||||||
font-weight: 700 !important;
|
font-weight: 700 !important;
|
||||||
color: var(--el-color-primary) !important;
|
color: var(--el-color-primary) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
// .is-wait {
|
// .is-wait {
|
||||||
// color: var(--el-color-primary) !important;
|
// color: var(--el-color-primary) !important;
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-dialog__body) {
|
:deep(.el-dialog__body) {
|
||||||
max-height: none !important;
|
max-height: none !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -6,20 +6,21 @@
|
|||||||
<div class="title">
|
<div class="title">
|
||||||
<span>
|
<span>
|
||||||
稳态综合评估
|
稳态综合评估
|
||||||
<el-popover placement="right" :width="150" 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">优质:(4.5 , 5]</span>
|
<span style="color: #00B07D">无污染:0</span>
|
||||||
<br />
|
<br />
|
||||||
<span style="color: #2b7fd3">良好:(4 , 4.5]</span>
|
<span style="color: #3399ff">轻微污染:(0 , 100]</span>
|
||||||
<br />
|
<br />
|
||||||
<span style="color: #ffcc33">合格:(3 , 4]</span>
|
<span style="color: #ffcc33">轻度污染:(100 , 1000]</span>
|
||||||
<br />
|
<br />
|
||||||
<span style="color: #97017e">较差:(2 , 3]</span>
|
<span style="color: #ff9900">中度污染:(1000 , 10000]</span>
|
||||||
<br />
|
<br />
|
||||||
<span style="color: #A52a2a">极差:[1 , 2]</span>
|
<span style="color: #A52a2a">重度污染:(10000</span>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</span>
|
</span>
|
||||||
@@ -53,7 +54,6 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
{{ assessList.score == 3.14159 ? '/' : assessList.score }}
|
{{ assessList.score == 3.14159 ? '/' : assessList.score }}
|
||||||
<!-- {{ assessList.level }} -->
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="evaluate">
|
<div class="evaluate">
|
||||||
@@ -318,7 +318,7 @@ const options = ref([
|
|||||||
|
|
||||||
])
|
])
|
||||||
const technology: any = ref({})
|
const technology: any = ref({})
|
||||||
const harmonicType = ref('0')
|
const harmonicType = ref('6')
|
||||||
const transientNum = ref([0, 0])
|
const transientNum = ref([0, 0])
|
||||||
const options1: any = dictData.getBasicData('Event_Statis').filter(item => {
|
const options1: any = dictData.getBasicData('Event_Statis').filter(item => {
|
||||||
if (item.code == 'Voltage_Dip' || item.code == 'Voltage_Rise' || item.code == 'Short_Interruptions') {
|
if (item.code == 'Voltage_Dip' || item.code == 'Voltage_Rise' || item.code == 'Short_Interruptions') {
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -13,8 +13,10 @@
|
|||||||
<div v-for="(item, i) in list" class="cardBox" :style="i == 1 ? 'flex:1.3' : ''">
|
<div v-for="(item, i) in list" class="cardBox" :style="i == 1 ? 'flex:1.3' : ''">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<span style="cursor: pointer" @click="GridDiagram(i)">{{ item.title }}:</span>
|
<span style="cursor: pointer" @click="GridDiagram(i)">{{ item.title }}:</span>
|
||||||
<span :style="`color: ${item.color[0]}; cursor:pointer`"
|
<span
|
||||||
@click="LookMap(item.list[4].numOneList, item.list[4].numTwoList, 0)">
|
:style="`color: ${item.color[0]}; cursor:pointer`"
|
||||||
|
@click="LookMap(item.list[4].numOneList, item.list[4].numTwoList, 0)"
|
||||||
|
>
|
||||||
{{ item.list[4].numOne }}
|
{{ item.list[4].numOne }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -23,8 +25,10 @@
|
|||||||
<!-- 监测规模 列表 -->
|
<!-- 监测规模 列表 -->
|
||||||
<div>
|
<div>
|
||||||
<div class="vcl mt5">
|
<div class="vcl mt5">
|
||||||
<p v-for="(item, i) in vList"
|
<p
|
||||||
:style="i == 0 ? 'width: 60px' : i == 5 ? 'width: 32px' : 'flex:1'">
|
v-for="(item, i) in vList"
|
||||||
|
:style="i == 0 ? 'width: 60px' : i == 5 ? 'width: 32px' : 'flex:1'"
|
||||||
|
>
|
||||||
{{ item }}
|
{{ item }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -57,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" />
|
||||||
@@ -68,16 +72,19 @@
|
|||||||
<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 class="card-Box" :style="`height:calc((${boxHeight.height} - 50px )/ 3);`"
|
<div
|
||||||
v-for="val in item.children">
|
class="card-Box mt10"
|
||||||
|
:style="`height:calc((${boxHeight.height} - 20px )/ 2);`"
|
||||||
|
v-for="val in item.children"
|
||||||
|
>
|
||||||
<div>
|
<div>
|
||||||
<span class="line"></span>
|
<span class="line"></span>
|
||||||
<span class="vol">{{ val.title }}</span>
|
<span class="vol">{{ val.title }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="num">
|
<div class="num num1">
|
||||||
<div @click="LookMap(val.numList, [], 0)">
|
<div @click="LookMap(val.numList, [], 0)">
|
||||||
投运:
|
投运:
|
||||||
<span>{{ val.num }}</span>
|
<span>{{ val.num }}</span>
|
||||||
@@ -88,29 +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>
|
||||||
|
在线率:
|
||||||
|
<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">
|
||||||
<span class="line"></span>
|
<div style="text-align: left">
|
||||||
<span class="vol">{{ item.title[0] }}</span>
|
<span class="line"></span>
|
||||||
</div>
|
<i class="vol">{{ item.title[0] }}</i>
|
||||||
<div class="num">
|
</div>
|
||||||
<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)">
|
||||||
@@ -119,7 +141,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ item.title[2] }}:
|
{{ item.title[2] }}:
|
||||||
<span style="color: #A52a2a" @click="LookMap([], item.lineListTwo, 1)">
|
<span style="color: #a52a2a" @click="LookMap([], item.lineListTwo, 1)">
|
||||||
{{ item.lineNumTwo || 0 }}
|
{{ item.lineNumTwo || 0 }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -129,8 +151,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img class="imgL" :style="show ? 'transform: rotate(0deg);' : 'transform: rotate(180deg);'"
|
<img
|
||||||
@click="show = !show" src="@/assets/img/QH.png" />
|
class="imgL"
|
||||||
|
:style="show ? 'transform: rotate(0deg);' : 'transform: rotate(180deg);'"
|
||||||
|
@click="show = !show"
|
||||||
|
src="@/assets/img/QH.png"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 变电站详情 -->
|
<!-- 变电站详情 -->
|
||||||
<stand ref="standRef" />
|
<stand ref="standRef" />
|
||||||
@@ -282,15 +308,16 @@ 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 }
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '上送网公司',
|
|
||||||
children: [{ title: '电网侧监测点', num: 0, onLineNum: 0, integrityRate: 0 }]
|
|
||||||
}
|
}
|
||||||
|
// {
|
||||||
|
// title: '上送网公司',
|
||||||
|
// children: [{ title: '电网侧监测点', num: 0, onLineNum: 0, integrityRate: 0 }]
|
||||||
|
// }
|
||||||
])
|
])
|
||||||
const linList: any = ref([
|
const linList: any = ref([
|
||||||
{
|
{
|
||||||
@@ -307,7 +334,7 @@ const linList: any = ref([
|
|||||||
title: ['电能质量指标', '未超标', '超标']
|
title: ['电能质量指标', '未超标', '超标']
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
const vList = ['', '500kV', '220kV', '110kV', '35kV',]
|
const vList = ['', '500kV', '220kV', '110kV', '35kV']
|
||||||
const formRow: any = ref({})
|
const formRow: any = ref({})
|
||||||
const height = mainHeight(30)
|
const height = mainHeight(30)
|
||||||
const boxHeight = mainHeight(290, 2)
|
const boxHeight = mainHeight(290, 2)
|
||||||
@@ -364,11 +391,11 @@ 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] }
|
||||||
countList.value[1].children[0] = { title: '电网侧监测点', ...res.data.gwData[0] }
|
// countList.value[1].children[0] = { title: '电网侧监测点', ...res.data.gwData[0] }
|
||||||
})
|
})
|
||||||
// 监测运行统计
|
// 监测运行统计
|
||||||
getGridDiagramRunData(form).then(res => {
|
getGridDiagramRunData(form).then(res => {
|
||||||
@@ -392,7 +419,7 @@ const LookMap = (coutList: object, alarmList: object, key?: any) => {
|
|||||||
const GridDiagram = (k: any) => {
|
const GridDiagram = (k: any) => {
|
||||||
emit('GridDiagram', k, 3)
|
emit('GridDiagram', k, 3)
|
||||||
}
|
}
|
||||||
onMounted(() => { })
|
onMounted(() => {})
|
||||||
defineExpose({ info, show })
|
defineExpose({ info, show })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -504,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 {
|
||||||
@@ -536,12 +563,28 @@ defineExpose({ info, show })
|
|||||||
font-weight: 550;
|
font-weight: 550;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.num1 {
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
grid-template-rows: auto auto;
|
||||||
|
gap: 15px;
|
||||||
|
div {
|
||||||
|
display: flex;
|
||||||
|
padding-left: 20px;
|
||||||
|
span {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.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 {
|
||||||
@@ -592,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>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user