Commit a38491a7 by dongjipeng

左侧菜单修改

parent e2b7d0e5
...@@ -10,49 +10,23 @@ ...@@ -10,49 +10,23 @@
:unique-opened="true" :unique-opened="true"
style="height: 100%" style="height: 100%"
active-text-color="#4A90E2"> active-text-color="#4A90E2">
<el-submenu index="1"> <template v-for="route in $router.options.routes[0].children">
<template slot="title"><!--<i class="el-icon-message"></i>--> <div class="tl pl20">首页管理</div></template> <template v-if="route.children && route.children.length">
<el-menu-item index="/home/bannerManage"><div class="tl pl20">banner管理</div></el-menu-item> <el-submenu :index="route.path" :key="route.path">
<el-menu-item :index="'/home/' + activityPath"><div class="tl pl20">活动宣传</div></el-menu-item> <template slot="title">
<el-menu-item index="/home/commonLink"><div class="tl pl20">常用链接</div></el-menu-item> <div class="tl pl20">{{route.meta.title}}</div>
<el-menu-item index="/home/messageManagement"><div class="tl pl20">留言管理</div></el-menu-item> </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> </el-submenu>
<el-submenu index="2"> </template>
<template slot="title"><div class="tl pl20">幸福餐厅</div></template> <template v-else>
<el-menu-item index="/restaurant/rationalRestaurant"><div class="tl pl20">全国餐厅</div></el-menu-item> <el-menu-item :index="route.path" :key="route.path">
<el-menu-item index="/restaurant/restaurantMenus"><div class="tl pl20">餐厅菜单</div></el-menu-item> <div class="tl pl20">{{route.meta.title}}</div>
<!--<el-menu-item index="/restaurant/foodVideo"><div class="tl pl20">美食视频</div></el-menu-item>--> </el-menu-item>
<el-menu-item index="/restaurant/solarCalendar"><div class="tl pl20">节气日历</div></el-menu-item> </template>
<el-menu-item index="/restaurant/themeActivities"><div class="tl pl20">主题活动</div></el-menu-item> </template>
</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>
</el-menu> </el-menu>
</el-aside> </el-aside>
<el-main class="main"> <el-main class="main">
...@@ -66,7 +40,6 @@ ...@@ -66,7 +40,6 @@
</el-main> </el-main>
</el-container> </el-container>
</el-container> </el-container>
</template> </template>
<script> <script>
...@@ -83,6 +56,7 @@ export default { ...@@ -83,6 +56,7 @@ export default {
}, },
mounted () { mounted () {
this.getRouter() this.getRouter()
console.log(this.$router.options.routes[0].children)
}, },
methods: { methods: {
getRouter () { getRouter () {
...@@ -91,6 +65,10 @@ export default { ...@@ -91,6 +65,10 @@ export default {
} else { } else {
this.guideShow = false this.guideShow = false
} }
},
getRouterMap (routes) {
const r = routes.filter(item => item.meta.menuTab)
return r
} }
}, },
computed: { 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) { ...@@ -13,3 +13,19 @@ export default function getCookie (url) {
window.location.href = url + 'LoginLight.aspx?flag=3&systemCode=CRS271&RetutnUrl=' + h 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' ...@@ -13,6 +13,7 @@ import './element-variables.scss'
import rules from './util/validator' import rules from './util/validator'
import '../src/assets/css/reset.scss' import '../src/assets/css/reset.scss'
import '../src/assets/css/main.scss' import '../src/assets/css/main.scss'
import getCookie from './cookie'
Vue.use(VueQuillEditor) Vue.use(VueQuillEditor)
Vue.use(ElementUi, { size: 'small' }) Vue.use(ElementUi, { size: 'small' })
...@@ -20,14 +21,11 @@ Vue.prototype.$rules = rules ...@@ -20,14 +21,11 @@ Vue.prototype.$rules = rules
Vue.prototype.$axios = axios Vue.prototype.$axios = axios
Vue.prototype.$qs = QS 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 = 'cfldcn'
// const DOMAIN_NAME = 'cfldpe' // const DOMAIN_NAME = 'cfldpe'
var ssoHttp = '' var ssoHttp = ''
if (process.env.NODE_ENV === 'development') { // 开发 if (process.env.NODE_ENV === 'development') { // 开发
ssoHttp = 'http://sso.' + DOMAIN_NAME + '.com/' ssoHttp = 'http://sso.' + DOMAIN_NAME + '.com/'
Vue.prototype.$ssoHttp = ssoHttp Vue.prototype.$ssoHttp = ssoHttp
...@@ -37,50 +35,44 @@ if (process.env.NODE_ENV === 'development') { // 开发 ...@@ -37,50 +35,44 @@ if (process.env.NODE_ENV === 'development') { // 开发
} else { // 生产 } else { // 生产
ssoHttp = 'http://sso.' + DOMAIN_NAME + '.com/' ssoHttp = 'http://sso.' + DOMAIN_NAME + '.com/'
Vue.prototype.$ssoHttp = ssoHttp Vue.prototype.$ssoHttp = ssoHttp
getCookie() // cookie
getCookie(ssoHttp)
axios.defaults.baseURL = 'http://happy.' + DOMAIN_NAME + '.com/admin/' axios.defaults.baseURL = 'http://happy.' + DOMAIN_NAME + '.com/admin/'
Vue.prototype.$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/' Vue.prototype.$imgUrl = 'http://happy.' + DOMAIN_NAME + '.com/admin/images/'
} }
function getCookie () { // Loading效果
if (document.cookie.length > 0) { const elemLoading = {
console.log('1') loading: null,
if (document.cookie.indexOf('AuthUser_LoginId') === -1 || document.cookie.indexOf('AuthUser_AuthNum') === -1 || start (opt) {
document.cookie.indexOf('AuthUser_AuthToken') === -1 || document.cookie.indexOf('AuthUser_LoginId') === -1 this.loading = Vue.prototype.$loading(opt)
) { },
console.log('2') end () {
let h = window.location.href this.loading && this.loading.close()
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
} }
} }
var loading axios.defaults.timeout = 50000
function startLoading () { axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8'
loading = Vue.prototype.$loading({ axios.defaults.withCredentials = true
// 请求拦截器
axios.interceptors.request.use(request => {
elemLoading.start({
lock: true, lock: true,
text: '加载中...', text: '加载中...',
fullscreen: true, fullscreen: true,
background: 'rgba(255, 255, 255, 0)' background: 'rgba(255, 255, 255, 0)'
}) })
}
function endLoading () {
loading.close()
}
// 请求拦截器
axios.interceptors.request.use(request => {
startLoading()
return request return request
}, err => { }, err => {
return Promise.reject(err) return Promise.reject(err)
}) })
// 响应拦截器 // 响应拦截器
axios.interceptors.response.use(function (response) { axios.interceptors.response.use(function (response) {
endLoading() elemLoading.end()
if (response.status === 302) { if (response.status === 302) {
let h = window.location.href let h = window.location.href
window.location.href = ssoHttp + 'LoginLight.aspx?flag=3&systemCode=CRS117&RetutnUrl=' + h window.location.href = ssoHttp + 'LoginLight.aspx?flag=3&systemCode=CRS117&RetutnUrl=' + h
......
...@@ -43,6 +43,9 @@ import Administrator from './views/administrator/index' ...@@ -43,6 +43,9 @@ import Administrator from './views/administrator/index'
import Shop from './views/shop/index.vue' import Shop from './views/shop/index.vue'
import FitActivity from './views/fitness/FitActivity.vue'
import ActivityShenhe from './views/fitness/ActivityShenhe.vue'
Vue.use(Router) Vue.use(Router)
export default new Router({ export default new Router({
...@@ -56,6 +59,7 @@ export default new Router({ ...@@ -56,6 +59,7 @@ export default new Router({
path: '/home', path: '/home',
name: 'home', name: 'home',
component: Home, component: Home,
redirect: '/home/bannerManage',
meta: { meta: {
title: '首页管理' title: '首页管理'
}, },
...@@ -65,17 +69,10 @@ export default new Router({ ...@@ -65,17 +69,10 @@ export default new Router({
name: 'bannerManage', name: 'bannerManage',
component: BannerManage, component: BannerManage,
meta: { meta: {
title: 'banner管理' title: 'banner管理',
menuTab: true
} }
}, },
// {
// path: '/home/bannerEdit',
// name: 'bannerEdit',
// component: BannerEdit,
// meta: {
// title: '编辑banner'
// }
// },
{ {
path: '/home/bannerAdd', path: '/home/bannerAdd',
name: 'bannerAdd', name: 'bannerAdd',
...@@ -89,7 +86,8 @@ export default new Router({ ...@@ -89,7 +86,8 @@ export default new Router({
name: 'activityPropaganda', name: 'activityPropaganda',
component: ActivityPropaganda, component: ActivityPropaganda,
meta: { meta: {
title: '活动宣传' title: '活动宣传',
menuTab: true
} }
}, },
{ {
...@@ -113,7 +111,8 @@ export default new Router({ ...@@ -113,7 +111,8 @@ export default new Router({
name: 'commonLink', name: 'commonLink',
component: CommonLink, component: CommonLink,
meta: { meta: {
title: '常用链接' title: '常用链接',
menuTab: true
} }
}, },
{ {
...@@ -121,78 +120,89 @@ export default new Router({ ...@@ -121,78 +120,89 @@ export default new Router({
name: 'messageManagement', name: 'messageManagement',
component: MessageManagement, component: MessageManagement,
meta: { meta: {
title: '留言管理' title: '留言管理',
menuTab: true
} }
} }
] ]
}, },
{ {
path: '/wash', path: '/restaurant',
name: 'wash', name: 'restaurant',
component: Wash, component: r => { require(['./views/restaurant/index'], r) },
meta: { meta: {
title: '幸福洗衣' title: '幸福餐厅'
}, },
children: [ children: [
{ {
path: '/wash/washBranches', path: '/restaurant/rationalRestaurant',
name: 'washBranches', name: 'rationalRestaurant',
component: WashBranches, component: r => { require(['./views/restaurant/NationalRestaurant'], r) },
meta: { meta: {
title: '洗衣网点' title: '全国餐厅',
menuTab: true
} }
}, },
{ {
path: '/wash/newBranches', path: '/restaurant/restaurantAdd',
name: 'newBranches', name: 'restaurantAdd',
component: NewBranches, component: r => { require(['./views/restaurant/RestaurantAdd'], r) },
meta: { meta: {
title: '网点编辑' title: '新增餐厅'
} }
}, },
{ {
path: '/wash/commonSense', path: '/restaurant/restaurantMenus',
name: 'commonSense', name: 'restaurantMenus',
component: CommonSense, component: r => { require(['./views/restaurant/RestaurantMenus'], r) },
meta: { meta: {
title: '洗衣小常识' title: '餐厅菜单',
menuTab: true
} }
}
]
}, },
{ {
path: '/travel', path: '/restaurant/foodVideo',
name: 'travel', name: 'foodVideo',
component: Travel, component: r => { require(['./views/restaurant/FoodVideo'], r) },
meta: { meta: {
title: '幸福差旅' title: '美食视频'
}
}, },
children: [
{ {
path: '/travel/hotelList', path: '/restaurant/solarCalendar',
name: 'hotelList', name: 'solarCalendar',
component: HotelList, component: r => { require(['./views/restaurant/SolarCalendar'], r) },
meta: { meta: {
title: '差旅列表' title: '节气日历',
menuTab: true
} }
}, },
{ {
path: '/travel/hotelAdd', path: '/restaurant/newSolar',
name: 'hotelAdd', name: 'newSolar',
component: HotelAdd, component: r => { require(['./views/restaurant/NewSolar'], r) },
meta: { meta: {
title: '编辑酒店' title: '节气日历'
} }
},
{
path: '/restaurant/themeActivities',
name: 'themeActivities',
component: r => { require(['./views/restaurant/ThemeActivities'], r) },
meta: {
title: '主题活动',
menuTab: true
} }
]
}, },
{ {
path: '/randomHouse', path: '/restaurant/restaurantClassify',
name: 'randomHouse', name: 'restaurantClassify',
component: RandomHouse, component: r => { require(['./views/restaurant/RestaurantClassify'], r) },
meta: { meta: {
title: '幸福书屋' title: '新增图片'
}
} }
]
}, },
{ {
path: '/farm', path: '/farm',
...@@ -207,7 +217,8 @@ export default new Router({ ...@@ -207,7 +217,8 @@ export default new Router({
name: 'farmWonderful', name: 'farmWonderful',
component: FarmWonderful, component: FarmWonderful,
meta: { meta: {
title: '农场精彩' title: '农场精彩',
menuTab: true
} }
}, },
{ {
...@@ -215,157 +226,183 @@ export default new Router({ ...@@ -215,157 +226,183 @@ export default new Router({
name: 'specialEvents', name: 'specialEvents',
component: SpecialEvents, component: SpecialEvents,
meta: { meta: {
title: '特色活动' title: '特色活动',
menuTab: true
} }
} }
] ]
}, },
{ {
path: '/office', path: '/fitness',
name: 'office', name: 'fitness',
component: Office, component: Fitness,
redirect: '/fitness/eventCalendar',
meta: { meta: {
title: '无忧办公' title: '幸福健身'
},
children: [
{
path: '/fitness/eventCalendar',
name: 'eventCalendar',
component: EventCalendar,
meta: {
title: '赛事日历',
menuTab: true
} }
}, },
{ {
path: '/shop', path: '/fitness/happyRunning',
name: 'shop', name: 'happyRunning',
component: Shop, component: HappyRunning,
meta: { meta: {
title: '幸福商城' title: '幸福长跑',
menuTab: true
} }
}, },
{ {
path: '/mom', path: '/fitness/fitactivity',
name: 'mom', name: 'fitActivity',
component: Mom, component: FitActivity,
meta: { meta: {
title: '萌妈工作室' title: '健身活动',
menuTab: true
} }
}, },
{ {
path: '/pass', path: '/fitness/activityShenhe',
name: 'pass', name: 'activityShenhe',
component: Pass, component: ActivityShenhe,
meta: { meta: {
title: '幸福传递' title: '活动审核'
} }
}
]
}, },
{ {
path: '/community', path: '/community',
name: 'community', name: 'community',
component: Community, component: Community,
meta: { meta: {
title: '幸福传递' title: '幸福社团',
menuTab: true
} }
}, },
{ {
path: '/fitness', path: '/shop',
name: 'fitness', name: 'shop',
component: Fitness, component: Shop,
meta: {
title: '幸福健身'
},
children: [
{
path: '/fitness/eventCalendar',
name: 'eventCalendar',
component: EventCalendar,
meta: { meta: {
title: '赛事日历' title: '幸福商城',
menuTab: true
} }
}, },
{ {
path: '/fitness/happyRunning', path: '/office',
name: 'happyRunning', name: 'office',
component: HappyRunning, component: Office,
meta: { meta: {
title: '幸福长跑' title: '无忧办公',
} menuTab: true
} }
]
}, },
{ {
path: '/restaurant', path: '/wash',
name: 'restaurant', name: 'wash',
component: r => { require(['./views/restaurant/index'], r) }, component: Wash,
meta: { meta: {
title: '幸福餐厅' title: '幸福洗衣'
}, },
children: [ children: [
{ {
path: '/restaurant/rationalRestaurant', path: '/wash/washBranches',
name: 'rationalRestaurant', name: 'washBranches',
component: r => { require(['./views/restaurant/NationalRestaurant'], r) }, component: WashBranches,
meta: { meta: {
title: '全国餐厅' title: '洗衣网点',
menuTab: true
} }
}, },
{ {
path: '/restaurant/restaurantAdd', path: '/wash/newBranches',
name: 'restaurantAdd', name: 'newBranches',
component: r => { require(['./views/restaurant/RestaurantAdd'], r) }, component: NewBranches,
meta: { meta: {
title: '新增餐厅' title: '网点编辑',
menuTab: true
} }
}, },
{ {
path: '/restaurant/restaurantMenus', path: '/wash/commonSense',
name: 'restaurantMenus', name: 'commonSense',
component: r => { require(['./views/restaurant/RestaurantMenus'], r) }, component: CommonSense,
meta: { meta: {
title: '餐厅菜单' title: '洗衣小常识',
menuTab: true
} }
}
]
}, },
{ {
path: '/restaurant/foodVideo', path: '/travel',
name: 'foodVideo', name: 'travel',
component: r => { require(['./views/restaurant/FoodVideo'], r) }, component: Travel,
meta: { meta: {
title: '美食视频' title: '幸福差旅'
}
}, },
children: [
{ {
path: '/restaurant/solarCalendar', path: '/travel/hotelList',
name: 'solarCalendar', name: 'hotelList',
component: r => { require(['./views/restaurant/SolarCalendar'], r) }, component: HotelList,
meta: { meta: {
title: '节气日历' title: '协议酒店',
menuTab: true
} }
}, },
{ {
path: '/restaurant/newSolar', path: '/travel/hotelAdd',
name: 'newSolar', name: 'hotelAdd',
component: r => { require(['./views/restaurant/NewSolar'], r) }, component: HotelAdd,
meta: { meta: {
title: '节气日历' title: '编辑酒店',
menuTab: true
}
} }
]
}, },
{ {
path: '/restaurant/themeActivities', path: '/mom',
name: 'themeActivities', name: 'mom',
component: r => { require(['./views/restaurant/ThemeActivities'], r) }, component: Mom,
meta: { meta: {
title: '主题活动' title: '萌妈工作室',
menuTab: true
} }
}, },
{ {
path: '/restaurant/restaurantClassify', path: '/randomHouse',
name: 'restaurantClassify', name: 'randomHouse',
component: r => { require(['./views/restaurant/RestaurantClassify'], r) }, component: RandomHouse,
meta: { meta: {
title: '主题活动' title: '幸福书屋',
menuTab: true
} }
},
{
path: '/pass',
name: 'pass',
component: Pass,
meta: {
title: '幸福传递'
} }
]
}, },
{ {
path: '/administrator', path: '/administrator',
name: 'administrator', name: 'administrator',
component: Administrator, component: Administrator,
meta: { meta: {
title: '管理员' title: '管理员',
menuTab: true
} }
} }
] ]
......
<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 @@ ...@@ -30,16 +30,6 @@
<img :src="$imgUrl + scope.row.picturePath" width="220" height="60" style="margin: auto" /> <img :src="$imgUrl + scope.row.picturePath" width="220" height="60" style="margin: auto" />
</template> </template>
</el-table-column> </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 <el-table-column
prop="pictureSize" prop="pictureSize"
align="right" 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