DEL /template/report
This commit is contained in:
parent
66dc337d02
commit
3b2ad9c5a7
|
@ -33,15 +33,6 @@ const routes = [{
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "usercenter" */ '@/views/userCenter'),
|
component: () => import(/* webpackChunkName: "usercenter" */ '@/views/userCenter'),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "report",
|
|
||||||
path: "/template/report",
|
|
||||||
meta: {
|
|
||||||
title: "分析报表",
|
|
||||||
icon: "el-icon-data-analysis",
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "report" */ '@/views/template/report'),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "scselect",
|
name: "scselect",
|
||||||
path: "/vab/select",
|
path: "/vab/select",
|
||||||
|
|
|
@ -1,77 +0,0 @@
|
||||||
<template>
|
|
||||||
<el-container>
|
|
||||||
<el-aside width="210px">
|
|
||||||
<el-container>
|
|
||||||
<el-header>
|
|
||||||
<el-input placeholder="输入关键字进行过滤" v-model="groupFilterText" clearable></el-input>
|
|
||||||
</el-header>
|
|
||||||
<el-main class="nopadding">
|
|
||||||
<el-tree ref="group" class="menu" node-key="id" :data="group" highlight-current default-expand-all @node-click="groupClick">
|
|
||||||
<template #default="{ node, data }">
|
|
||||||
<span class="el-tree-node__label">
|
|
||||||
<i :class="['icon', data.children?'el-icon-folder':'el-icon-tickets']"></i>{{ node.label }}
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</el-tree>
|
|
||||||
</el-main>
|
|
||||||
</el-container>
|
|
||||||
</el-aside>
|
|
||||||
<el-container>
|
|
||||||
|
|
||||||
<el-header>
|
|
||||||
</el-header>
|
|
||||||
<el-main>
|
|
||||||
<el-card shadow="never">
|
|
||||||
<component :is="src"></component>
|
|
||||||
</el-card>
|
|
||||||
</el-main>
|
|
||||||
</el-container>
|
|
||||||
</el-container>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { defineAsyncComponent, markRaw } from "vue"
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'report',
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
src: null,
|
|
||||||
groupFilterText: '',
|
|
||||||
group: [
|
|
||||||
{
|
|
||||||
label: '系统运维概况',
|
|
||||||
name: 'system'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '访客分析',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
label: '地域分布',
|
|
||||||
name: 'region'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '访客人像',
|
|
||||||
name: 'user'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
groupClick(data){
|
|
||||||
if(data.children) return
|
|
||||||
this.src = markRaw(
|
|
||||||
defineAsyncComponent({
|
|
||||||
loader: () => import(`@/views/template/report/pages/${data.name}`),
|
|
||||||
delay: 0,
|
|
||||||
timeout: 10000,
|
|
||||||
//loadingComponent: { template: '<div>加载中</div>' },
|
|
||||||
//errorComponent: { template: '<div>加载失败</div>' }
|
|
||||||
})
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
|
@ -1,20 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>region</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data(){
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
</style>
|
|
|
@ -1,20 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>system</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data(){
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
</style>
|
|
|
@ -1,20 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>user</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
data(){
|
|
||||||
return {}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
</style>
|
|
|
@ -1,43 +0,0 @@
|
||||||
<template>
|
|
||||||
<component :is="componentFile"></component>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { defineAsyncComponent, markRaw } from "vue"
|
|
||||||
|
|
||||||
export default {
|
|
||||||
props: {
|
|
||||||
src: { type: String, default: "" }
|
|
||||||
},
|
|
||||||
data(){
|
|
||||||
return {
|
|
||||||
componentFile: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
src(){
|
|
||||||
this.render()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.render()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
render(){
|
|
||||||
if(!this.src){
|
|
||||||
this.componentFile = null
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
this.componentFile = markRaw(
|
|
||||||
defineAsyncComponent({
|
|
||||||
loader: () => import(`@/views/template/report/pages/${this.src}`),
|
|
||||||
delay: 0,
|
|
||||||
timeout: 10000,
|
|
||||||
loadingComponent: { template: '<div>加载中</div>' },
|
|
||||||
errorComponent: { template: '<div>加载失败</div>' }
|
|
||||||
})
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
Loading…
Reference in New Issue