diff --git a/common/config.js b/common/config.js
index 711c3d1..6183b98 100644
--- a/common/config.js
+++ b/common/config.js
@@ -2,7 +2,7 @@
const config = {
// 产品名称
- productName: 'Zetatech',
+ productName: 'Zeta Cloud',
// 公司名称
companyName: 'Zetatech',
@@ -22,6 +22,6 @@ const config = {
}
// 设置后台接口服务的基础地址
-config.baseUrl = "https://zzkj-cloud.com/api"
+config.baseUrl = "https://zetatech.zzkj-cloud.com/api"
// config.baseUrl = 'http://1.95.170.86:8002/api'
export default config
\ No newline at end of file
diff --git a/common/http.api.js b/common/http.api.js
index 7bdd87c..1f14aa4 100644
--- a/common/http.api.js
+++ b/common/http.api.js
@@ -433,9 +433,9 @@ const install = (Vue, vm) => {
- //获取电站下的设备
- // GetPageDevice: (params = {}) =>
- // vm.$u.post(config.adminPath + "/business/device/appHomePageDevices", params),
+ //获取光伏发电功率
+ GetPvCurve: (params = {}) =>
+ vm.$u.post(config.adminPath + "/business/pcs/pvCurve", params),
GetPageDevice: (params = {}) =>
@@ -455,6 +455,9 @@ const install = (Vue, vm) => {
enrnings: {
GetTotal: (params = {}) =>
vm.$u.post(config.adminPath + "/business/earningsCalculate/getTotal", params),
+ GetPvMonthData: (params = {}) =>
+ vm.$u.post(config.adminPath + "/business/earningsCalculate/getPvMonthData", params),
+
},
diff --git a/common/locales/homePage/en.js b/common/locales/homePage/en.js
index 7cc319e..3bf3034 100644
--- a/common/locales/homePage/en.js
+++ b/common/locales/homePage/en.js
@@ -20,7 +20,7 @@ export default {
and: 'and',
yszc: 'Privacy Policy',
yhxyhyszc: 'User Agreement and Privacy Policy',
- msgf: 'Welcome to the "Small Savings and Great Energy" APP, we attach great importance to the protection of your personal information and privacy. Please read this app carefully before you use it',
+ msgf: 'Welcome to the "Zeta Cloud" APP, we attach great importance to the protection of your personal information and privacy. Please read this app carefully before you use it',
msgs: 'When you use this application, it means that you have read, understood and agreed to accept all the terms of this agreement. If you do not agree with any of the contents of this Agreement, please stop using this Application immediately.',
agree: 'Agree',
quit: 'Disagree',
@@ -34,11 +34,11 @@ export default {
useElecPrice: 'Electricity prices',
workStatus: 'Working Status:',
standing:'standing',
- activePower:'Active Power(kW):',
+ activePowerpcs:'Active Power:',
operatingPower:'Operating Power',
accumulatedElectricityConsumption:'Total power',
pvKpi: 'PV KPI',
- saveStandardCoal: 'Save standard coal (ton)',
+ saveStandardCoal: 'Save standard coal (t)',
equivalentCo2Reduction: "CO2 emission reduction (kg)",
equivalentTreePlantings: "Equivalent tree plantings (Trees)",
dailyPowerGeneration: 'Daily Power Generation',
@@ -61,6 +61,44 @@ export default {
enmonthTotalChargePrice: 'Total Charging Price Monthly(EUR)',
enmonthTotalDisChargePrice: 'Total Discharging Price Monthly(EUR)',
enearnings: 'Revenue(EUR)',
- pvSwitch:'PV switch'
+ pvSwitch:'PV switch',
+ stationDatacom: 'Station Data',
+ sevenDaycom:'Week',
+ todayEarning: 'Today Earning(EUR)',
+ totalRevenue: 'Cumulative Earnings(EUR)',
+ ratedPower: 'Rated Power(kW)',
+ currentMonthlyPowerGeneration: 'Current monthly power generation',
+ cumulativePowerGeneration: 'cumulative power generation',
+ ratedPowernokw: 'Rated Power',
+ powerGenerationStatus: 'power Generation Status',
+ monthlyIncome: 'Monthly income(EUR)',
+ lowV: 'low-side voltage',
+ lowI: 'low-side current',
+ highV: 'high-side voltage',
+ timesArr: [{
+ text: '1 Minutes',
+ value: 1
+ },
+ {
+ text: '5 Minutes',
+ value: 5
+ },
+ {
+ text: '10 Minutes',
+ value: 10
+ },
+ {
+ text: '15 Minutes',
+ value: 15
+ },
+ {
+ text: '20 Minutes',
+ value: 20
+ },
+ {
+ text: '30 Minutes',
+ value: 30
+ }
+ ]
}
}
\ No newline at end of file
diff --git a/common/locales/homePage/zh.js b/common/locales/homePage/zh.js
index 9a9febd..d352db6 100644
--- a/common/locales/homePage/zh.js
+++ b/common/locales/homePage/zh.js
@@ -20,7 +20,7 @@ export default {
and: '和',
yszc: '隐私政策',
yhxyhyszc: '用户协议和隐私政策',
- msgf: '欢迎使用“小储大能”APP,我们非常重视您的个人信息和隐私保护。在您使用本应用前请仔细阅读',
+ msgf: '欢迎使用“澤泰云”APP,我们非常重视您的个人信息和隐私保护。在您使用本应用前请仔细阅读',
msgs: '您在使用本应用时,即表示您已阅读、理解并同意接受本协议的所有条款。如果您不同意本协议的任何内容,请立即停止使用本应用。',
agree: '同意',
quit: '不同意',
@@ -34,7 +34,7 @@ export default {
useElecPrice: '用电价格',
workStatus: '工作状态:',
standing:'静置',
- activePower:'有功功率(kW):',
+ activePowerpcs:'有功功率:',
operatingPower:'运行功率',
accumulatedElectricityConsumption:'累计电量',
pvKpi: '光伏KPI',
@@ -61,7 +61,44 @@ export default {
enmonthTotalChargePrice: '本月总充电量总价(元)',
enmonthTotalDisChargePrice: '本月总放电量总价(元)',
enearnings: '收益(元)',
- pvSwitch:'PV开关'
-
+ pvSwitch:'PV开关',
+ stationDatacom: '电站数据',
+ sevenDaycom:'近七天',
+ todayEarning: '今日收益(元)',
+ totalRevenue: '累计收益(元)',
+ ratedPower: '额定功率(kW)',
+ currentMonthlyPowerGeneration: '本月发电量',
+ cumulativePowerGeneration: '累计发电量',
+ ratedPowernokw: '额定功率',
+ powerGenerationStatus: '项目发电情况',
+ monthlyIncome: '本月收益(元)',
+ lowV:'低压侧电压',
+ lowI:'低压侧电流',
+ highV:'高压侧电压',
+ timesArr: [{
+ text: '1分钟',
+ value: 1
+ },
+ {
+ text: '5分钟',
+ value: 5
+ },
+ {
+ text: '10分钟',
+ value: 10
+ },
+ {
+ text: '15分钟',
+ value: 15
+ },
+ {
+ text: '20分钟',
+ value: 20
+ },
+ {
+ text: '30分钟',
+ value: 30
+ }
+ ]
}
};
\ No newline at end of file
diff --git a/components/new-canvas/index.vue b/components/new-canvas/index.vue
index 197f040..9fec73f 100644
--- a/components/new-canvas/index.vue
+++ b/components/new-canvas/index.vue
@@ -50,12 +50,18 @@
watch: {
canvasData: {
handler(val) {
- if (val && val.length) {
- this.getSystemInfo()
+ // 等待 windowWidth 初始化完成后再绘制
+ if (this.windowWidth) {
+ this.draw(null); // 直接绘制
+ } else {
+ // 若 windowWidth 未获取,先获取再绘制
+ this.getSystemInfo().then(() => {
+ this.draw(null);
+ });
}
},
deep: true,
- immediate: true
+ immediate: false
}
},
mounted() {
@@ -216,58 +222,73 @@
})
},
- 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 * 6 + obj.chineseCount * 12 + obj.otherCount * 7.5 + x
- );
- },
+ // 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 * 6 + obj.chineseCount * 12 + obj.otherCount * 7.5 + x
+ // );
+ // },
drawText(draw) {
- draw.forEach((item, index) => {
- if (item.font.length) {
- if (item.font.length > 1) {
- item.font.forEach((item2, index2) => {
- if (this.type === 'app') {
- this.ctx.setFontSize(item2.size)
- } else {
- this.ctx.fontSize = item2.size
- }
- this.ctx.fillStyle = item2.color
- const x = this.countChineseAndEnglishCharacters(item.font[0].text, item
- .coord[0][0])
- this.ctx.fillText(item2.text, this.fitSize(index2 === 1 ? x : item.coord[0]
- [0]), this.fitSize(item.coord[0][1]))
- this.ctx.closePath()
- })
- } else {
- if (this.type === 'app') {
- this.ctx.setFontSize(item.font[0].size)
- } else {
- this.ctx.fontSize = item.font[0].size
- }
- this.ctx.fillStyle = item.font[0].color
- this.ctx.fillText(item.font[0].text, this.fitSize(item.coord[0][0]), this.fitSize(item
- .coord[0][1]))
- this.ctx.closePath()
- }
-
-
- }
- })
-
-
+ draw.forEach((item, index) => {
+ if (item.font.length) {
+ // 记录前一个文本的结束位置(用于后续文本偏移)
+ let prevTextEndX = this.fitSize(item.coord[0][0]);
+
+ item.font.forEach((item2, index2) => {
+ // 设置字体大小和颜色
+ if (this.type === 'app') {
+ this.ctx.setFontSize(item2.size);
+ } else {
+ this.ctx.font = `${item2.size}px sans-serif`; // 小程序端补全font属性
+ }
+ this.ctx.fillStyle = item2.color;
+
+ // 计算当前文本的绘制X坐标
+ let currentX = prevTextEndX;
+ // 非第一个文本,加上配置的偏移量(默认8px)
+ if (index2 > 0) {
+ const offsetX = item2.offsetX || 6;
+ currentX += this.fitSize(offsetX); // 适配设备尺寸的偏移量
+ }
+
+ // 绘制文本
+ this.ctx.fillText(
+ item2.text,
+ currentX,
+ this.fitSize(item.coord[0][1])
+ );
+
+ // 更新前一个文本的结束位置(当前文本的X + 文本宽度)
+ const textWidth = this.getTextWidth(item2.text, item2.size);
+ prevTextEndX = currentX + textWidth;
+
+ this.ctx.closePath();
+ });
+ }
+ });
+ },
+ // 新增:计算文本的实际绘制宽度(适配app/小程序)
+ getTextWidth(text, fontSize) {
+ if (this.type === 'app') {
+ // App端通过measureText计算
+ return this.ctx.measureText(text).width;
+ } else {
+ // 小程序端手动计算(更稳定)
+ this.ctx.font = `${fontSize}px sans-serif`;
+ return this.ctx.measureText(text).width;
+ }
},
drawImages(draw, canvas) {
let x,
@@ -350,9 +371,12 @@
})
},
fitSize(coordinate) {
- let newWindowWidth = this.windowWidth //这个windowWidth指的是该设备宽度,可以onLoad监听页面加载中获取
- let v = 375 / newWindowWidth //375是设计稿的大小,得到的v值是:设计稿和设备宽度的比例关系,也可理解成在设计稿的大小基础上放大或缩小的倍数
- return coordinate / v //返回的是当前坐标值或者大小与v的比例
+ let newWindowWidth = this.windowWidth;
+ const designWidth = 375; // 设计稿宽度
+ // 修正比例计算:设备宽度 / 设计稿宽度 = 缩放比例
+ const scale = newWindowWidth / designWidth;
+ // 设计稿的坐标 * 缩放比例 = 设备实际坐标
+ return coordinate * scale;
}
},
diff --git a/components/station-dropdow/index.vue b/components/station-dropdow/index.vue
index a9ba1ce..92e4b24 100644
--- a/components/station-dropdow/index.vue
+++ b/components/station-dropdow/index.vue
@@ -98,6 +98,7 @@ export default {
// val[2].StationShow = this.StationShow
this.$u.vuex("vuex_currentStation", val[2])
this.$u.vuex("vuex_StationShow", this.StationShow)
+ this.$u.vuex("vuex_inverterFlag", value.list[valIndex].list[newValIndex].inverterFlag)
this.$emit('openPop', false)
}
}
diff --git a/hybrid/demo.html b/hybrid/html/demo.html
similarity index 100%
rename from hybrid/demo.html
rename to hybrid/html/demo.html
diff --git a/locales/homePage/en.js b/locales/homePage/en.js
index e65b172..9df2d3d 100644
--- a/locales/homePage/en.js
+++ b/locales/homePage/en.js
@@ -42,7 +42,7 @@ export default {
deviceMonitor: 'Device Monitor',
runCurve: 'Run Time Curve',
chargeDisData: 'Charge/Discharge Data',
- stationData: 'stationData',
+ stationData: 'Station Data',
environmentalData: 'Environmental Control Data',
sevenDay: 'Seven',
monthDay: 'Month',
diff --git a/manifest.json b/manifest.json
index 9d03192..be967d9 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,9 +1,9 @@
{
- "name" : "StoraSmart",
+ "name" : "Zeta Cloud",
"appid" : "__UNI__86592F3",
"description" : "Zetatech",
- "versionName" : "2.0.8",
- "versionCode" : 213,
+ "versionName" : "2.0.13",
+ "versionCode" : 218,
"transformPx" : false,
"sassImplementationName" : "node-sass",
"app-plus" : {
@@ -160,6 +160,5 @@
"disableHostCheck" : true
}
},
- "locale" : "en",
- "fallbackLocale" : "en"
+ "locale" : "en"
}
diff --git a/pages/home-page/device-detail/components/mppt.vue b/pages/home-page/device-detail/components/mppt.vue
index 5eb6e58..b84eeee 100644
--- a/pages/home-page/device-detail/components/mppt.vue
+++ b/pages/home-page/device-detail/components/mppt.vue
@@ -20,7 +20,7 @@
-
+
-
-
-
-
+ -->
@@ -234,62 +117,80 @@
stationId: null,
srcId: null,
hnStationId: [417, 398, 416, 415, 405, 485],
- actionSheetList: this.$t('homePage.device.timesArr'),
- sampleTime:this.$t('homePage.device.timesArr')[0].label,
+ actionSheetList: Object.values(this.$t('homePage.home.timesArr')),
+ sampleTime:this.$t('homePage.home.timesArr')[0].text,
canvasData: [],
textCanvasData: [
+ {
+ type: "text",
+ coord: [
+ [144, 240]
+ ],
+ font: [{
+ text:this.$t('homePage.home.activePowerpcs'),
+ size: 12,
+ color: "#999",
+ },
+ {
+ text: "",
+ size: 12,
+ color: "#000",
+ offsetX: 0
+ },
+ ],
+ },
+ {
+ type: "text",
+ coord: [
+ [144, 260]
+ ],
+ font: [{
+ text:this.$t('homePage.home.highV') + ':',
+ size: 12,
+ color: "#999",
+ },
+ {
+ text: "",
+ size: 12,
+ color: "#000",
+ offsetX: 0
+ },
+ ],
+ },
//2
{
type: "text",
coord: [
- [200, 200]
+ [144, 280]
],
font: [{
- text:this.$t('homePage.device.vol') + ":",
+ text:this.$t('homePage.home.lowV') + ':',
size: 12,
color: "#999",
},
{
- text: "3.265 kVar",
+ text: "",
size: 12,
color: "#000",
- left: 35
+ offsetX: 0
},
],
},
{
type: "text",
coord: [
- [200, 220]
+ [144, 300]
],
font: [{
- text:this.$t('homePage.device.current') + ":",
+ text:this.$t('homePage.home.lowI') + ':',
size: 12,
color: "#999",
},
{
- text: "3.98 A",
+ text: "",
size: 12,
color: "#000",
- left: 35
- },
- ],
- },
- {
- type: "text",
- coord: [
- [200, 180]
- ],
- font: [{
- text:this.$t('homePage.home.pvPower') + ":",
- size: 12,
- color: "#999",
- },
- {
- text: "12.9 kW",
- size: 12,
- color: "#000",
- left: 50
+ offsetX: 0
},
],
},
@@ -299,6 +200,26 @@
coord: [
[3, 120]
],
+ font: [{
+ text: this.$t('homePage.device.gridMode') + ':',
+ size: 14,
+ color: "#999999",
+ width: 50,
+ },
+ {
+ text: "",
+ size: 14,
+ color: "#000",
+ left: 80
+ },
+ ],
+ },
+ //6
+ {
+ type: "text",
+ coord: [
+ [3, 140]
+ ],
font: [{
text: this.$t('homePage.device.runState') + ':',
size: 14,
@@ -306,10 +227,10 @@
width: 50,
},
{
- text: this.$t('homePage.device.offGrid'),
+ text: "",
size: 14,
color: "#000",
- left: 80
+ offsetX: 0
},
],
}
@@ -384,7 +305,7 @@
self.chartLoading = true;
return new Promise((resolve, reject) => {
self.$u.api.deviceList
- .GetPCSCurve({
+ .GetPvCurve({
stationId: this.stationId,
sampleTime: this.time,
srcId: this.srcId,
@@ -406,12 +327,12 @@
},
initChargeChart(val) {
const gonglv = [];
- const soc = [];
+ // const soc = [];
const xAxis = [];
val.forEach((v) => {
xAxis.push(v.data);
- gonglv.push(v.pcsRealTimeCurve);
- soc.push(v.inCoreDataCurve);
+ gonglv.push(v.planCurve);
+ // soc.push(v.inCoreDataCurve);
});
this.curve_option = {
color: ["#BFE49F"],
@@ -548,7 +469,6 @@
}
],
};
-
},
openTimeAction() {
this.timeShow = true;
@@ -556,90 +476,50 @@
getStatus() {
this.stationLoading = true
const self = this;
-
this.$u.api.deviceList
.GetNewValue({
stationId: this.stationId,
srcId: this.srcId,
- colList: [
- "runState",
- "remoteInPlace",
- "onGrid",
- "offGrid",
- "stateCharging",
- "stateDischarging",
- "deviceStateStand",
- "deviceStateFault",
- "deviceStateFull",
- "deviceStateEmpty",
- "acBreaker",
- "dcBreaker",
- "soc",
- "outputPower",
- "reactivePowerPCS",
- "grid",
- "volA",
- "volB",
- "volC",
- "currentA",
- "currentB",
- "currentC",
- "dcPower",
- "dcInputVol",
- "dcCurrent",
+ colList: ["lowV", "highV", "lowI",
+ "pvActivePower","runState","remoteInPlace",
+ "onGrid","offGrid","stateCharging",
+ "stateDischarging","deviceStateStand","deviceStateFault",
+ "deviceStateFull","deviceStateEmpty","dcBreaker",
+ "eStop","soc","grid",
+ "outputPower",
+ // "reactivePowerPCS",
+ // ,,
+ // "volA",
+ // "volB",
+ // "volC",
+ // "currentA",
+ // "currentB",
+ // "currentC",
+ // "dcPower",
+ // "dcInputVol",
+ // "dcCurrent",
],
})
.then((res) => {
const battery = self.updateBattery(res.data.soc?.value ? res.data.soc.value : 0);
this.panelData = {
- outputPower: res.data.outputPower?.value ? res.data.outputPower?.value : 0,
- reactivePowerPCS: res.data.reactivePowerPCS?.value ? res.data.reactivePowerPCS?.value :
- 0,
- grid: res.data.grid?.value ? res.data.grid?.value : 0,
- volA: res.data.volA?.value ? res.data.volA?.value : 0,
- volB: res.data.volB?.value ? res.data.volB?.value : 0,
- volC: res.data.volC?.value ? res.data.volC?.value : 0,
- currentA: res.data.currentA?.value ? res.data.currentA?.value : 0,
- currentB: res.data.currentB?.value ? res.data.currentB?.value : 0,
- currentC: res.data.currentC?.value ? res.data.currentC?.value : 0,
- dcPower: res.data.dcPower?.value ? res.data.dcPower?.value : 0,
- dcInputVol: res.data.dcInputVol?.value ? res.data.dcInputVol?.value : 0,
- dcCurrent: res.data.dcCurrent?.value ? res.data.dcCurrent?.value : 0,
+ lowV: res.data.lowV?.value ? res.data.lowV?.value : 0,
+ highV: res.data.highV?.value ? res.data.highV?.value : 0,
+ lowI: res.data.lowI?.value ? res.data.lowI?.value : 0,
+ pvActivePower: res.data.pvActivePower?.value ? res.data.pvActivePower?.value : 0
};
- // this.textCanvasData[2].font[1].text = res.data.soc?.value ? res.data.soc.value + "%" : 0 + "%";
- // this.textCanvasData[3].font[1].text = this.workStatus(res.data.runState?.value);
- // if (this.stationId === 349 || this.stationId === 362 || this.stationId === 363) {
- // if (res.data.remoteInPlace?.value === 0) {
- // this.textCanvasData[4].font[1].text = this.$t('homePage.device.localAutomatic')
- // }
- // if (res.data.remoteInPlace?.value === 1) {
- // this.textCanvasData[4].font[1].text = this.$t('homePage.device.localManual')
- // }
- // if (res.data.remoteInPlace?.value === 2) {
- // this.textCanvasData[4].font[1].text = this.$t('homePage.device.distance')
- // }
-
- // } else {
- // if (res.data.remoteInPlace?.value === 0) {
- // this.textCanvasData[4].font[1].text = this.$t('homePage.device.local')
- // }
- // if (res.data.remoteInPlace?.value === 1) {
- // this.textCanvasData[4].font[1].text = this.$t('homePage.device.distance')
- // }
- // }
-
- // 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.canvasData = [...this.textCanvasData, ...this.imageCanvasData, ...this
- .lineCanvasData
- ]
+ this.textCanvasData[0].font[1].text = res.data.pvActivePower?.value ? res.data.pvActivePower.value + " kW" : 0 + " kW";
+ 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.canvasData = [...this.textCanvasData, ...this.imageCanvasData, ...this.lineCanvasData]
})
.finally((res) => {
this.stationLoading = false;
diff --git a/pages/home-page/device-detail/components/pcs.vue b/pages/home-page/device-detail/components/pcs.vue
index 1ac9d1e..9827b22 100644
--- a/pages/home-page/device-detail/components/pcs.vue
+++ b/pages/home-page/device-detail/components/pcs.vue
@@ -236,8 +236,8 @@
stationId: null,
srcId: null,
hnStationId: [417, 398, 416, 415, 405, 485],
- actionSheetList: this.$t('homePage.device.timesArr'),
- sampleTime:this.$t('homePage.device.timesArr')[0].label,
+ actionSheetList: Object.values(this.$t('homePage.home.timesArr')),
+ sampleTime:this.$t('homePage.home.timesArr')[0].text,
canvasData: [],
textCanvasData: [
//0
diff --git a/pages/home-page/device-detail/index.vue b/pages/home-page/device-detail/index.vue
index 27fd6c9..abb7170 100644
--- a/pages/home-page/device-detail/index.vue
+++ b/pages/home-page/device-detail/index.vue
@@ -87,7 +87,6 @@
}
},
onLoad(options) {
-
this.Devicetype = options.type
if (this.Devicetype === 'storage' || this.Devicetype === 'anything') {
this.list = [{
@@ -194,6 +193,7 @@
methods: {
device(val) {
+ console.log(val);
this.Devicetype = val
},
changeTab(type) {
diff --git a/pages/home-page/device-list/index.vue b/pages/home-page/device-list/index.vue
index ef0bb15..4f4dc9c 100644
--- a/pages/home-page/device-list/index.vue
+++ b/pages/home-page/device-list/index.vue
@@ -84,7 +84,7 @@
type = "storage";
} else if (item.deviceType?.includes("basic") ) {
type = "anything"
- } else if (item.deviceType?.includes("mttp") ) {
+ } else if (item.deviceType?.includes("mttp") || item.deviceType?.includes("mppt")) {
type = "mttp"
}
diff --git a/pages/home-page/earningSelect/index.vue b/pages/home-page/earningSelect/index.vue
index 071bccb..1d77ff5 100644
--- a/pages/home-page/earningSelect/index.vue
+++ b/pages/home-page/earningSelect/index.vue
@@ -1,28 +1,38 @@
-
+
+
+
-
+
-
+
+
-
+
-
+
- {{ item.label}}
+ {{ labeArr[0].label}}
+
+
+
+
+
+
+
+ {{ labeArr[1].label}}
-
@@ -59,6 +69,9 @@
currentStation() {
return this.vuex_currentStation;
},
+ inverterFlag(){
+ return this.vuex_inverterFlag;
+ }
},
methods: {
toUrl(val) {
diff --git a/pages/home-page/lights/components/runChart/index.vue b/pages/home-page/lights/components/runChart/index.vue
index bb6936a..a480a4d 100644
--- a/pages/home-page/lights/components/runChart/index.vue
+++ b/pages/home-page/lights/components/runChart/index.vue
@@ -6,8 +6,15 @@
diff --git a/pages/home-page/lights/index.vue b/pages/home-page/lights/index.vue
index b9e77f9..6916366 100644
--- a/pages/home-page/lights/index.vue
+++ b/pages/home-page/lights/index.vue
@@ -27,42 +27,57 @@
-
+
-
-
-
- {{ $t("homePage.earning.capacity") }}
-
-
- {{ totalData.capacity | isNull }}
-
- kWh
-
-
-
-
- {{ $t("homePage.earning.monthTotalCharge") }}
-
-
- {{ totalData.totalChargeElec | isNull }}
-
- kWh
-
+
+
-
-
-
- {{ $t("homePage.earning.monthTotalDischarge") }}
-
-
- {{ totalData.totalDischargeElec | isNull }}
-
- kWh
-
+
+
+ {{ $t('homePage.home.currentMonthlyPowerGeneration') }}
+
+
+ {{ totalData.monthReleaseElec | isNull }}
+
+
+ kWh
+
+
-
+
+
+
+
+
+ {{ $t('homePage.home.cumulativePowerGeneration') }}
+
+
+ {{ totalData.totalReleaseElec | isNull }}
+
+
+ kWh
+
+
+
+
+
+
+
+
+
+ {{ $t('homePage.home.ratedPowernokw') }}
+
+
+ {{ totalData.pvPower | isNull }}
+
+
+ kW
+
+
+
+
+
-
+
@@ -120,19 +135,17 @@
- {{ totalData.totalChargePrice | isNull }}
+ {{ totalData.monthIncone | isNull }}
- {{ $t("homePage.home.enmonthTotalChargePrice") }}
+ {{ $t("homePage.home.monthlyIncome") }}
-
+
-
-
-
+
+
+
+
+ {{ totalData.income | isNull }}
+
+
+ {{ $t("homePage.home.totalRevenue") }}
+
+
+
+
+
-
+
-->
- STORASMART
+ ZETA CLOUD
@@ -17,11 +17,11 @@
-
+
@@ -139,7 +139,7 @@ export default {
showMsg: false,
Stationlist: this.$t('homePage.home.stationType'),
// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
- StationValue: '',
+ StationValue: 'en_US',
}
},
onLoad () {
@@ -194,8 +194,9 @@ export default {
});
} else if (val === '中国站' || val === 'China Station') {
this.$u.http.setConfig({
- // baseUrl: 'http://1.95.170.86:8002/api'
- baseUrl: 'https://zzkj-cloud.com/api'
+ // baseUrl: 'http://1.95.170.86:8002/api'
+ baseUrl: 'https://zetatech.zzkj-cloud.com/api'
+ // baseUrl: 'https://zzkj-cloud.com/api'
});
}
const res = await this.$u.api.GetLanguageConfig('zh')
@@ -432,6 +433,7 @@ export default {
this.$u.api.alarm.GetNewStationlist().then((res) => {
this.$u.vuex("vuex_provinceStation", res.data.list)
this.$u.vuex("vuex_currentStation", res.data.list[0].list[0].list[0])
+ this.$u.vuex("vuex_inverterFlag", res.data.list[0].list[0].list[0].inverterFlag)
})
},
wxLogin (res) {
diff --git a/pages/tabbar/components/dischargeChart/index.vue b/pages/tabbar/components/dischargeChart/index.vue
index 0e1ce44..bc4f073 100644
--- a/pages/tabbar/components/dischargeChart/index.vue
+++ b/pages/tabbar/components/dischargeChart/index.vue
@@ -27,7 +27,6 @@
currentStation() {
return this.vuex_currentStation;
},
-
},
watch: {
currentStation: {
diff --git a/pages/tabbar/components/grid/index.vue b/pages/tabbar/components/grid/index.vue
index 2136c4d..bd68422 100644
--- a/pages/tabbar/components/grid/index.vue
+++ b/pages/tabbar/components/grid/index.vue
@@ -1,23 +1,30 @@
-
-
-
-
+
+
+
+
+
+
+
+
+ {{item.value}}
+
+
+ {{item.label}}
+
-
- {{item.value}}
-
-
- {{item.label}}
-
-
+
diff --git a/pages/tabbar/components/topology/ceshiT.vue b/pages/tabbar/components/topology/ceshiT.vue
index 6b41e07..5814953 100644
--- a/pages/tabbar/components/topology/ceshiT.vue
+++ b/pages/tabbar/components/topology/ceshiT.vue
@@ -1,7 +1,7 @@
@@ -664,7 +663,7 @@
}
},
mounted() {
- document.getElementById('svgBox')?.appendChild(this.createSvgText(this.tags))
+ this.$refs.svgBox?.appendChild(this.createSvgText(this.tags))
},
}
@@ -674,6 +673,24 @@
font-family: Arial, sans-serif;
font-size: 40px;
fill: #7F7F7F;
+ }
+ .myCircle {
+ r: 15;
+ fill: #0DA17D;
+ animation: moveRight 3s linear 0s infinite both;
+ }
+ /* 关键帧:定义运动轨迹(向右→向下→复位) */
+ @keyframes moveRight {
+ /* 0%:初始位置(cx=280, cy=67) */
+ 0% {
+ cx: 280;
+ cy: 67;
+ }
+ /* 100%:瞬间复位(避免卡顿) */
+ 100% {
+ cx: 1000;
+ cy: 67;
+ }
}
/* 通用动画点样式 */
.anim-pv1 {
diff --git a/pages/tabbar/components/topology/pv2first.vue b/pages/tabbar/components/topology/pv2first.vue
new file mode 100644
index 0000000..4d8da79
--- /dev/null
+++ b/pages/tabbar/components/topology/pv2first.vue
@@ -0,0 +1,1171 @@
+
+
+
+
+
+
+
diff --git a/pages/tabbar/dashboard.vue b/pages/tabbar/dashboard.vue
index 66b23d9..dbbd40a 100644
--- a/pages/tabbar/dashboard.vue
+++ b/pages/tabbar/dashboard.vue
@@ -34,42 +34,29 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
@@ -85,7 +72,7 @@
{{this.$t('homePage.home.sevenDay')}}
+ @click="changeTime('day')">{{this.$t('homePage.home.sevenDaycom')}}
{{this.$t('homePage.home.monthDay')}}
@@ -100,15 +87,15 @@
-
+
-
+
-
+
@@ -116,12 +103,12 @@
-
+
@@ -138,6 +125,9 @@
import ceshiT from './components/topology/ceshiT.vue'
import ceshiL from './components/topology/ceshiL.vue'
import ceshiS from './components/topology/ceshiS.vue'
+
+ import pv2first from './components/topology/pv2first.vue'
+
import weishanhu from './components/topology/weishanhu.vue'
import sanmenxia from './components/topology/sanmenxia.vue'
import lingchao from './components/topology/lingchao.vue'
@@ -166,6 +156,7 @@
ceshiT,
ceshiL,
ceshiS,
+ pv2first,
myGrid,
stationDropdow,
Section,
@@ -212,6 +203,13 @@
timer: null,
tuopuTimer: null,
rightCenter: null,
+ componentsLoaded: false,
+ tuopoloading:false,
+ topCenterPvArr:[
+ {name:'pv1AndStorage_261',value:1},
+ {name:'pv2AndStorage_261',value:2}
+ ],
+ pvTopologyType:0,
society: [{
label: this.$t('homePage.home.saveStandardCoal'),
value: '15.00',
@@ -228,29 +226,14 @@
image: require('@/static/aidex/images/ll03.png'),
},
],
- lightArr: [{
- label: this.$t('homePage.home.totalCapacity') + '(kW)',
- value: '100.00',
- image: require('@/static/aidex/images/ll05.png'),
- },
- {
- label: this.$t('homePage.home.currentPower') + '(kW)',
- value: '47.00',
- image: require('@/static/aidex/images/ll06.png'),
- },
- {
- label: this.$t('homePage.home.dailyPowerGeneration') + '(kWh)',
- value: '85.00',
- image: require('@/static/aidex/images/ll07.png'),
- showMark: true
- },
- {
- label: this.$t('homePage.home.cumulativePowerGeneration') + '(kWh)',
- value: '496.00',
- image: require('@/static/aidex/images/ll07.png'),
- showMark: true
- },
- ]
+ panelData: {
+ pvCurrentPower: 0, // 对应 lightArr[0].value
+ dailyReleaseElec: 0, // 对应 lightArr[1].value
+ totalReleaseElec: 0, // 对应 lightArr[2].value
+ todayIncone: 0, // 对应 lightArr[3].value
+ totalIncome: 0, // 对应 lightArr[4].value
+ pvPower: 0 // 对应 lightArr[5].value
+ }
};
},
computed: {
@@ -262,7 +245,44 @@
},
language() {
return this.vuex_language
- }
+ },
+ inverterFlag(){
+ return this.vuex_inverterFlag;
+ },
+ lightArr() {
+ return [
+ {
+ label: this.$t('homePage.home.currentPower') + '(kW)',
+ value: this.panelData.pvCurrentPower,
+ image: require('@/static/aidex/images/ll06.png')
+ },
+ {
+ label: this.$t('homePage.home.dailyPowerGeneration') + '(kWh)',
+ value: this.panelData.dailyReleaseElec,
+ image: require('@/static/aidex/images/ll07.png')
+ },
+ {
+ label: this.$t('homePage.home.cumulativePowerGeneration') + '(kWh)',
+ value: this.panelData.totalReleaseElec,
+ image: require('@/static/aidex/images/ll07.png')
+ },
+ {
+ label: this.$t('homePage.home.todayEarning'),
+ value: this.panelData.todayIncone,
+ image: require('@/static/aidex/images/yxts.png')
+ },
+ {
+ label: this.$t('homePage.home.totalRevenue'),
+ value: this.panelData.totalIncome,
+ image: require('@/static/aidex/images/yxts.png')
+ },
+ {
+ label: this.$t('homePage.home.ratedPower'),
+ value: this.panelData.pvPower,
+ image: require('@/static/aidex/images/ll06.png')
+ }
+ ];
+ }
},
onHide() {
if (this.timer) {
@@ -274,29 +294,30 @@
},
watch: {
currentStation: {
- handler(val) {
- if (val && val.id) {
-
- this.stationId = val.id
- this.userId = this.userData.userId
- console.log('拓扑图',val)
- this.topologyType = val.topologyType
- this.getComponents()
- this.$nextTick(() => {
- if (this.$refs.tuopu) {
- this.$refs.tuopu.getData(val.id)
- }
-
- if (this.$refs.deviceFire) {
- this.$refs.deviceFire.getData(this.stationId)
- }
- })
- }
- },
- deep: true,
- immediate: true,
- },
-
+ handler(val) {
+ if (val && val.id) {
+ this.stationId = val.id
+ this.userId = this.userData.userId
+ this.topologyType = val.topologyType
+ // 重置加载状态,避免复用旧状态
+ this.componentsLoaded = false
+ this.tuopoloading = true
+ this.getComponents().then(() => {
+ this.GetPcsTotalData();
+ this.$nextTick(() => {
+ if (this.$refs.tuopu) {
+ this.$refs.tuopu.getData(val.id)
+ }
+ if (this.$refs.deviceFire) {
+ this.$refs.deviceFire.getData(this.stationId)
+ }
+ });
+ });
+ }
+ },
+ deep: true,
+ immediate: true,
+ }
},
created() {
@@ -317,25 +338,27 @@
})
},
onShow() {
- this.getComponents()
- this.getMessage()
- if (this.$refs.runChart && this.stationId) {
- this.$refs.runChart.getData()
- }
- if (this.$refs.dischargeChart && this.stationId) {
- this.$refs.dischargeChart.getData()
- }
- this.$nextTick(() => {
-
- if (this.$refs.tuopu) {
+ // 重置加载状态
+ this.componentsLoaded = false
+ this.tuopoloading = true
+ this.getComponents().then(() => {
+ this.getMessage()
+ if (this.$refs.runChart && this.stationId) {
+ this.$refs.runChart.getData()
+ }
+ if (this.$refs.dischargeChart && this.stationId) {
+ this.$refs.dischargeChart.getData()
+ }
+ this.$nextTick(() => {
+ if (this.$refs.tuopu) {
this.$refs.tuopu.changeEnglish()
this.$refs.tuopu.getData(this.stationId)
- }
-
- if (this.$refs.deviceFire) {
+ }
+ if (this.$refs.deviceFire) {
this.$refs.deviceFire.getData(this.stationId)
- }
- })
+ }
+ })
+ });
this.timer = setInterval(() => {
this.getMessage()
}, 5000)
@@ -352,13 +375,39 @@
},
methods: {
+ async GetPcsTotalData() {
+ let self = this;
+ return new Promise((resolve, reject) => {
+ self.$u.api.homePageData
+ .GetPcsTotalData({
+ stationId: this.stationId,
+ })
+ .then((res) => {
+ this.panelData = Object.assign(this.panelData, res.data);
+ resolve(res);
+ })
+ .catch((err) => {
+ reject("错误");
+ });
+ });
+ },
async getComponents() {
- const {
- data
- } = await this.$u.api.homePageData.GetHomePageComponents(this.stationId)
- if (data && data.length > 0) {
- this.rightCenter = data[0]?.rightCenter
- }
+ try {
+ const { data } = await this.$u.api.homePageData.GetHomePageComponents(this.stationId);
+ if (data && data.length > 0) {
+ this.rightCenter = data[0]?.rightCenter;
+ const matchedItem = this.topCenterPvArr.find(item => item.name === data[0]?.topCenter);
+ this.pvTopologyType = matchedItem ? matchedItem.value : this.pvTopologyType;
+ }
+ // 接口完成,标记加载状态为true
+ this.componentsLoaded = true
+ this.tuopoloading = false
+ } catch (e) {
+ console.error('获取组件配置失败:', e);
+ // 即使接口失败,也标记完成,避免组件一直不渲染
+ this.componentsLoaded = true
+ this.tuopoloading = false
+ }
},
openTimer() {
@@ -524,7 +573,12 @@
margin: 20rpx;
margin-top: 30rpx;
box-shadow: 0px 4rpx 16rpx rgba(0, 0, 0, 0.08);
-
+
+ .loading-tip {
+ width: 650rpx;
+ height: 710rpx;
+ position: relative;
+ }
.top-right-box {
display: flex;
flex-direction: row;
diff --git a/store/index.js b/store/index.js
index 9894245..257deeb 100644
--- a/store/index.js
+++ b/store/index.js
@@ -51,7 +51,8 @@ const store = new Vuex.Store({
vuex_psdkey: lifeData.vuex_psdkey ? lifeData.vuex_psdkey : '',
vuex_StationShow:lifeData.vuex_StationShow ? lifeData.vuex_StationShow : [0,0,0],
tabbar_current: 0,
- vuex_stationValue:lifeData.vuex_stationValue ? lifeData.vuex_stationValue : '',
+ vuex_stationValue:lifeData.vuex_stationValue ? lifeData.vuex_stationValue : '',
+ vuex_inverterFlag:lifeData.vuex_inverterFlag ? lifeData.vuex_inverterFlag : 0,
tabbarList: [
{
"icon": "warning",
diff --git a/uview-ui/components/u-select/u-select.vue b/uview-ui/components/u-select/u-select.vue
index df79bfa..18dd406 100644
--- a/uview-ui/components/u-select/u-select.vue
+++ b/uview-ui/components/u-select/u-select.vue
@@ -211,7 +211,6 @@ export default {
// #endif
},
init() {
- console.log(1111,this.list);
// 如果没有数据的时候多处报未定义
if (!this.list || this.list.length == 0){
return