cfofpp hace 3 meses
padre
commit
7be5893df3

+ 18 - 1
src/layout/components/Top/index.vue

@@ -4,6 +4,17 @@
     <div class="profile">
       <div class="right-menu">
         <template v-if="device !== 'mobile'">
+          <el-tooltip
+            class="back"
+            effect="dark"
+            content="首页"
+            placement="bottom"
+          >
+            <i
+              @click="() => $router.push('/index')"
+              class="el-icon-full-screen back-icon"
+            ></i>
+          </el-tooltip>
           <search id="header-search" class="right-menu-item" />
           <screenfull id="screenfull" class="right-menu-item hover-effect" />
           <el-tooltip content="布局大小" effect="dark" placement="bottom">
@@ -116,7 +127,13 @@ export default {
 
 <style lang="scss" scoped>
 @import "@/assets/styles/variables.scss";
-
+.back-icon {
+  cursor: pointer;
+  color: #fff;
+  font-size: 25px;
+  font-weight: bold;
+  margin-right: 10px;
+}
 .Top-wrapper {
   width: 100%;
   height: 80px;

+ 4 - 4
src/layout/index2.vue

@@ -4,15 +4,15 @@
     class="app-wrapper"
     :style="{ '--current-color': theme }"
   >
-    <div
+    <!-- <div
       v-if="device === 'mobile' && sidebar.opened"
       class="drawer-bg"
       @click="handleClickOutside"
-    />
-    <sidebar v-if="!sidebar.hide" class="sidebar-container" />
+    /> -->
+    <!-- <sidebar v-if="!sidebar.hide" class="sidebar-container" /> -->
     <!--    <Menu></Menu>-->
     <div
-      :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
+      :class="{ hasTagsView: needTagsView, sidebarHide: true }"
       class="main-container"
     >
       <!-- <div :class="{ 'fixed-header': fixedHeader }">

+ 14 - 0
src/views/home/components/Header.vue

@@ -1,6 +1,14 @@
 <template>
   <div class="header">
     <slot></slot>
+    <el-tooltip class="back" effect="dark" content="返回" placement="bottom">
+      <i
+        @click="
+          () => $router.push('/power-outage-control/target-display-board')
+        "
+        class="el-icon-full-screen"
+      ></i>
+    </el-tooltip>
   </div>
 </template>
 <script setup></script>
@@ -22,4 +30,10 @@
   background-size: 100% 60px;
   background-position: center center;
 }
+.back {
+  position: absolute;
+  right: 10px;
+  top: 15px;
+  cursor: pointer;
+}
 </style>

+ 3 - 3
src/views/home/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="map-container">
-    <!-- <Header>配网首页</Header> -->
+    <Header>配网安全精益管理辅助应用</Header>
     <el-row :gutter="10">
       <el-col :span="12" class="h-full-calc">
         <el-card class="h-40">
@@ -75,8 +75,8 @@ export default {
   // background-size: 100% 100%;
 }
 .h-full-calc {
-  height: calc(100vh - 30px);
-  // height: calc(100vh - 90px);
+  // height: calc(100vh - 30px);
+  height: calc(100vh - 90px);
 }
 .mt-10 {
   margin-top: 10px;