光伏功能逻辑代码及BUG修改
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
const config = {
|
const config = {
|
||||||
|
|
||||||
// 产品名称
|
// 产品名称
|
||||||
productName: 'Zetatech',
|
productName: 'Zeta Cloud',
|
||||||
|
|
||||||
// 公司名称
|
// 公司名称
|
||||||
companyName: 'Zetatech',
|
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'
|
// config.baseUrl = 'http://1.95.170.86:8002/api'
|
||||||
export default config
|
export default config
|
||||||
@ -433,9 +433,9 @@ const install = (Vue, vm) => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//获取电站下的设备
|
//获取光伏发电功率
|
||||||
// GetPageDevice: (params = {}) =>
|
GetPvCurve: (params = {}) =>
|
||||||
// vm.$u.post(config.adminPath + "/business/device/appHomePageDevices", params),
|
vm.$u.post(config.adminPath + "/business/pcs/pvCurve", params),
|
||||||
|
|
||||||
|
|
||||||
GetPageDevice: (params = {}) =>
|
GetPageDevice: (params = {}) =>
|
||||||
@ -455,6 +455,9 @@ const install = (Vue, vm) => {
|
|||||||
enrnings: {
|
enrnings: {
|
||||||
GetTotal: (params = {}) =>
|
GetTotal: (params = {}) =>
|
||||||
vm.$u.post(config.adminPath + "/business/earningsCalculate/getTotal", params),
|
vm.$u.post(config.adminPath + "/business/earningsCalculate/getTotal", params),
|
||||||
|
GetPvMonthData: (params = {}) =>
|
||||||
|
vm.$u.post(config.adminPath + "/business/earningsCalculate/getPvMonthData", params),
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@ export default {
|
|||||||
and: 'and',
|
and: 'and',
|
||||||
yszc: 'Privacy Policy',
|
yszc: 'Privacy Policy',
|
||||||
yhxyhyszc: 'User Agreement and 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.',
|
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',
|
agree: 'Agree',
|
||||||
quit: 'Disagree',
|
quit: 'Disagree',
|
||||||
@ -34,11 +34,11 @@ export default {
|
|||||||
useElecPrice: 'Electricity prices',
|
useElecPrice: 'Electricity prices',
|
||||||
workStatus: 'Working Status:',
|
workStatus: 'Working Status:',
|
||||||
standing:'standing',
|
standing:'standing',
|
||||||
activePower:'Active Power(kW):',
|
activePowerpcs:'Active Power:',
|
||||||
operatingPower:'Operating Power',
|
operatingPower:'Operating Power',
|
||||||
accumulatedElectricityConsumption:'Total power',
|
accumulatedElectricityConsumption:'Total power',
|
||||||
pvKpi: 'PV KPI',
|
pvKpi: 'PV KPI',
|
||||||
saveStandardCoal: 'Save standard coal (ton)',
|
saveStandardCoal: 'Save standard coal (t)',
|
||||||
equivalentCo2Reduction: "CO2 emission reduction (kg)",
|
equivalentCo2Reduction: "CO2 emission reduction (kg)",
|
||||||
equivalentTreePlantings: "Equivalent tree plantings (Trees)",
|
equivalentTreePlantings: "Equivalent tree plantings (Trees)",
|
||||||
dailyPowerGeneration: 'Daily Power Generation',
|
dailyPowerGeneration: 'Daily Power Generation',
|
||||||
@ -61,6 +61,44 @@ export default {
|
|||||||
enmonthTotalChargePrice: 'Total Charging Price Monthly(EUR)',
|
enmonthTotalChargePrice: 'Total Charging Price Monthly(EUR)',
|
||||||
enmonthTotalDisChargePrice: 'Total Discharging Price Monthly(EUR)',
|
enmonthTotalDisChargePrice: 'Total Discharging Price Monthly(EUR)',
|
||||||
enearnings: 'Revenue(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
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -20,7 +20,7 @@ export default {
|
|||||||
and: '和',
|
and: '和',
|
||||||
yszc: '隐私政策',
|
yszc: '隐私政策',
|
||||||
yhxyhyszc: '用户协议和隐私政策',
|
yhxyhyszc: '用户协议和隐私政策',
|
||||||
msgf: '欢迎使用“小储大能”APP,我们非常重视您的个人信息和隐私保护。在您使用本应用前请仔细阅读',
|
msgf: '欢迎使用“澤泰云”APP,我们非常重视您的个人信息和隐私保护。在您使用本应用前请仔细阅读',
|
||||||
msgs: '您在使用本应用时,即表示您已阅读、理解并同意接受本协议的所有条款。如果您不同意本协议的任何内容,请立即停止使用本应用。',
|
msgs: '您在使用本应用时,即表示您已阅读、理解并同意接受本协议的所有条款。如果您不同意本协议的任何内容,请立即停止使用本应用。',
|
||||||
agree: '同意',
|
agree: '同意',
|
||||||
quit: '不同意',
|
quit: '不同意',
|
||||||
@ -34,7 +34,7 @@ export default {
|
|||||||
useElecPrice: '用电价格',
|
useElecPrice: '用电价格',
|
||||||
workStatus: '工作状态:',
|
workStatus: '工作状态:',
|
||||||
standing:'静置',
|
standing:'静置',
|
||||||
activePower:'有功功率(kW):',
|
activePowerpcs:'有功功率:',
|
||||||
operatingPower:'运行功率',
|
operatingPower:'运行功率',
|
||||||
accumulatedElectricityConsumption:'累计电量',
|
accumulatedElectricityConsumption:'累计电量',
|
||||||
pvKpi: '光伏KPI',
|
pvKpi: '光伏KPI',
|
||||||
@ -61,7 +61,44 @@ export default {
|
|||||||
enmonthTotalChargePrice: '本月总充电量总价(元)',
|
enmonthTotalChargePrice: '本月总充电量总价(元)',
|
||||||
enmonthTotalDisChargePrice: '本月总放电量总价(元)',
|
enmonthTotalDisChargePrice: '本月总放电量总价(元)',
|
||||||
enearnings: '收益(元)',
|
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
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -50,12 +50,18 @@
|
|||||||
watch: {
|
watch: {
|
||||||
canvasData: {
|
canvasData: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
if (val && val.length) {
|
// 等待 windowWidth 初始化完成后再绘制
|
||||||
this.getSystemInfo()
|
if (this.windowWidth) {
|
||||||
|
this.draw(null); // 直接绘制
|
||||||
|
} else {
|
||||||
|
// 若 windowWidth 未获取,先获取再绘制
|
||||||
|
this.getSystemInfo().then(() => {
|
||||||
|
this.draw(null);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
immediate: true
|
immediate: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -216,58 +222,73 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
countChineseAndEnglishCharacters(str, x) {
|
// countChineseAndEnglishCharacters(str, x) {
|
||||||
var chineseCount = str.match(/[\u4e00-\u9fa5]/g) ?
|
// var chineseCount = str.match(/[\u4e00-\u9fa5]/g) ?
|
||||||
str.match(/[\u4e00-\u9fa5]/g).length :
|
// str.match(/[\u4e00-\u9fa5]/g).length :
|
||||||
0;
|
// 0;
|
||||||
var englishCount = str.match(/[a-zA-Z]/g) ?
|
// var englishCount = str.match(/[a-zA-Z]/g) ?
|
||||||
str.match(/[a-zA-Z]/g).length :
|
// str.match(/[a-zA-Z]/g).length :
|
||||||
0;
|
// 0;
|
||||||
var otherCount = str.length - chineseCount - englishCount;
|
// var otherCount = str.length - chineseCount - englishCount;
|
||||||
const obj = {
|
// const obj = {
|
||||||
otherCount: otherCount,
|
// otherCount: otherCount,
|
||||||
chineseCount: chineseCount,
|
// chineseCount: chineseCount,
|
||||||
englishCount: englishCount,
|
// englishCount: englishCount,
|
||||||
};
|
// };
|
||||||
return (
|
// return (
|
||||||
obj.englishCount * 6 + obj.chineseCount * 12 + obj.otherCount * 7.5 + x
|
// obj.englishCount * 6 + obj.chineseCount * 12 + obj.otherCount * 7.5 + x
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
|
|
||||||
drawText(draw) {
|
drawText(draw) {
|
||||||
draw.forEach((item, index) => {
|
draw.forEach((item, index) => {
|
||||||
if (item.font.length) {
|
if (item.font.length) {
|
||||||
if (item.font.length > 1) {
|
// 记录前一个文本的结束位置(用于后续文本偏移)
|
||||||
item.font.forEach((item2, index2) => {
|
let prevTextEndX = this.fitSize(item.coord[0][0]);
|
||||||
if (this.type === 'app') {
|
|
||||||
this.ctx.setFontSize(item2.size)
|
item.font.forEach((item2, index2) => {
|
||||||
} else {
|
// 设置字体大小和颜色
|
||||||
this.ctx.fontSize = item2.size
|
if (this.type === 'app') {
|
||||||
}
|
this.ctx.setFontSize(item2.size);
|
||||||
this.ctx.fillStyle = item2.color
|
} else {
|
||||||
const x = this.countChineseAndEnglishCharacters(item.font[0].text, item
|
this.ctx.font = `${item2.size}px sans-serif`; // 小程序端补全font属性
|
||||||
.coord[0][0])
|
}
|
||||||
this.ctx.fillText(item2.text, this.fitSize(index2 === 1 ? x : item.coord[0]
|
this.ctx.fillStyle = item2.color;
|
||||||
[0]), this.fitSize(item.coord[0][1]))
|
|
||||||
this.ctx.closePath()
|
// 计算当前文本的绘制X坐标
|
||||||
})
|
let currentX = prevTextEndX;
|
||||||
} else {
|
// 非第一个文本,加上配置的偏移量(默认8px)
|
||||||
if (this.type === 'app') {
|
if (index2 > 0) {
|
||||||
this.ctx.setFontSize(item.font[0].size)
|
const offsetX = item2.offsetX || 6;
|
||||||
} else {
|
currentX += this.fitSize(offsetX); // 适配设备尺寸的偏移量
|
||||||
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
|
this.ctx.fillText(
|
||||||
.coord[0][1]))
|
item2.text,
|
||||||
this.ctx.closePath()
|
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) {
|
drawImages(draw, canvas) {
|
||||||
let x,
|
let x,
|
||||||
@ -350,9 +371,12 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
fitSize(coordinate) {
|
fitSize(coordinate) {
|
||||||
let newWindowWidth = this.windowWidth //这个windowWidth指的是该设备宽度,可以onLoad监听页面加载中获取
|
let newWindowWidth = this.windowWidth;
|
||||||
let v = 375 / newWindowWidth //375是设计稿的大小,得到的v值是:设计稿和设备宽度的比例关系,也可理解成在设计稿的大小基础上放大或缩小的倍数
|
const designWidth = 375; // 设计稿宽度
|
||||||
return coordinate / v //返回的是当前坐标值或者大小与v的比例
|
// 修正比例计算:设备宽度 / 设计稿宽度 = 缩放比例
|
||||||
|
const scale = newWindowWidth / designWidth;
|
||||||
|
// 设计稿的坐标 * 缩放比例 = 设备实际坐标
|
||||||
|
return coordinate * scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@ -98,6 +98,7 @@ export default {
|
|||||||
// val[2].StationShow = this.StationShow
|
// val[2].StationShow = this.StationShow
|
||||||
this.$u.vuex("vuex_currentStation", val[2])
|
this.$u.vuex("vuex_currentStation", val[2])
|
||||||
this.$u.vuex("vuex_StationShow", this.StationShow)
|
this.$u.vuex("vuex_StationShow", this.StationShow)
|
||||||
|
this.$u.vuex("vuex_inverterFlag", value.list[valIndex].list[newValIndex].inverterFlag)
|
||||||
this.$emit('openPop', false)
|
this.$emit('openPop', false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,7 +42,7 @@ export default {
|
|||||||
deviceMonitor: 'Device Monitor',
|
deviceMonitor: 'Device Monitor',
|
||||||
runCurve: 'Run Time Curve',
|
runCurve: 'Run Time Curve',
|
||||||
chargeDisData: 'Charge/Discharge Data',
|
chargeDisData: 'Charge/Discharge Data',
|
||||||
stationData: 'stationData',
|
stationData: 'Station Data',
|
||||||
environmentalData: 'Environmental Control Data',
|
environmentalData: 'Environmental Control Data',
|
||||||
sevenDay: 'Seven',
|
sevenDay: 'Seven',
|
||||||
monthDay: 'Month',
|
monthDay: 'Month',
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name" : "StoraSmart",
|
"name" : "Zeta Cloud",
|
||||||
"appid" : "__UNI__86592F3",
|
"appid" : "__UNI__86592F3",
|
||||||
"description" : "Zetatech",
|
"description" : "Zetatech",
|
||||||
"versionName" : "2.0.8",
|
"versionName" : "2.0.13",
|
||||||
"versionCode" : 213,
|
"versionCode" : 218,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
"sassImplementationName" : "node-sass",
|
"sassImplementationName" : "node-sass",
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
@ -160,6 +160,5 @@
|
|||||||
"disableHostCheck" : true
|
"disableHostCheck" : true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"locale" : "en",
|
"locale" : "en"
|
||||||
"fallbackLocale" : "en"
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<charts v-else id="pcsChart" :options="curve_option"></charts>
|
<charts v-else id="pcsChart" :options="curve_option"></charts>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box" style="margin-bottom: 0;">
|
<!-- <view class="box" style="margin-bottom: 0;">
|
||||||
<Section :title="$t('homePage.device.deviceData')" />
|
<Section :title="$t('homePage.device.deviceData')" />
|
||||||
<zero-loading v-if="stationLoading" position="absolute"></zero-loading>
|
<zero-loading v-if="stationLoading" position="absolute"></zero-loading>
|
||||||
<view v-else class="group-box">
|
<view v-else class="group-box">
|
||||||
@ -32,13 +32,13 @@
|
|||||||
<image src="/static/aidex/images/zjrl.png"></image>
|
<image src="/static/aidex/images/zjrl.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-con">
|
<view class="item-con">
|
||||||
<view class="item-num">{{ panelData.outputPower | kWFormat }}
|
<view class="item-num">{{ panelData.pvActivePower | kWFormat }}
|
||||||
</view>
|
</view>
|
||||||
<view class="item-title">{{$t('homePage.home.batVoltage')}}(kVar)</view>
|
<view class="item-title">{{$t('homePage.home.batVoltage')}}(V)</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="group-item border-right"
|
<view class="group-item border-right"
|
||||||
@click="showHistory($t('homePage.home.batCurrent'), 'reactivePowerPCS', 'pcs', 'kVar', '')">
|
@click="showHistory($t('homePage.home.batCurrent'), 'reactivePowerPCS', 'pcs', 'V', '')">
|
||||||
<view class="history-icon">
|
<view class="history-icon">
|
||||||
<image src="/static/aidex/images/history-icon.png"></image>
|
<image src="/static/aidex/images/history-icon.png"></image>
|
||||||
</view>
|
</view>
|
||||||
@ -46,7 +46,7 @@
|
|||||||
<image src="/static/aidex/images/zjrl.png"></image>
|
<image src="/static/aidex/images/zjrl.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-con">
|
<view class="item-con">
|
||||||
<view class="item-num">{{ panelData.reactivePowerPCS }}
|
<view class="item-num">{{ panelData.lowV }}
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="item-title">{{$t('homePage.home.batCurrent')}}(A)</view>
|
<view class="item-title">{{$t('homePage.home.batCurrent')}}(A)</view>
|
||||||
@ -61,10 +61,10 @@
|
|||||||
<image src="/static/aidex/images/dqgl.png"></image>
|
<image src="/static/aidex/images/dqgl.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-con">
|
<view class="item-con">
|
||||||
<view class="item-num">{{ panelData.grid | isNull }}
|
<view class="item-num">{{ panelData.lowI | isNull }}
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="item-title">{{$t('homePage.home.busVoltage')}}(kVar)</view>
|
<view class="item-title">{{$t('homePage.home.busVoltage')}}(V)</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -76,132 +76,15 @@
|
|||||||
<image src="/static/aidex/images/zfdl.png"></image>
|
<image src="/static/aidex/images/zfdl.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-con">
|
<view class="item-con">
|
||||||
<view class="item-num">{{ panelData.volA | isNull }}
|
<view class="item-num">{{ panelData.highV | isNull }}
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="item-title">{{$t('homePage.home.busCurrent')}}(A)</view>
|
<view class="item-title">{{$t('homePage.home.busCurrent')}}(A)</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="group-item border-right" @click="showHistory($t('homePage.home.dc'), 'volB', '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.volB | isNull }}
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<view class="item-title">{{$t('homePage.home.dc')}}(A)</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="group-item" @click="showHistory($t('homePage.home.dcVoltage'), 'volC', '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.volC | isNull }}
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<view class="item-title">{{$t('homePage.home.dcVoltage')}}(kVar)</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- <view class="group-item border-right" @click="showHistory($t('homePage.device.acur'), 'currentA', 'pcs', 'A', '')">
|
|
||||||
<view class="history-icon">
|
|
||||||
<image src="/static/aidex/images/history-icon.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="item-icon">
|
|
||||||
<image src="/static/aidex/images/rfdl.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="item-con">
|
|
||||||
<view class="item-num">{{ panelData.currentA | isNull }}
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<view class="item-title">{{$t('homePage.device.acur')}}(A)</view>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
<!-- <view class="group-item border-right" @click="showHistory($t('homePage.device.bcur'), 'currentB', 'pcs', 'A', '')">
|
|
||||||
<view class="history-icon">
|
|
||||||
<image src="/static/aidex/images/history-icon.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="item-icon">
|
|
||||||
<image src="/static/aidex/images/rfdl.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="item-con">
|
|
||||||
<view class="item-num">{{ panelData.currentB | isNull }}
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<view class="item-title">{{$t('homePage.device.bcur')}}(A)</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="group-item" @click="showHistory($t('homePage.device.ccur'), 'currentC', 'pcs', 'A', '')">
|
|
||||||
<view class="history-icon">
|
|
||||||
<image src="/static/aidex/images/history-icon.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="item-icon">
|
|
||||||
<image src="/static/aidex/images/rfdl.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="item-con">
|
|
||||||
<view class="item-num">{{ panelData.currentC | isNull }}
|
|
||||||
|
|
||||||
</view>
|
|
||||||
<view class="item-title">{{$t('homePage.device.ccur')}}(A)</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="group-item border-right" @click="showHistory($t('homePage.device.DCPower'), 'dcPower', '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/dqgl.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="item-con">
|
|
||||||
<view class="item-num">{{ panelData.dcPower | kWFormat }}</view>
|
|
||||||
<view class="item-title">{{$t('homePage.device.DCPower')}}({{ panelData.dcPower | kwUnitFormat}})</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="group-item border-right" @click="showHistory($t('homePage.device.DCVol'), 'dcInputVol', '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.dcInputVol | isNull }}
|
|
||||||
</view>
|
|
||||||
<view class="item-title">{{$t('homePage.device.DCVol')}}(V)</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="group-item" @click="showHistory($t('homePage.device.DCCurrent'), 'dcCurrent', 'pcs', 'A', '')">
|
|
||||||
<view class="history-icon">
|
|
||||||
<image src="/static/aidex/images/history-icon.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="item-icon">
|
|
||||||
<image src="/static/aidex/images/rfdl.png"></image>
|
|
||||||
</view>
|
|
||||||
<view class="item-con">
|
|
||||||
<view class="item-num">{{ panelData.dcCurrent | isNull }}
|
|
||||||
</view>
|
|
||||||
<view class="item-title">{{$t('homePage.device.DCCurrent')}}(A)</view>
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view> -->
|
||||||
<historyModal :is-show.sync="histroyShow" :title="chartTitle" :params="hisParams" />
|
<historyModal :is-show.sync="histroyShow" :title="chartTitle" :params="hisParams" />
|
||||||
<u-action-sheet :list="actionSheetList" v-model="timeShow" @click="actionSheetCallback" @close="closeTimeAction"
|
<u-action-sheet :list="actionSheetList" v-model="timeShow" @click="actionSheetCallback" @close="closeTimeAction"
|
||||||
:mask-close-able="false"></u-action-sheet>
|
:mask-close-able="false"></u-action-sheet>
|
||||||
@ -234,62 +117,80 @@
|
|||||||
stationId: null,
|
stationId: null,
|
||||||
srcId: null,
|
srcId: null,
|
||||||
hnStationId: [417, 398, 416, 415, 405, 485],
|
hnStationId: [417, 398, 416, 415, 405, 485],
|
||||||
actionSheetList: this.$t('homePage.device.timesArr'),
|
actionSheetList: Object.values(this.$t('homePage.home.timesArr')),
|
||||||
sampleTime:this.$t('homePage.device.timesArr')[0].label,
|
sampleTime:this.$t('homePage.home.timesArr')[0].text,
|
||||||
canvasData: [],
|
canvasData: [],
|
||||||
textCanvasData: [
|
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
|
//2
|
||||||
{
|
{
|
||||||
type: "text",
|
type: "text",
|
||||||
coord: [
|
coord: [
|
||||||
[200, 200]
|
[144, 280]
|
||||||
],
|
],
|
||||||
font: [{
|
font: [{
|
||||||
text:this.$t('homePage.device.vol') + ":",
|
text:this.$t('homePage.home.lowV') + ':',
|
||||||
size: 12,
|
size: 12,
|
||||||
color: "#999",
|
color: "#999",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "3.265 kVar",
|
text: "",
|
||||||
size: 12,
|
size: 12,
|
||||||
color: "#000",
|
color: "#000",
|
||||||
left: 35
|
offsetX: 0
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "text",
|
type: "text",
|
||||||
coord: [
|
coord: [
|
||||||
[200, 220]
|
[144, 300]
|
||||||
],
|
],
|
||||||
font: [{
|
font: [{
|
||||||
text:this.$t('homePage.device.current') + ":",
|
text:this.$t('homePage.home.lowI') + ':',
|
||||||
size: 12,
|
size: 12,
|
||||||
color: "#999",
|
color: "#999",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: "3.98 A",
|
text: "",
|
||||||
size: 12,
|
size: 12,
|
||||||
color: "#000",
|
color: "#000",
|
||||||
left: 35
|
offsetX: 0
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
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
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -299,6 +200,26 @@
|
|||||||
coord: [
|
coord: [
|
||||||
[3, 120]
|
[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: [{
|
font: [{
|
||||||
text: this.$t('homePage.device.runState') + ':',
|
text: this.$t('homePage.device.runState') + ':',
|
||||||
size: 14,
|
size: 14,
|
||||||
@ -306,10 +227,10 @@
|
|||||||
width: 50,
|
width: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: this.$t('homePage.device.offGrid'),
|
text: "",
|
||||||
size: 14,
|
size: 14,
|
||||||
color: "#000",
|
color: "#000",
|
||||||
left: 80
|
offsetX: 0
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
@ -384,7 +305,7 @@
|
|||||||
self.chartLoading = true;
|
self.chartLoading = true;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
self.$u.api.deviceList
|
self.$u.api.deviceList
|
||||||
.GetPCSCurve({
|
.GetPvCurve({
|
||||||
stationId: this.stationId,
|
stationId: this.stationId,
|
||||||
sampleTime: this.time,
|
sampleTime: this.time,
|
||||||
srcId: this.srcId,
|
srcId: this.srcId,
|
||||||
@ -406,12 +327,12 @@
|
|||||||
},
|
},
|
||||||
initChargeChart(val) {
|
initChargeChart(val) {
|
||||||
const gonglv = [];
|
const gonglv = [];
|
||||||
const soc = [];
|
// const soc = [];
|
||||||
const xAxis = [];
|
const xAxis = [];
|
||||||
val.forEach((v) => {
|
val.forEach((v) => {
|
||||||
xAxis.push(v.data);
|
xAxis.push(v.data);
|
||||||
gonglv.push(v.pcsRealTimeCurve);
|
gonglv.push(v.planCurve);
|
||||||
soc.push(v.inCoreDataCurve);
|
// soc.push(v.inCoreDataCurve);
|
||||||
});
|
});
|
||||||
this.curve_option = {
|
this.curve_option = {
|
||||||
color: ["#BFE49F"],
|
color: ["#BFE49F"],
|
||||||
@ -548,7 +469,6 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
},
|
},
|
||||||
openTimeAction() {
|
openTimeAction() {
|
||||||
this.timeShow = true;
|
this.timeShow = true;
|
||||||
@ -556,90 +476,50 @@
|
|||||||
getStatus() {
|
getStatus() {
|
||||||
this.stationLoading = true
|
this.stationLoading = true
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
this.$u.api.deviceList
|
this.$u.api.deviceList
|
||||||
.GetNewValue({
|
.GetNewValue({
|
||||||
stationId: this.stationId,
|
stationId: this.stationId,
|
||||||
srcId: this.srcId,
|
srcId: this.srcId,
|
||||||
colList: [
|
colList: ["lowV", "highV", "lowI",
|
||||||
"runState",
|
"pvActivePower","runState","remoteInPlace",
|
||||||
"remoteInPlace",
|
"onGrid","offGrid","stateCharging",
|
||||||
"onGrid",
|
"stateDischarging","deviceStateStand","deviceStateFault",
|
||||||
"offGrid",
|
"deviceStateFull","deviceStateEmpty","dcBreaker",
|
||||||
"stateCharging",
|
"eStop","soc","grid",
|
||||||
"stateDischarging",
|
"outputPower",
|
||||||
"deviceStateStand",
|
// "reactivePowerPCS",
|
||||||
"deviceStateFault",
|
// ,,
|
||||||
"deviceStateFull",
|
// "volA",
|
||||||
"deviceStateEmpty",
|
// "volB",
|
||||||
"acBreaker",
|
// "volC",
|
||||||
"dcBreaker",
|
// "currentA",
|
||||||
"soc",
|
// "currentB",
|
||||||
"outputPower",
|
// "currentC",
|
||||||
"reactivePowerPCS",
|
// "dcPower",
|
||||||
"grid",
|
// "dcInputVol",
|
||||||
"volA",
|
// "dcCurrent",
|
||||||
"volB",
|
|
||||||
"volC",
|
|
||||||
"currentA",
|
|
||||||
"currentB",
|
|
||||||
"currentC",
|
|
||||||
"dcPower",
|
|
||||||
"dcInputVol",
|
|
||||||
"dcCurrent",
|
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
const battery = self.updateBattery(res.data.soc?.value ? res.data.soc.value : 0);
|
const battery = self.updateBattery(res.data.soc?.value ? res.data.soc.value : 0);
|
||||||
this.panelData = {
|
this.panelData = {
|
||||||
outputPower: res.data.outputPower?.value ? res.data.outputPower?.value : 0,
|
lowV: res.data.lowV?.value ? res.data.lowV?.value : 0,
|
||||||
reactivePowerPCS: res.data.reactivePowerPCS?.value ? res.data.reactivePowerPCS?.value :
|
highV: res.data.highV?.value ? res.data.highV?.value : 0,
|
||||||
0,
|
lowI: res.data.lowI?.value ? res.data.lowI?.value : 0,
|
||||||
grid: res.data.grid?.value ? res.data.grid?.value : 0,
|
pvActivePower: res.data.pvActivePower?.value ? res.data.pvActivePower?.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,
|
|
||||||
};
|
};
|
||||||
// this.textCanvasData[2].font[1].text = res.data.soc?.value ? res.data.soc.value + "%" : 0 + "%";
|
this.textCanvasData[0].font[1].text = res.data.pvActivePower?.value ? res.data.pvActivePower.value + " kW" : 0 + " kW";
|
||||||
// this.textCanvasData[3].font[1].text = this.workStatus(res.data.runState?.value);
|
this.textCanvasData[1].font[1].text = res.data.highV?.value ? res.data.highV.value + " V" : 0 + " V";
|
||||||
// if (this.stationId === 349 || this.stationId === 362 || this.stationId === 363) {
|
this.textCanvasData[2].font[1].text = res.data.lowV?.value ? res.data.lowV.value + " V" : 0 + " V";
|
||||||
// if (res.data.remoteInPlace?.value === 0) {
|
this.textCanvasData[3].font[1].text = res.data.lowI?.value ? res.data.lowI.value + " A" : 0 + " A";
|
||||||
// this.textCanvasData[4].font[1].text = this.$t('homePage.device.localAutomatic')
|
this.textCanvasData[5].font[1].text = res.data.onGrid?.value ?
|
||||||
// }
|
this.$t('homePage.device.grid') :
|
||||||
// if (res.data.remoteInPlace?.value === 1) {
|
this.$t('homePage.device.offGrid');
|
||||||
// this.textCanvasData[4].font[1].text = this.$t('homePage.device.localManual')
|
if(res.data.outputPower?.value){
|
||||||
// }
|
this.textCanvasData[6].font[1].text = this.getFlowDirection(res.data.outputPower?.value, res
|
||||||
// if (res.data.remoteInPlace?.value === 2) {
|
.data.flowDirection)
|
||||||
// this.textCanvasData[4].font[1].text = this.$t('homePage.device.distance')
|
}
|
||||||
// }
|
this.canvasData = [...this.textCanvasData, ...this.imageCanvasData, ...this.lineCanvasData]
|
||||||
|
|
||||||
// } 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
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
.finally((res) => {
|
.finally((res) => {
|
||||||
this.stationLoading = false;
|
this.stationLoading = false;
|
||||||
|
|||||||
@ -236,8 +236,8 @@
|
|||||||
stationId: null,
|
stationId: null,
|
||||||
srcId: null,
|
srcId: null,
|
||||||
hnStationId: [417, 398, 416, 415, 405, 485],
|
hnStationId: [417, 398, 416, 415, 405, 485],
|
||||||
actionSheetList: this.$t('homePage.device.timesArr'),
|
actionSheetList: Object.values(this.$t('homePage.home.timesArr')),
|
||||||
sampleTime:this.$t('homePage.device.timesArr')[0].label,
|
sampleTime:this.$t('homePage.home.timesArr')[0].text,
|
||||||
canvasData: [],
|
canvasData: [],
|
||||||
textCanvasData: [
|
textCanvasData: [
|
||||||
//0
|
//0
|
||||||
|
|||||||
@ -87,7 +87,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
|
|
||||||
this.Devicetype = options.type
|
this.Devicetype = options.type
|
||||||
if (this.Devicetype === 'storage' || this.Devicetype === 'anything') {
|
if (this.Devicetype === 'storage' || this.Devicetype === 'anything') {
|
||||||
this.list = [{
|
this.list = [{
|
||||||
@ -194,6 +193,7 @@
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
device(val) {
|
device(val) {
|
||||||
|
console.log(val);
|
||||||
this.Devicetype = val
|
this.Devicetype = val
|
||||||
},
|
},
|
||||||
changeTab(type) {
|
changeTab(type) {
|
||||||
|
|||||||
@ -84,7 +84,7 @@
|
|||||||
type = "storage";
|
type = "storage";
|
||||||
} else if (item.deviceType?.includes("basic") ) {
|
} else if (item.deviceType?.includes("basic") ) {
|
||||||
type = "anything"
|
type = "anything"
|
||||||
} else if (item.deviceType?.includes("mttp") ) {
|
} else if (item.deviceType?.includes("mttp") || item.deviceType?.includes("mppt")) {
|
||||||
type = "mttp"
|
type = "mttp"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,28 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="p_container">
|
<view class="p_container">
|
||||||
<u-navbar :is-back="true" :background="background" :border-bottom="false" :custom-back="toback">
|
|
||||||
|
<u-navbar :is-back="true" :background="background" :border-bottom="false">
|
||||||
|
<!-- <u-navbar :is-back="true" :background="background" :border-bottom="false" :custom-back="toback"> -->
|
||||||
<view class="slot-wrap">
|
<view class="slot-wrap">
|
||||||
<stationDropdow disabled style="width: 100%" ref="dropdow" />
|
<stationDropdow disabled style="width: 100%" ref="dropdow" />
|
||||||
</view>
|
</view>
|
||||||
</u-navbar>
|
</u-navbar>
|
||||||
<zero-loading v-if="loading"></zero-loading>
|
<!-- <zero-loading v-if="loading"></zero-loading> -->
|
||||||
|
|
||||||
<view v-else style="height: calc(100% - 100rpx);">
|
<!-- <view v-else style="height: calc(100% - 100rpx);"> -->
|
||||||
|
<view style="height: calc(100% - 100rpx);">
|
||||||
<!-- <view class="search">
|
<!-- <view class="search">
|
||||||
<luyj-tree-search :placeholder="$t('homePage.home.revenue')">
|
<luyj-tree-search :placeholder="$t('homePage.home.revenue')">
|
||||||
</luyj-tree-search>
|
</luyj-tree-search>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="p_content">
|
<view class="p_content">
|
||||||
<view class="selectContent">
|
<view class="selectContent">
|
||||||
<view class="p_box selectItem" v-for="(item,index) in labeArr" :key="index" @click="toUrl(item)">
|
<view class="p_box selectItem" @click="toUrl(labeArr[0])">
|
||||||
<view >
|
<view >
|
||||||
<image :src="item.icon" mode="" style="height: 48rpx; width: 48rpx;" class="selectIcon"></image>
|
<image :src="labeArr[0].icon" mode="" style="height: 48rpx; width: 48rpx;" class="selectIcon"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
{{ item.label}}
|
{{ labeArr[0].label}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="p_box selectItem" v-if="inverterFlag === 1" @click="toUrl(labeArr[1])">
|
||||||
|
<view >
|
||||||
|
<image :src="labeArr[1].icon" mode="" style="height: 48rpx; width: 48rpx;" class="selectIcon"></image>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
{{ labeArr[1].label}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -59,6 +69,9 @@
|
|||||||
currentStation() {
|
currentStation() {
|
||||||
return this.vuex_currentStation;
|
return this.vuex_currentStation;
|
||||||
},
|
},
|
||||||
|
inverterFlag(){
|
||||||
|
return this.vuex_inverterFlag;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toUrl(val) {
|
toUrl(val) {
|
||||||
|
|||||||
@ -6,8 +6,15 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
props: {
|
||||||
|
time: {
|
||||||
|
type: String,
|
||||||
|
default: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
stationId:'',
|
||||||
chartData: {},
|
chartData: {},
|
||||||
//您可以通过修改 config-ucharts.js 文件中下标为 ['column'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
|
//您可以通过修改 config-ucharts.js 文件中下标为 ['column'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
|
||||||
opts: {
|
opts: {
|
||||||
@ -23,10 +30,10 @@
|
|||||||
disableGrid: true,
|
disableGrid: true,
|
||||||
rotateLabel: true,
|
rotateLabel: true,
|
||||||
rotateAngle: 30,
|
rotateAngle: 30,
|
||||||
|
|
||||||
titleOffsetY: 20,
|
titleOffsetY: 20,
|
||||||
titleOffsetX: 5,
|
titleOffsetX: 5,
|
||||||
marginTop: 5
|
marginTop: 5,
|
||||||
|
labelCount: 7
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
data: [{
|
data: [{
|
||||||
@ -44,32 +51,53 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log("runChart onReady");
|
this.GetPvMonthData();
|
||||||
this.getServerData();
|
},
|
||||||
|
computed: {
|
||||||
|
currentStation() {
|
||||||
|
return this.vuex_currentStation;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
currentStation: {
|
||||||
|
handler(val) {
|
||||||
|
this.stationId = val.id;
|
||||||
|
},
|
||||||
|
deep: true,
|
||||||
|
immediate: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getServerData() {
|
async GetPvMonthData(){
|
||||||
let _this = this;
|
try {
|
||||||
//模拟从服务器获取数据时的延时
|
const res = await this.$u.api.enrnings.GetPvMonthData({
|
||||||
setTimeout(() => {
|
stationId: this.stationId,
|
||||||
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
|
time: this.time,
|
||||||
let res = {
|
});
|
||||||
categories: ["2025-10-17", "2025-10-18", "2025-10-19", "2025-10-20", "2025-10-21",
|
let resdata = {
|
||||||
"2025-10-22"
|
categories:[],
|
||||||
],
|
series:[{
|
||||||
series: [
|
name:this.$t('homePage.home.powerGeneration'),
|
||||||
|
textColor: "#FFFFFF",
|
||||||
{
|
data: []
|
||||||
name:this.$t('homePage.home.powerGeneration'),
|
}]
|
||||||
textColor: "#FFFFFF",
|
}
|
||||||
data: [18, 27, 21, 24, 6, 28]
|
if (res.data.length) {
|
||||||
}
|
res.data.forEach((el) => {
|
||||||
]
|
resdata.categories.push(el.date)
|
||||||
};
|
resdata.series[0].data.push(el.powerGenerate)
|
||||||
this.chartData = JSON.parse(JSON.stringify(res));
|
});
|
||||||
|
console.log(JSON.parse(JSON.stringify(resdata)));
|
||||||
}, 500);
|
this.chartData = JSON.parse(JSON.stringify(resdata));
|
||||||
},
|
} else {
|
||||||
|
this.chargeArr = [];
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
//TODO handle the exception
|
||||||
|
} finally {
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -27,42 +27,57 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="power-generation">
|
<view class="power-generation">
|
||||||
<Section :title="$t('homePage.earning.changeDischargePro')" />
|
<Section :title="$t('homePage.home.powerGenerationStatus')" />
|
||||||
<view class="power-generation-detail">
|
<view class="power-generation-detail">
|
||||||
<view class="value-box">
|
|
||||||
<view class="icon zjry"> </view>
|
|
||||||
<view class="title">
|
|
||||||
{{ $t("homePage.earning.capacity") }}
|
|
||||||
</view>
|
|
||||||
<view class="value">
|
|
||||||
{{ totalData.capacity | isNull }}
|
|
||||||
</view>
|
|
||||||
<view class="unit"> kWh </view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="value-box">
|
<view class="value-box">
|
||||||
<view class="icon byzc"> </view>
|
<view class="icon zjry">
|
||||||
<view class="title">
|
|
||||||
{{ $t("homePage.earning.monthTotalCharge") }}
|
|
||||||
</view>
|
|
||||||
<view class="value">
|
|
||||||
{{ totalData.totalChargeElec | isNull }}
|
|
||||||
</view>
|
|
||||||
<view class="unit"> kWh </view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="value-box">
|
</view>
|
||||||
<view class="icon byzf"> </view>
|
<view class="title">
|
||||||
<view class="title">
|
{{ $t('homePage.home.currentMonthlyPowerGeneration') }}
|
||||||
{{ $t("homePage.earning.monthTotalDischarge") }}
|
</view>
|
||||||
</view>
|
<view class="value">
|
||||||
<view class="value">
|
{{ totalData.monthReleaseElec | isNull }}
|
||||||
{{ totalData.totalDischargeElec | isNull }}
|
</view>
|
||||||
</view>
|
<view class="unit">
|
||||||
<view class="unit"> kWh </view>
|
kWh
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="value-box">
|
<view class="value-box">
|
||||||
|
<view class="icon byzc">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="title">
|
||||||
|
{{ $t('homePage.home.cumulativePowerGeneration') }}
|
||||||
|
</view>
|
||||||
|
<view class="value">
|
||||||
|
{{ totalData.totalReleaseElec | isNull }}
|
||||||
|
</view>
|
||||||
|
<view class="unit">
|
||||||
|
kWh
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<view class="value-box">
|
||||||
|
<view class="icon byzf">
|
||||||
|
|
||||||
|
</view>
|
||||||
|
<view class="title">
|
||||||
|
{{ $t('homePage.home.ratedPowernokw') }}
|
||||||
|
</view>
|
||||||
|
<view class="value">
|
||||||
|
{{ totalData.pvPower | isNull }}
|
||||||
|
</view>
|
||||||
|
<view class="unit">
|
||||||
|
kW
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <view class="value-box">
|
||||||
<view class="icon yxtzhl"> </view>
|
<view class="icon yxtzhl"> </view>
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{ $t("homePage.earning.monthEff") }}
|
{{ $t("homePage.earning.monthEff") }}
|
||||||
@ -101,13 +116,13 @@
|
|||||||
{{ totalData.totalConvRate | isNull }}
|
{{ totalData.totalConvRate | isNull }}
|
||||||
</view>
|
</view>
|
||||||
<view class="unit"> % </view>
|
<view class="unit"> % </view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="month-power">
|
<view class="month-power">
|
||||||
<Section :title="$t('homePage.home.projectMonthlyPower')" />
|
<Section :title="$t('homePage.home.projectMonthlyPower')" />
|
||||||
<view class="power-generation-detail">
|
<view class="power-generation-detail">
|
||||||
<run-chart />
|
<run-chart :time="time" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="month-power">
|
<view class="month-power">
|
||||||
@ -120,19 +135,17 @@
|
|||||||
<view class="power-detail">
|
<view class="power-detail">
|
||||||
<view class="left-value">
|
<view class="left-value">
|
||||||
<view class="value">
|
<view class="value">
|
||||||
{{ totalData.totalChargePrice | isNull }}
|
{{ totalData.monthIncone | isNull }}
|
||||||
</view>
|
</view>
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{ $t("homePage.home.enmonthTotalChargePrice") }}
|
{{ $t("homePage.home.monthlyIncome") }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-value t-fdzl"> </view>
|
<view class="right-value t-fdzl"> </view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<!-- <view class="power-detail"
|
||||||
class="power-detail"
|
style="margin: 0 !important; padding-bottom: 0 !important" >
|
||||||
style="margin: 0 !important; padding-bottom: 0 !important"
|
|
||||||
>
|
|
||||||
<view class="left-value">
|
<view class="left-value">
|
||||||
<view class="value">
|
<view class="value">
|
||||||
{{ totalData.totalDisChargePrice | isNull }}
|
{{ totalData.totalDisChargePrice | isNull }}
|
||||||
@ -142,22 +155,32 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="right-value t-swdl"> </view>
|
<view class="right-value t-swdl"> </view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="right">
|
<view class="left">
|
||||||
<view class="value-box">
|
<view class="power-detail">
|
||||||
<view class="value">
|
<view class="left-value">
|
||||||
|
<view class="value">
|
||||||
|
{{ totalData.income | isNull }}
|
||||||
|
</view>
|
||||||
|
<view class="title">
|
||||||
|
{{ $t("homePage.home.totalRevenue") }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="right-value t-fdzl"> </view> -->
|
||||||
|
<view class="right-value bg"> </view>
|
||||||
|
<!-- <view class="value">
|
||||||
{{ totalData.income | isNull }}
|
{{ totalData.income | isNull }}
|
||||||
</view>
|
</view>
|
||||||
<view class="title">
|
<view class="title">
|
||||||
{{ $t("homePage.home.enearnings") }}
|
{{ $t("homePage.home.totalRevenue") }}
|
||||||
</view>
|
</view>
|
||||||
<view class="bg"> </view>
|
<view class="bg"> </view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="report-detail">
|
<!-- <view class="report-detail">
|
||||||
<Section
|
<Section
|
||||||
:title="$t('homePage.earning.earningsDetail')"
|
:title="$t('homePage.earning.earningsDetail')"
|
||||||
style="margin-bottom: 30rpx"
|
style="margin-bottom: 30rpx"
|
||||||
@ -224,7 +247,7 @@
|
|||||||
{{ $t("homePage.earning.noDisChargeData") }}
|
{{ $t("homePage.earning.noDisChargeData") }}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
|
|
||||||
<u-picker
|
<u-picker
|
||||||
v-model="TimeShow"
|
v-model="TimeShow"
|
||||||
@ -430,7 +453,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.power-generation {
|
.power-generation {
|
||||||
height: 760rpx;
|
height: 380rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
box-shadow: 0px 4rpx 16rpx rgba(0, 0, 0, 0.1);
|
box-shadow: 0px 4rpx 16rpx rgba(0, 0, 0, 0.1);
|
||||||
margin-left: 30rpx;
|
margin-left: 30rpx;
|
||||||
@ -643,9 +666,6 @@ export default {
|
|||||||
.left {
|
.left {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
padding-top: 0rpx;
|
padding-top: 0rpx;
|
||||||
padding-bottom: 0rpx;
|
padding-bottom: 0rpx;
|
||||||
@ -654,9 +674,8 @@ export default {
|
|||||||
.power-detail {
|
.power-detail {
|
||||||
background-color: rgba(254, 131, 15, 0.05);
|
background-color: rgba(254, 131, 15, 0.05);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 180rpx;
|
height: 100%;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
margin-bottom: 22rpx;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -685,6 +704,13 @@ export default {
|
|||||||
right: 20rpx;
|
right: 20rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.bg {
|
||||||
|
width: 194rpx;
|
||||||
|
height: 188rpx;
|
||||||
|
background-image: url("/static/aidex/images/total-sy.png");
|
||||||
|
background-size: 100% 100%;
|
||||||
|
}
|
||||||
.t-fdzl {
|
.t-fdzl {
|
||||||
width: 121rpx;
|
width: 121rpx;
|
||||||
height: 119rpx;
|
height: 119rpx;
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
<!-- <image src="/static/aidex/login/login-bg.png" class="logo"></image> -->
|
<!-- <image src="/static/aidex/login/login-bg.png" class="logo"></image> -->
|
||||||
<view class="logo">
|
<view class="logo">
|
||||||
<view class="EnglishFont">
|
<view class="EnglishFont">
|
||||||
STORASMART
|
ZETA CLOUD
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/aidex/login/bg-logo2.png" class="center-logo"></image>
|
<image src="/static/aidex/login/bg-logo2.png" class="center-logo"></image>
|
||||||
@ -17,11 +17,11 @@
|
|||||||
|
|
||||||
<u-select v-model="langShow" :list="Langlist" @confirm="changeLanguage"></u-select>
|
<u-select v-model="langShow" :list="Langlist" @confirm="changeLanguage"></u-select>
|
||||||
|
|
||||||
<u-radio-group v-model="StationValue" @change="radioGroupChange" active-color="#009C77">
|
<!-- <u-radio-group v-model="StationValue" @change="radioGroupChange" active-color="#009C77">
|
||||||
<u-radio @change="radioChange" v-for="(item, index) in $t('homePage.home.stationType')" :key="index" :name="item.name">
|
<u-radio @change="radioChange" v-for="(item, index) in $t('homePage.home.stationType')" :key="index" :name="item.name">
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</u-radio>
|
</u-radio>
|
||||||
</u-radio-group>
|
</u-radio-group> -->
|
||||||
|
|
||||||
<view class="user-card">
|
<view class="user-card">
|
||||||
<view class="list">
|
<view class="list">
|
||||||
@ -139,7 +139,7 @@ export default {
|
|||||||
showMsg: false,
|
showMsg: false,
|
||||||
Stationlist: this.$t('homePage.home.stationType'),
|
Stationlist: this.$t('homePage.home.stationType'),
|
||||||
// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
|
// u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
|
||||||
StationValue: '',
|
StationValue: 'en_US',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad () {
|
onLoad () {
|
||||||
@ -194,8 +194,9 @@ export default {
|
|||||||
});
|
});
|
||||||
} else if (val === '中国站' || val === 'China Station') {
|
} else if (val === '中国站' || val === 'China Station') {
|
||||||
this.$u.http.setConfig({
|
this.$u.http.setConfig({
|
||||||
// baseUrl: 'http://1.95.170.86:8002/api'
|
// baseUrl: 'http://1.95.170.86:8002/api'
|
||||||
baseUrl: 'https://zzkj-cloud.com/api'
|
baseUrl: 'https://zetatech.zzkj-cloud.com/api'
|
||||||
|
// baseUrl: 'https://zzkj-cloud.com/api'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const res = await this.$u.api.GetLanguageConfig('zh')
|
const res = await this.$u.api.GetLanguageConfig('zh')
|
||||||
@ -432,6 +433,7 @@ export default {
|
|||||||
this.$u.api.alarm.GetNewStationlist().then((res) => {
|
this.$u.api.alarm.GetNewStationlist().then((res) => {
|
||||||
this.$u.vuex("vuex_provinceStation", res.data.list)
|
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_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) {
|
wxLogin (res) {
|
||||||
|
|||||||
@ -27,7 +27,6 @@
|
|||||||
currentStation() {
|
currentStation() {
|
||||||
return this.vuex_currentStation;
|
return this.vuex_currentStation;
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
currentStation: {
|
currentStation: {
|
||||||
|
|||||||
@ -1,23 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="grid" :style="{'grid-template-columns': `repeat(${col}, 1fr)`}">
|
<view class="grid" :style="{'grid-template-columns': `repeat(${col}, 1fr)`}">
|
||||||
<view class="item" v-for="(item,index) in list" :key="index">
|
<zero-loading v-if="loading"></zero-loading>
|
||||||
<image v-if="item.showMark" src="/static/aidex/images/history-icon.png" mode="" class="rightMark"></image>
|
<template v-else>
|
||||||
<view>
|
<view class="item" v-for="(item,index) in list" :key="index">
|
||||||
<image :src="item.image" mode="" :style="{height:imgHeight,width:imgWidth}"></image>
|
<image v-if="item.showMark" src="/static/aidex/images/history-icon.png" mode="" class="rightMark"></image>
|
||||||
|
<view>
|
||||||
|
<image :src="item.image" mode="" :style="{height:imgHeight,width:imgWidth}"></image>
|
||||||
|
</view>
|
||||||
|
<view class="num">
|
||||||
|
{{item.value}}
|
||||||
|
</view>
|
||||||
|
<view class="label">
|
||||||
|
{{item.label}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="num">
|
</template>
|
||||||
{{item.value}}
|
|
||||||
</view>
|
|
||||||
<view class="label">
|
|
||||||
{{item.label}}
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
loading:{
|
||||||
|
type: Boolean,
|
||||||
|
default:false
|
||||||
|
},
|
||||||
list: {
|
list: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => []
|
default: () => []
|
||||||
|
|||||||
@ -21,9 +21,7 @@
|
|||||||
<view class="item-num">{{ panelData.totalCapacity | kwhFormat }}
|
<view class="item-num">{{ panelData.totalCapacity | kwhFormat }}
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="item-title">{{ this.$t('homePage.home.totalCapacity') }}({{
|
<view class="item-title">{{ this.$t('homePage.home.totalCapacity') }}({{ panelData.totalCapacity | kwhUnitFormat }})</view>
|
||||||
panelData.totalCapacity | kwhUnitFormat
|
|
||||||
}})</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="group-item">
|
<view class="group-item">
|
||||||
|
|||||||
@ -87,8 +87,7 @@
|
|||||||
<image src="/static/aidex/images/rfdl.png"></image>
|
<image src="/static/aidex/images/rfdl.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-con">
|
<view class="item-con">
|
||||||
<view class="item-num">{{ panelData.dailyDischargeElec | kwhFormat
|
<view class="item-num">{{ panelData.dailyDischargeElec | kwhFormat }}</view>
|
||||||
}}</view>
|
|
||||||
<view class="item-title">{{ this.$t('homePage.home.dailyDischarge') }}({{ panelData.dailyDischargeElec | kwhUnitFormat }})</view>
|
<view class="item-title">{{ this.$t('homePage.home.dailyDischarge') }}({{ panelData.dailyDischargeElec | kwhUnitFormat }})</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svgBoxss" style="height: 100%;width: 100%;"
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" id="svgBoxss" style="height: 100%;width: 100%;"
|
||||||
viewBox="0 0 1280 1680">
|
viewBox="0 0 1280 1680" ref="svgBoxss">
|
||||||
|
|
||||||
<path d="M 1092,93L 1080,93L 1080,94L 1092,94Z" style="fill:rgb(0,128,0);" />
|
<path d="M 1092,93L 1080,93L 1080,94L 1092,94Z" style="fill:rgb(0,128,0);" />
|
||||||
<path d="M 173,854L 174,853L 174,851L 174.5,848L 175,847L 175,846L 174,843L 168,843L 168,853L 170,854Z"
|
<path d="M 173,854L 174,853L 174,851L 174.5,848L 175,847L 175,846L 174,843L 168,843L 168,853L 170,854Z"
|
||||||
@ -1209,7 +1209,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.getElementById('svgBoxss')?.appendChild(this.createSvgText(this.tags))
|
this.$refs.svgBoxss?.appendChild(this.createSvgText(this.tags))
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<svg style="width:100%; height:100%;" xmlns="http://www.w3.org/2000/svg"
|
<svg style="width:100%; height:100%;" xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink" id="svgBox" viewBox="0 0 1280 1360">
|
xmlns:xlink="http://www.w3.org/1999/xlink" id="svgBox" ref="svgBox" viewBox="0 0 1280 1360">
|
||||||
|
|
||||||
<!-- 图片相关,不用管 -->
|
<!-- 图片相关,不用管 -->
|
||||||
<path
|
<path
|
||||||
@ -562,9 +562,8 @@
|
|||||||
<!-- <circle cx="573" cy="500" r="16" fill="#58D86B" /> -->
|
<!-- <circle cx="573" cy="500" r="16" fill="#58D86B" /> -->
|
||||||
<circle class="anim-topright anim-boxele" cx="573" cy="500" r="16" fill="#58D86B" />
|
<circle class="anim-topright anim-boxele" cx="573" cy="500" r="16" fill="#58D86B" />
|
||||||
<!-- 动画元素 -->
|
<!-- 动画元素 -->
|
||||||
<circle id="myCircle" cx="280" cy="67" r="15" fill="#0DA17D">
|
<circle class="myCircle" cx="280" cy="67" r="15" fill="#0DA17D"/>
|
||||||
<animate attributeName="cx" from="280" to="1000" dur="3000ms" fill="freeze" repeatCount="indefinite" />
|
|
||||||
</circle>
|
|
||||||
</svg>
|
</svg>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -664,7 +663,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
document.getElementById('svgBox')?.appendChild(this.createSvgText(this.tags))
|
this.$refs.svgBox?.appendChild(this.createSvgText(this.tags))
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -674,6 +673,24 @@
|
|||||||
font-family: Arial, sans-serif;
|
font-family: Arial, sans-serif;
|
||||||
font-size: 40px;
|
font-size: 40px;
|
||||||
fill: #7F7F7F;
|
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 {
|
.anim-pv1 {
|
||||||
|
|||||||
1171
pages/tabbar/components/topology/pv2first.vue
Normal file
1171
pages/tabbar/components/topology/pv2first.vue
Normal file
File diff suppressed because it is too large
Load Diff
@ -34,42 +34,29 @@
|
|||||||
<view class="content-box">
|
<view class="content-box">
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<Section :title="$t('homePage.home.stationTopo')" />
|
<Section :title="$t('homePage.home.stationTopo')" />
|
||||||
<cixi v-if="topologyType === 0" ref="tuopu" />
|
<view v-if="componentsLoaded">
|
||||||
<kejiyuan v-else-if="topologyType === 2" ref="tuopu" />
|
<cixi v-if="topologyType === 0" ref="tuopu" />
|
||||||
<lingchao v-else-if="topologyType === 3" ref="tuopu" />
|
<kejiyuan v-else-if="topologyType === 2" ref="tuopu" />
|
||||||
<jingke v-else-if="topologyType === 4" ref="tuopu" />
|
<lingchao v-else-if="topologyType === 3" ref="tuopu" />
|
||||||
<weishanhu v-else-if="topologyType === 5" ref="tuopu" />
|
<jingke v-else-if="topologyType === 4" ref="tuopu" />
|
||||||
<zhongzihuanbao v-else-if="topologyType === 6" ref="tuopu" />
|
<weishanhu v-else-if="topologyType === 5" ref="tuopu" />
|
||||||
<sanmenxia v-else-if="topologyType === 7" ref="tuopu" />
|
<zhongzihuanbao v-else-if="topologyType === 6" ref="tuopu" />
|
||||||
<second v-else-if="topologyType === 8" ref="tuopu" />
|
<sanmenxia v-else-if="topologyType === 7" ref="tuopu" />
|
||||||
<fire v-else-if="topologyType === 9" ref="tuopu" />
|
<second v-else-if="topologyType === 8" ref="tuopu" />
|
||||||
<runda100 v-else-if="topologyType === 10" ref="tuopu" />
|
<fire v-else-if="topologyType === 9" ref="tuopu" />
|
||||||
<runda230 v-else-if="topologyType === 11" ref="tuopu" />
|
<runda100 v-else-if="topologyType === 10" ref="tuopu" />
|
||||||
<runda215 v-else-if="topologyType === 12" ref="tuopu" />
|
<runda230 v-else-if="topologyType === 11" ref="tuopu" />
|
||||||
<third v-else-if="topologyType === 13" ref="tuopu" />
|
<runda215 v-else-if="topologyType === 12" ref="tuopu" />
|
||||||
<mdPviese v-else-if="topologyType === 14" ref="tuopu" />
|
<third v-else-if="topologyType === 13" ref="tuopu" />
|
||||||
<ceshi-t v-else-if="topologyType === 1" />
|
<mdPviese v-else-if="topologyType === 14" ref="tuopu" />
|
||||||
<standard v-else ref="tuopu" />
|
<pv2first v-else-if="topologyType === 1 && inverterFlag === 1 && pvTopologyType === 2" ref="tuopu" />
|
||||||
</view>
|
<standard v-else ref="tuopu" />
|
||||||
<view class="box">
|
</view>
|
||||||
<Section title="测试01" />
|
<!-- 加载中占位(可选) -->
|
||||||
<view class="marginT20" >
|
<view v-else class="loading-tip">
|
||||||
<web-view :src="src" :fullscreen="false"></web-view>
|
<zero-loading v-if="tuopoloading"></zero-loading>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <view class="box">
|
|
||||||
<Section title="测试02" />
|
|
||||||
<view class="marginT20">
|
|
||||||
<ceshi-l />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="box">
|
|
||||||
<Section title="测试03" />
|
|
||||||
当前组件有数据处理示例
|
|
||||||
<view class="marginT20">
|
|
||||||
<ceshi-s />
|
|
||||||
</view>
|
|
||||||
</view> -->
|
|
||||||
<view v-if="topologyType === 9" class="box">
|
<view v-if="topologyType === 9" class="box">
|
||||||
<Section :title="$t('homePage.home.deviceMonitor')" />
|
<Section :title="$t('homePage.home.deviceMonitor')" />
|
||||||
<devicemonitoring ref="deviceFire" />
|
<devicemonitoring ref="deviceFire" />
|
||||||
@ -85,7 +72,7 @@
|
|||||||
<view slot="right" style="flex: 1">
|
<view slot="right" style="flex: 1">
|
||||||
<view class="top-right-box">
|
<view class="top-right-box">
|
||||||
<view class="top-right-item" :class="{ active: activeTime === 'day' }"
|
<view class="top-right-item" :class="{ active: activeTime === 'day' }"
|
||||||
@click="changeTime('day')">{{this.$t('homePage.home.sevenDay')}}
|
@click="changeTime('day')">{{this.$t('homePage.home.sevenDaycom')}}
|
||||||
</view>
|
</view>
|
||||||
<view class="top-right-item" :class="{ active: activeTime === 'month' }"
|
<view class="top-right-item" :class="{ active: activeTime === 'month' }"
|
||||||
@click="changeTime('month')">{{this.$t('homePage.home.monthDay')}}
|
@click="changeTime('month')">{{this.$t('homePage.home.monthDay')}}
|
||||||
@ -100,15 +87,15 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="box">
|
<view class="box">
|
||||||
<Section :title="$t('homePage.home.stationData')" />
|
<Section :title="$t('homePage.home.stationDatacom')" />
|
||||||
<wshStationData v-if="topologyType === 5" />
|
<wshStationData v-if="topologyType === 5" />
|
||||||
<zzhbStationData v-else-if="topologyType === 6" />
|
<zzhbStationData v-else-if="topologyType === 6" />
|
||||||
<commonStationData v-else />
|
<commonStationData v-else />
|
||||||
</view>
|
</view>
|
||||||
<view class="box" v-if="topologyType === 1">
|
<view class="box" v-if="inverterFlag === 1">
|
||||||
<Section :title="$t('homePage.home.pvKpi')" />
|
<Section :title="$t('homePage.home.pvKpi')" />
|
||||||
<view class="">
|
<view class="">
|
||||||
<my-grid imgHeight="40rpx" imgWidth="40rpx" :list="lightArr" />
|
<my-grid :loading="loading" :col="language !== 'zh_CN'? 2:3" imgHeight="40rpx" imgWidth="40rpx" :list="lightArr"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="box" v-if="topologyType === 1">
|
<view class="box" v-if="topologyType === 1">
|
||||||
@ -116,12 +103,12 @@
|
|||||||
<environmentalControlPosition v-if="rightCenter === 'dispositionRightCenter'" />
|
<environmentalControlPosition v-if="rightCenter === 'dispositionRightCenter'" />
|
||||||
<environmentalControl v-else />
|
<environmentalControl v-else />
|
||||||
</view>
|
</view>
|
||||||
<view class="box">
|
<!-- <view class="box" v-if="inverterFlag === 1">
|
||||||
<Section :title="$t('homePage.home.socialContribution')" />
|
<Section :title="$t('homePage.home.socialContribution')" />
|
||||||
<view class="">
|
<view class="">
|
||||||
<my-grid :col="3" imgHeight="72rpx" imgWidth="82rpx" :list="society" />
|
<my-grid :col="3" imgHeight="72rpx" imgWidth="82rpx" :list="society" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
@ -138,6 +125,9 @@
|
|||||||
import ceshiT from './components/topology/ceshiT.vue'
|
import ceshiT from './components/topology/ceshiT.vue'
|
||||||
import ceshiL from './components/topology/ceshiL.vue'
|
import ceshiL from './components/topology/ceshiL.vue'
|
||||||
import ceshiS from './components/topology/ceshiS.vue'
|
import ceshiS from './components/topology/ceshiS.vue'
|
||||||
|
|
||||||
|
import pv2first from './components/topology/pv2first.vue'
|
||||||
|
|
||||||
import weishanhu from './components/topology/weishanhu.vue'
|
import weishanhu from './components/topology/weishanhu.vue'
|
||||||
import sanmenxia from './components/topology/sanmenxia.vue'
|
import sanmenxia from './components/topology/sanmenxia.vue'
|
||||||
import lingchao from './components/topology/lingchao.vue'
|
import lingchao from './components/topology/lingchao.vue'
|
||||||
@ -166,6 +156,7 @@
|
|||||||
ceshiT,
|
ceshiT,
|
||||||
ceshiL,
|
ceshiL,
|
||||||
ceshiS,
|
ceshiS,
|
||||||
|
pv2first,
|
||||||
myGrid,
|
myGrid,
|
||||||
stationDropdow,
|
stationDropdow,
|
||||||
Section,
|
Section,
|
||||||
@ -212,6 +203,13 @@
|
|||||||
timer: null,
|
timer: null,
|
||||||
tuopuTimer: null,
|
tuopuTimer: null,
|
||||||
rightCenter: null,
|
rightCenter: null,
|
||||||
|
componentsLoaded: false,
|
||||||
|
tuopoloading:false,
|
||||||
|
topCenterPvArr:[
|
||||||
|
{name:'pv1AndStorage_261',value:1},
|
||||||
|
{name:'pv2AndStorage_261',value:2}
|
||||||
|
],
|
||||||
|
pvTopologyType:0,
|
||||||
society: [{
|
society: [{
|
||||||
label: this.$t('homePage.home.saveStandardCoal'),
|
label: this.$t('homePage.home.saveStandardCoal'),
|
||||||
value: '15.00',
|
value: '15.00',
|
||||||
@ -228,29 +226,14 @@
|
|||||||
image: require('@/static/aidex/images/ll03.png'),
|
image: require('@/static/aidex/images/ll03.png'),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
lightArr: [{
|
panelData: {
|
||||||
label: this.$t('homePage.home.totalCapacity') + '(kW)',
|
pvCurrentPower: 0, // 对应 lightArr[0].value
|
||||||
value: '100.00',
|
dailyReleaseElec: 0, // 对应 lightArr[1].value
|
||||||
image: require('@/static/aidex/images/ll05.png'),
|
totalReleaseElec: 0, // 对应 lightArr[2].value
|
||||||
},
|
todayIncone: 0, // 对应 lightArr[3].value
|
||||||
{
|
totalIncome: 0, // 对应 lightArr[4].value
|
||||||
label: this.$t('homePage.home.currentPower') + '(kW)',
|
pvPower: 0 // 对应 lightArr[5].value
|
||||||
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
|
|
||||||
},
|
|
||||||
]
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -262,7 +245,44 @@
|
|||||||
},
|
},
|
||||||
language() {
|
language() {
|
||||||
return this.vuex_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() {
|
onHide() {
|
||||||
if (this.timer) {
|
if (this.timer) {
|
||||||
@ -274,29 +294,30 @@
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
currentStation: {
|
currentStation: {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
if (val && val.id) {
|
if (val && val.id) {
|
||||||
|
this.stationId = val.id
|
||||||
this.stationId = val.id
|
this.userId = this.userData.userId
|
||||||
this.userId = this.userData.userId
|
this.topologyType = val.topologyType
|
||||||
console.log('拓扑图',val)
|
// 重置加载状态,避免复用旧状态
|
||||||
this.topologyType = val.topologyType
|
this.componentsLoaded = false
|
||||||
this.getComponents()
|
this.tuopoloading = true
|
||||||
this.$nextTick(() => {
|
this.getComponents().then(() => {
|
||||||
if (this.$refs.tuopu) {
|
this.GetPcsTotalData();
|
||||||
this.$refs.tuopu.getData(val.id)
|
this.$nextTick(() => {
|
||||||
}
|
if (this.$refs.tuopu) {
|
||||||
|
this.$refs.tuopu.getData(val.id)
|
||||||
if (this.$refs.deviceFire) {
|
}
|
||||||
this.$refs.deviceFire.getData(this.stationId)
|
if (this.$refs.deviceFire) {
|
||||||
}
|
this.$refs.deviceFire.getData(this.stationId)
|
||||||
})
|
}
|
||||||
}
|
});
|
||||||
},
|
});
|
||||||
deep: true,
|
}
|
||||||
immediate: true,
|
},
|
||||||
},
|
deep: true,
|
||||||
|
immediate: true,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
@ -317,25 +338,27 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getComponents()
|
// 重置加载状态
|
||||||
this.getMessage()
|
this.componentsLoaded = false
|
||||||
if (this.$refs.runChart && this.stationId) {
|
this.tuopoloading = true
|
||||||
this.$refs.runChart.getData()
|
this.getComponents().then(() => {
|
||||||
}
|
this.getMessage()
|
||||||
if (this.$refs.dischargeChart && this.stationId) {
|
if (this.$refs.runChart && this.stationId) {
|
||||||
this.$refs.dischargeChart.getData()
|
this.$refs.runChart.getData()
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
if (this.$refs.dischargeChart && this.stationId) {
|
||||||
|
this.$refs.dischargeChart.getData()
|
||||||
if (this.$refs.tuopu) {
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (this.$refs.tuopu) {
|
||||||
this.$refs.tuopu.changeEnglish()
|
this.$refs.tuopu.changeEnglish()
|
||||||
this.$refs.tuopu.getData(this.stationId)
|
this.$refs.tuopu.getData(this.stationId)
|
||||||
}
|
}
|
||||||
|
if (this.$refs.deviceFire) {
|
||||||
if (this.$refs.deviceFire) {
|
|
||||||
this.$refs.deviceFire.getData(this.stationId)
|
this.$refs.deviceFire.getData(this.stationId)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
});
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
this.getMessage()
|
this.getMessage()
|
||||||
}, 5000)
|
}, 5000)
|
||||||
@ -352,13 +375,39 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
async getComponents() {
|
||||||
const {
|
try {
|
||||||
data
|
const { data } = await this.$u.api.homePageData.GetHomePageComponents(this.stationId);
|
||||||
} = await this.$u.api.homePageData.GetHomePageComponents(this.stationId)
|
if (data && data.length > 0) {
|
||||||
if (data && data.length > 0) {
|
this.rightCenter = data[0]?.rightCenter;
|
||||||
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() {
|
openTimer() {
|
||||||
|
|
||||||
@ -524,7 +573,12 @@
|
|||||||
margin: 20rpx;
|
margin: 20rpx;
|
||||||
margin-top: 30rpx;
|
margin-top: 30rpx;
|
||||||
box-shadow: 0px 4rpx 16rpx rgba(0, 0, 0, 0.08);
|
box-shadow: 0px 4rpx 16rpx rgba(0, 0, 0, 0.08);
|
||||||
|
|
||||||
|
.loading-tip {
|
||||||
|
width: 650rpx;
|
||||||
|
height: 710rpx;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
.top-right-box {
|
.top-right-box {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|||||||
@ -51,7 +51,8 @@ const store = new Vuex.Store({
|
|||||||
vuex_psdkey: lifeData.vuex_psdkey ? lifeData.vuex_psdkey : '',
|
vuex_psdkey: lifeData.vuex_psdkey ? lifeData.vuex_psdkey : '',
|
||||||
vuex_StationShow:lifeData.vuex_StationShow ? lifeData.vuex_StationShow : [0,0,0],
|
vuex_StationShow:lifeData.vuex_StationShow ? lifeData.vuex_StationShow : [0,0,0],
|
||||||
tabbar_current: 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: [
|
tabbarList: [
|
||||||
{
|
{
|
||||||
"icon": "warning",
|
"icon": "warning",
|
||||||
|
|||||||
@ -211,7 +211,6 @@ export default {
|
|||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
init() {
|
init() {
|
||||||
console.log(1111,this.list);
|
|
||||||
// 如果没有数据的时候多处报未定义
|
// 如果没有数据的时候多处报未定义
|
||||||
if (!this.list || this.list.length == 0){
|
if (!this.list || this.list.length == 0){
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user