Compare commits
7 Commits
2025-11
...
ff2b9db7b8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff2b9db7b8 | ||
|
|
289900f9ff | ||
|
|
e87d05c587 | ||
| 46c55d48ec | |||
| b36f765d07 | |||
|
|
0fe2d2b911 | ||
|
|
8c41a8fc77 |
@@ -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,12 @@ 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 })
|
||||||
|
}
|
||||||
@@ -54,6 +54,24 @@
|
|||||||
<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">停运事件管理</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 +252,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=1764826411334') format('woff2'),
|
||||||
url('iconfont.woff?t=1744179175277') format('woff'),
|
url('iconfont.woff?t=1764826411334') format('woff'),
|
||||||
url('iconfont.ttf?t=1744179175277') format('truetype');
|
url('iconfont.ttf?t=1764826411334') format('truetype');
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||||
@@ -262,6 +280,33 @@
|
|||||||
<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-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 +577,30 @@
|
|||||||
<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-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,10 +1,9 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 3482754 */
|
font-family: 'iconfont';
|
||||||
src: url('iconfont.woff2?t=1744179175277') format('woff2'),
|
src: url('/src/assets/font/iconfont.woff2?t=1764826411334') format('woff2'),
|
||||||
url('iconfont.woff?t=1744179175277') format('woff'),
|
url('/src/assets/font/iconfont.woff?t=1764826411334') format('woff'),
|
||||||
url('iconfont.ttf?t=1744179175277') format('truetype');
|
url('/src/assets/font/iconfont.ttf?t=1764826411334') format('truetype');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
font-family: "iconfont" !important;
|
font-family: "iconfont" !important;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@@ -13,6 +12,18 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.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,27 @@
|
|||||||
"css_prefix_text": "icon-",
|
"css_prefix_text": "icon-",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"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.
@@ -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()
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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,24 +18,48 @@
|
|||||||
>
|
>
|
||||||
<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>
|
||||||
@@ -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>
|
||||||
|
|||||||
@@ -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']
|
||||||
|
|||||||
@@ -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 => {
|
||||||
|
|||||||
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,245 @@
|
|||||||
<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)
|
|
||||||
// treeRef.value!.filter(filterText.value)
|
|
||||||
// }else{
|
</div>
|
||||||
// treeRef.value!.filter(filterText.value)
|
</template>
|
||||||
// }
|
|
||||||
|
<script lang="ts" setup>
|
||||||
// })
|
import useCurrentInstance from '@/utils/useCurrentInstance'
|
||||||
const onMenuCollapse = () => {
|
import { ElTree } from 'element-plus'
|
||||||
menuCollapse.value = !menuCollapse.value
|
import { ref, watch } from 'vue'
|
||||||
proxy.eventBus.emit('cnTreeCollapse', menuCollapse)
|
import { ElMessage } from 'element-plus'
|
||||||
}
|
import MonitoringPointDetails from './details/monitoringPointDetails.vue'
|
||||||
const filterNode = (value: string, data: any, node: any) => {
|
import SubstationDetails from './details/substationDetails.vue'
|
||||||
if (!value) return true
|
|
||||||
// return data.name.includes(value)
|
defineOptions({
|
||||||
if (data.name) {
|
name: 'govern/tree'
|
||||||
|
})
|
||||||
return chooseNode(value, data, node)
|
const emit = defineEmits(['onAddTree'])
|
||||||
}
|
interface Props {
|
||||||
}
|
width?: string
|
||||||
|
canExpand?: boolean
|
||||||
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配,则返回该节点以及其下的所有子节点;如果参数是子节点,则返回该节点的父节点。name是中文字符,enName是英文字符.
|
addTree?: boolean
|
||||||
const chooseNode = (value: string, data: any, node: any) => {
|
}
|
||||||
|
|
||||||
if (data.name.indexOf(value) !== -1) {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
return true
|
width: '280px',
|
||||||
}
|
canExpand: true,
|
||||||
const level = node.level
|
addTree: false
|
||||||
// 如果传入的节点本身就是一级节点就不用校验了
|
})
|
||||||
if (level === 1) {
|
const { proxy } = useCurrentInstance()
|
||||||
return false
|
const menuCollapse = ref(false)
|
||||||
}
|
const MonitoringPointRef = ref()
|
||||||
// 先取当前节点的父节点
|
const SubstationRef = ref()
|
||||||
let parentData = node.parent
|
const filterText = ref('')
|
||||||
// 遍历当前节点的父节点
|
const defaultProps = {
|
||||||
let index = 0
|
label: 'name',
|
||||||
while (index < level - 1) {
|
value: 'id'
|
||||||
// 如果匹配到直接返回,此处name值是中文字符,enName是英文字符。判断匹配中英文过滤
|
}
|
||||||
if (parentData.data.name.indexOf(value) !== -1) {
|
const specialCharsPattern = /[`~!@$%^&*\-+=<>?:"{}|,.\/;'\\[\]·~!@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、~]/g
|
||||||
return true
|
const change = val => {
|
||||||
}
|
if (specialCharsPattern.test(val)) {
|
||||||
// 否则的话再往上一层做匹配
|
ElMessage.warning('禁止输入特殊字符!')
|
||||||
parentData = parentData.parent
|
filterText.value = val.replace(
|
||||||
index++
|
/[`~!@$%^&*\-+=<>?:"{}|,.\/;'\\[\]·~!@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、~]/g,
|
||||||
}
|
''
|
||||||
// 没匹配到返回false
|
)
|
||||||
return false
|
console.log('🚀 ~ change ~ filterText.value:', filterText.value)
|
||||||
}
|
|
||||||
// 添加树
|
treeRef.value!.filter(filterText.value)
|
||||||
const onAddTree = () => {
|
} else {
|
||||||
emit('onAddTree')
|
treeRef.value!.filter(filterText.value)
|
||||||
}
|
}
|
||||||
const treeRef = ref<InstanceType<typeof ElTree>>()
|
}
|
||||||
defineExpose({ treeRef })
|
// watch(filterText, val => {
|
||||||
</script>
|
|
||||||
|
// console.log("🚀 ~ val:", specialCharsPattern.test(val))
|
||||||
<style lang="scss" scoped>
|
// if (specialCharsPattern.test(val)) {
|
||||||
.cn-tree {
|
// ElMessage.warning('禁止输入特殊字符!')
|
||||||
flex-shrink: 0;
|
// filterText.value = val.replace(/[`~!@$%^&*\-+=<>?:"{}|,.\/;'\\[\]·~!@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、~]/g, "")
|
||||||
display: flex;
|
// console.log("🚀 ~ filterText.value:", filterText.value)
|
||||||
flex-direction: column;
|
// treeRef.value!.filter(filterText.value)
|
||||||
box-sizing: border-box;
|
// }else{
|
||||||
padding: 10px;
|
// treeRef.value!.filter(filterText.value)
|
||||||
height: 100%;
|
// }
|
||||||
width: 100%;
|
|
||||||
|
// })
|
||||||
:deep(.el-tree) {
|
const onMenuCollapse = () => {
|
||||||
border: 1px solid var(--el-border-color);
|
menuCollapse.value = !menuCollapse.value
|
||||||
}
|
proxy.eventBus.emit('cnTreeCollapse', menuCollapse)
|
||||||
|
}
|
||||||
:deep(.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content) {
|
// 查看详情
|
||||||
background-color: var(--el-color-primary-light-7);
|
const viewDetails = (data: any) => {
|
||||||
}
|
console.log("🚀 ~ viewDetails ~ data:", data)
|
||||||
|
if (data.level == 3) {
|
||||||
.menu-collapse {
|
// 变电站详情
|
||||||
color: var(--el-color-primary);
|
// substationDetails
|
||||||
}
|
SubstationRef.value.open(data)
|
||||||
}
|
} else {
|
||||||
|
// 监测点详情
|
||||||
.custom-tree-node {
|
MonitoringPointRef.value.open(data)
|
||||||
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
|
||||||
|
}
|
||||||
|
// 添加树
|
||||||
|
const onAddTree = () => {
|
||||||
|
emit('onAddTree')
|
||||||
|
}
|
||||||
|
const treeRef = ref<InstanceType<typeof ElTree>>()
|
||||||
|
defineExpose({ treeRef })
|
||||||
|
</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>
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -362,3 +362,4 @@ export function getTimeOfTheMonth(key: string): [string, string] {
|
|||||||
throw new Error('Invalid key')
|
throw new Error('Invalid key')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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="网络参数"></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 => {
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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: '网络参数', minWidth: '110' },
|
||||||
{ 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 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,
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<el-option label="非电网侧" value="2"></el-option>
|
<el-option label="非电网侧" value="2"></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="searchKeyword"
|
v-model="searchKeyword"
|
||||||
placeholder="请输入变电站/终端/监测点"
|
placeholder="请输入变电站/终端/监测点"
|
||||||
@@ -63,21 +63,21 @@
|
|||||||
<vxe-column field="gdName" title="供电公司" align="center" min-width="120" ></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="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="devName" title="终端名称" align="center" min-width="120"></vxe-column>
|
||||||
<vxe-column field="devType" title="终端型号" align="center" min-width="150"></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="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="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="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column> -->
|
||||||
<vxe-column field="lineVoltage" title="监测点电压等级" align="center" min-width="120"></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="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="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="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="onlineRate" title="在线率(%)" align="center" min-width="100"></vxe-column> -->
|
||||||
<vxe-column field="integrity" 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="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="upCounts" title="暂升次数(次)" align="center" min-width="100"></vxe-column> -->
|
||||||
<vxe-column field="downCounts" 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="breakCounts" title="短时中断(次)" align="center" min-width="100"></vxe-column> -->
|
||||||
<vxe-column field="monitorId" title="一类监测点" align="center" min-width="120" :formatter="formatMonitorId"></vxe-column>
|
<!-- <vxe-column field="monitorId" title="一类监测点" align="center" min-width="120" :formatter="formatMonitorId"></vxe-column> -->
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<el-option label="非电网侧" value="2"></el-option>
|
<el-option label="非电网侧" value="2"></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="searchKeyword"
|
v-model="searchKeyword"
|
||||||
placeholder="请输入变电站"
|
placeholder="请输入变电站"
|
||||||
@@ -86,9 +86,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 添加弹窗 -->
|
<!-- 添加弹窗 -->
|
||||||
<el-dialog
|
<el-dialog draggable
|
||||||
v-model="detailDialogVisible"
|
v-model="detailDialogVisible"
|
||||||
:title="detailDialogTitle"
|
:title="detailDialogTitle"
|
||||||
|
width="1000px"
|
||||||
|
|
||||||
>
|
>
|
||||||
<div v-loading="detailLoading">
|
<div v-loading="detailLoading">
|
||||||
@@ -99,6 +100,7 @@
|
|||||||
ref="detailTableRef"
|
ref="detailTableRef"
|
||||||
:data="detailData"
|
:data="detailData"
|
||||||
auto-resize
|
auto-resize
|
||||||
|
v-bind="defaultAttribute"
|
||||||
resizable
|
resizable
|
||||||
show-overflow
|
show-overflow
|
||||||
height="400px"
|
height="400px"
|
||||||
@@ -123,6 +125,7 @@
|
|||||||
|
|
||||||
import { ref, onMounted, provide, onBeforeUnmount, computed, watch } from 'vue'
|
import { ref, onMounted, provide, onBeforeUnmount, computed, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
|
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
@@ -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%监测点_')"
|
||||||
>
|
>
|
||||||
@@ -160,13 +162,18 @@
|
|||||||
</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="130px"></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
|
||||||
@@ -267,7 +274,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 +361,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 +432,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 || '/'
|
||||||
@@ -474,6 +494,7 @@ 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: '网络参数',
|
||||||
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%终端_')"
|
||||||
>
|
>
|
||||||
@@ -157,10 +161,10 @@
|
|||||||
</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="130px"></vxe-column>
|
||||||
<vxe-column field="runFlag" title="运行状态" width="90px">
|
<vxe-column field="runFlag" title="运行状态" width="90px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@@ -200,6 +204,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'
|
||||||
@@ -262,10 +267,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 +423,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,6 +485,7 @@ 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>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
<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
|
||||||
@@ -83,14 +83,14 @@ defineOptions({
|
|||||||
|
|
||||||
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) => {
|
||||||
|
|||||||
@@ -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,13 +133,10 @@ 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)
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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') {
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -67,17 +71,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<div :style="`height:calc(${boxHeight.height} + 20px);overflow-y: auto;`">
|
<div :style="`height:calc(${boxHeight.height} + 20px);overflow-y: auto;`">
|
||||||
<div v-for="item in countList">
|
<div v-for="item in countList">
|
||||||
<div class="title mt5" style="font-weight: 500">
|
<!-- <div class="title mt5" style="font-weight: 500">
|
||||||
<img src="@/assets/img/TJ.png" />
|
<img src="@/assets/img/TJ.png" />
|
||||||
{{ item.title }}
|
{{ item.title }}
|
||||||
</div>
|
</div> -->
|
||||||
<div 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>
|
||||||
@@ -90,6 +97,10 @@
|
|||||||
数据完整性:
|
数据完整性:
|
||||||
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate }}%</span>
|
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate }}%</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
在线率:
|
||||||
|
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate }}%</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -119,7 +130,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 +140,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" />
|
||||||
@@ -286,11 +301,11 @@ const countList: any = ref([
|
|||||||
},
|
},
|
||||||
{ title: '非电网侧监测点', num: 0, onLineNum: 0, integrityRate: 0 }
|
{ title: '非电网侧监测点', num: 0, onLineNum: 0, integrityRate: 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 +322,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)
|
||||||
@@ -368,7 +383,7 @@ const info = async (row: any) => {
|
|||||||
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 +407,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>
|
||||||
|
|
||||||
@@ -536,6 +551,18 @@ defineExpose({ info, show })
|
|||||||
font-weight: 550;
|
font-weight: 550;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.num1 {
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
grid-template-rows: auto auto;
|
||||||
|
gap: 8px;
|
||||||
|
div {
|
||||||
|
display: flex;
|
||||||
|
padding-left: 20px;
|
||||||
|
span {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.BoxA {
|
.BoxA {
|
||||||
|
|||||||
@@ -1,137 +1,54 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 综合评估详情 -->
|
<!-- 综合评估详情 -->
|
||||||
<el-dialog draggable title="综合评估统计" v-model="dialogVisible" width="1400px">
|
<el-dialog draggable title="区域污染值统计" v-model="dialogVisible" width="1400px">
|
||||||
<div>
|
<div style="display: flex">
|
||||||
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="300px" :data="tableData">
|
<div style="width: 400px">
|
||||||
<vxe-column field="deptName" title="地市" />
|
<vxe-table
|
||||||
<vxe-column field="assessLevel" title="综合评估结论">
|
v-bind="defaultAttribute"
|
||||||
<template #default="scope">
|
ref="tableRef"
|
||||||
<!-- class="conclusion"
|
@current-change="currentChangeEvent"
|
||||||
:class="
|
height="240px"
|
||||||
scope.row.assessLevel == '特质'
|
:row-config="{ isCurrent: true, isHover: true }"
|
||||||
? 'background1'
|
:data="tableData"
|
||||||
: scope.row.assessLevel == '较差'
|
>
|
||||||
? 'background2'
|
<vxe-column field="deptName" title="地市" />
|
||||||
: scope.row.assessLevel == '极差'
|
<vxe-column field="score" title="污染值" sortable>
|
||||||
? 'background3'
|
|
||||||
: ''
|
|
||||||
" -->
|
|
||||||
<span>
|
|
||||||
{{ scope.row.assessData }}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</vxe-column>
|
|
||||||
<vxe-column field="qualifyData" title="指标合格率(%)" />
|
|
||||||
|
|
||||||
<!-- <vxe-colgroup title="评估结论">
|
|
||||||
<vxe-column field="vdevAssessLevel" title="电压偏差">
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<span
|
||||||
class="conclusion"
|
:style="{
|
||||||
:class="
|
color: setColor(scope.row.score)
|
||||||
scope.row.vdevAssessLevel == '特质'
|
}"
|
||||||
? 'background1'
|
|
||||||
: scope.row.vdevAssessLevel == '较差'
|
|
||||||
? 'background2'
|
|
||||||
: scope.row.vdevAssessLevel == '极差'
|
|
||||||
? 'background3'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ scope.row.vdevAssessLevel }}
|
{{ scope.row.score }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
</vxe-table>
|
||||||
<vxe-column field="freqAssessLevel" title="频率偏差">
|
</div>
|
||||||
|
<div class="ml10" style="width: 990px">
|
||||||
|
<vxe-table v-bind="defaultAttribute" v-loading="loadingTab" ref="vxeRef" height="240px" :data="subdata">
|
||||||
|
<vxe-column type="seq" width="70"></vxe-column>
|
||||||
|
<vxe-column field="devName" title="终端名称"></vxe-column>
|
||||||
|
<vxe-column field="lineName" title="监测点名称" />
|
||||||
|
<vxe-column field="powerFlag" title="电网标志" />
|
||||||
|
<vxe-column field="devType" title="终端型号"></vxe-column>
|
||||||
|
<vxe-column field="manufacturer" title="终端厂家"></vxe-column>
|
||||||
|
<vxe-column field="vharmonicValue" title="污染值" sortable>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span
|
<span
|
||||||
class="conclusion"
|
:style="{
|
||||||
:class="
|
color: setColor(scope.row.vharmonicValue)
|
||||||
scope.row.freqAssessLevel == '特质'
|
}"
|
||||||
? 'background1'
|
|
||||||
: scope.row.freqAssessLevel == '较差'
|
|
||||||
? 'background2'
|
|
||||||
: scope.row.freqAssessLevel == '极差'
|
|
||||||
? 'background3'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
{{ scope.row.freqAssessLevel }}
|
{{ scope.row.vharmonicValue }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
</vxe-table>
|
||||||
<vxe-column field="harmAssessLevel" title="电压总谐波畸变率">
|
</div>
|
||||||
<template #default="scope">
|
|
||||||
<span
|
|
||||||
class="conclusion"
|
|
||||||
:class="
|
|
||||||
scope.row.harmAssessLevel == '特质'
|
|
||||||
? 'background1'
|
|
||||||
: scope.row.harmAssessLevel == '较差'
|
|
||||||
? 'background2'
|
|
||||||
: scope.row.harmAssessLevel == '极差'
|
|
||||||
? 'background3'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ scope.row.harmAssessLevel }}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</vxe-column>
|
|
||||||
|
|
||||||
<vxe-column field="flickerAssessLevel" title="电压闪变">
|
|
||||||
<template #default="scope">
|
|
||||||
<span
|
|
||||||
class="conclusion"
|
|
||||||
:class="
|
|
||||||
scope.row.flickerAssessLevel == '特质'
|
|
||||||
? 'background1'
|
|
||||||
: scope.row.flickerAssessLevel == '较差'
|
|
||||||
? 'background2'
|
|
||||||
: scope.row.flickerAssessLevel == '极差'
|
|
||||||
? 'background3'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ scope.row.flickerAssessLevel }}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</vxe-column>
|
|
||||||
|
|
||||||
<vxe-column field="unbalanceAssessLevel" title="三相电压不平衡度">
|
|
||||||
<template #default="scope">
|
|
||||||
<span
|
|
||||||
class="conclusion"
|
|
||||||
:class="
|
|
||||||
scope.row.unbalanceAssessLevel == '特质'
|
|
||||||
? 'background1'
|
|
||||||
: scope.row.unbalanceAssessLevel == '较差'
|
|
||||||
? 'background2'
|
|
||||||
: scope.row.unbalanceAssessLevel == '极差'
|
|
||||||
? 'background3'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ scope.row.unbalanceAssessLevel }}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</vxe-column>
|
|
||||||
</vxe-colgroup> -->
|
|
||||||
</vxe-table>
|
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 300px; margin-top: 10px; position: relative" v-loading="loading">
|
<div style="height: 300px; margin-top: 10px; position: relative" v-loading="loading">
|
||||||
<!-- <el-select
|
<!-- <div style="position: absolute; width: 100px; top: 0px; right: 0px; z-index: 1">
|
||||||
v-model="time"
|
|
||||||
size="small"
|
|
||||||
|
|
||||||
@change="analysis"
|
|
||||||
>
|
|
||||||
<el-option label="年" value="1" />
|
|
||||||
<el-option label="月" value="3" />
|
|
||||||
</el-select> -->
|
|
||||||
<div style="position: absolute; width: 100px; top: 0px; right: 0px; z-index: 1">
|
|
||||||
<el-radio-group v-model="city" size="small" @change="analysis">
|
<el-radio-group v-model="city" size="small" @change="analysis">
|
||||||
<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>
|
||||||
@@ -140,133 +57,119 @@
|
|||||||
<el-radio-button label="1">年</el-radio-button>
|
<el-radio-button label="1">年</el-radio-button>
|
||||||
<el-radio-button label="3">月</el-radio-button>
|
<el-radio-button label="3">月</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<MyEChart style="height: 300px" :options="picEChart" />
|
<MyEChart style="height: 300px" :options="picEChart" />
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref, nextTick } from 'vue'
|
||||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { getAssessDetail, getAssessTrend } from '@/api/device-boot/panorama'
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { getAssessDetail, getAssessTrend, downPollutionSubCalc } from '@/api/device-boot/panorama'
|
||||||
|
const dictData = useDictData()
|
||||||
const dialogVisible: any = ref(false)
|
const dialogVisible: any = ref(false)
|
||||||
const rowList: any = ref({})
|
const rowList: any = ref({})
|
||||||
const type = ref('1')
|
const type = ref('1')
|
||||||
const city = ref('0')
|
const city = ref('0')
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const tableData: any = ref([])
|
const tableData: any = ref([])
|
||||||
|
const subdata: any = ref([])
|
||||||
const picEChart = ref()
|
const picEChart = ref()
|
||||||
const open = async (row: any) => {
|
const tableRef = ref()
|
||||||
getAssessDetail(row).then(res => {
|
const loadingTab = ref(false)
|
||||||
tableData.value = res.data
|
const PollutionList = dictData.getBasicData('Pollution_Calc').filter(item => item.name == '谐波电压')
|
||||||
|
|
||||||
|
const open = async (row: any, list: any) => {
|
||||||
|
console.log('🚀 ~ open ~ list:', list)
|
||||||
|
// getAssessDetail(row).then(res => {
|
||||||
|
tableData.value = list
|
||||||
|
subdata.value = tableData.value[0]?.powerFlagPollutionList || []
|
||||||
|
nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
tableRef.value?.setCurrentRow(tableData.value[0])
|
||||||
|
}, 0)
|
||||||
})
|
})
|
||||||
|
// })
|
||||||
rowList.value = row
|
rowList.value = row
|
||||||
analysis()
|
analysis()
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
const currentChangeEvent = async () => {
|
||||||
|
loadingTab.value = true
|
||||||
|
setTimeout(() => {
|
||||||
|
subdata.value = tableRef.value.getCurrentRecord()?.powerFlagPollutionList || []
|
||||||
|
loadingTab.value = false
|
||||||
|
}, 1000)
|
||||||
|
}
|
||||||
|
|
||||||
const analysis = () => {
|
const analysis = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
let time = rowList.value.searchBeginTime.slice(0, 4) + `-01-01`
|
let time = rowList.value.searchBeginTime.slice(0, 4) + `-01-01`
|
||||||
getAssessTrend({ ...rowList.value, searchBeginTime: time, type: type.value, areaType: city.value }).then(res => {
|
downPollutionSubCalc({ ...rowList.value, ids: [PollutionList[0].id] }).then(res => {
|
||||||
|
const first10Items = res.data.slice(0, 10)
|
||||||
picEChart.value = {
|
picEChart.value = {
|
||||||
title: {
|
title: {
|
||||||
text: '各地市综合评估趋势对比'
|
text: '污染值排名前十变电站'
|
||||||
|
},
|
||||||
|
|
||||||
|
xAxis: {
|
||||||
|
name: '',
|
||||||
|
data: first10Items.map((item: any) => item.subStationName),
|
||||||
|
axisLabel: {
|
||||||
|
rotate: 30, // 核心:倾斜 45 度(推荐 30/45/60,角度太大易读性差)
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
grid: {
|
||||||
|
bottom: 10
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
right: 120,
|
show: false
|
||||||
top: 20
|
|
||||||
},
|
},
|
||||||
// tooltip: {
|
|
||||||
// formatter: function (params: any) {
|
|
||||||
// // console.log(123, params)
|
|
||||||
|
|
||||||
// var tips = ''
|
|
||||||
|
|
||||||
// for (var i = 0; i < params.length; i++) {
|
|
||||||
// console.log('🚀 ~ getAssessTrend ~ params[i].value:', params[i].value)
|
|
||||||
|
|
||||||
// tips +=
|
|
||||||
// params[i].seriesName +
|
|
||||||
// ':' +
|
|
||||||
// `<span style="color:${
|
|
||||||
// params[i].value > 4.5
|
|
||||||
// ? ''
|
|
||||||
// : params[i].value > 4
|
|
||||||
// ? ''
|
|
||||||
// : params[i].value > 3
|
|
||||||
// ? ''
|
|
||||||
// : params[i].value > 2
|
|
||||||
// ? '#97017e'
|
|
||||||
// : params[i].value > 0
|
|
||||||
// ? '#A52a2a'
|
|
||||||
// : ''
|
|
||||||
// }">
|
|
||||||
// ${
|
|
||||||
// params[i].value > 4.5
|
|
||||||
// ? '优质'
|
|
||||||
// : params[i].value > 4
|
|
||||||
// ? '良好'
|
|
||||||
// : params[i].value > 3
|
|
||||||
// ? '一般'
|
|
||||||
// : params[i].value > 2
|
|
||||||
// ? '较差'
|
|
||||||
// : params[i].value > 0
|
|
||||||
// ? '极差'
|
|
||||||
// : ''
|
|
||||||
// }
|
|
||||||
// </span>` +
|
|
||||||
// '</br>'
|
|
||||||
// }
|
|
||||||
// return tips
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
xAxis: {
|
|
||||||
name: '时间',
|
|
||||||
data: res.data[0].children.map((item: any) => item.dataTime)
|
|
||||||
},
|
|
||||||
|
|
||||||
grid: {
|
|
||||||
bottom: '10px',
|
|
||||||
top: '60px'
|
|
||||||
},
|
|
||||||
|
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: ''
|
name: ''
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
dataZoom: false,
|
dataZoom: false,
|
||||||
series: []
|
series: [
|
||||||
|
{
|
||||||
|
// name: time[i],
|
||||||
|
name: '污染值',
|
||||||
|
type: 'bar',
|
||||||
|
data: first10Items.map((item: any) => item.subVStationValue),
|
||||||
|
itemStyle: {
|
||||||
|
color: function (params) {
|
||||||
|
// params.value 是当前柱子的数值
|
||||||
|
const value = params.value
|
||||||
|
return setColor(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let list: any = []
|
|
||||||
let time: any = []
|
|
||||||
let mun: any = []
|
|
||||||
res.data.forEach((item: any, num: any) => {
|
|
||||||
time.push(item.deptName)
|
|
||||||
list.push([])
|
|
||||||
item.children.forEach((val: any, i: any) => {
|
|
||||||
mun.push(val.score == 3.14159 ? null : val.score)
|
|
||||||
list[num].push(val.score == 3.14159 ? null : val.score)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
list.forEach((item: any, i: any) => {
|
|
||||||
picEChart.value.options.series.push({
|
|
||||||
name: time[i],
|
|
||||||
type: 'line',
|
|
||||||
data: item
|
|
||||||
})
|
|
||||||
})
|
|
||||||
picEChart.value.yAxis.min = Math.min(...mun) < 1 ? 0 : (Math.min(...mun) - 0.5).toFixed(2)
|
|
||||||
picEChart.value.yAxis.max = Math.max(...mun) > 4.5 ? 5 : (Math.max(...mun) + 0.5).toFixed(2)
|
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
const setColor = val => {
|
||||||
|
return val == 3.14159
|
||||||
|
? ''
|
||||||
|
: val > 10000
|
||||||
|
? '#A52a2a'
|
||||||
|
: val > 1000
|
||||||
|
? '#ff9900'
|
||||||
|
: val > 100
|
||||||
|
? '#ffcc33'
|
||||||
|
: val > 0
|
||||||
|
? '#3399ff'
|
||||||
|
: val == 0
|
||||||
|
? '#00B07D'
|
||||||
|
: ''
|
||||||
|
}
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -290,7 +193,7 @@ defineExpose({ open })
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
.background3 {
|
.background3 {
|
||||||
background-color: #A52a2a;
|
background-color: #a52a2a;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
:deep(.el-select) {
|
:deep(.el-select) {
|
||||||
|
|||||||
@@ -20,20 +20,20 @@
|
|||||||
<div class="title">
|
<div class="title">
|
||||||
<span>
|
<span>
|
||||||
污染告警
|
污染告警
|
||||||
<el-popover placement="right" :width="170" trigger="hover">
|
<el-popover placement="right" :width="190" trigger="hover">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<WarningFilled class="WarningFilled" />
|
<WarningFilled class="WarningFilled" />
|
||||||
</template>
|
</template>
|
||||||
<div class="text">
|
<div class="text">
|
||||||
<span style="color: #00b07d">无污染:(0 , 1]</span>
|
<span style="color: #00B07D">无污染:0</span>
|
||||||
<br />
|
<br />
|
||||||
<span style="color: #3399ff">轻微污染:(1 , 1.2]</span>
|
<span style="color: #3399ff">轻微污染:(0 , 100]</span>
|
||||||
<br />
|
<br />
|
||||||
<span style="color: #ffcc33">轻度污染:(1.2 , 1.6]</span>
|
<span style="color: #ffcc33">轻度污染:(100 , 1000]</span>
|
||||||
<br />
|
<br />
|
||||||
<span style="color: #ff9900">中度污染:(1.6 , 2]</span>
|
<span style="color: #ff9900">中度污染:(1000 , 10000]</span>
|
||||||
<br />
|
<br />
|
||||||
<span style="color: #A52a2a">重度污染:(2 , +∞)</span>
|
<span style="color: #A52a2a">重度污染:(10000</span>
|
||||||
</div>
|
</div>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</span>
|
</span>
|
||||||
@@ -49,11 +49,11 @@
|
|||||||
<el-radio-button v-for="item in options" :label="item.id">{{ item.name }}</el-radio-button>
|
<el-radio-button v-for="item in options" :label="item.id">{{ item.name }}</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- :style="i == 3 ? `margin-left: 20%;` : ``" -->
|
||||||
<div class="pie">
|
<div class="pie">
|
||||||
<MyEChart
|
<MyEChart
|
||||||
v-for="(item, i) in picEChart"
|
v-for="(item, i) in picEChart"
|
||||||
:style="i == 3 ? `margin-left: 20%;` : ``"
|
|
||||||
class="MyEChart"
|
class="MyEChart"
|
||||||
:options="item"
|
:options="item"
|
||||||
/>
|
/>
|
||||||
@@ -72,6 +72,7 @@
|
|||||||
<vxe-column field="num3" sortable title="轻度污染数量" :formatter="formatter" />
|
<vxe-column field="num3" sortable title="轻度污染数量" :formatter="formatter" />
|
||||||
<vxe-column field="num4" sortable title="中度污染数量" :formatter="formatter" />
|
<vxe-column field="num4" sortable title="中度污染数量" :formatter="formatter" />
|
||||||
<vxe-column field="num5" sortable title="重度污染数量" :formatter="formatter" />
|
<vxe-column field="num5" sortable title="重度污染数量" :formatter="formatter" />
|
||||||
|
<vxe-column field="num6" sortable title="暂无数据数量" :formatter="formatter" />
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -88,11 +89,12 @@ const dictData = useDictData()
|
|||||||
const dialogVisible: any = ref(false)
|
const dialogVisible: any = ref(false)
|
||||||
const time = ref('1')
|
const time = ref('1')
|
||||||
const Voltage = dictData.getBasicData('Dev_Voltage_Stand')
|
const Voltage = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
const options: any = dictData.getBasicData('Pollution_Statis').filter(item => {
|
const options: any = dictData.getBasicData('Pollution_Calc')
|
||||||
if (item.code == 'V_Harmonic' || item.code == 'I_All') {
|
// .filter(item => {
|
||||||
return item
|
// if (item.code == 'V_Harmonic' || item.code == 'I_All') {
|
||||||
}
|
// 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({})
|
||||||
@@ -119,57 +121,223 @@ const open = async (row: any) => {
|
|||||||
}
|
}
|
||||||
const contaminateC = () => {
|
const contaminateC = () => {
|
||||||
// rowList.value.deviceInfoParam.ids=[contaminate.value]
|
// rowList.value.deviceInfoParam.ids=[contaminate.value]
|
||||||
getPollutionAlarmData({ ...rowList.value, ids: [contaminate.value] }).then(res => {
|
// getPollutionAlarmData({ ...rowList.value, ids: [contaminate.value] }).then(res => {
|
||||||
let data = []
|
// let data = []
|
||||||
|
|
||||||
let a1 = 0
|
// let a1 = 0
|
||||||
let a2 = 0
|
// let a2 = 0
|
||||||
let a3 = 0
|
// let a3 = 0
|
||||||
let a4 = 0
|
// let a4 = 0
|
||||||
let a5 = 0
|
// let a5 = 0
|
||||||
if (rowList.value.isUpToGrid == 0) {
|
// if (rowList.value.isUpToGrid == 0) {
|
||||||
data = res.data.info
|
// data = res.data.info
|
||||||
} else {
|
// } else {
|
||||||
data = res.data.gwInfo
|
// data = res.data.gwInfo
|
||||||
}
|
// }
|
||||||
for (let i = 0; i < data.length; i++) {
|
// for (let i = 0; i < data.length; i++) {
|
||||||
if (data[i] >= 2) {
|
// if (data[i] >= 2) {
|
||||||
++a5
|
// ++a5
|
||||||
} else if (data[i] >= 1.6 && data[i] < 2) {
|
// } else if (data[i] >= 1.6 && data[i] < 2) {
|
||||||
++a4
|
// ++a4
|
||||||
} else if (data[i] >= 1.2 && data[i] < 1.6) {
|
// } else if (data[i] >= 1.2 && data[i] < 1.6) {
|
||||||
++a3
|
// ++a3
|
||||||
} else if (data[i] >= 1 && data[i] < 1.2) {
|
// } else if (data[i] >= 1 && data[i] < 1.2) {
|
||||||
++a2
|
// ++a2
|
||||||
} else if (data[i] >= 0 && data[i] < 1) {
|
// } else if (data[i] >= 0 && data[i] < 1) {
|
||||||
++a1
|
// ++a1
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// let list = [
|
||||||
|
// {
|
||||||
|
// value: ((a1 / data.length || 0) * 100).toFixed(2),
|
||||||
|
// name: `无污染:${a1}座`
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// value: ((a2 / data.length || 0) * 100).toFixed(2),
|
||||||
|
// name: `轻微污染::${a2}座`
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// value: ((a3 / data.length || 0) * 100).toFixed(2),
|
||||||
|
// name: `轻度污染:${a3}座`
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// value: ((a4 / data.length || 0) * 100).toFixed(2),
|
||||||
|
// name: `中度污染:${a4}座`
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// value: ((a5 / data.length || 0) * 100).toFixed(2),
|
||||||
|
// name: `重度污染:${a5}座`
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// const color = ['#00B07D', '#3399ff', '#ffcc33', '#ff9900', '#A52a2a']
|
||||||
|
|
||||||
|
// list.forEach((item, i) => {
|
||||||
|
// picEChart.value[i] = {
|
||||||
|
// legend: {
|
||||||
|
// type: 'scroll',
|
||||||
|
// orient: 'vertical',
|
||||||
|
// left: 10,
|
||||||
|
// top: '10%'
|
||||||
|
// },
|
||||||
|
// xAxis: {
|
||||||
|
// show: false
|
||||||
|
// },
|
||||||
|
// yAxis: {
|
||||||
|
// show: false
|
||||||
|
// },
|
||||||
|
// options: {
|
||||||
|
// toolbox:null,
|
||||||
|
// dataZoom: null,
|
||||||
|
// series: [
|
||||||
|
// {
|
||||||
|
// type: 'gauge',
|
||||||
|
// startAngle: 180,
|
||||||
|
// center: ['50%', '80%'],
|
||||||
|
// radius: '135%',
|
||||||
|
// endAngle: 0,
|
||||||
|
// min: 0,
|
||||||
|
// max: 100,
|
||||||
|
// progress: {
|
||||||
|
// show: true,
|
||||||
|
// width: 15,
|
||||||
|
// itemStyle: {
|
||||||
|
// color: color[i]
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// pointer: {
|
||||||
|
// show: false
|
||||||
|
// },
|
||||||
|
// axisLine: {
|
||||||
|
// lineStyle: {
|
||||||
|
// width: 15,
|
||||||
|
// color: [[1, '#f4f4f4']]
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// axisTick: {
|
||||||
|
// show: false
|
||||||
|
// },
|
||||||
|
// splitLine: {
|
||||||
|
// show: false
|
||||||
|
// },
|
||||||
|
// axisLabel: {
|
||||||
|
// show: false
|
||||||
|
// // distance: 5,
|
||||||
|
// // color: '#666',
|
||||||
|
// // fontSize: 12,
|
||||||
|
// // formatter: function (value: any) {
|
||||||
|
// // if (value === 0 || value === 100) {
|
||||||
|
// // return value + '%'
|
||||||
|
// // }
|
||||||
|
// // }
|
||||||
|
// },
|
||||||
|
// anchor: {
|
||||||
|
// show: false,
|
||||||
|
// showAbove: false,
|
||||||
|
// size: 25,
|
||||||
|
// itemStyle: {
|
||||||
|
// borderWidth: 60
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// title: {
|
||||||
|
// show: true,
|
||||||
|
// offsetCenter: [0, '20%'],
|
||||||
|
// fontSize: 14
|
||||||
|
// },
|
||||||
|
// detail: {
|
||||||
|
// valueAnimation: true,
|
||||||
|
// fontSize: 14,
|
||||||
|
// lineHeight: 20,
|
||||||
|
// color: color[i],
|
||||||
|
// fontWeight: 'bold',
|
||||||
|
// offsetCenter: [0, '-20%'],
|
||||||
|
// formatter: function (value: any) {
|
||||||
|
// return '{a|占比} ' + '\n' + value + '{a|%}'
|
||||||
|
// },
|
||||||
|
// rich: {
|
||||||
|
// a: {
|
||||||
|
// color: '#333',
|
||||||
|
// fontSize: 16,
|
||||||
|
// lineHeight: 30
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// data: [item]
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
getPollutionAlarmList({ ...rowList.value, ids: [contaminate.value] }).then(res => {
|
||||||
|
tableData.value = res.data.map((item: any) => {
|
||||||
|
return {
|
||||||
|
name: item[0],
|
||||||
|
num: item[1],
|
||||||
|
num1: item[2],
|
||||||
|
num2: item[3],
|
||||||
|
num3: item[4],
|
||||||
|
num4: item[5],
|
||||||
|
num5: item[6],
|
||||||
|
num6: item[7]
|
||||||
}
|
}
|
||||||
}
|
})
|
||||||
// console.log('🚀 ~ getPollutionAlarmData ~ a1 / data.length:', a1 / data.length)
|
console.log(123, tableData.value)
|
||||||
|
|
||||||
|
let data = []
|
||||||
|
let a1 = tableData.value.reduce((t, item) => t + (item.num1 - 0 || 0), 0)
|
||||||
|
let a2 = tableData.value.reduce((t, item) => t + (item.num2 - 0 || 0), 0)
|
||||||
|
let a3 = tableData.value.reduce((t, item) => t + (item.num3 - 0 || 0), 0)
|
||||||
|
let a4 = tableData.value.reduce((t, item) => t + (item.num4 - 0 || 0), 0)
|
||||||
|
let a5 = tableData.value.reduce((t, item) => t + (item.num5 - 0 || 0), 0)
|
||||||
|
let a6 = tableData.value.reduce((t, item) => t + (item.num6 - 0 || 0), 0)
|
||||||
|
let total = a1 + a2 + a3 + a4 + a5 + a6
|
||||||
|
// if (rowList.value.isUpToGrid == 0) {
|
||||||
|
// data = res.data.info
|
||||||
|
// } else {
|
||||||
|
// data = res.data.gwInfo
|
||||||
|
// }
|
||||||
|
// for (let i = 0; i < data.length; i++) {
|
||||||
|
// if (data[i] >= 2) {
|
||||||
|
// ++a5
|
||||||
|
// } else if (data[i] >= 1.6 && data[i] < 2) {
|
||||||
|
// ++a4
|
||||||
|
// } else if (data[i] >= 1.2 && data[i] < 1.6) {
|
||||||
|
// ++a3
|
||||||
|
// } else if (data[i] >= 1 && data[i] < 1.2) {
|
||||||
|
// ++a2
|
||||||
|
// } else if (data[i] >= 0 && data[i] < 1) {
|
||||||
|
// ++a1
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
let list = [
|
let list = [
|
||||||
{
|
{
|
||||||
value: ((a1 / data.length || 0) * 100).toFixed(2),
|
value: ((a1 / total || 0) * 100).toFixed(2),
|
||||||
name: `无污染:${a1}座`
|
name: `无污染:${a1}座`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: ((a2 / data.length || 0) * 100).toFixed(2),
|
value: ((a2 / total || 0) * 100).toFixed(2),
|
||||||
name: `轻微污染::${a2}座`
|
name: `轻微污染::${a2}座`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: ((a3 / data.length || 0) * 100).toFixed(2),
|
value: ((a3 / total || 0) * 100).toFixed(2),
|
||||||
name: `轻度污染:${a3}座`
|
name: `轻度污染:${a3}座`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: ((a4 / data.length || 0) * 100).toFixed(2),
|
value: ((a4 / total || 0) * 100).toFixed(2),
|
||||||
name: `中度污染:${a4}座`
|
name: `中度污染:${a4}座`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: ((a5 / data.length || 0) * 100).toFixed(2),
|
value: ((a5 / total || 0) * 100).toFixed(2),
|
||||||
name: `重度污染:${a5}座`
|
name: `重度污染:${a5}座`
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
value: ((a6 / total || 0) * 100).toFixed(2),
|
||||||
|
name: `暂无数据:${a6}座`
|
||||||
|
},
|
||||||
]
|
]
|
||||||
const color = ['#00B07D', '#3399ff', '#ffcc33', '#ff9900', '#A52a2a']
|
const color = ['#00B07D', '#3399ff', '#ffcc33', '#ff9900', '#A52a2a','#ccc']
|
||||||
|
|
||||||
list.forEach((item, i) => {
|
list.forEach((item, i) => {
|
||||||
picEChart.value[i] = {
|
picEChart.value[i] = {
|
||||||
@@ -186,7 +354,7 @@ const contaminateC = () => {
|
|||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
toolbox:null,
|
toolbox: null,
|
||||||
dataZoom: null,
|
dataZoom: null,
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
@@ -268,19 +436,6 @@ const contaminateC = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
getPollutionAlarmList({ ...rowList.value, ids: [contaminate.value] }).then(res => {
|
|
||||||
tableData.value = res.data.map((item: any) => {
|
|
||||||
return {
|
|
||||||
name: item[0],
|
|
||||||
num: item[1],
|
|
||||||
num1: item[2],
|
|
||||||
num2: item[3],
|
|
||||||
num3: item[4],
|
|
||||||
num4: item[5],
|
|
||||||
num5: item[6]
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
const analysis = (e: any) => {
|
const analysis = (e: any) => {
|
||||||
let time = rowList.value.searchBeginTime?.slice(0, 4) + `-01-01`
|
let time = rowList.value.searchBeginTime?.slice(0, 4) + `-01-01`
|
||||||
|
|||||||
@@ -1,338 +1,338 @@
|
|||||||
<!-- 稳态 -->
|
<!-- 稳态 -->
|
||||||
<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 :class="active == i ? 'highlight' : ''" :title="item.name"
|
<el-step :class="active == i ? 'highlight' : ''" :title="item.name"
|
||||||
@click="handleClick(i)"></el-step>
|
@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>{{ 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[i].overNum }}</span>
|
<span>{{ 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[i].overDay }}</span>
|
<span>{{ 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 = ['频率偏差(Hz)',
|
let dataname = ['频率偏差(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
@@ -128,8 +128,7 @@ const LngLat = [
|
|||||||
import { getAssessOverview } from '@/api/device-boot/panorama'
|
import { getAssessOverview } from '@/api/device-boot/panorama'
|
||||||
// narimap.publicKey =
|
// narimap.publicKey =
|
||||||
// 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCRYFEiMdZVgY8+jIjx4GR1QbN7qVgCE0istwPZN8xRqdSV+hePUPIW1k9eCVh9gxIIWHAw2TfNZLb8l0Tmk9OH3XnZ009TNBjzZ2zWLrbjFQzgutKKI2JRLK+CaJbOZ0LiD78QnTo5Zk+ZuQBKgtyFJdp4T5gQS+Mnbj/c4EnK0QIDAQAB'
|
// 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCRYFEiMdZVgY8+jIjx4GR1QbN7qVgCE0istwPZN8xRqdSV+hePUPIW1k9eCVh9gxIIWHAw2TfNZLb8l0Tmk9OH3XnZ009TNBjzZ2zWLrbjFQzgutKKI2JRLK+CaJbOZ0LiD78QnTo5Zk+ZuQBKgtyFJdp4T5gQS+Mnbj/c4EnK0QIDAQAB'
|
||||||
narimap.publicKey =
|
narimap.publicKey = 'JBb74325ae94dc49358b7d699660b692'
|
||||||
'JBb74325ae94dc49358b7d699660b692'
|
|
||||||
|
|
||||||
narimap.Require(
|
narimap.Require(
|
||||||
[
|
[
|
||||||
@@ -198,15 +197,16 @@ const Query = () => {
|
|||||||
base: {
|
base: {
|
||||||
outline: {
|
outline: {
|
||||||
paint: {
|
paint: {
|
||||||
'line-color': '#0D867F',
|
'line-color': '#fff',
|
||||||
'line-width': 1,
|
'line-width': 2,
|
||||||
'line-opacity': 1
|
'line-opacity': 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fill: {
|
fill: {
|
||||||
paint: {
|
paint: {
|
||||||
'fill-color': '#0D867F',
|
'fill-color': '#0D867F',
|
||||||
'fill-opacity': 0.3
|
// 'fill-opacity': 0.3
|
||||||
|
'fill-opacity': 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
@@ -226,7 +226,7 @@ const Query = () => {
|
|||||||
},
|
},
|
||||||
outline: {
|
outline: {
|
||||||
paint: {
|
paint: {
|
||||||
'line-color': '#0D867F',
|
'line-color': '#fff',
|
||||||
'line-width': 4,
|
'line-width': 4,
|
||||||
'line-opacity': 1
|
'line-opacity': 1
|
||||||
}
|
}
|
||||||
@@ -248,7 +248,8 @@ const Query = () => {
|
|||||||
)
|
)
|
||||||
|
|
||||||
powerManageGridMap.value.on('load', function () {
|
powerManageGridMap.value.on('load', function () {
|
||||||
powerLoad()
|
// 区分区域颜色
|
||||||
|
// powerLoad()
|
||||||
})
|
})
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -262,7 +263,100 @@ const Query = () => {
|
|||||||
}, 500)
|
}, 500)
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
|
// 添加热力图
|
||||||
|
const sourceList: any = ref([])
|
||||||
|
const addSource = async () => {
|
||||||
|
// const features = [
|
||||||
|
// {
|
||||||
|
// type: 'Feature',
|
||||||
|
// geometry: {
|
||||||
|
// type: 'Point',
|
||||||
|
// coordinates: [117.651148, 41.121061]
|
||||||
|
// },
|
||||||
|
// properties: {
|
||||||
|
// value: 64
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
console.log('🚀 ~ sourceList:', sourceList.value)
|
||||||
|
|
||||||
|
if (map.value.getSource('themeData')) {
|
||||||
|
map.value.getSource('themeData').setData({
|
||||||
|
type: 'FeatureCollection',
|
||||||
|
features: sourceList.value
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
map.value.addSource('themeData', {
|
||||||
|
type: 'geojson',
|
||||||
|
data: {
|
||||||
|
type: 'FeatureCollection',
|
||||||
|
features: sourceList.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (map.value.getLayer('earthquakes-paint')) {
|
||||||
|
} else {
|
||||||
|
map.value.addLayer({
|
||||||
|
id: 'earthquakes-paint',
|
||||||
|
type: 'heatmap',
|
||||||
|
source: 'themeData',
|
||||||
|
paint: {
|
||||||
|
/**
|
||||||
|
* 数据点的影响力,weight=10的点相当于十个weight=1的点
|
||||||
|
* 下述为插值表达式,输入是点geojson的properties的mag,输出随mag线性增大
|
||||||
|
*/
|
||||||
|
'heatmap-weight': [
|
||||||
|
'interpolate',
|
||||||
|
['linear'],
|
||||||
|
['get', 'value'],
|
||||||
|
0,
|
||||||
|
0.1,
|
||||||
|
1,
|
||||||
|
0.3,
|
||||||
|
101,
|
||||||
|
0.5,
|
||||||
|
1001,
|
||||||
|
0.7,
|
||||||
|
10001,
|
||||||
|
1
|
||||||
|
],
|
||||||
|
'heatmap-color': [
|
||||||
|
'interpolate',
|
||||||
|
['linear'],
|
||||||
|
['heatmap-density'],
|
||||||
|
0,
|
||||||
|
'rgba(255, 0, 0, 0)',
|
||||||
|
0.1,
|
||||||
|
'rgba(7, 91, 243, .8)',
|
||||||
|
0.3,
|
||||||
|
'rgba(7, 208, 255, .6)',
|
||||||
|
|
||||||
|
0.5,
|
||||||
|
'rgba(213, 251, 12, .8)',
|
||||||
|
|
||||||
|
0.7,
|
||||||
|
'rgba(255, 191, 0, .8)',
|
||||||
|
|
||||||
|
1,
|
||||||
|
'rgba(255, 0, 0, .8)'
|
||||||
|
],
|
||||||
|
|
||||||
|
'heatmap-intensity': ['interpolate', ['linear'], ['zoom'], 0, 1, 12, 3],
|
||||||
|
/**
|
||||||
|
* 该值越大,热力图越平滑,信息越不详细。
|
||||||
|
* 下述为插值表达式,输出随zoom线性变化,zoom为0时值为8,zoom为9时值为20
|
||||||
|
*/
|
||||||
|
'heatmap-radius': 30,
|
||||||
|
/**
|
||||||
|
* 透明度,输出为1则不透明
|
||||||
|
* 下述为插值表达式,输出随zoom线性变化,zoom为5时值为0.8,zoom为12时值为0.4
|
||||||
|
*/
|
||||||
|
'heatmap-opacity': 1
|
||||||
|
},
|
||||||
|
maxzoom: 12
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
// 添加变电站线路
|
// 添加变电站线路
|
||||||
const addLine = () => {
|
const addLine = () => {
|
||||||
//添加电网图层
|
//添加电网图层
|
||||||
@@ -569,14 +663,14 @@ const addLayer = () => {
|
|||||||
const features = map.value.queryRenderedFeatures(e.point, {
|
const features = map.value.queryRenderedFeatures(e.point, {
|
||||||
layers: ['spotImg-ZY', 'spotImg-TY', 'spotImg-GJ', 'spotImg-DW']
|
layers: ['spotImg-ZY', 'spotImg-TY', 'spotImg-GJ', 'spotImg-DW']
|
||||||
})
|
})
|
||||||
|
|
||||||
if (features.length > 0) {
|
if (features.length > 0) {
|
||||||
popup.value && popup.value.remove()
|
popup.value && popup.value.remove()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
deviceCard.value.popup && deviceCard.value.popup.remove()
|
deviceCard.value.popup && deviceCard.value.popup.remove()
|
||||||
}, 10)
|
}, 10)
|
||||||
let data = JSON.parse(features[0].properties.list)
|
let data = JSON.parse(features[0].properties.list)
|
||||||
|
|
||||||
popup.value = new narimap.Popup({ offset: popupOffsets.value, className: 'my-popup' })
|
popup.value = new narimap.Popup({ offset: popupOffsets.value, className: 'my-popup' })
|
||||||
.setLngLat([data.lng, data.lat])
|
.setLngLat([data.lng, data.lat])
|
||||||
.setHTML(
|
.setHTML(
|
||||||
@@ -607,7 +701,7 @@ const addLayer = () => {
|
|||||||
</div>`
|
</div>`
|
||||||
)
|
)
|
||||||
.addTo(map.value)
|
.addTo(map.value)
|
||||||
|
|
||||||
let html = document.getElementById('ids')
|
let html = document.getElementById('ids')
|
||||||
if (html)
|
if (html)
|
||||||
html.onclick = function (v: any) {
|
html.onclick = function (v: any) {
|
||||||
@@ -629,102 +723,8 @@ const addLayer = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 测试添加点
|
|
||||||
const testAddLayer = () => {
|
|
||||||
// 注册图片
|
|
||||||
map.value.loadImage(
|
|
||||||
new URL('@/assets/test5.png', import.meta.url).href, // 图片地址
|
|
||||||
(error: any, image: any) => {
|
|
||||||
if (error) throw error
|
|
||||||
//添加图片到 map.value ,第一个参数为图片设置 id
|
|
||||||
map.value.addImage('poi5', image)
|
|
||||||
//添加 layer
|
|
||||||
map.value.addLayer({
|
|
||||||
id: 'test',
|
|
||||||
type: 'symbol',
|
|
||||||
minzoom: 6.5, //图片层级
|
|
||||||
source: {
|
|
||||||
type: 'geojson',
|
|
||||||
data: {
|
|
||||||
type: 'FeatureCollection',
|
|
||||||
features: []
|
|
||||||
}
|
|
||||||
},
|
|
||||||
layout: {
|
|
||||||
// 为图层设置引用的图片ID
|
|
||||||
'icon-image': 'poi5',
|
|
||||||
'icon-pitch-alignment': 'map', //贴地
|
|
||||||
'icon-ignore-placement': true,
|
|
||||||
'icon-allow-overlap': true,
|
|
||||||
'icon-anchor': 'center', // 中心点
|
|
||||||
'icon-size': ['interpolate', ['linear'], ['zoom'], 6, 0.1, 50, 1] // 图符大小
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
)
|
|
||||||
// 添加图片需要先注册图片才能加载
|
|
||||||
setTimeout(() => {
|
|
||||||
map.value.getSource('test').setData({
|
|
||||||
type: 'FeatureCollection',
|
|
||||||
features: [
|
|
||||||
{
|
|
||||||
type: 'Feature',
|
|
||||||
geometry: {
|
|
||||||
type: 'Point',
|
|
||||||
coordinates: [115.3544544, 40.217797]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'Feature',
|
|
||||||
geometry: {
|
|
||||||
type: 'Point',
|
|
||||||
coordinates: [115.4544544, 40.317797]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
})
|
|
||||||
}, 1000)
|
|
||||||
|
|
||||||
// 地图连线
|
const PollutionList = dictData.getBasicData('Pollution_Calc').filter(item => item.name == '谐波电压')
|
||||||
map.value.addLayer({
|
|
||||||
id: 'power-line',
|
|
||||||
type: 'line',
|
|
||||||
source: {
|
|
||||||
type: 'geojson',
|
|
||||||
data: {
|
|
||||||
type: 'FeatureCollection',
|
|
||||||
features: [
|
|
||||||
{
|
|
||||||
type: 'Feature',
|
|
||||||
geometry: {
|
|
||||||
type: 'MultiLineString', //MultiLineString3层数组可以绘制多条线 LineString2层数组
|
|
||||||
coordinates: [
|
|
||||||
[
|
|
||||||
[117, 39],
|
|
||||||
[116, 40]
|
|
||||||
],
|
|
||||||
[
|
|
||||||
[116, 39],
|
|
||||||
[115, 40]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
paint: {
|
|
||||||
'line-color': '#ff0000',
|
|
||||||
'line-width': 3,
|
|
||||||
'line-opacity': 0.6
|
|
||||||
}
|
|
||||||
})
|
|
||||||
setTimeout(() => {
|
|
||||||
//先判断是否有图层 'power-line'是图层注册id
|
|
||||||
if (map.value.getLayer('power-line')) map.value.removeLayer('power-line')
|
|
||||||
}, 5000)
|
|
||||||
}
|
|
||||||
//添加多个监测点
|
//添加多个监测点
|
||||||
const addMarkers = async (row?: any, key?: any, num?: any) => {
|
const addMarkers = async (row?: any, key?: any, num?: any) => {
|
||||||
if (map.value == null) return
|
if (map.value == null) return
|
||||||
@@ -735,6 +735,8 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
|
|||||||
searchBeginTime: datePickerRef.value.timeValue[0],
|
searchBeginTime: datePickerRef.value.timeValue[0],
|
||||||
searchEndTime: datePickerRef.value.timeValue[1],
|
searchEndTime: datePickerRef.value.timeValue[1],
|
||||||
serverName: 'event-boot',
|
serverName: 'event-boot',
|
||||||
|
dicData: [PollutionList[0].id],
|
||||||
|
isPollution: 1,
|
||||||
statisticalType: {},
|
statisticalType: {},
|
||||||
...row
|
...row
|
||||||
}
|
}
|
||||||
@@ -744,6 +746,8 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
|
|||||||
let r = 0.0035
|
let r = 0.0035
|
||||||
let tempFeatureZ: any = []
|
let tempFeatureZ: any = []
|
||||||
let tempFeatureT: any = []
|
let tempFeatureT: any = []
|
||||||
|
|
||||||
|
sourceList.value = []
|
||||||
data.forEach((item: any) => {
|
data.forEach((item: any) => {
|
||||||
if (item.children.length > 10 && item.children.length < 100) {
|
if (item.children.length > 10 && item.children.length < 100) {
|
||||||
r = 0.0055
|
r = 0.0055
|
||||||
@@ -792,6 +796,31 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
let num = 20
|
||||||
|
if (val.vharmonicValue > 10000) {
|
||||||
|
num = 100
|
||||||
|
} else if (val.vharmonicValue > 1000) {
|
||||||
|
num = 80
|
||||||
|
} else if (val.vharmonicValue > 100) {
|
||||||
|
num = 60
|
||||||
|
} else if (val.vharmonicValue > 0) {
|
||||||
|
num = 40
|
||||||
|
} else {
|
||||||
|
num = 20
|
||||||
|
}
|
||||||
|
|
||||||
|
sourceList.value.push({
|
||||||
|
type: 'Feature',
|
||||||
|
geometry: {
|
||||||
|
type: 'Point',
|
||||||
|
coordinates: [val.lng, val.lat]
|
||||||
|
},
|
||||||
|
properties: {
|
||||||
|
value: val.vharmonicValue || 0
|
||||||
|
// value: num //10 //val.vharmonicValue || 0
|
||||||
|
// value: 0
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -856,7 +885,10 @@ const addMarkers = async (row?: any, key?: any, num?: any) => {
|
|||||||
type: 'FeatureCollection',
|
type: 'FeatureCollection',
|
||||||
features: [...tempFeatureT, ...tempFeatureZ]
|
features: [...tempFeatureT, ...tempFeatureZ]
|
||||||
})
|
})
|
||||||
|
addSource()
|
||||||
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
// 统计弹框数据
|
// 统计弹框数据
|
||||||
const GridDiagramArea = () => {
|
const GridDiagramArea = () => {
|
||||||
LngLat.forEach((item: any) => {
|
LngLat.forEach((item: any) => {
|
||||||
|
|||||||
@@ -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>
|
||||||
@@ -48,8 +52,10 @@
|
|||||||
<p class="numOne" @click="LookMap(item.list[3].numOneList, item.list[3].numTwoList, 0)">
|
<p class="numOne" @click="LookMap(item.list[3].numOneList, item.list[3].numTwoList, 0)">
|
||||||
{{ item.list[3].numOne }}
|
{{ item.list[3].numOne }}
|
||||||
</p>
|
</p>
|
||||||
<p style="font-size: 12px; width: 32px; cursor: pointer; color: var(--el-color-primary)"
|
<p
|
||||||
@click.stop="open(i)">
|
style="font-size: 12px; width: 32px; cursor: pointer; color: var(--el-color-primary)"
|
||||||
|
@click.stop="open(i)"
|
||||||
|
>
|
||||||
详情
|
详情
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -66,28 +72,37 @@
|
|||||||
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div @click="LookMap(val.onLineNumList, [], 0)">
|
<div @click="LookMap(val.onLineNumList, [], 0)">
|
||||||
在线:
|
在线:
|
||||||
<span style="color: #2dcd28">{{ val.onLineNum }}</span>
|
<span style="color: #2dcd28">{{ val.onLineNum }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
数据完整性:
|
数据完整性:
|
||||||
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate }}%</span>
|
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate }}%</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
在线率:
|
||||||
|
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate }}%</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -117,7 +132,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>
|
||||||
@@ -127,8 +142,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"
|
||||||
|
/>
|
||||||
<div class="legeng">
|
<div class="legeng">
|
||||||
<div v-for="item in legengList">
|
<div v-for="item in legengList">
|
||||||
<span :style="`background-color: ${item.color};`"></span>
|
<span :style="`background-color: ${item.color};`"></span>
|
||||||
@@ -290,11 +309,11 @@ const countList: any = ref([
|
|||||||
},
|
},
|
||||||
{ title: '非电网侧监测点', num: 0, onLineNum: 0, integrityRate: 0 }
|
{ title: '非电网侧监测点', num: 0, onLineNum: 0, integrityRate: 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([
|
||||||
{
|
{
|
||||||
@@ -394,7 +413,7 @@ const info = async (row: any) => {
|
|||||||
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 => {
|
||||||
@@ -418,7 +437,7 @@ const LookMap = (coutList: object, alarmList: object, key?: any) => {
|
|||||||
const GridDiagram = (k: any) => {
|
const GridDiagram = (k: any) => {
|
||||||
emit('GridDiagram', k)
|
emit('GridDiagram', k)
|
||||||
}
|
}
|
||||||
onMounted(() => { })
|
onMounted(() => {})
|
||||||
defineExpose({ info, show })
|
defineExpose({ info, show })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -537,7 +556,7 @@ defineExpose({ info, show })
|
|||||||
background-color: #edededc0;
|
background-color: #edededc0;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
min-height: 60px;
|
min-height: 60px;
|
||||||
max-height: 120px;
|
// max-height: 120px;
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@@ -562,6 +581,19 @@ defineExpose({ info, show })
|
|||||||
font-weight: 550;
|
font-weight: 550;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.num1 {
|
||||||
|
grid-template-columns: 1fr 1fr; /* 核心:改为2列,均分宽度 */
|
||||||
|
grid-template-rows: auto auto;
|
||||||
|
gap: 8px; /* 可选:子元素间距,提升美观度 */
|
||||||
|
div {
|
||||||
|
display: flex;
|
||||||
|
padding-left: 20px;
|
||||||
|
// justify-content: center;
|
||||||
|
span {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.BoxA {
|
.BoxA {
|
||||||
|
|||||||
@@ -6,20 +6,20 @@
|
|||||||
<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>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<img src="@/assets/img/FGX.png" />
|
<img src="@/assets/img/FGX.png" />
|
||||||
</div>
|
</div>
|
||||||
<div class="mt10 TJTop">
|
<div class="mt10 TJTop">
|
||||||
<img src="@/assets/img/TJ.png" />
|
<!-- <img src="@/assets/img/TJ.png" />
|
||||||
综合评估得分:
|
综合评估得分:
|
||||||
<span
|
<span
|
||||||
:style="{
|
:style="{
|
||||||
@@ -53,35 +53,27 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
{{ assessList.score == 3.14159 ? '/' : assessList.score }}
|
{{ assessList.score == 3.14159 ? '/' : assessList.score }}
|
||||||
<!-- {{ assessList.level }} -->
|
|
||||||
</span>
|
</span> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="evaluate">
|
<div class="evaluate">
|
||||||
<div v-for="item in assessList.children" style="min-width: 50px">
|
<div v-for="item in assessList" style="min-width: 60px">
|
||||||
<div>
|
<div>
|
||||||
<span class="line"></span>
|
<span
|
||||||
{{ item.name }}
|
class="line"
|
||||||
|
:style="{
|
||||||
|
background: setColor(item.score)
|
||||||
|
}"
|
||||||
|
></span>
|
||||||
|
{{ item.deptName }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style="margin-top: 5px"
|
style="margin-top: 5px"
|
||||||
:style="{
|
:style="{
|
||||||
color:
|
color: setColor(item.score)
|
||||||
item.score == 3.14159
|
|
||||||
? ''
|
|
||||||
: item.score > 4.5
|
|
||||||
? '#339966'
|
|
||||||
: item.score > 4
|
|
||||||
? '#2b7fd3'
|
|
||||||
: item.score > 3
|
|
||||||
? '#ffcc33'
|
|
||||||
: item.score > 2
|
|
||||||
? '#97017e'
|
|
||||||
: item.score > 0
|
|
||||||
? '#A52a2a'
|
|
||||||
: ''
|
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
{{ item.score == 3.14159 ? '/' : item.score }}
|
{{ setVal(item.score) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -259,6 +251,7 @@ import temporaryState from './details/temporaryState.vue'
|
|||||||
import technique from './details/technique.vue'
|
import technique from './details/technique.vue'
|
||||||
import {
|
import {
|
||||||
getAssessOverview,
|
getAssessOverview,
|
||||||
|
getAreaPollution,
|
||||||
getEvaluationOverview,
|
getEvaluationOverview,
|
||||||
getEventLevelEvaluation,
|
getEventLevelEvaluation,
|
||||||
getSupervisionData
|
getSupervisionData
|
||||||
@@ -314,11 +307,10 @@ const options = ref([
|
|||||||
{
|
{
|
||||||
label: '负序电流',
|
label: '负序电流',
|
||||||
value: '9'
|
value: '9'
|
||||||
},
|
}
|
||||||
|
|
||||||
])
|
])
|
||||||
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') {
|
||||||
@@ -364,17 +356,17 @@ const JDlist = ref([
|
|||||||
{
|
{
|
||||||
name: '试运行问题',
|
name: '试运行问题',
|
||||||
value: 0
|
value: 0
|
||||||
},
|
}
|
||||||
|
|
||||||
])
|
])
|
||||||
const harmonicList: any = ref([])
|
const harmonicList: any = ref([])
|
||||||
const harmonicLineRatio: any = ref(0)
|
const harmonicLineRatio: any = ref(0)
|
||||||
const WTList: any = ref([])
|
const WTList: any = ref([])
|
||||||
|
const PollutionList = dictData.getBasicData('Pollution_Calc').filter(item => item.name == '谐波电压')
|
||||||
|
|
||||||
const value = ref(options1[0].id)
|
const value = ref(options1[0].id)
|
||||||
const open = (e: number) => {
|
const open = (e: number) => {
|
||||||
if (e == 0) {
|
if (e == 0) {
|
||||||
evaluateRef.value.open(formRow.value)
|
evaluateRef.value.open(formRow.value,assessList.value)
|
||||||
} else if (e == 1) {
|
} else if (e == 1) {
|
||||||
steadyStateRef.value.open(formRow.value)
|
steadyStateRef.value.open(formRow.value)
|
||||||
} else if (e == 2) {
|
} else if (e == 2) {
|
||||||
@@ -383,6 +375,36 @@ const open = (e: number) => {
|
|||||||
techniqueRef.value.open(formRow.value)
|
techniqueRef.value.open(formRow.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const setColor = val => {
|
||||||
|
return val == 3.14159
|
||||||
|
? ''
|
||||||
|
: val > 10000
|
||||||
|
? '#A52a2a'
|
||||||
|
: val > 1000
|
||||||
|
? '#ff9900'
|
||||||
|
: val > 100
|
||||||
|
? '#ffcc33'
|
||||||
|
: val > 0
|
||||||
|
? '#3399ff'
|
||||||
|
: val == 0
|
||||||
|
? '#00B07D'
|
||||||
|
: ''
|
||||||
|
}
|
||||||
|
const setVal = val => {
|
||||||
|
return val == 3.14159
|
||||||
|
? '/'
|
||||||
|
: val > 10000
|
||||||
|
? '重度污染'
|
||||||
|
: val > 1000
|
||||||
|
? '中度污染'
|
||||||
|
: val > 100
|
||||||
|
? '轻度污染'
|
||||||
|
: val > 0
|
||||||
|
? '轻微污染'
|
||||||
|
: val == 0
|
||||||
|
? '无污染'
|
||||||
|
: ''
|
||||||
|
}
|
||||||
const info = (row: any) => {
|
const info = (row: any) => {
|
||||||
let form = {
|
let form = {
|
||||||
...row,
|
...row,
|
||||||
@@ -402,7 +424,7 @@ const info = (row: any) => {
|
|||||||
transientChange()
|
transientChange()
|
||||||
// 综合评估
|
// 综合评估
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getAssessOverview(form).then(res => {
|
getAreaPollution({ ...form, ids: [PollutionList[0].id] }).then(res => {
|
||||||
assessList.value = res.data
|
assessList.value = res.data
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
@@ -413,8 +435,7 @@ const info = (row: any) => {
|
|||||||
JDlist.value[1].value = res.data?.onLineNum || 0
|
JDlist.value[1].value = res.data?.onLineNum || 0
|
||||||
JDlist.value[2].value = res.data?.userNum || 0
|
JDlist.value[2].value = res.data?.userNum || 0
|
||||||
JDlist.value[3].value = res.data?.trialRunNum || 0
|
JDlist.value[3].value = res.data?.trialRunNum || 0
|
||||||
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
const harmonicChange = () => {
|
const harmonicChange = () => {
|
||||||
getEvaluationOverview({ ...formRow.value, harmonicType: harmonicType.value }).then(res => {
|
getEvaluationOverview({ ...formRow.value, harmonicType: harmonicType.value }).then(res => {
|
||||||
@@ -502,7 +523,7 @@ defineExpose({ info, show })
|
|||||||
width: 0.5rem;
|
width: 0.5rem;
|
||||||
height: 0.5rem;
|
height: 0.5rem;
|
||||||
border-radius: 0.25rem;
|
border-radius: 0.25rem;
|
||||||
background: var(--el-color-primary);
|
// background: var(--el-color-primary);
|
||||||
margin-right: 2px;
|
margin-right: 2px;
|
||||||
margin-bottom: 1px;
|
margin-bottom: 1px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,277 +1,277 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="panorama" :style="height">
|
<div class="panorama" :style="height">
|
||||||
<div class="mapBox" v-show="lineInfo">
|
<div class="mapBox" v-show="lineInfo">
|
||||||
<DatePicker ref="datePickerRef" style="display: none" theCurrentTime />
|
<DatePicker ref="datePickerRef" style="display: none" theCurrentTime />
|
||||||
<el-form :inline="true" :model="form" class="demo-form-inline">
|
<el-form :inline="true" :model="form" class="demo-form-inline">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<Area ref="areaRef" :show-all-levels="false" v-model="form.orgNo" style="width: 100px"
|
<Area ref="areaRef" :show-all-levels="false" v-model="form.orgNo" style="width: 100px"
|
||||||
@changeValue="changeValue" />
|
@changeValue="changeValue" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-select v-model="form.isUpToGrid" style="width: 100px" @change="info">
|
<el-select v-model="form.isUpToGrid" style="width: 100px" @change="info">
|
||||||
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id" />
|
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<div class="Icon" @click="reset">
|
<div class="Icon" @click="reset">
|
||||||
<Icon name="fa fa-refresh" />
|
<Icon name="fa fa-refresh" />
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 地图 -->
|
<!-- 地图 -->
|
||||||
<Map v-if="VITE_FLAG" ref="mapRef" @changeValue="changeValue" :lineInfo="lineInfo" @drop="drop"
|
<Map v-if="VITE_FLAG" ref="mapRef" @changeValue="changeValue" :lineInfo="lineInfo" @drop="drop"
|
||||||
@show="infoShow" />
|
@show="infoShow" />
|
||||||
<div v-show="lineInfo">
|
<div v-show="lineInfo">
|
||||||
<!-- 省级 -->
|
<!-- 省级 -->
|
||||||
<div v-show="control == 1">
|
<div v-show="control == 1">
|
||||||
<mapL ref="mapLRef" class="mapL" @LookMap="LookMap" @GridDiagram="GridDiagram" />
|
<mapL ref="mapLRef" class="mapL" @LookMap="LookMap" @GridDiagram="GridDiagram" />
|
||||||
<mapR ref="mapRRef" class="mapR" />
|
<mapR ref="mapRRef" class="mapR" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 市级 -->
|
<!-- 市级 -->
|
||||||
<!-- <div v-show="control == 4"> -->
|
<!-- <div v-show="control == 4"> -->
|
||||||
<div v-show="control == 2">
|
<div v-show="control == 2">
|
||||||
<cityMapL ref="cityMapLRef" class="mapL" @LookMap="LookMap" @GridDiagram="GridDiagram" />
|
<cityMapL ref="cityMapLRef" class="mapL" @LookMap="LookMap" @GridDiagram="GridDiagram" />
|
||||||
<cityMapR ref="cityMapRRef" class="mapR" />
|
<cityMapR ref="cityMapRRef" class="mapR" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Info v-if="!lineInfo" ref="InfoRef" @back="lineInfo = true" />
|
<Info v-if="!lineInfo" ref="InfoRef" @back="lineInfo = true" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, nextTick, ref, provide } from 'vue'
|
import { onMounted, nextTick, ref, provide } from 'vue'
|
||||||
import Area from '@/components/form/area/index.vue'
|
import Area from '@/components/form/area/index.vue'
|
||||||
import Map from './components/map.vue'
|
import Map from './components/map.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { Search, Refresh } from '@element-plus/icons-vue'
|
import { Search, Refresh } from '@element-plus/icons-vue'
|
||||||
import mapL from './components/mapL.vue'
|
import mapL from './components/mapL.vue'
|
||||||
import mapR from './components/mapR.vue'
|
import mapR from './components/mapR.vue'
|
||||||
import cityMapL from './components/cityMapL.vue'
|
import cityMapL from './components/cityMapL.vue'
|
||||||
import cityMapR from './components/cityMapR.vue'
|
import cityMapR from './components/cityMapR.vue'
|
||||||
import Info from './components/line/info.vue'
|
import Info from './components/line/info.vue'
|
||||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
|
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'panorama'
|
name: 'panorama'
|
||||||
})
|
})
|
||||||
|
|
||||||
const datePickerRef = ref()
|
const datePickerRef = ref()
|
||||||
const areaRef = ref()
|
const areaRef = ref()
|
||||||
const lineInfo = ref(true)
|
const lineInfo = ref(true)
|
||||||
const mapRef = ref()
|
const mapRef = ref()
|
||||||
const mapLRef = ref()
|
const mapLRef = ref()
|
||||||
const InfoRef = ref()
|
const InfoRef = ref()
|
||||||
const mapRRef = ref()
|
const mapRRef = ref()
|
||||||
const cityMapLRef = ref()
|
const cityMapLRef = ref()
|
||||||
const cityMapRRef = ref()
|
const cityMapRRef = ref()
|
||||||
|
|
||||||
// const list: any = [dictData.state.area[0], ...dictData.state.area[0].children]
|
// const list: any = [dictData.state.area[0], ...dictData.state.area[0].children]
|
||||||
const options: any = ref([
|
const options: any = ref([
|
||||||
{
|
{
|
||||||
name: dictData.state.area[0].name,
|
name: dictData.state.area[0].name,
|
||||||
id: 0
|
id: 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '上送网公司',
|
name: '上送网公司',
|
||||||
id: 1
|
id: 1
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
const control = ref(1)
|
const control = ref(1)
|
||||||
const form: any = ref({
|
const form: any = ref({
|
||||||
name: '',
|
name: '',
|
||||||
orgNo: dictData.state.area[0].id,
|
orgNo: dictData.state.area[0].id,
|
||||||
areaName: dictData.state.area[0]?.name,
|
areaName: dictData.state.area[0]?.name,
|
||||||
isUpToGrid: 0
|
isUpToGrid: 0
|
||||||
})
|
})
|
||||||
|
|
||||||
const height = mainHeight(10)
|
const height = mainHeight(10)
|
||||||
// 获取区域名称
|
// 获取区域名称
|
||||||
const changeValue = (e: any) => {
|
const changeValue = (e: any) => {
|
||||||
VITE_FLAG ? mapRef.value.locatePositions(e) : ''
|
VITE_FLAG ? mapRef.value.locatePositions(e) : ''
|
||||||
form.value.orgNo = e.data.id //list.filter((item: any) => item.code == e.orgId)[0]?.id || dictData.state.area[0].id
|
form.value.orgNo = e.data.id //list.filter((item: any) => item.code == e.orgId)[0]?.id || dictData.state.area[0].id
|
||||||
form.value.areaName = e.data.name
|
form.value.areaName = e.data.name
|
||||||
options.value[0].name = e.data.areaName
|
options.value[0].name = e.data.areaName
|
||||||
|
|
||||||
control.value = e.data.level
|
control.value = e.data.level
|
||||||
|
|
||||||
info()
|
info()
|
||||||
}
|
}
|
||||||
//点击监测点详情
|
//点击监测点详情
|
||||||
const drop = (id: string) => {
|
const drop = (id: string) => {
|
||||||
lineInfo.value = false
|
lineInfo.value = false
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
InfoRef.value.open(id)
|
InfoRef.value.open(id)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 关闭左右数据展示
|
// 关闭左右数据展示
|
||||||
const infoShow = (e: boolean) => {
|
const infoShow = (e: boolean) => {
|
||||||
mapLRef.value.show = e
|
mapLRef.value.show = e
|
||||||
mapRRef.value.show = e
|
mapRRef.value.show = e
|
||||||
cityMapLRef.value.show = e
|
cityMapLRef.value.show = e
|
||||||
cityMapRRef.value.show = e
|
cityMapRRef.value.show = e
|
||||||
}
|
}
|
||||||
// 地图控制图层
|
// 地图控制图层
|
||||||
const LookMap = (row: any, key?: any) => {
|
const LookMap = (row: any, key?: any) => {
|
||||||
VITE_FLAG ? mapRef.value.addMarkers({ ...row, type: 1 }, key) : ''
|
VITE_FLAG ? mapRef.value.addMarkers({ ...row, type: 1 }, key) : ''
|
||||||
}
|
}
|
||||||
const LngLat = [
|
const LngLat = [
|
||||||
{
|
{
|
||||||
name: '唐山',
|
name: '唐山',
|
||||||
LngLat: [118.335849137, 39.7513593355],
|
LngLat: [118.335849137, 39.7513593355],
|
||||||
zoom: 8
|
zoom: 8
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '张家口',
|
name: '张家口',
|
||||||
LngLat: [115.032504679, 40.8951549951],
|
LngLat: [115.032504679, 40.8951549951],
|
||||||
zoom: 7
|
zoom: 7
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '秦皇岛',
|
name: '秦皇岛',
|
||||||
LngLat: [119.185113833, 40.1179119754],
|
LngLat: [119.185113833, 40.1179119754],
|
||||||
zoom: 8.3
|
zoom: 8.3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '承德',
|
name: '承德',
|
||||||
LngLat: [117.548498365, 41.3775890632],
|
LngLat: [117.548498365, 41.3775890632],
|
||||||
zoom: 7.3
|
zoom: 7.3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '廊坊',
|
name: '廊坊',
|
||||||
LngLat: [116.628004129, 39.0589378611],
|
LngLat: [116.628004129, 39.0589378611],
|
||||||
zoom: 8
|
zoom: 8
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '超高压',
|
name: '超高压',
|
||||||
LngLat: [116.84428600000001, 40.57707185292256],
|
LngLat: [116.84428600000001, 40.57707185292256],
|
||||||
zoom: 6.709267680647425
|
zoom: 6.709267680647425
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '风光储',
|
name: '风光储',
|
||||||
LngLat: [116.84428600000001, 40.57707185292256],
|
LngLat: [116.84428600000001, 40.57707185292256],
|
||||||
zoom: 6.709267680647425
|
zoom: 6.709267680647425
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
//区域统计展示切换
|
//区域统计展示切换
|
||||||
const GridDiagram = (k?: number, num?: number) => {
|
const GridDiagram = (k?: number, num?: number) => {
|
||||||
VITE_FLAG ? mapRef.value.radiusPop(k) : ''
|
VITE_FLAG ? mapRef.value.radiusPop(k) : ''
|
||||||
if (num == 3) {
|
if (num == 3) {
|
||||||
// form.value.areaName
|
// form.value.areaName
|
||||||
let value = LngLat.filter(item => item.name == form.value.areaName)[0]
|
let value = LngLat.filter(item => item.name == form.value.areaName)[0]
|
||||||
|
|
||||||
if (value) VITE_FLAG ? mapRef.value.flyTo({ coordinate: value.LngLat }, value.zoom) : ''
|
if (value) VITE_FLAG ? mapRef.value.flyTo({ coordinate: value.LngLat }, value.zoom) : ''
|
||||||
} else {
|
} else {
|
||||||
VITE_FLAG ? mapRef.value.flyTo({ coordinate: [116.84428600000001, 40.57707185292256] }, 6.709267680647425) : ''
|
VITE_FLAG ? mapRef.value.flyTo({ coordinate: [116.84428600000001, 40.57707185292256] }, 6.709267680647425) : ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const info = () => {
|
const info = () => {
|
||||||
form.value.startTime = datePickerRef.value.timeValue[0]
|
form.value.startTime = datePickerRef.value.timeValue[0]
|
||||||
form.value.searchBeginTime = datePickerRef.value.timeValue[0]
|
form.value.searchBeginTime = datePickerRef.value.timeValue[0]
|
||||||
form.value.endTime = datePickerRef.value.timeValue[1]
|
form.value.endTime = datePickerRef.value.timeValue[1]
|
||||||
form.value.searchEndTime = datePickerRef.value.timeValue[1]
|
form.value.searchEndTime = datePickerRef.value.timeValue[1]
|
||||||
|
|
||||||
form.value.type = datePickerRef.value.interval
|
form.value.type = datePickerRef.value.interval
|
||||||
|
|
||||||
VITE_FLAG ? mapRef.value.grids(form.value) : ''
|
VITE_FLAG ? mapRef.value.grids(form.value) : ''
|
||||||
if (control.value == 1) {
|
if (control.value == 1) {
|
||||||
mapLRef.value.info(form.value)
|
mapLRef.value.info(form.value)
|
||||||
mapRRef.value.info(form.value)
|
mapRRef.value.info(form.value)
|
||||||
} else {
|
} else {
|
||||||
cityMapRRef.value.info(form.value)
|
cityMapRRef.value.info(form.value)
|
||||||
cityMapLRef.value.info(form.value)
|
cityMapLRef.value.info(form.value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 重置
|
// 重置
|
||||||
const reset = () => {
|
const reset = () => {
|
||||||
form.value = {
|
form.value = {
|
||||||
name: '',
|
name: '',
|
||||||
orgNo: dictData.state.area[0].id,
|
orgNo: dictData.state.area[0].id,
|
||||||
areaName: dictData.state.area[0]?.name,
|
areaName: dictData.state.area[0]?.name,
|
||||||
isUpToGrid: 0
|
isUpToGrid: 0
|
||||||
}
|
}
|
||||||
changeValue({ data: dictData.state.area[0] })
|
changeValue({ data: dictData.state.area[0] })
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// info()
|
// info()
|
||||||
changeValue({ data: dictData.state.area[0] })
|
changeValue({ data: dictData.state.area[0] })
|
||||||
// aaa()
|
// aaa()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
:deep(.mapBox) {
|
:deep(.mapBox) {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
left: calc(50% + 45px);
|
left: calc(50% + 45px);
|
||||||
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
|
||||||
.el-select {
|
.el-select {
|
||||||
min-width: 100px;
|
min-width: 100px;
|
||||||
|
|
||||||
.el-select__wrapper {
|
.el-select__wrapper {
|
||||||
height: 46px !important;
|
height: 46px !important;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.Icon {
|
.Icon {
|
||||||
height: 46px;
|
height: 46px;
|
||||||
width: 46px;
|
width: 46px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.fa-refresh {
|
.fa-refresh {
|
||||||
color: var(--el-color-primary) !important;
|
color: var(--el-color-primary) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input__wrapper {
|
.el-input__wrapper {
|
||||||
height: 46px;
|
height: 46px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-form-item {
|
.el-form-item {
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mapL {
|
.mapL {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
// z-index: 1;
|
// z-index: 1;
|
||||||
left: 10px;
|
left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mapR {
|
.mapR {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 10px;
|
top: 10px;
|
||||||
// z-index: 1;
|
// z-index: 1;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panorama {
|
.panorama {
|
||||||
margin: 10px 0 0 0;
|
margin: 10px 0 0 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-button:focus {
|
.el-button:focus {
|
||||||
color: var(--color);
|
color: var(--color);
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-button:hover {
|
.el-button:hover {
|
||||||
color: var(--el-color-white);
|
color: var(--el-color-white);
|
||||||
border-color: var(--el-button-hover-bg-color);
|
border-color: var(--el-button-hover-bg-color);
|
||||||
background-color: var(--el-button-hover-bg-color);
|
background-color: var(--el-button-hover-bg-color);
|
||||||
outline: 0;
|
outline: 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<TableHeader date-picker area ref="TableHeaderRef">
|
<TableHeader date-picker area ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="对象类型">
|
<!-- <el-form-item label="对象类型">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.objType"
|
v-model="tableStore.table.params.objType"
|
||||||
clearable
|
clearable
|
||||||
@@ -16,6 +16,16 @@
|
|||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="运行状态">
|
||||||
|
<el-select v-model="tableStore.table.params.lineRunFlag" clearable placeholder="请选择运行状态">
|
||||||
|
<el-option
|
||||||
|
v-for="item in runFlagList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终端厂家:">
|
<el-form-item label="终端厂家:">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -136,7 +146,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="form_but">
|
<el-form-item class="form_but">
|
||||||
<el-button type="primary" @click="MonitorVerify" icon="el-icon-Refresh">更新</el-button>
|
<el-button type="primary" @click="MonitorVerify" icon="el-icon-Search">查询</el-button>
|
||||||
<el-button type="primary" @click="onExport" icon="el-icon-Download">导出</el-button>
|
<el-button type="primary" @click="onExport" icon="el-icon-Download">导出</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -221,7 +231,13 @@ const mapList: any = ref([])
|
|||||||
const segmented = ref(1)
|
const segmented = ref(1)
|
||||||
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
|
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
|
||||||
const time = ref(['', ''])
|
const time = ref(['', ''])
|
||||||
|
const runFlagList = [
|
||||||
|
{ id: 0, name: '运行' },
|
||||||
|
{ id: 1, name: '检修' },
|
||||||
|
{ id: 2, name: '停运' },
|
||||||
|
{ id: 3, name: '调试' },
|
||||||
|
{ id: 4, name: '退运' }
|
||||||
|
]
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/device-boot/dataVerify/getMonitorLimitData',
|
url: '/device-boot/dataVerify/getMonitorLimitData',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -426,6 +442,7 @@ tableStore.table.params.objType = ''
|
|||||||
tableStore.table.params.alarmDayLimit = 5
|
tableStore.table.params.alarmDayLimit = 5
|
||||||
tableStore.table.params.warnDayLimit = 1
|
tableStore.table.params.warnDayLimit = 1
|
||||||
tableStore.table.params.manufacturer = ''
|
tableStore.table.params.manufacturer = ''
|
||||||
|
tableStore.table.params.lineRunFlag = 0
|
||||||
const quantityClick = (e: any, num: number) => {
|
const quantityClick = (e: any, num: number) => {
|
||||||
if (num == 0 && e.ids?.length == 0) return
|
if (num == 0 && e.ids?.length == 0) return
|
||||||
alarmDetailsRef.value.open(e, time.value, num)
|
alarmDetailsRef.value.open(e, time.value, num)
|
||||||
@@ -476,6 +493,7 @@ 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,143 +1,151 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog draggable width="1350px" class="cn-operate-dialog" v-model="dialogVisible" :title="title">
|
<el-dialog draggable width="1350px" class="cn-operate-dialog" v-model="dialogVisible" :title="title">
|
||||||
<div style="display: flex">
|
<div style="display: flex" v-loading="loading">
|
||||||
<div :style="height1" class="mr10 box" style="width: 500px">
|
<div :style="height1" class="mr10 box" style="width: 500px">
|
||||||
<vxe-table
|
<vxe-table
|
||||||
height="auto"
|
height="auto"
|
||||||
:data="TableData"
|
:data="TableData"
|
||||||
v-bind="defaultAttribute"
|
v-bind="defaultAttribute"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
:row-config="{ isCurrent: true, isHover: true }"
|
:row-config="{ isCurrent: true, isHover: true }"
|
||||||
@current-change="currentChangeEvent"
|
@current-change="currentChangeEvent"
|
||||||
>
|
>
|
||||||
<vxe-column type="seq" title="序号" width="60px"></vxe-column>
|
<vxe-column type="seq" title="序号" width="60px"></vxe-column>
|
||||||
<vxe-column field="date" title="日期"></vxe-column>
|
<vxe-column field="date" title="日期"></vxe-column>
|
||||||
<vxe-column field="bdName" title="所属电站(场站)" width="120px"></vxe-column>
|
<vxe-column field="bdName" title="所属电站(场站)" width="120px"></vxe-column>
|
||||||
<vxe-column field="monitorName" title="监测点名称" width="120px"></vxe-column>
|
<vxe-column field="monitorName" title="监测点名称" width="120px"></vxe-column>
|
||||||
<vxe-column field="timeSum" title="告警时间(分钟)" width="80px"></vxe-column>
|
<vxe-column field="timeSum" title="告警时间(分钟)" width="80px"></vxe-column>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :style="height" style="width: 820px" v-loading="loading1">
|
<div :style="height" style="width: 820px" v-loading="loading1">
|
||||||
<vxe-table
|
<vxe-table
|
||||||
height="auto"
|
height="auto"
|
||||||
:data="TableData1.slice((pageNum - 1) * pageSize, pageNum * pageSize)"
|
:data="TableData1.slice((pageNum - 1) * pageSize, pageNum * pageSize)"
|
||||||
v-bind="defaultAttribute"
|
v-bind="defaultAttribute"
|
||||||
>
|
>
|
||||||
<vxe-column type="seq" title="序号" width="80px">
|
<vxe-column type="seq" title="序号" width="80px">
|
||||||
<template #default="{ rowIndex }">
|
<template #default="{ rowIndex }">
|
||||||
<span>{{ (pageNum - 1) * pageSize + rowIndex + 1 }}</span>
|
<span>{{ (pageNum - 1) * pageSize + rowIndex + 1 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="time" title="时间" :formatter="formatter"></vxe-column>
|
<vxe-column field="time" title="时间" :formatter="formatter"></vxe-column>
|
||||||
<vxe-column field="targetName" title="指标类型" min-width="100px"></vxe-column>
|
<vxe-column field="targetName" title="指标类型" min-width="100px"></vxe-column>
|
||||||
<vxe-column field="phaseType" title="相别" width="80px">
|
<vxe-column field="phaseType" title="相别" width="80px">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
{{ row.phaseType == 'T' ? '/' : row.phaseType }}
|
{{ row.phaseType == 'T' ? '/' : row.phaseType }}
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
||||||
<vxe-column field="type" title="数据类型" width="105px" :formatter="formatter"></vxe-column>
|
<vxe-column field="type" title="数据类型" width="105px" :formatter="formatter"></vxe-column>
|
||||||
<vxe-column field="val" title="值" width="85px" :formatter="formatter"></vxe-column>
|
<vxe-column field="val" title="值" width="85px" :formatter="formatter"></vxe-column>
|
||||||
</vxe-table>
|
<vxe-column field="overLimitValue" title="限值" width="85px" :formatter="formatter"></vxe-column>
|
||||||
<div class="table-pagination">
|
</vxe-table>
|
||||||
<el-pagination
|
<div class="table-pagination">
|
||||||
v-model:currentPage="pageNum"
|
<el-pagination
|
||||||
v-model:page-size="pageSize"
|
v-model:currentPage="pageNum"
|
||||||
:page-sizes="[10, 20, 50, 100, 200]"
|
v-model:page-size="pageSize"
|
||||||
background
|
:page-sizes="[10, 20, 50, 100, 200]"
|
||||||
layout="sizes,total, ->, prev, pager, next, jumper"
|
background
|
||||||
:total="TableData1.length"
|
layout="sizes,total, ->, prev, pager, next, jumper"
|
||||||
></el-pagination>
|
:total="TableData1.length"
|
||||||
</div>
|
></el-pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</div>
|
||||||
</template>
|
</el-dialog>
|
||||||
<script lang="ts" setup>
|
</template>
|
||||||
import { ref, inject } from 'vue'
|
<script lang="ts" setup>
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { ref, inject } from 'vue'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { ElMessage } from 'element-plus'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { monitorLimitTable, monitorLimitTableDetail } from '@/api/device-boot/dataVerify'
|
import { ElMessage } from 'element-plus'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { monitorLimitTable, monitorLimitTableDetail } from '@/api/device-boot/dataVerify'
|
||||||
const dictData = useDictData()
|
import { mainHeight } from '@/utils/layout'
|
||||||
const StatisList = dictData.getBasicData('Steady_Statis')
|
const dictData = useDictData()
|
||||||
const dialogVisible = ref(false)
|
const StatisList = dictData.getBasicData('Steady_Statis')
|
||||||
const height1 = mainHeight(-110, 2)
|
const dialogVisible = ref(false)
|
||||||
const height = mainHeight(10, 2)
|
const height1 = mainHeight(-110, 2)
|
||||||
const tableRef = ref()
|
const height = mainHeight(10, 2)
|
||||||
const title = ref('')
|
const tableRef = ref()
|
||||||
const loading1 = ref(false)
|
const title = ref('')
|
||||||
const TableData = ref([])
|
const loading = ref(false)
|
||||||
const TableData1 = ref([])
|
const loading1 = ref(false)
|
||||||
const pageNum = ref(1)
|
const TableData = ref([])
|
||||||
const pageSize = ref(20)
|
const TableData1 = ref([])
|
||||||
const numKey = ref(0)
|
const pageNum = ref(1)
|
||||||
const targetKey = ref('')
|
const pageSize = ref(20)
|
||||||
const clickRow = ref({})
|
const numKey = ref(0)
|
||||||
const open = (data: anyObj, time: string[], num: number) => {
|
const targetKey = ref('')
|
||||||
// title.value = (num == 0 ? data.targetName : data.monitorName) + '_告警详情展示'
|
const clickRow = ref({})
|
||||||
title.value = '告警监测点详情'
|
const open = (data: anyObj, time: string[], num: number) => {
|
||||||
numKey.value = num
|
// title.value = (num == 0 ? data.targetName : data.monitorName) + '_告警详情展示'
|
||||||
targetKey.value = data.key
|
loading.value = true
|
||||||
TableData.value = []
|
title.value = '告警监测点详情'
|
||||||
monitorLimitTable({
|
numKey.value = num
|
||||||
monitorIds: num == 0 ? data.ids : [data.monitorId],
|
targetKey.value = data.key
|
||||||
targetKey: num == 0 ? data.key : '',
|
TableData.value = []
|
||||||
searchBeginTime: time[0],
|
monitorLimitTable({
|
||||||
searchEndTime: time[1]
|
monitorIds: num == 0 ? data.ids : [data.monitorId],
|
||||||
}).then(res => {
|
targetKey: num == 0 ? data.key : '',
|
||||||
TableData.value = res.data
|
searchBeginTime: time[0],
|
||||||
tableRef.value.setCurrentRow(TableData.value[0])
|
searchEndTime: time[1]
|
||||||
currentChangeEvent()
|
})
|
||||||
})
|
.then(async(res) => {
|
||||||
dialogVisible.value = true
|
TableData.value = res.data
|
||||||
}
|
await tableRef.value.setCurrentRow(TableData.value[0])
|
||||||
const currentChangeEvent = () => {
|
await currentChangeEvent()
|
||||||
loading1.value = true
|
loading.value = false
|
||||||
clickRow.value = tableRef.value.getCurrentRecord()
|
})
|
||||||
TableData1.value = []
|
.catch(() => {
|
||||||
monitorLimitTableDetail({
|
loading.value = false
|
||||||
monitorIds: [clickRow.value.monitorId],
|
})
|
||||||
searchBeginTime: clickRow.value.date,
|
dialogVisible.value = true
|
||||||
targetKey: numKey.value == 0 ? targetKey.value : ''
|
}
|
||||||
})
|
const currentChangeEvent = () => {
|
||||||
.then(res => {
|
loading1.value = true
|
||||||
TableData1.value = res.data
|
clickRow.value = tableRef.value.getCurrentRecord()
|
||||||
loading1.value = false
|
TableData1.value = []
|
||||||
pageNum.value = 1
|
monitorLimitTableDetail({
|
||||||
})
|
monitorIds: [clickRow.value.monitorId],
|
||||||
.catch(() => {
|
searchBeginTime: clickRow.value.date,
|
||||||
loading1.value = false
|
targetKey: numKey.value == 0 ? targetKey.value : ''
|
||||||
})
|
})
|
||||||
}
|
.then(res => {
|
||||||
const formatter = (row: any) => {
|
TableData1.value = res.data
|
||||||
if (row.column.field == 'time') {
|
loading1.value = false
|
||||||
return clickRow.value.date + ' ' + row.cellValue
|
pageNum.value = 1
|
||||||
} else if (row.column.field == 'type') {
|
})
|
||||||
return row.cellValue === 'null' ? '/' : row.cellValue
|
.catch(() => {
|
||||||
} else {
|
loading1.value = false
|
||||||
return row.cellValue == null ? '/' : (row.cellValue - 0).toFixed(2)
|
})
|
||||||
}
|
}
|
||||||
}
|
const formatter = (row: any) => {
|
||||||
defineExpose({ open })
|
if (row.column.field == 'time') {
|
||||||
</script>
|
return clickRow.value.date + ' ' + row.cellValue
|
||||||
<style lang="scss" scoped>
|
} else if (row.column.field == 'type') {
|
||||||
.table-pagination {
|
return row.cellValue === 'null' ? '/' : row.cellValue
|
||||||
height: 58px;
|
} else {
|
||||||
box-sizing: border-box;
|
return row.cellValue == null ? '/' : (row.cellValue - 0).toFixed(2)
|
||||||
width: 100%;
|
}
|
||||||
max-width: 100%;
|
}
|
||||||
background-color: var(--ba-bg-color-overlay);
|
defineExpose({ open })
|
||||||
padding: 13px 15px;
|
</script>
|
||||||
border-left: 1px solid #e4e7e9;
|
<style lang="scss" scoped>
|
||||||
border-right: 1px solid #e4e7e9;
|
.table-pagination {
|
||||||
border-bottom: 1px solid #e4e7e9;
|
height: 58px;
|
||||||
}
|
box-sizing: border-box;
|
||||||
:deep(.box) {
|
width: 100%;
|
||||||
.row--current {
|
max-width: 100%;
|
||||||
background-color: var(--el-color-primary-light-8) !important;
|
background-color: var(--ba-bg-color-overlay);
|
||||||
}
|
padding: 13px 15px;
|
||||||
}
|
border-left: 1px solid #e4e7e9;
|
||||||
</style>
|
border-right: 1px solid #e4e7e9;
|
||||||
|
border-bottom: 1px solid #e4e7e9;
|
||||||
|
}
|
||||||
|
:deep(.box) {
|
||||||
|
.row--current {
|
||||||
|
//background-color: var(--el-color-primary-light-8) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,67 +1,67 @@
|
|||||||
<template>
|
<template>
|
||||||
<div :style="height">
|
<div :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">
|
||||||
<AssessTree
|
<AssessTree
|
||||||
:default-expand-all="false"
|
:default-expand-all="false"
|
||||||
@node-click="handleNodeClick"
|
@node-click="handleNodeClick"
|
||||||
@init="handleNodeClick"
|
@init="handleNodeClick"
|
||||||
ref="assessTreeRef"
|
ref="assessTreeRef"
|
||||||
:highlight-current = 'true'
|
:highlight-current="true"
|
||||||
:current-node-key="currentTreeKey"
|
:current-node-key="currentTreeKey"
|
||||||
:expand-on-click-node="false"
|
:expand-on-click-node="false"
|
||||||
></AssessTree>
|
></AssessTree>
|
||||||
</pane>
|
</pane>
|
||||||
<pane style="background: #fff">
|
<pane style="background: #fff">
|
||||||
<div class="actionButtons mb10">
|
<div class="actionButtons mb10">
|
||||||
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate" :loading="loading">模版下载</el-button>
|
<el-button icon="el-icon-Download" type="primary" @click="exportExcelTemplate" :loading="loading">
|
||||||
<el-button type="primary" icon="el-icon-Upload" @click="handleImportClick">导入数据背景</el-button>
|
模版下载
|
||||||
<el-button type="primary" icon="el-icon-Memo" class="ml10" @click="assess2">评估</el-button>
|
</el-button>
|
||||||
<el-button type="primary" icon="el-icon-Download" @click="exportReport">导出报告</el-button>
|
<el-button type="primary" icon="el-icon-Upload" @click="handleImportClick">导入数据背景</el-button>
|
||||||
</div>
|
<el-button type="primary" icon="el-icon-Memo" class="ml10" @click="assess2">评估</el-button>
|
||||||
<div :style="collapseHeight" style="overflow-y: auto">
|
<el-button type="primary" icon="el-icon-Download" @click="exportReport">导出报告</el-button>
|
||||||
<el-collapse v-model="collapseName" class="pl10 pr10">
|
</div>
|
||||||
<el-collapse-item title="基本信息" :name="1">
|
<div :style="collapseHeight" style="overflow-y: auto">
|
||||||
<div class="loading-container">
|
<el-collapse v-model="collapseName" class="pl10 pr10">
|
||||||
<div v-if="infoLoading" class="loading-wrapper">
|
<el-collapse-item title="基本信息" :name="1">
|
||||||
<el-icon class="is-loading"><Loading /></el-icon>
|
<div class="loading-container">
|
||||||
<span class="loading-text">加载中...</span>
|
<div v-if="infoLoading" class="loading-wrapper">
|
||||||
</div>
|
<el-icon class="is-loading"><Loading /></el-icon>
|
||||||
<information
|
<span class="loading-text">加载中...</span>
|
||||||
v-show="!infoLoading"
|
</div>
|
||||||
:node-id="currentNodeId"
|
<information
|
||||||
@data-loaded="() => infoLoading = false"
|
v-show="!infoLoading"
|
||||||
/>
|
:node-id="currentNodeId"
|
||||||
</div>
|
@data-loaded="() => (infoLoading = false)"
|
||||||
</el-collapse-item>
|
/>
|
||||||
<el-collapse-item title="评估结果信息" :name="2">
|
</div>
|
||||||
<div class="loading-container">
|
</el-collapse-item>
|
||||||
<div v-if="outcomeLoading" class="loading-wrapper">
|
<el-collapse-item title="评估结果信息" :name="2">
|
||||||
<el-icon class="is-loading"><Loading /></el-icon>
|
<div class="loading-container">
|
||||||
<span class="loading-text">加载中...</span>
|
<div v-if="outcomeLoading" class="loading-wrapper">
|
||||||
</div>
|
<el-icon class="is-loading"><Loading /></el-icon>
|
||||||
<Outcome
|
<span class="loading-text">加载中...</span>
|
||||||
v-show="!outcomeLoading"
|
</div>
|
||||||
:node-id="currentNodeId"
|
<Outcome
|
||||||
@data-status="handleDataStatus"
|
v-show="!outcomeLoading"
|
||||||
@data-loaded="() => outcomeLoading = false"
|
:node-id="currentNodeId"
|
||||||
|
@data-status="handleDataStatus"
|
||||||
/>
|
@data-loaded="() => (outcomeLoading = false)"
|
||||||
</div>
|
/>
|
||||||
</el-collapse-item>
|
</div>
|
||||||
</el-collapse>
|
</el-collapse-item>
|
||||||
</div>
|
</el-collapse>
|
||||||
</pane>
|
</div>
|
||||||
</splitpanes>
|
</pane>
|
||||||
</div>
|
</splitpanes>
|
||||||
|
</div>
|
||||||
<AssessTemplate ref="assessTemplate" @data-success = "assess"></AssessTemplate>
|
|
||||||
|
|
||||||
|
<AssessTemplate ref="assessTemplate" @data-success="assess"></AssessTemplate>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ElMessage, ElLoading } from 'element-plus'
|
import { ElMessage, ElLoading } from 'element-plus'
|
||||||
import { onMounted, ref, provide ,nextTick } from 'vue'
|
import { onMounted, ref, provide, nextTick } from 'vue'
|
||||||
import 'splitpanes/dist/splitpanes.css'
|
import 'splitpanes/dist/splitpanes.css'
|
||||||
import { Splitpanes, Pane } from 'splitpanes'
|
import { Splitpanes, Pane } from 'splitpanes'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
@@ -70,19 +70,18 @@ import TableHeader from '@/components/table/header/index.vue'
|
|||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import information from './information.vue'
|
import information from './information.vue'
|
||||||
import Outcome from './outcome.vue'
|
import Outcome from './outcome.vue'
|
||||||
import {exportResult,downloadAssessTemplate,assessResult,userGetInfo} from '@/api/advance-boot/assess'
|
import { exportResult, downloadAssessTemplate, assessResult, userGetInfo } from '@/api/advance-boot/assess'
|
||||||
import { Loading } from '@element-plus/icons-vue'
|
import { Loading } from '@element-plus/icons-vue'
|
||||||
import AssessTemplate from './assessTemplate.vue'
|
import AssessTemplate from './assessTemplate.vue'
|
||||||
import { fa, tr } from 'element-plus/es/locale'
|
import { fa, tr } from 'element-plus/es/locale'
|
||||||
|
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
// name: 'harmonic-boot/report/word'
|
// name: 'harmonic-boot/report/word'
|
||||||
})
|
})
|
||||||
const collapseName = ref([1, 2])
|
const collapseName = ref([1, 2])
|
||||||
const height = mainHeight(80)
|
const height = mainHeight(80)
|
||||||
const collapseHeight = mainHeight(125)
|
const collapseHeight = mainHeight(125)
|
||||||
const size = ref(0)
|
const size = ref(23)
|
||||||
const dotList: any = ref({})
|
const dotList: any = ref({})
|
||||||
const infoLoading = ref(false)
|
const infoLoading = ref(false)
|
||||||
const outcomeLoading = ref(false)
|
const outcomeLoading = ref(false)
|
||||||
@@ -92,93 +91,93 @@ const assessTemplate = ref()
|
|||||||
const currentNodeId = ref<string | number | null>(null)
|
const currentNodeId = ref<string | number | null>(null)
|
||||||
const currentNodeName = ref('')
|
const currentNodeName = ref('')
|
||||||
|
|
||||||
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '',
|
url: '',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [],
|
column: [],
|
||||||
beforeSearchFun: () => {},
|
beforeSearchFun: () => {},
|
||||||
loadCallback: () => {}
|
loadCallback: () => {}
|
||||||
})
|
})
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
//有无评估结果
|
//有无评估结果
|
||||||
const result = ref(true)
|
const result = ref(true)
|
||||||
const handleDataStatus = (hasData: boolean) => {
|
const handleDataStatus = (hasData: boolean) => {
|
||||||
if (!hasData) {
|
if (!hasData) {
|
||||||
result.value = false
|
result.value = false
|
||||||
} else {
|
} else {
|
||||||
result.value = true
|
result.value = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//模板下载
|
//模板下载
|
||||||
const exportExcelTemplate = async () => {
|
const exportExcelTemplate = async () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
downloadAssessTemplate().then((res: any) => {
|
downloadAssessTemplate().then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
type: 'application/vnd.ms-excel'
|
type: 'application/vnd.ms-excel'
|
||||||
})
|
})
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a')
|
const link = document.createElement('a')
|
||||||
link.href = url
|
link.href = url
|
||||||
link.download = '评估结果模板'
|
link.download = '评估结果模板'
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
link.remove()
|
link.remove()
|
||||||
})
|
})
|
||||||
await setTimeout(() => {
|
await setTimeout(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
//导出
|
//导出
|
||||||
const exportReport = () => {
|
const exportReport = () => {
|
||||||
if (!result.value){
|
if (!result.value) {
|
||||||
ElMessage.warning('请先评估!')
|
ElMessage.warning('请先评估!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const loadingMessage = ElMessage({
|
|
||||||
message: '正在导出中',
|
|
||||||
icon: h(Loading),
|
|
||||||
duration: 0 // 不自动关闭
|
|
||||||
})
|
|
||||||
|
|
||||||
exportResult({}, currentNodeId.value ?? '').then((res: any) => {
|
|
||||||
let blob = new Blob([res], { // 注意使用 res.data 而不是 res
|
|
||||||
type: 'application/vnd.ms-excel'
|
|
||||||
})
|
|
||||||
const url = window.URL.createObjectURL(blob)
|
|
||||||
const link = document.createElement('a')
|
|
||||||
link.href = url
|
|
||||||
link.download = currentNodeName.value + '-评估结果.xls' // 建议添加文件扩展名
|
|
||||||
document.body.appendChild(link)
|
|
||||||
link.click()
|
|
||||||
link.remove()
|
|
||||||
window.URL.revokeObjectURL(url)
|
|
||||||
|
|
||||||
// 关闭加载提示并显示成功消息
|
|
||||||
loadingMessage.close()
|
|
||||||
ElMessage.success('导出成功!')
|
|
||||||
}).catch(error => {
|
|
||||||
// 处理导出失败情况
|
|
||||||
loadingMessage.close()
|
|
||||||
ElMessage.error('导出失败,请重试!')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
const loadingMessage = ElMessage({
|
||||||
|
message: '正在导出中',
|
||||||
|
icon: h(Loading),
|
||||||
|
duration: 0 // 不自动关闭
|
||||||
|
})
|
||||||
|
|
||||||
|
exportResult({}, currentNodeId.value ?? '')
|
||||||
|
.then((res: any) => {
|
||||||
|
let blob = new Blob([res], {
|
||||||
|
// 注意使用 res.data 而不是 res
|
||||||
|
type: 'application/vnd.ms-excel'
|
||||||
|
})
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = url
|
||||||
|
link.download = currentNodeName.value + '-评估结果.xls' // 建议添加文件扩展名
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click()
|
||||||
|
link.remove()
|
||||||
|
window.URL.revokeObjectURL(url)
|
||||||
|
|
||||||
|
// 关闭加载提示并显示成功消息
|
||||||
|
loadingMessage.close()
|
||||||
|
ElMessage.success('导出成功!')
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
// 处理导出失败情况
|
||||||
|
loadingMessage.close()
|
||||||
|
ElMessage.error('导出失败,请重试!')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
//导入
|
//导入
|
||||||
const handleImportClick = () => {
|
const handleImportClick = () => {
|
||||||
if (!currentNodeId.value) {
|
if (!currentNodeId.value) {
|
||||||
ElMessage.warning('请选择评估节点!')
|
ElMessage.warning('请选择评估节点!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
assessTemplate.value.open('导入背景数据', currentNodeId.value.toString())
|
assessTemplate.value.open('导入背景数据', currentNodeId.value.toString())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 导入弹窗关闭后通知父组件更新
|
// 导入弹窗关闭后通知父组件更新
|
||||||
const assess = async () => {
|
const assess = async () => {
|
||||||
// 展开评估结果
|
// 展开评估结果
|
||||||
@@ -192,71 +191,75 @@ const assess = async () => {
|
|||||||
currentNodeId.value = null // 先置空
|
currentNodeId.value = null // 先置空
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
currentNodeId.value = tempId // 再恢复,触发 watch
|
currentNodeId.value = tempId // 再恢复,触发 watch
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
//评估
|
//评估
|
||||||
const assess2 = async () => {
|
const assess2 = async () => {
|
||||||
// 显示导出中提示
|
// 显示导出中提示
|
||||||
const loading = ElMessage({
|
const loading = ElMessage({
|
||||||
message: '评估结果中',
|
message: '评估结果中',
|
||||||
icon: h(Loading),
|
icon: h(Loading),
|
||||||
duration: 0 // 不自动关闭
|
duration: 0 // 不自动关闭
|
||||||
})
|
})
|
||||||
|
|
||||||
userGetInfo({ assessId: currentNodeId.value }).then(res => {
|
userGetInfo({ assessId: currentNodeId.value })
|
||||||
// 获取昨天的日期
|
.then(res => {
|
||||||
const yesterday = new Date();
|
// 获取昨天的日期
|
||||||
yesterday.setDate(yesterday.getDate() - 1);
|
const yesterday = new Date()
|
||||||
|
yesterday.setDate(yesterday.getDate() - 1)
|
||||||
|
|
||||||
// 格式化为 yyyy-MM-dd
|
// 格式化为 yyyy-MM-dd
|
||||||
const yyyy = yesterday.getFullYear();
|
const yyyy = yesterday.getFullYear()
|
||||||
const mm = String(yesterday.getMonth() + 1).padStart(2, '0');
|
const mm = String(yesterday.getMonth() + 1).padStart(2, '0')
|
||||||
const dd = String(yesterday.getDate()).padStart(2, '0');
|
const dd = String(yesterday.getDate()).padStart(2, '0')
|
||||||
const yesterdayStr = `${yyyy}-${mm}-${dd}`;
|
const yesterdayStr = `${yyyy}-${mm}-${dd}`
|
||||||
|
|
||||||
const assessData = {
|
const assessData = {
|
||||||
assessId: currentNodeId.value,
|
assessId: currentNodeId.value,
|
||||||
endTime: `${yesterdayStr} 23:59:59`, // 使用动态的昨天日期
|
endTime: `${yesterdayStr} 23:59:59`, // 使用动态的昨天日期
|
||||||
id: res.data.lineId,
|
id: res.data.lineId,
|
||||||
startTime: `${yesterdayStr} 00:00:00` // 使用动态的昨天日期
|
startTime: `${yesterdayStr} 00:00:00` // 使用动态的昨天日期
|
||||||
};
|
}
|
||||||
|
|
||||||
assessResult(assessData).then(res => {
|
assessResult(assessData)
|
||||||
// 关闭加载提示并显示成功消息
|
.then(res => {
|
||||||
loading.close();
|
// 关闭加载提示并显示成功消息
|
||||||
ElMessage.success('评估成功!');
|
loading.close()
|
||||||
|
ElMessage.success('评估成功!')
|
||||||
|
|
||||||
// 展开评估结果
|
// 展开评估结果
|
||||||
collapseName.value = [2];
|
collapseName.value = [2]
|
||||||
// 更新评估状态
|
// 更新评估状态
|
||||||
result.value = true;
|
result.value = true
|
||||||
|
|
||||||
const tempId = currentNodeId.value;
|
const tempId = currentNodeId.value
|
||||||
currentNodeId.value = null; // 先置空
|
currentNodeId.value = null // 先置空
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
currentNodeId.value = tempId; // 再恢复,触发 watch
|
currentNodeId.value = tempId // 再恢复,触发 watch
|
||||||
}, 0);
|
}, 0)
|
||||||
}).catch(error => {
|
})
|
||||||
// 关闭加载提示并显示失败消息
|
.catch(error => {
|
||||||
loading.close();
|
// 关闭加载提示并显示失败消息
|
||||||
ElMessage.error('评估失败');
|
loading.close()
|
||||||
});
|
ElMessage.error('评估失败')
|
||||||
}).catch(error => {
|
})
|
||||||
// 处理 userGetInfo 的错误
|
})
|
||||||
loading.close();
|
.catch(error => {
|
||||||
ElMessage.error('获取用户信息失败');
|
// 处理 userGetInfo 的错误
|
||||||
});
|
loading.close()
|
||||||
};
|
ElMessage.error('获取用户信息失败')
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const dom = document.getElementById('navigation-splitpanes')
|
const dom = document.getElementById('navigation-splitpanes')
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (dom) {
|
if (dom) {
|
||||||
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||||
}
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
})
|
})
|
||||||
|
|
||||||
// 添加树组件的引用
|
// 添加树组件的引用
|
||||||
@@ -267,98 +270,96 @@ const currentTreeKey = ref<string | number | null>(null)
|
|||||||
const lastValidNodeKey = ref<string | number | null>(null)
|
const lastValidNodeKey = ref<string | number | null>(null)
|
||||||
|
|
||||||
const handleNodeClick = (data: any, node: any) => {
|
const handleNodeClick = (data: any, node: any) => {
|
||||||
// 阻止点击父节点的逻辑处理
|
// 阻止点击父节点的逻辑处理
|
||||||
if (!data ||
|
if (
|
||||||
(node && !node.isLeaf) ||
|
!data ||
|
||||||
(data.children && data.children.length > 0) ||
|
(node && !node.isLeaf) ||
|
||||||
(node && node.childNodes && node.childNodes.length > 0)) {
|
(data.children && data.children.length > 0) ||
|
||||||
|
(node && node.childNodes && node.childNodes.length > 0)
|
||||||
// 点击父节点时,保持树的高亮状态为上一次有效的子节点
|
) {
|
||||||
currentTreeKey.value = lastValidNodeKey.value
|
// 点击父节点时,保持树的高亮状态为上一次有效的子节点
|
||||||
return
|
currentTreeKey.value = lastValidNodeKey.value
|
||||||
}
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果点击的是同一个节点,不需要重新加载,但可以提供刷新功能
|
||||||
|
if (currentNodeId.value === data?.id) {
|
||||||
|
// 可选:如果你希望重复点击能刷新数据,可以保留下面的代码
|
||||||
|
// 否则可以直接 return 不做任何操作
|
||||||
|
infoLoading.value = true
|
||||||
|
outcomeLoading.value = true
|
||||||
|
// 强制触发子组件重新加载,通过先置空再恢复
|
||||||
|
const tempId = currentNodeId.value
|
||||||
|
currentNodeId.value = null
|
||||||
|
nextTick(() => {
|
||||||
|
currentNodeId.value = tempId
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// 如果点击的是同一个节点,不需要重新加载,但可以提供刷新功能
|
// 点击的是不同的子节点,更新高亮状态
|
||||||
if (currentNodeId.value === data?.id) {
|
lastValidNodeKey.value = data?.id || null
|
||||||
// 可选:如果你希望重复点击能刷新数据,可以保留下面的代码
|
currentTreeKey.value = lastValidNodeKey.value
|
||||||
// 否则可以直接 return 不做任何操作
|
dotList.value = data
|
||||||
|
currentNodeId.value = data?.id || null
|
||||||
|
currentNodeName.value = data?.name || ''
|
||||||
|
|
||||||
|
// ✅ 开启两个 loading
|
||||||
infoLoading.value = true
|
infoLoading.value = true
|
||||||
outcomeLoading.value = true
|
outcomeLoading.value = true
|
||||||
// 强制触发子组件重新加载,通过先置空再恢复
|
|
||||||
const tempId = currentNodeId.value
|
|
||||||
currentNodeId.value = null
|
|
||||||
nextTick(() => {
|
|
||||||
currentNodeId.value = tempId
|
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// 点击的是不同的子节点,更新高亮状态
|
|
||||||
lastValidNodeKey.value = data?.id || null
|
|
||||||
currentTreeKey.value = lastValidNodeKey.value
|
|
||||||
dotList.value = data
|
|
||||||
currentNodeId.value = data?.id || null
|
|
||||||
currentNodeName.value = data?.name || ''
|
|
||||||
|
|
||||||
// ✅ 开启两个 loading
|
|
||||||
infoLoading.value = true
|
|
||||||
outcomeLoading.value = true
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.splitpanes.default-theme .splitpanes__pane {
|
.splitpanes.default-theme .splitpanes__pane {
|
||||||
background: #eaeef1;
|
background: #eaeef1;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-collapse-item__header) {
|
:deep(.el-collapse-item__header) {
|
||||||
// font-family: AlimamaDongFangDaKai;
|
// font-family: AlimamaDongFangDaKai;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
&::before {
|
&::before {
|
||||||
content: '▍'; /* 添加星号 */
|
content: '▍'; /* 添加星号 */
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: var(--el-color-primary);
|
color: var(--el-color-primary);
|
||||||
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.actionButtons {
|
.actionButtons {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-container {
|
.loading-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
min-height: 100px; /* 防止空白时高度塌陷 */
|
min-height: 100px; /* 防止空白时高度塌陷 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-wrapper {
|
.loading-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-text {
|
.loading-text {
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.is-loading {
|
.is-loading {
|
||||||
animation: rotating 2s linear infinite;
|
animation: rotating 2s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes rotating {
|
@keyframes rotating {
|
||||||
0% {
|
0% {
|
||||||
transform: rotate(0deg);
|
transform: rotate(0deg);
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
transform: rotate(360deg);
|
transform: rotate(360deg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ml10 {
|
.ml10 {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<TableHeader date-picker area ref="TableHeaderRef">
|
<TableHeader date-picker area ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="对象类型">
|
<!-- <el-form-item label="对象类型">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.objType"
|
v-model="tableStore.table.params.objType"
|
||||||
clearable
|
clearable
|
||||||
@@ -16,6 +16,16 @@
|
|||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
</el-form-item> -->
|
||||||
|
<el-form-item label="运行状态">
|
||||||
|
<el-select v-model="tableStore.table.params.lineRunFlag" clearable placeholder="请选择运行状态">
|
||||||
|
<el-option
|
||||||
|
v-for="item in runFlagList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终端厂家:">
|
<el-form-item label="终端厂家:">
|
||||||
<el-select v-model="tableStore.table.params.manufacturer" clearable placeholder="请选择终端厂家">
|
<el-select v-model="tableStore.table.params.manufacturer" clearable placeholder="请选择终端厂家">
|
||||||
@@ -60,8 +70,8 @@
|
|||||||
{{
|
{{
|
||||||
isNaN((monitoringPoints.abnormalNum / monitoringPoints.runNum) * 100)
|
isNaN((monitoringPoints.abnormalNum / monitoringPoints.runNum) * 100)
|
||||||
? 0
|
? 0
|
||||||
: Math.floor((monitoringPoints.abnormalNum / monitoringPoints.runNum) * 10000) /
|
: Math.floor((monitoringPoints.abnormalNum / monitoringPoints.runNum) * 10000) /
|
||||||
100
|
100
|
||||||
}}%
|
}}%
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -99,13 +109,13 @@
|
|||||||
</el-segmented>
|
</el-segmented>
|
||||||
</div>
|
</div>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span style="width: 170px; text-align: left">指标名称</span>
|
<span style="width: 165px; text-align: left">指标名称</span>
|
||||||
<span style="flex: 1">合理范围</span>
|
<span style="flex: 1">合理范围</span>
|
||||||
<span style="width: 90px">异常测点数</span>
|
<span style="width: 80px">异常测点数</span>
|
||||||
</div>
|
</div>
|
||||||
<div :style="indicatorHeight" style="overflow-y: auto">
|
<div :style="indicatorHeight" style="overflow-y: auto">
|
||||||
<div v-for="o in abnormal.filter(item => item.remark == segmented)" class="abnormal mb10">
|
<div v-for="o in abnormal.filter(item => item.remark == segmented)" class="abnormal mb10">
|
||||||
<span style="width: 170px; height: 24px" class="iconDiv">
|
<span style="width: 165px; height: 24px" class="iconDiv">
|
||||||
<div :style="{ backgroundColor: o.ids.length > 0 ? '#FF9100' : '' }"></div>
|
<div :style="{ backgroundColor: o.ids.length > 0 ? '#FF9100' : '' }"></div>
|
||||||
{{ o.targetName }}
|
{{ o.targetName }}
|
||||||
</span>
|
</span>
|
||||||
@@ -113,7 +123,7 @@
|
|||||||
<!-- 合理范围: -->
|
<!-- 合理范围: -->
|
||||||
<span style="color: #388e3c" class="text">{{ o.rangeDesc }}</span>
|
<span style="color: #388e3c" class="text">{{ o.rangeDesc }}</span>
|
||||||
</span>
|
</span>
|
||||||
<span style="width: 90px; text-align: center">
|
<span style="width: 80px; text-align: center">
|
||||||
<span
|
<span
|
||||||
style="color: #388e3c"
|
style="color: #388e3c"
|
||||||
:class="` ${o.ids.length > 0 ? 'text-red' : ''}`"
|
:class="` ${o.ids.length > 0 ? 'text-red' : ''}`"
|
||||||
@@ -173,26 +183,26 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="monitorName" title="监测点名称"></vxe-column>
|
<vxe-column field="monitorName" title="监测点名称" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="manufacturer" title="终端厂家"></vxe-column>
|
<vxe-column field="manufacturer" title="终端厂家" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="devName" title="所属终端名称"></vxe-column>
|
<vxe-column field="devName" title="所属终端名称" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="ip" title="IP">
|
<vxe-column field="ip" title="IP">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ decryptFromBase64(row.ip) }}
|
{{ decryptFromBase64(row.ip) }}
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="stationName" title="所属电站"></vxe-column>
|
<vxe-column field="stationName" title="所属电站" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="objType" title="监测对象类型" :formatter="formatter"></vxe-column>
|
<vxe-column field="objType" title="监测对象类型" :formatter="formatter" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="objName" title="监测对象名称" :formatter="formatter"></vxe-column>
|
<vxe-column field="objName" title="监测对象名称" :formatter="formatter" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="voltageLevel" title="电压等级"></vxe-column>
|
<vxe-column field="voltageLevel" title="电压等级" minWidth="80px"></vxe-column>
|
||||||
<vxe-column field="abnormalDay" title="异常天数">
|
<vxe-column field="abnormalDay" title="异常天数" width="80px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<span class="table_name" @click="quantityClick(row, 1)">
|
<span class="table_name" @click="quantityClick(row, 1)">
|
||||||
{{ row.abnormalDay }}
|
{{ row.abnormalDay }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="abnormalDay" title="严重度">
|
<vxe-column field="abnormalDay" title="严重度" width="80px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag type="warning" v-if="row.severity == 0">预警</el-tag>
|
<el-tag type="warning" v-if="row.severity == 0">预警</el-tag>
|
||||||
<el-tag type="danger" v-if="row.severity == 1">告警</el-tag>
|
<el-tag type="danger" v-if="row.severity == 1">告警</el-tag>
|
||||||
@@ -256,6 +266,14 @@ const segmentedList = ref([
|
|||||||
num: 0
|
num: 0
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
//定义监测点运行状态下拉框数据
|
||||||
|
const runFlagList = [
|
||||||
|
{ id: 0, name: '运行' },
|
||||||
|
{ id: 1, name: '检修' },
|
||||||
|
{ id: 2, name: '停运' },
|
||||||
|
{ id: 3, name: '调试' },
|
||||||
|
{ id: 4, name: '退运' }
|
||||||
|
]
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/device-boot/dataVerify/getMonitorVerifyData',
|
url: '/device-boot/dataVerify/getMonitorVerifyData',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -467,7 +485,7 @@ tableStore.table.params.objType = ''
|
|||||||
tableStore.table.params.alarmDayLimit = 5
|
tableStore.table.params.alarmDayLimit = 5
|
||||||
tableStore.table.params.warnDayLimit = 1
|
tableStore.table.params.warnDayLimit = 1
|
||||||
tableStore.table.params.manufacturer = ''
|
tableStore.table.params.manufacturer = ''
|
||||||
|
tableStore.table.params.lineRunFlag = 0
|
||||||
const quantityClick = (e: any, num: number) => {
|
const quantityClick = (e: any, num: number) => {
|
||||||
if (num == 0 && e.ids?.length == 0) return
|
if (num == 0 && e.ids?.length == 0) return
|
||||||
anomalyDetailsRef.value.open(e, time.value, num)
|
anomalyDetailsRef.value.open(e, time.value, num)
|
||||||
@@ -518,6 +536,7 @@ 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,137 +1,177 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog draggable width="1550px" class="cn-operate-dialog" v-model="dialogVisible" :title="title">
|
<el-dialog draggable width="1550px" class="cn-operate-dialog" v-model="dialogVisible" :title="title">
|
||||||
<div style="display: flex">
|
<div style="display: flex" v-loading="loading">
|
||||||
<div :style="height1" class="mr10 box" style="width: 600px">
|
<div :style="height1" class="mr10 box" style="width: 600px">
|
||||||
<vxe-table
|
<vxe-table
|
||||||
height="auto"
|
height="auto"
|
||||||
:data="TableData"
|
:data="TableData"
|
||||||
v-bind="defaultAttribute"
|
v-bind="defaultAttribute"
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
:row-config="{ isCurrent: true, isHover: true }"
|
:row-config="{ isCurrent: true, isHover: true }"
|
||||||
@current-change="currentChangeEvent"
|
@current-change="currentChangeEvent"
|
||||||
>
|
>
|
||||||
<vxe-column type="seq" title="序号" width="60px"></vxe-column>
|
<vxe-column type="seq" title="序号" width="60px"></vxe-column>
|
||||||
<vxe-column field="date" title="日期"></vxe-column>
|
<vxe-column field="date" title="日期"></vxe-column>
|
||||||
<vxe-column field="bdName" title="所属电站(场站)" width="120px"></vxe-column>
|
<vxe-column field="bdName" title="所属电站(场站)" width="120px"></vxe-column>
|
||||||
<vxe-column field="monitorName" title="监测点名称" width="120px"></vxe-column>
|
<vxe-column field="monitorName" title="监测点名称" width="120px"></vxe-column>
|
||||||
<vxe-column field="timeSum" title="异常时间(分钟)" width="80px"></vxe-column>
|
<vxe-column field="timeSum" title="异常时间(分钟)" width="80px"></vxe-column>
|
||||||
<vxe-column field="errCount" title="异常次数" width="80px"></vxe-column>
|
<vxe-column field="errCount" title="异常次数" width="80px"></vxe-column>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div :style="height" style="width: 920px" v-loading="loading1">
|
<div :style="height" style="width: 920px" v-loading="loading1">
|
||||||
<vxe-table
|
<vxe-table
|
||||||
height="auto"
|
height="auto"
|
||||||
:data="TableData1.slice((pageNum - 1) * pageSize, pageNum * pageSize)"
|
:data="TableData1.slice((pageNum - 1) * pageSize, pageNum * pageSize)"
|
||||||
v-bind="defaultAttribute"
|
v-bind="defaultAttribute"
|
||||||
>
|
>
|
||||||
<vxe-column type="seq" title="序号" width="80px">
|
<vxe-column type="seq" title="序号" width="80px">
|
||||||
<template #default="{ rowIndex }">
|
<template #default="{ rowIndex }">
|
||||||
<span>{{ (pageNum - 1) * pageSize + rowIndex + 1 }}</span>
|
<span>{{ (pageNum - 1) * pageSize + rowIndex + 1 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="time" title="时间" width="150px"></vxe-column>
|
<vxe-column field="time" title="时间" width="150px"></vxe-column>
|
||||||
<vxe-column field="targetName" title="指标类型" min-width="80px"></vxe-column>
|
<vxe-column field="targetName" title="指标类型" min-width="80px"></vxe-column>
|
||||||
<vxe-column field="phaseType" title="相别" width="60px">
|
<vxe-column field="phaseType" title="相别" width="60px">
|
||||||
<template v-slot="{ row }">
|
<template v-slot="{ row }">
|
||||||
{{ row.phaseType=='T'?'/':row.phaseType }}
|
{{ row.phaseType == 'T' ? '/' : row.phaseType }}
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="rangeDesc" title="合理范围" min-width="90px"></vxe-column>
|
<vxe-column field="rangeDesc" title="合理范围" min-width="90px"></vxe-column>
|
||||||
<vxe-column field="max" title="最大" width="85px" :formatter="formatter"></vxe-column>
|
<vxe-column
|
||||||
<vxe-column field="min" title="最小" width="85px" :formatter="formatter"></vxe-column>
|
field="max"
|
||||||
<vxe-column field="avg" title="平均" width="85px" :formatter="formatter"></vxe-column>
|
title="最大"
|
||||||
<vxe-column field="cp95" title="CP95" width="85px" :formatter="formatter"></vxe-column>
|
width="85px"
|
||||||
</vxe-table>
|
:formatter="formatter"
|
||||||
<div class="table-pagination">
|
v-if="showColumn"
|
||||||
<el-pagination
|
></vxe-column>
|
||||||
v-model:currentPage="pageNum"
|
<vxe-column
|
||||||
v-model:page-size="pageSize"
|
field="min"
|
||||||
:page-sizes="[10, 20, 50, 100, 200]"
|
title="最小"
|
||||||
background
|
width="85px"
|
||||||
layout="sizes,total, ->, prev, pager, next, jumper"
|
:formatter="formatter"
|
||||||
:total="TableData1.length"
|
v-if="showColumn"
|
||||||
></el-pagination>
|
></vxe-column>
|
||||||
</div>
|
<vxe-column
|
||||||
</div>
|
field="avg"
|
||||||
</div>
|
title="平均"
|
||||||
</el-dialog>
|
width="85px"
|
||||||
</template>
|
:formatter="formatter"
|
||||||
<script lang="ts" setup>
|
v-if="showColumn"
|
||||||
import { ref, inject } from 'vue'
|
></vxe-column>
|
||||||
import { reactive } from 'vue'
|
<vxe-column
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
field="cp95"
|
||||||
import { ElMessage } from 'element-plus'
|
title="CP95"
|
||||||
import { monitorAbnormalTable, monitorAbnormalTableDetail } from '@/api/device-boot/dataVerify'
|
width="85px"
|
||||||
import { mainHeight } from '@/utils/layout'
|
:formatter="formatter"
|
||||||
const dialogVisible = ref(false)
|
v-if="showColumn"
|
||||||
const height1 = mainHeight(-110, 2)
|
></vxe-column>
|
||||||
const height = mainHeight(10, 2)
|
<vxe-column
|
||||||
const tableRef = ref()
|
field="featureAmplitude"
|
||||||
const title = ref('')
|
title="幅值"
|
||||||
const loading1 = ref(false)
|
width="85px"
|
||||||
const TableData = ref([])
|
:formatter="formatter"
|
||||||
const TableData1 = ref([])
|
v-if="!showColumn"
|
||||||
const pageNum = ref(1)
|
></vxe-column>
|
||||||
const pageSize = ref(20)
|
</vxe-table>
|
||||||
const numKey = ref(0)
|
<div class="table-pagination">
|
||||||
const targetKey = ref('')
|
<el-pagination
|
||||||
const open = (data: anyObj, time: string[], num: number) => {
|
v-model:currentPage="pageNum"
|
||||||
// title.value = (num == 0 ? data.targetName : data.monitorName) + '_异常监测点详情'
|
v-model:page-size="pageSize"
|
||||||
title.value ='异常监测点详情'
|
:page-sizes="[10, 20, 50, 100, 200]"
|
||||||
TableData.value = []
|
background
|
||||||
numKey.value = num
|
layout="sizes,total, ->, prev, pager, next, jumper"
|
||||||
targetKey.value = data.key
|
:total="TableData1.length"
|
||||||
monitorAbnormalTable({
|
></el-pagination>
|
||||||
monitorIds: num == 0 ? data.ids : [data.monitorId],
|
</div>
|
||||||
targetKey: num == 0 ? data.key : '',
|
</div>
|
||||||
searchBeginTime: time[0],
|
</div>
|
||||||
searchEndTime: time[1]
|
</el-dialog>
|
||||||
}).then(res => {
|
</template>
|
||||||
TableData.value = res.data
|
<script lang="ts" setup>
|
||||||
tableRef.value.setCurrentRow(TableData.value[0])
|
import { ref, inject } from 'vue'
|
||||||
currentChangeEvent()
|
import { reactive } from 'vue'
|
||||||
})
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
dialogVisible.value = true
|
import { ElMessage } from 'element-plus'
|
||||||
}
|
import { monitorAbnormalTable, monitorAbnormalTableDetail } from '@/api/device-boot/dataVerify'
|
||||||
const currentChangeEvent = () => {
|
import { mainHeight } from '@/utils/layout'
|
||||||
loading1.value = true
|
const dialogVisible = ref(false)
|
||||||
let data = tableRef.value.getCurrentRecord()
|
const height1 = mainHeight(-110, 2)
|
||||||
TableData1.value = []
|
const height = mainHeight(10, 2)
|
||||||
monitorAbnormalTableDetail({
|
const tableRef = ref()
|
||||||
monitorIds: [data.monitorId],
|
const title = ref('')
|
||||||
searchBeginTime: data.date,
|
const loading = ref(false)
|
||||||
targetKey: numKey.value == 0 ? targetKey.value : ''
|
const loading1 = ref(false)
|
||||||
})
|
const TableData = ref([])
|
||||||
.then(res => {
|
const TableData1 = ref([])
|
||||||
TableData1.value = res.data
|
const pageNum = ref(1)
|
||||||
loading1.value = false
|
const pageSize = ref(20)
|
||||||
pageNum.value = 1
|
const numKey = ref(0)
|
||||||
})
|
const targetKey = ref('')
|
||||||
.catch(() => {
|
const showColumn = ref(true)
|
||||||
loading1.value = false
|
const open = (data: anyObj, time: string[], num: number) => {
|
||||||
})
|
// title.value = (num == 0 ? data.targetName : data.monitorName) + '_异常监测点详情'
|
||||||
}
|
loading.value = true
|
||||||
const formatter = (row: any) => {
|
title.value = '异常监测点详情'
|
||||||
return row.cellValue == null ? '/' : (row.cellValue - 0).toFixed(2)
|
TableData.value = []
|
||||||
}
|
numKey.value = num
|
||||||
defineExpose({ open })
|
targetKey.value = data.key
|
||||||
</script>
|
monitorAbnormalTable({
|
||||||
<style lang="scss" scoped>
|
monitorIds: num == 0 ? data.ids : [data.monitorId],
|
||||||
.table-pagination {
|
targetKey: num == 0 ? data.key : '',
|
||||||
height: 58px;
|
searchBeginTime: time[0],
|
||||||
box-sizing: border-box;
|
searchEndTime: time[1]
|
||||||
width: 100%;
|
})
|
||||||
max-width: 100%;
|
.then(async res => {
|
||||||
background-color: var(--ba-bg-color-overlay);
|
TableData.value = res.data
|
||||||
padding: 13px 15px;
|
await tableRef.value.setCurrentRow(TableData.value[0])
|
||||||
border-left: 1px solid #e4e7e9;
|
await currentChangeEvent()
|
||||||
border-right: 1px solid #e4e7e9;
|
loading.value = false
|
||||||
border-bottom: 1px solid #e4e7e9;
|
})
|
||||||
}
|
.catch(() => {
|
||||||
:deep(.box) {
|
loading.value = false
|
||||||
.row--current {
|
})
|
||||||
background-color: var(--el-color-primary-light-8) !important;
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
}
|
const currentChangeEvent = () => {
|
||||||
</style>
|
loading1.value = true
|
||||||
|
let data = tableRef.value.getCurrentRecord()
|
||||||
|
TableData1.value = []
|
||||||
|
monitorAbnormalTableDetail({
|
||||||
|
monitorIds: [data.monitorId],
|
||||||
|
searchBeginTime: data.date,
|
||||||
|
targetKey: numKey.value == 0 ? targetKey.value : ''
|
||||||
|
})
|
||||||
|
.then(res => {
|
||||||
|
TableData1.value = res.data
|
||||||
|
showColumn.value = res.data[0]?.featureAmplitude == null ? true : false
|
||||||
|
loading1.value = false
|
||||||
|
pageNum.value = 1
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
loading1.value = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const formatter = (row: any) => {
|
||||||
|
return row.cellValue == null ? '/' : (row.cellValue - 0).toFixed(2)
|
||||||
|
}
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.table-pagination {
|
||||||
|
height: 58px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
background-color: var(--ba-bg-color-overlay);
|
||||||
|
padding: 13px 15px;
|
||||||
|
border-left: 1px solid #e4e7e9;
|
||||||
|
border-right: 1px solid #e4e7e9;
|
||||||
|
border-bottom: 1px solid #e4e7e9;
|
||||||
|
}
|
||||||
|
:deep(.box) {
|
||||||
|
.row--current {
|
||||||
|
// background-color: var(--el-color-primary-light-8) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
121
src/views/pqs/runManage/runEvaluate/components/statistics_JB.vue
Normal file
121
src/views/pqs/runManage/runEvaluate/components/statistics_JB.vue
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
<template>
|
||||||
|
<div style="height: 145px" class="box1">
|
||||||
|
<!-- <div class="boxDiv hexagon">
|
||||||
|
<div class="text-style" @click="change('')">{{ props.params.allNum }}</div>
|
||||||
|
<div class="mt10 divBot">总数</div>
|
||||||
|
</div>
|
||||||
|
<div class="boxDiv hexagon hexagon1">
|
||||||
|
<div class="text-style" @click="change('运行')">{{ props.params.runNum }}</div>
|
||||||
|
<div class="mt10 divBot">在运</div>
|
||||||
|
</div>
|
||||||
|
<div class="boxDiv hexagon hexagon2">
|
||||||
|
<div class="text-style" @click="change('调试')">{{ props.params.checkNum }}</div>
|
||||||
|
<div class="mt10 divBot">调试</div>
|
||||||
|
</div>
|
||||||
|
<div class="boxDiv hexagon hexagon3">
|
||||||
|
<div class="text-style" @click="change('停运')">{{ props.params.stopRunNum }}</div>
|
||||||
|
<div class="mt10 divBot">停运</div>
|
||||||
|
</div> -->
|
||||||
|
<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" @click="change('')">
|
||||||
|
{{ props.params.allNum }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="divBox div2" style="width: 210px">
|
||||||
|
<span class="iconfont icon-zaiyunshebei" style="color: #67c23a"></span>
|
||||||
|
<span class="divBox_title">在运终端数</span>
|
||||||
|
<span class="divBox_num text-style" style="color: #67c23a" @click="change('运行')">
|
||||||
|
{{ props.params.runNum }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="statistics">
|
||||||
|
<div class="divBox div3">
|
||||||
|
<span class="iconfont icon-yichanglei_14feizhinengbiaozaiyunyichang" style="color: #ffbf00"></span>
|
||||||
|
<span class="divBox_title">调试终端数</span>
|
||||||
|
<span class="divBox_num text-style" style="color: #ffbf00" @click="change('调试')">
|
||||||
|
{{ props.params.checkNum }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="divBox div4" style="width: 210px">
|
||||||
|
<span class="iconfont icon-tingyunshijianguanli" style="color: #f56c6c"></span>
|
||||||
|
<span class="divBox_title">停运终端数</span>
|
||||||
|
<span class="divBox_num text-style" style="color: #f56c6c" @click="change('停运')">
|
||||||
|
{{ props.params.stopRunNum }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
|
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||||
|
import { mainHeight } from '@/utils/layout'
|
||||||
|
import { color } from '@/components/echarts/color'
|
||||||
|
const emit = defineEmits(['change'])
|
||||||
|
const height = mainHeight(330, 3)
|
||||||
|
const props = defineProps({
|
||||||
|
params: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const change = (e: string) => {
|
||||||
|
emit('change', e)
|
||||||
|
}
|
||||||
|
const info = () => {}
|
||||||
|
onMounted(() => {
|
||||||
|
info()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
@import '@/assets/font/iconfont.css';
|
||||||
|
.statistics {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
.divBox {
|
||||||
|
width: 210px;
|
||||||
|
height: 70px;
|
||||||
|
padding: 10px;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.text-style {
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
</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" clearable placeholder="请输入终端名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div class="card-list pt10" v-loading="tableStore.table.loading">
|
<div class="card-list pt10" v-loading="tableStore.table.loading">
|
||||||
<div class="monitoringPoints">
|
<div class="monitoringPoints">
|
||||||
<el-card style="height: 200px">
|
<el-card style="height: 215px">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<span>终端统计</span>
|
<span>终端统计</span>
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
<span style="width: 90px">终端总数</span>
|
<span style="width: 90px">终端总数</span>
|
||||||
<span style="flex: 1">完整性(%)</span>
|
<span style="flex: 1">完整性(%)</span>
|
||||||
<span style="width: 80px">在线率(%)</span>
|
<span style="width: 80px">在线率(%)</span>
|
||||||
<span style="width: 80px">合格率(%)</span>
|
<span style="width: 80px">异常率(%)</span>
|
||||||
</div>
|
</div>
|
||||||
<div :style="indicatorHeight" style="overflow-y: auto">
|
<div :style="indicatorHeight" style="overflow-y: auto">
|
||||||
<div v-for="o in abnormal" class="abnormal mb10">
|
<div v-for="o in abnormal" class="abnormal mb10">
|
||||||
@@ -86,22 +86,22 @@
|
|||||||
</span>
|
</span>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<span
|
<span
|
||||||
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' : ''}`"
|
||||||
>
|
>
|
||||||
{{ o.integrity }}
|
{{ o.integrity }}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
style="width: 80px; color: #388e3c"
|
style="width: 80px; color: #388e3c"
|
||||||
:class="` ${o.online < 90 ? 'text-red' : ''}`"
|
:class="` ${o.online < 90 ? 'text-red' : ''}`"
|
||||||
class="text"
|
class="text"
|
||||||
>
|
>
|
||||||
{{ o.online }}
|
{{ o.online }}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
style="width: 80px; color: #388e3c"
|
style="width: 80px; color: #388e3c"
|
||||||
:class="` ${o.qualified < 90 ? 'text-red' : ''}`"
|
:class="` ${o.qualified > 10 ? 'text-red' : ''}`"
|
||||||
class="text"
|
class="text"
|
||||||
>
|
>
|
||||||
{{ o.qualified }}
|
{{ o.qualified }}
|
||||||
@@ -138,12 +138,12 @@
|
|||||||
</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="subName" title="变电站"></vxe-column>
|
<vxe-column field="subName" title="变电站" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="manufacturer" title="终端厂家"></vxe-column>
|
<vxe-column field="manufacturer" title="终端厂家" minWidth="110px"></vxe-column>
|
||||||
<vxe-column field="name" title="终端名称"></vxe-column>
|
<vxe-column field="name" 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="130px" ></vxe-column>
|
||||||
<vxe-column field="runFlag" title="运行状态" width="100px">
|
<vxe-column field="runFlag" title="运行状态" width="100px">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag
|
<el-tag
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="integrityRate" title="完整性(%)" width="100px"></vxe-column>
|
<vxe-column field="integrityRate" title="完整性(%)" width="100px"></vxe-column>
|
||||||
<vxe-column field="onLineRate" title="在线率(%)" width="100px"></vxe-column>
|
<vxe-column field="onLineRate" title="在线率(%)" width="100px"></vxe-column>
|
||||||
<vxe-column field="passRate" title="合格率(%)" width="100px"></vxe-column>
|
<vxe-column field="passRate" title="异常率(%)" width="100px"></vxe-column>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-pagination">
|
<div class="table-pagination">
|
||||||
@@ -191,7 +191,7 @@ import { onMounted, provide, ref } 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'
|
||||||
import statistics from './components/statistics.vue'
|
import statistics from './components/statistics_JB.vue'
|
||||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||||
import { getMonitorVerifyDay } from '@/api/device-boot/dataVerify'
|
import { getMonitorVerifyDay } from '@/api/device-boot/dataVerify'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
@@ -201,7 +201,7 @@ defineOptions({
|
|||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
//字典获取监督对象类型
|
//字典获取监督对象类型
|
||||||
const pageHeight = mainHeight(97)
|
const pageHeight = mainHeight(97)
|
||||||
const indicatorHeight = mainHeight(447)
|
const indicatorHeight = mainHeight(462)
|
||||||
const monitoringPoints = ref({
|
const monitoringPoints = ref({
|
||||||
runNum: 0,
|
runNum: 0,
|
||||||
abnormalNum: 0,
|
abnormalNum: 0,
|
||||||
@@ -269,7 +269,13 @@ const tableStore = 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 != '非上送国网'
|
||||||
|
}
|
||||||
|
})
|
||||||
// 合并子集数据 并去重
|
// 合并子集数据 并去重
|
||||||
|
|
||||||
totalTable(101, '')
|
totalTable(101, '')
|
||||||
@@ -404,7 +410,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 || '/'
|
||||||
@@ -423,7 +430,7 @@ const totalTable = (num: number, t: string) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const change = (e: string) => {
|
const change = (e: string) => {
|
||||||
title.value = e==''?'' : e+'_'
|
title.value = e == '' ? '' : e + '_'
|
||||||
loading.value = true
|
loading.value = true
|
||||||
pageNum.value = 1
|
pageNum.value = 1
|
||||||
dataList.value = []
|
dataList.value = []
|
||||||
@@ -484,7 +491,7 @@ provide('tableStore', tableStore)
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
.divBox {
|
.divBox {
|
||||||
width: 200px;
|
width: 215x;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,25 +1,29 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 用户投诉 -->
|
<!-- 用户投诉 -->
|
||||||
<!-- 2 有新增 发起 预警单 -->
|
<!-- 2 有新增 发起 预警单 -->
|
||||||
|
|
||||||
<TableHeader area nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
<TableHeader area nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="是否解决">
|
<el-form-item label="是否解决">
|
||||||
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
||||||
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
|
<el-option
|
||||||
:value="item.value"></el-option>
|
v-for="item in dealStateList"
|
||||||
</el-select>
|
:key="item.value"
|
||||||
</el-form-item>
|
:label="item.label"
|
||||||
</template>
|
:value="item.value"
|
||||||
<template v-slot:operation>
|
></el-option>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
</el-select>
|
||||||
</template>
|
</el-form-item>
|
||||||
</TableHeader>
|
</template>
|
||||||
<Table ref="tableRef" />
|
<template v-slot:operation>
|
||||||
<!-- 新增 -->
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||||
<complaintsForm ref="formRef" @onSubmit="tableStore.index()" />
|
</template>
|
||||||
<!-- 详情 -->
|
</TableHeader>
|
||||||
<detail ref="detailRef" />
|
<Table ref="tableRef" />
|
||||||
|
<!-- 新增 -->
|
||||||
|
<complaintsForm ref="formRef" @onSubmit="tableStore.index()" />
|
||||||
|
<!-- 详情 -->
|
||||||
|
<detail ref="detailRef" />
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
@@ -31,7 +35,8 @@ import { useDictData } from '@/stores/dictData'
|
|||||||
import complaintsForm from './form/complaintsForm.vue'
|
import complaintsForm from './form/complaintsForm.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { sureInitiateWarningLeaflet } from '@/api/process-boot/electricitymanagement'
|
import { sureInitiateWarningLeaflet } from '@/api/process-boot/electricitymanagement'
|
||||||
import detail from './complaintsDetail.vue';
|
import detail from './complaintsDetail.vue'
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
// Steady_Statis
|
// Steady_Statis
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const exceeded = dictData.getBasicData('Steady_Statis')
|
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||||
@@ -42,169 +47,163 @@ const TableHeaderRef = ref()
|
|||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
const router = useRouter() // 路由对象
|
const router = useRouter() // 路由对象
|
||||||
const dealStateList = ref([
|
const dealStateList = ref([
|
||||||
{
|
{
|
||||||
label: '未解决',
|
label: '未解决',
|
||||||
value: '0'
|
value: '0'
|
||||||
},
|
}
|
||||||
|
|
||||||
])
|
])
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/SupervisionUserComplaint/list',
|
url: '/supervision-boot/SupervisionUserComplaint/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
filename:'用户投诉',
|
filename: '用户投诉',
|
||||||
column: [
|
column: [
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
|
|
||||||
align: 'center',
|
|
||||||
width: 80,
|
|
||||||
formatter: (row: any) => {
|
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ field: 'userName', title: '用户名称' },
|
|
||||||
{ field: 'userNumber', title: '用户编号' },
|
|
||||||
{ field: 'dutyOrgName', title: '负责单位', minWidth: '80' },
|
|
||||||
// { field: 'userCategory', title: '用户类别' },
|
|
||||||
|
|
||||||
{ field: 'complaintText', title: '投诉内容' },
|
|
||||||
{ field: 'steadyIndicator', title: '稳态指标' },
|
|
||||||
{ field: 'transientIndicators', title: '暂态指标' },
|
|
||||||
{
|
|
||||||
field: 'monitorName',
|
|
||||||
title: '监测点名称',
|
|
||||||
formatter: (row: any) => {
|
|
||||||
return row.cellValue ? row.cellValue : '/'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'detectionFlag',
|
|
||||||
title: '是否实现监测',
|
|
||||||
|
|
||||||
render: 'tag',
|
|
||||||
custom: {
|
|
||||||
0: 'warning',
|
|
||||||
1: 'primary',
|
|
||||||
|
|
||||||
},
|
|
||||||
replaceValue: {
|
|
||||||
0: '否',
|
|
||||||
1: '是',
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
field: 'createBy',
|
|
||||||
title: '填报人',
|
|
||||||
minWidth: 80,
|
|
||||||
formatter: (row: any) => {
|
|
||||||
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'dealState',
|
|
||||||
title: '是否解决',
|
|
||||||
|
|
||||||
render: 'tag',
|
|
||||||
custom: {
|
|
||||||
0: 'warning',
|
|
||||||
1: 'primary',
|
|
||||||
null: 'info'
|
|
||||||
},
|
|
||||||
replaceValue: {
|
|
||||||
0: '未解决',
|
|
||||||
1: '已解决',
|
|
||||||
null: '/'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
minWidth: 120,
|
|
||||||
align: 'center',
|
|
||||||
render: 'buttons',
|
|
||||||
buttons: [
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
title: '序号',
|
||||||
title: '发起告警单',
|
|
||||||
type: 'warning',
|
|
||||||
icon: 'el-icon-Open',
|
|
||||||
render: 'basicButton',
|
|
||||||
disabled: row => {
|
|
||||||
return row.dealState != 0
|
|
||||||
},
|
|
||||||
// popconfirm: {
|
|
||||||
// confirmButtonText: '确认',
|
|
||||||
// cancelButtonText: '取消',
|
|
||||||
// confirmButtonType: 'primary',
|
|
||||||
// title: '请确认发起告警单!'
|
|
||||||
// },
|
|
||||||
click: async row => {
|
|
||||||
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消',
|
|
||||||
|
|
||||||
inputType: 'textarea',
|
align: 'center',
|
||||||
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
width: 80,
|
||||||
inputErrorMessage: '请输入整改意见'
|
formatter: (row: any) => {
|
||||||
})
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
sureInitiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => {
|
}
|
||||||
ElMessage.success('发起告警单成功!')
|
},
|
||||||
tableStore.index()
|
{ field: 'userName', title: '用户名称' },
|
||||||
})
|
{ field: 'userNumber', title: '用户编号' },
|
||||||
|
{ field: 'dutyOrgName', title: '负责单位', minWidth: '80' },
|
||||||
|
// { field: 'userCategory', title: '用户类别' },
|
||||||
|
|
||||||
}
|
{ field: 'complaintText', title: '投诉内容' },
|
||||||
|
{ field: 'steadyIndicator', title: '稳态指标' },
|
||||||
|
{ field: 'transientIndicators', title: '暂态指标' },
|
||||||
|
{
|
||||||
|
field: 'monitorName',
|
||||||
|
title: '监测点名称',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue ? row.cellValue : '/'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
field: 'detectionFlag',
|
||||||
title: '详情',
|
title: '是否实现监测',
|
||||||
type: 'primary',
|
|
||||||
icon: 'el-icon-Open',
|
|
||||||
render: 'basicButton',
|
|
||||||
disabled: row => {
|
|
||||||
return row.dealState == 0
|
|
||||||
},
|
|
||||||
|
|
||||||
click: row => {
|
render: 'tag',
|
||||||
detailRef.value.open({
|
custom: {
|
||||||
row: row,
|
0: 'warning',
|
||||||
title: '详情',
|
1: 'primary'
|
||||||
|
},
|
||||||
|
replaceValue: {
|
||||||
|
0: '否',
|
||||||
|
1: '是'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
})
|
{
|
||||||
|
field: 'createBy',
|
||||||
}
|
title: '填报人',
|
||||||
|
minWidth: 80,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return dictData.state.userList.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
field: 'dealState',
|
||||||
title: '查看告警单',
|
title: '是否解决',
|
||||||
type: 'primary',
|
|
||||||
icon: 'el-icon-Open',
|
render: 'tag',
|
||||||
render: 'basicButton',
|
custom: {
|
||||||
disabled: row => {
|
0: 'warning',
|
||||||
return row.initiateWarningFlag == 0
|
1: 'primary',
|
||||||
},
|
null: 'info'
|
||||||
click: row => {
|
},
|
||||||
router.push({
|
replaceValue: {
|
||||||
name: 'supervision/supervision/manage',
|
0: '未解决',
|
||||||
query: {
|
1: '已解决',
|
||||||
type: 1,
|
null: '/'
|
||||||
t: Date.now()
|
}
|
||||||
}
|
},
|
||||||
})
|
{
|
||||||
}
|
title: '操作',
|
||||||
|
minWidth: 120,
|
||||||
|
align: 'center',
|
||||||
|
render: 'buttons',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '发起告警单',
|
||||||
|
type: 'warning',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.dealState != 0
|
||||||
|
},
|
||||||
|
// popconfirm: {
|
||||||
|
// confirmButtonText: '确认',
|
||||||
|
// cancelButtonText: '取消',
|
||||||
|
// confirmButtonType: 'primary',
|
||||||
|
// title: '请确认发起告警单!'
|
||||||
|
// },
|
||||||
|
click: async row => {
|
||||||
|
const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
|
||||||
|
inputType: 'textarea',
|
||||||
|
inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
|
inputErrorMessage: '请输入整改意见'
|
||||||
|
})
|
||||||
|
sureInitiateWarningLeaflet({ id: row.id, reformAdvice: value }).then(res => {
|
||||||
|
ElMessage.success('发起告警单成功!')
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '详情',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.dealState == 0
|
||||||
|
},
|
||||||
|
|
||||||
|
click: row => {
|
||||||
|
detailRef.value.open({
|
||||||
|
row: row,
|
||||||
|
title: '详情'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '查看告警单',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Open',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.initiateWarningFlag == 0
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
router.push({
|
||||||
|
name: 'supervision/supervision/manage' + (VITE_FLAG ? '4' : ''),
|
||||||
|
query: {
|
||||||
|
type: 4,
|
||||||
|
t: Date.now()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
}
|
beforeSearchFun: () => {
|
||||||
],
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
beforeSearchFun: () => {
|
},
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
exportProcessingData: () => {
|
||||||
},
|
|
||||||
exportProcessingData: () => {
|
|
||||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||||
item.dealState =item.dealState==0?'未解决':item.dealState==1?'已解决':'/'
|
item.dealState = item.dealState == 0 ? '未解决' : item.dealState == 1 ? '已解决' : '/'
|
||||||
item.detectionFlag=item.detectionFlag==0?'否':item.detectionFlag==1?'是':'/'
|
item.detectionFlag = item.detectionFlag == 0 ? '否' : item.detectionFlag == 1 ? '是' : '/'
|
||||||
|
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -213,11 +212,11 @@ const tableStore = new TableStore({
|
|||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
tableStore.table.params.dealState = ''
|
tableStore.table.params.dealState = ''
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
// 新增
|
// 新增
|
||||||
const add = () => {
|
const add = () => {
|
||||||
formRef.value.open({ text: '新增投诉' })
|
formRef.value.open({ text: '新增投诉' })
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ const dialogVisible = ref(false)
|
|||||||
const title: any = ref('')
|
const title: any = ref('')
|
||||||
const industry = dictData.getBasicData('Business_Type')
|
const industry = dictData.getBasicData('Business_Type')
|
||||||
const form: any = ref({})
|
const form: any = ref({})
|
||||||
const exceeded = dictData.getBasicData('Indicator_Type')
|
const exceeded = dictData.getBasicData('Steady_Statis')
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const resetForm = () => {
|
const resetForm = () => {
|
||||||
form.value = {
|
form.value = {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog draggable v-model="dialogVisible" v-loading="loading" :title="title" width="80%" :before-close="handleClose">
|
<el-dialog draggable v-model="dialogVisible" :title="title" width="80%" :before-close="handleClose">
|
||||||
<div style="height: 45vh">
|
<div style="height: 45vh" v-loading="loading">
|
||||||
<vxe-table show-overflow v-bind="defaultAttribute" :data="List">
|
<vxe-table show-overflow v-bind="defaultAttribute" :data="List">
|
||||||
<vxe-column field="time" title="日期" width="230px"></vxe-column>
|
<vxe-column field="time" title="日期" width="230px"></vxe-column>
|
||||||
<vxe-column field="overLimitInfo" title="越限详情"></vxe-column>
|
<vxe-column field="overLimitInfo" title="越限详情"></vxe-column>
|
||||||
|
|||||||
@@ -1,94 +1,94 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <div>1 监测点信息 发起预告警单 </div> -->
|
<!-- <div>1 监测点信息 发起预告警单 </div> -->
|
||||||
|
|
||||||
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef" showExport>
|
<TableHeader datePicker nextFlag theCurrentTime ref="TableHeaderRef" showExport>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="区域">
|
<el-form-item label="区域">
|
||||||
<Area ref="areaRef" v-model="tableStore.table.params.deptId" @changeValue="changeArea"/>
|
<Area ref="areaRef" v-model="tableStore.table.params.deptId" @changeValue="changeArea" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="监测点性质">
|
<el-form-item label="监测点性质">
|
||||||
<el-select v-model="tableStore.table.params.lineType" clearable placeholder="请选择监测点性质">
|
<el-select v-model="tableStore.table.params.lineType" clearable placeholder="请选择监测点性质">
|
||||||
<el-option label="电网侧" value="0"/>
|
<el-option label="电网侧" value="0" />
|
||||||
<el-option label="非电网侧" value="1"/>
|
<el-option label="非电网侧" value="1" />
|
||||||
</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.targetList"
|
v-model="tableStore.table.params.targetList"
|
||||||
clearable
|
clearable
|
||||||
multiple
|
multiple
|
||||||
collapse-tags
|
collapse-tags
|
||||||
collapse-tags-tooltip
|
collapse-tags-tooltip
|
||||||
placeholder="请选择超标指标"
|
placeholder="请选择超标指标"
|
||||||
>
|
>
|
||||||
<el-option v-for="item in exceeded" :key="item.id" :label="item.name" :value="item.id"/>
|
<el-option v-for="item in exceeded" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="数据类型">
|
<el-form-item label="数据类型">
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="tableStore.table.params.dataType"
|
v-model="tableStore.table.params.dataType"
|
||||||
inline-prompt
|
inline-prompt
|
||||||
active-value="1"
|
active-value="1"
|
||||||
inactive-value="0"
|
inactive-value="0"
|
||||||
active-text="超标数据"
|
active-text="超标数据"
|
||||||
inactive-text="无数据"
|
inactive-text="无数据"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="预警阈值">
|
<el-form-item label="预警阈值">
|
||||||
<!-- <el-input v-model="tableStore.table.params.alertThreshold" placeholder="请输入预警阈值" clearable></el-input> -->
|
<!-- <el-input v-model="tableStore.table.params.alertThreshold" placeholder="请输入预警阈值" clearable></el-input> -->
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="tableStore.table.params.alertThreshold"
|
v-model="tableStore.table.params.alertThreshold"
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
step-strictly
|
step-strictly
|
||||||
@change="changeAlert"
|
@change="changeAlert"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="告警阈值">
|
<el-form-item label="告警阈值">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="tableStore.table.params.alarmThreshold"
|
v-model="tableStore.table.params.alarmThreshold"
|
||||||
:min="0"
|
:min="0"
|
||||||
:step="1"
|
:step="1"
|
||||||
step-strictly
|
step-strictly
|
||||||
@change="changeAlarm"
|
@change="changeAlarm"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="搜索">
|
<!-- <el-form-item label="搜索">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
placeholder="输入变电站、终端、监测点名称"
|
placeholder="输入变电站、终端、监测点名称"
|
||||||
clearable
|
clearable
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起预警单')">
|
<el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起预警单')">
|
||||||
发起预警单
|
发起预警单
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起告警单')">
|
<el-button icon="el-icon-Plus" :disabled="flag != '2'" type="primary" @click="launch('发起告警单')">
|
||||||
发起告警单
|
发起告警单
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef"/>
|
<Table ref="tableRef" />
|
||||||
<!-- /告警单 -->
|
<!-- /告警单 -->
|
||||||
<alarmList ref="alarmListRef" @onSubmit="tableStore.index()"/>
|
<alarmList ref="alarmListRef" @onSubmit="tableStore.index()" />
|
||||||
<!-- 详情 -->
|
<!-- 详情 -->
|
||||||
<detail ref="detailRef"/>
|
<detail ref="detailRef" />
|
||||||
</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 Area from '@/components/form/area/index.vue'
|
import Area from '@/components/form/area/index.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 {ElMessage, ElMessageBox} from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import {useDictData} from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import alarmList from './form/alarmList.vue'
|
import alarmList from './form/alarmList.vue'
|
||||||
import detail from './form/detail.vue'
|
import detail from './form/detail.vue'
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
import {useRouter} from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
|
||||||
const router = useRouter() // 路由对象
|
const router = useRouter() // 路由对象
|
||||||
//字典获取超标指标
|
//字典获取超标指标
|
||||||
@@ -100,224 +100,224 @@ const alarmListRef = ref()
|
|||||||
const flagTime = ref(false)
|
const flagTime = ref(false)
|
||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
const list: any = ref({
|
const list: any = ref({
|
||||||
deptId: '',
|
deptId: '',
|
||||||
searchBeginTime: '',
|
searchBeginTime: '',
|
||||||
searchEndTime: '',
|
searchEndTime: '',
|
||||||
alertThreshold: '',
|
alertThreshold: '',
|
||||||
alarmThreshold: ''
|
alarmThreshold: ''
|
||||||
})
|
})
|
||||||
const level: any = ref(dictData.state.area[0]?.level)
|
const level: any = ref(dictData.state.area[0]?.level)
|
||||||
const flag: any = ref('')
|
const flag: any = ref('')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/onlineMonitor/list',
|
url: '/supervision-boot/onlineMonitor/list',
|
||||||
publicHeight: 65,
|
publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
filename:'在线监测',
|
filename: '在线监测',
|
||||||
// isWebPaging:true,
|
// isWebPaging:true,
|
||||||
column: [
|
column: [
|
||||||
{title: '', type: 'checkbox', width: 40},
|
{ title: '', type: 'checkbox', width: 40 },
|
||||||
{
|
|
||||||
title: '序号',
|
|
||||||
|
|
||||||
align: 'center',
|
|
||||||
width: 80,
|
|
||||||
formatter: (row: any) => {
|
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'dept', title: '负责单位'},
|
|
||||||
{field: 'substation', title: '变电站名称'},
|
|
||||||
{field: 'deviceName', title: '终端名称'},
|
|
||||||
{field: 'lineName', title: '监测点名称'},
|
|
||||||
|
|
||||||
{
|
|
||||||
field: 'businessType',
|
|
||||||
title: '监测对象类型',
|
|
||||||
|
|
||||||
formatter: (row: any) => {
|
|
||||||
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{field: 'objectName', title: '监测对象名称'},
|
|
||||||
{
|
|
||||||
field: 'targetType',
|
|
||||||
title: '指标类型',
|
|
||||||
formatter: (row: any) => {
|
|
||||||
return exceeded.find((item: any) => item.id == row.cellValue)?.name || '/'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
field: 'overLimitDay',
|
|
||||||
title: '累计超标天数',
|
|
||||||
formatter: (row: any) => {
|
|
||||||
return row.cellValue != null ? row.cellValue : '/'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
field: 'updateTime',
|
|
||||||
visible: flagTime,
|
|
||||||
title: '最新数据时间'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作',
|
|
||||||
width: '180',
|
|
||||||
align: 'center',
|
|
||||||
render: 'buttons',
|
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
title: '序号',
|
||||||
title: '详情',
|
|
||||||
type: 'primary',
|
align: 'center',
|
||||||
icon: 'el-icon-EditPen',
|
width: 80,
|
||||||
render: 'basicButton',
|
formatter: (row: any) => {
|
||||||
disabled: row => {
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
return row.targetType == 0
|
}
|
||||||
},
|
},
|
||||||
click: row => {
|
{ field: 'dept', title: '负责单位' },
|
||||||
detailRef.value.open({
|
{ field: 'substation', title: '变电站名称' },
|
||||||
text: '详情',
|
{ field: 'deviceName', title: '终端名称' },
|
||||||
row: row,
|
{ field: 'lineName', title: '监测点名称' },
|
||||||
list: list.value
|
|
||||||
})
|
{
|
||||||
}
|
field: 'businessType',
|
||||||
|
title: '监测对象类型',
|
||||||
|
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return industry.find((item: any) => item.id == row.cellValue)?.name || '/'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ field: 'objectName', title: '监测对象名称' },
|
||||||
|
{
|
||||||
|
field: 'targetType',
|
||||||
|
title: '指标类型',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return exceeded.find((item: any) => item.id == row.cellValue)?.name || '/'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'overLimitDay',
|
||||||
|
title: '累计超标天数',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue != null ? row.cellValue : '/'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
field: 'updateTime',
|
||||||
title: '查看预警单',
|
visible: flagTime,
|
||||||
type: 'primary',
|
title: '最新数据时间'
|
||||||
icon: 'el-icon-EditPen',
|
|
||||||
render: 'basicButton',
|
|
||||||
disabled: row => {
|
|
||||||
return row.step != 1
|
|
||||||
},
|
|
||||||
click: row => {
|
|
||||||
router.push({
|
|
||||||
name: 'supervision/supervision/manage',
|
|
||||||
query: {
|
|
||||||
type: 0,
|
|
||||||
t: Date.now()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'productSetting',
|
title: '操作',
|
||||||
title: '查看告警单',
|
width: '180',
|
||||||
type: 'primary',
|
align: 'center',
|
||||||
icon: 'el-icon-EditPen',
|
render: 'buttons',
|
||||||
render: 'basicButton',
|
fixed: 'right',
|
||||||
disabled: row => {
|
buttons: [
|
||||||
return row.step != 2
|
{
|
||||||
},
|
name: 'productSetting',
|
||||||
click: row => {
|
title: '详情',
|
||||||
router.push({
|
type: 'primary',
|
||||||
name: 'supervision/supervision/manage',
|
icon: 'el-icon-EditPen',
|
||||||
query: {
|
render: 'basicButton',
|
||||||
type: 1,
|
disabled: row => {
|
||||||
t: Date.now()
|
return row.targetType == 0
|
||||||
}
|
},
|
||||||
})
|
click: row => {
|
||||||
}
|
detailRef.value.open({
|
||||||
|
text: '详情',
|
||||||
|
row: row,
|
||||||
|
list: list.value
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'productSetting',
|
||||||
|
title: '查看预警单',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-EditPen',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.step != 1
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
router.push({
|
||||||
|
name: 'supervision/supervision/manage' + (VITE_FLAG ? '3' : ''),
|
||||||
|
query: {
|
||||||
|
type: 3,
|
||||||
|
t: Date.now()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'productSetting',
|
||||||
|
title: '查看告警单',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-EditPen',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.step != 2
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
router.push({
|
||||||
|
name: 'supervision/supervision/manage' + (VITE_FLAG ? '4' : ''),
|
||||||
|
query: {
|
||||||
|
type: 4,
|
||||||
|
t: Date.now()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// {
|
||||||
|
// name: 'productSetting',
|
||||||
|
// title: '发起告警单',
|
||||||
|
// type: 'warning',
|
||||||
|
// disabled: row => {
|
||||||
|
// return row.overLimitDay < tableStore.table.params.alarmThreshold
|
||||||
|
// },
|
||||||
|
// icon: 'el-icon-EditPen',
|
||||||
|
// render: 'basicButton',
|
||||||
|
|
||||||
|
// click: async row => {
|
||||||
|
// // handleWarningAlarmFlag(row).then(res => {
|
||||||
|
// // console.log(res)
|
||||||
|
// // ElMessage.success('发起告警单成功!')
|
||||||
|
// // tableStore.index()
|
||||||
|
// // })
|
||||||
|
// const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||||
|
// confirmButtonText: '确定',
|
||||||
|
// cancelButtonText: '取消',
|
||||||
|
|
||||||
|
// inputType: 'textarea',
|
||||||
|
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
|
// inputErrorMessage: '请输入整改意见'
|
||||||
|
// })
|
||||||
|
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
|
||||||
|
// ElMessage.success('发起告警单成功!')
|
||||||
|
// tableStore.index()
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'edit',
|
||||||
|
// title: '发起预警单',
|
||||||
|
// type: 'primary',
|
||||||
|
// icon: 'el-icon-Open',
|
||||||
|
// disabled: row => {
|
||||||
|
// return row.overLimitDay >= tableStore.table.params.alarmThreshold
|
||||||
|
// },
|
||||||
|
// render: 'basicButton',
|
||||||
|
|
||||||
|
// click: async row => {
|
||||||
|
// // handleWarningAlarmFlag(row).then(res => {
|
||||||
|
// // console.log(res)
|
||||||
|
// // ElMessage.success('发起预警单成功!')
|
||||||
|
// // tableStore.index()
|
||||||
|
// // })
|
||||||
|
// const { value } = await ElMessageBox.prompt('', '整改意见', {
|
||||||
|
// confirmButtonText: '确定',
|
||||||
|
// cancelButtonText: '取消',
|
||||||
|
|
||||||
|
// inputType: 'textarea',
|
||||||
|
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
||||||
|
// inputErrorMessage: '请输入整改意见'
|
||||||
|
// })
|
||||||
|
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
|
||||||
|
// ElMessage.success('发起预警单成功!')
|
||||||
|
// tableStore.index()
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
]
|
||||||
}
|
}
|
||||||
// {
|
],
|
||||||
// name: 'productSetting',
|
beforeSearchFun: () => {
|
||||||
// title: '发起告警单',
|
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
||||||
// type: 'warning',
|
list.value.deptId = tableStore.table.params.deptId
|
||||||
// disabled: row => {
|
|
||||||
// return row.overLimitDay < tableStore.table.params.alarmThreshold
|
list.value.searchBeginTime = tableStore.table.params.searchBeginTime
|
||||||
|
list.value.searchEndTime = tableStore.table.params.searchEndTime
|
||||||
|
if (tableStore.table.params.alertThreshold != '') {
|
||||||
|
list.value.alertThreshold = tableStore.table.params.alertThreshold
|
||||||
|
}
|
||||||
|
list.value.lineType = tableStore.table.params.lineType
|
||||||
|
list.value.alarmThreshold = tableStore.table.params.alarmThreshold
|
||||||
|
flag.value = level.value
|
||||||
|
flagTime.value = tableStore.table.params.dataType == 0 ? true : false
|
||||||
|
},
|
||||||
|
loadCallback: () => {
|
||||||
|
// tableStore.table.data = [
|
||||||
|
// {
|
||||||
|
// orgName: '张家口',
|
||||||
|
// subName: '110kV马头山风电场',
|
||||||
|
// lineName: '111口头线',
|
||||||
|
// voltageScale: '110kV',
|
||||||
|
// overDay: '20',
|
||||||
|
// overDays: '10'
|
||||||
// },
|
// },
|
||||||
// icon: 'el-icon-EditPen',
|
// {
|
||||||
// render: 'basicButton',
|
// orgName: '张家口',
|
||||||
|
// subName: '110kV韩家庄风电场',
|
||||||
// click: async row => {
|
// lineName: '111缘韩一线',
|
||||||
// // handleWarningAlarmFlag(row).then(res => {
|
// voltageScale: '110kV',
|
||||||
// // console.log(res)
|
// overDay: '20',
|
||||||
// // ElMessage.success('发起告警单成功!')
|
// overDays: '16'
|
||||||
// // tableStore.index()
|
|
||||||
// // })
|
|
||||||
// const { value } = await ElMessageBox.prompt('', '整改意见', {
|
|
||||||
// confirmButtonText: '确定',
|
|
||||||
// cancelButtonText: '取消',
|
|
||||||
|
|
||||||
// inputType: 'textarea',
|
|
||||||
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
|
||||||
// inputErrorMessage: '请输入整改意见'
|
|
||||||
// })
|
|
||||||
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
|
|
||||||
// ElMessage.success('发起告警单成功!')
|
|
||||||
// tableStore.index()
|
|
||||||
// })
|
|
||||||
// }
|
// }
|
||||||
// },
|
// ]
|
||||||
// {
|
|
||||||
// name: 'edit',
|
|
||||||
// title: '发起预警单',
|
|
||||||
// type: 'primary',
|
|
||||||
// icon: 'el-icon-Open',
|
|
||||||
// disabled: row => {
|
|
||||||
// return row.overLimitDay >= tableStore.table.params.alarmThreshold
|
|
||||||
// },
|
|
||||||
// render: 'basicButton',
|
|
||||||
|
|
||||||
// click: async row => {
|
|
||||||
// // handleWarningAlarmFlag(row).then(res => {
|
|
||||||
// // console.log(res)
|
|
||||||
// // ElMessage.success('发起预警单成功!')
|
|
||||||
// // tableStore.index()
|
|
||||||
// // })
|
|
||||||
// const { value } = await ElMessageBox.prompt('', '整改意见', {
|
|
||||||
// confirmButtonText: '确定',
|
|
||||||
// cancelButtonText: '取消',
|
|
||||||
|
|
||||||
// inputType: 'textarea',
|
|
||||||
// inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格
|
|
||||||
// inputErrorMessage: '请输入整改意见'
|
|
||||||
// })
|
|
||||||
// handleWarningAlarmFlag({ ...row, reformAdvice: value }).then(res => {
|
|
||||||
// ElMessage.success('发起预警单成功!')
|
|
||||||
// tableStore.index()
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
|
||||||
beforeSearchFun: () => {
|
|
||||||
tableStore.table.params.currentPage = tableStore.table.params.pageNum
|
|
||||||
list.value.deptId = tableStore.table.params.deptId
|
|
||||||
|
|
||||||
list.value.searchBeginTime = tableStore.table.params.searchBeginTime
|
|
||||||
list.value.searchEndTime = tableStore.table.params.searchEndTime
|
|
||||||
if (tableStore.table.params.alertThreshold != '') {
|
|
||||||
list.value.alertThreshold = tableStore.table.params.alertThreshold
|
|
||||||
}
|
|
||||||
list.value.lineType = tableStore.table.params.lineType
|
|
||||||
list.value.alarmThreshold = tableStore.table.params.alarmThreshold
|
|
||||||
flag.value = level.value
|
|
||||||
flagTime.value = tableStore.table.params.dataType == 0 ? true : false
|
|
||||||
},
|
|
||||||
loadCallback: () => {
|
|
||||||
// tableStore.table.data = [
|
|
||||||
// {
|
|
||||||
// orgName: '张家口',
|
|
||||||
// subName: '110kV马头山风电场',
|
|
||||||
// lineName: '111口头线',
|
|
||||||
// voltageScale: '110kV',
|
|
||||||
// overDay: '20',
|
|
||||||
// overDays: '10'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// orgName: '张家口',
|
|
||||||
// subName: '110kV韩家庄风电场',
|
|
||||||
// lineName: '111缘韩一线',
|
|
||||||
// voltageScale: '110kV',
|
|
||||||
// overDay: '20',
|
|
||||||
// overDays: '16'
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
tableStore.table.params.alertThreshold = 5
|
tableStore.table.params.alertThreshold = 5
|
||||||
tableStore.table.params.alarmThreshold = 5
|
tableStore.table.params.alarmThreshold = 5
|
||||||
@@ -329,50 +329,50 @@ tableStore.table.params.dataType = '1'
|
|||||||
tableStore.table.params.deptId = dictData.state.area[0].id
|
tableStore.table.params.deptId = dictData.state.area[0].id
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// TableHeaderRef.value.setDatePicker([{label: '月', value: 3}])
|
// TableHeaderRef.value.setDatePicker([{label: '月', value: 3}])
|
||||||
|
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
TableHeaderRef.value.showSelectChange()
|
TableHeaderRef.value.showSelectChange()
|
||||||
}, 10)
|
}, 10)
|
||||||
})
|
})
|
||||||
|
|
||||||
const changeAlert = e => {
|
const changeAlert = e => {
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
tableStore.table.params.alertThreshold = 5
|
tableStore.table.params.alertThreshold = 5
|
||||||
} else {
|
} else {
|
||||||
if (e > tableStore.table.params.alarmThreshold) {
|
if (e > tableStore.table.params.alarmThreshold) {
|
||||||
ElMessage.warning('预警阈值不能大于报警阈值')
|
ElMessage.warning('预警阈值不能大于报警阈值')
|
||||||
tableStore.table.params.alertThreshold = 5
|
tableStore.table.params.alertThreshold = 5
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
const changeAlarm = e => {
|
const changeAlarm = e => {
|
||||||
if (e == null) {
|
if (e == null) {
|
||||||
tableStore.table.params.alarmThreshold = 5
|
tableStore.table.params.alarmThreshold = 5
|
||||||
} else {
|
} else {
|
||||||
if (e < tableStore.table.params.alertThreshold) {
|
if (e < tableStore.table.params.alertThreshold) {
|
||||||
ElMessage.warning('报警阈值不能小于预警阈值')
|
ElMessage.warning('报警阈值不能小于预警阈值')
|
||||||
tableStore.table.params.alarmThreshold = 5
|
tableStore.table.params.alarmThreshold = 5
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// 发起预警单
|
// 发起预警单
|
||||||
const launch = (title: string) => {
|
const launch = (title: string) => {
|
||||||
if (tableStore.table.selection.length == 0) {
|
if (tableStore.table.selection.length == 0) {
|
||||||
ElMessage.warning('请选择一条数据')
|
ElMessage.warning('请选择一条数据')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
alarmListRef.value.open({
|
alarmListRef.value.open({
|
||||||
text: title,
|
text: title,
|
||||||
form: list.value,
|
form: list.value,
|
||||||
row: tableStore.table.selection
|
row: tableStore.table.selection
|
||||||
})
|
})
|
||||||
console.log('🚀 ~ launch ~ list.value:', list.value)
|
console.log('🚀 ~ launch ~ list.value:', list.value)
|
||||||
}
|
}
|
||||||
const changeArea = e => {
|
const changeArea = e => {
|
||||||
level.value = e.data.level
|
level.value = e.data.level
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <div> 普测结果 发起预告警单</div> -->
|
<!-- <div> 普测结果 发起预告警单</div> -->
|
||||||
<TableHeader area nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
<TableHeader area nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="计划名称">
|
<el-form-item label="计划名称">
|
||||||
<el-input style="width: 200px" v-model="tableStore.table.params.searchValue" clearable
|
<el-input
|
||||||
placeholder="请输入计划名称"></el-input>
|
style="width: 200px"
|
||||||
</el-form-item>
|
v-model="tableStore.table.params.searchValue"
|
||||||
<el-form-item label="是否解决">
|
clearable
|
||||||
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
placeholder="请输入计划名称"
|
||||||
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
|
></el-input>
|
||||||
:value="item.value"></el-option>
|
</el-form-item>
|
||||||
</el-select>
|
<el-form-item label="是否解决">
|
||||||
</el-form-item>
|
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
||||||
</template>
|
<el-option
|
||||||
</TableHeader>
|
v-for="item in dealStateList"
|
||||||
<Table ref="tableRef" />
|
:key="item.value"
|
||||||
<testQuestionsForm ref="testQuestionsFormRef" />
|
:label="item.label"
|
||||||
<!-- 详情 -->
|
:value="item.value"
|
||||||
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
|
></el-option>
|
||||||
<detail :id="detailId" :flag="flag" />
|
</el-select>
|
||||||
</el-dialog>
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef" />
|
||||||
|
<testQuestionsForm ref="testQuestionsFormRef" />
|
||||||
|
<!-- 详情 -->
|
||||||
|
<el-dialog draggable v-model="dialogVisible" v-if="dialogVisible" title="详情" width="1000">
|
||||||
|
<detail :id="detailId" :flag="flag" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
@@ -32,7 +40,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
|
|||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
|
import detail from '@/views/pqs/supervise/harmonicSurvey/test/detail.vue'
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const router = useRouter() // 路由对象
|
const router = useRouter() // 路由对象
|
||||||
@@ -151,9 +159,9 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'supervision/supervision/manage',
|
name: 'supervision/supervision/manage' + (VITE_FLAG ? '4' : ''),
|
||||||
query: {
|
query: {
|
||||||
type: 1,
|
type: 4,
|
||||||
t: Date.now()
|
t: Date.now()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -168,7 +176,7 @@ const tableStore = new TableStore({
|
|||||||
exportProcessingData: () => {
|
exportProcessingData: () => {
|
||||||
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||||
item.dealState = item.dealState == 0 ? '未解决' : item.dealState == 1 ? '已解决' : '/'
|
item.dealState = item.dealState == 0 ? '未解决' : item.dealState == 1 ? '已解决' : '/'
|
||||||
|
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,34 @@
|
|||||||
<!---试运行列表-->
|
<!---试运行列表-->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<TableHeader area nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
<TableHeader area nextFlag theCurrentTime showTimeAll ref="TableHeaderRef" showExport>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-option
|
||||||
</el-select>
|
v-for="item in statusSelect"
|
||||||
</el-form-item>
|
:key="item.id"
|
||||||
<el-form-item label="是否解决">
|
:label="item.name"
|
||||||
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
:value="item.id"
|
||||||
<el-option v-for="item in dealStateList" :key="item.value" :label="item.label"
|
></el-option>
|
||||||
:value="item.value"></el-option>
|
</el-select>
|
||||||
</el-select>
|
</el-form-item>
|
||||||
</el-form-item>
|
<el-form-item label="是否解决">
|
||||||
</template>
|
<el-select v-model="tableStore.table.params.dealState" clearable placeholder="请选择是否解决">
|
||||||
</TableHeader>
|
<el-option
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
v-for="item in dealStateList"
|
||||||
<!-- 详情 -->
|
:key="item.value"
|
||||||
<detail ref="detailRef" />
|
:label="item.label"
|
||||||
</div>
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
|
<!-- 详情 -->
|
||||||
|
<detail ref="detailRef" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide, reactive } from 'vue'
|
import { ref, onMounted, provide, reactive } from 'vue'
|
||||||
@@ -35,7 +44,7 @@ import { VxeTablePropTypes } from 'vxe-table'
|
|||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||||
import detail from './testRunDetail.vue'
|
import detail from './testRunDetail.vue'
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
@@ -218,9 +227,9 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
push({
|
push({
|
||||||
name: 'supervision/supervision/manage',
|
name: 'supervision/supervision/manage' + (VITE_FLAG ? '4' : ''),
|
||||||
query: {
|
query: {
|
||||||
type: 1,
|
type: 4,
|
||||||
t: Date.now()
|
t: Date.now()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<el-tabs v-model="activeName" type="border-card">
|
<el-tabs v-model="activeName" type="border-card">
|
||||||
<el-tab-pane label="在线监测" name="1">
|
<el-tab-pane label="在线监测问题" name="1" v-if="tabList.includes('1')">
|
||||||
<online v-if="activeName == '1'" />
|
<online v-if="activeName == '1'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="用户投诉" name="2">
|
<el-tab-pane label="用户投诉问题" name="2" v-if="tabList.includes('2')">
|
||||||
<complaints v-if="activeName == '2'" />
|
<complaints v-if="activeName == '2'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="计划问题" name="3">
|
<el-tab-pane label="计划实施问题" name="3" v-if="tabList.includes('3')">
|
||||||
<testQuestions v-if="activeName == '3'" />
|
<testQuestions v-if="activeName == '3'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="试运行评估问题" name="4">
|
<el-tab-pane label="试运行评估" name="4" v-if="tabList.includes('4')">
|
||||||
<testRun v-if="activeName == '4'" />
|
<testRun v-if="activeName == '4'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<!-- <el-tabs v-model="activeName" type="border-card">
|
<!-- <el-tabs v-model="activeName" type="border-card">
|
||||||
@@ -30,14 +30,23 @@ import online from './components1/online.vue'
|
|||||||
import complaints from './components1/complaints.vue'
|
import complaints from './components1/complaints.vue'
|
||||||
import testQuestions from './components1/testQuestions.vue'
|
import testQuestions from './components1/testQuestions.vue'
|
||||||
import testRun from './components1/testRun.vue'
|
import testRun from './components1/testRun.vue'
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
// import maintenance from './components/maintenance.vue'
|
// import maintenance from './components/maintenance.vue'
|
||||||
// import audit from './components/audit.vue'
|
// import audit from './components/audit.vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'supervision/electricitymanagement'
|
name: 'supervision/electricitymanagement'
|
||||||
})
|
})
|
||||||
|
const tabList = ref(['1', '2', '3', '4'])
|
||||||
const activeName = ref('1')
|
const activeName = ref('1')
|
||||||
|
onMounted(() => {
|
||||||
|
let key = window.location.href.split('?')[0].slice(-1)
|
||||||
|
const isNumber = /^\d$/.test(key)
|
||||||
|
if (isNumber) {
|
||||||
|
tabList.value = [key]
|
||||||
|
activeName.value = key
|
||||||
|
}
|
||||||
|
})
|
||||||
const layout = mainHeight(63) as any
|
const layout = mainHeight(63) as any
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,24 +1,24 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='default-main'>
|
<div class="default-main">
|
||||||
<el-tabs v-model='activeName' type='border-card'>
|
<el-tabs v-model="activeName" type="border-card">
|
||||||
<el-tab-pane label='技术监督计划管理' name='1'>
|
<el-tab-pane :label="VITE_FLAG ? '工作计划指定' : '技术监督计划管理'" name="1" v-if="tabList.includes('1')">
|
||||||
<plan-manage :id='id' v-if="activeName == '1'" />
|
<plan-manage :id="id" v-if="activeName == '1'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label='技术监督测试管理' name='2'>
|
<el-tab-pane :label="VITE_FLAG ? '工作计划实施' : '技术监督测试管理'" name="2" v-if="tabList.includes('2')">
|
||||||
<test-manage :id='id' :businessKey='key' v-if="activeName == '2'" />
|
<test-manage :id="id" :businessKey="key" v-if="activeName == '2'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import planManage from './components/planManage.vue'
|
import planManage from './components/planManage.vue'
|
||||||
import testManage from './components/testManage.vue'
|
import testManage from './components/testManage.vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const statusSelect = dictData.statusSelect()
|
const statusSelect = dictData.statusSelect()
|
||||||
@@ -27,27 +27,39 @@ const key = ref('')
|
|||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'supervision/harmonicmanagement'
|
name: 'supervision/harmonicmanagement'
|
||||||
})
|
})
|
||||||
|
const tabList = ref(['1', '2', '3', '4'])
|
||||||
const activeName = ref('1')
|
const activeName = ref('1')
|
||||||
|
onMounted(() => {
|
||||||
|
let key = window.location.href.split('?')[0].slice(-1)
|
||||||
|
const isNumber = /^\d$/.test(key)
|
||||||
|
if (isNumber) {
|
||||||
|
tabList.value = [key]
|
||||||
|
activeName.value = key
|
||||||
|
}
|
||||||
|
})
|
||||||
const layout = mainHeight(63) as any
|
const layout = mainHeight(63) as any
|
||||||
|
|
||||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
watch(
|
||||||
if (route.fullPath.includes('supervision/harmonicmanagement')) {
|
() => route.query.t,
|
||||||
let type = (route.query.type as string) || 'null'
|
async (newValue, oldValue) => {
|
||||||
if (type == 'null') { }
|
if (route.fullPath.includes('supervision/harmonicmanagement')) {
|
||||||
else if (type == '1') {
|
let type = (route.query.type as string) || 'null'
|
||||||
activeName.value = '1'
|
if (type == 'null') {
|
||||||
} else {
|
} else if (type == '1') {
|
||||||
activeName.value = '2'
|
activeName.value = '1'
|
||||||
|
} else {
|
||||||
|
activeName.value = '2'
|
||||||
|
}
|
||||||
|
id.value = (route.query.id as string) || 'null'
|
||||||
|
id.value = id.value + '@' + route.query.t
|
||||||
|
key.value = (route.query.key as string) || 'null'
|
||||||
}
|
}
|
||||||
id.value = (route.query.id as string) || 'null'
|
},
|
||||||
id.value = id.value + '@' + route.query.t
|
{ deep: true, immediate: true }
|
||||||
key.value = (route.query.key as string) || 'null'
|
)
|
||||||
}
|
|
||||||
}, { deep: true, immediate: true })
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang="scss" scoped>
|
||||||
.bars_w {
|
.bars_w {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='default-main'>
|
<div class='default-main'>
|
||||||
<el-descriptions :column='2' border>
|
<el-descriptions :column='2' label-width="140px" border>
|
||||||
<el-descriptions-item label='技术监督计划名称'>
|
<el-descriptions-item label='技术监督计划名称'>
|
||||||
{{ detailData?.planName }}
|
{{ detailData?.planName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
{{ detailData?.deptName }}
|
{{ detailData?.deptName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label='监督类型'>
|
<el-descriptions-item label='监督类型'>
|
||||||
{{
|
{{
|
||||||
supvTypeList.find(item => {
|
supvTypeList.find(item => {
|
||||||
return item.id == detailData?.supvType
|
return item.id == detailData?.supvType
|
||||||
})?.name
|
})?.name
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ import { useAdminInfo } from '@/stores/adminInfo'
|
|||||||
import { uploadFile } from '@/api/system-boot/file'
|
import { uploadFile } from '@/api/system-boot/file'
|
||||||
import { submitGoNet } from '@/api/supervision-boot/interfere/index'
|
import { submitGoNet } from '@/api/supervision-boot/interfere/index'
|
||||||
import { getUserReportById } from '@/api/supervision-boot/userReport/form'
|
import { getUserReportById } from '@/api/supervision-boot/userReport/form'
|
||||||
|
import { lo } from 'element-plus/es/locale'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
openType: {
|
openType: {
|
||||||
@@ -340,6 +341,8 @@ const handleExceed: UploadProps['onExceed'] = files => {
|
|||||||
//移除文件上传
|
//移除文件上传
|
||||||
const removeFile = (file: any, uploadFiles: any) => {
|
const removeFile = (file: any, uploadFiles: any) => {
|
||||||
console.log(file, uploadFiles)
|
console.log(file, uploadFiles)
|
||||||
|
goToNetReport.value = ''
|
||||||
|
form.value.goToNetReport = uploadFiles
|
||||||
}
|
}
|
||||||
|
|
||||||
// 治理工程验收报告数组
|
// 治理工程验收报告数组
|
||||||
@@ -373,6 +376,7 @@ const confirmForm = (flag: boolean) => {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
if (goToNetReport.value == null || goToNetReport.value == '') {
|
if (goToNetReport.value == null || goToNetReport.value == '') {
|
||||||
|
loading.value = false
|
||||||
return ElMessage({
|
return ElMessage({
|
||||||
message: props.bussType == 0 ? '请上传入网设计方案审查报告' : '请上传治理工程验收报告',
|
message: props.bussType == 0 ? '请上传入网设计方案审查报告' : '请上传治理工程验收报告',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
|
|||||||
@@ -201,7 +201,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="uploadFile" for="-" label="可研报告:" prop="feasibilityReport">
|
<el-form-item class="uploadFile" for="-" label="可研报告:" prop="feasibilityReport">
|
||||||
<el-upload v-model:file-list="form.feasibilityReport" ref="uploadRef" action="" :accept="acceptType"
|
<el-upload v-model:file-list="form.feasibilityReport" ref="uploadRef" action="" :accept="acceptType"
|
||||||
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('feasibilityReport')"
|
||||||
:on-progress="uploadFileName('feasibilityReport')">
|
:on-progress="uploadFileName('feasibilityReport')">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button type="primary">上传文件</el-button>
|
<el-button type="primary">上传文件</el-button>
|
||||||
@@ -210,7 +210,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="uploadFile" for="-" label="项目初步设计说明书:" prop="preliminaryDesignDescription">
|
<el-form-item class="uploadFile" for="-" label="项目初步设计说明书:" prop="preliminaryDesignDescription">
|
||||||
<el-upload v-model:file-list="form.preliminaryDesignDescription" ref="uploadRef" action=""
|
<el-upload v-model:file-list="form.preliminaryDesignDescription" ref="uploadRef" action=""
|
||||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('preliminaryDesignDescription')"
|
||||||
:on-progress="uploadFileName('preliminaryDesignDescription')">
|
:on-progress="uploadFileName('preliminaryDesignDescription')">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button type="primary">上传文件</el-button>
|
<el-button type="primary">上传文件</el-button>
|
||||||
@@ -219,7 +219,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="uploadFile" for="-" label="预测评估报告:" prop="predictionEvaluationReport">
|
<el-form-item class="uploadFile" for="-" label="预测评估报告:" prop="predictionEvaluationReport">
|
||||||
<el-upload v-model:file-list="form.predictionEvaluationReport" ref="uploadRef" action=""
|
<el-upload v-model:file-list="form.predictionEvaluationReport" ref="uploadRef" action=""
|
||||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('predictionEvaluationReport')"
|
||||||
:on-progress="uploadFileName('predictionEvaluationReport')">
|
:on-progress="uploadFileName('predictionEvaluationReport')">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button type="primary">上传文件</el-button>
|
<el-button type="primary">上传文件</el-button>
|
||||||
@@ -228,7 +228,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="uploadFile" for="-" label="预测评估评审意见报告:" prop="predictionEvaluationReviewOpinions">
|
<el-form-item class="uploadFile" for="-" label="预测评估评审意见报告:" prop="predictionEvaluationReviewOpinions">
|
||||||
<el-upload v-model:file-list="form.predictionEvaluationReviewOpinions" ref="uploadRef" action=""
|
<el-upload v-model:file-list="form.predictionEvaluationReviewOpinions" ref="uploadRef" action=""
|
||||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('predictionEvaluationReviewOpinions')"
|
||||||
:on-progress="uploadFileName('predictionEvaluationReviewOpinions')">
|
:on-progress="uploadFileName('predictionEvaluationReviewOpinions')">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button type="primary">上传文件</el-button>
|
<el-button type="primary">上传文件</el-button>
|
||||||
@@ -237,7 +237,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="uploadFile" for="-" label="其他附件:" prop="additionalAttachments">
|
<el-form-item class="uploadFile" for="-" label="其他附件:" prop="additionalAttachments">
|
||||||
<el-upload v-model:file-list="form.additionalAttachments" ref="uploadRef" action="" :accept="acceptType"
|
<el-upload v-model:file-list="form.additionalAttachments" ref="uploadRef" action="" :accept="acceptType"
|
||||||
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('additionalAttachments')"
|
||||||
:on-progress="uploadFileName('additionalAttachments')">
|
:on-progress="uploadFileName('additionalAttachments')">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button type="primary">上传文件</el-button>
|
<el-button type="primary">上传文件</el-button>
|
||||||
@@ -247,7 +247,7 @@
|
|||||||
<el-form-item for="-" class="uploadFile" v-if="form.userType != '0' && form.userType != '1'"
|
<el-form-item for="-" class="uploadFile" v-if="form.userType != '0' && form.userType != '1'"
|
||||||
label="用户接入变电站主接线示意图:" prop="substationMainWiringDiagram">
|
label="用户接入变电站主接线示意图:" prop="substationMainWiringDiagram">
|
||||||
<el-upload v-model:file-list="form.substationMainWiringDiagram" ref="uploadRef" action=""
|
<el-upload v-model:file-list="form.substationMainWiringDiagram" ref="uploadRef" action=""
|
||||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('substationMainWiringDiagram')"
|
||||||
:on-progress="uploadFileName('substationMainWiringDiagram')">
|
:on-progress="uploadFileName('substationMainWiringDiagram')">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button type="primary">上传文件</el-button>
|
<el-button type="primary">上传文件</el-button>
|
||||||
@@ -257,7 +257,7 @@
|
|||||||
<el-form-item class="uploadFile" for="-" label="主要敏感终端清单:" v-if="form.userType == '6'"
|
<el-form-item class="uploadFile" for="-" label="主要敏感终端清单:" v-if="form.userType == '6'"
|
||||||
prop="sensitiveDevices">
|
prop="sensitiveDevices">
|
||||||
<el-upload v-model:file-list="form.sensitiveDevices" ref="uploadRef" action="" :accept="acceptType"
|
<el-upload v-model:file-list="form.sensitiveDevices" ref="uploadRef" action="" :accept="acceptType"
|
||||||
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('sensitiveDevices')"
|
||||||
:on-progress="uploadFileName('sensitiveDevices')">
|
:on-progress="uploadFileName('sensitiveDevices')">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button type="primary">上传文件</el-button>
|
<el-button type="primary">上传文件</el-button>
|
||||||
@@ -267,7 +267,7 @@
|
|||||||
<el-form-item class="uploadFile" for="-" v-if="form.userType == '6'" label="抗扰度测试报告:"
|
<el-form-item class="uploadFile" for="-" v-if="form.userType == '6'" label="抗扰度测试报告:"
|
||||||
prop="antiInterferenceReport">
|
prop="antiInterferenceReport">
|
||||||
<el-upload v-model:file-list="form.antiInterferenceReport" ref="uploadRef" action=""
|
<el-upload v-model:file-list="form.antiInterferenceReport" ref="uploadRef" action=""
|
||||||
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
:accept="acceptType" :limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('antiInterferenceReport')"
|
||||||
:on-progress="uploadFileName('antiInterferenceReport')">
|
:on-progress="uploadFileName('antiInterferenceReport')">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button type="primary">上传文件</el-button>
|
<el-button type="primary">上传文件</el-button>
|
||||||
@@ -277,7 +277,7 @@
|
|||||||
<el-form-item class="uploadFile" for="-" v-if="form.userType == '6'" label="背景电能质量测试报告:"
|
<el-form-item class="uploadFile" for="-" v-if="form.userType == '6'" label="背景电能质量测试报告:"
|
||||||
prop="powerQualityReport">
|
prop="powerQualityReport">
|
||||||
<el-upload v-model:file-list="form.powerQualityReport" ref="uploadRef" action="" :accept="acceptType"
|
<el-upload v-model:file-list="form.powerQualityReport" ref="uploadRef" action="" :accept="acceptType"
|
||||||
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile"
|
:limit="1" :on-change="choose" :auto-upload="false" :on-remove="removeFile('powerQualityReport')"
|
||||||
:on-progress="uploadFileName('powerQualityReport')">
|
:on-progress="uploadFileName('powerQualityReport')">
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<el-button type="primary">上传文件</el-button>
|
<el-button type="primary">上传文件</el-button>
|
||||||
@@ -300,7 +300,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
import { ref, onMounted, reactive, defineExpose, defineProps, defineEmits, watch, onUnmounted } from 'vue'
|
||||||
// import { upload, insertTerminal, updateTerminal } from '@/api/process-boot/terminal'
|
// import { upload, insertTerminal, updateTerminal } from '@/api/process-boot/terminal'
|
||||||
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
import type { UploadFile, UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||||
import { genFileId, ElMessage } from 'element-plus'
|
import { genFileId, ElMessage } from 'element-plus'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
import type { ComponentSize, FormInstance, FormRules } from 'element-plus'
|
||||||
@@ -499,6 +499,8 @@ const resetForm = () => {
|
|||||||
}
|
}
|
||||||
//初始化数据
|
//初始化数据
|
||||||
resetForm()
|
resetForm()
|
||||||
|
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
//获取树形图数据
|
//获取树形图数据
|
||||||
const getTreeList = () => {
|
const getTreeList = () => {
|
||||||
queryByAllCode().then(res => {
|
queryByAllCode().then(res => {
|
||||||
@@ -520,23 +522,58 @@ const getTreeList = () => {
|
|||||||
// })
|
// })
|
||||||
// })
|
// })
|
||||||
let data = [res.data.find((item: any) => item.code == 'Major_Nonlinear_Device')]
|
let data = [res.data.find((item: any) => item.code == 'Major_Nonlinear_Device')]
|
||||||
nonlinearDeviceTypeList.value = [{ ...JSON.parse(JSON.stringify(...data)), children: [], disabled: 'disabled' }]
|
// nonlinearDeviceTypeList.value = [{ ...JSON.parse(JSON.stringify(...data)), children: [], disabled: 'disabled' }]
|
||||||
data.map((item: any) => {
|
|
||||||
//tree禁用根节点
|
// data.map((item: any) => {
|
||||||
item.disabled = 'disabled'
|
// //tree禁用根节点
|
||||||
item.children.map((vv: any) => {
|
// item.disabled = 'disabled'
|
||||||
//tree禁用二级节点
|
// item.children.map((vv: any) => {
|
||||||
vv.disabled = 'disabled'
|
// //tree禁用二级节点
|
||||||
vv.children.map((kk: any) => {
|
// vv.disabled = 'disabled'
|
||||||
//tree禁用三级节点
|
// vv.children.map((kk: any) => {
|
||||||
kk.disabled = 'disabled'
|
// //tree禁用三级节点
|
||||||
kk.children.map((ss: any) => {
|
// kk.disabled = 'disabled'
|
||||||
ss.name = vv.name + '-' + kk.name + '-' + ss.name
|
// kk.children.map((ss: any) => {
|
||||||
nonlinearDeviceTypeList.value[0].children.push(ss)
|
// ss.name = vv.name + '-' + kk.name + '-' + ss.name
|
||||||
|
// nonlinearDeviceTypeList.value[0].children.push(ss)
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
if (VITE_FLAG) {
|
||||||
|
// VITE_FLAG为true时,保持原有逻辑(包含根节点)
|
||||||
|
nonlinearDeviceTypeList.value = [{ ...JSON.parse(JSON.stringify(...data)), children: [], disabled: 'disabled' }]
|
||||||
|
data.map((item: any) => {
|
||||||
|
//tree禁用根节点
|
||||||
|
item.disabled = 'disabled'
|
||||||
|
item.children.map((vv: any) => {
|
||||||
|
//tree禁用二级节点
|
||||||
|
vv.disabled = 'disabled'
|
||||||
|
vv.children.map((kk: any) => {
|
||||||
|
//tree禁用三级节点
|
||||||
|
kk.disabled = 'disabled'
|
||||||
|
kk.children.map((ss: any) => {
|
||||||
|
ss.name = vv.name + '-' + kk.name + '-' + ss.name
|
||||||
|
nonlinearDeviceTypeList.value[0].children.push(ss)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
} else {
|
||||||
|
// VITE_FLAG为false时,去除第一层(根节点),只保留子节点
|
||||||
|
nonlinearDeviceTypeList.value = []
|
||||||
|
data.map((item: any) => {
|
||||||
|
item.children.map((vv: any) => {
|
||||||
|
vv.children.map((kk: any) => {
|
||||||
|
kk.children.map((ss: any) => {
|
||||||
|
ss.name = vv.name + '-' + kk.name + '-' + ss.name
|
||||||
|
nonlinearDeviceTypeList.value.push(ss)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -811,6 +848,29 @@ const open = async (row: any) => {
|
|||||||
} else {
|
} else {
|
||||||
resendId.value = ''
|
resendId.value = ''
|
||||||
form.value.userType = userTypeList.value[0].value
|
form.value.userType = userTypeList.value[0].value
|
||||||
|
|
||||||
|
|
||||||
|
// 清空所有文件引用
|
||||||
|
feasibilityReport.value = ''
|
||||||
|
preliminaryDesignDescription.value = ''
|
||||||
|
predictionEvaluationReport.value = ''
|
||||||
|
predictionEvaluationReviewOpinions.value = ''
|
||||||
|
additionalAttachments.value = ''
|
||||||
|
substationMainWiringDiagram.value = ''
|
||||||
|
sensitiveDevices.value = ''
|
||||||
|
antiInterferenceReport.value = ''
|
||||||
|
powerQualityReport.value = ''
|
||||||
|
|
||||||
|
// 清空表单中的文件列表
|
||||||
|
form.value.feasibilityReport = []
|
||||||
|
form.value.preliminaryDesignDescription = []
|
||||||
|
form.value.predictionEvaluationReport = []
|
||||||
|
form.value.predictionEvaluationReviewOpinions = []
|
||||||
|
form.value.additionalAttachments = []
|
||||||
|
form.value.substationMainWiringDiagram = []
|
||||||
|
form.value.sensitiveDevices = []
|
||||||
|
form.value.antiInterferenceReport = []
|
||||||
|
form.value.powerQualityReport = []
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
getByDeptDevLine({ id: deptIds }).then(res => {
|
getByDeptDevLine({ id: deptIds }).then(res => {
|
||||||
@@ -829,7 +889,7 @@ async function handleResponse(data: any) {
|
|||||||
fileRaw(data, 'userReportSubstationPO')
|
fileRaw(data, 'userReportSubstationPO')
|
||||||
} else if (data.userReportSensitivePO) {
|
} else if (data.userReportSensitivePO) {
|
||||||
form.value = {
|
form.value = {
|
||||||
...data,
|
...data,
|
||||||
...data.userReportSensitivePO,
|
...data.userReportSensitivePO,
|
||||||
energyQualityIndex: data.userReportSensitivePO.energyQualityIndex.split(', ')
|
energyQualityIndex: data.userReportSensitivePO.energyQualityIndex.split(', ')
|
||||||
}
|
}
|
||||||
@@ -896,12 +956,48 @@ const handleExceed: UploadProps['onExceed'] = files => {
|
|||||||
}
|
}
|
||||||
let uploadName = ref('')
|
let uploadName = ref('')
|
||||||
//上传报告字段名称
|
//上传报告字段名称
|
||||||
const uploadFileName = (val: any) => {
|
const uploadFileName = (val: any) => {
|
||||||
uploadName.value = val
|
uploadName.value = val
|
||||||
}
|
}
|
||||||
//移除文件上传
|
|
||||||
const removeFile = (file: any, uploadFiles: any) => {
|
|
||||||
console.log(file, uploadFiles)
|
// 移除文件上传
|
||||||
|
const removeFile = (val: any) => {
|
||||||
|
return (file: UploadFile, fileList: UploadFile[]) => {
|
||||||
|
// 根据上传字段名称清除对应的文件引用
|
||||||
|
switch(val) {
|
||||||
|
case 'feasibilityReport':
|
||||||
|
feasibilityReport.value = ''
|
||||||
|
break
|
||||||
|
case 'preliminaryDesignDescription':
|
||||||
|
preliminaryDesignDescription.value = ''
|
||||||
|
break
|
||||||
|
case 'predictionEvaluationReport':
|
||||||
|
predictionEvaluationReport.value = ''
|
||||||
|
break
|
||||||
|
case 'predictionEvaluationReviewOpinions':
|
||||||
|
predictionEvaluationReviewOpinions.value = ''
|
||||||
|
break
|
||||||
|
case 'additionalAttachments':
|
||||||
|
additionalAttachments.value = ''
|
||||||
|
break
|
||||||
|
case 'substationMainWiringDiagram':
|
||||||
|
substationMainWiringDiagram.value = ''
|
||||||
|
break
|
||||||
|
case 'sensitiveDevices':
|
||||||
|
sensitiveDevices.value = ''
|
||||||
|
break
|
||||||
|
case 'antiInterferenceReport':
|
||||||
|
antiInterferenceReport.value = ''
|
||||||
|
break
|
||||||
|
case 'powerQualityReport':
|
||||||
|
powerQualityReport.value = ''
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
// 同步更新表单中的文件列表
|
||||||
|
form.value[val] = fileList
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 可研报告数组
|
// 可研报告数组
|
||||||
const feasibilityReport = ref('')
|
const feasibilityReport = ref('')
|
||||||
|
|||||||
@@ -1,23 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='default-main'>
|
<div class='default-main'>
|
||||||
<el-tabs v-model='activeName' type='border-card'>
|
<el-tabs v-model='activeName' type='border-card'>
|
||||||
<el-tab-pane label='未建档用户档案录入管理' name='1'>
|
<el-tab-pane :label="VITE_FLAG ? '预测评估' : '未建档用户档案录入管理'" name='1' v-if="tabList.includes('1')">
|
||||||
<undocumented ref='Undocumented' :id='id' v-if="activeName == '1'" />
|
<undocumented ref='Undocumented' :id='id' v-if="activeName == '1'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label='常态化干扰源用户管理' name='3'>
|
<el-tab-pane :label="VITE_FLAG ? '接入管理' : '常态化干扰源用户管理'" name='2' v-if="tabList.includes('2')">
|
||||||
<interferenceUserTable ref='InterferenceUserTable' :id='id' :businessKey="key" v-if="activeName == '3'" />
|
<interferenceUserTable ref='InterferenceUserTable' :id='id' :businessKey="key" v-if="activeName == '2'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang='ts'>
|
||||||
import { nextTick, ref, provide } from 'vue'
|
import { nextTick, ref, provide,onMounted } from 'vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import undocumented from './components/undocumented/index.vue'
|
import undocumented from './components/undocumented/index.vue'
|
||||||
import interferenceUserTable from './components/normalizationManager/interferenceUserTable.vue'
|
import interferenceUserTable from './components/normalizationManager/interferenceUserTable.vue'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const Undocumented = ref()
|
const Undocumented = ref()
|
||||||
const InterferenceUserTable = ref()
|
const InterferenceUserTable = ref()
|
||||||
@@ -27,7 +27,15 @@ defineOptions({
|
|||||||
const activeName = ref('1')
|
const activeName = ref('1')
|
||||||
const id = ref('')
|
const id = ref('')
|
||||||
const key = ref('')
|
const key = ref('')
|
||||||
|
const tabList = ref(['1', '2', ])
|
||||||
|
onMounted(() => {
|
||||||
|
let key = window.location.href.split('?')[0].slice(-1)
|
||||||
|
const isNumber = /^\d$/.test(key)
|
||||||
|
if (isNumber) {
|
||||||
|
tabList.value = [key]
|
||||||
|
activeName.value = key
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
watch(() => route.query.t, async (newValue, oldValue) => {
|
||||||
if (route.fullPath.includes('supervision/interferencemanagement')) {
|
if (route.fullPath.includes('supervision/interferencemanagement')) {
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ import { planDetailsAudit, sendAlarm } from '@/api/supervision-boot/plan/index'
|
|||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import { cancelPlanFormData } from '@/api/supervision-boot/plan/index'
|
import { cancelPlanFormData } from '@/api/supervision-boot/plan/index'
|
||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'plan'
|
name: 'plan'
|
||||||
@@ -71,9 +72,13 @@ const tableStore = new TableStore({
|
|||||||
// publicHeight: 65,
|
// publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
{
|
||||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
title: '序号',
|
||||||
} },
|
width: 80,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'province',
|
field: 'province',
|
||||||
title: '所属省份',
|
title: '所属省份',
|
||||||
@@ -270,9 +275,9 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
router.push({
|
router.push({
|
||||||
name: 'supervision/supervision/manage',
|
name: 'supervision/supervision/manage' + (VITE_FLAG ? '4' : ''),
|
||||||
query: {
|
query: {
|
||||||
type: 1
|
type: 4
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='default-main'>
|
<div class="default-main">
|
||||||
<el-tabs v-model='activeName' type='border-card'>
|
<el-tabs v-model="activeName" type="border-card">
|
||||||
<!-- <el-tab-pane label="概览" name="1"><overview v-if="activeName == '1'"/></el-tab-pane>
|
<!-- <el-tab-pane label="概览" name="1"><overview v-if="activeName == '1'"/></el-tab-pane>
|
||||||
<el-tab-pane label="技术监督管理" name="2"><technology v-if="activeName == '2'"/></el-tab-pane> -->
|
<el-tab-pane label="技术监督管理" name="2"><technology v-if="activeName == '2'"/></el-tab-pane> -->
|
||||||
|
|
||||||
<el-tab-pane label='预警单列表' name='3'>
|
<el-tab-pane label="预警单列表" name="3" v-if="tabList.includes('3')">
|
||||||
<earlyWarn :id="id" :businessKey='key' v-if="activeName == '3'" />
|
<earlyWarn :id="id" :businessKey="key" v-if="activeName == '3'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label='告警单列表' name='4'>
|
<el-tab-pane label="告警单列表" name="4" v-if="tabList.includes('4')">
|
||||||
<alarm :id="id" :businessKey='key' v-if="activeName == '4'" />
|
<alarm :id="id" :businessKey="key" v-if="activeName == '4'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang="ts">
|
||||||
import earlyWarn from './components/earlyWarn.vue'
|
import earlyWarn from './components/earlyWarn.vue'
|
||||||
import alarm from './components/alarm.vue'
|
import alarm from './components/alarm.vue'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
@@ -24,39 +24,49 @@ const route = useRoute()
|
|||||||
const id = ref('')
|
const id = ref('')
|
||||||
const key = ref('')
|
const key = ref('')
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'supervision/supervision/manage'
|
name: 'supervision/supervision/manage'
|
||||||
|
})
|
||||||
|
const tabList = ref(['3', '4'])
|
||||||
|
const activeName: any = ref('3')
|
||||||
|
onMounted(() => {
|
||||||
|
let key = window.location.href.split('?')[0].slice(-1)
|
||||||
|
const isNumber = /^\d$/.test(key)
|
||||||
|
if (isNumber) {
|
||||||
|
tabList.value = [key]
|
||||||
|
activeName.value = key
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const activeName: any = ref('3')
|
watch(
|
||||||
|
() => route.query.t,
|
||||||
|
async (newValue, oldValue) => {
|
||||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
if (route.fullPath.includes('supervision/supervision/manage')) {
|
||||||
if (route.fullPath.includes('supervision/supervision/manage')) {
|
let type = (route.query.type as string) || 'null'
|
||||||
let type = (route.query.type as string) || 'null'
|
if (type == 'null') {
|
||||||
if (type == 'null') { }
|
} else if (type == '0' || type == '3') {
|
||||||
else if (type == '0' || type == '3') {
|
activeName.value = '3'
|
||||||
activeName.value = '3'
|
} else {
|
||||||
} else {
|
activeName.value = '4'
|
||||||
activeName.value = '4'
|
}
|
||||||
}
|
id.value = (route.query.id as string) || 'null'
|
||||||
id.value = (route.query.id as string) || 'null'
|
key.value = (route.query.key as string) || 'null'
|
||||||
key.value = (route.query.key as string) || 'null'
|
id.value = id.value + '@' + route.query.t
|
||||||
id.value = id.value + '@' + route.query.t
|
}
|
||||||
}
|
},
|
||||||
}, { deep: true, immediate: true })
|
{ deep: true, immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
const layout = mainHeight(63) as any
|
const layout = mainHeight(63) as any
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang="scss" scoped>
|
||||||
.bars_w {
|
.bars_w {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-tabs__content) {
|
:deep(.el-tabs__content) {
|
||||||
height: v-bind('layout.height');
|
height: v-bind('layout.height');
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,26 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class='default-main'>
|
<div class="default-main">
|
||||||
<el-tabs v-model='activeName' type='border-card'>
|
<el-tabs v-model="activeName" type="border-card">
|
||||||
<el-tab-pane label='干扰源用户台账' name='1'>
|
<el-tab-pane label="干扰源用户台账" name="1" v-if="tabList.includes('1')">
|
||||||
<interferenceUserTable :id='id' v-if="activeName == '1'" />
|
<interferenceUserTable :id="id" v-if="activeName == '1'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label='敏感及重要用户台账' name='2'>
|
<el-tab-pane label="敏感及重要用户台账" name="2" v-if="tabList.includes('2')">
|
||||||
<sensitiveUserTable v-if="activeName == '2'" />
|
<sensitiveUserTable v-if="activeName == '2'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label='变电站台账' name='3'>
|
<el-tab-pane label="变电站台账" name="3" v-if="tabList.includes('3')">
|
||||||
<substationLedger v-if="activeName == '3'" />
|
<substationLedger v-if="activeName == '3'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label='终端台账' name='4'>
|
<el-tab-pane label="终端台账" name="4" v-if="tabList.includes('4')">
|
||||||
<deviceLedgerTable v-if="activeName == '4'" />
|
<deviceLedgerTable v-if="activeName == '4'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label='监测点台账' name='5'>
|
<el-tab-pane label="监测点台账" name="5" v-if="tabList.includes('5')">
|
||||||
<monitorLedgerTable v-if="activeName == '5'" />
|
<monitorLedgerTable v-if="activeName == '5'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang='ts'>
|
<script setup lang="ts">
|
||||||
import { onMounted, reactive, ref, provide } from 'vue'
|
import { onMounted, reactive, ref, provide } from 'vue'
|
||||||
import interferenceUserTable from './components/interferenceUserTable.vue'
|
import interferenceUserTable from './components/interferenceUserTable.vue'
|
||||||
import sensitiveUserTable from './components/sensitiveUserTable.vue'
|
import sensitiveUserTable from './components/sensitiveUserTable.vue'
|
||||||
@@ -37,23 +37,35 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
const activeName = ref('1')
|
const activeName = ref('1')
|
||||||
|
|
||||||
|
const tabList = ref(['1', '2', '3', '4', '5'])
|
||||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
onMounted(() => {
|
||||||
if (route.fullPath.includes('Supervision/Terminaldetection')) {
|
let key = window.location.href.split('?')[0].slice(-1)
|
||||||
let type = (route.query.type as string) || 'null'
|
const isNumber = /^\d$/.test(key)
|
||||||
if (type == 'null') { }
|
if (isNumber) {
|
||||||
else if (type == '1') {
|
tabList.value = [key]
|
||||||
activeName.value = '1'
|
activeName.value = key
|
||||||
}
|
|
||||||
id.value = (route.query.id as string) || 'null'
|
|
||||||
id.value = id.value + '@' + route.query.t
|
|
||||||
}
|
}
|
||||||
}, { deep: true, immediate: true })
|
})
|
||||||
|
watch(
|
||||||
|
() => route.query.t,
|
||||||
|
async (newValue, oldValue) => {
|
||||||
|
if (route.fullPath.includes('Supervision/Terminaldetection')) {
|
||||||
|
let type = (route.query.type as string) || 'null'
|
||||||
|
if (type == 'null') {
|
||||||
|
} else if (type == '1') {
|
||||||
|
activeName.value = '1'
|
||||||
|
}
|
||||||
|
id.value = (route.query.id as string) || 'null'
|
||||||
|
id.value = id.value + '@' + route.query.t
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ deep: true, immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
const layout = mainHeight(63) as any
|
const layout = mainHeight(63) as any
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang="scss" scoped>
|
||||||
.bars_w {
|
.bars_w {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
<el-form-item for="-" label="监测终端安装位置:" prop="monitoringDeviceInstallationPosition" class="label_over_warp">
|
<el-form-item for="-" label="监测终端安装位置:" prop="monitoringDeviceInstallationPosition" class="label_over_warp">
|
||||||
<!-- 电网侧、用户侧 -->
|
<!-- 电网侧、用户侧 -->
|
||||||
<el-select v-model="form.monitoringDeviceInstallationPosition" clearable style="width: 100%"
|
<el-select v-model="form.monitoringDeviceInstallationPosition" clearable style="width: 100%"
|
||||||
placeholder="请选择监测终端安装位置">
|
placeholder="请选择监测终端安装位置" disabled>
|
||||||
<el-option v-for="item in monitoringDeviceInstallationPositionList" :key="item.id"
|
<el-option v-for="item in monitoringDeviceInstallationPositionList" :key="item.id"
|
||||||
:label="item.name" :value="item.id"></el-option>
|
:label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -240,9 +240,9 @@
|
|||||||
<el-radio :value="0">关闭</el-radio>
|
<el-radio :value="0">关闭</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" label="电镀功能:" prop="electroplatingFunction">
|
<el-form-item for="-" label="电度功能:" prop="electroplatingFunction">
|
||||||
<!-- 默认 关闭 下拉框 -->
|
<!-- 默认 关闭 下拉框 -->
|
||||||
<el-select v-model="form.electroplatingFunction" clearable style="width: 100%" placeholder="请选择电镀功能">
|
<el-select v-model="form.electroplatingFunction" clearable style="width: 100%" placeholder="请选择电度功能">
|
||||||
<el-option v-for="item in electroplatingFunctionList" :key="item.id" :label="item.name"
|
<el-option v-for="item in electroplatingFunctionList" :key="item.id" :label="item.name"
|
||||||
:value="item.id"></el-option>
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -509,10 +509,15 @@ const changeSubstationFlag = () => {
|
|||||||
form.value.substationName = substationList.value.find((item: any) => {
|
form.value.substationName = substationList.value.find((item: any) => {
|
||||||
return form.value.substation == item.id
|
return form.value.substation == item.id
|
||||||
})?.name
|
})?.name
|
||||||
|
|
||||||
|
// 系统电站选"是"时,安装位置设为"电网侧"
|
||||||
|
form.value.monitoringDeviceInstallationPosition = '0'
|
||||||
} else {
|
} else {
|
||||||
form.value.substation = ''
|
form.value.substation = ''
|
||||||
form.value.substationName = ''
|
form.value.substationName = ''
|
||||||
form.value.substationVoltageLevel = voltageLevelList[0].id
|
form.value.substationVoltageLevel = voltageLevelList[0].id
|
||||||
|
// 系统电站选"否"时,安装位置设为"用户侧"
|
||||||
|
form.value.monitoringDeviceInstallationPosition = '1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
watch(
|
watch(
|
||||||
@@ -1345,9 +1350,14 @@ const confirmForm = async (flag: boolean) => {
|
|||||||
loading.value = false
|
loading.value = false
|
||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
// 编码改动
|
// 编码改动
|
||||||
const encode = (e: string) => {
|
const encode = (e: string) => {
|
||||||
form.value.monitoringTerminalName = e.replace(/:/g, '')
|
if(VITE_FLAG){
|
||||||
|
form.value.monitoringTerminalName = e.replace(/:/g, '')
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
defineExpose({ open })
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,71 +1,83 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<el-tabs v-model="activeName" type="border-card">
|
<el-tabs v-model="activeName" type="border-card">
|
||||||
<el-tab-pane label="终端入网检测" name="1">
|
<el-tab-pane label="终端检测" name="1" v-if="tabList.includes('1')">
|
||||||
<terminal :id="id" v-if="activeName == '1'" />
|
<terminal :id="id" v-if="activeName == '1'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="监测点台账录入" name="2">
|
<el-tab-pane label="监测点台账录入" name="2" v-if="tabList.includes('2')">
|
||||||
<monitorpoint :id="id" v-if="activeName == '2'" />
|
<monitorpoint :id="id" v-if="activeName == '2'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="监测点联调列表" name="3">
|
<el-tab-pane label="监测点联调列表" name="3" v-if="tabList.includes('3')">
|
||||||
<jointDebugList :id="id" v-if="activeName == '3'" />
|
<jointDebugList :id="id" v-if="activeName == '3'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="终端周期检测" name="4">
|
<el-tab-pane label="周期校验" name="4" v-if="tabList.includes('4')">
|
||||||
<cycleDetection :id="id" :businessKey='key' v-if="activeName == '4'" />
|
<cycleDetection :id="id" :businessKey="key" v-if="activeName == '4'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref, onMounted } from 'vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import terminal from './components/terminainal/index.vue'
|
import terminal from './components/terminainal/index.vue'
|
||||||
import monitorpoint from './components/monitorpoint/index.vue'
|
import monitorpoint from './components/monitorpoint/index.vue'
|
||||||
import jointDebugList from './components/jointDebugList/index.vue'
|
import jointDebugList from './components/jointDebugList/index.vue'
|
||||||
import cycleDetection from './components/cycleDetection/index.vue'
|
import cycleDetection from './components/cycleDetection/index.vue'
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'terminalNetwotk'
|
name: 'terminalNetwotk'
|
||||||
})
|
})
|
||||||
const activeName = ref('1')
|
const activeName = ref('1')
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const id = ref('')
|
const id = ref('')
|
||||||
const key = ref('')
|
const key = ref('')
|
||||||
|
const tabList = ref(['1', '2', '3', '4'])
|
||||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
onMounted(() => {
|
||||||
if (route.fullPath.includes('terminalNetwotk')) {
|
let key = window.location.href.split('?')[0].slice(-1)
|
||||||
let type = (route.query.type as string) || 'null'
|
const isNumber = /^\d$/.test(key)
|
||||||
if (type == 'null') { }
|
if (isNumber) {
|
||||||
else if (type == '1') {
|
tabList.value = [key]
|
||||||
activeName.value = '1'
|
activeName.value = key
|
||||||
} else if (type == '2') {
|
|
||||||
activeName.value = '2'
|
|
||||||
} else if (type == '3') {
|
|
||||||
activeName.value = '3'
|
|
||||||
} else {
|
|
||||||
activeName.value = '4'
|
|
||||||
}
|
}
|
||||||
id.value = (route.query.id as string) || 'null'
|
})
|
||||||
key.value = (route.query.key as string) || 'null'
|
|
||||||
id.value = id.value + '@' + route.query.t
|
|
||||||
}
|
|
||||||
}, { deep: true, immediate: true })
|
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route.query.t,
|
||||||
|
async (newValue, oldValue) => {
|
||||||
|
if (route.fullPath.includes('terminalNetwotk')) {
|
||||||
|
let type = (route.query.type as string) || 'null'
|
||||||
|
if (type == 'null') {
|
||||||
|
} else if (type == '1') {
|
||||||
|
activeName.value = '1'
|
||||||
|
} else if (type == '2') {
|
||||||
|
activeName.value = '2'
|
||||||
|
} else if (type == '3') {
|
||||||
|
activeName.value = '3'
|
||||||
|
} else {
|
||||||
|
activeName.value = '4'
|
||||||
|
}
|
||||||
|
id.value = (route.query.id as string) || 'null'
|
||||||
|
key.value = (route.query.key as string) || 'null'
|
||||||
|
id.value = id.value + '@' + route.query.t
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ deep: true, immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
const layout = mainHeight(63) as any
|
const layout = mainHeight(63) as any
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.bars_w {
|
.bars_w {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 500px;
|
height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-tabs__content) {
|
:deep(.el-tabs__content) {
|
||||||
height: v-bind('layout.height');
|
height: v-bind('layout.height');
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,21 +1,29 @@
|
|||||||
<!---试运行列表-->
|
<!---试运行列表-->
|
||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef">
|
<el-tabs v-model="activeName" type="border-card">
|
||||||
<template #select>
|
<el-tab-pane label="试运行评估" name="1">
|
||||||
<el-form-item label="流程状态">
|
<TableHeader area datePicker nextFlag theCurrentTime showTimeAll ref="TableHeaderRef">
|
||||||
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
<template #select>
|
||||||
<el-option v-for="item in statusSelect" :key="item.id" :label="item.name"
|
<el-form-item label="流程状态">
|
||||||
:value="item.id"></el-option>
|
<el-select v-model="tableStore.table.params.status" clearable placeholder="请选择流程状态">
|
||||||
</el-select>
|
<el-option
|
||||||
</el-form-item>
|
v-for="item in statusSelect"
|
||||||
</template>
|
:key="item.id"
|
||||||
<template #operation>
|
:label="item.name"
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="startRunTest">试运行</el-button>
|
:value="item.id"
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
></el-option>
|
||||||
</template>
|
</el-select>
|
||||||
</TableHeader>
|
</el-form-item>
|
||||||
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
</template>
|
||||||
|
<template #operation>
|
||||||
|
<el-button icon="el-icon-Plus" type="primary" @click="startRunTest">试运行</el-button>
|
||||||
|
<el-button icon="el-icon-Delete" type="primary" @click="deleteEven">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef" :checkbox-config="checkboxConfig" />
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
<!-- <el-dialog
|
<!-- <el-dialog
|
||||||
v-model='timeDialog'
|
v-model='timeDialog'
|
||||||
@@ -62,11 +70,11 @@ const { push } = useRouter()
|
|||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
const activeName = ref('1')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/tempLinedebug/pageHasDebug',
|
url: '/supervision-boot/tempLinedebug/pageHasDebug',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
// publicHeight: 65,
|
publicHeight: 65,
|
||||||
column: [
|
column: [
|
||||||
{ title: '', type: 'checkbox', width: 40 },
|
{ title: '', type: 'checkbox', width: 40 },
|
||||||
{ field: 'lineName', title: '监测点名称', minWidth: 160 },
|
{ field: 'lineName', title: '监测点名称', minWidth: 160 },
|
||||||
@@ -266,23 +274,20 @@ const deleteEven = () => {
|
|||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
let createBy = tableStore.table.selection.map(item => item.createBy)
|
||||||
|
let status = tableStore.table.selection.map(item => item.status)
|
||||||
|
if (adminInfo.roleCode.includes('delete_info')) {
|
||||||
|
deleteList()
|
||||||
|
} else if (createBy.includes(adminInfo.$state.id) && status.includes(0)) {
|
||||||
|
deleteList()
|
||||||
|
} else {
|
||||||
|
ElMessage({
|
||||||
|
type: 'warning',
|
||||||
|
message: '只能删除自己填报的数据!!!'
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.then(() => {
|
|
||||||
let createBy = tableStore.table.selection.map(item => item.createBy)
|
|
||||||
let status = tableStore.table.selection.map(item => item.status)
|
|
||||||
if (adminInfo.roleCode.includes('delete_info')) {
|
|
||||||
deleteList()
|
|
||||||
} else if (createBy.includes(adminInfo.$state.id) && status.includes(0)) {
|
|
||||||
deleteList()
|
|
||||||
} else {
|
|
||||||
ElMessage({
|
|
||||||
type: 'warning',
|
|
||||||
message: '只能删除自己填报的数据!!!'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -410,43 +415,46 @@ const runTestSubmit = (type: number) => {
|
|||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|
||||||
watch(() => route.query.t, async (newValue, oldValue) => {
|
watch(
|
||||||
let nowTime = Date.now()
|
() => route.query.t,
|
||||||
let routeTime = route.query.t as number || 1
|
async (newValue, oldValue) => {
|
||||||
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
let nowTime = Date.now()
|
||||||
if (route.fullPath.includes('/testRun')) {
|
let routeTime = (route.query.t as number) || 1
|
||||||
let id = (route.query.id as string) || 'null'
|
if (isNaN(routeTime) || nowTime - routeTime > import.meta.env.VITE_ROUTE_TIME_OUT) return // 路由时间超过500ms,则不执行
|
||||||
if (id != 'null') {
|
if (route.fullPath.includes('/testRun')) {
|
||||||
monitorIds = []
|
let id = (route.query.id as string) || 'null'
|
||||||
monitorIds.push(id)
|
if (id != 'null') {
|
||||||
const start = new Date()
|
monitorIds = []
|
||||||
start.setDate(start.getDate() + 1)
|
monitorIds.push(id)
|
||||||
start.setHours(0, 0, 0)
|
const start = new Date()
|
||||||
const end = new Date()
|
start.setDate(start.getDate() + 1)
|
||||||
end.setDate(end.getDate() + 3)
|
start.setHours(0, 0, 0)
|
||||||
end.setHours(23, 59, 59)
|
const end = new Date()
|
||||||
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
end.setDate(end.getDate() + 3)
|
||||||
const endString = formatDate(end, 'YYYY-MM-DD')
|
end.setHours(23, 59, 59)
|
||||||
const data = {
|
const startString = formatDate(start, 'YYYY-MM-DD') // 转换为 YYYY-MM-DD 格式
|
||||||
startTime: startString,
|
const endString = formatDate(end, 'YYYY-MM-DD')
|
||||||
endTime: endString,
|
const data = {
|
||||||
lineIds: monitorIds,
|
startTime: startString,
|
||||||
operateType: 1,
|
endTime: endString,
|
||||||
id
|
lineIds: monitorIds,
|
||||||
}
|
operateType: 1,
|
||||||
update(data).then((res: any) => {
|
id
|
||||||
if (res.code === 'A0000') {
|
|
||||||
ElMessage({
|
|
||||||
message: '发起试运行成功',
|
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
tableStore.index()
|
|
||||||
}
|
}
|
||||||
})
|
update(data).then((res: any) => {
|
||||||
|
if (res.code === 'A0000') {
|
||||||
|
ElMessage({
|
||||||
|
message: '发起试运行成功',
|
||||||
|
type: 'success'
|
||||||
|
})
|
||||||
|
tableStore.index()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
}, { deep: true, immediate: true })
|
{ deep: true, immediate: true }
|
||||||
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<el-tabs v-model="activeName" type="border-card">
|
<el-tabs v-model="activeName" type="border-card">
|
||||||
|
|
||||||
<el-tab-pane label="监测点台账录入" name="1">
|
<el-tab-pane label="监测点台账录入" name="1" v-if="tabList.includes('1')">
|
||||||
<monitorpoint :id="id" v-if="activeName == '1'" />
|
<monitorpoint :id="id" v-if="activeName == '1'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="监测点联调列表" name="2">
|
<el-tab-pane label="监测点联调列表" name="2" v-if="tabList.includes('2')">
|
||||||
<jointDebugList :id="id" v-if="activeName == '2'" />
|
<jointDebugList :id="id" v-if="activeName == '2'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="试运行评估" name="3">
|
<el-tab-pane label="试运行评估" name="3" v-if="tabList.includes('3')">
|
||||||
<testRun :id="id" v-if="activeName == '3'" />
|
<testRun :id="id" v-if="activeName == '3'" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref ,onMounted} from 'vue'
|
||||||
|
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import monitorpoint from '@/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/index.vue'
|
import monitorpoint from '@/views/pqs/supervise/terminalNetworkDetection/components/monitorpoint/index.vue'
|
||||||
@@ -29,7 +29,15 @@
|
|||||||
name: 'terminalNetwotk'
|
name: 'terminalNetwotk'
|
||||||
})
|
})
|
||||||
const activeName = ref('1')
|
const activeName = ref('1')
|
||||||
|
const tabList = ref(['1', '2', '3',])
|
||||||
|
onMounted(() => {
|
||||||
|
let key = window.location.href.split('?')[0].slice(-1)
|
||||||
|
const isNumber = /^\d$/.test(key)
|
||||||
|
if (isNumber) {
|
||||||
|
tabList.value = [key]
|
||||||
|
activeName.value = key
|
||||||
|
}
|
||||||
|
})
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const id = ref('')
|
const id = ref('')
|
||||||
const key = ref('')
|
const key = ref('')
|
||||||
|
|||||||
@@ -347,6 +347,7 @@ const cancelLeave = async (row: any) => {
|
|||||||
const needGovernance = ref()
|
const needGovernance = ref()
|
||||||
/** 方案审查 */
|
/** 方案审查 */
|
||||||
const toFangAn = (row: any, typeNo: number) => {
|
const toFangAn = (row: any, typeNo: number) => {
|
||||||
|
|
||||||
//查询详情拿到needGovernance
|
//查询详情拿到needGovernance
|
||||||
/** 获得数据 */
|
/** 获得数据 */
|
||||||
getUserReportById(row.id).then(res => {
|
getUserReportById(row.id).then(res => {
|
||||||
|
|||||||
@@ -837,6 +837,7 @@ watch(
|
|||||||
const resendId = ref('')
|
const resendId = ref('')
|
||||||
const status = ref('')
|
const status = ref('')
|
||||||
const open = async (row: any) => {
|
const open = async (row: any) => {
|
||||||
|
|
||||||
title.value = row.title
|
title.value = row.title
|
||||||
dialogFormVisible.value = true
|
dialogFormVisible.value = true
|
||||||
let deptIds = adminInfo.$state.deptId
|
let deptIds = adminInfo.$state.deptId
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user