Преглед на файлове

六统一统一资源监控可视化隐藏

hm преди 2 месеца
родител
ревизия
8f18877326

+ 1 - 0
package.json

@@ -36,6 +36,7 @@
     "url": "https://gitee.com/y_project/RuoYi-Vue.git"
   },
   "dependencies": {
+    "@antv/g6": "^5.0.42",
     "@riophae/vue-treeselect": "0.4.0",
     "axios": "0.24.0",
     "clipboard": "2.0.8",

+ 3 - 0
src/views/index.vue

@@ -136,8 +136,11 @@ export default {
 }
 
 .page-container-left {
+  height: calc(100vh - 94px);
   width: 75%;
   padding: 20px 40px;
+  overflow-y: auto;
+  overflow-x: hidden;
 
   .module_header {
     //  max-width: 600px;

+ 396 - 415
src/views/unified-resources/link-monitor/alarm-warning-config/index.vue

@@ -1,55 +1,71 @@
 <template>
+  <el-container>
+    <el-header height="50px" class="content-header">
+      <MyHeader
+        :title="'告警预警配置'"
+        :formData="headerFormData"
+        @submit="handleHeaderFormSubmit"
+      ></MyHeader>
+    </el-header>
     <el-container>
-      <el-header height="50px" class="content-header">
-        <MyHeader :title="'告警预警配置'" :formData="headerFormData" @submit="handleHeaderFormSubmit"></MyHeader>
-      </el-header>
-      <el-container>
-        <el-main>
-          <MyTableHeader
-            :title="tableHeaderTitle"
-            :tabs="tabs"
-            :buttons="buttons"
-            @tabClick="handleTabClick"
-            @buttonClick="handleButtonClick"
-          ></MyTableHeader>
-  
-          <MyTable
-            :tableData="tableData"
-            :formData="formData"
-            :minWidth="340"
-            ref="myTableRef"
-            @selection-change="handleSelectionChange"
-          >
-            <!-- 自定义操作按钮,传递 row 和 index -->
-            <template #operation="{ row, index }">
-              <el-button size="mini" @click="handleView(row, 'view')" type="primary">查看</el-button>
-              <el-button size="mini" @click="handleEdit(row, 'edit')" type="primary">编辑</el-button>
-              <el-button
-                v-if="row.status === 0"
-                size="mini"
-                @click="handleStart(row, index)"
-                type="primary"
-              >启用</el-button>
-              <el-button
-                v-if="row.status === 1"
-                size="mini"
-                @click="handleStop(row, index)"
-                type="primary"
-              >停用</el-button>
-              <el-button size="mini" @click="handleDelete(row)" type="primary">删除</el-button>
-            </template>
-          </MyTable>
-          <MyPagination
-            :total="tableTotal"
-            :page-size="pageSize"
-            :current-page="currentPage"
-            @pageChange="pagi_changePage"
-            @sizeChange="pagi_changeSize"
-          ></MyPagination>
-        </el-main>
-      </el-container>
-  
-      <!-- <div v-if="showDialog">
+      <el-main>
+        <MyTableHeader
+          :title="tableHeaderTitle"
+          :tabs="tabs"
+          :buttons="buttons"
+          @tabClick="handleTabClick"
+          @buttonClick="handleButtonClick"
+        ></MyTableHeader>
+
+        <MyTable
+          :tableData="tableData"
+          :formData="formData"
+          :minWidth="340"
+          ref="myTableRef"
+          @selection-change="handleSelectionChange"
+        >
+          <!-- 自定义操作按钮,传递 row 和 index -->
+          <template #operation="{ row, index }">
+            <el-button
+              size="mini"
+              @click="handleView(row, 'view')"
+              type="primary"
+              >查看</el-button
+            >
+           
+            <el-button
+              v-if="row.status === 0"
+              size="mini"
+              @click="handleStart(row, index)"
+              type="primary"
+              >启用</el-button
+            >
+            <el-button
+              v-if="row.status === 1"
+              size="mini"
+              @click="handleStop(row, index)"
+              type="primary"
+              >停用</el-button
+            >
+            <el-button
+              size="mini"
+              @click="handleEdit(row, 'edit')"
+              type="primary"
+              >设置</el-button
+            >
+          </template>
+        </MyTable>
+        <MyPagination
+          :total="tableTotal"
+          :page-size="pageSize"
+          :current-page="currentPage"
+          @pageChange="pagi_changePage"
+          @sizeChange="pagi_changeSize"
+        ></MyPagination>
+      </el-main>
+    </el-container>
+
+    <!-- <div v-if="showDialog">
           <ConfigDialog
             v-model="showDialog"
             :title="title"
@@ -57,381 +73,346 @@
             @confirm="getList"
           ></ConfigDialog>
       </div>-->
-    </el-container>
-  </template>
-  <script>
-  import {
-      getTabAccessConfigList,
-      addTabAccessConfig,
-      updateTabAccessConfigById,
-      viewTabAccessConfigById,
-      delTabAccessConfigById,
-      exportTabAccessConfig,
-  } from "@/api/unified-access/access-config";
-  import MyHeader from "@/components/MyHeader";
-  import MyTable from "@/components/MyTable";
-  import MyPagination from "@/components/MyPagination";
-  import MyTableHeader from "@/components/MyTableHeader";
-  //  import ConfigDialog from "./dialog/ConfigDialog.vue"
-    export default {
-      name: "access-config",
-      components: {
-          MyHeader,
-          MyTableHeader,
-          MyTable,
-          MyPagination,
-      //   ConfigDialog, 
-      },
+  </el-container>
+</template>
+<script>
+import {
+  getTabAccessConfigList,
+  addTabAccessConfig,
+  updateTabAccessConfigById,
+  viewTabAccessConfigById,
+  delTabAccessConfigById,
+  exportTabAccessConfig,
+} from "@/api/unified-access/access-config";
+import MyHeader from "@/components/MyHeader";
+import MyTable from "@/components/MyTable";
+import MyPagination from "@/components/MyPagination";
+import MyTableHeader from "@/components/MyTableHeader";
+//  import ConfigDialog from "./dialog/ConfigDialog.vue"
+export default {
+  name: "access-config",
+  components: {
+    MyHeader,
+    MyTableHeader,
+    MyTable,
+    MyPagination,
+    //   ConfigDialog,
+  },
   data() {
-      return {
-          showDialog: false,
-          title: "新增",
-          rowObj: {},
-          type: "add",
-          tableData: [],
-          formData: [
-              {
-                  label: "接入方式",
-                  fieldName: "dataManner",
-                  type: "input",
-                  showInTable: true,
-                  value: "",
-                  width: "",
-              },
-              {
-                  label: "网关IP",
-                  fieldName: "gatewayIp",
-                  type: "input",
-                  showInTable: true,
-                  value: "",
-                  width: "",
-              },
-              {
-                  label: "网关端口",
-                  fieldName: "gatewayPort",
-                  type: "input",
-                  showInTable: true,
-                  value: "",
-                  width: "",
-              },
-              {
-                  label: "六统一IP",
-                  fieldName: "sixIp",
-                  type: "input",
-                  showInTable: true,
-                  value: "",
-                  width: "",
-              },
-              {
-                  label: "六统一端口",
-                  fieldName: "sixPort",
-                  type: "input",
-                  showInTable: true,
-                  value: "",
-                  width: "",
-              },
-              {
-                  label: "数据源所属信息系统",
-                  fieldName: "offerSystem",
-                  type: "input",
-                  showInTable: true,
-                  value: "",
-                  width: "",
-              },
-  
-              {
-                  label: "接收方所属信息系统",
-                  fieldName: "receptionSystem",
-                  type: "input",
-                  showInTable: true,
-                  value: "",
-                  width: "",
-              },
-              {
-                  label: "数据项目",
-                  fieldName: "dataDetail",
-                  type: "input",
-                  showInTable: true,
-                  value: "",
-                  width: "",
-              },
-              {
-                  label: "拟正式运行时间",
-                  fieldName: "runTime",
-                  type: "input",
-                  showInTable: true,
-                  value: "",
-                  width: "",
-              },
-  
-              {
-                  label: "状态",
-                  fieldName: "status",
-                  type: "input",
-                  showInTable: true,
-                  value: "",
-                  width: "",
-              },
-          ],
-          tableTotal: 0,
-          pageSize: 10,
-          currentPage: 1,
-          selectedRows: [], // 存储选中的行数据
-          searchForm: {},
-          treeSearchVal: "",
-          tableHeaderTitle: "项目列表",
-          tabs: [],
-          buttons: [
-              {
-                  label: "新增",
-                  type: "primary",
-                  methodName: "action1",
-                  icon: "el-icon-circle-plus",
-              },
-              {
-                  label: "导出",
-                  type: "primary",
-                  methodName: "action2",
-                  icon: "el-icon-upload",
-              },
+    return {
+      showDialog: false,
+      title: "新增",
+      rowObj: {},
+      type: "add",
+      tableData: [],
+      formData: [
+        {
+          label: "告警名称",
+          fieldName: "dataManner",
+          type: "input",
+          showInTable: true,
+          value: "",
+          width: "",
+        },
+        {
+          label: "报警项",
+          fieldName: "gatewayIp",
+          type: "input",
+          showInTable: true,
+          value: "",
+          width: "",
+        },
+        {
+          label: "指标值",
+          fieldName: "gatewayPort",
+          type: "input",
+          showInTable: true,
+          value: "",
+          width: "",
+        },
+        {
+          label: "创建时间",
+          fieldName: "sixIp",
+          type: "input",
+          showInTable: true,
+          value: "",
+          width: "",
+        },
+        {
+          label: "备注",
+          fieldName: "sixPort",
+          type: "input",
+          showInTable: true,
+          value: "",
+          width: "",
+        },
+   
+      ],
+      tableTotal: 0,
+      pageSize: 10,
+      currentPage: 1,
+      selectedRows: [], // 存储选中的行数据
+      searchForm: {},
+      treeSearchVal: "",
+      tableHeaderTitle: "项目列表",
+      tabs: [],
+      buttons: [
+        {
+          label: "启用",
+          type: "primary",
+          methodName: "action1",
+          icon: "el-icon-circle-plus",
+        },
+        {
+          label: "停用",
+          type: "primary",
+          methodName: "action2",
+          icon: "el-icon-circle-plus",
+        },
+        {
+          label: "导出",
+          type: "primary",
+          methodName: "action3",
+          icon: "el-icon-upload",
+        },
+      ],
+
+      headerFormData: [
+        {
+          label: "告警名称",
+          fieldName: "dataManner",
+          type: "input",
+          value: "",
+          placeholder: "请输入告警名称",
+          // isRequired: true,
+        },
+        {
+          fieldName: "status",
+          label: "状态",
+          type: "select",
+          trigger: "change",
+          value: "",
+          isRequired: false,
+          options: [
+            { value: 1, label: "正常" },
+            { value: 0, label: "停用" },
           ],
-  
-          headerFormData: [
-              {
-                  label: "接入方式",
-                  fieldName: "dataManner",
-                  type: "input",
-                  value: "",
-                  placeholder: "请输入接入方式",
-                  // isRequired: true,
-              },
-              {
-                  fieldName: "status",
-                  label: "状态",
-                  type: "select",
-                  trigger: "change",
-                  value: "",
-                  isRequired: false,
-                  options: [
-                      { value: 1, label: "正常" },
-                      { value: 0, label: "停用" },
-                  ],
-              },
-              // {
-              //   label: "用户状态",
-              //   fieldName: "gender",
-              //   type: "select",
-              //   value: "",
-              //   placeholder: "请选择用户状态",
-              //   isRequired: true,
-              //   options: [
-              //     { label: "男", value: "male" },
-              //     { label: "女", value: "female" },
-              //   ],
-              // },
-              // {
-              //   label: "生日",
-              //   fieldName: "birthdate",
-              //   type: "date",
-              //   value: "",
-              //   placeholder: "请选择生日",
-              //   isRequired: false,
-              // },
-          ],
-      };
+        },
+        // {
+        //   label: "用户状态",
+        //   fieldName: "gender",
+        //   type: "select",
+        //   value: "",
+        //   placeholder: "请选择用户状态",
+        //   isRequired: true,
+        //   options: [
+        //     { label: "男", value: "male" },
+        //     { label: "女", value: "female" },
+        //   ],
+        // },
+        // {
+        //   label: "生日",
+        //   fieldName: "birthdate",
+        //   type: "date",
+        //   value: "",
+        //   placeholder: "请选择生日",
+        //   isRequired: false,
+        // },
+      ],
+    };
   },
-  
+
   methods: {
-      // 头部搜索框
-      handleHeaderFormSubmit(form) {
-          this.searchForm = form;
-          this.getList();
-      },
-      // 树结构点击
-      handleNodeClick() { },
-      // 列表头部
-      handleTabClick(tab) {
-          this.tabs.forEach((item) => {
-              if (item.label === tab.label) {
-                  item.active = true;
-              } else {
-                  item.active = false;
-              }
-          });
-      },
-      // 列表头部功能按钮
-      handleButtonClick(methodName) {
-          console.log(methodName, "methodName");
-  
-          switch (methodName) {
-              case "action1":
-                  // 新增
-                  this.rowObj = {};
-                  this.title = "新增";
-                  this.showDialog = true;
-                  break;
-              case "action2":
-                  // 导出
-                  if (this.selectedRows.length > 0) {
-                      // exportTabAccessConfig().then((res) => {
-                      //   if (+res.code === 200) {
-                      //   }
-                      // });
-                      let ids = [];
-                      ids = this.selectedRows.map((item) => item.id);
-                      this.download(
-                          "/web/tab-access-config/export",
-                          {
-                              ids,
-                          },
-                          `统一接入配置_${new Date().getTime()}.xlsx`
-                      );
-                  } else {
-                      this.$confirm("请选择列表项?", "提示", {
-                          confirmButtonText: "关闭",
-                          cancelButtonText: "取消",
-                          showCancelButton: false,
-                          showConfirmButton: false,
-                          type: "warning",
-                          center: true,
-                      })
-                          .then(() => { })
-                          .catch(() => { });
-                  }
-                  break;
-  
-              default:
-                  break;
+    // 头部搜索框
+    handleHeaderFormSubmit(form) {
+      this.searchForm = form;
+      this.getList();
+    },
+    // 树结构点击
+    handleNodeClick() {},
+    // 列表头部
+    handleTabClick(tab) {
+      this.tabs.forEach((item) => {
+        if (item.label === tab.label) {
+          item.active = true;
+        } else {
+          item.active = false;
+        }
+      });
+    },
+    // 列表头部功能按钮
+    handleButtonClick(methodName) {
+      console.log(methodName, "methodName");
+
+      switch (methodName) {
+        case "action1":
+          // 新增
+          this.rowObj = {};
+          this.title = "新增";
+          this.showDialog = true;
+          break;
+        case "action2":
+          // 导出
+          if (this.selectedRows.length > 0) {
+            // exportTabAccessConfig().then((res) => {
+            //   if (+res.code === 200) {
+            //   }
+            // });
+            let ids = [];
+            ids = this.selectedRows.map((item) => item.id);
+            this.download(
+              "/web/tab-access-config/export",
+              {
+                ids,
+              },
+              `统一接入配置_${new Date().getTime()}.xlsx`
+            );
+          } else {
+            this.$confirm("请选择列表项?", "提示", {
+              confirmButtonText: "关闭",
+              cancelButtonText: "取消",
+              showCancelButton: false,
+              showConfirmButton: false,
+              type: "warning",
+              center: true,
+            })
+              .then(() => {})
+              .catch(() => {});
           }
-      },
-      // 处理选中项变化
-      handleSelectionChange(selectedRows) {
-          this.selectedRows = selectedRows; // 获取选中的行
-      },
-  
-      getList() {
-          getTabAccessConfigList({
-              pageNum: this.currentPage,
-              pageSize: this.pageSize,
-              ...this.searchForm,
-          }).then((res) => {
-              if (+res.code === 200) {
-                  this.tableData = res.rows;
-                  this.tableTotal = +res.total;
-              }
+          break;
+
+        default:
+          break;
+      }
+    },
+    // 处理选中项变化
+    handleSelectionChange(selectedRows) {
+      this.selectedRows = selectedRows; // 获取选中的行
+    },
+
+    getList() {
+      getTabAccessConfigList({
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        ...this.searchForm,
+      }).then((res) => {
+        if (+res.code === 200) {
+          this.tableData = res.rows;
+          this.tableTotal = +res.total;
+        }
+      });
+    },
+    // 列表分页
+    pagi_changePage(page) {
+      this.currentPage = page;
+      this.getList();
+    },
+    pagi_changeSize(size) {
+      this.pageSize = size;
+      this.getList();
+    },
+
+    // 弹窗
+    handleConfirm() {
+      this.dialogVisible = true;
+    },
+    handleClose() {
+      this.dialogVisible = false;
+    },
+
+    // 编辑
+    handleView(row) {
+      this.rowObj = row;
+      this.title = "查看";
+      this.showDialog = true;
+    },
+    handleEdit(row) {
+      console.log(row, "row");
+      this.rowObj = row;
+      this.title = "编辑";
+      this.showDialog = true;
+    },
+
+    beforeClose() {
+      this.showDialog = false;
+    },
+
+    handleStart(row) {
+      let pForm = {};
+      pForm = { ...row };
+      pForm.status = 1;
+      updateTabAccessConfigById({ ...pForm }).then((res) => {
+        if (+res.code === 200) {
+          this.$message({
+            message: res.msg,
+            type: "success",
           });
-      },
-      // 列表分页
-      pagi_changePage(page) {
-          this.currentPage = page;
           this.getList();
-      },
-      pagi_changeSize(size) {
-          this.pageSize = size;
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    handleStop(row) {
+      let pForm = {};
+      pForm = { ...row };
+      pForm.status = 0;
+      updateTabAccessConfigById({ ...pForm }).then((res) => {
+        if (+res.code === 200) {
+          this.$message({
+            message: res.msg,
+            type: "success",
+          });
           this.getList();
-      },
-  
-      // 弹窗
-      handleConfirm() {
-          this.dialogVisible = true;
-      },
-      handleClose() {
-          this.dialogVisible = false;
-      },
-  
-      // 编辑
-      handleView(row) {
-          this.rowObj = row;
-          this.title = "查看";
-          this.showDialog = true;
-      },
-      handleEdit(row) {
-          console.log(row, "row");
-          this.rowObj = row;
-          this.title = "编辑";
-          this.showDialog = true;
-      },
-  
-      beforeClose() {
-          this.showDialog = false;
-      },
-  
-      handleStart(row) {
-          let pForm = {};
-          pForm = { ...row };
-          pForm.status = 1;
-          updateTabAccessConfigById({ ...pForm }).then((res) => {
-              if (+res.code === 200) {
-                  this.$message({
-                      message: res.msg,
-                      type: "success",
-                  });
-                  this.getList();
-              } else {
-                  this.$message.error(res.msg);
-              }
+        } else {
+          this.$message.error(res.msg);
+        }
+      });
+    },
+    handleDelete(row) {
+      this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        center: true,
+        type: "warning",
+      })
+        .then(() => {
+          delTabAccessConfigById(row.id).then((res) => {
+            if (+res.code === 200) {
+              this.$message({
+                message: res.msg,
+                type: "success",
+              });
+              this.getList();
+            } else {
+              this.$message.error(res.msg);
+            }
           });
-      },
-      handleStop(row) {
-          let pForm = {};
-          pForm = { ...row };
-          pForm.status = 0;
-          updateTabAccessConfigById({ ...pForm }).then((res) => {
-              if (+res.code === 200) {
-                  this.$message({
-                      message: res.msg,
-                      type: "success",
-                  });
-                  this.getList();
-              } else {
-                  this.$message.error(res.msg);
-              }
+        })
+        .catch(() => {
+          this.$message({
+            type: "info",
+            message: "已取消删除",
           });
-      },
-      handleDelete(row) {
-          this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
-              confirmButtonText: "确定",
-              cancelButtonText: "取消",
-              center: true,
-              type: "warning",
-          })
-              .then(() => {
-                  delTabAccessConfigById(row.id).then((res) => {
-                      if (+res.code === 200) {
-                          this.$message({
-                              message: res.msg,
-                              type: "success",
-                          });
-                          this.getList();
-                      } else {
-                          this.$message.error(res.msg);
-                      }
-                  });
-              })
-              .catch(() => {
-                  this.$message({
-                      type: "info",
-                      message: "已取消删除",
-                  });
-              });
-          console.log(row, "row");
-      },
+        });
+      console.log(row, "row");
+    },
   },
-  created() { },
+  created() {},
   mounted() {
-      console.log("接入配置");
-      this.getList();
+    console.log("接入配置");
+    this.getList();
   },
-    };
-  </script>
-  <style lang="scss" scoped>
-  .el-main {
-    padding: 0 20px;
-  }
-  
-  .el-icon-search {
-    font-size: 16px;
-    font-weight: 700;
-    color: #1e80e0;
-  }
-  </style>
+};
+</script>
+<style lang="scss" scoped>
+.el-main {
+  padding: 0 20px;
+}
+
+.el-icon-search {
+  font-size: 16px;
+  font-weight: 700;
+  color: #1e80e0;
+}
+</style>

+ 2 - 1
src/views/unified-resources/link-monitor/link-monitor-center/index.vue

@@ -344,7 +344,8 @@ export default {
           }
 
           if (item.value === 8) {
-            this.$router.push();
+            this.$router.push('/resources/linkMonitor/visualMonitor')
+
           }
         } else {
           item.active = false;