运行情况
This commit is contained in:
@@ -109,14 +109,14 @@ const handlerBar = (options: any) => {
|
|||||||
item.itemStyle = Object.assign(
|
item.itemStyle = Object.assign(
|
||||||
{
|
{
|
||||||
color: (params: any) => {
|
color: (params: any) => {
|
||||||
console.log(params)
|
|
||||||
if (params.value == 0 || params.value == 3.14159) {
|
if (params.value == 0 || params.value == 3.14159) {
|
||||||
return '#ccc'
|
return '#ccc'
|
||||||
} else {
|
} else {
|
||||||
return color[params.seriesIndex]
|
return color[params.seriesIndex]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
item.itemStyle
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const height = mainHeight(82)
|
const height = mainHeight(82)
|
||||||
const activeName = ref('3')
|
const activeName = ref('1')
|
||||||
watch(
|
watch(
|
||||||
() => router.currentRoute.value.query.lineId,
|
() => router.currentRoute.value.query.lineId,
|
||||||
(newLineId, oldLineId) => {
|
(newLineId, oldLineId) => {
|
||||||
|
|||||||
@@ -9,6 +9,15 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style='flex: 1;' class='mt10 zanjiangfenbutongji'>
|
<div style='flex: 1;' class='mt10 zanjiangfenbutongji'>
|
||||||
|
<div
|
||||||
|
style='position: absolute; right: 10px; top: 10px; z-index: 2;display: flex;align-items: center;font-size: 12px'>
|
||||||
|
<el-tag style='width: 20px;height: 12px' :style='{background: gradeColor[2]}'></el-tag>
|
||||||
|
<span class='ml2' :style='{color: gradeColor[2]}'> {{ 'X<60%' }} </span>
|
||||||
|
<el-tag class='ml10' style='width: 20px;height: 12px' :style='{background: gradeColor[1]}'></el-tag>
|
||||||
|
<span class='ml2' :style='{color: gradeColor[1]}'>{{ '60%≤X<90%' }} </span>
|
||||||
|
<el-tag class='ml10' style='width: 20px;height: 12px' :style='{background: gradeColor[0]}'></el-tag>
|
||||||
|
<span class='ml2' :style='{color: gradeColor[0]}'> {{ 'X≥90 %' }}</span>
|
||||||
|
</div>
|
||||||
<my-echart :options='secondOptions' style='flex: 1;height: 100%' />
|
<my-echart :options='secondOptions' style='flex: 1;height: 100%' />
|
||||||
<my-echart :options='firstOptions' style='flex: 1;height: 100%' />
|
<my-echart :options='firstOptions' style='flex: 1;height: 100%' />
|
||||||
</div>
|
</div>
|
||||||
@@ -21,6 +30,7 @@ import MyEchart from '@/components/echarts/MyEchart.vue'
|
|||||||
import { useMonitoringPoint } from '@/views/pms/voltageSags/monitoringPoint/online/store'
|
import { useMonitoringPoint } from '@/views/pms/voltageSags/monitoringPoint/online/store'
|
||||||
import { getComFlagInfoData, getRunOnlineRateData } from '@/api/device-boot/communicate'
|
import { getComFlagInfoData, getRunOnlineRateData } from '@/api/device-boot/communicate'
|
||||||
import { gradeColor } from '@/components/echarts/color'
|
import { gradeColor } from '@/components/echarts/color'
|
||||||
|
|
||||||
const datePickerRef = ref()
|
const datePickerRef = ref()
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
@@ -73,10 +83,6 @@ const initFirst = () => {
|
|||||||
fontWeight: 'normal'
|
fontWeight: 'normal'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// legend: {
|
|
||||||
// data: ["在线率"],
|
|
||||||
// left: "5%",
|
|
||||||
// },
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
@@ -98,9 +104,9 @@ const initFirst = () => {
|
|||||||
tips += '时间:' + year + '-' + params[0].name + '</br/>'
|
tips += '时间:' + year + '-' + params[0].name + '</br/>'
|
||||||
for (let i = 0; i < params.length; i++) {
|
for (let i = 0; i < params.length; i++) {
|
||||||
if (params[i].value == 3.14159) {
|
if (params[i].value == 3.14159) {
|
||||||
tips += params[i].seriesName + ':暂无数据<br/>'
|
tips += '在线率' + ':暂无数据<br/>'
|
||||||
} else {
|
} else {
|
||||||
tips += params[i].seriesName + ':' + params[i].value + '%<br/>'
|
tips += '在线率' + ':' + params[i].value + '%<br/>'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tips
|
return tips
|
||||||
@@ -145,14 +151,21 @@ const initFirst = () => {
|
|||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: '在线率',
|
|
||||||
zlevel: -99,
|
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: handle,
|
data: handle,
|
||||||
label: {
|
itemStyle: {
|
||||||
normal: {
|
color: (params: any) => {
|
||||||
show: false,
|
if (params.value == 3.14159) {
|
||||||
position: 'top'
|
return '#ccc'
|
||||||
|
} else {
|
||||||
|
if (params.value < 60) {
|
||||||
|
return gradeColor[2]
|
||||||
|
} else if (params.value < 90) {
|
||||||
|
return gradeColor[1]
|
||||||
|
} else {
|
||||||
|
return gradeColor[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
markLine: {
|
markLine: {
|
||||||
@@ -240,10 +253,6 @@ const initSecond = () => {
|
|||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
legend: {
|
|
||||||
data: ['运行状态'],
|
|
||||||
left: '5%'
|
|
||||||
},
|
|
||||||
dataZoom: [
|
dataZoom: [
|
||||||
{
|
{
|
||||||
type: 'inside',
|
type: 'inside',
|
||||||
@@ -305,6 +314,7 @@ onMounted(() => {
|
|||||||
</script>
|
</script>
|
||||||
<style lang='scss'>
|
<style lang='scss'>
|
||||||
.zanjiangfenbutongji {
|
.zanjiangfenbutongji {
|
||||||
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user