Commit f3f6f1aa by 刘玉帅

Merge branch 'xq_rymp' of http://47.92.108.28/changchao/founder_vue into xq_rymp

parents e96f2c2b 2b309d08
/*
* @Author: your name
* @Date: 2021-08-27 14:14:36
* @LastEditTime: 2021-08-28 22:52:03
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\router\modules\index.js
*/
export default [ export default [
{ {
path: '/', path: '/',
...@@ -19,6 +27,105 @@ export default [ ...@@ -19,6 +27,105 @@ export default [
title: "工作桌面", title: "工作桌面",
auth: "5" auth: "5"
}, },
component: () => import("@/views/Home.vue") component: () => import("@/views/Home.vue"),
} children: [
{
path: "rwgl",
name: "rwgl",
redirect: '/Home/rwgl/rwglindex',
hidden: false,
icon: './img/rwgl.png',
meta: {
title: "任务管理",
auth: "5"
},
component: () => import("@/views/rwgl/rwgl.vue"),
children: [
{
path: "rwglindex",
name: "rwglindex",
hidden: true,
meta: {
title: "任务管理",
auth: "5"
},
component: () => import("@/views/rwgl/rwglindex.vue"),
},
{
path: "rwbd",
name: "rwbd",
hidden: false,
meta: {
title: "任务比对",
auth: "5"
},
component: () => import("@/views/rwgl/rwbd.vue"),
},
{
path: "sdxfrw",
name: "sdxfrw",
hidden: false,
meta: {
title: "手动下发任务",
auth: "5"
},
component: () => import("@/views/rwgl/sdxfrw.vue"),
},
{
path: "mptj",
name: "mptj",
hidden: false,
meta: {
title: "摸排统计",
auth: "5"
},
component: () => import("@/views/rwgl/mptj.vue"),
},
{
path: "rwthcl",
name: "rwthcl",
hidden: false,
meta: {
title: "任务退回处理",
auth: "5"
},
component: () => import("@/views/rwgl/rwthcl.vue"),
}
]
},
{
path: 'tjbb',
name: 'tjbb',
hidden: false,
icon: './img/tjbb.png',
meta: {
title: "统计报表",
auth: "5"
},
component: () => import("@/views/tjbb.vue"),
},
{
path: 'sjwgh',
name: 'sjwgh',
hidden: false,
icon: './img/sjwgh.png',
meta: {
title: "数据网格化",
auth: "5"
},
component: () => import("@/views/sjwgh.vue"),
},
{
path: 'jxkh',
name: 'jxkh',
hidden: false,
icon: './img/jxkh.png',
meta: {
title: "绩效考核",
auth: "5"
},
component: () => import("@/views/jxkh.vue"),
}
]
},
] ]
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-08-27 14:14:36
* @LastEditTime: 2021-08-28 23:07:31
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\Home.vue
-->
<template> <template>
<div class="home"></div> <div class="home">
<el-menu ref="menu" :default-active="menuActive" text-color="#CCCCCC" active-text-color="#ffffff" background-color="#16181F" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose" :collapse="isCollapse" @select="selectPath">
<div class="logo">
<img class="jh" src="../assets/img/jh.png" alt="">
<img v-show="!isCollapse" class="title" src="../assets/img/title.png" alt="">
</div>
<div v-for="(menu, i) in routes" :key="i">
<el-submenu :index="menu.name" v-if="menu.children">
<template slot="title">
<img :src="menu.icon" alt="">
<span v-show="!isCollapse">{{menu.meta.title}}</span>
</template>
<div v-for="item,index in menu.children" :key="index">
<el-menu-item v-if="!item.hidden" :index="item.name">{{item.meta.title}}</el-menu-item>
</div>
</el-submenu>
<el-menu-item :index="menu.name" v-else>
<img :src="menu.icon" alt="">
<span slot="title">{{menu.meta.title}}</span>
</el-menu-item>
</div>
</el-menu>
<div class="content-right">
<div class="header">
<div class="collapse" @click="switchCollapse">
<img v-if="isCollapse" :src="rightImg" alt="">
<img v-else :src="leftImg" alt="">
</div>
<div class="info">
<div class="search-icon">
<img src="../assets/img/search.png" alt="">
</div>
<div class="message">
<img src="../assets/img/info.png" alt="">
<div class="circle"></div>
</div>
<div class="avator">
<img src="../assets/img/defaultCar.jpg" alt="">
</div>
<div class="name">admin</div>
</div>
</div>
<div class="content">
<div class="breadcrumb">
<div @click="goManager" class="home-path path" :class="{active: $route.path=='/Home/rwgl/rwglindex'}">任务管理</div>
<div class="path" @click="changeRouter(item)" v-for="(item, i) in paths" :key="i" :class="{active: $route.path==item.path}">
<span>{{item.name}}</span>
<div class="closeIcon" @click.stop="closePaths(item.name)">×</div>
</div>
</div>
<!-- 路由加载 -->
<router-view></router-view>
</div>
</div>
</div>
</template> </template>
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import indexRoutes from "@/router/modules/index";
export default { export default {
name: "Home", name: "Home",
data() { data () {
return{} return {
routes: indexRoutes[2].children,
isCollapse: false,
leftImg: require('../assets/img/left.png'),
rightImg: require('../assets/img/right.png'),
paths: [
],
menuActive: ''
};
},
mounted () {
console.log(this.routes);
}, },
created() { methods: {
/**
* @description: 调回任务管理
* @param {*}
* @return {*}
*/
goManager() {
this.$router.push('/Home/rwgl/rwglindex')
this.menuActive = ''
},
/**
* @description: 菜单跳转路由
* @param {*} index
* @param {*} path
* @return {*}
*/
selectPath (index, path) {
this.$router.push({ name: index })
},
/**
* @description: 关闭标签
* @param {*}
* @return {*}
*/
closePaths (pathName) {
let res = this.paths.filter(item => {
return item.name != pathName
})
this.paths = res
console.log(pathName == this.$route.meta.title);
if(pathName == this.$route.meta.title) {
this.$router.push('/Home/rwgl/rwglindex')
this.$refs.menu.activeIndex = '';
}
},
/**
* @description: 跳转路由
* @param {*}
* @return {*}
*/
changeRouter (route) {
this.$router.push(route.path)
this.menuActive = route.routeName
},
/**
* @description: 展开收缩
* @param {*}
* @return {*}
*/
switchCollapse () {
this.isCollapse = !this.isCollapse
},
handleOpen (key, keyPath) {
console.log(key, keyPath);
},
handleClose (key, keyPath) {
console.log(key, keyPath);
}
}, },
computed: { computed: {
...mapGetters(["defaultGoodsImage", "userAuth"]) ...mapGetters(["defaultGoodsImage", "userAuth"])
}, },
methods: { watch: {
$route (newValue, oldValue) {
if (newValue.path != '/Home/rwgl/rwglindex') {
if (this.paths.length == 0) {
this.paths.push({ name: newValue.meta.title, path: newValue.path, routeName: newValue.name })
} else {
let obj = {
name: newValue.meta.title,
path: newValue.path,
routeName: newValue.name
}
if (JSON.stringify(this.paths).indexOf(JSON.stringify(obj)) === -1) {
this.paths.push(obj)
}
}
}
}
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss" scoped>
.el-menu-vertical-demo:not(.el-menu--collapse) {
width: 280px;
min-height: 400px;
height: 100vh;
.el-submenu, .el-menu-item {
img {
width: 16px;
height: 14px;
}
span {
margin-left: 8px;
}
}
}
.el-menu--collapse {
height: 100vh;
.el-submenu, .el-menu-item {
img {
width: 16px;
height: 14px;
}
span {
margin-left: 8px;
}
}
/deep/.el-submenu__title, /deep/ .el-tooltip {
display: flex !important;
align-items: center;
justify-content: center;
}
.el-submenu {
/deep/ .el-submenu__icon-arrow.el-icon-arrow-right {
display: none;
}
}
}
.el-menu-item.is-active {
background-color: rgba(31, 40, 56, 1) !important;
border-right: 4px solid #006AFF;
}
.home {
display: flex;
background: #F6F8FA;
overflow: hidden;
.logo {
display: flex;
justify-content: center;
align-items: center;
margin-top: 22px;
margin-bottom: 10px;
.jh {
width: 30px;
height: 31px;
}
.title {
width: 191px;
height: 24px;
margin-left: 11px;
}
}
.fz {
position: fixed;
bottom: 32px;
left: 26px;
width: 137px;
height: 17px;
display: flex;
img {
object-fit: contain;
}
}
.content-right {
flex: 1;
display: flex;
flex-direction: column;
.header {
height: 64px;
background: #FFFFFF;
padding-left: 24px;
padding-right: 24px;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
.collapse {
width: 13.14px;
height: 12.99px;
cursor: pointer;
display: flex;
img {
object-fit: contain;
}
}
.info {
display: flex;
align-items: center;
cursor: pointer;
.search-icon {
width: 16px;
height: 16px;
display: flex;
img {
object-fit: contain;
}
}
.message {
cursor: pointer;
width: 16px;
height: 16px;
display: flex;
position: relative;
margin-left: 24px;
img {
object-fit: contain;
}
.circle {
position: absolute;
right: -1px;
top: -2px;
width: 8px;
height: 8px;
border-radius: 50%;
background: #FA6400;
border: 1px solid #FFFFFF;
}
}
.avator {
cursor: pointer;
width: 38px;
height: 38px;
display: flex;
border-radius: 50%;
margin-left: 33px;
img {
object-fit: cover;
border-radius: 50%;
}
}
.name {
cursor: pointer;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #333333;
margin-left: 10px;
}
}
}
.content {
flex: 1;
background: #FFFFFF;
border-radius: 8px;
margin: 24px;
.breadcrumb {
display: flex;
height: 47px;
border-bottom: 1px solid #EEEEEE;
.path {
position: relative;
cursor: pointer;
box-sizing: border-box;
height: 47px;
padding: 15px 38px;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #666666;
&:hover {
.closeIcon {
display: block;
}
}
.closeIcon {
position: absolute;
top: 0;
right: 0;
display: none;
}
}
.active {
border-bottom: 2px solid #006AFF;
color: #0077FF;
}
}
}
}
}
</style> </style>
<!--
* @Author: your name
* @Date: 2021-08-28 19:38:56
* @LastEditTime: 2021-08-28 19:38:57
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\jxkh.vue
-->
<template>
<div>
绩效考核
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-08-28 19:35:14
* @LastEditTime: 2021-08-28 19:35:14
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\rwgl\mptj.vue
-->
<template>
<div>
摸排统计
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-08-28 19:08:15
* @LastEditTime: 2021-08-28 19:08:15
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\rwbd.vue
-->
<template>
<div>
任务比对
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-08-28 19:05:40
* @LastEditTime: 2021-08-28 21:29:09
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\rwgl.vue
-->
<template>
<div>
<router-view></router-view>
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-08-28 21:28:08
* @LastEditTime: 2021-08-28 21:28:08
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\rwgl\rwglindex.vue
-->
<template>
<div>
任务管理
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-08-28 19:36:38
* @LastEditTime: 2021-08-28 19:36:39
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\rwgl\rwthcl.vue
-->
<template>
<div>
任务退回处理
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-08-28 19:34:24
* @LastEditTime: 2021-08-28 19:34:41
* @LastEditors: your name
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\rwgl\sdxfrw.vue
-->
<template>
<div>
手动下发任务
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-08-28 19:38:23
* @LastEditTime: 2021-08-28 19:38:24
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\sjwgh.vue
-->
<template>
<div>
数据网格化
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<!--
* @Author: your name
* @Date: 2021-08-28 19:37:47
* @LastEditTime: 2021-08-28 19:37:47
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \founder_vue\src\views\tjbb.vue
-->
<template>
<div>
统计报表
</div>
</template>
<script>
export default {
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment