wangxiao 3 роки тому
батько
коміт
3204ade577
1 змінених файлів з 17 додано та 3 видалено
  1. 17 3
      src/pages/Iot/devOps/nowAlert.vue

+ 17 - 3
src/pages/Iot/devOps/nowAlert.vue

@@ -13,6 +13,15 @@
         </a-select>
       </a-col>
     </a-row>
+    <a-alert
+    message="告警级别"
+    type="info"
+    show-icon
+  >
+  <template #description>
+    <div>NOTICE:提示级别,MINOR:次要级别,MAJOR:重要级别,EMERGENCY:紧急</div>
+  </template>
+  </a-alert>
     <a-table
       :columns="columns"
       :loading="state.loading"
@@ -20,8 +29,12 @@
       style="margin-top: 20px;"
       :pagination="queryParams"
       @change="changePage"
-    >
-    </a-table>
+    >  <template #bodyCell="{column, record}">
+        <template v-if="column.key === 'warnSeverity'" >
+          <a-tag color="red" >{{record.warnSeverity}}</a-tag>
+        </template>
+      </template>
+   </a-table>
   </a-card>
   </template>
 <script lang='ts' setup >
@@ -47,7 +60,8 @@ const columns = [
   },
   {
     title: '级别',
-    dataIndex: 'warnSeverity'
+    dataIndex: 'warnSeverity',
+    key: 'warnSeverity'
   },
   {
     title: '资源类型',