Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 57253e2e55 | |||
| e6026f8646 |
@ -1,7 +1,7 @@
|
|||||||
# just a flag
|
# just a flag
|
||||||
ENV = 'development'
|
ENV = 'development'
|
||||||
|
|
||||||
# base api //http://192.168.1.181:8000/api 192.168.1.199:8000/api // http://124.71.192.230:8000/api // http://127.0.0.1:4523/m1/1450402-0-default
|
# base api //http://1.95.170.86:8002/api 192.168.1.199:8000/api // https://zzkj-cloud.com/api // http://127.0.0.1:4523/m1/1450402-0-default
|
||||||
|
|
||||||
|
|
||||||
VUE_APP_BASE_API = 'https://zzkj-cloud.com/api'
|
VUE_APP_BASE_API = 'https://zzkj-cloud.com/api'
|
||||||
|
|||||||
@ -174,6 +174,7 @@ export default {
|
|||||||
laterQuery: '%,请稍后查询。',
|
laterQuery: '%,请稍后查询。',
|
||||||
earningReport: '收益报表',
|
earningReport: '收益报表',
|
||||||
bill: '账单'
|
bill: '账单'
|
||||||
|
|
||||||
},
|
},
|
||||||
region: {
|
region: {
|
||||||
regionName: '区域名称',
|
regionName: '区域名称',
|
||||||
|
|||||||
@ -586,12 +586,12 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<dispositionPointDialog
|
<DispositionPointData
|
||||||
is-topology
|
is-topology
|
||||||
:show-div-location="true"
|
:show-div-location="true"
|
||||||
:max-length="12"
|
:max-length="12"
|
||||||
:page-location="pageLocation"
|
:page-location="pageLocation"
|
||||||
:visible="show_point_dispostion"
|
:disposition-show="show_point_dispostion"
|
||||||
@close="closePoint"
|
@close="closePoint"
|
||||||
@getData="getDynamicPointData"
|
@getData="getDynamicPointData"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -534,7 +534,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<dispositionPointDialog :visible="show_point_dispostion" :page-location="pageLocation" @close="closePoint" @getData="getDynamicPointData" />
|
<DispositionPointData :disposition-show="show_point_dispostion" :page-location="pageLocation" @close="closePoint" @getData="getDynamicPointData" />
|
||||||
|
|
||||||
</ItemBox>
|
</ItemBox>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
784
src/views/dashboardtest/components/top-center/pv1storage261.vue
Normal file
784
src/views/dashboardtest/components/top-center/pv1storage261.vue
Normal file
@ -0,0 +1,784 @@
|
|||||||
|
<template>
|
||||||
|
<ItemBox :title="$t('dashboard.stationTopo')" style="min-height: 560px;">
|
||||||
|
<div ref="svgLine" class="center-box">
|
||||||
|
<div v-loading="loading">
|
||||||
|
<svg
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xml:space="preserve"
|
||||||
|
class="circle-load-rect-svg"
|
||||||
|
viewBox="0 0 800 500"
|
||||||
|
>
|
||||||
|
<defs>
|
||||||
|
<defs>
|
||||||
|
<radialGradient id="RadialGradient1">
|
||||||
|
<stop offset="0%" stop-color="#fff" />
|
||||||
|
<stop offset="30%" stop-color="#0171c1" />
|
||||||
|
<stop offset="50%" stop-color="#035088" />
|
||||||
|
<stop offset="100%" stop-color="#02395a" />
|
||||||
|
</radialGradient>
|
||||||
|
</defs>
|
||||||
|
<marker
|
||||||
|
id="markerCircle"
|
||||||
|
markerWidth="15"
|
||||||
|
markerHeight="15"
|
||||||
|
refX="5"
|
||||||
|
refY="5"
|
||||||
|
>
|
||||||
|
<circle
|
||||||
|
cx="5"
|
||||||
|
cy="5"
|
||||||
|
r="5"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
/>
|
||||||
|
</marker>
|
||||||
|
|
||||||
|
<marker
|
||||||
|
id="markerArrow"
|
||||||
|
markerWidth="13"
|
||||||
|
markerHeight="13"
|
||||||
|
refX="2"
|
||||||
|
refY="6"
|
||||||
|
orient="auto"
|
||||||
|
>
|
||||||
|
<path d="M2,2 L2,11 L10,6 L2,2" style="fill: black" />
|
||||||
|
</marker>
|
||||||
|
</defs>
|
||||||
|
<!-- //线条 -->
|
||||||
|
<!-- top -->
|
||||||
|
<polyline
|
||||||
|
points="120,50 650,50"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
<!-- <rect
|
||||||
|
x="154"
|
||||||
|
y="78"
|
||||||
|
width="231"
|
||||||
|
height="4"
|
||||||
|
:style="{ fill: 'rgba(100,100,100,0)', stroke: 'transparent',cursor: 'pointer' }"
|
||||||
|
@click="lookDeviceDetail('line-top-left')"
|
||||||
|
/> -->
|
||||||
|
<!-- <polyline
|
||||||
|
points="385,80 600,80"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/> -->
|
||||||
|
<!-- <rect
|
||||||
|
x="385"
|
||||||
|
y="78"
|
||||||
|
width="215"
|
||||||
|
height="4"
|
||||||
|
:style="{ fill: 'rgba(100,100,100,0)', stroke: 'transparent',cursor: 'pointer' }"
|
||||||
|
@click="lookDeviceDetail('line-top-right')"
|
||||||
|
/> -->
|
||||||
|
|
||||||
|
<!-- center -->
|
||||||
|
<polyline
|
||||||
|
points="385,50 385,283"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
<!-- <rect
|
||||||
|
x="383"
|
||||||
|
y="80"
|
||||||
|
width="4"
|
||||||
|
height="281"
|
||||||
|
:style="{ fill: 'rgba(100,100,100,0)', stroke: 'transparent',cursor: 'pointer' }"
|
||||||
|
@click="lookDeviceDetail('line-bottom-center')"
|
||||||
|
/> -->
|
||||||
|
|
||||||
|
<polyline
|
||||||
|
points="385,100 460,100"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- bottom -->
|
||||||
|
<polyline
|
||||||
|
points="175,283 385,283"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
<polyline
|
||||||
|
points="175,283 175,417"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
<!-- <rect
|
||||||
|
x="104"
|
||||||
|
y="361"
|
||||||
|
width="283"
|
||||||
|
height="4"
|
||||||
|
:style="{ fill: 'rgba(100,100,100,0)', stroke: 'transparent',cursor: 'pointer' }"
|
||||||
|
@click="lookDeviceDetail('line-bottom-left')"
|
||||||
|
/> -->
|
||||||
|
|
||||||
|
<polyline
|
||||||
|
points="385,283 603,283"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
<polyline
|
||||||
|
points="603,283 603,417"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
<!-- <rect
|
||||||
|
x="383"
|
||||||
|
y="361"
|
||||||
|
width="272"
|
||||||
|
height="4"
|
||||||
|
:style="{ fill: 'rgba(100,100,100,0)', stroke: 'transparent',cursor: 'pointer' }"
|
||||||
|
@click="lookDeviceDetail('line-bottom-right')"
|
||||||
|
/> -->
|
||||||
|
<!-- top -->
|
||||||
|
<circle
|
||||||
|
cx="120"
|
||||||
|
cy="50"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
/>
|
||||||
|
<circle
|
||||||
|
cx="650"
|
||||||
|
cy="50"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 动点 -->
|
||||||
|
<circle
|
||||||
|
cx="120"
|
||||||
|
cy="50"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
>
|
||||||
|
<animateMotion
|
||||||
|
repeatCount="indefinite"
|
||||||
|
dur="4s"
|
||||||
|
begin="0s"
|
||||||
|
:path="dotData.lineTopLeft"
|
||||||
|
/>
|
||||||
|
</circle>
|
||||||
|
<circle
|
||||||
|
cx="385"
|
||||||
|
cy="283"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
>
|
||||||
|
<animateMotion
|
||||||
|
repeatCount="indefinite"
|
||||||
|
dur="4s"
|
||||||
|
begin="2s"
|
||||||
|
:path="dotData.lineCenter"
|
||||||
|
/>
|
||||||
|
</circle>
|
||||||
|
<circle
|
||||||
|
cx="650"
|
||||||
|
cy="50"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
>
|
||||||
|
<animateMotion
|
||||||
|
repeatCount="indefinite"
|
||||||
|
dur="4s"
|
||||||
|
begin="0s"
|
||||||
|
:path="dotData.lineTopRight"
|
||||||
|
/>
|
||||||
|
</circle>
|
||||||
|
|
||||||
|
<!-- bottom -->
|
||||||
|
<circle
|
||||||
|
cx="175"
|
||||||
|
cy="417"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
/>
|
||||||
|
<circle
|
||||||
|
cx="385"
|
||||||
|
cy="283"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
/>
|
||||||
|
<circle
|
||||||
|
cx="603"
|
||||||
|
cy="417"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<circle
|
||||||
|
cx="385"
|
||||||
|
cy="283"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
>
|
||||||
|
<animateMotion
|
||||||
|
repeatCount="indefinite"
|
||||||
|
dur="4s"
|
||||||
|
begin="2s"
|
||||||
|
:path="dotData.lineBottomLeft"
|
||||||
|
/>
|
||||||
|
</circle>
|
||||||
|
|
||||||
|
<circle
|
||||||
|
cx="175"
|
||||||
|
cy="417"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
>
|
||||||
|
<animateMotion
|
||||||
|
repeatCount="indefinite"
|
||||||
|
dur="4s"
|
||||||
|
begin="2s"
|
||||||
|
:path="dotData.lineBottomLeft"
|
||||||
|
/>
|
||||||
|
</circle>
|
||||||
|
|
||||||
|
<circle
|
||||||
|
cx="603"
|
||||||
|
cy="417"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
>
|
||||||
|
<animateMotion
|
||||||
|
repeatCount="indefinite"
|
||||||
|
dur="4s"
|
||||||
|
begin="2s"
|
||||||
|
:path="dotData.lineBottomRight"
|
||||||
|
/>
|
||||||
|
</circle>
|
||||||
|
<!-- 图片和文字 -->
|
||||||
|
|
||||||
|
<!-- 市电 -->
|
||||||
|
<image
|
||||||
|
:xlink:href="configData.grid"
|
||||||
|
x="60"
|
||||||
|
y="20"
|
||||||
|
width="50"
|
||||||
|
height="70"
|
||||||
|
/>
|
||||||
|
<!-- <text x="90" y="160" fill="#ffffff" font-size="14"> {{ $t("dashboard.grid") }}</text> -->
|
||||||
|
|
||||||
|
<!-- {{ $t("dashboard.load") }} -->
|
||||||
|
<image
|
||||||
|
:xlink:href="configData.house"
|
||||||
|
x="660"
|
||||||
|
y="20"
|
||||||
|
width="50"
|
||||||
|
height="70"
|
||||||
|
/>
|
||||||
|
<!-- <text x="645" y="160" fill="#ffffff" font-size="14"> {{ $t("dashboard.load") }}</text> -->
|
||||||
|
|
||||||
|
<!-- 1PV -->
|
||||||
|
<image
|
||||||
|
:xlink:href="frameImg"
|
||||||
|
x="145"
|
||||||
|
y="430"
|
||||||
|
width="50"
|
||||||
|
height="50"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
@click="lookDeviceDetail('triad-pcs-left')"
|
||||||
|
/>
|
||||||
|
<!-- DCDC -->
|
||||||
|
<image
|
||||||
|
:xlink:href="DCImg"
|
||||||
|
x="157"
|
||||||
|
y="330"
|
||||||
|
width="35"
|
||||||
|
height="35"
|
||||||
|
/>
|
||||||
|
<!-- <text x="86" y="490" fill="#ffffff" font-size="14">1#{{ $t("dashboard.cabinet") }}</text> -->
|
||||||
|
<!-- 2PV -->
|
||||||
|
<!-- <image
|
||||||
|
:xlink:href="frameImg"
|
||||||
|
x="355"
|
||||||
|
y="430"
|
||||||
|
width="50"
|
||||||
|
height="50"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
@click="lookDeviceDetail('triad-pcs-center')"
|
||||||
|
/> -->
|
||||||
|
<!-- DCDC -->
|
||||||
|
<!-- <image
|
||||||
|
:xlink:href="DCImg"
|
||||||
|
x="367"
|
||||||
|
y="330"
|
||||||
|
width="35"
|
||||||
|
height="35"
|
||||||
|
/> -->
|
||||||
|
<!-- <text x="360" y="490" fill="#ffffff" font-size="14">
|
||||||
|
2#{{ $t("dashboard.cabinet") }}
|
||||||
|
</text> -->
|
||||||
|
<!-- 3柜 -->
|
||||||
|
<image
|
||||||
|
:xlink:href="configData.pcs2"
|
||||||
|
x="574"
|
||||||
|
y="430"
|
||||||
|
width="50"
|
||||||
|
height="50"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
@click="lookDeviceDetail('triad-pcs-right')"
|
||||||
|
/>
|
||||||
|
<!-- <text x="614" y="490" fill="#ffffff" font-size="14">3#{{ $t("dashboard.cabinet") }}</text> -->
|
||||||
|
|
||||||
|
<!-- STS -->
|
||||||
|
<!-- <image
|
||||||
|
:xlink:href="STSImg"
|
||||||
|
x="365"
|
||||||
|
y="130"
|
||||||
|
width="40"
|
||||||
|
height="40"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
@click="lookDeviceDetail('triad-sts-center')"
|
||||||
|
/> -->
|
||||||
|
<!-- AC/DC -->
|
||||||
|
<image
|
||||||
|
:xlink:href="ACDCImg"
|
||||||
|
x="368"
|
||||||
|
y="200"
|
||||||
|
width="35"
|
||||||
|
height="35"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
@click="lookDeviceDetail('triad-acdc-center')"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- {{ $t("dashboard.ammeter") }} -->
|
||||||
|
<image
|
||||||
|
:xlink:href="ammeterImg"
|
||||||
|
x="450"
|
||||||
|
y="80"
|
||||||
|
width="70"
|
||||||
|
height="42"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
@click="lookDeviceDetail('triad-ammeter')"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 瞬时总有功 -->
|
||||||
|
|
||||||
|
<g v-for="(item,index) in ammeterData" :key="item.id">
|
||||||
|
<text x="520" :y="105 + ( 20 * index)" fill="#ffffff" font-size="14">
|
||||||
|
{{ item.name }}
|
||||||
|
</text>
|
||||||
|
<text :x="countChineseAndEnglishCharacters(item.name,lang === 'zh'?510:470)" :y="105 + ( 20 * index)" fill="#FFB800" font-size="14">
|
||||||
|
{{ item.value }}
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- ACDC -->
|
||||||
|
|
||||||
|
<g v-for="(item,index) in acdcCenterData" :key="item.id">
|
||||||
|
<text x="415" :y="213 + ( 20 * index)" fill="#ffffff" font-size="14">
|
||||||
|
{{ item.name }}
|
||||||
|
</text>
|
||||||
|
<text :x="countChineseAndEnglishCharacters(item.name,lang === 'zh'?415:375)" :y="213 + ( 20 * index)" fill="#FFB800" font-size="14">
|
||||||
|
{{ item.value }}
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
<!-- 左侧 1PV -->
|
||||||
|
<g v-for="(item,index) in pcsLeftData" :key="item.id">
|
||||||
|
<foreignObject
|
||||||
|
:x="200"
|
||||||
|
:y="450 + (20 * index) - 14"
|
||||||
|
width="150"
|
||||||
|
height="20"
|
||||||
|
style="overflow: visible;"
|
||||||
|
>
|
||||||
|
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: center;">
|
||||||
|
<el-tooltip
|
||||||
|
:content="item.name"
|
||||||
|
placement="top"
|
||||||
|
:open-delay="400"
|
||||||
|
effect="dark"
|
||||||
|
popper-class="svg-tooltip"
|
||||||
|
>
|
||||||
|
<span style="font-size: 14px;font-family: sans-serif;color: #ffffff;max-width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis">
|
||||||
|
{{ truncateText(item.name, 120) }}
|
||||||
|
</span>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</foreignObject>
|
||||||
|
<text :x="calculateValueX(item.name, 200)" :y="450 + ( 20 * index)" fill="#FFB800" font-size="14">
|
||||||
|
{{ item.value }}
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- 右侧 3PCS -->
|
||||||
|
<g v-for="(item,index) in pcsRightData" :key="item.id">
|
||||||
|
<text x="622" :y="450 + ( 20 * index)" fill="#ffffff" font-size="14">
|
||||||
|
{{ item.name }}
|
||||||
|
</text>
|
||||||
|
<text :x="countChineseAndEnglishCharacters(item.name,622)" :y="450 + ( 20 * index)" fill="#FFB800" font-size="14">
|
||||||
|
{{ item.value }}
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<DispositionPointData
|
||||||
|
:disposition-show="show_point_dispostion"
|
||||||
|
:max="4"
|
||||||
|
:page-location="pageLocation"
|
||||||
|
@close="closePoint"
|
||||||
|
@getData="getDynamicPointData"
|
||||||
|
/>
|
||||||
|
</ItemBox>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import gridImg from '@/assets/images/wxjd/grid.png'
|
||||||
|
import ammeterImg from '@/assets/images/wxjd/ammeter.png'
|
||||||
|
import cabinetImg from '@/assets/images/wxjd/cabinet.png'
|
||||||
|
import chargingPileImg from '@/assets/images/home-office.png'
|
||||||
|
import distributionCabinetImg from '@/assets/images/wxjd/guiImg.png'
|
||||||
|
import frameImg from '@/assets/images/wxjd/frame.png'
|
||||||
|
import cangImg from '@/assets/images/home-cang.png'
|
||||||
|
import { DynamicConfigPoint } from '@/api/home-page/index'
|
||||||
|
import config from './config'
|
||||||
|
import { changeTheme } from '@/utils/index'
|
||||||
|
import ACDCImg from '@/assets/images/wxjd/ACDC.png'
|
||||||
|
import DCImg from '@/assets/images/wxjd/DC.png'
|
||||||
|
import STSImg from '@/assets/images/wxjd/STS.png'
|
||||||
|
export default {
|
||||||
|
name: 'Index',
|
||||||
|
props: {
|
||||||
|
stationType: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
stationId: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
gridImg,
|
||||||
|
ammeterImg,
|
||||||
|
cabinetImg,
|
||||||
|
chargingPileImg,
|
||||||
|
distributionCabinetImg,
|
||||||
|
cangImg,
|
||||||
|
frameImg,
|
||||||
|
ACDCImg,
|
||||||
|
DCImg,
|
||||||
|
STSImg,
|
||||||
|
dotData: {
|
||||||
|
lineTop: 'M 0,0 0,0',
|
||||||
|
lineTopLeft: 'M 0,0 0,0',
|
||||||
|
lineBottomLeft: 'M 0,0 0,0 0,0',
|
||||||
|
lineBottomRight: 'M 0,0 0,0 0,0',
|
||||||
|
lineBottomLeftTwo: 'M 0,0 0,0 0,0',
|
||||||
|
lineBottomRightTwo: 'M 0,0 0,0 0,0'
|
||||||
|
},
|
||||||
|
|
||||||
|
partList: [
|
||||||
|
{ soc: 0, soh: 0, activePowerPCS: 0.0, reactivePowerPCS: 0.0 },
|
||||||
|
{ soc: 0, soh: 0, activePowerPCS: 0.0, reactivePowerPCS: 0.0 },
|
||||||
|
{ soc: 0, soh: 0, activePowerPCS: 0.0, reactivePowerPCS: 0.0 },
|
||||||
|
{ soc: 0, soh: 0, activePowerPCS: 0.0, reactivePowerPCS: 0.0 }
|
||||||
|
],
|
||||||
|
loading: false,
|
||||||
|
activePowerTotal: {},
|
||||||
|
show_point_dispostion: false,
|
||||||
|
pageLocation: '',
|
||||||
|
permissionId: null,
|
||||||
|
pcsLeftData: [],
|
||||||
|
pcsCenterData: [],
|
||||||
|
pcsRightData: [],
|
||||||
|
stsCenterData: [],
|
||||||
|
acdcCenterData: [],
|
||||||
|
ammeterData: [],
|
||||||
|
configData: {}
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
lang() {
|
||||||
|
return this.$store.getters.language
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
const result = changeTheme()
|
||||||
|
this.configData = config[result]
|
||||||
|
console.log('配置' + JSON.stringify(this.configData))
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
if (this.$store.getters.menuList.length) {
|
||||||
|
this.permissionId = this.$store.getters.menuList.find(item => {
|
||||||
|
return item.url === this.$route.path
|
||||||
|
}).id
|
||||||
|
}
|
||||||
|
}, 300)
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
truncateText(text, maxWidth) {
|
||||||
|
if (!text) return ''
|
||||||
|
const width = this.measureTextWidth(text)
|
||||||
|
if (width <= maxWidth) return text
|
||||||
|
|
||||||
|
let truncated = text
|
||||||
|
while (this.measureTextWidth(truncated + '...') > maxWidth && truncated.length > 0) {
|
||||||
|
truncated = truncated.slice(0, -1)
|
||||||
|
}
|
||||||
|
return truncated + (truncated.length < text.length ? '...' : '')
|
||||||
|
},
|
||||||
|
// 精确测量文本渲染宽度(像素)
|
||||||
|
measureTextWidth(text, font = '14px sans-serif') {
|
||||||
|
// 创建或复用一个 canvas(避免重复创建)
|
||||||
|
if (!this._textMeasurementCanvas) {
|
||||||
|
this._textMeasurementCanvas = document.createElement('canvas')
|
||||||
|
}
|
||||||
|
const ctx = this._textMeasurementCanvas.getContext('2d')
|
||||||
|
ctx.font = font
|
||||||
|
return ctx.measureText(text).width
|
||||||
|
},
|
||||||
|
|
||||||
|
// 计算 value 的 x 坐标:baseX + name 的实际宽度 + 一点间距
|
||||||
|
calculateValueX(name, baseX = 200) {
|
||||||
|
const truncatedName = this.truncateText(name, 120) // 限制 name 最大宽度
|
||||||
|
const width = this.measureTextWidth(truncatedName)
|
||||||
|
return baseX + width + 6 // +6 是 name 和 value 之间的小空隙
|
||||||
|
},
|
||||||
|
countChineseAndEnglishCharacters(str, x) {
|
||||||
|
var chineseCount = str.match(/[\u4e00-\u9fa5]/g) ? str.match(/[\u4e00-\u9fa5]/g).length : 0
|
||||||
|
var englishCount = str.match(/[a-zA-Z]/g) ? str.match(/[a-zA-Z]/g).length : 0
|
||||||
|
var otherCount = str.length - chineseCount - englishCount
|
||||||
|
const obj = { otherCount: otherCount, chineseCount: chineseCount, englishCount: englishCount }
|
||||||
|
return (obj.englishCount * 11) + (obj.chineseCount * 16) + (obj.otherCount * 8) + x
|
||||||
|
},
|
||||||
|
lookDeviceDetail(val) { // 查看设备详情
|
||||||
|
this.pageLocation = val
|
||||||
|
this.show_point_dispostion = true
|
||||||
|
},
|
||||||
|
closePoint() {
|
||||||
|
this.show_point_dispostion = false
|
||||||
|
},
|
||||||
|
async getpcsCenter() {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await DynamicConfigPoint({
|
||||||
|
pageLocation: 'triad-pcs-center',
|
||||||
|
permissionId: this.permissionId,
|
||||||
|
stationId: this.stationId })
|
||||||
|
this.pcsCenterData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// async getstsCenter() {
|
||||||
|
// this.loading = true
|
||||||
|
// try {
|
||||||
|
// const res = await DynamicConfigPoint({
|
||||||
|
// pageLocation: 'triad-sts-center',
|
||||||
|
// permissionId: this.permissionId,
|
||||||
|
// stationId: this.stationId })
|
||||||
|
// this.stsCenterData = res.data
|
||||||
|
// } catch (error) {
|
||||||
|
// // console.log(error);
|
||||||
|
// } finally {
|
||||||
|
// this.loading = false
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
async getacdcCenter() {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await DynamicConfigPoint({
|
||||||
|
pageLocation: 'triad-acdc-center',
|
||||||
|
permissionId: this.permissionId,
|
||||||
|
stationId: this.stationId })
|
||||||
|
this.acdcCenterData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getLineStatus(type) {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await DynamicConfigPoint({
|
||||||
|
pageLocation: type,
|
||||||
|
permissionId: this.permissionId,
|
||||||
|
stationId: this.stationId })
|
||||||
|
if (type === 'line-bottom-left') {
|
||||||
|
if (res.data?.length) {
|
||||||
|
if (res.data[0].value > 0) {
|
||||||
|
this.dotData.lineBottomLeft = 'M 283,0, 280, 0, 0 ,0'
|
||||||
|
} else if (res.data[0].value < 0) {
|
||||||
|
this.dotData.lineBottomLeft = 'M 0,0 281,0 281,0'
|
||||||
|
} else {
|
||||||
|
this.dotData.lineBottomLeft = ''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.dotData.lineBottomLeft = ''
|
||||||
|
}
|
||||||
|
} else if (type === 'line-bottom-right') {
|
||||||
|
if (res.data?.length) {
|
||||||
|
if (res.data[0].value > 0) {
|
||||||
|
this.dotData.lineBottomRight = 'M -271, 0 , -271 , 0 , 0 , 0'
|
||||||
|
} else if (res.data[0].value < 0) {
|
||||||
|
this.dotData.lineBottomRight = 'M 0,0 -271,0 -271,0'
|
||||||
|
} else {
|
||||||
|
this.dotData.lineBottomRight = ''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.dotData.lineBottomRight = ''
|
||||||
|
}
|
||||||
|
} else if (type === 'line-bottom-center') {
|
||||||
|
if (res.data?.length) {
|
||||||
|
if (res.data[0].value > 0) {
|
||||||
|
this.dotData.lineCenter = 'M 0,-283,0,0,0,0'
|
||||||
|
} else if (res.data[0].value < 0) {
|
||||||
|
this.dotData.lineCenter = 'M 0,0,0,0,0,-283'
|
||||||
|
} else {
|
||||||
|
this.dotData.lineCenter = ''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.dotData.lineCenter = ''
|
||||||
|
}
|
||||||
|
} else if (type === 'line-top-left') {
|
||||||
|
if (res.data?.length) {
|
||||||
|
if (res.data[0].value > 0) {
|
||||||
|
this.dotData.lineTopLeft = 'M 230,0 0,0'
|
||||||
|
} else if (res.data[0].value < 0) {
|
||||||
|
this.dotData.lineTopLeft = 'M 0,0 225,0'
|
||||||
|
} else {
|
||||||
|
this.dotData.lineTopLeft = ''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.dotData.lineTopLeft = ''
|
||||||
|
}
|
||||||
|
} else if (type === 'line-top-right') {
|
||||||
|
if (res.data?.length) {
|
||||||
|
if (res.data[0].value > 0) {
|
||||||
|
this.dotData.lineTopRight = 'M -230,0 0,0'
|
||||||
|
} else if (res.data[0].value < 0) {
|
||||||
|
this.dotData.lineTopRight = 'M 0,0 -225,0'
|
||||||
|
} else {
|
||||||
|
this.dotData.lineTopRight = ''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.dotData.lineTopRight = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getpcsLeft() {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await DynamicConfigPoint({
|
||||||
|
pageLocation: 'triad-pcs-left',
|
||||||
|
permissionId: this.permissionId,
|
||||||
|
stationId: this.stationId })
|
||||||
|
this.pcsLeftData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getammeter() {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await DynamicConfigPoint({
|
||||||
|
pageLocation: 'triad-ammeter',
|
||||||
|
permissionId: this.permissionId,
|
||||||
|
stationId: this.stationId })
|
||||||
|
this.ammeterData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getpcsRight() {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await DynamicConfigPoint({
|
||||||
|
pageLocation: 'triad-pcs-right',
|
||||||
|
permissionId: this.permissionId,
|
||||||
|
stationId: this.stationId })
|
||||||
|
this.pcsRightData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getData() {
|
||||||
|
this.getpcsRight()
|
||||||
|
this.getpcsCenter()
|
||||||
|
// this.getstsCenter()
|
||||||
|
this.getacdcCenter()
|
||||||
|
this.getpcsLeft()
|
||||||
|
this.getammeter()
|
||||||
|
this.getLineStatus('line-bottom-left')
|
||||||
|
this.getLineStatus('line-bottom-center')
|
||||||
|
this.getLineStatus('line-bottom-right')
|
||||||
|
this.getLineStatus('line-top-left')
|
||||||
|
this.getLineStatus('line-top-right')
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
getDynamicPointData() {
|
||||||
|
this.getData()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.center-box {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin move-round($duration, $delay) {
|
||||||
|
fill: none;
|
||||||
|
stroke-width: 5;
|
||||||
|
stroke-linejoin: round;
|
||||||
|
stroke-linecap: round;
|
||||||
|
stroke-dasharray: 3, 900;
|
||||||
|
stroke-dashoffset: 0;
|
||||||
|
animation: lineMove $duration $delay cubic-bezier(0, 0, 0.74, 0.74) infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes lineMove {
|
||||||
|
0% {
|
||||||
|
stroke-dashoffset: -850;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
stroke-dashoffset: -0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.g-rect-fill-two {
|
||||||
|
@include move-round(3.5s, 1s);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
822
src/views/dashboardtest/components/top-center/pv2storage261.vue
Normal file
822
src/views/dashboardtest/components/top-center/pv2storage261.vue
Normal file
@ -0,0 +1,822 @@
|
|||||||
|
<template>
|
||||||
|
<ItemBox :title="$t('dashboard.stationTopo')" style="min-height: 560px;">
|
||||||
|
<div ref="svgLine" class="center-box">
|
||||||
|
<div v-loading="loading">
|
||||||
|
<svg
|
||||||
|
version="1.1"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||||
|
xml:space="preserve"
|
||||||
|
class="circle-load-rect-svg"
|
||||||
|
viewBox="0 0 800 500"
|
||||||
|
>
|
||||||
|
<defs>
|
||||||
|
<defs>
|
||||||
|
<radialGradient id="RadialGradient1">
|
||||||
|
<stop offset="0%" stop-color="#fff" />
|
||||||
|
<stop offset="30%" stop-color="#0171c1" />
|
||||||
|
<stop offset="50%" stop-color="#035088" />
|
||||||
|
<stop offset="100%" stop-color="#02395a" />
|
||||||
|
</radialGradient>
|
||||||
|
</defs>
|
||||||
|
<marker
|
||||||
|
id="markerCircle"
|
||||||
|
markerWidth="15"
|
||||||
|
markerHeight="15"
|
||||||
|
refX="5"
|
||||||
|
refY="5"
|
||||||
|
>
|
||||||
|
<circle
|
||||||
|
cx="5"
|
||||||
|
cy="5"
|
||||||
|
r="5"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
/>
|
||||||
|
</marker>
|
||||||
|
|
||||||
|
<marker
|
||||||
|
id="markerArrow"
|
||||||
|
markerWidth="13"
|
||||||
|
markerHeight="13"
|
||||||
|
refX="2"
|
||||||
|
refY="6"
|
||||||
|
orient="auto"
|
||||||
|
>
|
||||||
|
<path d="M2,2 L2,11 L10,6 L2,2" style="fill: black" />
|
||||||
|
</marker>
|
||||||
|
</defs>
|
||||||
|
<!-- //线条 -->
|
||||||
|
<!-- top -->
|
||||||
|
<polyline
|
||||||
|
points="120,50 650,50"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
<!-- <rect
|
||||||
|
x="154"
|
||||||
|
y="78"
|
||||||
|
width="231"
|
||||||
|
height="4"
|
||||||
|
:style="{ fill: 'rgba(100,100,100,0)', stroke: 'transparent',cursor: 'pointer' }"
|
||||||
|
@click="lookDeviceDetail('line-top-left')"
|
||||||
|
/> -->
|
||||||
|
<!-- <polyline
|
||||||
|
points="385,80 600,80"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/> -->
|
||||||
|
<!-- <rect
|
||||||
|
x="385"
|
||||||
|
y="78"
|
||||||
|
width="215"
|
||||||
|
height="4"
|
||||||
|
:style="{ fill: 'rgba(100,100,100,0)', stroke: 'transparent',cursor: 'pointer' }"
|
||||||
|
@click="lookDeviceDetail('line-top-right')"
|
||||||
|
/> -->
|
||||||
|
|
||||||
|
<!-- center -->
|
||||||
|
<polyline
|
||||||
|
points="385,50 385,417"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
<!-- <rect
|
||||||
|
x="383"
|
||||||
|
y="80"
|
||||||
|
width="4"
|
||||||
|
height="281"
|
||||||
|
:style="{ fill: 'rgba(100,100,100,0)', stroke: 'transparent',cursor: 'pointer' }"
|
||||||
|
@click="lookDeviceDetail('line-bottom-center')"
|
||||||
|
/> -->
|
||||||
|
|
||||||
|
<polyline
|
||||||
|
points="385,100 460,100"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- bottom -->
|
||||||
|
<polyline
|
||||||
|
points="175,283 385,283"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
<polyline
|
||||||
|
points="175,283 175,417"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
<!-- <rect
|
||||||
|
x="104"
|
||||||
|
y="361"
|
||||||
|
width="283"
|
||||||
|
height="4"
|
||||||
|
:style="{ fill: 'rgba(100,100,100,0)', stroke: 'transparent',cursor: 'pointer' }"
|
||||||
|
@click="lookDeviceDetail('line-bottom-left')"
|
||||||
|
/> -->
|
||||||
|
|
||||||
|
<polyline
|
||||||
|
points="385,283 603,283"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
<polyline
|
||||||
|
points="603,283 603,417"
|
||||||
|
fill="none"
|
||||||
|
class="g-rect-path"
|
||||||
|
stroke="#0094FF"
|
||||||
|
stroke-dasharray="3 3"
|
||||||
|
/>
|
||||||
|
<!-- <rect
|
||||||
|
x="383"
|
||||||
|
y="361"
|
||||||
|
width="272"
|
||||||
|
height="4"
|
||||||
|
:style="{ fill: 'rgba(100,100,100,0)', stroke: 'transparent',cursor: 'pointer' }"
|
||||||
|
@click="lookDeviceDetail('line-bottom-right')"
|
||||||
|
/> -->
|
||||||
|
<!-- top -->
|
||||||
|
<circle
|
||||||
|
cx="120"
|
||||||
|
cy="50"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
/>
|
||||||
|
<circle
|
||||||
|
cx="650"
|
||||||
|
cy="50"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 动点 -->
|
||||||
|
<circle
|
||||||
|
cx="120"
|
||||||
|
cy="50"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
>
|
||||||
|
<animateMotion
|
||||||
|
repeatCount="indefinite"
|
||||||
|
dur="4s"
|
||||||
|
begin="0s"
|
||||||
|
:path="dotData.lineTopLeft"
|
||||||
|
/>
|
||||||
|
</circle>
|
||||||
|
<circle
|
||||||
|
cx="385"
|
||||||
|
cy="417"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
>
|
||||||
|
<animateMotion
|
||||||
|
repeatCount="indefinite"
|
||||||
|
dur="4s"
|
||||||
|
begin="2s"
|
||||||
|
:path="dotData.lineCenter"
|
||||||
|
/>
|
||||||
|
</circle>
|
||||||
|
<circle
|
||||||
|
cx="650"
|
||||||
|
cy="50"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
>
|
||||||
|
<animateMotion
|
||||||
|
repeatCount="indefinite"
|
||||||
|
dur="4s"
|
||||||
|
begin="0s"
|
||||||
|
:path="dotData.lineTopRight"
|
||||||
|
/>
|
||||||
|
</circle>
|
||||||
|
|
||||||
|
<!-- bottom -->
|
||||||
|
<circle
|
||||||
|
cx="175"
|
||||||
|
cy="417"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
/>
|
||||||
|
<circle
|
||||||
|
cx="385"
|
||||||
|
cy="417"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
/>
|
||||||
|
<circle
|
||||||
|
cx="603"
|
||||||
|
cy="417"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<circle
|
||||||
|
cx="385"
|
||||||
|
cy="417"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<circle
|
||||||
|
cx="175"
|
||||||
|
cy="417"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
>
|
||||||
|
<animateMotion
|
||||||
|
repeatCount="indefinite"
|
||||||
|
dur="4s"
|
||||||
|
begin="2s"
|
||||||
|
:path="dotData.lineBottomLeft"
|
||||||
|
/>
|
||||||
|
</circle>
|
||||||
|
|
||||||
|
<circle
|
||||||
|
cx="603"
|
||||||
|
cy="417"
|
||||||
|
r="8"
|
||||||
|
style="stroke: none; fill: url(#RadialGradient1)"
|
||||||
|
>
|
||||||
|
<animateMotion
|
||||||
|
repeatCount="indefinite"
|
||||||
|
dur="4s"
|
||||||
|
begin="2s"
|
||||||
|
:path="dotData.lineBottomRight"
|
||||||
|
/>
|
||||||
|
</circle>
|
||||||
|
<!-- 图片和文字 -->
|
||||||
|
|
||||||
|
<!-- 市电 -->
|
||||||
|
<image
|
||||||
|
:xlink:href="configData.grid"
|
||||||
|
x="60"
|
||||||
|
y="20"
|
||||||
|
width="50"
|
||||||
|
height="70"
|
||||||
|
/>
|
||||||
|
<!-- <text x="90" y="160" fill="#ffffff" font-size="14"> {{ $t("dashboard.grid") }}</text> -->
|
||||||
|
|
||||||
|
<!-- {{ $t("dashboard.load") }} -->
|
||||||
|
<image
|
||||||
|
:xlink:href="configData.house"
|
||||||
|
x="660"
|
||||||
|
y="20"
|
||||||
|
width="50"
|
||||||
|
height="70"
|
||||||
|
/>
|
||||||
|
<!-- <text x="645" y="160" fill="#ffffff" font-size="14"> {{ $t("dashboard.load") }}</text> -->
|
||||||
|
|
||||||
|
<!-- 1PV -->
|
||||||
|
<image
|
||||||
|
:xlink:href="frameImg"
|
||||||
|
x="145"
|
||||||
|
y="430"
|
||||||
|
width="50"
|
||||||
|
height="50"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
@click="lookDeviceDetail('triad-pcs-left')"
|
||||||
|
/>
|
||||||
|
<!-- DCDC -->
|
||||||
|
<image
|
||||||
|
:xlink:href="DCImg"
|
||||||
|
x="157"
|
||||||
|
y="330"
|
||||||
|
width="35"
|
||||||
|
height="35"
|
||||||
|
/>
|
||||||
|
<!-- <text x="86" y="490" fill="#ffffff" font-size="14">1#{{ $t("dashboard.cabinet") }}</text> -->
|
||||||
|
<!-- 2PV -->
|
||||||
|
<image
|
||||||
|
:xlink:href="frameImg"
|
||||||
|
x="355"
|
||||||
|
y="430"
|
||||||
|
width="50"
|
||||||
|
height="50"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
@click="lookDeviceDetail('triad-pcs-center')"
|
||||||
|
/>
|
||||||
|
<!-- DCDC -->
|
||||||
|
<image
|
||||||
|
:xlink:href="DCImg"
|
||||||
|
x="367"
|
||||||
|
y="330"
|
||||||
|
width="35"
|
||||||
|
height="35"
|
||||||
|
/>
|
||||||
|
<!-- <text x="360" y="490" fill="#ffffff" font-size="14">
|
||||||
|
2#{{ $t("dashboard.cabinet") }}
|
||||||
|
</text> -->
|
||||||
|
<!-- 3柜 -->
|
||||||
|
<image
|
||||||
|
:xlink:href="configData.pcs2"
|
||||||
|
x="574"
|
||||||
|
y="430"
|
||||||
|
width="50"
|
||||||
|
height="50"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
@click="lookDeviceDetail('triad-pcs-right')"
|
||||||
|
/>
|
||||||
|
<!-- <text x="614" y="490" fill="#ffffff" font-size="14">3#{{ $t("dashboard.cabinet") }}</text> -->
|
||||||
|
|
||||||
|
<!-- STS -->
|
||||||
|
<image
|
||||||
|
:xlink:href="STSImg"
|
||||||
|
x="365"
|
||||||
|
y="130"
|
||||||
|
width="40"
|
||||||
|
height="40"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
@click="lookDeviceDetail('triad-sts-center')"
|
||||||
|
/>
|
||||||
|
<!-- AC/DC -->
|
||||||
|
<image
|
||||||
|
:xlink:href="ACDCImg"
|
||||||
|
x="368"
|
||||||
|
y="200"
|
||||||
|
width="35"
|
||||||
|
height="35"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
@click="lookDeviceDetail('triad-acdc-center')"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- {{ $t("dashboard.ammeter") }} -->
|
||||||
|
<image
|
||||||
|
:xlink:href="ammeterImg"
|
||||||
|
x="450"
|
||||||
|
y="80"
|
||||||
|
width="70"
|
||||||
|
height="42"
|
||||||
|
style="cursor: pointer;"
|
||||||
|
@click="lookDeviceDetail('triad-ammeter')"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 瞬时总有功 -->
|
||||||
|
|
||||||
|
<g v-for="(item,index) in ammeterData" :key="item.id">
|
||||||
|
<text x="520" :y="105 + ( 20 * index)" fill="#ffffff" font-size="14">
|
||||||
|
{{ item.name }}
|
||||||
|
</text>
|
||||||
|
<text :x="countChineseAndEnglishCharacters(item.name,lang === 'zh'?510:465)" :y="105 + ( 20 * index)" fill="#FFB800" font-size="14">
|
||||||
|
{{ item.value }}
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- STS -->
|
||||||
|
|
||||||
|
<g v-for="(item,index) in stsCenterData" :key="item.id">
|
||||||
|
<text x="415" :y="153 + ( 20 * index)" fill="#ffffff" font-size="14">
|
||||||
|
{{ item.name }}
|
||||||
|
</text>
|
||||||
|
<text :x="countChineseAndEnglishCharacters(item.name,lang === 'zh'?415:360)" :y="153 + ( 20 * index)" fill="#FFB800" font-size="14">
|
||||||
|
{{ item.value }}
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- ACDC -->
|
||||||
|
|
||||||
|
<g v-for="(item,index) in acdcCenterData" :key="item.id">
|
||||||
|
<text x="415" :y="213 + ( 20 * index)" fill="#ffffff" font-size="14">
|
||||||
|
{{ item.name }}
|
||||||
|
</text>
|
||||||
|
<text :x="countChineseAndEnglishCharacters(item.name,lang === 'zh'?415:360)" :y="213 + ( 20 * index)" fill="#FFB800" font-size="14">
|
||||||
|
{{ item.value }}
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
<!-- 左侧 1PV -->
|
||||||
|
<g v-for="(item,index) in pcsLeftData" :key="item.id">
|
||||||
|
<foreignObject
|
||||||
|
:x="200"
|
||||||
|
:y="450 + (20 * index) - 14"
|
||||||
|
width="150"
|
||||||
|
height="20"
|
||||||
|
style="overflow: visible;"
|
||||||
|
>
|
||||||
|
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: center;">
|
||||||
|
<el-tooltip
|
||||||
|
:content="item.name"
|
||||||
|
placement="top"
|
||||||
|
:open-delay="400"
|
||||||
|
effect="dark"
|
||||||
|
popper-class="svg-tooltip"
|
||||||
|
>
|
||||||
|
<span style="font-size: 14px;font-family: sans-serif;color: #ffffff;max-width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis">
|
||||||
|
{{ truncateText(item.name, 100) }}
|
||||||
|
</span>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</foreignObject>
|
||||||
|
<!-- <text x="200" :y="450 + ( 20 * index)" fill="#ffffff" font-size="14">
|
||||||
|
{{ item.name }}
|
||||||
|
</text> -->
|
||||||
|
<text :x="calculateValueX(item.name, 185)" :y="450 + ( 20 * index)" fill="#FFB800" font-size="14">
|
||||||
|
{{ item.value }}
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- 中间 2PV -->
|
||||||
|
<g v-for="(item,index) in pcsCenterData" :key="item.id">
|
||||||
|
<foreignObject
|
||||||
|
:x="410"
|
||||||
|
:y="450 + (20 * index) - 14"
|
||||||
|
width="150"
|
||||||
|
height="20"
|
||||||
|
style="overflow: visible;"
|
||||||
|
>
|
||||||
|
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: center;">
|
||||||
|
<el-tooltip
|
||||||
|
:content="item.name"
|
||||||
|
placement="top"
|
||||||
|
:open-delay="400"
|
||||||
|
effect="dark"
|
||||||
|
popper-class="svg-tooltip"
|
||||||
|
>
|
||||||
|
<span style="font-size: 14px;font-family: sans-serif;color: #ffffff;max-width: 120px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis">
|
||||||
|
{{ truncateText(item.name, 100) }}
|
||||||
|
</span>
|
||||||
|
</el-tooltip>
|
||||||
|
</div>
|
||||||
|
</foreignObject>
|
||||||
|
<!-- <text x="410" :y="450 + ( 20 * index)" fill="#ffffff" font-size="14">
|
||||||
|
{{ item.name }}
|
||||||
|
</text> -->
|
||||||
|
<text :x="calculateValueX(item.name, 395)" :y="450 + ( 20 * index)" fill="#FFB800" font-size="14">
|
||||||
|
{{ item.value }}
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
<!-- 右侧 3PCS -->
|
||||||
|
<g v-for="(item,index) in pcsRightData" :key="item.id">
|
||||||
|
<text x="622" :y="450 + ( 20 * index)" fill="#ffffff" font-size="14">
|
||||||
|
{{ item.name }}
|
||||||
|
</text>
|
||||||
|
<text :x="countChineseAndEnglishCharacters(item.name,622)" :y="450 + ( 20 * index)" fill="#FFB800" font-size="14">
|
||||||
|
{{ item.value }}
|
||||||
|
</text>
|
||||||
|
</g>
|
||||||
|
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<DispositionPointData
|
||||||
|
:disposition-show="show_point_dispostion"
|
||||||
|
:max="4"
|
||||||
|
:page-location="pageLocation"
|
||||||
|
@close="closePoint"
|
||||||
|
@getData="getDynamicPointData"
|
||||||
|
/>
|
||||||
|
</ItemBox>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import gridImg from '@/assets/images/wxjd/grid.png'
|
||||||
|
import ammeterImg from '@/assets/images/wxjd/ammeter.png'
|
||||||
|
import cabinetImg from '@/assets/images/wxjd/cabinet.png'
|
||||||
|
import chargingPileImg from '@/assets/images/home-office.png'
|
||||||
|
import distributionCabinetImg from '@/assets/images/wxjd/guiImg.png'
|
||||||
|
import frameImg from '@/assets/images/wxjd/frame.png'
|
||||||
|
import cangImg from '@/assets/images/home-cang.png'
|
||||||
|
import { DynamicConfigPoint } from '@/api/home-page/index'
|
||||||
|
import config from './config'
|
||||||
|
import { changeTheme } from '@/utils/index'
|
||||||
|
import ACDCImg from '@/assets/images/wxjd/ACDC.png'
|
||||||
|
import DCImg from '@/assets/images/wxjd/DC.png'
|
||||||
|
import STSImg from '@/assets/images/wxjd/STS.png'
|
||||||
|
export default {
|
||||||
|
name: 'Index',
|
||||||
|
props: {
|
||||||
|
stationType: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
},
|
||||||
|
stationId: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
gridImg,
|
||||||
|
ammeterImg,
|
||||||
|
cabinetImg,
|
||||||
|
chargingPileImg,
|
||||||
|
distributionCabinetImg,
|
||||||
|
cangImg,
|
||||||
|
frameImg,
|
||||||
|
ACDCImg,
|
||||||
|
DCImg,
|
||||||
|
STSImg,
|
||||||
|
dotData: {
|
||||||
|
lineTop: 'M 0,0 0,0',
|
||||||
|
lineTopLeft: 'M 0,0 0,0',
|
||||||
|
lineBottomLeft: 'M 0,0 0,0 0,0',
|
||||||
|
lineBottomRight: 'M 0,0 0,0 0,0',
|
||||||
|
lineBottomLeftTwo: 'M 0,0 0,0 0,0',
|
||||||
|
lineBottomRightTwo: 'M 0,0 0,0 0,0'
|
||||||
|
},
|
||||||
|
|
||||||
|
partList: [
|
||||||
|
{ soc: 0, soh: 0, activePowerPCS: 0.0, reactivePowerPCS: 0.0 },
|
||||||
|
{ soc: 0, soh: 0, activePowerPCS: 0.0, reactivePowerPCS: 0.0 },
|
||||||
|
{ soc: 0, soh: 0, activePowerPCS: 0.0, reactivePowerPCS: 0.0 },
|
||||||
|
{ soc: 0, soh: 0, activePowerPCS: 0.0, reactivePowerPCS: 0.0 }
|
||||||
|
],
|
||||||
|
loading: false,
|
||||||
|
activePowerTotal: {},
|
||||||
|
show_point_dispostion: false,
|
||||||
|
pageLocation: '',
|
||||||
|
permissionId: null,
|
||||||
|
pcsLeftData: [],
|
||||||
|
pcsCenterData: [],
|
||||||
|
pcsRightData: [],
|
||||||
|
stsCenterData: [],
|
||||||
|
acdcCenterData: [],
|
||||||
|
ammeterData: [],
|
||||||
|
configData: {}
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
lang() {
|
||||||
|
return this.$store.getters.language
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {},
|
||||||
|
created() {
|
||||||
|
const result = changeTheme()
|
||||||
|
this.configData = config[result]
|
||||||
|
console.log('配置' + JSON.stringify(this.configData))
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
if (this.$store.getters.menuList.length) {
|
||||||
|
this.permissionId = this.$store.getters.menuList.find(item => {
|
||||||
|
return item.url === this.$route.path
|
||||||
|
}).id
|
||||||
|
}
|
||||||
|
}, 300)
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
truncateText(text, maxWidth) {
|
||||||
|
if (!text) return ''
|
||||||
|
const width = this.measureTextWidth(text)
|
||||||
|
if (width <= maxWidth) return text
|
||||||
|
|
||||||
|
let truncated = text
|
||||||
|
while (this.measureTextWidth(truncated + '...') > maxWidth && truncated.length > 0) {
|
||||||
|
truncated = truncated.slice(0, -1)
|
||||||
|
}
|
||||||
|
return truncated + (truncated.length < text.length ? '...' : '')
|
||||||
|
},
|
||||||
|
// 精确测量文本渲染宽度(像素)
|
||||||
|
measureTextWidth(text, font = '14px sans-serif') {
|
||||||
|
// 创建或复用一个 canvas(避免重复创建)
|
||||||
|
if (!this._textMeasurementCanvas) {
|
||||||
|
this._textMeasurementCanvas = document.createElement('canvas')
|
||||||
|
}
|
||||||
|
const ctx = this._textMeasurementCanvas.getContext('2d')
|
||||||
|
ctx.font = font
|
||||||
|
return ctx.measureText(text).width
|
||||||
|
},
|
||||||
|
|
||||||
|
// 计算 value 的 x 坐标:baseX + name 的实际宽度 + 一点间距
|
||||||
|
calculateValueX(name, baseX = 200) {
|
||||||
|
const truncatedName = this.truncateText(name, 120) // 限制 name 最大宽度
|
||||||
|
const width = this.measureTextWidth(truncatedName)
|
||||||
|
return baseX + width + 6 // +6 是 name 和 value 之间的小空隙
|
||||||
|
},
|
||||||
|
countChineseAndEnglishCharacters(str, x) {
|
||||||
|
var chineseCount = str.match(/[\u4e00-\u9fa5]/g) ? str.match(/[\u4e00-\u9fa5]/g).length : 0
|
||||||
|
var englishCount = str.match(/[a-zA-Z]/g) ? str.match(/[a-zA-Z]/g).length : 0
|
||||||
|
var otherCount = str.length - chineseCount - englishCount
|
||||||
|
const obj = { otherCount: otherCount, chineseCount: chineseCount, englishCount: englishCount }
|
||||||
|
return (obj.englishCount * 11) + (obj.chineseCount * 16) + (obj.otherCount * 8) + x
|
||||||
|
},
|
||||||
|
lookDeviceDetail(val) { // 查看设备详情
|
||||||
|
this.pageLocation = val
|
||||||
|
this.show_point_dispostion = true
|
||||||
|
},
|
||||||
|
closePoint() {
|
||||||
|
this.show_point_dispostion = false
|
||||||
|
},
|
||||||
|
async getpcsCenter() {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await DynamicConfigPoint({
|
||||||
|
pageLocation: 'triad-pcs-center',
|
||||||
|
permissionId: this.permissionId,
|
||||||
|
stationId: this.stationId })
|
||||||
|
this.pcsCenterData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getstsCenter() {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await DynamicConfigPoint({
|
||||||
|
pageLocation: 'triad-sts-center',
|
||||||
|
permissionId: this.permissionId,
|
||||||
|
stationId: this.stationId })
|
||||||
|
this.stsCenterData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getacdcCenter() {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await DynamicConfigPoint({
|
||||||
|
pageLocation: 'triad-acdc-center',
|
||||||
|
permissionId: this.permissionId,
|
||||||
|
stationId: this.stationId })
|
||||||
|
this.acdcCenterData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getLineStatus(type) {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await DynamicConfigPoint({
|
||||||
|
pageLocation: type,
|
||||||
|
permissionId: this.permissionId,
|
||||||
|
stationId: this.stationId })
|
||||||
|
if (type === 'line-bottom-left') {
|
||||||
|
if (res.data?.length) {
|
||||||
|
if (res.data[0].value > 0) {
|
||||||
|
this.dotData.lineBottomLeft = 'M 283,0, 280, 0, 0 ,0'
|
||||||
|
} else if (res.data[0].value < 0) {
|
||||||
|
this.dotData.lineBottomLeft = 'M 0,0 281,0 281,0'
|
||||||
|
} else {
|
||||||
|
this.dotData.lineBottomLeft = ''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.dotData.lineBottomLeft = ''
|
||||||
|
}
|
||||||
|
} else if (type === 'line-bottom-right') {
|
||||||
|
if (res.data?.length) {
|
||||||
|
if (res.data[0].value > 0) {
|
||||||
|
this.dotData.lineBottomRight = 'M -271, 0 , -271 , 0 , 0 , 0'
|
||||||
|
} else if (res.data[0].value < 0) {
|
||||||
|
this.dotData.lineBottomRight = 'M 0,0 -271,0 -271,0'
|
||||||
|
} else {
|
||||||
|
this.dotData.lineBottomRight = ''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.dotData.lineBottomRight = ''
|
||||||
|
}
|
||||||
|
} else if (type === 'line-bottom-center') {
|
||||||
|
if (res.data?.length) {
|
||||||
|
if (res.data[0].value > 0) {
|
||||||
|
this.dotData.lineCenter = 'M 0,-283,0,0,0,0'
|
||||||
|
} else if (res.data[0].value < 0) {
|
||||||
|
this.dotData.lineCenter = 'M 0,0,0,0,0,-283'
|
||||||
|
} else {
|
||||||
|
this.dotData.lineCenter = ''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.dotData.lineCenter = ''
|
||||||
|
}
|
||||||
|
} else if (type === 'line-top-left') {
|
||||||
|
if (res.data?.length) {
|
||||||
|
if (res.data[0].value > 0) {
|
||||||
|
this.dotData.lineTopLeft = 'M 230,0 0,0'
|
||||||
|
} else if (res.data[0].value < 0) {
|
||||||
|
this.dotData.lineTopLeft = 'M 0,0 225,0'
|
||||||
|
} else {
|
||||||
|
this.dotData.lineTopLeft = ''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.dotData.lineTopLeft = ''
|
||||||
|
}
|
||||||
|
} else if (type === 'line-top-right') {
|
||||||
|
if (res.data?.length) {
|
||||||
|
if (res.data[0].value > 0) {
|
||||||
|
this.dotData.lineTopRight = 'M -230,0 0,0'
|
||||||
|
} else if (res.data[0].value < 0) {
|
||||||
|
this.dotData.lineTopRight = 'M 0,0 -225,0'
|
||||||
|
} else {
|
||||||
|
this.dotData.lineTopRight = ''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.dotData.lineTopRight = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getpcsLeft() {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await DynamicConfigPoint({
|
||||||
|
pageLocation: 'triad-pcs-left',
|
||||||
|
permissionId: this.permissionId,
|
||||||
|
stationId: this.stationId })
|
||||||
|
this.pcsLeftData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getammeter() {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await DynamicConfigPoint({
|
||||||
|
pageLocation: 'triad-ammeter',
|
||||||
|
permissionId: this.permissionId,
|
||||||
|
stationId: this.stationId })
|
||||||
|
this.ammeterData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getpcsRight() {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await DynamicConfigPoint({
|
||||||
|
pageLocation: 'triad-pcs-right',
|
||||||
|
permissionId: this.permissionId,
|
||||||
|
stationId: this.stationId })
|
||||||
|
this.pcsRightData = res.data
|
||||||
|
} catch (error) {
|
||||||
|
// console.log(error);
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getData() {
|
||||||
|
this.getpcsRight()
|
||||||
|
this.getpcsCenter()
|
||||||
|
this.getstsCenter()
|
||||||
|
this.getacdcCenter()
|
||||||
|
this.getpcsLeft()
|
||||||
|
this.getammeter()
|
||||||
|
this.getLineStatus('line-bottom-left')
|
||||||
|
this.getLineStatus('line-bottom-center')
|
||||||
|
this.getLineStatus('line-bottom-right')
|
||||||
|
this.getLineStatus('line-top-left')
|
||||||
|
this.getLineStatus('line-top-right')
|
||||||
|
this.$forceUpdate()
|
||||||
|
},
|
||||||
|
getDynamicPointData() {
|
||||||
|
this.getData()
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.center-box {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin move-round($duration, $delay) {
|
||||||
|
fill: none;
|
||||||
|
stroke-width: 5;
|
||||||
|
stroke-linejoin: round;
|
||||||
|
stroke-linecap: round;
|
||||||
|
stroke-dasharray: 3, 900;
|
||||||
|
stroke-dashoffset: 0;
|
||||||
|
animation: lineMove $duration $delay cubic-bezier(0, 0, 0.74, 0.74) infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes lineMove {
|
||||||
|
0% {
|
||||||
|
stroke-dashoffset: -850;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
stroke-dashoffset: -0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.g-rect-fill-two {
|
||||||
|
@include move-round(3.5s, 1s);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -343,7 +343,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<dispositionPointDialog :visible="show_point_dispostion" :max="4" :page-location="pageLocation" @close="closePoint" @getData="getDynamicPointData" />
|
<DispositionPointData :disposition-show="show_point_dispostion" :max="4" :page-location="pageLocation" @close="closePoint" @getData="getDynamicPointData" />
|
||||||
</ItemBox>
|
</ItemBox>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@ -460,7 +460,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<dispositionPointDialog :visible="show_point_dispostion" :page-location="pageLocation" @close="closePoint" @getData="getDynamicPointData" />
|
<DispositionPointData :disposition-show="show_point_dispostion" :page-location="pageLocation" @close="closePoint" @getData="getDynamicPointData" />
|
||||||
|
|
||||||
</ItemBox>
|
</ItemBox>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -158,6 +158,8 @@ import dispositionBottomRight from './components/bottom-right/disposition.vue'
|
|||||||
import { getDashboard } from '@/api/station/maintain'
|
import { getDashboard } from '@/api/station/maintain'
|
||||||
import { queryElecMeterConfig } from '@/api/home-page/index'
|
import { queryElecMeterConfig } from '@/api/home-page/index'
|
||||||
|
|
||||||
|
import pv1AndStorage_261 from './components/top-center/pv1storage261.vue'
|
||||||
|
import pv2AndStorage_261 from './components/top-center/pv2storage261.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
components: {
|
components: {
|
||||||
@ -200,7 +202,9 @@ export default {
|
|||||||
dispositionBottomRight,
|
dispositionBottomRight,
|
||||||
controlTopRight,
|
controlTopRight,
|
||||||
secondDispositionTopCenter,
|
secondDispositionTopCenter,
|
||||||
tenthTopCenter
|
tenthTopCenter,
|
||||||
|
pv1AndStorage_261,
|
||||||
|
pv2AndStorage_261
|
||||||
|
|
||||||
},
|
},
|
||||||
props: {},
|
props: {},
|
||||||
|
|||||||
@ -39,6 +39,19 @@
|
|||||||
<div class="unit">万元</div>
|
<div class="unit">万元</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="income today-income">
|
||||||
|
<div class="title">
|
||||||
|
<span class="square" />
|
||||||
|
<span>今日实时收益</span>
|
||||||
|
</div>
|
||||||
|
<div class="value">
|
||||||
|
<template v-for="(item,index) in info.todayProfit">
|
||||||
|
<div :key="index" class="number">{{ item }}</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div class="unit">元</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -73,10 +86,12 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
.today-income{
|
||||||
|
width: 90%;
|
||||||
|
}
|
||||||
.income {
|
.income {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding-top: 15px;
|
|
||||||
z-index: 99999;
|
z-index: 99999;
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@ -85,10 +85,12 @@ export default {
|
|||||||
leftBottomInfo: null,
|
leftBottomInfo: null,
|
||||||
deptId: null,
|
deptId: null,
|
||||||
interval: null,
|
interval: null,
|
||||||
|
intervalTodayIncome: null,
|
||||||
centerTopInfo: {
|
centerTopInfo: {
|
||||||
totalProfit: 0,
|
totalProfit: 0,
|
||||||
yearProfit: 0,
|
yearProfit: 0,
|
||||||
yestProfit: 0
|
yestProfit: 0,
|
||||||
|
todayProfit: 0
|
||||||
},
|
},
|
||||||
weatherInfo: {
|
weatherInfo: {
|
||||||
skyCon: '',
|
skyCon: '',
|
||||||
@ -108,7 +110,9 @@ export default {
|
|||||||
},
|
},
|
||||||
destroyed() {
|
destroyed() {
|
||||||
clearInterval(this.interval)
|
clearInterval(this.interval)
|
||||||
|
clearInterval(this.intervalTodayIncome)
|
||||||
this.interval = null
|
this.interval = null
|
||||||
|
this.intervalTodayIncome = null
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 修改Favicon的方法
|
// 修改Favicon的方法
|
||||||
@ -148,6 +152,47 @@ export default {
|
|||||||
this.$refs.MapCenterRef.getLeftData(this.deptId)
|
this.$refs.MapCenterRef.getLeftData(this.deptId)
|
||||||
|
|
||||||
this.$refs.CenterBottomRef.getData(this.deptId)
|
this.$refs.CenterBottomRef.getData(this.deptId)
|
||||||
|
// const res = await GetOverviewData({
|
||||||
|
// deptId: this.deptId
|
||||||
|
// })
|
||||||
|
// this.leftTopInfo = {
|
||||||
|
// capacity: res.data.capacity,
|
||||||
|
// stationNumber: res.data.stationNumber,
|
||||||
|
// yearCharge: res.data.yearCharge,
|
||||||
|
// yearDischarge: res.data.yearDischarge,
|
||||||
|
// totalCharge: res.data.totalCharge,
|
||||||
|
// totalDischarge: res.data.totalDischarge,
|
||||||
|
// dayCharge: res.data.dayCharge,
|
||||||
|
// dayDischarge: res.data.dayDischarge
|
||||||
|
// }
|
||||||
|
// this.centerTopInfo = {
|
||||||
|
// totalProfit: (Number(res.data.totalProfit) / 1E4).toFixed(2),
|
||||||
|
// yearProfit: (Number(res.data.yearProfit) / 1E4).toFixed(2),
|
||||||
|
// yestProfit: (Number(res.data.yestProfit) / 1E4).toFixed(2),
|
||||||
|
// todayProfit: Number(res.data.todayProfit).toFixed(2)
|
||||||
|
// }
|
||||||
|
} catch (err) {
|
||||||
|
// this.leftTopInfo = {
|
||||||
|
// capacity: 0,
|
||||||
|
// stationNumber: 0,
|
||||||
|
// yearCharge: 0,
|
||||||
|
// yearDischarge: 0,
|
||||||
|
// totalCharge: 0,
|
||||||
|
// totalDischarge: 0,
|
||||||
|
// dayCharge: 0,
|
||||||
|
// dayDischarge: 0
|
||||||
|
// }
|
||||||
|
// this.centerTopInfo = {
|
||||||
|
// totalProfit: 0,
|
||||||
|
// yearProfit: 0,
|
||||||
|
// yestProfit: 0,
|
||||||
|
// todayProfit: 0
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async getDataIncome() {
|
||||||
|
try {
|
||||||
const res = await GetOverviewData({
|
const res = await GetOverviewData({
|
||||||
deptId: this.deptId
|
deptId: this.deptId
|
||||||
})
|
})
|
||||||
@ -161,11 +206,11 @@ export default {
|
|||||||
dayCharge: res.data.dayCharge,
|
dayCharge: res.data.dayCharge,
|
||||||
dayDischarge: res.data.dayDischarge
|
dayDischarge: res.data.dayDischarge
|
||||||
}
|
}
|
||||||
|
|
||||||
this.centerTopInfo = {
|
this.centerTopInfo = {
|
||||||
totalProfit: (Number(res.data.totalProfit) / 1E4).toFixed(2),
|
totalProfit: (Number(res.data.totalProfit) / 1E4).toFixed(2),
|
||||||
yearProfit: (Number(res.data.yearProfit) / 1E4).toFixed(2),
|
yearProfit: (Number(res.data.yearProfit) / 1E4).toFixed(2),
|
||||||
yestProfit: (Number(res.data.yestProfit) / 1E4).toFixed(2)
|
yestProfit: (Number(res.data.yestProfit) / 1E4).toFixed(2),
|
||||||
|
todayProfit: Number(res.data.todayProfit).toFixed(2)
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.leftTopInfo = {
|
this.leftTopInfo = {
|
||||||
@ -181,7 +226,8 @@ export default {
|
|||||||
this.centerTopInfo = {
|
this.centerTopInfo = {
|
||||||
totalProfit: 0,
|
totalProfit: 0,
|
||||||
yearProfit: 0,
|
yearProfit: 0,
|
||||||
yestProfit: 0
|
yestProfit: 0,
|
||||||
|
todayProfit: 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -196,9 +242,13 @@ export default {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
this.deptId = res.data?.deptId
|
this.deptId = res.data?.deptId
|
||||||
this.getData()
|
this.getData()
|
||||||
|
this.getDataIncome()
|
||||||
this.interval = setInterval(() => {
|
this.interval = setInterval(() => {
|
||||||
this.getData()
|
this.getData()
|
||||||
}, 600000)
|
}, 600000)
|
||||||
|
this.intervalTodayIncome = setInterval(() => {
|
||||||
|
this.getDataIncome()
|
||||||
|
}, 10000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -205,7 +205,7 @@ import {
|
|||||||
GetPageSelectAll,
|
GetPageSelectAll,
|
||||||
DeleteTemplate
|
DeleteTemplate
|
||||||
} from '@/api/surveillance/battery-analysis'
|
} from '@/api/surveillance/battery-analysis'
|
||||||
import { GetQueryPointList } from '@/api/surveillance/battery-analysis'
|
import { GetQueryPoint } from '@/api/surveillance/battery-analysis'
|
||||||
import ModelKuang from '@/components/ModelKuang/index.vue'
|
import ModelKuang from '@/components/ModelKuang/index.vue'
|
||||||
import { pageSize, pageSizes } from '@/config'
|
import { pageSize, pageSizes } from '@/config'
|
||||||
import Pagingbar from '@/components/Pagingbar'
|
import Pagingbar from '@/components/Pagingbar'
|
||||||
@ -663,7 +663,7 @@ export default {
|
|||||||
stationId: this.filters.stationId
|
stationId: this.filters.stationId
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const res = await GetQueryPointList(params)
|
const res = await GetQueryPoint(params)
|
||||||
const option = res.data
|
const option = res.data
|
||||||
// 将指标的数据处理成树
|
// 将指标的数据处理成树
|
||||||
if (option.length > 0) {
|
if (option.length > 0) {
|
||||||
|
|||||||
@ -13,6 +13,8 @@ const leftBottomList = [
|
|||||||
]
|
]
|
||||||
const topCenterList = [
|
const topCenterList = [
|
||||||
{ label: '215kWh', value: 'topCenter_215' },
|
{ label: '215kWh', value: 'topCenter_215' },
|
||||||
|
{ label: '261光储1', value: 'pv1AndStorage_261' },
|
||||||
|
{ label: '261光储2', value: 'pv2AndStorage_261' },
|
||||||
{ label: '标准', value: 'commonTopCenter' },
|
{ label: '标准', value: 'commonTopCenter' },
|
||||||
{ label: '单柜配置', value: 'onceTopCenter' },
|
{ label: '单柜配置', value: 'onceTopCenter' },
|
||||||
{ label: '二合一', value: 'secondTopCenter' },
|
{ label: '二合一', value: 'secondTopCenter' },
|
||||||
@ -26,7 +28,8 @@ const topCenterList = [
|
|||||||
{ label: '七合一(配置)', value: 'seventhTopCenter' },
|
{ label: '七合一(配置)', value: 'seventhTopCenter' },
|
||||||
{ label: '八合一(配置)', value: 'eighthTopCenter' },
|
{ label: '八合一(配置)', value: 'eighthTopCenter' },
|
||||||
{ label: '九合一(配置)', value: 'ninthTopCenter' },
|
{ label: '九合一(配置)', value: 'ninthTopCenter' },
|
||||||
{ label: '十合一(配置)', value: 'tenthTopCenter' }
|
{ label: '十合一(配置)', value: 'tenthTopCenter' },
|
||||||
|
{ label: '一百二十合一(配置)', value: 'zzhbTopCenter' }
|
||||||
]
|
]
|
||||||
const rightTopList = [
|
const rightTopList = [
|
||||||
{ label: '实时告警', value: 'topRight' },
|
{ label: '实时告警', value: 'topRight' },
|
||||||
|
|||||||
@ -14,7 +14,7 @@ const name = defaultSettings.title || '弘正新能源' // page title
|
|||||||
// You can change the port by the following method:
|
// You can change the port by the following method:
|
||||||
// port = 9527 npm run dev OR npm run dev --port = 9527
|
// port = 9527 npm run dev OR npm run dev --port = 9527
|
||||||
|
|
||||||
const port = process.env.port || process.env.npm_config_port || 9527 // dev port
|
const port = process.env.port || process.env.npm_config_port || 10324 // dev port
|
||||||
|
|
||||||
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
Reference in New Issue
Block a user