Commit b7cbfd82 authored by 张伯涛's avatar 张伯涛

web端去除左侧目录结构以及修改控制台报错

parent c57de5f5
export default {
computed: {
device() {
return this.$store.state.app.device
}
},
mounted() {
// In order to fix the click on menu on the ios device will trigger the mouseleave bug
// https://github.com/PanJiaChen/vue-element-admin/issues/1135
this.fixBugIniOS()
},
methods: {
fixBugIniOS() {
const $subMenu = this.$refs.subMenu
if ($subMenu) {
const handleMouseleave = $subMenu.handleMouseleave
$subMenu.handleMouseleave = (e) => {
if (this.device === 'mobile') {
return
}
handleMouseleave(e)
}
}
}
}
}
// export default {
// computed: {
// device() {
// return this.$store.state.app.device
// }
// },
// mounted() {
// // In order to fix the click on menu on the ios device will trigger the mouseleave bug
// // https://github.com/PanJiaChen/vue-element-admin/issues/1135
// this.fixBugIniOS()
// },
// methods: {
// fixBugIniOS() {
// const $subMenu = this.$refs.subMenu
// if ($subMenu) {
// const handleMouseleave = $subMenu.handleMouseleave
// $subMenu.handleMouseleave = (e) => {
// if (this.device === 'mobile') {
// return
// }
// handleMouseleave(e)
// }
// }
// }
// }
// }
<script>
export default {
name: 'MenuItem',
functional: true,
props: {
icon: {
type: String,
default: ''
},
title: {
type: String,
default: ''
}
},
render(h, context) {
const { icon, title } = context.props
const vnodes = []
<!--<script>-->
<!--export default {-->
<!-- name: 'MenuItem',-->
<!-- functional: true,-->
<!-- props: {-->
<!-- icon: {-->
<!-- type: String,-->
<!-- default: ''-->
<!-- },-->
<!-- title: {-->
<!-- type: String,-->
<!-- default: ''-->
<!-- }-->
<!-- },-->
<!-- render(h, context) {-->
<!-- const { icon, title } = context.props-->
<!-- const vnodes = []-->
if (icon) {
vnodes.push(<svg-icon icon-class={icon}/>)
}
<!-- if (icon) {-->
<!-- vnodes.push(<svg-icon icon-class={icon}/>)-->
<!-- }-->
if (title) {
vnodes.push(<span slot='title'>{(title)}</span>)
}
return vnodes
}
}
</script>
<!-- if (title) {-->
<!-- vnodes.push(<span slot='title'>{(title)}</span>)-->
<!-- }-->
<!-- return vnodes-->
<!-- }-->
<!--}-->
<!--</script>-->
<template>
<component :is="type" v-bind="linkProps(to)">
<slot />
</component>
</template>
<!--<template>-->
<!-- <component :is="type" v-bind="linkProps(to)">-->
<!-- <slot />-->
<!-- </component>-->
<!--</template>-->
<script>
import { isExternal } from '@/utils/validate'
<!--<script>-->
<!--import { isExternal } from '@/utils/validate'-->
export default {
props: {
to: {
type: String,
required: true
}
},
computed: {
isExternal() {
return isExternal(this.to)
},
type() {
if (this.isExternal) {
return 'a'
}
return 'router-link'
}
},
methods: {
linkProps(to) {
if (this.isExternal) {
return {
href: to,
target: '_blank',
rel: 'noopener'
}
}
return {
to: to
}
}
}
}
</script>
<!--export default {-->
<!-- props: {-->
<!-- to: {-->
<!-- type: String,-->
<!-- required: true-->
<!-- }-->
<!-- },-->
<!-- computed: {-->
<!-- isExternal() {-->
<!-- return isExternal(this.to)-->
<!-- },-->
<!-- type() {-->
<!-- if (this.isExternal) {-->
<!-- return 'a'-->
<!-- }-->
<!-- return 'router-link'-->
<!-- }-->
<!-- },-->
<!-- methods: {-->
<!-- linkProps(to) {-->
<!-- if (this.isExternal) {-->
<!-- return {-->
<!-- href: to,-->
<!-- target: '_blank',-->
<!-- rel: 'noopener'-->
<!-- }-->
<!-- }-->
<!-- return {-->
<!-- to: to-->
<!-- }-->
<!-- }-->
<!-- }-->
<!--}-->
<!--</script>-->
<template>
<div class="sidebar-logo-container" :class="{'collapse':collapse}">
<transition name="sidebarLogoFade">
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo">
<h1 v-else class="sidebar-title">{{ title }} </h1>
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
<img v-if="logo" :src="logo" class="sidebar-logo">
<h1 class="sidebar-title">{{ title }} </h1>
</router-link>
</transition>
</div>
</template>
<!--<template>-->
<!-- <div class="sidebar-logo-container" :class="{'collapse':collapse}">-->
<!-- <transition name="sidebarLogoFade">-->
<!-- <router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">-->
<!-- <img v-if="logo" :src="logo" class="sidebar-logo">-->
<!-- <h1 v-else class="sidebar-title">{{ title }} </h1>-->
<!-- </router-link>-->
<!-- <router-link v-else key="expand" class="sidebar-logo-link" to="/">-->
<!-- <img v-if="logo" :src="logo" class="sidebar-logo">-->
<!-- <h1 class="sidebar-title">{{ title }} </h1>-->
<!-- </router-link>-->
<!-- </transition>-->
<!-- </div>-->
<!--</template>-->
<script>
export default {
name: 'SidebarLogo',
props: {
collapse: {
type: Boolean,
required: true
}
},
data() {
return {
title: '信息化管理系统',
logo: require('@/assets/image/logo.png')
}
}
}
</script>
<!--<script>-->
<!--export default {-->
<!-- name: 'SidebarLogo',-->
<!-- props: {-->
<!-- collapse: {-->
<!-- type: Boolean,-->
<!-- required: true-->
<!-- }-->
<!-- },-->
<!-- data() {-->
<!-- return {-->
<!-- title: '信息化管理系统',-->
<!-- logo: require('@/assets/image/logo.png')-->
<!-- }-->
<!-- }-->
<!--}-->
<!--</script>-->
<style lang="scss" scoped>
@import "~@/styles/variables.scss";
.sidebarLogoFade-enter-active {
transition: opacity 1.5s;
}
<!--<style lang="scss" scoped>-->
<!--@import "~@/styles/variables.scss";-->
<!--.sidebarLogoFade-enter-active {-->
<!-- transition: opacity 1.5s;-->
<!--}-->
.sidebarLogoFade-enter,
.sidebarLogoFade-leave-to {
opacity: 0;
}
<!--.sidebarLogoFade-enter,-->
<!--.sidebarLogoFade-leave-to {-->
<!-- opacity: 0;-->
<!--}-->
.sidebar-logo-container {
position: relative;
width: 100%;
height: 50px;
line-height: 50px;
background: $menuBg;
padding-left: 11px;
overflow: hidden;
<!--.sidebar-logo-container {-->
<!-- position: relative;-->
<!-- width: 100%;-->
<!-- height: 50px;-->
<!-- line-height: 50px;-->
<!-- background: $menuBg;-->
<!-- padding-left: 11px;-->
<!-- overflow: hidden;-->
& .sidebar-logo-link {
height: 100%;
width: 100%;
<!-- & .sidebar-logo-link {-->
<!-- height: 100%;-->
<!-- width: 100%;-->
& .sidebar-logo {
width: 32px;
height: 32px;
vertical-align: middle;
margin-right: 12px;
}
<!-- & .sidebar-logo {-->
<!-- width: 32px;-->
<!-- height: 32px;-->
<!-- vertical-align: middle;-->
<!-- margin-right: 12px;-->
<!-- }-->
& .sidebar-title {
display: inline-block;
margin: 0;
color: #fff;
font-weight: 600;
line-height: 50px;
font-size: 16px;
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
vertical-align: middle;
}
}
<!-- & .sidebar-title {-->
<!-- display: inline-block;-->
<!-- margin: 0;-->
<!-- color: #fff;-->
<!-- font-weight: 600;-->
<!-- line-height: 50px;-->
<!-- font-size: 16px;-->
<!-- font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;-->
<!-- vertical-align: middle;-->
<!-- }-->
<!-- }-->
&.collapse {
.sidebar-logo {
margin-right: 0px;
}
}
}
</style>
<!-- &.collapse {-->
<!-- .sidebar-logo {-->
<!-- margin-right: 0px;-->
<!-- }-->
<!-- }-->
<!--}-->
<!--</style>-->
<template>
<div v-if="!item.hidden">
<template v-if="item.showFather !== 'true' && hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<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>
<!--<template>-->
<!-- <div v-if="!item.hidden">-->
<!-- <template v-if="item.showFather !== 'true' && hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">-->
<!-- <app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">-->
<!-- <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>
<template slot="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"
:key="child.path"
:is-nest="true"
:item="child"
:base-path="resolvePath(child.path)"
class="nest-menu"
/>
</el-submenu>
</div>
</template>
<!-- <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" />-->
<!-- </template>-->
<!-- <sidebar-item-->
<!-- v-for="child in item.children"-->
<!-- :key="child.path"-->
<!-- :is-nest="true"-->
<!-- :item="child"-->
<!-- :base-path="resolvePath(child.path)"-->
<!-- class="nest-menu"-->
<!-- />-->
<!-- </el-submenu>-->
<!-- </div>-->
<!--</template>-->
<script>
import path from 'path'
import { isExternal } from '@/utils/validate'
import Item from './Item'
import AppLink from './Link'
import FixiOSBug from './FixiOSBug'
<!--<script>-->
<!--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',
components: { Item, AppLink },
mixins: [FixiOSBug],
props: {
// route object
item: {
type: Object,
required: true
},
isNest: {
type: Boolean,
default: false
},
basePath: {
type: String,
default: ''
}
},
data() {
// To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
// TODO: refactor with render function
this.onlyOneChild = null
return {}
},
methods: {
hasOneShowingChild(children = [], parent) {
const showingChildren = children.filter(item => {
if (item.hidden) {
return false
} else {
// Temp set(will be used if only has one showing child)
this.onlyOneChild = item
return true
}
})
<!--export default {-->
<!-- name: 'SidebarItem',-->
<!-- components: { Item, AppLink },-->
<!-- mixins: [FixiOSBug],-->
<!-- props: {-->
<!-- // route object-->
<!-- item: {-->
<!-- type: Object,-->
<!-- required: true-->
<!-- },-->
<!-- isNest: {-->
<!-- type: Boolean,-->
<!-- default: false-->
<!-- },-->
<!-- basePath: {-->
<!-- type: String,-->
<!-- default: ''-->
<!-- }-->
<!-- },-->
<!-- data() {-->
<!-- // To fix https://github.com/PanJiaChen/vue-admin-template/issues/237-->
<!-- // TODO: refactor with render function-->
<!-- this.onlyOneChild = null-->
<!-- return {}-->
<!-- },-->
<!-- methods: {-->
<!-- hasOneShowingChild(children = [], parent) {-->
<!-- const showingChildren = children.filter(item => {-->
<!-- if (item.hidden) {-->
<!-- return false-->
<!-- } else {-->
<!-- // Temp set(will be used if only has one showing child)-->
<!-- 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
}
<!-- // When there is only one child router, the child router is displayed by default-->
<!-- if (showingChildren.length === 1) {-->
<!-- return true-->
<!-- }-->
// Show parent if there are no child router to display
if (showingChildren.length === 0) {
this.onlyOneChild = { ... parent, path: '', noShowingChildren: 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-->
<!-- }-->
return false
},
resolvePath(routePath) {
if (isExternal(routePath)) {
return routePath
}
if (isExternal(this.basePath)) {
return this.basePath
}
return path.resolve(this.basePath, routePath)
}
}
}
</script>
<!-- return false-->
<!-- },-->
<!-- resolvePath(routePath) {-->
<!-- if (isExternal(routePath)) {-->
<!-- return routePath-->
<!-- }-->
<!-- if (isExternal(this.basePath)) {-->
<!-- return this.basePath-->
<!-- }-->
<!-- return path.resolve(this.basePath, routePath)-->
<!-- }-->
<!-- }-->
<!--}-->
<!--</script>-->
<template>
<div :class="{'has-logo':showLogo}">
<logo v-if="true" :collapse="isCollapse" />
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-menu
:default-active="activeMenu"
:collapse="isCollapse"
:background-color="variables.menuBg"
:text-color="variables.menuText"
:unique-opened="true"
:active-text-color="variables.menuActiveText"
:collapse-transition="false"
mode="vertical"
>
<sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" />
</el-menu>
</el-scrollbar>
</div>
</template>
<!--<template>-->
<!-- <div :class="{'has-logo':showLogo}">-->
<!-- <logo v-if="true" :collapse="isCollapse" />-->
<!-- <el-scrollbar wrap-class="scrollbar-wrapper">-->
<!-- <el-menu-->
<!-- :default-active="activeMenu"-->
<!-- :collapse="isCollapse"-->
<!-- :background-color="variables.menuBg"-->
<!-- :text-color="variables.menuText"-->
<!-- :unique-opened="true"-->
<!-- :active-text-color="variables.menuActiveText"-->
<!-- :collapse-transition="false"-->
<!-- mode="vertical"-->
<!-- >-->
<!-- <sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" />-->
<!-- </el-menu>-->
<!-- </el-scrollbar>-->
<!-- </div>-->
<!--</template>-->
<script>
import { mapGetters } from 'vuex'
import Logo from './Logo'
import SidebarItem from './SidebarItem'
import variables from '@/styles/variables.scss'
<!--<script>-->
<!--import { mapGetters } from 'vuex'-->
<!--import Logo from './Logo'-->
<!--import SidebarItem from './SidebarItem'-->
<!--import variables from '@/styles/variables.scss'-->
export default {
components: { SidebarItem, Logo },
computed: {
...mapGetters([
'permission_routes',
'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
}
}
}
</script>
<!--export default {-->
<!-- components: { SidebarItem, Logo },-->
<!-- computed: {-->
<!-- ...mapGetters([-->
<!-- 'permission_routes',-->
<!-- '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-->
<!-- }-->
<!-- }-->
<!--}-->
<!--</script>-->
<template>
<el-scrollbar ref="scrollContainer" :vertical="false" class="scroll-container" @wheel.native.prevent="handleScroll">
<slot />
</el-scrollbar>
</template>
<!--<template>-->
<!-- <el-scrollbar ref="scrollContainer" :vertical="false" class="scroll-container" @wheel.native.prevent="handleScroll">-->
<!-- <slot />-->
<!-- </el-scrollbar>-->
<!--</template>-->
<script>
const tagAndTagSpacing = 4 // tagAndTagSpacing
<!--<script>-->
<!--const tagAndTagSpacing = 4 // tagAndTagSpacing-->
export default {
name: 'ScrollPane',
data() {
return {
left: 0
}
},
computed: {
scrollWrapper() {
return this.$refs.scrollContainer.$refs.wrap
}
},
mounted() {
this.scrollWrapper.addEventListener('scroll', this.emitScroll, true)
},
beforeDestroy() {
this.scrollWrapper.removeEventListener('scroll', this.emitScroll)
},
methods: {
handleScroll(e) {
const eventDelta = e.wheelDelta || -e.deltaY * 40
const $scrollWrapper = this.scrollWrapper
$scrollWrapper.scrollLeft = $scrollWrapper.scrollLeft + eventDelta / 4
},
emitScroll() {
this.$emit('scroll')
},
moveToTarget(currentTag) {
const $container = this.$refs.scrollContainer.$el
const $containerWidth = $container.offsetWidth
const $scrollWrapper = this.scrollWrapper
const tagList = this.$parent.$refs.tag
<!--export default {-->
<!-- name: 'ScrollPane',-->
<!-- data() {-->
<!-- return {-->
<!-- left: 0-->
<!-- }-->
<!-- },-->
<!-- computed: {-->
<!-- scrollWrapper() {-->
<!-- return this.$refs.scrollContainer.$refs.wrap-->
<!-- }-->
<!-- },-->
<!-- mounted() {-->
<!-- this.scrollWrapper.addEventListener('scroll', this.emitScroll, true)-->
<!-- },-->
<!-- beforeDestroy() {-->
<!-- this.scrollWrapper.removeEventListener('scroll', this.emitScroll)-->
<!-- },-->
<!-- methods: {-->
<!-- handleScroll(e) {-->
<!-- const eventDelta = e.wheelDelta || -e.deltaY * 40-->
<!-- const $scrollWrapper = this.scrollWrapper-->
<!-- $scrollWrapper.scrollLeft = $scrollWrapper.scrollLeft + eventDelta / 4-->
<!-- },-->
<!-- emitScroll() {-->
<!-- this.$emit('scroll')-->
<!-- },-->
<!-- moveToTarget(currentTag) {-->
<!-- const $container = this.$refs.scrollContainer.$el-->
<!-- const $containerWidth = $container.offsetWidth-->
<!-- const $scrollWrapper = this.scrollWrapper-->
<!-- const tagList = this.$parent.$refs.tag-->
let firstTag = null
let lastTag = null
<!-- let firstTag = null-->
<!-- let lastTag = null-->
// find first tag and last tag
if (tagList.length > 0) {
firstTag = tagList[0]
lastTag = tagList[tagList.length - 1]
}
<!-- // find first tag and last tag-->
<!-- if (tagList.length > 0) {-->
<!-- firstTag = tagList[0]-->
<!-- lastTag = tagList[tagList.length - 1]-->
<!-- }-->
if (firstTag === currentTag) {
$scrollWrapper.scrollLeft = 0
} else if (lastTag === currentTag) {
$scrollWrapper.scrollLeft = $scrollWrapper.scrollWidth - $containerWidth
} else {
// find preTag and nextTag
const currentIndex = tagList.findIndex(item => item === currentTag)
const prevTag = tagList[currentIndex - 1]
const nextTag = tagList[currentIndex + 1]
<!-- if (firstTag === currentTag) {-->
<!-- $scrollWrapper.scrollLeft = 0-->
<!-- } else if (lastTag === currentTag) {-->
<!-- $scrollWrapper.scrollLeft = $scrollWrapper.scrollWidth - $containerWidth-->
<!-- } else {-->
<!-- // find preTag and nextTag-->
<!-- const currentIndex = tagList.findIndex(item => item === currentTag)-->
<!-- const prevTag = tagList[currentIndex - 1]-->
<!-- const nextTag = tagList[currentIndex + 1]-->
// the tag's offsetLeft after of nextTag
const afterNextTagOffsetLeft = nextTag.$el.offsetLeft + nextTag.$el.offsetWidth + tagAndTagSpacing
<!-- // the tag's offsetLeft after of nextTag-->
<!-- const afterNextTagOffsetLeft = nextTag.$el.offsetLeft + nextTag.$el.offsetWidth + tagAndTagSpacing-->
// the tag's offsetLeft before of prevTag
const beforePrevTagOffsetLeft = prevTag.$el.offsetLeft - tagAndTagSpacing
<!-- // the tag's offsetLeft before of prevTag-->
<!-- const beforePrevTagOffsetLeft = prevTag.$el.offsetLeft - tagAndTagSpacing-->
if (afterNextTagOffsetLeft > $scrollWrapper.scrollLeft + $containerWidth) {
$scrollWrapper.scrollLeft = afterNextTagOffsetLeft - $containerWidth
} else if (beforePrevTagOffsetLeft < $scrollWrapper.scrollLeft) {
$scrollWrapper.scrollLeft = beforePrevTagOffsetLeft
}
}
}
}
}
</script>
<!-- if (afterNextTagOffsetLeft > $scrollWrapper.scrollLeft + $containerWidth) {-->
<!-- $scrollWrapper.scrollLeft = afterNextTagOffsetLeft - $containerWidth-->
<!-- } else if (beforePrevTagOffsetLeft < $scrollWrapper.scrollLeft) {-->
<!-- $scrollWrapper.scrollLeft = beforePrevTagOffsetLeft-->
<!-- }-->
<!-- }-->
<!-- }-->
<!-- }-->
<!--}-->
<!--</script>-->
<style lang="scss" scoped>
.scroll-container {
white-space: nowrap;
position: relative;
overflow: hidden;
width: 100%;
/deep/ {
.el-scrollbar__bar {
bottom: 0px;
}
.el-scrollbar__wrap {
height: 49px;
}
}
}
</style>
<!--<style lang="scss" scoped>-->
<!--.scroll-container {-->
<!-- white-space: nowrap;-->
<!-- position: relative;-->
<!-- overflow: hidden;-->
<!-- width: 100%;-->
<!-- /deep/ {-->
<!-- .el-scrollbar__bar {-->
<!-- bottom: 0px;-->
<!-- }-->
<!-- .el-scrollbar__wrap {-->
<!-- height: 49px;-->
<!-- }-->
<!-- }-->
<!--}-->
<!--</style>-->
This diff is collapsed.
<template>
<div class="navbar">
<div class="title-box">
<hamburger
:is-active="sidebar.opened"
class="hamburger-container"
@toggleClick="toggleSideBar"
/>
<el-dropdown
class="change-sys"
@command="handleCommand"
>
<!-- <span class="el-dropdown-link">-->
<!-- 业务中台<i class="el-icon-arrow-down el-icon&#45;&#45;right" />-->
<!-- </span>-->
<el-dropdown-menu
slot="dropdown"
>
<el-dropdown-item
v-for="(item) in appList"
:key="item.businessId"
:command="specialTag !== '1' ? item.pcUrl : ''"
>
{{ item.system }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- <hamburger-->
<!-- :is-active="sidebar.opened"-->
<!-- class="hamburger-container"-->
<!-- @toggleClick="toggleSideBar"-->
<!-- />-->
<!-- <el-dropdown-->
<!-- class="change-sys"-->
<!-- @command="handleCommand"-->
<!-- >-->
<!--&lt;!&ndash; <span class="el-dropdown-link">&ndash;&gt;-->
<!--&lt;!&ndash; 业务中台<i class="el-icon-arrow-down el-icon&#45;&#45;right" />&ndash;&gt;-->
<!--&lt;!&ndash; </span>&ndash;&gt;-->
<!-- <el-dropdown-menu-->
<!-- slot="dropdown"-->
<!-- >-->
<!-- <el-dropdown-item-->
<!-- v-for="(item) in appList"-->
<!-- :key="item.businessId"-->
<!-- :command="specialTag !== '1' ? item.pcUrl : ''"-->
<!-- >-->
<!-- {{ item.system }}-->
<!-- </el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
</div>
<div class="right-menu">
<!-- <i class="el-icon-info" />-->
......@@ -81,7 +81,7 @@ export default {
])
},
mounted() {
this.getInAdhibitions()
// this.getInAdhibitions()
},
methods: {
handleCommand(param) {
......@@ -89,11 +89,11 @@ export default {
window.location.href = param
}
},
getInAdhibitions() {
queryInAdhibitions({ businessId: 'zt' }).then(res => {
this.appList.splice(0, 0, ...res.data)
})
},
// getInAdhibitions() {
// queryInAdhibitions({ businessId: 'zt' }).then(res => {
// this.appList.splice(0, 0, ...res.data)
// })
// },
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
......
......@@ -102,7 +102,7 @@ export default {
//top: 0;
//right: 0;
//z-index: 9;
width: calc(100% - #{$sideBarWidth});
//width: calc(100% - #{$sideBarWidth});
transition: width 0.28s;
}
......
......@@ -4,7 +4,7 @@
padding-top: 6.4vh;
min-height: 100%;
transition: margin-left 0.28s;
margin-left: $sideBarWidth;
//margin-left: $sideBarWidth;
position: relative;
}
......
<template>
<div>
aaaaaaaaaaaa
</div>
</template>
<script>
export default {
name: 'Index'
}
</script>
<style scoped>
</style>
This diff is collapsed.
<template>
<div>
<el-select v-model="value" placeholder="请选择">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-table
:data="tableData"
border
style="width: 100%"
>
<el-table-column
label="序号"
type="index"
width="50">
</el-table-column>
<el-table-column
prop="date"
label="日期"
width="180"
/>
<el-table-column
prop="name"
label="姓名"
width="180"
/>
<el-table-column
prop="address"
label="地址"
/>
</el-table>
<el-pagination
background
layout="prev, pager, next"
:total="1000"
/>
</div>
</template>
<script>
export default {
data() {
return {
options: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
value: '',
tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}]
}
}
}
</script>
......@@ -43,7 +43,7 @@ module.exports = {
lintOnSave: process.env.NODE_ENV === 'development',
productionSourceMap: false,
devServer: {
// port: port,
port: 8083,
// open: true,
// overlay: {
// warnings: false,
......@@ -81,7 +81,7 @@ module.exports = {
[process.env.VUE_APP_BASE_API]: {
// target: `http://192.168.1.17:10010/internal`,
// target: `http://10.5.87.231:10010/internal`,
target: `http://124.71.16.228:8085/`,
target: `http://124.71.16.228:8096/`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''
......
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