From 1c328d7233aaa6ea48fbdfb73b415eb9837956a6 Mon Sep 17 00:00:00 2001 From: zhouwenxuan <1175765986@qq.com> Date: 星期五, 11 八月 2023 10:20:08 +0800 Subject: [PATCH] 预警管理、基础信息管理页面 --- src/views/warningManage/warningSet/index.vue | 46 ++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 40 insertions(+), 6 deletions(-) diff --git a/src/views/warningManage/warningSet/index.vue b/src/views/warningManage/warningSet/index.vue index d98ff85..e7eae42 100644 --- a/src/views/warningManage/warningSet/index.vue +++ b/src/views/warningManage/warningSet/index.vue @@ -1,15 +1,49 @@ <template> - <div> - 预警设置 - </div> + <div class="system-warning-container"> + <el-card shadow="hover"> + <el-table :data="state.tableData.data" style="width: 100%"> + <el-table-column align="center" prop="name" label="预警名称"/> + <el-table-column align="center" prop="points" label="连续超过阈值点数"/> + <el-table-column label="操作" show-overflow-tooltip width="140"> + <template #default="scope"> + <el-button size="small" text type="primary" @click="openDialog('查看', scope.row)">查看</el-button> + <el-button size="small" text type="primary" @click="openDialog('修改', scope.row)">修改</el-button> + </template> + </el-table-column> + </el-table> + </el-card> + <set-dialog ref="setRef" @getSetData=initSetData></set-dialog> + </div> </template> <script setup lang="ts"> +import {reactive, ref} from "vue"; +import { TableDataState } from "/@/types/warning"; +import setDialog from "./component/setDialog.vue"; +const setRef = ref(); +const state = reactive<TableDataState>({ + tableData: { + data: [ + { + name: '黄色预警', + points: 1 + }, + { + name: '红色预警', + points: 2 + }, + ] + } +}); + +const initSetData = () => { + console.log("数据列表") +}; +const openDialog = (type: string, value: any) => { + setRef.value.openDialog(type, value); +}; </script> - - - <style scoped lang="scss"> </style> \ No newline at end of file -- Gitblit v1.9.2