修改显示

main
陈博文 4 days ago
parent 7436647b00
commit eb8a914eb6

@ -41,19 +41,21 @@
</div> </div>
</block-box> </block-box>
<block-box v-for="{ title, data } in lineConfig" :key="title" :title="title"> <template v-for="({ title, data }, index) in lineConfig">
<template #extra v-if="detail.type && detail.type.startsWith('NVIDIA')"> <block-box v-if="detail.deviceIds?.length || [2, 3].includes(index)" :key="title + index" :title="title">
<time-picker v-model="times" type="datetimerange" size="small" /> <template #extra v-if="detail.type && detail.type.startsWith('NVIDIA')">
</template> <time-picker v-model="times" type="datetimerange" size="small" />
<div style="height: 200px">
<template v-if="detail.type && !detail.type.startsWith('NVIDIA')">
<el-empty description="该设备厂商暂不支持任务维度监控" :image-size="60" />
</template> </template>
<template v-else> <div style="height: 200px">
<echarts-plus :options="getLineOptions({ data })" /> <template v-if="detail.type && !detail.type.startsWith('NVIDIA')">
</template> <el-empty description="该设备厂商暂不支持任务维度监控" :image-size="60" />
</div> </template>
</block-box> <template v-else>
<echarts-plus :options="getLineOptions({ data })" />
</template>
</div>
</block-box>
</template>
</template> </template>
<script setup lang="jsx"> <script setup lang="jsx">
@ -298,9 +300,9 @@ onMounted(async () => {
if (foundCard) { if (foundCard) {
detail.value.type = foundCard.type; detail.value.type = foundCard.type;
} }
if (!detail.value.deviceIds?.length) { // if (!detail.value.deviceIds?.length) {
lineConfig.value.splice(0, 2); // lineConfig.value.splice(0, 2);
} // }
// const start = new Date(); // const start = new Date();
// start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); // start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);

Loading…
Cancel
Save