mirror of
https://gitee.com/js-yhsec/energy_storage.git
synced 2026-05-28 03:09:24 +08:00
场站+服务管理功能开发,角色权限完善,总览弹窗接口联调
This commit is contained in:
@@ -30,9 +30,29 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
coolingList: [
|
||||
{
|
||||
label: '关机',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '开机',
|
||||
value: '1'
|
||||
}
|
||||
],
|
||||
aircList: [
|
||||
{
|
||||
label: '关机',
|
||||
value: '0'
|
||||
},
|
||||
{
|
||||
label: '开机',
|
||||
value: '1'
|
||||
}
|
||||
],
|
||||
list: [
|
||||
{
|
||||
key: 'key1',
|
||||
key: 'coolingStatus',
|
||||
value: '制冷',
|
||||
d: '',
|
||||
label: '冷机',
|
||||
@@ -41,7 +61,7 @@ export default {
|
||||
color: '#F69B52'
|
||||
},
|
||||
{
|
||||
key: 'key2',
|
||||
key: 'aircStatus',
|
||||
value: '开机',
|
||||
d: '',
|
||||
label: '空调',
|
||||
@@ -50,7 +70,7 @@ export default {
|
||||
color: '#9BD801'
|
||||
},
|
||||
{
|
||||
key: 'key3',
|
||||
key: 'envTemp',
|
||||
value: 24,
|
||||
d: '℃',
|
||||
label: '环境温度',
|
||||
@@ -59,7 +79,7 @@ export default {
|
||||
color: '#3DFEFA'
|
||||
},
|
||||
{
|
||||
key: 'key4',
|
||||
key: 'envhum',
|
||||
value: 26,
|
||||
d: '%',
|
||||
label: '环境湿度',
|
||||
@@ -70,20 +90,27 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
leftList() {
|
||||
return this.list.filter((_, index) => index % 2 === 0).slice(0, 3) // 左列取前3个偶数索引
|
||||
},
|
||||
rightList() {
|
||||
return this.list.filter((_, index) => index % 2 !== 0).slice(0, 3) // 右列取前3个奇数索引
|
||||
}
|
||||
},
|
||||
|
||||
watch: {
|
||||
propsTotal: {
|
||||
handler(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.list.forEach((item) => {
|
||||
item.value = this.propsTotal[item.key]
|
||||
console.log(this.propsTotal,this.propsTotal[item.key],"this.propsTotal[item.key]")
|
||||
if (item.key == 'coolingStatus') {
|
||||
console.log(this.coolingList.find(
|
||||
(e) => e.value == this.propsTotal[item.key]
|
||||
))
|
||||
item.value = this.coolingList.find(
|
||||
(e) => e.value == this.propsTotal[item.key]
|
||||
).label
|
||||
} else if (item.key == 'aircStatus') {
|
||||
item.value = this.aircList.map(
|
||||
(e) => e.value == this.propsTotal[item.key]
|
||||
).label
|
||||
} else {
|
||||
item.value = this.propsTotal[item.key]
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,24 +29,24 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
list: [
|
||||
// {
|
||||
// key: 'tianshu',
|
||||
// value: 26,
|
||||
// d: '℃',
|
||||
// label: '舱内温度',
|
||||
// class: 'item-1',
|
||||
// iconPath: require('@/assets/home/wendu.png')
|
||||
// },
|
||||
// {
|
||||
// key: 'shouyi',
|
||||
// value: 25,
|
||||
// d: '%',
|
||||
// label: '舱内湿度',
|
||||
// class: 'item-2',
|
||||
// iconPath: require('@/assets/home/shidu.png')
|
||||
// },
|
||||
{
|
||||
key: 'tianshu',
|
||||
value: 26,
|
||||
d: '℃',
|
||||
label: '舱内温度',
|
||||
class: 'item-1',
|
||||
iconPath: require('@/assets/home/wendu.png')
|
||||
},
|
||||
{
|
||||
key: 'shouyi',
|
||||
value: 25,
|
||||
d: '%',
|
||||
label: '舱内湿度',
|
||||
class: 'item-2',
|
||||
iconPath: require('@/assets/home/shidu.png')
|
||||
},
|
||||
{
|
||||
key: 'shuliang',
|
||||
key: 'voltage',
|
||||
value: 24,
|
||||
d: 'V',
|
||||
label: '电压',
|
||||
@@ -54,7 +54,7 @@ export default {
|
||||
iconPath: require('@/assets/home/dianya.png')
|
||||
},
|
||||
{
|
||||
key: 'shuliang',
|
||||
key: 'current',
|
||||
value: 26,
|
||||
d: 'A',
|
||||
label: '电流',
|
||||
@@ -62,7 +62,7 @@ export default {
|
||||
iconPath: require('@/assets/home/dianliu.png')
|
||||
},
|
||||
{
|
||||
key: 'fadianliang',
|
||||
key: 'power',
|
||||
value: 20,
|
||||
d: 'w',
|
||||
label: '功率',
|
||||
@@ -70,7 +70,7 @@ export default {
|
||||
iconPath: require('@/assets/home/gonglv.png')
|
||||
},
|
||||
{
|
||||
key: 'rongliang',
|
||||
key: 'powerFactor',
|
||||
value: 100,
|
||||
d: '',
|
||||
label: '功率因数',
|
||||
@@ -81,12 +81,7 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
leftList() {
|
||||
return this.list.filter((_, index) => index % 2 === 0).slice(0, 3) // 左列取前3个偶数索引
|
||||
},
|
||||
rightList() {
|
||||
return this.list.filter((_, index) => index % 2 !== 0).slice(0, 3) // 右列取前3个奇数索引
|
||||
}
|
||||
|
||||
},
|
||||
watch: {
|
||||
propsTotal: {
|
||||
|
||||
Reference in New Issue
Block a user