Quellcode durchsuchen

侧边栏折叠;页面适应修改;

chuwuya vor 2 Jahren
Ursprung
Commit
649f3055b1

+ 36 - 0
src/api/data/basicInfo.js

@@ -0,0 +1,36 @@
+import { get, post, put } from "@/utils/requestMethod";
+
+/**
+ * 获取楼宇列表
+ * @param {*} page
+ * @param {*} page_size
+ * @param {*} template_type
+ * @param {*} template_name
+ * @param {*} template_format
+ * @returns
+ */
+const getBuildingList = () => {
+  return get(`/data/building_list`);
+};
+
+
+/**
+ * 获取底层系统
+ * @param {*} page
+ * @param {*} page_size
+ * @returns
+ */
+const getUnderlyingSystem = () => {
+    return get(`/data/underlying_system`);
+  };
+
+  /**
+ * 添加底层系统
+ * @param {*} picture
+ * @returns
+ */
+const addUnderlyingSystem = (picture) => {
+    let params = new FormData();
+    return post(`/data/underlying_system`,params);
+  };
+  

+ 5 - 5
src/api/data/template.js

@@ -5,7 +5,7 @@ import { get, post, put } from "@/utils/requestMethod";
  * @param {*} page
  * @param {*} page_size
  * @param {*} template_type
- * @param {*} templat_name
+ * @param {*} template_name
  * @param {*} template_format
  * @returns
  */
@@ -13,7 +13,7 @@ const getTableTemplateList = (
   page,
   page_size = 10,
   template_type = 0,
-  templat_name = "",
+  template_name = "",
   template_format = ""
 ) => {
   return get(`/data/template_list?page=${page}&page_size=${page_size}&template_type=${template_type}&templat_name=${templat_name}&template_format=${template_format}`);
@@ -51,7 +51,7 @@ const addReportTemplate = (options) =>{
  * @param {*} page
  * @param {*} page_size
  * @param {*} template_type
- * @param {*} templat_name
+ * @param {*} template_name
  * @param {*} template_format
  * @returns
  */
@@ -59,12 +59,12 @@ const getReportTemplateList = (
   page,
   page_size = 10,
   template_type = 1,
-  templat_name = "",
+  template_name = "",
   template_format = "",
   report_type = ""
 ) => {
   return get(
-    `/data/template_list?page=${page}&page_size=${page_size}&template_type=${template_type}&templat_name=${templat_name}&template_format=${template_format}&report_type=${report_type}`
+    `/data/template_list?page=${page}&page_size=${page_size}&template_type=${template_type}&template_name=${template_name}&template_format=${template_format}&report_type=${report_type}`
   );
 };
 

+ 62 - 69
src/layout/Sidebar.vue

@@ -14,13 +14,20 @@
           <el-image :src="menu.url"></el-image>
           <span>{{ menu.name }}</span>
         </template>
-        <el-menu-item-group v-for="(submenu, index2) in menu.submenus" :key="index2">
+        <el-menu-item-group
+          v-for="(submenu, index2) in menu.submenus"
+          :key="index2"
+        >
           <el-menu-item :index="submenu.path">
             <span class="subMenu" style="margin-left:40px">{{ submenu.name }}</span>
           </el-menu-item>
         </el-menu-item-group>
       </el-submenu>
-      <el-menu-item v-if="menu.submenus == null" :key="menu.path" :index="menu.path">
+      <el-menu-item
+        v-if="menu.submenus == null"
+        :key="menu.path"
+        :index="menu.path"
+      >
         <el-image :src="menu.url"></el-image>
         <span slot="title">
           {{ menu.name }}
@@ -39,23 +46,23 @@ export default {
     return {
       menus: [
         {
-          url: require('@/assets/images/userManagement@3x.png'),
-          name: '用户管理',
+          url: require("@/assets/images/userManagement@3x.png"),
+          name: "用户管理",
           submenus: [
             {
-              name: '人员管理',
-              path: '/home/user/person',
+              name: "人员管理",
+              path: "/home/user/person",
             },
             {
-              name: '组织管理',
-              path: '/home/user/group',
+              name: "组织管理",
+              path: "/home/user/group",
             },
-          ]
+          ],
         },
         {
-          url: require('@/assets/images/roleManagement@3x.png'),
-          name: '角色管理',
-          path: '/home/role',
+          url: require("@/assets/images/roleManagement@3x.png"),
+          name: "角色管理",
+          path: "/home/role",
         },
         {
           url: require('@/assets/images/systemConfiguration@3x.png'),
@@ -63,91 +70,77 @@ export default {
           path: '/home/system',
           submenus: [
             {
-              name: '策略配置',
-              path: '/home/system/strategy',
+              name: "策略配置",
+              path: "/home/system/strategy",
             },
             {
-              name: '消息配置',
-              path: '/home/system/message',
+              name: "消息配置",
+              path: "/home/system/message",
             },
             {
-              name: '信息配置',
-              path: '/home/system/info',
+              name: "信息配置",
+              path: "/home/system/info",
             },
             {
-              name: '指标配置',
-              path: '/home/system/index',
-            }
-          ]
-        },
-        {
-          url: require('@/assets/images/deviceManagement@3x.png'),
-          name: '设备管理',
-          path: '/home/device',
-          submenus: [
-            {
-              name: '设备配置',
-              path: '/home/device/config',
+              name: "指标配置",
+              path: "/home/system/index",
             },
-            {
-              name: '设备告警',
-              path: '/home/device/warning',
-            }
-          ]
+          ],
         },
         {
-          url: require('@/assets/images/dataManagement@3x.png'),
-          name: '数据管理',
-          path: '/home/data',
+          url: require("@/assets/images/deviceManagement@3x.png"),
+          name: "设备管理",
+          path: "/home/device",
           submenus: [
             {
-              name: '报表配置',
-              path: '/home/data/statement',
+              name: "设备配置",
+              path: "/home/device/config",
             },
             {
-              name: '报告配置',
-              path: '/home/data/report',
+              name: "设备告警",
+              path: "/home/device/warning",
             },
-            {
-              name: '基础信息',
-              path: '/home/data/basicInfo',
-            }
-          ]
+          ],
         },
         {
-          url: require('@/assets/images/serviceManagement@3x.png'),
-          name: '服务管理',
-          path: '/home/service',
+          url: require("@/assets/images/dataManagement@3x.png"),
+          name: "数据管理",
+          path: "/home/data",
           submenus: [
             {
-              name: '全部服务',
-              path: '/home/service/all',
+              name: "报表配置",
+              path: "/home/data/statement",
             },
             {
-              name: '已安装服务',
-              path: '/home/service/installed',
+              name: "报告配置",
+              path: "/home/data/report",
             },
             {
-              name: '未安装服务',
-              path: '/home/service/uninstall',
+              name: "基础信息",
+              path: "/home/data/basicInfo",
             },
-          ]
+          ],
+        },
+        {
+          url: require("@/assets/images/serviceManagement@3x.png"),
+          name: "服务管理",
+          path: "/home/service",
         },
         {
-          url: require('@/assets/images/securityManagement@3x.png'),
-          name: '安全管理',
-          path: '/home/security',
+          url: require("@/assets/images/securityManagement@3x.png"),
+          name: "安全管理",
+          path: "/home/security",
           submenus: [
             {
-              name: '日志监控',
-              path: '/home/security/logMonitor',
+              name: "日志监控",
+              path: "/home/security/logMonitor",
             },
             {
-              name: '系统监控',
-              path: '/home/security/systemMonitor',
+              name: "系统监控",
+              path: "/home/security/systemMonitor",
             },
-          ]
-        }
+          ],
+        },
       ],
     }
   },
@@ -176,11 +169,11 @@ export default {
   padding: 0;
 }
 
-.el-menu-item-group>.span {
+.el-menu-item-group > .span {
   margin-left: 70px;
 }
 
-/deep/.el-menu--inline> {
+/deep/.el-menu--inline > {
   border: none;
   text-align: -webkit-right;
 }

+ 15 - 15
src/router/index.js

@@ -1,12 +1,12 @@
-import Vue from 'vue'
-import VueRouter from 'vue-router'
+import Vue from "vue";
+import VueRouter from "vue-router";
 
-Vue.use(VueRouter)
+Vue.use(VueRouter);
 
 const routes = [
   {
-    path: '/',
-    redirect: '/login'
+    path: "/",
+    redirect: "/login",
   },
   {
     path: '/login',
@@ -39,7 +39,7 @@ const routes = [
             meta: { requrieAuth: true },
             component: () => import('../views/userManagement/groupManagement/index.vue'),
           },
-        ]
+        ],
       },
       {
         path: 'role',
@@ -78,7 +78,7 @@ const routes = [
             meta: { requrieAuth: true },
             component: () => import('../views/systemManagement/indexConfiguration/index.vue')
           },
-        ]
+        ],
       },
       {
         path: 'device',
@@ -171,16 +171,16 @@ const routes = [
             meta: { requrieAuth: true },
             component: () => import('../views/securityManagement/systemMonitor/index.vue'),
           },
-        ]
-      }
-    ]
+        ],
+      },
+    ],
   },
-]
+];
 
 const router = new VueRouter({
-  mode: 'history',
+  mode: "history",
   base: process.env.BASE_URL,
-  routes
-})
+  routes,
+});
 
-export default router
+export default router;

+ 1 - 1
src/store/modules/user.js

@@ -40,4 +40,4 @@ const user = {
         },
     },
 }
-export default user
+export default user

+ 12 - 3
src/views/dataManagement/reportConfig.vue

@@ -34,8 +34,8 @@
               ></el-option>
             </el-select>
           </el-form-item>
-          <el-button class="reset-btn">重置</el-button>
-          <el-button class="search-btn">查询</el-button>
+          <el-button class="reset-btn" @click="resetEvent">重置</el-button>
+          <el-button class="search-btn" @click="searchEvent">查询</el-button>
         </div>
       </el-form>
     </div>
@@ -52,6 +52,7 @@
         :header-cell-style="{ textAlign: 'center' }"
         :cell-style="{ textAlign: 'center' }"
         style="width: 100%"
+        :height="400"
         @selection-change="handleSelectionChange"
       >
         <el-table-column type="selection" width="50"> </el-table-column>
@@ -102,7 +103,6 @@ export default {
   components: { checkbox, page },
   data() {
     return {
-      total: 0,
       input: "",
       show: true,
       form: {
@@ -212,6 +212,15 @@ export default {
     handleSelectionChange(val) {
       this.multipleSelection = val;
     },
+    resetEvent() {
+      this.form.templateName = "";
+      this.form.templateFormat = "";
+      this.form.reportType = "";
+      this.searchEvent();
+    },
+    searchEvent() {
+      this.getTableData(this.currentPage);
+    },
   },
 };
 </script>

+ 10 - 2
src/views/dataManagement/statementConfig.vue

@@ -24,8 +24,8 @@
               ></el-option>
             </el-select>
           </el-form-item>
-          <el-button class="reset-btn">重置</el-button>
-          <el-button class="search-btn">查询</el-button>
+          <el-button class="reset-btn" @click="resetEvent">重置</el-button>
+          <el-button class="search-btn" @click="searchEvent">查询</el-button>
         </div>
       </el-form>
     </div>
@@ -181,6 +181,14 @@ export default {
       if (!value) return true;
       return data.label.indexOf(value) !== -1;
     },
+    resetEvent() {
+      this.form.templateName = "";
+      this.form.templateForm = "";
+      this.searchEvent();
+    },
+    searchEvent() {
+      this.getTableData(this.currentPage);
+    },
   },
 };
 </script>

+ 1 - 0
src/views/securityManagement/logMonitor.vue

@@ -254,6 +254,7 @@ export default {
         this.form.operationStatus
       ).then((res) => {
         if (res.data.code === 0 && res.data.data.length > 0) {
+          this.paginationData.total = res.data.total
           this.tableData = res.data.data.map((v) => {
             return {
               logID: v.id,

+ 186 - 7
src/views/servicesManagement/index.vue

@@ -4,15 +4,194 @@
     </div>
 </template>
 
-<script >
+<script>
+import checkbox from "@/components/Checkbox/index";
+import page from "@/components/pagination/index";
 export default {
-    data() {
-        return {
-        }
+  components: { checkbox, page },
+  data() {
+    return {
+      input: "",
+      show: true,
+      total: 0,
+      form: {},
+      tableData: [
+        {
+          photo:
+            "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png",
+          updatetime: "2023-01-01 00:00",
+          name: "海康威视软件包",
+          introduction: "xxxxxxxxxxxxx",
+          status: "1",
+        },
+        {
+          photo:
+            "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png",
+          updatetime: "2023-01-01 00:00",
+          name: "海康威视软件包",
+          introduction: "xxxxxxxxxxxxx",
+          status: "2",
+        },
+        {
+          photo:
+            "https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png",
+          updatetime: "2023-01-01 00:00",
+          name: "海康威视软件包",
+          introduction: "xxxxxxxxxxxxx",
+          status: "3",
+        },
+      ],
+      paginationData: {
+        pageSize: 10,
+        pagerCount: 5,
+        currentPage: 1,
+        pageSizes: [5, 10, 20, 30],
+        total: 30,
+        currentChange: (val) => {
+          this.getTableData(val);
+        },
+        handleSizeChange: (val) => {
+          this.handleSizeChange(val);
+        },
+      },
+    };
+  },
+  methods: {
+    handleSelectionChange() {
+      //
     },
-    methods: {
-    }
+    getTableData(val) {},
+    handleSizeChange(val) {},
+  },
 };
 </script>
 <style lang="less" scoped>
-</style>
+.content {
+  top: 77px;
+  position: absolute;
+  left: 218px;
+  right: 16px;
+  height: -webkit-fill-available;
+  margin-bottom: 20px;
+  background-color: #ffffff;
+}
+
+.el-table {
+  top: 100px;
+  margin-left: 2.5%;
+  border: 1px solid #f0f2f2;
+  font-size: 0.95rem;
+  font-family: PingFang SC;
+  font-weight: 500;
+  color: #b2b2b2;
+  background: rgba(255, 255, 255, 0.8);
+  /deep/th {
+    background: #f7fbff;
+  }
+  /deep/.el-checkbox {
+    color: #b2b2b2;
+    .el-checkbox__input.is-checked + .el-checkbox__label {
+      color: #2ea8e6;
+    }
+
+    .el-checkbox__input.is-checked .el-checkbox__inner::after {
+      width: 70%;
+      height: 70%;
+      background: #2ea8e6;
+      border-radius: 0;
+      transform: rotate(0deg) scaleY(1);
+      position: static;
+      // border: 1px solid #8DD9FF;
+    }
+
+    .el-checkbox__inner {
+      border: 1px solid #8dd9ff;
+      background: rgba(0, 170, 255, 0);
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      position: static;
+      &::after {
+        transition: 0ms;
+      }
+    }
+
+    .el-checkbox__label {
+      padding-left: 0;
+      font-size: 15px;
+      position: absolute;
+      top: 1px;
+      left: 25px;
+    }
+  }
+}
+
+.el-form-item {
+  margin-bottom: 0 !important;
+}
+
+/deep/.el-form-item__label {
+  padding: 0;
+}
+
+/deep/.el-form-item__content {
+  margin-right: 8px;
+}
+
+.bottom {
+  position: absolute;
+  left: 20px;
+  right: 16px;
+  bottom: 20px;
+  height: 50px;
+  line-height: 20px;
+  background-color: rgba(255, 255, 255, 1);
+  text-align: center;
+
+  .checkbox {
+    position: absolute;
+    left: 29px;
+    top: 15px;
+    font-size: 14px;
+  }
+
+  .check-cancel {
+    position: absolute;
+    // line-height: 20px;
+    font-size: 14px;
+    text-align: center;
+    left: 140px;
+    top: 10px;
+  }
+
+  .bottom_button {
+    position: absolute;
+    left: 200px;
+    margin-top: 15px;
+
+    .delete {
+      font-size: 14px;
+      text-align: center;
+      padding: 1px;
+    }
+
+    .disabled {
+      font-size: 14px;
+      text-align: center;
+      padding: 1px;
+    }
+
+    .export {
+      font-size: 14px;
+      text-align: center;
+      padding: 1px;
+    }
+  }
+}
+.search {
+  position: absolute;
+  width: 300px;
+  top: 20px;
+  right: 2.5%;
+}
+</style>