站点首页优化
This commit is contained in:
@ -2,6 +2,7 @@
|
|||||||
<div class="time-range">
|
<div class="time-range">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dateRange"
|
v-model="dateRange"
|
||||||
|
:class="miniTimePicker ? 'mini-date-picker' : ''"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
range-separator="至"
|
range-separator="至"
|
||||||
start-placeholder="开始时间"
|
start-placeholder="开始时间"
|
||||||
@ -10,16 +11,47 @@
|
|||||||
:picker-options="pickerOptions"
|
:picker-options="pickerOptions"
|
||||||
end-placeholder="结束时间">
|
end-placeholder="结束时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
|
<template v-if="!showIcon">
|
||||||
<el-button size="mini" style="margin-left: 10px;" :loading="loading" @click="reset">重置</el-button>
|
<el-button size="mini" style="margin-left: 10px;" :loading="loading" @click="reset">重置</el-button>
|
||||||
<el-button type="primary" size="mini" :loading="loading" @click="search">搜索</el-button>
|
<el-button type="primary" size="mini" :loading="loading" @click="search">搜索</el-button>
|
||||||
<el-button type="primary" size="mini" :loading="loading" @click="timeLine('before')">上一时段</el-button>
|
<el-button type="primary" size="mini" :loading="loading" @click="timeLine('before')">上一时段</el-button>
|
||||||
<el-button type="primary" size="mini" :loading="loading" @click="timeLine('next')" :disabled="disabledNextBtn">下一时段</el-button>
|
<el-button type="primary" size="mini" :loading="loading" @click="timeLine('next')" :disabled="disabledNextBtn">
|
||||||
|
下一时段
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-button class="btn-icon" icon="el-icon-refresh-right" circle size="mini" style="margin-left: 8px;"
|
||||||
|
:loading="loading"
|
||||||
|
@click="reset"></el-button>
|
||||||
|
<el-button class="btn-icon" type="primary" size="mini" icon="el-icon-search" circle :loading="loading"
|
||||||
|
@click="search"></el-button>
|
||||||
|
<el-button class="btn-icon" type="primary" size="mini" icon="el-icon-d-arrow-left" circle :loading="loading"
|
||||||
|
@click="timeLine('before')"></el-button>
|
||||||
|
<el-button class="btn-icon" type="primary" size="mini" icon="el-icon-d-arrow-right" circle :loading="loading"
|
||||||
|
@click="timeLine('next')"
|
||||||
|
:disabled="disabledNextBtn"></el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {formatDate} from '@/filters/ems'
|
import {formatDate} from '@/filters/ems'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
showIcon: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
miniTimePicker: {
|
||||||
|
type: Boolean,
|
||||||
|
required: false,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
disabledNextBtn() {
|
disabledNextBtn() {
|
||||||
return new Date(this.dateRange[1]) >= new Date(this.defaultDateRange[1])
|
return new Date(this.dateRange[1]) >= new Date(this.defaultDateRange[1])
|
||||||
@ -63,7 +95,8 @@ export default {
|
|||||||
},
|
},
|
||||||
timeLine(type) {
|
timeLine(type) {
|
||||||
if (!this.dateRange || !this.dateRange[0] || !this.dateRange[1]) return
|
if (!this.dateRange || !this.dateRange[0] || !this.dateRange[1]) return
|
||||||
const nowStartTimes = new Date(this.dateRange[0]).getTime(),nowEndTimes = new Date(this.dateRange[1]).getTime(),maxTime = new Date(this.defaultDateRange[1]).getTime()
|
const nowStartTimes = new Date(this.dateRange[0]).getTime(), nowEndTimes = new Date(this.dateRange[1]).getTime(),
|
||||||
|
maxTime = new Date(this.defaultDateRange[1]).getTime()
|
||||||
const nowDis = nowEndTimes - nowStartTimes//用户当前选择时间差 可能=0
|
const nowDis = nowEndTimes - nowStartTimes//用户当前选择时间差 可能=0
|
||||||
//baseTime,maxTime 毫秒数
|
//baseTime,maxTime 毫秒数
|
||||||
const baseDis = 24 * 60 * 60 * 1000
|
const baseDis = 24 * 60 * 60 * 1000
|
||||||
@ -82,19 +115,35 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.time-range {
|
.time-range {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
::v-deep {
|
::v-deep {
|
||||||
|
|
||||||
.el-range-editor--medium .el-range__icon, .el-range-editor--medium .el-range__close-icon {
|
.el-range-editor--medium .el-range__icon, .el-range-editor--medium .el-range__close-icon {
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-range-editor--medium.el-input__inner {
|
.el-range-editor--medium.el-input__inner {
|
||||||
height: 30px;
|
height: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-range-editor--medium .el-range-separator {
|
.el-range-editor--medium .el-range-separator {
|
||||||
line-height: 24px;
|
line-height: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-button--mini {
|
.el-button--mini {
|
||||||
padding: 3px 10px;
|
padding: 3px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 展示icon的小组件
|
||||||
|
.btn-icon.el-button--mini {
|
||||||
|
padding: 3px 8px;
|
||||||
|
margin-left: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
//小宽度时间选择框
|
||||||
|
.mini-date-picker {
|
||||||
|
width: 250px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="always" class="common-card-container common-card-container-body-no-padding time-range-card">
|
<el-card shadow="always" class="common-card-container common-card-container-body-no-padding time-range-card">
|
||||||
<div slot="header" class="time-range-header">
|
<div slot="header" class="time-range-header">
|
||||||
<span class="card-title">当日功率曲线</span>
|
<span class="card-title">当日功率曲线</span>
|
||||||
<date-range-select ref="dateRangeSelect" @updateDate="updateDate"/>
|
<date-range-select ref="dateRangeSelect" :showIcon="true" :mini-time-picker="true" @updateDate="updateDate"/>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 310px" id="activeChart"></div>
|
<div style="height: 310px" id="activeChart"></div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -108,7 +107,13 @@ export default {
|
|||||||
dataset: {source},
|
dataset: {source},
|
||||||
series: source[0].slice(1).map((item, index) => {
|
series: source[0].slice(1).map((item, index) => {
|
||||||
return {
|
return {
|
||||||
type: 'line',
|
type: 'line',//index === 5 ? 'bar' : 'line',
|
||||||
|
showSymbol: false,
|
||||||
|
symbolSize: 2,
|
||||||
|
smooth: true,
|
||||||
|
areaStyle: {
|
||||||
|
opacity: 0.5,
|
||||||
|
},
|
||||||
yAxisIndex: index <= 4 ? 0 : 1
|
yAxisIndex: index <= 4 ? 0 : 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<el-card shadow="always" class="common-card-container common-card-container-body-no-padding time-range-card">
|
<el-card shadow="always" class="common-card-container common-card-container-body-no-padding time-range-card">
|
||||||
<div slot="header" class="time-range-header">
|
<div slot="header" class="time-range-header">
|
||||||
<span class="card-title">一周充放曲线</span>
|
<span class="card-title">一周充放曲线</span>
|
||||||
<date-range-select ref="dateRangeSelect" @updateDate="updateDate"/>
|
<date-range-select ref="dateRangeSelect" :showIcon="true" :mini-time-picker="true" @updateDate="updateDate"/>
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 310px" id="weekChart"></div>
|
<div style="height: 310px" id="weekChart"></div>
|
||||||
</el-card>
|
</el-card>
|
||||||
@ -14,6 +13,7 @@ import * as echarts from 'echarts'
|
|||||||
import resize from '@/mixins/ems/resize'
|
import resize from '@/mixins/ems/resize'
|
||||||
import DateRangeSelect from '@/components/Ems/DateRangeSelect/index.vue'
|
import DateRangeSelect from '@/components/Ems/DateRangeSelect/index.vue'
|
||||||
import {getSevenChargeData} from '@/api/ems/dzjk'
|
import {getSevenChargeData} from '@/api/ems/dzjk'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [resize],
|
mixins: [resize],
|
||||||
components: {DateRangeSelect},
|
components: {DateRangeSelect},
|
||||||
@ -45,7 +45,6 @@ export default {
|
|||||||
getWeekKData() {
|
getWeekKData() {
|
||||||
this.showLoading()
|
this.showLoading()
|
||||||
const {siteId, timeRange} = this
|
const {siteId, timeRange} = this
|
||||||
this.hideLoading()
|
|
||||||
getSevenChargeData({siteId, startDate: timeRange[0], endDate: timeRange[1]}).then(response => {
|
getSevenChargeData({siteId, startDate: timeRange[0], endDate: timeRange[1]}).then(response => {
|
||||||
this.setOption(response?.data || [])
|
this.setOption(response?.data || [])
|
||||||
}).finally(() => this.hideLoading())
|
}).finally(() => this.hideLoading())
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<el-row style="background: #fff" class="row-container" :gutter="15">
|
<el-row style="background: #fff" class="row-container" :gutter="15">
|
||||||
<el-col :xs="24" :sm="24" :lg="8">
|
<el-col :xs="24" :sm="24" :lg="5">
|
||||||
|
<!-- 站点信息-->
|
||||||
<el-card
|
<el-card
|
||||||
shadow="always"
|
shadow="always"
|
||||||
class="common-card-container common-card-container-body-no-padding"
|
class="common-card-container common-card-container-body-no-padding"
|
||||||
@ -9,87 +10,96 @@
|
|||||||
<div slot="header">
|
<div slot="header">
|
||||||
<span class="card-title">站点信息</span>
|
<span class="card-title">站点信息</span>
|
||||||
<div class="alarm-msg" v-if="tableData.length > 0" @click="toAlarm">
|
<div class="alarm-msg" v-if="tableData.length > 0" @click="toAlarm">
|
||||||
<i class="el-icon-message-solid"></i>
|
<i class="el-icon-message-solid"></i> 设备告警
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style="box-sizing: border-box; height: 250px; padding: 20px 15px"
|
style="box-sizing: border-box; height: 218px; padding: 20px 15px"
|
||||||
>
|
>
|
||||||
<el-descriptions class="home-normal-info" :column="1">
|
<!-- 地址、运行时间-->
|
||||||
<el-descriptions-item
|
<div class="site-info site-info-address">
|
||||||
size="mini"
|
<div class="title">
|
||||||
v-for="(item, index) in singleZdInfo"
|
<i class="el-icon-location"></i>
|
||||||
:key="index + 'singleZdInfo'"
|
</div>
|
||||||
:label="item.title"
|
<div class="value">{{ info.siteAddress }}</div>
|
||||||
>{{ info[item.attr] | formatNumber }}
|
</div>
|
||||||
</el-descriptions-item
|
<div class="site-info">
|
||||||
|
<div class="title">
|
||||||
|
<i class="el-icon-date"></i>
|
||||||
|
</div>
|
||||||
|
<div class="value">{{ info.runningTime || '-' }}</div>
|
||||||
|
</div>
|
||||||
|
<!-- 装机功率、容量 -->
|
||||||
|
<el-row :gutter="10" style="margin-top:20px;">
|
||||||
|
<el-col
|
||||||
|
:span="12"
|
||||||
|
class="sjgl-col power-col"
|
||||||
>
|
>
|
||||||
</el-descriptions>
|
<div class="sjgl-wrapper">
|
||||||
|
<div class="sjgl-title">装机功率(MW)</div>
|
||||||
|
<div class="sjgl-value">
|
||||||
|
{{ info.installPower | formatNumber }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col
|
||||||
|
:span="12"
|
||||||
|
class="sjgl-col power-col"
|
||||||
|
>
|
||||||
|
<div class="sjgl-wrapper">
|
||||||
|
<div class="sjgl-title">装机容量(MW)</div>
|
||||||
|
<div class="sjgl-value">
|
||||||
|
{{ info.installCapacity | formatNumber }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :lg="16">
|
<!--策略信息-->
|
||||||
<cl-info :info="runningInfo.strategyTempInfo"/>
|
<!-- <el-col :xs="24" :sm="24" :lg="16">-->
|
||||||
</el-col>
|
<!-- <cl-info :info="runningInfo.strategyTempInfo"/>-->
|
||||||
<el-col :xs="24" :sm="24" :lg="12">
|
<!-- </el-col>-->
|
||||||
|
<!-- 总累计运行数据-->
|
||||||
|
<el-col :xs="24" :sm="24" :lg="19">
|
||||||
<el-card
|
<el-card
|
||||||
shadow="always"
|
shadow="always"
|
||||||
class="common-card-container common-card-container-body-no-padding"
|
class="common-card-container common-card-container-body-no-padding"
|
||||||
>
|
>
|
||||||
<div slot="header">
|
<div slot="header">
|
||||||
<span class="card-title">总累计运行数据</span>
|
<span class="card-title">总累计运行数据</span>
|
||||||
|
<div class="total-count">
|
||||||
|
<span class="title">总收入</span>
|
||||||
|
<span class="value">{{ runningInfo.totalRevenue | formatNumber }}</span>
|
||||||
|
<span class="unit">元</span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style="box-sizing: border-box; height: 250px; padding: 20px 15px"
|
style="box-sizing: border-box; height: 218px; padding: 20px 15px"
|
||||||
>
|
>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="10">
|
||||||
<el-col
|
<el-col
|
||||||
:span="12"
|
:span="6"
|
||||||
v-for="(item, index) in sjglData"
|
v-for="(item, index) in sjglData"
|
||||||
:key="index + 'sjglData'"
|
:key="index + 'sjglData'"
|
||||||
class="sjgl-data"
|
class="sjgl-col"
|
||||||
>
|
>
|
||||||
|
<div class="sjgl-wrapper">
|
||||||
<div class="sjgl-title">{{ item.title }}</div>
|
<div class="sjgl-title">{{ item.title }}</div>
|
||||||
<div class="sjgl-value">
|
<div class="sjgl-value" :style="{color:item.color}">
|
||||||
{{ runningInfo[item.attr] | formatNumber }}
|
{{ runningInfo[item.attr] | formatNumber }}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :lg="12">
|
<el-col :xs="24" :sm="24" :lg="12">
|
||||||
<el-card
|
|
||||||
shadow="always"
|
|
||||||
class="common-card-container common-card-container-body-no-padding"
|
|
||||||
>
|
|
||||||
<div slot="header">
|
|
||||||
<span class="card-title">收入对比数据</span>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
style="box-sizing: border-box; height: 250px; padding: 20px 15px"
|
|
||||||
>
|
|
||||||
<el-row :gutter="20">
|
|
||||||
<el-col
|
|
||||||
v-for="(item, index) in revenueData"
|
|
||||||
:key="index + 'revenueData'"
|
|
||||||
:span="index === 2 ? 24 : 12"
|
|
||||||
class="sjgl-data"
|
|
||||||
:style="{marginTop:index === 2 ? '40px' : 0}"
|
|
||||||
>
|
|
||||||
<div class="sjgl-title">{{ item.title }}</div>
|
|
||||||
<div class="sjgl-value">
|
|
||||||
{{ runningInfo[item.attr] | formatNumber }}
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</el-card>
|
|
||||||
</el-col>
|
|
||||||
<el-col :xs="24" :sm="24" :lg="24">
|
|
||||||
<week-chart ref="weekChart"/>
|
<week-chart ref="weekChart"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :lg="24">
|
<el-col :xs="24" :sm="24" :lg="12">
|
||||||
<active-chart ref="activeChart"/>
|
<active-chart ref="activeChart"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -113,62 +123,46 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
singleZdInfo: [
|
|
||||||
{
|
|
||||||
title: "电站位置",
|
|
||||||
attr: "siteAddress",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "投运时间",
|
|
||||||
attr: "runningTime",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "装机功率(MW)",
|
|
||||||
attr: "installPower",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "装机容量(MW)",
|
|
||||||
attr: "installCapacity",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
sjglData: [
|
sjglData: [
|
||||||
{
|
{
|
||||||
title: "今日充电量(kWh)",
|
title: "今日充电量(kWh)",
|
||||||
attr: "dayChargedCap",
|
attr: "dayChargedCap",
|
||||||
|
color: '#4472c4'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "今日放电量(kWh)",
|
title: "今日放电量(kWh)",
|
||||||
attr: "dayDisChargedCap",
|
attr: "dayDisChargedCap",
|
||||||
},
|
color: '#70ad47'
|
||||||
{
|
|
||||||
title: "昨日充电量(kWh)",
|
|
||||||
attr: "todo",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "昨日放电量(kWh)",
|
|
||||||
attr: "todo",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "总充电量(kWh)",
|
title: "总充电量(kWh)",
|
||||||
attr: "totalChargedCap",
|
attr: "totalChargedCap",
|
||||||
|
color: '#4472c4'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "今日实时收入(元)",
|
||||||
|
attr: "dayRevenue",
|
||||||
|
color: '#f67438'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "昨日充电量(kWh)",
|
||||||
|
attr: "todo",
|
||||||
|
color: '#4472c4'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "昨日放电量(kWh)",
|
||||||
|
attr: "todo",
|
||||||
|
color: '#70ad47'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "总放电量(kWh)",
|
title: "总放电量(kWh)",
|
||||||
attr: "totalDischargedCap",
|
attr: "totalDischargedCap",
|
||||||
},
|
color: '#70ad47'
|
||||||
],
|
|
||||||
revenueData: [
|
|
||||||
{
|
|
||||||
title: "当日实时收入(元)",
|
|
||||||
attr: "dayRevenue",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "昨日实时收入(元)",
|
title: "昨日实时收入(元)",
|
||||||
attr: "todo",
|
attr: "todo",
|
||||||
},
|
color: '#f67438'
|
||||||
{
|
|
||||||
title: "总收入(元)",
|
|
||||||
attr: "totalRevenue",
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
info: {}, //基本信息
|
info: {}, //基本信息
|
||||||
@ -217,21 +211,73 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
//设备告警
|
||||||
.alarm-msg {
|
.alarm-msg {
|
||||||
background: #ffcec6;
|
background: #ff4949;
|
||||||
width: 32px;
|
padding: 2px 5px;
|
||||||
border-radius: 17px;
|
font-size: 10px;
|
||||||
text-align: center;
|
font-weight: bolder;
|
||||||
font-size: 22px;
|
border-radius: 3px;
|
||||||
line-height: 30px;
|
line-height: 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: #ff4949;
|
color: #fff;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 20px;
|
right: 10px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//基本信息-地址 运行️时间
|
||||||
|
.site-info {
|
||||||
|
display: flex;
|
||||||
|
font-size: 12px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
&.site-info-address {
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
color: #1791ff;
|
||||||
|
font-size: 18px;
|
||||||
|
line-height: 20px;
|
||||||
|
margin-right: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.value {
|
||||||
|
color: #000;
|
||||||
|
font-size: 12px;
|
||||||
|
max-height: 40px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//总收入
|
||||||
|
.total-count {
|
||||||
|
position: absolute;
|
||||||
|
right: 10px;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: bolder;
|
||||||
|
color: #333;
|
||||||
|
line-height: 14px;
|
||||||
|
|
||||||
|
.unit {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
|
||||||
|
.value {
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: bolder;
|
||||||
|
color: #ed2f1d;
|
||||||
|
font-style: italic;
|
||||||
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.row-container {
|
.row-container {
|
||||||
& > .el-col {
|
& > .el-col {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
@ -239,28 +285,47 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//数据概览
|
//数据概览
|
||||||
.sjgl-data {
|
.sjgl-col {
|
||||||
text-align: center;
|
.sjgl-wrapper {
|
||||||
|
text-align: left;
|
||||||
|
padding: 15px 20px;
|
||||||
|
background-color: #f2f7fb;
|
||||||
|
}
|
||||||
|
|
||||||
&:nth-child(1),
|
&.power-col {
|
||||||
|
.sjgl-wrapper {
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
|
.sjgl-value {
|
||||||
|
color: #c44444;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:nth-child(4),
|
||||||
&:nth-child(2),
|
&:nth-child(2),
|
||||||
&:nth-child(3),
|
&:nth-child(3),
|
||||||
&:nth-child(4) {
|
&:nth-child(4) {
|
||||||
margin-bottom: 25px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sjgl-title {
|
.sjgl-title {
|
||||||
color: #666666;
|
color: #717171;
|
||||||
line-height: 14px;
|
line-height: 14px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sjgl-value {
|
.sjgl-value {
|
||||||
color: rgba(51, 51, 51, 1);
|
color: rgba(51, 51, 51, 1);
|
||||||
font-size: 26px;
|
font-size: 22px;
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
font-weight: 500;
|
font-weight: bolder;
|
||||||
|
font-style: italic;
|
||||||
margin-top: 14px;
|
margin-top: 14px;
|
||||||
word-wrap: break-word;
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,577 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="ems-dashboard-editor-container" v-loading="loading">
|
|
||||||
<div class="container" v-show="!empty">
|
|
||||||
<!-- 云、电脑 -->
|
|
||||||
<div class="top">
|
|
||||||
<div class="cloud-container">
|
|
||||||
<div class="cloud">
|
|
||||||
<span style="z-index: 2; position: relative">云</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="double-arrows">
|
|
||||||
<div class="top-arrows"></div>
|
|
||||||
<div class="bottom-arrows"></div>
|
|
||||||
</div>
|
|
||||||
<div class="computer">
|
|
||||||
<img src="@/assets/images/ems/computer.png" alt="" />
|
|
||||||
<span style="z-index: 2; position: relative">ems</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="outer-border">
|
|
||||||
<!-- 电表-->
|
|
||||||
<div class="row-lists-container" v-if="showDb">
|
|
||||||
<div class="row-title">电表({{ db.length }})</div>
|
|
||||||
<div class="row-lists">
|
|
||||||
<div v-for="item in db" :key="item.deviceId" class="row-items">
|
|
||||||
<div
|
|
||||||
class="status"
|
|
||||||
:class="
|
|
||||||
item.communicationStatus === '0' ? 'status-running' : ''
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ communicationStatusOptions[item.communicationStatus] }}
|
|
||||||
</div>
|
|
||||||
<div class="row-items-img">
|
|
||||||
<img
|
|
||||||
class="img-db"
|
|
||||||
:src="require('@/assets/images/ems/db.png')"
|
|
||||||
/>
|
|
||||||
<div class="name">{{ item.deviceName }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 液冷-->
|
|
||||||
<div class="row-lists-container" v-if="showLq">
|
|
||||||
<div class="row-title">冷却({{ lq.length }})</div>
|
|
||||||
<div class="row-lists">
|
|
||||||
<div v-for="item in lq" :key="item.deviceId" class="row-items">
|
|
||||||
<div
|
|
||||||
class="status"
|
|
||||||
:class="
|
|
||||||
item.communicationStatus === '0' ? 'status-running' : ''
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ communicationStatusOptions[item.communicationStatus] }}
|
|
||||||
</div>
|
|
||||||
<div class="row-items-img">
|
|
||||||
<img
|
|
||||||
class="img-lq"
|
|
||||||
:src="require('@/assets/images/ems/lq.png')"
|
|
||||||
/>
|
|
||||||
<div class="name">{{ item.deviceName }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- PCS-->
|
|
||||||
<div class="row-lists-container" v-if="showPcs">
|
|
||||||
<div class="row-lists">
|
|
||||||
<div class="row-title">PCS({{ pcs.length }})</div>
|
|
||||||
<div
|
|
||||||
v-for="(item, index) in pcs"
|
|
||||||
:key="item.deviceId"
|
|
||||||
class="row-items row-items-pcs"
|
|
||||||
>
|
|
||||||
<!-- pcs -->
|
|
||||||
<div class="parent-dash">
|
|
||||||
<div
|
|
||||||
class="status"
|
|
||||||
:class="
|
|
||||||
item.communicationStatus === '0' ? 'status-running' : ''
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ communicationStatusOptions[item.communicationStatus] }}
|
|
||||||
</div>
|
|
||||||
<div class="row-items-img">
|
|
||||||
<img
|
|
||||||
class="img-pcs"
|
|
||||||
:src="require('@/assets/images/ems/pcs.png')"
|
|
||||||
/>
|
|
||||||
<div class="name">{{ item.deviceName }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 子设备 bms -->
|
|
||||||
<div
|
|
||||||
v-if="item.children && item.children.length > 0"
|
|
||||||
class="children-dash"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="row-children-title"
|
|
||||||
v-if="bmsHasParentLength > 0 && index === 0"
|
|
||||||
>
|
|
||||||
BMS({{ bmsHasParentLength }})
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-for="(childrenItem, childrenIndex) in item.children"
|
|
||||||
:key="childrenIndex + 'childrenBms'"
|
|
||||||
class="children-dash-items"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="status"
|
|
||||||
:class="
|
|
||||||
childrenItem.communicationStatus === '0'
|
|
||||||
? 'status-running'
|
|
||||||
: ''
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{
|
|
||||||
communicationStatusOptions[
|
|
||||||
childrenItem.communicationStatus
|
|
||||||
]
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<div class="row-items-img">
|
|
||||||
<img
|
|
||||||
class="img-pcs"
|
|
||||||
:src="require('@/assets/images/ems/bms.png')"
|
|
||||||
/>
|
|
||||||
<div class="name">{{ childrenItem.deviceName }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row-lists-container" v-if="showPcs">
|
|
||||||
<div class="row-title">PCS({{ pcs.length }})</div>
|
|
||||||
<div class="row-lists">
|
|
||||||
<div
|
|
||||||
v-for="item in bmsNoParent"
|
|
||||||
:key="item.deviceId"
|
|
||||||
class="row-items row-items-pcs"
|
|
||||||
>
|
|
||||||
<!-- pcs -->
|
|
||||||
<div class="parent-dash">
|
|
||||||
<div
|
|
||||||
class="status"
|
|
||||||
:class="
|
|
||||||
item.communicationStatus === '0' ? 'status-running' : ''
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ communicationStatusOptions[item.communicationStatus] }}
|
|
||||||
</div>
|
|
||||||
<div class="row-items-img">
|
|
||||||
<img :src="require('@/assets/images/ems/bms.png')" />
|
|
||||||
<div class="name">{{ item.deviceName }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- bms没有上级设备-->
|
|
||||||
<div class="row-lists-container" v-if="bmsNoParent.length > 0">
|
|
||||||
<div class="row-title">BMS({{ bmsNoParent.length }})</div>
|
|
||||||
<div class="row-lists">
|
|
||||||
<div
|
|
||||||
v-for="item in bmsNoParent"
|
|
||||||
:key="item.deviceId"
|
|
||||||
class="row-items row-items-pcs"
|
|
||||||
>
|
|
||||||
<!-- pcs -->
|
|
||||||
<div class="parent-dash">
|
|
||||||
<div
|
|
||||||
class="status"
|
|
||||||
:class="
|
|
||||||
item.communicationStatus === '0' ? 'status-running' : ''
|
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ communicationStatusOptions[item.communicationStatus] }}
|
|
||||||
</div>
|
|
||||||
<div class="row-items-img">
|
|
||||||
<img :src="require('@/assets/images/ems/bms.png')" />
|
|
||||||
<div class="name">{{ item.deviceName }}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-empty v-show="empty" :image-size="200"></el-empty>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { getDeviceList } from "@/api/ems/site";
|
|
||||||
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
|
||||||
import { mapState } from "vuex";
|
|
||||||
export default {
|
|
||||||
name: "DzjkZxlt",
|
|
||||||
mixins: [getQuerySiteId],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
loading: false,
|
|
||||||
pcs: [],
|
|
||||||
bms: [],
|
|
||||||
db: [],
|
|
||||||
lq: [],
|
|
||||||
pcsHasChildren: [],
|
|
||||||
pcsNoChildren: [],
|
|
||||||
bmsNoParent: [],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
...mapState({
|
|
||||||
communicationStatusOptions: (state) =>
|
|
||||||
state.ems.communicationStatusOptions,
|
|
||||||
}),
|
|
||||||
|
|
||||||
showPcs() {
|
|
||||||
return this.pcs.length > 0;
|
|
||||||
},
|
|
||||||
showBms() {
|
|
||||||
return this.bms.length > 0;
|
|
||||||
},
|
|
||||||
showDb() {
|
|
||||||
return this.db.length > 0;
|
|
||||||
},
|
|
||||||
showLq() {
|
|
||||||
return this.lq.length > 0;
|
|
||||||
},
|
|
||||||
bmsHasParentLength() {
|
|
||||||
let count = 0;
|
|
||||||
this.pcs.forEach((item) => (count += item.children.length));
|
|
||||||
return count;
|
|
||||||
},
|
|
||||||
empty() {
|
|
||||||
return !this.showBms && !this.showPcs && !this.showDb && !this.showLq;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
init() {
|
|
||||||
this.pcs = [];
|
|
||||||
this.bms = [];
|
|
||||||
this.lq = [];
|
|
||||||
this.db = [];
|
|
||||||
this.bmsNoParent = [];
|
|
||||||
this.loading = true;
|
|
||||||
getDeviceList(this.siteId)
|
|
||||||
.then((response) => {
|
|
||||||
const data = JSON.parse(JSON.stringify(response?.data || []));
|
|
||||||
let pcs = [],
|
|
||||||
bms = [],
|
|
||||||
db = [],
|
|
||||||
lq = [],
|
|
||||||
bmsNoParent = [];
|
|
||||||
data.forEach((item) => {
|
|
||||||
// 电表
|
|
||||||
if (item.deviceCategory === "AMMETER") {
|
|
||||||
db.push({ ...item, children: [] });
|
|
||||||
} else if (item.deviceCategory === "PCS") {
|
|
||||||
// pcs
|
|
||||||
pcs.push({ ...item, children: [] });
|
|
||||||
} else if (item.deviceCategory === "STACK") {
|
|
||||||
// bms
|
|
||||||
bms.push({ ...item, children: [] });
|
|
||||||
} else if (item.deviceCategory === "COOLING") {
|
|
||||||
// 液冷
|
|
||||||
lq.push({ ...item, children: [] });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
bms.forEach((item, index) => {
|
|
||||||
if (item.parentId) {
|
|
||||||
pcs
|
|
||||||
.find((pcsItem) => pcsItem.deviceId === item.parentId)
|
|
||||||
.children.push(item);
|
|
||||||
} else {
|
|
||||||
bmsNoParent.push(item);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
this.pcs = pcs;
|
|
||||||
this.bms = bms;
|
|
||||||
this.lq = lq;
|
|
||||||
this.db = db;
|
|
||||||
this.pcsHasChildren = pcs.filter((item) => item.children.length > 0);
|
|
||||||
this.pcsNoChildren = pcs.filter((item) => item.children.length === 0);
|
|
||||||
this.bmsNoParent = bmsNoParent;
|
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
$sqDistance: 30px;
|
|
||||||
$borderColor: #174a8e;
|
|
||||||
$lineColor: #86bcc7;
|
|
||||||
|
|
||||||
.ems-dashboard-editor-container {
|
|
||||||
background-color: #ffffff;
|
|
||||||
padding: 0;
|
|
||||||
color: #666666;
|
|
||||||
|
|
||||||
.container {
|
|
||||||
display: flex;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
//云 、计算机 、箭头
|
|
||||||
.top {
|
|
||||||
z-index: 2;
|
|
||||||
width: fit-content;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
// position: absolute;
|
|
||||||
// top: 50%;
|
|
||||||
// left: 0;
|
|
||||||
// transform: translateY(-50%);
|
|
||||||
//云 样式
|
|
||||||
.cloud-container {
|
|
||||||
margin: 0 auto;
|
|
||||||
.cloud {
|
|
||||||
width: 60px;
|
|
||||||
height: 26px;
|
|
||||||
background: #cbebfd;
|
|
||||||
border-radius: 100px;
|
|
||||||
position: relative;
|
|
||||||
text-align: center;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 26px;
|
|
||||||
}
|
|
||||||
.cloud:before,
|
|
||||||
.cloud:after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
background: #cbebfd;
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
border-radius: 100%;
|
|
||||||
}
|
|
||||||
.cloud:before {
|
|
||||||
top: -9px;
|
|
||||||
left: 8px;
|
|
||||||
}
|
|
||||||
.cloud:after {
|
|
||||||
top: -6px;
|
|
||||||
right: 9px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//双箭头
|
|
||||||
.double-arrows {
|
|
||||||
height: fit-content;
|
|
||||||
margin: 0 10px;
|
|
||||||
text-align: center;
|
|
||||||
.top-arrows,
|
|
||||||
.bottom-arrows {
|
|
||||||
height: 4px;
|
|
||||||
width: 30px;
|
|
||||||
background-color: #5ea9df;
|
|
||||||
margin: 0 10px;
|
|
||||||
position: relative;
|
|
||||||
&::after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.top-arrows {
|
|
||||||
vertical-align: super;
|
|
||||||
}
|
|
||||||
.top-arrows::after {
|
|
||||||
top: -4px;
|
|
||||||
border-bottom: 6px solid transparent;
|
|
||||||
border-left: 6px solid transparent;
|
|
||||||
border-right: 6px solid #5ea9df;
|
|
||||||
border-top: 6px solid transparent;
|
|
||||||
left: -11px;
|
|
||||||
}
|
|
||||||
.bottom-arrows {
|
|
||||||
margin-top: 8px;
|
|
||||||
&::after {
|
|
||||||
top: -4px;
|
|
||||||
border-top: 6px solid transparent;
|
|
||||||
border-left: 6px solid #5ea9df;
|
|
||||||
border-right: 6px solid transparent;
|
|
||||||
border-bottom: 6px solid transparent;
|
|
||||||
right: -11px;
|
|
||||||
left: auto;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//电脑
|
|
||||||
.computer {
|
|
||||||
text-align: center;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 16px;
|
|
||||||
font-weight: bold;
|
|
||||||
position: relative;
|
|
||||||
background: #fff;
|
|
||||||
img {
|
|
||||||
width: 80px;
|
|
||||||
height: auto;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.outer-border {
|
|
||||||
position: relative;
|
|
||||||
width: fit-content;
|
|
||||||
border: 1.5px solid $borderColor;
|
|
||||||
border-radius: 5px;
|
|
||||||
padding-left: 120px;
|
|
||||||
padding-right: 20px;
|
|
||||||
margin-left: -40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 设备列表
|
|
||||||
.row-lists-container {
|
|
||||||
font-size: 10px;
|
|
||||||
position: relative;
|
|
||||||
padding: 10px;
|
|
||||||
.row-title {
|
|
||||||
position: absolute;
|
|
||||||
left: -$sqDistance - 30px;
|
|
||||||
top: calc(50% + 10px);
|
|
||||||
transform: translateY(-50%);
|
|
||||||
color: #000;
|
|
||||||
font-weight: bolder;
|
|
||||||
}
|
|
||||||
.row-lists {
|
|
||||||
display: flex;
|
|
||||||
position: relative;
|
|
||||||
.row-items {
|
|
||||||
position: relative;
|
|
||||||
padding: 5px 0;
|
|
||||||
&:not(:first-child) {
|
|
||||||
margin-left: $sqDistance; //和外层父元素上下padding一致
|
|
||||||
}
|
|
||||||
&::before {
|
|
||||||
content: "";
|
|
||||||
display: block;
|
|
||||||
height: 3px;
|
|
||||||
width: $sqDistance - 2px;
|
|
||||||
background: $lineColor;
|
|
||||||
position: absolute;
|
|
||||||
left: -$sqDistance;
|
|
||||||
top: calc(50% + 10px);
|
|
||||||
transform: scale(1, 0.4);
|
|
||||||
}
|
|
||||||
// 一列 第一个设备最上面的线
|
|
||||||
&:first-child {
|
|
||||||
&::before {
|
|
||||||
width: $sqDistance + 20px;
|
|
||||||
// top: -$sqDistance - 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 一列 最后一个设备最下面的线
|
|
||||||
// &:last-child {
|
|
||||||
// &::after {
|
|
||||||
// content: "";
|
|
||||||
// display: block;
|
|
||||||
// width: 3px;
|
|
||||||
// height: $sqDistance - 2px;
|
|
||||||
// background: $lineColor;
|
|
||||||
// position: absolute;
|
|
||||||
// bottom: -$sqDistance;
|
|
||||||
// left: 50%;
|
|
||||||
// transform: scale(0.4, 1);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// 设备状态
|
|
||||||
.status {
|
|
||||||
margin: 0 auto 4px;
|
|
||||||
width: fit-content;
|
|
||||||
height: 18px;
|
|
||||||
padding: 0 8px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 8px;
|
|
||||||
line-height: 18px;
|
|
||||||
border: 1px solid #08ffff;
|
|
||||||
border-radius: 2px;
|
|
||||||
background: #aaaaaa;
|
|
||||||
color: #ffffff;
|
|
||||||
&.status-running {
|
|
||||||
background: #00c69c;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 图片+设备名称
|
|
||||||
.row-items-img {
|
|
||||||
position: relative;
|
|
||||||
padding-top: 12px;
|
|
||||||
img {
|
|
||||||
width: 80px;
|
|
||||||
height: auto;
|
|
||||||
display: block;
|
|
||||||
&.img-lq {
|
|
||||||
width: 50px;
|
|
||||||
}
|
|
||||||
&.img-pcs {
|
|
||||||
width: 50px;
|
|
||||||
}
|
|
||||||
&.img-db {
|
|
||||||
width: 56px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.name {
|
|
||||||
position: absolute;
|
|
||||||
top: 1px;
|
|
||||||
left: 0;
|
|
||||||
color: #666;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//子设备
|
|
||||||
.row-lists-container-children {
|
|
||||||
margin: 10px 0 0 $sqDistance;
|
|
||||||
.parent-dash {
|
|
||||||
position: relative;
|
|
||||||
&::before {
|
|
||||||
content: "";
|
|
||||||
display: block;
|
|
||||||
height: 40px;
|
|
||||||
width: 3px;
|
|
||||||
background: #ec7f8c;
|
|
||||||
position: absolute;
|
|
||||||
left: 20%;
|
|
||||||
top: -40px;
|
|
||||||
transform: scale(0.4, 1) rotate(-40deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.parent-dash {
|
|
||||||
width: fit-content;
|
|
||||||
}
|
|
||||||
.children-dash {
|
|
||||||
margin: $sqDistance 0 0 $sqDistance;
|
|
||||||
position: relative;
|
|
||||||
.row-children-title {
|
|
||||||
position: absolute;
|
|
||||||
left: -$sqDistance - 30px;
|
|
||||||
top: calc(50% + 10px);
|
|
||||||
transform: translateY(-50%);
|
|
||||||
color: #000;
|
|
||||||
font-weight: bolder;
|
|
||||||
}
|
|
||||||
.children-dash-items {
|
|
||||||
position: relative;
|
|
||||||
&::before {
|
|
||||||
content: "";
|
|
||||||
display: block;
|
|
||||||
height: $sqDistance;
|
|
||||||
width: 3px;
|
|
||||||
background: #ec7f8c;
|
|
||||||
position: absolute;
|
|
||||||
left: 20%;
|
|
||||||
top: -$sqDistance;
|
|
||||||
transform: scale(0.4, 1) rotate(-40deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@ -1,614 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="ems-dashboard-editor-container" v-loading="loading" >
|
|
||||||
<div class="container" v-show="!empty">
|
|
||||||
<div class="top">
|
|
||||||
<div class="cloud-container">
|
|
||||||
<div class="cloud">
|
|
||||||
<span style="z-index:2;position: relative;">云</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="double-arrows">
|
|
||||||
<div class="top-arrows"></div>
|
|
||||||
<div class="bottom-arrows"></div>
|
|
||||||
</div>
|
|
||||||
<div class="computer">
|
|
||||||
<img src="@/assets/images/ems/computer.png" alt="">
|
|
||||||
<span style="z-index:2;position: relative;">ems</span>
|
|
||||||
</div>
|
|
||||||
<div class="arrow"></div>
|
|
||||||
</div>
|
|
||||||
<div class="bottom">
|
|
||||||
<!-- 四列设备-->
|
|
||||||
<div class="zxlt-row">
|
|
||||||
<!-- bms、pcs 下级和上级在一列 -->
|
|
||||||
<div class="row-lists pcs-row-lists" v-if="showPcsAndBms">
|
|
||||||
<div class="item-square">
|
|
||||||
<div class="row-lists-title" v-if="showPcs">PCS({{pcs.length}})</div>
|
|
||||||
<div class="row-lists-title" v-if="showBms">BMS({{bms.length}})</div>
|
|
||||||
</div>
|
|
||||||
<!-- 上下级块 class区分-->
|
|
||||||
<div class="item-square pcs-has-children-item-square" :class="{'no-bms-list':!showBms}" v-for="(item,index) in pcsHasChildren" :key="index+'pcsHasChildren'">
|
|
||||||
<!-- 左边的上级 上级只有一个-->
|
|
||||||
<div class="item-lists parent-item-lists">
|
|
||||||
<!-- 上级设备-->
|
|
||||||
<div class="items normal-items-arrow">
|
|
||||||
<div class="items-inner">
|
|
||||||
<div style="text-align: center;margin-bottom:10px;">
|
|
||||||
<div class="status" :class="item.communicationStatus === '0' ?'status-normal' : 'status-warn'">通讯状态:{{communicationStatusOptions[item.communicationStatus] || '-'}}</div>
|
|
||||||
</div>
|
|
||||||
<img v-if="item.pictureUrl" :src="item.pictureUrl">
|
|
||||||
<img v-else :src="require('@/assets/images/ems/pcs.png')"/>
|
|
||||||
<div class="name">{{item.deviceName}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 右边的下级 下级有多个-->
|
|
||||||
<div class="item-lists children-item-lists">
|
|
||||||
<!-- 下级设备 循环生成-->
|
|
||||||
<div class="items children-items-arrow bms-children-arrow" v-for="children in item.children" :key="children.deviceId">
|
|
||||||
<div class="items-inner">
|
|
||||||
<div style="text-align: center;margin-bottom:10px;">
|
|
||||||
<div class="status" :class="children.communicationStatus === '0' ?'status-normal' : 'status-warn'">通讯状态:{{communicationStatusOptions[children.communicationStatus] || '-'}}</div>
|
|
||||||
</div>
|
|
||||||
<img v-if="children.pictureUrl" :src="children.pictureUrl">
|
|
||||||
<img v-else :src="require('@/assets/images/ems/bms.png')"/>
|
|
||||||
<div class="name">{{children.deviceName}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- 没有上下级关系的bms、pcs-->
|
|
||||||
<div class="item-square" :class="{'no-bms-list':!showBms}">
|
|
||||||
<!-- 左边没有下级的pcs-->
|
|
||||||
<div class="item-lists">
|
|
||||||
<div class="items normal-items-arrow" v-for="item in pcsNoChildren" :key="item.deviceId">
|
|
||||||
<div class="items-inner">
|
|
||||||
<div style="text-align: center;margin-bottom:10px;">
|
|
||||||
<div class="status" :class="item.communicationStatus === '0' ?'status-normal' : 'status-warn'">通讯状态:{{communicationStatusOptions[item.communicationStatus] || '-'}}</div>
|
|
||||||
</div>
|
|
||||||
<img v-if="item.pictureUrl" :src="item.pictureUrl">
|
|
||||||
<img v-else :src="require('@/assets/images/ems/pcs.png')"/>
|
|
||||||
<div class="name">{{item.deviceName}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 右边没有上级的bms-->
|
|
||||||
<div class="item-lists">
|
|
||||||
<!-- 下级设备 循环生成-->
|
|
||||||
<div class="items children-items-arrow" v-for="item in bmsNoParent" :key="item.deviceId">
|
|
||||||
<div class="items-inner">
|
|
||||||
<div style="text-align: center;margin-bottom:10px;">
|
|
||||||
<div class="status" :class="item.communicationStatus === '0' ?'status-normal' : 'status-warn'">通讯状态:{{communicationStatusOptions[item.communicationStatus] || '-'}}</div>
|
|
||||||
</div>
|
|
||||||
<img v-if="item.pictureUrl" :src="item.pictureUrl">
|
|
||||||
<img v-else :src="require('@/assets/images/ems/bms.png')"/>
|
|
||||||
<div class="name">{{item.deviceName}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- 电表-->
|
|
||||||
<div class="row-lists" v-if="showDb">
|
|
||||||
<div class="item-square">
|
|
||||||
<div class="row-lists-title" style="width:100%;">电表({{db.length}})</div>
|
|
||||||
</div>
|
|
||||||
<div class="item-square">
|
|
||||||
<!-- 左边的下级 下级有多个-->
|
|
||||||
<div class="item-lists">
|
|
||||||
<!-- 下级设备 循环生成-->
|
|
||||||
<div class="items normal-items-arrow" v-for="item in db" :key="item.deviceId">
|
|
||||||
<div class="items-inner">
|
|
||||||
<div style="text-align: center;margin-bottom:10px;">
|
|
||||||
<div class="status" :class="item.communicationStatus === '0' ?'status-normal' : 'status-warn'">通讯状态:{{communicationStatusOptions[item.communicationStatus] || '-'}}</div>
|
|
||||||
</div>
|
|
||||||
<img v-if="item.pictureUrl" :src="item.pictureUrl">
|
|
||||||
<img v-else :src="require('@/assets/images/ems/bms.png')"/>
|
|
||||||
<div class="name">{{item.deviceName}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!--冷却-->
|
|
||||||
<div class="row-lists" v-if="showLq">
|
|
||||||
<div class="item-square">
|
|
||||||
<div class="row-lists-title" style="width:100%;">冷却({{lq.length}})</div>
|
|
||||||
</div>
|
|
||||||
<div class="item-square">
|
|
||||||
<div class="item-lists">
|
|
||||||
<div class="items normal-items-arrow" v-for="item in lq" :key="item.deviceId">
|
|
||||||
<div class="items-inner">
|
|
||||||
<div style="text-align: center;margin-bottom:10px;">
|
|
||||||
<div class="status" :class="item.communicationStatus === '0' ?'status-normal' : 'status-warn'">通讯状态:{{communicationStatusOptions[item.communicationStatus] || '-'}}</div>
|
|
||||||
</div>
|
|
||||||
<img v-if="item.pictureUrl" :src="item.pictureUrl">
|
|
||||||
<img v-else :src="require('@/assets/images/ems/bms.png')"/>
|
|
||||||
<div class="name">{{item.deviceName}}</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-empty v-show="empty" :image-size="200"></el-empty>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import {getDeviceList} from'@/api/ems/site'
|
|
||||||
import getQuerySiteId from "@/mixins/ems/getQuerySiteId";
|
|
||||||
import {mapState} from "vuex";
|
|
||||||
export default {
|
|
||||||
name: 'DzjkZxlt',
|
|
||||||
mixins: [getQuerySiteId],
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
loading:false,
|
|
||||||
pcs :[],
|
|
||||||
bms:[],
|
|
||||||
db:[],
|
|
||||||
lq:[],
|
|
||||||
pcsHasChildren:[],
|
|
||||||
pcsNoChildren:[],
|
|
||||||
bmsNoParent:[]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
computed:{
|
|
||||||
...mapState({
|
|
||||||
communicationStatusOptions:(state)=>state.ems.communicationStatusOptions
|
|
||||||
}),
|
|
||||||
|
|
||||||
showPcs(){
|
|
||||||
return this.pcs.length>0
|
|
||||||
},
|
|
||||||
showBms(){
|
|
||||||
return this.bms.length>0
|
|
||||||
},
|
|
||||||
showDb(){
|
|
||||||
return this.db.length>0
|
|
||||||
},
|
|
||||||
showLq(){
|
|
||||||
return this.lq.length>0
|
|
||||||
},
|
|
||||||
showPcsAndBms(){
|
|
||||||
return this.showPcs || this.showBms
|
|
||||||
},
|
|
||||||
empty(){
|
|
||||||
return !this.showBms && !this.showPcs && !this.showDb && !this.showLq
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
init(){
|
|
||||||
this.pcs = []
|
|
||||||
this.bms = []
|
|
||||||
this.lq=[]
|
|
||||||
this.db=[]
|
|
||||||
this.bmsNoParent=[]
|
|
||||||
this.loading = true
|
|
||||||
getDeviceList(this.siteId).then(response => {
|
|
||||||
const data =JSON.parse(JSON.stringify(response?.data || []))
|
|
||||||
let pcs = [],bms=[],db=[],lq=[],bmsNoParent=[]
|
|
||||||
data.forEach(item=>{
|
|
||||||
// 电表
|
|
||||||
if(item.deviceCategory === 'AMMETER'){
|
|
||||||
db.push({...item,children:[]})
|
|
||||||
}else if(item.deviceCategory === 'PCS'){
|
|
||||||
// pcs
|
|
||||||
pcs.push({...item,children:[]})
|
|
||||||
}else if(item.deviceCategory === 'STACK'){
|
|
||||||
// bms
|
|
||||||
bms.push({...item,children:[]})
|
|
||||||
}else if(item.deviceCategory === 'COOLING'){
|
|
||||||
// 液冷
|
|
||||||
lq.push({...item,children:[]})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
bms.forEach((item,index)=>{
|
|
||||||
if(item.parentId){
|
|
||||||
pcs.find(pcsItem=>pcsItem.deviceId === item.parentId).children.push(item)
|
|
||||||
}else{
|
|
||||||
bmsNoParent.push(item)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.pcs = pcs
|
|
||||||
this.bms = bms
|
|
||||||
this.lq=lq
|
|
||||||
this.db=db
|
|
||||||
this.pcsHasChildren = pcs.filter(item=>item.children.length > 0)
|
|
||||||
this.pcsNoChildren = pcs.filter(item=>item.children.length === 0)
|
|
||||||
this.bmsNoParent = bmsNoParent
|
|
||||||
}).finally(() => {
|
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
$distance:60px;
|
|
||||||
$arrowDistance:80px;//margin:60+quare的padding10
|
|
||||||
$arrowColoe:#5ea9df;
|
|
||||||
$lineColoe:#5ea9df;
|
|
||||||
.ems-dashboard-editor-container {
|
|
||||||
background-color: #ffffff;
|
|
||||||
padding:0;
|
|
||||||
.container{
|
|
||||||
position: relative;
|
|
||||||
overflow-x: auto;
|
|
||||||
}
|
|
||||||
//云 、计算机 、箭头
|
|
||||||
.top{
|
|
||||||
width: 280px;
|
|
||||||
font-size: 30px;
|
|
||||||
line-height: 40px;
|
|
||||||
font-weight: 500;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
//云 样式
|
|
||||||
.cloud-container{
|
|
||||||
padding-top:40px;
|
|
||||||
margin:0 auto;
|
|
||||||
.cloud {
|
|
||||||
width: 150px;
|
|
||||||
height: 60px;
|
|
||||||
background: #cbebfd;
|
|
||||||
border-radius: 200px;
|
|
||||||
position: relative;
|
|
||||||
text-align: center;
|
|
||||||
color:#666666;
|
|
||||||
}
|
|
||||||
.cloud:before, .cloud:after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
background:#cbebfd;
|
|
||||||
width: 80px;
|
|
||||||
height: 80px;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
.cloud:before {
|
|
||||||
top: -28px;
|
|
||||||
left: 20px;
|
|
||||||
}
|
|
||||||
.cloud:after {
|
|
||||||
top: -31px;
|
|
||||||
right: 20px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//双箭头
|
|
||||||
.double-arrows {
|
|
||||||
height: 50px;
|
|
||||||
margin:20px 0;
|
|
||||||
text-align: center;
|
|
||||||
.top-arrows,.bottom-arrows{
|
|
||||||
height: 100%;
|
|
||||||
width: 6px;
|
|
||||||
background-color: $arrowColoe;
|
|
||||||
display: inline-block;
|
|
||||||
margin: 0 10px;
|
|
||||||
position: relative;
|
|
||||||
vertical-align: super;
|
|
||||||
&::after {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
left:0;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.top-arrows{
|
|
||||||
vertical-align: super;
|
|
||||||
}
|
|
||||||
.top-arrows::after {
|
|
||||||
bottom: -24px;
|
|
||||||
border-bottom: 12px solid transparent;
|
|
||||||
border-left: 12px solid transparent;
|
|
||||||
border-right: 12px solid transparent;
|
|
||||||
border-top: 14px solid $arrowColoe;
|
|
||||||
left: -9px;
|
|
||||||
}
|
|
||||||
.bottom-arrows{
|
|
||||||
margin-top:12px;
|
|
||||||
&::after {
|
|
||||||
top: -24px;
|
|
||||||
border-top: 12px solid transparent;
|
|
||||||
border-left: 12px solid transparent;
|
|
||||||
border-right: 12px solid transparent;
|
|
||||||
border-bottom: 14px solid $arrowColoe;
|
|
||||||
left: -9px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
//电脑
|
|
||||||
.computer{
|
|
||||||
margin:20px auto;
|
|
||||||
text-align: center;
|
|
||||||
color:#666666;
|
|
||||||
position: relative;
|
|
||||||
img {
|
|
||||||
width: auto;
|
|
||||||
height: 100px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.arrow{
|
|
||||||
height: 50px;
|
|
||||||
width: 30px;
|
|
||||||
border-radius: 5px;
|
|
||||||
background-color: $arrowColoe;
|
|
||||||
position: relative;
|
|
||||||
margin:0 auto;
|
|
||||||
&::after{
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
left: -9px;
|
|
||||||
border-top: 24px solid $arrowColoe;
|
|
||||||
border-left: 24px solid transparent;
|
|
||||||
border-bottom: 24px solid transparent;
|
|
||||||
border-right: 24px solid transparent;
|
|
||||||
bottom: -44px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.bottom{
|
|
||||||
z-index:1;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin-top:50px;
|
|
||||||
.zxlt-row{
|
|
||||||
display: flex;
|
|
||||||
padding:20px $distance;
|
|
||||||
position: relative;
|
|
||||||
width: fit-content;
|
|
||||||
&:before{
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
width:calc(100% - 100px);
|
|
||||||
height:1px;
|
|
||||||
background-color: $lineColoe;
|
|
||||||
position:absolute;
|
|
||||||
top:0;
|
|
||||||
left: $distance/2;
|
|
||||||
}
|
|
||||||
.row-lists{
|
|
||||||
height: fit-content;
|
|
||||||
position: relative;
|
|
||||||
&:before{
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
height: 100%;
|
|
||||||
width: 1px;
|
|
||||||
position: absolute;
|
|
||||||
left:-($distance/2);
|
|
||||||
top:-20px;
|
|
||||||
background-color: $lineColoe;
|
|
||||||
}
|
|
||||||
//pcs列 bms右侧的边框
|
|
||||||
&.pcs-row-lists{
|
|
||||||
&:after{
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
height: 100%;
|
|
||||||
width: 1px;
|
|
||||||
position: absolute;
|
|
||||||
right:-(($distance/2) + 1);
|
|
||||||
top:-20px;
|
|
||||||
background-color: $lineColoe;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:not(:last-child){
|
|
||||||
margin-right: $distance;
|
|
||||||
}
|
|
||||||
.item-square{
|
|
||||||
//左右 两列
|
|
||||||
display: flex;
|
|
||||||
vertical-align: middle;
|
|
||||||
align-items: flex-start;
|
|
||||||
padding:10px;
|
|
||||||
border-radius: 5px;
|
|
||||||
&:not(:last-child){
|
|
||||||
margin-bottom: 40px;
|
|
||||||
}
|
|
||||||
.row-lists-title{
|
|
||||||
font-size: 20px;
|
|
||||||
line-height: 20px;
|
|
||||||
color: #333333;
|
|
||||||
font-weight: 500;
|
|
||||||
text-align: center;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
.item-lists{
|
|
||||||
position: relative;
|
|
||||||
&:not(:last-child){
|
|
||||||
margin-right:$distance;
|
|
||||||
}
|
|
||||||
//每个设备
|
|
||||||
.items{
|
|
||||||
background-color: #cbebfd;
|
|
||||||
position: relative;
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 10px;
|
|
||||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1), 0 0 0 rgba(0, 0, 0, 0.5);
|
|
||||||
//普通设备 箭头方向
|
|
||||||
&.normal-items-arrow{
|
|
||||||
&:before{
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
width:($arrowDistance/2) - 15;
|
|
||||||
height: 4px;
|
|
||||||
background-color: $arrowColoe;
|
|
||||||
position: absolute;
|
|
||||||
top:50%;
|
|
||||||
left: -($arrowDistance/2);
|
|
||||||
transform: translateY(-50%);
|
|
||||||
}
|
|
||||||
&:after{
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
height: 0;
|
|
||||||
width: 0;
|
|
||||||
border-left: 10px solid #5ea9df;
|
|
||||||
border-right: 10px solid transparent;
|
|
||||||
border-bottom: 10px solid transparent;
|
|
||||||
border-top: 10px solid transparent;
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: -15px;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//下级的箭头
|
|
||||||
&.children-items-arrow{
|
|
||||||
&:before{
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
width:($arrowDistance/2) - 15;
|
|
||||||
height: 4px;
|
|
||||||
background-color: $arrowColoe;
|
|
||||||
position: absolute;
|
|
||||||
top:50%;
|
|
||||||
right: -($arrowDistance/2);
|
|
||||||
transform: translateY(-50%);
|
|
||||||
}
|
|
||||||
&:after{
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
height: 0;
|
|
||||||
width: 0;
|
|
||||||
border-right: 10px solid #5ea9df;
|
|
||||||
border-left: 10px solid transparent;
|
|
||||||
border-bottom: 10px solid transparent;
|
|
||||||
border-top: 10px solid transparent;
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
right: -15px;
|
|
||||||
transform: translateY(-50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&:not(:last-child){
|
|
||||||
margin-bottom: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.items-inner{
|
|
||||||
background-color: #ffffff;
|
|
||||||
border-radius: 5px;
|
|
||||||
padding:10px;
|
|
||||||
width:130px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
img{
|
|
||||||
width: 80px;
|
|
||||||
height: auto;
|
|
||||||
display: block;
|
|
||||||
z-index:2;
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
.name{
|
|
||||||
text-align: center;
|
|
||||||
margin-top:10px;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 20px;
|
|
||||||
z-index:2;
|
|
||||||
}
|
|
||||||
.status{
|
|
||||||
z-index:2;
|
|
||||||
margin-top:10px;
|
|
||||||
font-size: 14px;
|
|
||||||
line-height: 20px;
|
|
||||||
position: relative;
|
|
||||||
padding-left:20px;
|
|
||||||
display: inline;
|
|
||||||
&.status-normal {
|
|
||||||
&:before {
|
|
||||||
content: "";
|
|
||||||
display: block;
|
|
||||||
width: 15px;
|
|
||||||
height: 15px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background-color: #05AEA3;
|
|
||||||
position: absolute;
|
|
||||||
top:50%;
|
|
||||||
left:0;
|
|
||||||
transform: translate(0,-50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&.status-warn{
|
|
||||||
&:before{
|
|
||||||
content: "";
|
|
||||||
display: inline-block;
|
|
||||||
width: 15px;
|
|
||||||
height: 15px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background-color: #FC6B69;
|
|
||||||
position: absolute;
|
|
||||||
top:50%;
|
|
||||||
left:0;
|
|
||||||
transform: translate(0,-50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.children-item-lists{
|
|
||||||
//todo 手动修改
|
|
||||||
&:before{
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
width:40px;
|
|
||||||
height: 4px;
|
|
||||||
background-color: $arrowColoe;
|
|
||||||
position: absolute;
|
|
||||||
top:50%;
|
|
||||||
left: -50px;
|
|
||||||
transform:translateY(-50%);
|
|
||||||
}
|
|
||||||
&:after{
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
height: 0;
|
|
||||||
width: 0;
|
|
||||||
border-left: 10px solid #5ea9df;
|
|
||||||
border-right: 10px solid transparent;
|
|
||||||
border-bottom: 10px solid transparent;
|
|
||||||
border-top: 10px solid transparent;
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
left: -14px;
|
|
||||||
transform:translateY(-50%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.pcs-has-children-item-square{
|
|
||||||
vertical-align: middle;
|
|
||||||
align-items: center;
|
|
||||||
background-color: #ffefad;
|
|
||||||
}
|
|
||||||
.no-bms-list{
|
|
||||||
.item-lists{
|
|
||||||
&:not(:last-child){
|
|
||||||
margin-right:0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user