svg拓扑图修改为canvas拓扑图

This commit is contained in:
huangjp
2026-03-09 14:50:40 +08:00
parent b0a6891bce
commit ad1d898e7d
30 changed files with 5463 additions and 3395 deletions

View File

@ -400,6 +400,8 @@ const install = (Vue, vm) => {
GetFireConfig: (params = {}) =>
vm.$u.post(config.adminPath + "/business/topologyAttribute/DataConfig", params),
getPvElecData: (params = {}) =>
vm.$u.post(config.adminPath + "/business/openStation/getPvData", params)
},

View File

@ -2,8 +2,8 @@
"name" : "Zeta Cloud",
"appid" : "__UNI__86592F3",
"description" : "Zetatech",
"versionName" : "2.0.14",
"versionCode" : 219,
"versionName" : "2.0.16",
"versionCode" : 221,
"transformPx" : false,
"sassImplementationName" : "node-sass",
"app-plus" : {
@ -62,33 +62,33 @@
},
"icons" : {
"android" : {
"hdpi" : "D:/zhuomian/mipmap-hdpi/72x72.png",
"xhdpi" : "D:/zhuomian/mipmap-xhdpi/96x96.png",
"xxhdpi" : "D:/zhuomian/mipmap-xxhdpi/144x144.png",
"xxxhdpi" : "D:/zhuomian/mipmap-xxxhdpi/1024x1024.png"
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "D:/zhuomian/1/1024x1024.png",
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "D:/zhuomian/申请邓白氏编码资料表/mipmap-mdpi/76x76.png",
"app@2x" : "D:/zhuomian/申请邓白氏编码资料表/mipmap-xhdpi/152x152.png",
"notification" : "D:/zhuomian/mipmap-mdpi/20x20.png",
"notification@2x" : "D:/zhuomian/mipmap-mdpi/40x40.png",
"proapp@2x" : "D:/zhuomian/申请邓白氏编码资料表/mipmap-xhdpi/167x167.png",
"settings" : "D:/zhuomian/mipmap-mdpi/29x29.png",
"settings@2x" : "D:/zhuomian/mipmap-xhdpi/58x58.png",
"spotlight" : "D:/zhuomian/mipmap-mdpi/40x40.png",
"spotlight@2x" : "D:/zhuomian/mipmap-xxxhdpi/80x80.png"
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "D:/zhuomian/mipmap-xhdpi/120x120.png",
"app@3x" : "D:/zhuomian/mipmap-xxhdpi/180x180.png",
"notification@2x" : "D:/zhuomian/mipmap-xhdpi/40x40.png",
"notification@3x" : "D:/zhuomian/mipmap-xxhdpi/60x60.png",
"settings@2x" : "D:/zhuomian/mipmap-xhdpi/58x58.png",
"settings@3x" : "D:/zhuomian/mipmap-xxhdpi/87x87.png",
"spotlight@2x" : "D:/zhuomian/mipmap-xxxhdpi/80x80.png",
"spotlight@3x" : "D:/zhuomian/mipmap-xhdpi/120x120.png"
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
},
@ -96,9 +96,9 @@
"androidStyle" : "default",
"androidTranslucent" : true,
"android" : {
"hdpi" : "D:/zhuomian/3.png",
"xhdpi" : "D:/zhuomian/2.png",
"xxhdpi" : "D:/zhuomian/1.png"
"hdpi" : "D:/zzfiles/zz-Upload-APP/zetatech-app-logo/Android启动图片设置/480x762new.png",
"xhdpi" : "D:/zzfiles/zz-Upload-APP/zetatech-app-logo/Android启动图片设置/720x1242new.png",
"xxhdpi" : "D:/zzfiles/zz-Upload-APP/zetatech-app-logo/Android启动图片设置/1080x1882new.png"
},
"iosStyle" : "common",
"ios" : {

View File

@ -20,71 +20,6 @@
<charts v-else id="pcsChart" :options="curve_option"></charts>
</view>
</view>
<!-- <view class="box" style="margin-bottom: 0;">
<Section :title="$t('homePage.device.deviceData')" />
<zero-loading v-if="stationLoading" position="absolute"></zero-loading>
<view v-else class="group-box">
<view class="group-item" @click="showHistory($t('homePage.home.batVoltage'), 'outputPower', 'pcs', 'kW', '')">
<view class="history-icon">
<image src="/static/aidex/images/history-icon.png"></image>
</view>
<view class="item-icon">
<image src="/static/aidex/images/zjrl.png"></image>
</view>
<view class="item-con">
<view class="item-num">{{ panelData.pvActivePower | kWFormat }}
</view>
<view class="item-title">{{$t('homePage.home.batVoltage')}}(V)</view>
</view>
</view>
<view class="group-item border-right"
@click="showHistory($t('homePage.home.batCurrent'), 'reactivePowerPCS', 'pcs', 'V', '')">
<view class="history-icon">
<image src="/static/aidex/images/history-icon.png"></image>
</view>
<view class="item-icon">
<image src="/static/aidex/images/zjrl.png"></image>
</view>
<view class="item-con">
<view class="item-num">{{ panelData.lowV }}
</view>
<view class="item-title">{{$t('homePage.home.batCurrent')}}(A)</view>
</view>
</view>
<view class="group-item" @click="showHistory($t('homePage.home.busVoltage'), 'grid', 'pcs', 'Hz', '')">
<view class="history-icon">
<image src="/static/aidex/images/history-icon.png"></image>
</view>
<view class="item-icon">
<image src="/static/aidex/images/dqgl.png"></image>
</view>
<view class="item-con">
<view class="item-num">{{ panelData.lowI | isNull }}
</view>
<view class="item-title">{{$t('homePage.home.busVoltage')}}(V)</view>
</view>
</view>
<view class="group-item border-right" @click="showHistory($t('homePage.home.busCurrent'), 'volA', 'pcs', 'V', '')">
<view class="history-icon">
<image src="/static/aidex/images/history-icon.png"></image>
</view>
<view class="item-icon">
<image src="/static/aidex/images/zfdl.png"></image>
</view>
<view class="item-con">
<view class="item-num">{{ panelData.highV | isNull }}
</view>
<view class="item-title">{{$t('homePage.home.busCurrent')}}(A)</view>
</view>
</view>
</view>
</view> -->
<historyModal :is-show.sync="histroyShow" :title="chartTitle" :params="hisParams" />
<u-action-sheet :list="actionSheetList" v-model="timeShow" @click="actionSheetCallback" @close="closeTimeAction"
:mask-close-able="false"></u-action-sheet>
@ -234,8 +169,6 @@
},
],
}
],
imageCanvasData: [
{
@ -331,7 +264,7 @@
const xAxis = [];
val.forEach((v) => {
xAxis.push(v.data);
gonglv.push(v.planCurve);
gonglv.push(v.inCoreDataCurve);
// soc.push(v.inCoreDataCurve);
});
this.curve_option = {
@ -512,12 +445,10 @@
this.textCanvasData[1].font[1].text = res.data.highV?.value ? res.data.highV.value + " V" : 0 + " V";
this.textCanvasData[2].font[1].text = res.data.lowV?.value ? res.data.lowV.value + " V" : 0 + " V";
this.textCanvasData[3].font[1].text = res.data.lowI?.value ? res.data.lowI.value + " A" : 0 + " A";
this.textCanvasData[5].font[1].text = res.data.onGrid?.value ?
this.$t('homePage.device.grid') :
this.$t('homePage.device.offGrid');
if(res.data.outputPower?.value){
this.textCanvasData[6].font[1].text = this.getFlowDirection(res.data.outputPower?.value, res
.data.flowDirection)
this.textCanvasData[4].font[1].text = res.data.onGrid?.value ? this.$t('homePage.device.grid') : this.$t('homePage.device.offGrid');
if(res.data.pvActivePower?.value){
this.textCanvasData[5].font[1].text = this.getFlowDirection(res.data.pvActivePower?.value, res
.data.runState?.value)
}
this.canvasData = [...this.textCanvasData, ...this.imageCanvasData, ...this.lineCanvasData]
})

View File

@ -92,9 +92,9 @@
}
.center-logo {
width: 410rpx;
height: 150rpx;
top: 100rpx;
width: 220rpx;
height: 140rpx;
top: 80rpx;
position: absolute;
}

View File

@ -7,7 +7,7 @@
ZETA CLOUD
</view>
</view>
<image src="/static/aidex/login/bg-logo2.png" class="center-logo"></image>
<image src="/static/aidex/login/bg-logo1.png" class="center-logo"></image>
<!--首页用户密码输入框 -->

View File

@ -14,7 +14,11 @@
return {
charge_option: {},
stationId: null,
chartLoading: false
chartLoading: false,
chartChargePv:{
chartChargeEle:[],
chartPv:[]
}
}
},
props: {
@ -27,13 +31,16 @@
currentStation() {
return this.vuex_currentStation;
},
inverterFlag(){
return this.vuex_inverterFlag;
},
},
watch: {
currentStation: {
handler(val) {
if (val && val.id) {
this.stationId = val.id
this.GetChargeChart()
this.getData();
}
},
deep: true,
@ -42,7 +49,7 @@
activeTime: {
handler(val) {
if (val && this.stationId) {
this.GetChargeChart()
this.getData();
}
},
deep: true,
@ -51,8 +58,32 @@
},
methods: {
getData() {
this.GetChargeChart()
async getData() {
await this.GetChargeChart()
if(this.inverterFlag === 1){
this.GetPvChart()
}
},
async GetPvChart() {
this.chartLoading = true
//充放电曲线
let self = this;
return new Promise((resolve, reject) => {
self.$u.api.homePageData
.getPvElecData({
stationId: this.stationId,
type: this.activeTime,
})
.then((res) => {
self.chartLoading = false;
self.chartChargePv.chartPv = res.data;
self.initChargeChart(self.chartChargePv);
resolve();
})
.catch((err) => {
reject("错误");
});
});
},
async GetChargeChart() {
this.chartLoading = true
@ -66,7 +97,11 @@
})
.then((res) => {
self.chartLoading = false
if(self.inverterFlag !== 1){
self.initChargeChart(res.data);
}else{
self.chartChargePv.chartChargeEle = res.data;
}
resolve();
})
.catch((err) => {
@ -80,12 +115,13 @@
let discharge_data = [];
let pv_data = [];
let benefit_data = [];
if (val && val.length > 0) {
val.forEach((item) => {
let self = this;
if (val.chartChargeEle && val.chartChargeEle.length > 0) {
val.chartChargeEle.forEach((item,idx) => {
x_data.push(item.date);
charge_data.push(item.chargeElec);
discharge_data.push(item.dischargeElec);
pv_data.push(item.pvChargeElec);
if(self.inverterFlag === 1){pv_data.push(val.chartPv.length > 0? val.chartPv[idx].powerGenerate:'0')};
benefit_data.push(item.income);
});
} else {
@ -95,6 +131,43 @@
pv_data = [0, 0, 0, 0, 0, 0, 0];
benefit_data = [0, 0, 0, 0, 0, 0, 0];
}
let optionConfigPv = {
color: ["#009458", "#BFE49F", "#3977B1"],
legend:[this.$t('homePage.home.charge'), this.$t('homePage.home.disCharge'), this.$t(
'homePage.home.photovoltaicCharge')],
series: [{
data: charge_data,
type: "bar",
name: this.$t('homePage.home.charge'),
},
{
data: discharge_data,
type: "bar",
name: this.$t('homePage.home.disCharge'),
},
{
data: pv_data,
type: "bar",
name: this.$t('homePage.home.photovoltaicCharge'),
}
]
};
let optionConfig = {
color: ["#009458", "#BFE49F"],
legend:[this.$t('homePage.home.charge'), this.$t('homePage.home.disCharge')],
series: [{
data: charge_data,
type: "bar",
name: this.$t('homePage.home.charge'),
},
{
data: discharge_data,
type: "bar",
name: this.$t('homePage.home.disCharge'),
}
]
};
//充放电图表
this.charge_option = {
tooltip: {
@ -144,7 +217,7 @@
return [x, y];
},
},
color: ["#009458", "#BFE49F", "#3977B1"],
color: self.inverterFlag === 1? optionConfigPv.color:optionConfig.color,
legend: {
animation: false,
right: "0",
@ -152,8 +225,7 @@
icon: "rect",
itemWidth: 10,
itemHeight: 10,
data: [this.$t('homePage.home.charge'), this.$t('homePage.home.disCharge'), this.$t(
'homePage.home.photovoltaicCharge')],
data: self.inverterFlag === 1? optionConfigPv.legend:optionConfig.legend,
},
grid: {
left: "15%",
@ -211,23 +283,7 @@
},
},
},
series: [{
data: charge_data,
type: "bar",
name: this.$t('homePage.home.charge'),
},
{
data: discharge_data,
type: "bar",
name: this.$t('homePage.home.disCharge'),
},
{
data: pv_data,
type: "bar",
name: this.$t('homePage.home.photovoltaicCharge'),
},
],
series: self.inverterFlag === 1? optionConfigPv.series:optionConfig.series,
};
},
},

File diff suppressed because one or more lines are too long

View File

@ -1014,7 +1014,7 @@
stationId: this.stationId,
})
.then((res) => {
console.log(this.textCanvasData);
// console.log(this.textCanvasData);
this.partList = res.data
this.textCanvasData[5].font[1].text = this.partList.length ? this.partList[0].soc + '' : "";
this.textCanvasData[6].font[1].text = this.partList.length ? this.partList[0].soh + '' : "";

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -54,6 +54,11 @@
<third v-else-if="topologyType === 13" ref="tuopu" />
<mdPviese v-else-if="topologyType === 14" ref="tuopu" />
<pv8FourthTopCenter v-else-if="topologyType === 1 && inverterFlag === 1 && pvTopologyType === 5" ref="tuopu" />
<pv2AndStorageSts v-else-if="topologyType === 1 && inverterFlag === 1 && pvTopologyType === 4" ref="tuopu" />
<!-- <third v-else-if="topologyType === 1 && inverterFlag === 1 && pvTopologyType === 4" ref="tuopu" /> -->
<!-- <cixi v-else-if="topologyType === 1 && inverterFlag === 1 && pvTopologyType === 3" ref="tuopu" /> -->
<!-- <ceshiL v-else-if="topologyType === 1 && inverterFlag === 1 && pvTopologyType === 2" ref="tuopu" /> -->
<!-- <cixi v-else-if="topologyType === 1 && inverterFlag === 1 && pvTopologyType === 1" ref="tuopu" /> -->
<standard v-else ref="tuopu" />
</view>
</view>
@ -122,7 +127,8 @@
import Section from "@/components/section/index";
import charts from "@/components/charts/index";
import cixi from './components/topology/cixi'
import ceshiT from './components/topology/ceshiT.vue'
import pv2AndStorageSts from './components/topology/pv2AndStorageSts.vue'
// import pv8FourthTopCenter from './components/topology/ceshiL.vue'
import ceshiL from './components/topology/ceshiL.vue'
import pv8FourthTopCenter from './components/topology/pv8FourthTopCenter.vue'
@ -153,7 +159,7 @@
export default {
components: {
ceshiT,
pv2AndStorageSts,
ceshiL,
pv8FourthTopCenter,
pv2first,
@ -301,7 +307,6 @@
if (val && val.id) {
this.stationId = val.id
this.userId = this.userData.userId
console.log('topologyType:',val);
this.topologyType = val.topologyType
// 重置加载状态,避免复用旧状态
this.componentsLoaded = false
@ -315,6 +320,9 @@
if (this.$refs.deviceFire) {
this.$refs.deviceFire.getData(this.stationId)
}
if (this.$refs.dischargeChart) {
this.$refs.dischargeChart.getData()
}
});
});
}
@ -399,11 +407,9 @@
try {
const { data } = await this.$u.api.homePageData.GetHomePageComponents(this.stationId);
if (data && data.length > 0) {
console.log(data)
this.rightCenter = data[0]?.rightCenter;
const matchedItem = this.topCenterPvArr.find(item => item.name === data[0]?.topCenter);
this.pvTopologyType = matchedItem ? matchedItem.value : this.pvTopologyType;
console.log(this.pvTopologyType)
}
// 接口完成标记加载状态为true
this.componentsLoaded = true

View File

@ -12,7 +12,7 @@
<view class="bg-box">
<view class="userinfo">
<view class="image" @click="navTo('info')">
<image style="width: 100%" src="/static/aidex/login/bg-logo2.png"></image>
<image style="width: 100%" src="/static/aidex/login/bg-logo1.png"></image>
</view>
<view class="info" style="display: flex; justify-content: space-between">
<view>
@ -306,9 +306,9 @@
.image {
flex-shrink: 0;
width: 60%;
margin-top: 100rpx;
height: 150rpx;
width: 40%;
margin-top: 80rpx;
height: 200rpx;
image {
width: 100%;

BIN
static/topology/pv8pcs4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB