From cbb1d7a8a9316d2a4a00061e1044a1352d54d1eb Mon Sep 17 00:00:00 2001 From: huangjp Date: Fri, 26 Dec 2025 11:26:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=89=E4=BC=8F=E5=8A=9F=E8=83=BD=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E4=BB=A3=E7=A0=81=E5=8F=8ABUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/config.js | 4 +- common/http.api.js | 9 +- common/locales/homePage/en.js | 46 +- common/locales/homePage/zh.js | 45 +- components/new-canvas/index.vue | 136 +- components/station-dropdow/index.vue | 1 + hybrid/{ => html}/demo.html | 0 locales/homePage/en.js | 2 +- manifest.json | 9 +- .../device-detail/components/mppt.vue | 350 ++--- .../device-detail/components/pcs.vue | 4 +- pages/home-page/device-detail/index.vue | 2 +- pages/home-page/device-list/index.vue | 2 +- pages/home-page/earningSelect/index.vue | 27 +- .../lights/components/runChart/index.vue | 80 +- pages/home-page/lights/index.vue | 134 +- pages/login/index.vue | 14 +- .../components/dischargeChart/index.vue | 1 - pages/tabbar/components/grid/index.vue | 29 +- .../tabbar/components/stationData/common.vue | 4 +- pages/tabbar/components/stationData/zzhb.vue | 3 +- pages/tabbar/components/topology/ceshiS.vue | 4 +- pages/tabbar/components/topology/ceshiT.vue | 27 +- pages/tabbar/components/topology/pv2first.vue | 1171 +++++++++++++++++ pages/tabbar/dashboard.vue | 274 ++-- store/index.js | 3 +- uview-ui/components/u-select/u-select.vue | 1 - 27 files changed, 1839 insertions(+), 543 deletions(-) rename hybrid/{ => html}/demo.html (100%) create mode 100644 pages/tabbar/components/topology/pv2first.vue 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 @@