Browse Source

fix:修改页面错误

temp
zhaohy 3 months ago
parent
commit
12a9040ee5
  1. 49
      hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue
  2. 48
      hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue
  3. 1
      hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/status.vue

49
hx-ai-intelligent/src/view/alarmManagement/energyAlarm/status.vue

@ -140,30 +140,31 @@
.then((res) => {
if (res.msg === 'success') {
logList.value = res.data;
infoObject.value = { ...logList.value[0] };
infoObject.value.state = infoObject.value.state.value;
let colorMap = {
1: 'rgba(255, 188, 70, 1)',
2: 'rgba(67, 136, 251, 1)',
3: 'rgba(41, 196, 154, 1)',
4: 'rgba(243, 97, 99, 1)',
5: 'rgba(141, 150, 163, 1)',
};
let bgColorMap = {
1: 'rgba(255, 188, 70, 0.1)',
2: 'rgba(67, 136, 251, 0.1)',
3: 'rgba(41, 196, 154, 0.1)',
4: 'rgba(243, 97, 99, 0.1)',
5: 'rgba(141, 150, 163, 0.1)',
};
logList.value.forEach((item) => {
item.stateName = item.state.label;
item.color = colorMap[item.state.value];
item.bgColor = bgColorMap[item.state.value];
item.src = 'state-' + item.state.value;
});
console.log(logList.value);
config.value.dataSource = logList.value;
if (logList.value.length > 0) {
infoObject.value = { ...logList.value[0] };
infoObject.value.state = infoObject.value.state.value;
let colorMap = {
1: 'rgba(255, 188, 70, 1)',
2: 'rgba(67, 136, 251, 1)',
3: 'rgba(41, 196, 154, 1)',
4: 'rgba(243, 97, 99, 1)',
5: 'rgba(141, 150, 163, 1)',
};
let bgColorMap = {
1: 'rgba(255, 188, 70, 0.1)',
2: 'rgba(67, 136, 251, 0.1)',
3: 'rgba(41, 196, 154, 0.1)',
4: 'rgba(243, 97, 99, 0.1)',
5: 'rgba(141, 150, 163, 0.1)',
};
logList.value.forEach((item) => {
item.stateName = item.state.label;
item.color = colorMap[item.state.value];
item.bgColor = bgColorMap[item.state.value];
item.src = 'state-' + item.state.value;
});
config.value.dataSource = logList.value;
}
}
});
};

48
hx-ai-intelligent/src/view/alarmManagement/equipmentAlarm/status.vue

@ -147,29 +147,31 @@
.then((res) => {
if (res.msg === 'success') {
logList.value = res.data;
infoObject.value = { ...logList.value[0] };
infoObject.value.state = infoObject.value.state.value;
let colorMap = {
1: 'rgba(255, 188, 70, 1)',
2: 'rgba(67, 136, 251, 1)',
3: 'rgba(41, 196, 154, 1)',
4: 'rgba(243, 97, 99, 1)',
5: 'rgba(141, 150, 163, 1)',
};
let bgColorMap = {
1: 'rgba(255, 188, 70, 0.1)',
2: 'rgba(67, 136, 251, 0.1)',
3: 'rgba(41, 196, 154, 0.1)',
4: 'rgba(243, 97, 99, 0.1)',
5: 'rgba(141, 150, 163, 0.1)',
};
logList.value.forEach((item) => {
item.stateName = item.state.label;
item.color = colorMap[item.state.value];
item.bgColor = bgColorMap[item.state.value];
item.src = 'state-' + item.state.value;
});
config.value.dataSource = logList.value;
if (logList.value.length > 0) {
infoObject.value = { ...logList.value[0] };
infoObject.value.state = infoObject.value.state.value;
let colorMap = {
1: 'rgba(255, 188, 70, 1)',
2: 'rgba(67, 136, 251, 1)',
3: 'rgba(41, 196, 154, 1)',
4: 'rgba(243, 97, 99, 1)',
5: 'rgba(141, 150, 163, 1)',
};
let bgColorMap = {
1: 'rgba(255, 188, 70, 0.1)',
2: 'rgba(67, 136, 251, 0.1)',
3: 'rgba(41, 196, 154, 0.1)',
4: 'rgba(243, 97, 99, 0.1)',
5: 'rgba(141, 150, 163, 0.1)',
};
logList.value.forEach((item) => {
item.stateName = item.state.label;
item.color = colorMap[item.state.value];
item.bgColor = bgColorMap[item.state.value];
item.src = 'state-' + item.state.value;
});
config.value.dataSource = logList.value;
}
}
});
};

1
hx-ai-intelligent/src/view/alarmManagement/gatewayAlarm/status.vue

@ -49,7 +49,6 @@
visible.value = false;
};
const toggle = async (data) => {
console.log(data, 'xxxxxx');
let states = await getEnum({ params: { enumType: 'AlarmLogStateEnum' } });
stateOptions.value = states.data;
let stateMap = {

Loading…
Cancel
Save