Browse Source

侧边栏

Zn 1 year ago
parent
commit
7289ab981f

+ 2 - 2
ruoyi-ui/.env.development

@@ -11,7 +11,7 @@ VUE_APP_BASE_API = '/dev-api'
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
 
 #数据引擎模块IP
-VUE_APP_BASE_API2 = 'http://192.168.110.76:8099/'
+VUE_APP_BASE_API2 = 'http://192.168.110.59:8099/'
 
 #表单引擎模块IP
-VUE_APP_BASE_API3 = 'http://192.168.110.76:8088/'
+VUE_APP_BASE_API3 = 'http://192.168.110.59:8088/'

+ 1 - 0
ruoyi-ui/package.json

@@ -41,6 +41,7 @@
     "@riophae/vue-treeselect": "0.4.0",
     "ant-design-vue": "^1.7.8",
     "axios": "0.24.0",
+    "bpmn-js": "^14.0.0",
     "circular-json": "^0.5.9",
     "clipboard": "2.0.8",
     "core-js": "3.25.3",

+ 1 - 1
ruoyi-ui/src/assets/styles/variables.scss

@@ -50,7 +50,7 @@ $base-sidebar-width: 218px;
   menuLightBackground: $base-menu-light-background;
   subMenuBackground: $base-sub-menu-background;
   subMenuHover: $base-sub-menu-hover;
-  sideBarWidth: $base-sidebar-width;
+  // sideBarWidth: $base-sidebar-width;
   logoTitleColor: $base-logo-title-color;
   logoLightTitleColor: $base-logo-light-title-color
 }

+ 1 - 0
ruoyi-ui/src/layout/index.vue

@@ -54,6 +54,7 @@
       <div
         :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
         class="main-container"
+        :style="sidebar.opened ? '': 'margin-left: 50px !important'"
       >
         <div :class="{ 'fixed-header': fixedHeader }">
           <!-- <navbar /> -->

+ 6 - 8
ruoyi-ui/src/layout/mixin/ResizeHandler.js

@@ -1,7 +1,7 @@
 import store from '@/store'
-import { mapGetters, mapState } from "vuex";
+
 const { body } = document
-const WIDTH = 992 // refer to Bootstrap's responsive design
+const WIDTH = 200 // refer to Bootstrap's responsive design
 
 export default {
   watch: {
@@ -11,9 +11,6 @@ export default {
       }
     }
   },
-  computed: {
-    ...mapGetters(["sidebarRouters", "sidebar"]),
-  },
   beforeMount() {
     window.addEventListener('resize', this.$_resizeHandler)
   },
@@ -36,13 +33,14 @@ export default {
     },
     $_resizeHandler() {
       if (!document.hidden) {
+        const reatWith = body.getBoundingClientRect().width
 
         const isMobile = this.$_isMobile()
         store.dispatch('app/toggleDevice', isMobile ? 'mobile' : 'desktop')
-
-        if (isMobile) {
+        if (reatWith < 900) {
           store.dispatch('app/closeSideBar', { withoutAnimation: true })
-        } else {
+        } 
+        else {
           store.dispatch('app/openSideBar', { withoutAnimation: true })
         }
       }

+ 1 - 0
ruoyi-ui/src/store/modules/app.js

@@ -13,6 +13,7 @@ const state = {
 
 const mutations = {
   TOGGLE_SIDEBAR: state => {
+    console.log(state)
     if (state.sidebar.hide) {
       return false;
     }

+ 1 - 1
ruoyi-ui/vue.config.js

@@ -35,7 +35,7 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://192.168.110.76:8080`,
+        target: `http://192.168.110.59:8080`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''