动环接口调整
This commit is contained in:
@@ -109,6 +109,8 @@
|
||||
<a
|
||||
:class="['detail-link', row.hasAlarm ? 'detail-alarm' : 'detail-normal']"
|
||||
@click="handleViewDetail(row)"
|
||||
:href="'http://10.0.64.20/configcenter/console/device-manage'"
|
||||
target="_blank"
|
||||
>
|
||||
<span v-if="row.hasAlarm" class="alarm-badge">异常</span>
|
||||
<span v-else class="normal-badge">正常</span>
|
||||
@@ -440,8 +442,10 @@ const fetchTotalDevices = async () => {
|
||||
pageSize: 10
|
||||
};
|
||||
const response = await getPowerEnvDeviceTotalNum(params);
|
||||
if (response.code === 0 && response.data?.records?.length > 0) {
|
||||
const total = parseInt(response.data.records[0].total || '0', 10);
|
||||
debugger
|
||||
if (response.records?.length > 0) {
|
||||
debugger
|
||||
const total = parseInt(response.records[0].total || '0', 10);
|
||||
totalDevices.value = total;
|
||||
onlineDevices.value = total; // 在线设备数也用total
|
||||
}
|
||||
@@ -522,11 +526,12 @@ const fetchParkList = async () => {
|
||||
pageSize: parkListPage.value.pageSize
|
||||
};
|
||||
const response = await getPowerEnvDeviceGroupTypeCampus(params);
|
||||
if (response.code === 0 && response.data) {
|
||||
parkListPage.value.total = response.data.total || 0;
|
||||
debugger
|
||||
if (response.records?.length>0) {
|
||||
parkListPage.value.total = response.records?.length || 0;
|
||||
|
||||
if (response.data.records && response.data.records.length > 0) {
|
||||
parkList.value = response.data.records.map((item: any) => {
|
||||
if (response.records && response.records.length > 0) {
|
||||
parkList.value = response.records.map((item: any) => {
|
||||
const upsCount = parseInt(item.ups || '0', 10);
|
||||
const jmktCount = parseInt(item.jmkt || '0', 10);
|
||||
const wsdCount = parseInt(item.wsd || '0', 10);
|
||||
|
||||
Reference in New Issue
Block a user