Parcourir la source

Merge branch 'master' of http://git.dgtis.com/15896567520/RuoYi-flowable-master

zjc il y a 1 an
Parent
commit
53d2b42395

+ 3 - 1
ruoyi-ui/.env.development

@@ -1,11 +1,13 @@
 # 页面标题
-VUE_APP_TITLE = 若依管理系统
+VUE_APP_TITLE = 爱思系统
 
 # 开发环境配置
 ENV = 'development'
 
 # 若依管理系统/开发环境
 VUE_APP_BASE_API = '/dev-api'
+# VUE_APP_BASE_API = '192.168.100.234:8080'
+
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 1 - 1
ruoyi-ui/.env.production

@@ -1,5 +1,5 @@
 # 页面标题
-VUE_APP_TITLE = 若依管理系统
+VUE_APP_TITLE = 爱思系统
 
 # 生产环境配置
 ENV = 'production'

+ 3 - 2
ruoyi-ui/src/api/menu.js

@@ -1,9 +1,10 @@
 import request from '@/utils/request'
 
 // 获取路由
-export const getRouters = () => {
+export const getRouters = (query) => {
   return request({
     url: '/getRouters',
-    method: 'get'
+    method: 'get',
+    params: query
   })
 }

+ 2 - 1
ruoyi-ui/src/components/Breadcrumb/index.vue

@@ -35,7 +35,8 @@ export default {
       const first = matched[0]
 
       if (!this.isDashboard(first)) {
-        matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched)
+        // matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched)
+        matched = [{ path: '/', meta: { title: '首页' }}].concat(matched)
       }
 
       this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)

+ 2 - 1
ruoyi-ui/src/layout/components/Navbar.vue

@@ -102,7 +102,8 @@ export default {
         type: 'warning'
       }).then(() => {
         this.$store.dispatch('LogOut').then(() => {
-          location.href = '/index';
+          // location.href = '/index';
+          location.href = '/login';
         })
       }).catch(() => {});
     }

+ 10 - 1
ruoyi-ui/src/layout/components/Sidebar/Logo.vue

@@ -35,9 +35,18 @@ export default {
   },
   data() {
     return {
-      title: process.env.VUE_APP_TITLE,
+      // title: process.env.VUE_APP_TITLE,
+      title:process.env.VUE_APP_TITLE,
       logo: logoImg
+      // logo: ''
     }
+  },
+  created(){
+    // console.log("logo===",this.$store.state.systemTitle)
+    if(this.$route.query.title){
+      this.title = this.$route.query.title;
+    }
+    // this.title = this.$store.state.systemTitle
   }
 }
 </script>

+ 59 - 34
ruoyi-ui/src/layout/components/Sidebar/SidebarItem.vue

@@ -1,16 +1,40 @@
 <template>
   <div v-if="!item.hidden">
-    <template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
-      <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
-        <el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
-          <item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
+    <template
+      v-if="
+        hasOneShowingChild(item.children, item) &&
+        (!onlyOneChild.children || onlyOneChild.noShowingChildren) &&
+        !item.alwaysShow
+      "
+    >
+      <app-link
+        v-if="onlyOneChild.meta"
+        :to="resolvePath(onlyOneChild.path, onlyOneChild.query)"
+      >
+        <el-menu-item
+          :index="resolvePath(onlyOneChild.path)"
+          :class="{ 'submenu-title-noDropdown': !isNest }"
+        >
+          <item
+            :icon="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
+            :title="onlyOneChild.meta.title"
+          />
         </el-menu-item>
       </app-link>
     </template>
 
-    <el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
+    <el-submenu
+      v-else
+      ref="subMenu"
+      :index="resolvePath(item.path)"
+      popper-append-to-body
+    >
       <template slot="title">
-        <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
+        <item
+          v-if="item.meta"
+          :icon="item.meta && item.meta.icon"
+          :title="item.meta.title"
+        />
       </template>
       <sidebar-item
         v-for="child in item.children"
@@ -25,76 +49,77 @@
 </template>
 
 <script>
-import path from 'path'
-import { isExternal } from '@/utils/validate'
-import Item from './Item'
-import AppLink from './Link'
-import FixiOSBug from './FixiOSBug'
+import path from "path";
+import { isExternal } from "@/utils/validate";
+import Item from "./Item";
+import AppLink from "./Link";
+import FixiOSBug from "./FixiOSBug";
 
 export default {
-  name: 'SidebarItem',
+  name: "SidebarItem",
   components: { Item, AppLink },
   mixins: [FixiOSBug],
   props: {
     // route object
     item: {
       type: Object,
-      required: true
+      required: true,
     },
     isNest: {
       type: Boolean,
-      default: false
+      default: false,
     },
     basePath: {
       type: String,
-      default: ''
-    }
+      default: "",
+    },
   },
   data() {
-    this.onlyOneChild = null
-    return {}
+    this.onlyOneChild = null;
+    return {};
   },
   methods: {
     hasOneShowingChild(children = [], parent) {
       if (!children) {
         children = [];
       }
-      const showingChildren = children.filter(item => {
+      const showingChildren = children.filter((item) => {
         if (item.hidden) {
-          return false
+          return false;
         } else {
           // Temp set(will be used if only has one showing child)
-          this.onlyOneChild = item
-          return true
+          this.onlyOneChild = item;
+          return true;
         }
-      })
+      });
 
       // When there is only one child router, the child router is displayed by default
       if (showingChildren.length === 1) {
-        return true
+        return true;
       }
 
       // Show parent if there are no child router to display
       if (showingChildren.length === 0) {
-        this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
-        return true
+        this.onlyOneChild = { ...parent, path: "", noShowingChildren: true };
+        return true;
       }
 
-      return false
+      return false;
     },
     resolvePath(routePath, routeQuery) {
       if (isExternal(routePath)) {
-        return routePath
+        return routePath;
       }
       if (isExternal(this.basePath)) {
-        return this.basePath
+        return this.basePath;
       }
       if (routeQuery) {
         let query = JSON.parse(routeQuery);
-        return { path: path.resolve(this.basePath, routePath), query: query }
+        return { path: path.resolve(this.basePath, routePath), query: query };
       }
-      return path.resolve(this.basePath, routePath)
-    }
-  }
-}
+      return path.resolve(this.basePath, routePath);
+    },
+  },
+};
 </script>
+

+ 85 - 44
ruoyi-ui/src/layout/components/Sidebar/index.vue

@@ -1,26 +1,47 @@
 <template>
-    <div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
-        <logo v-if="showLogo" :collapse="isCollapse" />
-        <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
-            <el-menu
-                :default-active="activeMenu"
-                :collapse="isCollapse"
-                :background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
-                :text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
-                :unique-opened="true"
-                :active-text-color="settings.theme"
-                :collapse-transition="false"
-                mode="vertical"
-            >
-                <sidebar-item
-                    v-for="(route, index) in sidebarRouters"
-                    :key="route.path  + index"
-                    :item="route"
-                    :base-path="route.path"
-                />
-            </el-menu>
-        </el-scrollbar>
+  <div
+    :class="{ 'has-logo': showLogo }"
+    :style="{
+      backgroundColor:
+        settings.sideTheme === 'theme-dark'
+          ? variables.menuBackground
+          : variables.menuLightBackground,
+    }"
+  >
+    <logo v-if="showLogo" :collapse="isCollapse" />
+    <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
+      <el-menu
+        :default-active="activeMenu"
+        :collapse="isCollapse"
+        :background-color="
+          settings.sideTheme === 'theme-dark'
+            ? variables.menuBackground
+            : variables.menuLightBackground
+        "
+        :text-color="
+          settings.sideTheme === 'theme-dark'
+            ? variables.menuColor
+            : variables.menuLightColor
+        "
+        :unique-opened="true"
+        :active-text-color="settings.theme"
+        :collapse-transition="false"
+        mode="vertical"
+      >
+        <sidebar-item
+          v-for="(route, index) in sidebarRouters"
+          :key="route.path + index"
+          :item="route"
+          :base-path="route.path"
+        />
+      </el-menu>
+    </el-scrollbar>
+    <div class="closeWrapper">
+      <router-link :to="{name:'Home'}">
+        <i class="el-icon-circle-close"></i>
+      </router-link>
     </div>
+  </div>
 </template>
 
 <script>
@@ -30,28 +51,48 @@ import SidebarItem from "./SidebarItem";
 import variables from "@/assets/styles/variables.scss";
 
 export default {
-    components: { SidebarItem, Logo },
-    computed: {
-        ...mapState(["settings"]),
-        ...mapGetters(["sidebarRouters", "sidebar"]),
-        activeMenu() {
-            const route = this.$route;
-            const { meta, path } = route;
-            // if set path, the sidebar will highlight the path you set
-            if (meta.activeMenu) {
-                return meta.activeMenu;
-            }
-            return path;
-        },
-        showLogo() {
-            return this.$store.state.settings.sidebarLogo;
-        },
-        variables() {
-            return variables;
-        },
-        isCollapse() {
-            return !this.sidebar.opened;
-        }
-    }
+  components: { SidebarItem, Logo },
+  computed: {
+    ...mapState(["settings"]),
+    ...mapGetters(["sidebarRouters", "sidebar"]),
+    activeMenu() {
+      const route = this.$route;
+      const { meta, path } = route;
+      // if set path, the sidebar will highlight the path you set
+      if (meta.activeMenu) {
+        return meta.activeMenu;
+      }
+      return path;
+    },
+    showLogo() {
+      //this.$store.getters.sidebarRouters
+      //this.$store.state.sidebarRouters
+      return this.$store.state.settings.sidebarLogo;
+    },
+    variables() {
+      return variables;
+    },
+    isCollapse() {
+      return !this.sidebar.opened;
+    },
+  },
 };
 </script>
+<style lang="scss" scoped>
+.sidebar-container{
+  ::v-deep .el-scrollbar__view>.el-menu{
+    padding-bottom: 100px;
+  }
+}
+.closeWrapper{
+  position: fixed;
+  width:50px;
+  height:50px;
+  bottom:10px;
+  left:10px;
+  i{
+    font-size: 50px;
+    color:#fff;
+  }
+}
+</style>

+ 36 - 2
ruoyi-ui/src/router/index.js

@@ -63,14 +63,48 @@ export const constantRoutes = [
   },
   {
     path: '',
+    component: () => import('@/views/home'),
+    name:"Home",
+    hidden: true
+  },
+  // CRM系统-路由
+  {
+    path: '/crmSystem',
     component: Layout,
-    redirect: 'index',
+    hidden: true,
+    children: [
+      {
+        path: 'myTask/index',
+        component: () => import('@/views/crmSystem/myTask/index'),
+        name: 'myTaskIndex',
+        meta: { title: '我的任务', icon: 'dashboard' }
+      },
+      {
+        path: 'approveQuery/index',
+        component: () => import('@/views/crmSystem/approveQuery/index'),
+        name: 'approveQueryIndex',
+        meta: { title: '审批查询', icon: 'dashboard' }
+      },
+      {
+        path: 'customerInformation/index',
+        component: () => import('@/views/crmSystem/customerInformation/index'),
+        name: 'customerInformationIndex',
+        meta: { title: '客户信息', icon: 'dashboard' }
+      },
+    ]
+  },
+  {
+    path: '/index',
+    component: Layout,
+    hidden: true,
+    // redirect: 'index',
     children: [
       {
         path: 'index',
         component: () => import('@/views/index'),
         name: 'Index',
-        meta: { title: '首页', icon: 'dashboard', affix: true }
+        hidden: true,
+        meta: { title: '首页', icon: 'dashboard'}//, affix: true 
       }
     ]
   },

+ 12 - 3
ruoyi-ui/src/store/modules/permission.js

@@ -11,7 +11,9 @@ const permission = {
     addRoutes: [],
     defaultRoutes: [],
     topbarRouters: [],
-    sidebarRouters: []
+    sidebarRouters: [],
+    systemType: null,
+    systemTitle: null
   },
   mutations: {
     SET_ROUTES: (state, routes) => {
@@ -27,13 +29,20 @@ const permission = {
     SET_SIDEBAR_ROUTERS: (state, routes) => {
       state.sidebarRouters = routes
     },
+    SET_SYSTEMTYPE: (state, data) => {
+      state.systemType = data
+    },
+    SET_SYSTEMTITLE: (state, data) => {
+      state.systemTitle = data
+    }
   },
   actions: {
     // 生成路由
-    GenerateRoutes({ commit }) {
+    GenerateRoutes({ commit, state }) {
       return new Promise(resolve => {
         // 向后端请求路由数据
-        getRouters().then(res => {
+        let params = state.systemType ? { systemType: state.systemType } : {};
+        getRouters(params).then(res => {
           const sdata = JSON.parse(JSON.stringify(res.data))
           const rdata = JSON.parse(JSON.stringify(res.data))
           const sidebarRoutes = filterAsyncRouter(sdata)

+ 22 - 0
ruoyi-ui/src/views/crmSystem/approveQuery/index.vue

@@ -0,0 +1,22 @@
+<template>
+    <div>2222</div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+
+        }
+    },
+    created(){
+
+    },
+    mounted(){
+
+    }
+
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 22 - 0
ruoyi-ui/src/views/crmSystem/customerInformation/add.vue

@@ -0,0 +1,22 @@
+<template>
+    <div>111</div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+
+        }
+    },
+    created(){
+
+    },
+    mounted(){
+
+    }
+
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 22 - 0
ruoyi-ui/src/views/crmSystem/customerInformation/index.vue

@@ -0,0 +1,22 @@
+<template>
+    <div>333</div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+
+        }
+    },
+    created(){
+
+    },
+    mounted(){
+
+    }
+
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 22 - 0
ruoyi-ui/src/views/crmSystem/myTask/detail.vue

@@ -0,0 +1,22 @@
+<template>
+    <div>111</div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+
+        }
+    },
+    created(){
+
+    },
+    mounted(){
+
+    }
+
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 22 - 0
ruoyi-ui/src/views/crmSystem/myTask/edit.vue

@@ -0,0 +1,22 @@
+<template>
+    <div>111</div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+
+        }
+    },
+    created(){
+
+    },
+    mounted(){
+
+    }
+
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 16 - 0
ruoyi-ui/src/views/crmSystem/myTask/index.vue

@@ -0,0 +1,16 @@
+<template>
+  <div>111</div>
+</template>
+<script>
+export default {
+  name: "myTaskIndex",
+  data() {
+    return {};
+  },
+  created() {
+  },
+  mounted() {},
+};
+</script>
+<style lang="scss" scoped>
+</style>

+ 22 - 0
ruoyi-ui/src/views/crmSystem/myTask/manage.vue

@@ -0,0 +1,22 @@
+<template>
+    <div>111</div>
+</template>
+<script>
+export default {
+    data(){
+        return{
+
+        }
+    },
+    created(){
+
+    },
+    mounted(){
+
+    }
+
+}
+</script>
+<style lang="scss" scoped>
+
+</style>

+ 36 - 0
ruoyi-ui/src/views/home.vue

@@ -0,0 +1,36 @@
+<template>
+  <div>
+    <el-button type="primary" plain @click="handleModuleJump('myTaskIndex', 'crm', 'CRM系统')">
+      CRM系统
+    </el-button>
+    <el-button type="primary" plain @click="handleModuleJump('Index', 'admin', '爱思系统')">
+      系统管理
+    </el-button>
+
+  </div>
+</template>
+<script>
+import router from "../router";
+import store from "../store";
+export default {
+  name:"Home",
+  data() {
+    return {};
+  },
+  methods: {
+    handleModuleJump(name, type, title) {
+      let that = this;
+      //更改侧边栏参数及title
+      this.$store.commit('SET_SYSTEMTYPE', type)
+      this.$store.commit('SET_SYSTEMTITLE', title)
+      //生成侧边栏   
+      store.dispatch("GenerateRoutes").then((accessRoutes) => {
+        console.log("accessRoutes=", accessRoutes);
+        // 根据roles权限生成可访问的路由表
+        router.addRoutes(accessRoutes); // 动态添加可访问路由表
+        that.$router.push({ name, query: { type, title } });
+      });
+    },
+  },
+};
+</script>

+ 1 - 0
ruoyi-ui/src/views/redirect.vue

@@ -1,6 +1,7 @@
 <script>
 export default {
   created() {
+    console.log("=======redirect=====")
     const { params, query } = this.$route
     const { path } = params
     this.$router.replace({ path: '/' + path, query })

+ 3 - 3
ruoyi-ui/src/views/system/dept/index.vue

@@ -56,14 +56,14 @@
       :default-expand-all="isExpandAll"
       :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
     >
-      <el-table-column prop="deptName" label="部门名称" width="260"></el-table-column>
-      <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
+      <el-table-column prop="deptName" label="部门名称" width="500"></el-table-column>
+      <el-table-column prop="orderNum" label="排序" width="100"></el-table-column>
       <el-table-column prop="status" label="状态" width="100">
         <template slot-scope="scope">
           <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
         </template>
       </el-table-column>
-      <el-table-column label="创建时间" align="center" prop="createTime" width="200">
+      <el-table-column label="创建时间" align="center" prop="createTime" width="150">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.createTime) }}</span>
         </template>

+ 6 - 0
ruoyi-ui/src/views/system/menu/index.vue

@@ -106,6 +106,11 @@
     <el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-row>
+          <el-col :span="24">
+            <el-form-item label="磁贴类型" prop="systemType">
+              <el-input v-model="form.systemType" placeholder="请输入磁贴类型" />
+            </el-form-item>
+          </el-col>
           <el-col :span="24">
             <el-form-item label="上级菜单" prop="parentId">
               <treeselect
@@ -366,6 +371,7 @@ export default {
     // 表单重置
     reset() {
       this.form = {
+        systemType:"",
         menuId: undefined,
         parentId: 0,
         menuName: undefined,

+ 4 - 0
ruoyi-ui/src/views/tool/build/index.vue

@@ -37,6 +37,10 @@
           </div>
         </div>
       </el-scrollbar>
+      
+      <div>
+        <i class="el-icon-edit" style="font-size:30px;color:green;"></i>
+      </div>
     </div>
 
     <div class="center-board">

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

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