Commit a38491a7 by dongjipeng

左侧菜单修改

parent e2b7d0e5
......@@ -10,49 +10,23 @@
:unique-opened="true"
style="height: 100%"
active-text-color="#4A90E2">
<el-submenu index="1">
<template slot="title"><!--<i class="el-icon-message"></i>--> <div class="tl pl20">首页管理</div></template>
<el-menu-item index="/home/bannerManage"><div class="tl pl20">banner管理</div></el-menu-item>
<el-menu-item :index="'/home/' + activityPath"><div class="tl pl20">活动宣传</div></el-menu-item>
<el-menu-item index="/home/commonLink"><div class="tl pl20">常用链接</div></el-menu-item>
<el-menu-item index="/home/messageManagement"><div class="tl pl20">留言管理</div></el-menu-item>
</el-submenu>
<el-submenu index="2">
<template slot="title"><div class="tl pl20">幸福餐厅</div></template>
<el-menu-item index="/restaurant/rationalRestaurant"><div class="tl pl20">全国餐厅</div></el-menu-item>
<el-menu-item index="/restaurant/restaurantMenus"><div class="tl pl20">餐厅菜单</div></el-menu-item>
<!--<el-menu-item index="/restaurant/foodVideo"><div class="tl pl20">美食视频</div></el-menu-item>-->
<el-menu-item index="/restaurant/solarCalendar"><div class="tl pl20">节气日历</div></el-menu-item>
<el-menu-item index="/restaurant/themeActivities"><div class="tl pl20">主题活动</div></el-menu-item>
</el-submenu>
<el-submenu index="3">
<template slot="title"><div class="tl pl20">幸福农场</div></template>
<el-menu-item index="/farm/farmWonderful"><div class="tl pl20">农场精彩</div></el-menu-item>
<el-menu-item index="/farm/specialEvents"><div class="tl pl20">特色活动</div></el-menu-item>
</el-submenu>
<el-submenu index="4">
<template slot="title"><div class="tl pl20">幸福健身</div></template>
<el-menu-item index="/fitness/eventCalendar"><div class="tl pl20">赛事日历</div></el-menu-item>
<el-menu-item index="/fitness/happyRunning"><div class="tl pl20">幸福长跑</div></el-menu-item>
</el-submenu>
<el-menu-item index="/community"><div class="tl pl20">幸福社团</div></el-menu-item>
<el-menu-item index="/shop"><div class="tl pl20">幸福商城</div></el-menu-item>
<el-menu-item index="/office"><div class="tl pl20">无忧办公</div></el-menu-item>
<el-submenu index="5">
<template slot="title"><div class="tl pl20">幸福洗衣</div></template>
<el-menu-item index="/wash/washBranches"><div class="tl pl20">洗衣网点</div></el-menu-item>
<el-menu-item index="/wash/newBranches"><div class="tl pl20">网点编辑</div></el-menu-item>
<el-menu-item index="/wash/commonSense"><div class="tl pl20">洗衣小常识</div></el-menu-item>
</el-submenu>
<el-submenu index="6">
<template slot="title"><div class="tl pl20">幸福差旅</div></template>
<el-menu-item index="/travel/hotelList"><div class="tl pl20">协议酒店</div></el-menu-item>
<el-menu-item index="/travel/hotelAdd"><div class="tl pl20">编辑酒店</div></el-menu-item>
</el-submenu>
<el-menu-item index="/mom"><div class="tl pl20">萌妈工作室</div></el-menu-item>
<el-menu-item index="/randomHouse"><div class="tl pl20">幸福书屋</div></el-menu-item>
<el-menu-item index="/pass"><div class="tl pl20">幸福传递</div></el-menu-item>
<el-menu-item index="/administrator"><div class="tl pl20">管理员</div></el-menu-item>
<template v-for="route in $router.options.routes[0].children">
<template v-if="route.children && route.children.length">
<el-submenu :index="route.path" :key="route.path">
<template slot="title">
<div class="tl pl20">{{route.meta.title}}</div>
</template>
<el-menu-item v-for="(item, index) in getRouterMap(route.children)" :key="index" :index="item.path">
<div class="tl pl20">{{item.meta.title}}</div>
</el-menu-item>
</el-submenu>
</template>
<template v-else>
<el-menu-item :index="route.path" :key="route.path">
<div class="tl pl20">{{route.meta.title}}</div>
</el-menu-item>
</template>
</template>
</el-menu>
</el-aside>
<el-main class="main">
......@@ -66,7 +40,6 @@
</el-main>
</el-container>
</el-container>
</template>
<script>
......@@ -83,6 +56,7 @@ export default {
},
mounted () {
this.getRouter()
console.log(this.$router.options.routes[0].children)
},
methods: {
getRouter () {
......@@ -91,6 +65,10 @@ export default {
} else {
this.guideShow = false
}
},
getRouterMap (routes) {
const r = routes.filter(item => item.meta.menuTab)
return r
}
},
computed: {
......
<template>
<el-container style="height: 100%">
<Header></Header>
<el-container class="el_content">
<el-aside width="220px">
<el-menu
menu-trigger="hover"
:default-active="$route.path"
:router="true"
:unique-opened="true"
style="height: 100%"
active-text-color="#4A90E2">
<el-submenu index="1">
<template slot="title"><div class="tl pl20">首页管理</div></template>
<el-menu-item index="/home/bannerManage"><div class="tl pl20">banner管理</div></el-menu-item>
<el-menu-item :index="'/home/' + activityPath"><div class="tl pl20">活动宣传</div></el-menu-item>
<el-menu-item index="/home/commonLink"><div class="tl pl20">常用链接</div></el-menu-item>
<el-menu-item index="/home/messageManagement"><div class="tl pl20">留言管理</div></el-menu-item>
</el-submenu>
<el-submenu index="2">
<template slot="title"><div class="tl pl20">幸福餐厅</div></template>
<el-menu-item index="/restaurant/rationalRestaurant"><div class="tl pl20">全国餐厅</div></el-menu-item>
<el-menu-item index="/restaurant/restaurantMenus"><div class="tl pl20">餐厅菜单</div></el-menu-item>
<el-menu-item index="/restaurant/solarCalendar"><div class="tl pl20">节气日历</div></el-menu-item>
<el-menu-item index="/restaurant/themeActivities"><div class="tl pl20">主题活动</div></el-menu-item>
</el-submenu>
<el-submenu index="3">
<template slot="title"><div class="tl pl20">幸福农场</div></template>
<el-menu-item index="/farm/farmWonderful"><div class="tl pl20">农场精彩</div></el-menu-item>
<el-menu-item index="/farm/specialEvents"><div class="tl pl20">特色活动</div></el-menu-item>
</el-submenu>
<el-submenu index="4">
<template slot="title"><div class="tl pl20">幸福健身</div></template>
<el-menu-item index="/fitness/eventCalendar"><div class="tl pl20">赛事日历</div></el-menu-item>
<el-menu-item index="/fitness/happyRunning"><div class="tl pl20">幸福长跑</div></el-menu-item>
<el-menu-item index="/fitness/fitactivity"><div class="tl pl20">健身活动</div></el-menu-item>
</el-submenu>
<el-menu-item index="/community"><div class="tl pl20">幸福社团</div></el-menu-item>
<el-menu-item index="/shop"><div class="tl pl20">幸福商城</div></el-menu-item>
<el-menu-item index="/office"><div class="tl pl20">无忧办公</div></el-menu-item>
<el-submenu index="5">
<template slot="title"><div class="tl pl20">幸福洗衣</div></template>
<el-menu-item index="/wash/washBranches"><div class="tl pl20">洗衣网点</div></el-menu-item>
<el-menu-item index="/wash/newBranches"><div class="tl pl20">网点编辑</div></el-menu-item>
<el-menu-item index="/wash/commonSense"><div class="tl pl20">洗衣小常识</div></el-menu-item>
</el-submenu>
<el-submenu index="6">
<template slot="title"><div class="tl pl20">幸福差旅</div></template>
<el-menu-item index="/travel/hotelList"><div class="tl pl20">协议酒店</div></el-menu-item>
<el-menu-item index="/travel/hotelAdd"><div class="tl pl20">编辑酒店</div></el-menu-item>
</el-submenu>
<el-menu-item index="/mom"><div class="tl pl20">萌妈工作室</div></el-menu-item>
<el-menu-item index="/randomHouse"><div class="tl pl20">幸福书屋</div></el-menu-item>
<el-menu-item index="/pass"><div class="tl pl20">幸福传递</div></el-menu-item>
<el-menu-item index="/administrator"><div class="tl pl20">管理员</div></el-menu-item>
</el-menu>
</el-aside>
<el-main class="main">
<bread-crumb></bread-crumb>
<transition name="fade" mode="out-in">
<div class="main_inner">
<div v-if="guideShow" style="width: 100%; height: 100%"><Guide /></div>
<router-view v-else></router-view>
</div>
</transition>
</el-main>
</el-container>
</el-container>
</template>
<script>
import Header from '../components/Header'
import Guide from '../components/Guide'
import BreadCrumb from '../components/breadcrumb'
export default {
name: 'layout',
data () {
return {
guideShow: false
}
},
mounted () {
this.getRouter()
console.log(this.$router)
},
methods: {
getRouter () {
if (this.$route.name === 'layout') {
this.guideShow = true
} else {
this.guideShow = false
}
}
},
computed: {
activityPath () {
if (this.$route.path === '/home/textEditing') {
return 'textEditing'
} else {
return 'activityPropaganda'
}
}
},
watch: {
$route (to, from) {
this.getRouter()
}
},
components: {
Header,
BreadCrumb,
Guide
}
}
</script>
<style scoped lang="scss">
.el_content {padding-top: 70px; width: 100%; box-sizing: border-box}
.main {background: #E5E9F2;
.main_inner {padding: 20px 30px; box-sizing: border-box; background-color: #ffffff; min-height: calc(100% - 34px)}
}
</style>
......@@ -13,3 +13,19 @@ export default function getCookie (url) {
window.location.href = url + 'LoginLight.aspx?flag=3&systemCode=CRS271&RetutnUrl=' + h
}
}
// function getCookie () {
// if (document.cookie.length > 0) {
// console.log('1')
// if (document.cookie.indexOf('AuthUser_LoginId') === -1 || document.cookie.indexOf('AuthUser_AuthNum') === -1 ||
// document.cookie.indexOf('AuthUser_AuthToken') === -1 || document.cookie.indexOf('AuthUser_LoginId') === -1
// ) {
// console.log('2')
// let h = window.location.href
// window.location.href = ssoHttp + 'LoginLight.aspx?flag=3&systemCode=CRS271&RetutnUrl=' + h
// }
// } else {
// let h = window.location.href
// window.location.href = ssoHttp + 'LoginLight.aspx?flag=3&systemCode=CRS271&RetutnUrl=' + h
// }
// }
......@@ -13,6 +13,7 @@ import './element-variables.scss'
import rules from './util/validator'
import '../src/assets/css/reset.scss'
import '../src/assets/css/main.scss'
import getCookie from './cookie'
Vue.use(VueQuillEditor)
Vue.use(ElementUi, { size: 'small' })
......@@ -20,14 +21,11 @@ Vue.prototype.$rules = rules
Vue.prototype.$axios = axios
Vue.prototype.$qs = QS
axios.defaults.timeout = 50000
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
axios.defaults.withCredentials = true
const DOMAIN_NAME = 'cfldcn'
// const DOMAIN_NAME = 'cfldpe'
var ssoHttp = ''
if (process.env.NODE_ENV === 'development') { // 开发
ssoHttp = 'http://sso.' + DOMAIN_NAME + '.com/'
Vue.prototype.$ssoHttp = ssoHttp
......@@ -37,50 +35,44 @@ if (process.env.NODE_ENV === 'development') { // 开发
} else { // 生产
ssoHttp = 'http://sso.' + DOMAIN_NAME + '.com/'
Vue.prototype.$ssoHttp = ssoHttp
getCookie()
// cookie
getCookie(ssoHttp)
axios.defaults.baseURL = 'http://happy.' + DOMAIN_NAME + '.com/admin/'
Vue.prototype.$baseURL = 'http://happy.' + DOMAIN_NAME + '.com/admin/'
Vue.prototype.$imgUrl = 'http://happy.' + DOMAIN_NAME + '.com/admin/images/'
}
function getCookie () {
if (document.cookie.length > 0) {
console.log('1')
if (document.cookie.indexOf('AuthUser_LoginId') === -1 || document.cookie.indexOf('AuthUser_AuthNum') === -1 ||
document.cookie.indexOf('AuthUser_AuthToken') === -1 || document.cookie.indexOf('AuthUser_LoginId') === -1
) {
console.log('2')
let h = window.location.href
window.location.href = ssoHttp + 'LoginLight.aspx?flag=3&systemCode=CRS271&RetutnUrl=' + h
}
} else {
let h = window.location.href
window.location.href = ssoHttp + 'LoginLight.aspx?flag=3&systemCode=CRS271&RetutnUrl=' + h
// Loading效果
const elemLoading = {
loading: null,
start (opt) {
this.loading = Vue.prototype.$loading(opt)
},
end () {
this.loading && this.loading.close()
}
}
var loading
function startLoading () {
loading = Vue.prototype.$loading({
axios.defaults.timeout = 50000
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
axios.defaults.withCredentials = true
// 请求拦截器
axios.interceptors.request.use(request => {
elemLoading.start({
lock: true,
text: '加载中...',
fullscreen: true,
background: 'rgba(255, 255, 255, 0)'
})
}
function endLoading () {
loading.close()
}
// 请求拦截器
axios.interceptors.request.use(request => {
startLoading()
return request
}, err => {
return Promise.reject(err)
})
// 响应拦截器
axios.interceptors.response.use(function (response) {
endLoading()
elemLoading.end()
if (response.status === 302) {
let h = window.location.href
window.location.href = ssoHttp + 'LoginLight.aspx?flag=3&systemCode=CRS117&RetutnUrl=' + h
......
<template>
<div>
<!-- 活动审核:活动标题 账号 姓名 部门 活动图片 公里数 实际公里数(文本框) 审核按钮 -->
<el-table
:data="photoList"
border
header-cell-class-name="table-header-row">
<el-table-column
prop="activityTitle"
label="活动标题">
</el-table-column>
<el-table-column
prop="activityCount"
width="180"
label="账号">
</el-table-column>
<el-table-column
prop="activityName"
width="180"
label="姓名">
</el-table-column>
<el-table-column
prop="mcont"
label="部门">
</el-table-column>
<el-table-column
align="center"
width="400"
label="活动照片">
<template scope="scope">
<img :src="$imgUrl + scope.row.picturePath" width="220" height="60" style="margin: auto" />
</template>
</el-table-column>
<el-table-column
prop="gongli"
width="100"
align="center"
label="公里数">
</el-table-column>
<el-table-column
prop="sjgongli"
width="200"
label="实际公里数">
<template>
<el-input class="width100" placeholder="输入实际公里数"></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="100">
<template>
<el-button type="primary" size="small" >审核</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination" v-if="photoList && photoList.length">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-size="pageSize"
layout="prev, pager, next"
:total="totalPage">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
name: 'activityShenhe',
data () {
return {
photoList: [
{
activityTitle: 'daniaanafnanjkvakak你简单',
activityCount: 'saasdsasd',
activityName: '张三',
gongli: '100',
mcont: '华夏事业部'
},
{
activityTitle: 'daniaanafnanjkvakak你简单',
activityCount: 'saasdsasd',
activityName: '张三',
gongli: '123',
mcont: '华夏事业部'
}
]
}
}
}
</script>
<style lang="scss" scoped>
</style>
<template>
<div>
<div class="btn-warp tr mb20">
<el-button type="primary" size="small">导出</el-button>
<el-button type="primary" class="el-button-link"><router-link to="/fitness/activityShenhe" style="color: #fff">活动审核</router-link></el-button>
</div>
<el-table
:data="photoList"
border
header-cell-class-name="table-header-row">
<el-table-column
prop="activityTitle"
label="活动标题">
</el-table-column>
<el-table-column
prop="activityTime"
align="center"
width="140"
label="活动时间">
</el-table-column>
<el-table-column
prop="activityCount"
width="180"
label="账号">
</el-table-column>
<el-table-column
prop="activityName"
width="150"
label="姓名">
</el-table-column>
<el-table-column
prop="time"
align="center"
width="140"
label="时间">
</el-table-column>
<el-table-column
prop="mcont"
label="部门">
</el-table-column>
</el-table>
<div class="pagination" v-if="photoList && photoList.length">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-size="pageSize"
layout="prev, pager, next"
:total="totalPage">
</el-pagination>
</div>
</div>
</template>
<script>
export default {
name: 'fitActivity',
data () {
return {
photoList: [
{
activityTitle: 'daniaanafnanjkvakak你简单',
activityTime: '2020-04-27',
activityCount: 'saasdsasd',
activityName: '张三',
time: '2020-04-27',
mcont: '华夏事业部'
},
{
activityTitle: 'daniaanafnanjkvakak你简单',
activityTime: '2020-04-27',
activityCount: 'saasdsasd',
activityName: '张三',
time: '2020-04-27',
mcont: '华夏事业部'
}
]
}
}
}
</script>
<style lang="scss" scoped>
</style>
......@@ -30,16 +30,6 @@
<img :src="$imgUrl + scope.row.picturePath" width="220" height="60" style="margin: auto" />
</template>
</el-table-column>
<!--<el-table-column
prop="pictureOriginalName"
align="center"
label="名称">
</el-table-column>-->
<!--<el-table-column
prop="pictureOrder"
align="center"
label="图片排序">
</el-table-column>-->
<el-table-column
prop="pictureSize"
align="right"
......
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 sign in to comment