Files
admin-sjzx/src/views/pqs/qualityInspeection/panorama/components/mapR.vue

464 lines
15 KiB
Vue
Raw Normal View History

2024-04-26 09:15:20 +08:00
<template>
2024-04-27 22:18:58 +08:00
<div :class="show ? 'show' : 'noshow'">
<div class="boxLeft" :style="height">
2024-04-26 09:15:20 +08:00
<!-- 综合评估 -->
<div>
<div class="title">
<span>综合评估</span>
<span class="info" @click="open(0)">
详情
<ArrowRight style="width: 12px" />
</span>
</div>
<div class="evaluate">
2024-04-27 22:18:58 +08:00
<div v-for="item in assessList" style="min-width: 50px">
2024-04-26 09:15:20 +08:00
<div>{{ item.name }}</div>
2024-04-27 22:18:58 +08:00
<div
style="margin-top: 5px"
:style="{
color:
item.score == 3.14159
? ''
: item.score > 4.5
? '#339966'
: item.score > 4
? '#3399ff'
: item.score > 3
? '#ffcc33'
: item.score > 2
? '#ff9900'
: item.score > 0
? '#cc0000'
: ''
}"
>
{{ item.score == 3.14159 ? '/' : item.score }}
</div>
2024-04-26 09:15:20 +08:00
</div>
</div>
</div>
<!-- 稳态电能质量水平评估 -->
<div>
<div class="title">
<span>稳态电能质量水平评估</span>
<span class="info" @click="open(1)">
详情
<ArrowRight style="width: 12px" />
</span>
</div>
<div :style="boxHeight" class="boxR">
<div class="top">
<span>
监测点越限占比:
2024-04-27 22:18:58 +08:00
<span class="num">
{{ harmonicLineRatio == 3.14159 ? '暂无数据' : harmonicLineRatio + '%' }}
</span>
2024-04-26 09:15:20 +08:00
</span>
2024-04-27 22:18:58 +08:00
<el-select v-model="harmonicType" style="width: 120px" @change="harmonicChange" size="small">
2024-04-26 09:15:20 +08:00
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</div>
2024-04-27 22:18:58 +08:00
<MyEChart :style="EchHeight" :options="harmonicCharts" />
2024-04-26 09:15:20 +08:00
</div>
</div>
2024-04-29 16:37:07 +08:00
<!-- 暂态电能质量水平评估 -->
2024-04-26 09:15:20 +08:00
<div>
<div class="title">
2024-04-29 16:37:07 +08:00
<span>暂态电能质量水平评估</span>
2024-04-26 09:15:20 +08:00
<span class="info" @click="open(2)">
详情
<ArrowRight style="width: 12px" />
</span>
</div>
<div :style="boxHeight" class="boxR">
<div class="top">
<span>
暂态事件严重度:
2024-04-27 22:18:58 +08:00
<span class="num">{{ transientNum }}%</span>
2024-04-26 09:15:20 +08:00
</span>
2024-04-27 22:18:58 +08:00
<el-select v-model="value" style="width: 120px" size="small" @change="transientChange">
<el-option v-for="item in options1" :key="item.id" :label="item.name" :value="item.id" />
2024-04-26 09:15:20 +08:00
</el-select>
</div>
<MyEChart :style="EchHeight" :options="WTCharts" />
</div>
</div>
<!-- 技术监督管理 -->
<div>
<div class="title">
<span>技术监督管理(问题数)</span>
<span class="info" @click="open(3)">
详情
<ArrowRight style="width: 12px" />
</span>
</div>
<div :style="boxHeight" class="boxR">
<div class="evaluate bottom">
<div v-for="item in JDlist" style="width: 80px">
<div>{{ item.name }}</div>
<div style="margin-top: 5px">{{ item.value }}</div>
</div>
</div>
<el-row style="height: calc(100% - 62px)">
<el-col :span="12" class="col" style="border-right: 1px solid #ccc">
<div>
<span>异常问题总数</span>
<span style="color: #2dcd28">60</span>
</div>
<div>
<span style="width: 120px">已关联工单数</span>
<span style="color: #81b337">60</span>
</div>
<div>
<span style="width: 120px"> 工单转换率</span>
<span style="color: #338dff">60%</span>
</div>
</el-col>
<el-col :span="12" class="col">
<div>
<span>异常问题总数</span>
<span style="color: #2dcd28">60</span>
</div>
<div>
<span style="width: 120px">已关联工单数</span>
<span style="color: #81b337">60</span>
</div>
<div>
<span style="width: 120px"> 工单转换率</span>
<span style="color: #338dff">60%</span>
</div>
</el-col>
</el-row>
</div>
</div>
</div>
2024-04-29 16:37:07 +08:00
<!-- <img
2024-04-26 09:15:20 +08:00
class="imgR"
:style="show ? 'transform: rotate(180deg);' : 'transform: rotate(0deg);'"
@click="show = !show"
src="@/assets/img/QH.png"
2024-04-29 16:37:07 +08:00
/> -->
2024-04-26 09:15:20 +08:00
<!-- 评估 -->
<Evaluate ref="evaluateRef" />
<!-- 稳态 -->
<steadyState ref="steadyStateRef" />
<!-- 暂态 -->
<temporaryState ref="temporaryStateRef" />
<!-- 技术 -->
<technique ref="techniqueRef" />
</div>
</template>
<script setup lang="ts">
import { onMounted, reactive, ref, provide } from 'vue'
import MyEChart from '@/components/echarts/MyEchart.vue'
import { useDictData } from '@/stores/dictData'
import { mainHeight } from '@/utils/layout'
import { ArrowRight } from '@element-plus/icons-vue'
import Evaluate from './details/evaluate.vue'
import steadyState from './details/steadyState.vue'
import temporaryState from './details/temporaryState.vue'
import technique from './details/technique.vue'
2024-04-27 22:18:58 +08:00
import { getAssessOverview, getEvaluationOverview, getEventLevelEvaluation } from '@/api/device-boot/panorama'
2024-04-26 09:15:20 +08:00
const dictData = useDictData()
const show = ref(false)
const height = mainHeight(30)
const boxHeight: any = mainHeight(270, 3)
const EchHeight: any = mainHeight(370, 3)
const evaluateRef = ref()
const steadyStateRef = ref()
2024-04-27 22:18:58 +08:00
const formRow: any = ref({})
2024-04-26 09:15:20 +08:00
const temporaryStateRef = ref()
const techniqueRef = ref()
const options = ref([
2024-04-27 22:18:58 +08:00
{
label: '全指标',
value: '0'
},
2024-04-26 09:15:20 +08:00
{
label: '电压偏差',
value: '1'
},
{
label: '频率偏差',
value: '2'
},
{
label: '电压总谐波畸变率',
value: '3'
},
{
label: '电压闪变',
value: '4'
},
{
label: '三相电压不平衡度',
value: '5'
}
])
2024-04-27 22:18:58 +08:00
const harmonicType = ref('0')
const transientNum = ref(0)
const options1: any = dictData.getBasicData('Event_Statis').filter(item => {
if (item.code == 'Voltage_Dip' || item.code == 'Voltage_Rise' || item.code == 'Short_Interruptions') {
return item
2024-04-26 09:15:20 +08:00
}
2024-04-27 22:18:58 +08:00
})
const assessList: any = ref([])
2024-04-26 09:15:20 +08:00
const JDlist = ref([
{
name: '技术监督计划',
value: 5
},
{
name: '用户投诉',
value: 5
},
{
name: '谐波普测',
value: 5
},
{
name: '在线系统',
value: 5
}
])
2024-04-27 22:18:58 +08:00
const harmonicCharts = ref()
const harmonicLineRatio: any = ref(0)
const WTCharts = ref({})
2024-04-26 09:15:20 +08:00
2024-04-27 22:18:58 +08:00
const value = ref(options1[0].id)
2024-04-26 09:15:20 +08:00
const open = (e: number) => {
if (e == 0) {
2024-04-27 22:18:58 +08:00
evaluateRef.value.open(formRow.value)
2024-04-26 09:15:20 +08:00
} else if (e == 1) {
2024-04-27 22:18:58 +08:00
steadyStateRef.value.open(formRow.value)
2024-04-26 09:15:20 +08:00
} else if (e == 2) {
2024-04-27 22:18:58 +08:00
temporaryStateRef.value.open(formRow.value)
2024-04-26 09:15:20 +08:00
} else if (e == 3) {
2024-04-27 22:18:58 +08:00
techniqueRef.value.open(formRow.value)
2024-04-26 09:15:20 +08:00
}
}
const info = (row: any) => {
let form = {
2024-04-27 22:18:58 +08:00
...row,
2024-04-26 09:15:20 +08:00
id: row.orgNo,
deptIndex: row.orgNo,
orgId: row.orgNo,
ids: [],
statisticalType: dictData.getBasicData('Statistical_Type', ['Report_Type'])[0],
isUpToGrid: row.isUpToGrid,
2024-04-27 22:18:58 +08:00
monitorFlag: row.isUpToGrid
2024-04-26 09:15:20 +08:00
}
2024-04-27 22:18:58 +08:00
formRow.value = form
// 综合评估
getAssessOverview(form).then(res => {
assessList.value = res.data
})
2024-04-29 16:37:07 +08:00
// 稳态电能质量水平评估概览数据
2024-04-27 22:18:58 +08:00
harmonicChange()
// 暂态统计详情
transientChange()
}
const harmonicChange = () => {
getEvaluationOverview({ ...formRow.value, harmonicType: harmonicType.value }).then(res => {
harmonicLineRatio.value = res.data.lineRatio
harmonicCharts.value = {
tooltip: {
formatter: function (params: any) {
return params[0].name + ':' + (params[0].value == 3.14159 ? '暂无数据' : params[0].value) + '%<br/>'
}
},
xAxis: {
name: '%',
type: 'value',
max: 100
},
legend: {
show: false
},
yAxis: {
type: 'category',
data: res.data.childrenList.map((item: any) => item.deptName)
},
grid: {
top: '10px',
left: '30px',
right: '30px',
bottom: '0px'
},
options: {
dataZoom: null,
series: [
{
name: '占比',
type: 'bar',
data: res.data.childrenList.map((item: any) => item.ratio),
label: {
show: true,
position: 'right',
fontSize: 12,
formatter: function (params: any) {
return `${params.value == 3.14159 ? '' : params.value}`
}
}
}
]
}
}
})
}
const transientChange = () => {
getEventLevelEvaluation({ ...formRow.value, ids: [value.value] }).then(res => {
let data = []
transientNum.value = 0
if (formRow.value.isUpToGrid == 0) {
data = res.data.info
transientNum.value = res.data.data
} else {
transientNum.value = res.data.gwData
data = res.data.gwInfo
}
WTCharts.value = {
tooltip: {
formatter: function (params: any) {
return params[0].name + ':' + (params[0].value == 3.14159 ? '暂无数据' : params[0].value) + '%<br/>'
}
},
xAxis: {
name: '%',
type: 'value',
max: 100
},
legend: {
show: false
},
yAxis: {
type: 'category',
data: data.map((item: any) => item.orgName)
},
grid: {
top: '10px',
left: '30px',
right: '30px',
bottom: '0px'
},
options: {
dataZoom: null,
series: [
{
name: '占比',
type: 'bar',
data: data.map((item: any) => item.count),
label: {
show: true,
position: 'right',
fontSize: 12,
formatter: function (params: any) {
return `${params.value}`
}
}
}
]
}
}
})
2024-04-26 09:15:20 +08:00
}
defineExpose({ info })
</script>
<style lang="scss" scoped>
.boxLeft {
background-color: #fff;
2024-04-27 22:18:58 +08:00
width: 100%;
padding: 10px 0px 10px 10px;
2024-04-26 09:15:20 +08:00
font-size: 13px;
overflow: hidden;
}
.title {
// height: ;
display: flex;
justify-content: space-between;
2024-04-27 22:18:58 +08:00
font-size: 16px;
2024-04-26 09:15:20 +08:00
height: 22px;
2024-04-27 22:18:58 +08:00
line-height: 23px;
2024-04-26 09:15:20 +08:00
padding-left: 5px;
width: 100%;
background-image: linear-gradient(to right, #a4e5da, #fff);
.info {
font-weight: normal;
display: flex;
font-size: 12px;
cursor: pointer;
}
}
.evaluate {
height: 60px;
border: 1px solid #ccc;
margin: 10px 0;
padding: 10px 0;
display: flex;
justify-content: space-around;
text-align: center;
2024-04-27 22:18:58 +08:00
overflow-x: auto;
overflow-y: hidden;
2024-04-26 09:15:20 +08:00
}
.boxR {
border: 1px solid #ccc;
margin: 10px 0;
padding: 5px;
.num {
color: #2478f2;
}
.top {
display: flex;
justify-content: space-between;
}
.bottom {
margin: 0;
border: 0px;
}
}
:deep(.el-select) {
min-width: 120px;
}
.col {
2024-04-29 16:37:07 +08:00
display: grid;
grid-template-columns: 1fr;
text-align: center;
2024-04-26 09:15:20 +08:00
}
.imgR {
position: absolute;
padding: 10px;
top: calc(50% - 80px);
left: -23px;
z-index: 1;
height: 200px;
cursor: pointer;
}
.show {
width: 0px;
2024-04-27 22:18:58 +08:00
transition: all 0.3s ease;
.boxLeft {
padding: 0;
}
2024-04-26 09:15:20 +08:00
}
.noshow {
2024-04-27 22:18:58 +08:00
width: 25%;
2024-04-26 09:15:20 +08:00
transition: all 0.3s ease;
2024-04-27 22:18:58 +08:00
.boxLeft {
padding: 10px 0px 10px 10px;
}
2024-04-26 09:15:20 +08:00
}
</style>