Browse Source

框架调整

sunlupeng 9 months ago
parent
commit
e5397ad888

+ 7 - 0
yudao-ui/yudao-ui-admin-vue/src/App.vue

@@ -42,4 +42,11 @@ export default {
   background: rgba(0, 0, 0, 0.15);
   transition: color 0.2s ease;
 }
+/* 全局设置 element ui dialog水平垂直居中 */
+/* .el-dialog {
+  left: 50%;
+  top: 50%;
+  transform: translate(-50%, -50%);
+  margin: 0px !important;
+} */
 </style>

BIN
yudao-ui/yudao-ui-admin-vue/src/assets/images/wx.jpg


+ 2 - 2
yudao-ui/yudao-ui-admin-vue/src/components/AppList/index.vue

@@ -6,7 +6,7 @@
         <span style="font-size: 20px;">我的应用</span>
         <el-button style="font-size: 20px;float: right; padding: 3px 0" type="text">添加应用</el-button>
       </div>
-      <div class="appList">
+      <!-- <div class="appList">
         <div class="typeTitle">OA</div>
         <div style="display: flex;flex-wrap: wrap;margin-bottom: 20px;">
           <div class="app-item" v-for="item in topMenus" @click="handleSelect(item)">
@@ -41,7 +41,7 @@
             {{ item.meta.title }}
           </div>
         </div>
-      </div>
+      </div> -->
       <el-tabs v-model="activeName" @tab-click="handleClick">
         <el-tab-pane label="OA审批" name="first">
           <div class="app-item" v-for="item in topMenus" @click="handleSelect(item)">

+ 5 - 5
yudao-ui/yudao-ui-admin-vue/src/layout/components/AppMain.vue

@@ -53,9 +53,9 @@ export default {
 
 <style lang="scss">
 // fix css style bug in open el-dialog
-.el-popup-parent--hidden {
-  .fixed-header {
-    padding-right: 17px;
-  }
-}
+// .el-popup-parent--hidden {
+//   .fixed-header {
+//     padding-right: 17px;
+//   }
+// }
 </style>

+ 131 - 31
yudao-ui/yudao-ui-admin-vue/src/layout/components/Homebar.vue

@@ -1,52 +1,66 @@
 <template>
   <div class="navbar">
-    <!-- <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> -->
-
-    <!-- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/> -->
-    <!-- <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/> -->
+    <div class="left-menu">
+        <el-popover
+          popper-class="down-popover"
+          placement="bottom"
+          width="360"
+          :visible-arrow="false"
+          trigger="click">
+          <div class="corp-switch">
+            <div class="current-corp">sunny</div>
+            <el-button type="text" style="color: #00B899;">
+              <i class="el-icon-s-operation"></i>
+              切换企业/团队
+            </el-button>
+           
+          </div>
+          <i class="el-icon-s-grid icon-menu" slot="reference"></i>
+        </el-popover>
+        <div class="divider"></div>
+        <a class="text" href="/">
+          <div class="menu-icon dashboard" style="background-image: url(&quot;https://g.jdycdn.com/app/pc/311a8e2b1ed9.png&quot;);"></div>
+          工作台
+        </a>
+    </div>
+    
+    
+    
 
     <div class="right-menu">
       <template v-if="device!=='mobile'">
-        <!-- <search id="header-search" class="right-menu-item" /> -->
-
-        <!-- 站内信 -->
-        <notify-message class="right-menu-item hover-effect" />
-
-        <!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">
-          <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />
-        </el-tooltip> -->
-
-        <!-- <el-tooltip content="文档地址" effect="dark" placement="bottom">
+        <el-tooltip content="文档地址" effect="dark" placement="bottom">
           <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />
-        </el-tooltip> -->
-
-        <screenfull id="screenfull" class="right-menu-item hover-effect" />
+        </el-tooltip>
 
-        <!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">
-          <size-select id="size-select" class="right-menu-item hover-effect" />
-        </el-tooltip> -->
+        <el-tooltip content="联系我们" effect="dark" placement="bottom">
+          <div class="right-menu-item hover-effect">
+            <i class="el-icon-service" @click="childMethod()"></i>
+          </div>
 
+        </el-tooltip>
       </template>
-
       <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
         <div class="avatar-wrapper">
-          <img :src="avatar" class="user-avatar">
+          <!-- <img :src="avatar" class="user-avatar"> -->
+          <img src="https://static-legacy.dingtalk.com/media/lQLPD4bTZ9hFfEHNAl_NAl-wu2M_jTTO8eEGNqKVr0MUAA_607_607.png" class="user-avatar">
           <span v-if="nickname" class="user-nickname">{{ nickname }}</span>
-          <i class="el-icon-caret-bottom" />
+          <!-- <i class="el-icon-caret-bottom" /> -->
         </div>
         <el-dropdown-menu slot="dropdown">
           <router-link to="/user/profile">
             <el-dropdown-item>个人中心</el-dropdown-item>
           </router-link>
-          <!-- <el-dropdown-item @click.native="setting = true">
-            <span>布局设置</span>
-          </el-dropdown-item> -->
+          <el-dropdown-item @click.native="setting = true">
+            <span>企业管理</span>
+          </el-dropdown-item>
           <el-dropdown-item divided @click.native="logout">
             <span>退出登录</span>
           </el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>
     </div>
+   
   </div>
 </template>
 
@@ -64,6 +78,11 @@ import NotifyMessage from '@/layout/components/Message'
 import {getPath} from "@/utils/ruoyi";
 
 export default {
+  data() {
+    return {
+      
+    }
+  },
   components: {
     Breadcrumb,
     TopNav,
@@ -100,6 +119,9 @@ export default {
     }
   },
   methods: {
+    childMethod() {
+        this.$parent.fatherMethod();
+    },
     toggleSideBar() {
       this.$store.dispatch('app/toggleSideBar')
     },
@@ -113,10 +135,34 @@ export default {
   }
 }
 </script>
-
+<style lang="scss">
+.down-popover {
+  top: 60px !important;
+}
+</style>
 <style lang="scss" scoped>
+a {
+  outline: none;
+  text-decoration: none;
+}
+.corp-switch{
+  align-items: center;
+  display: flex;
+  height: 65px;
+  justify-content: space-between;
+  padding-left: 20px;
+  .current-corp {
+      color: #141e31;
+      font-size: 18px;
+      line-height: 32px;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      white-space: nowrap;
+      width: 240px;
+  }      
+}
 .navbar {
-  height: 50px;
+  height: 60px;
   overflow: hidden;
   position: relative;
   background: #fff;
@@ -148,11 +194,65 @@ export default {
     display: inline-block;
     vertical-align: top;
   }
-
+  
+  .left-menu {
+    font-size: 16px;
+    padding: 0px 15px;
+    float: left;
+    height: 100%;
+    // line-height: 60px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    cursor: pointer;
+    .icon-menu:hover {
+        background: #e6e8ed;
+        border-radius: 3px;
+    }
+    .icon-menu{
+      color: #525967;
+      cursor: pointer;
+      display: inline-block;
+      font-size: 20px;
+      height: 30px;
+      line-height: 30px;
+      text-align: center;
+      width: 30px;
+    }
+    .divider{
+      height: 20px;
+      margin: 0 5px;
+      border: solid #EBECEE;
+      border-width: 0 0 0 1px;
+      display: inline-block;
+      height: .9em;
+      // margin: 0 15px;
+      vertical-align: middle;
+    }
+    .text:hover {
+        background: #e6e8ed;
+    }
+    .text{
+      height: 30px;
+      align-items: center;
+      border-radius: 4px;
+      color: #141e31;
+      display: flex;
+      padding: 0 5px;
+      transition: background .2s ease;
+      .menu-icon{
+        background-size: 100px 20px;
+        height: 20px;
+        margin-right: 5px;
+        width: 20px;
+      }
+    }
+  }
+  
   .right-menu {
     float: right;
     height: 100%;
-    line-height: 50px;
+    line-height: 60px;
 
     &:focus {
       outline: none;
@@ -177,7 +277,7 @@ export default {
     }
 
     .avatar-container {
-      margin-right: 30px;
+      margin-right: 20px;
 
       .avatar-wrapper {
         display: flex;

File diff suppressed because it is too large
+ 120 - 48
yudao-ui/yudao-ui-admin-vue/src/views/index.vue