qujing
This commit is contained in:
55
project/qujing/app/AppReportAiWill/AppReportAtWill.vue
Normal file
55
project/qujing/app/AppReportAiWill/AppReportAtWill.vue
Normal file
@@ -0,0 +1,55 @@
|
||||
<template>
|
||||
<section class="AppReportAtWill">
|
||||
<component ref="component" :is="currentPage" @change="onChange" :params="params" :instance="instance" :dict="dict" :menuName="menuName" />
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/List'
|
||||
import Detail from './components/Detail'
|
||||
import Setting from './components/Setting'
|
||||
|
||||
export default {
|
||||
name: 'AppReportAtWill',
|
||||
label: '事件上报',
|
||||
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
menuName: {default: '事件上报'}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
component: 'List',
|
||||
params: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
currentPage() {
|
||||
let {hash, query: {id}} = this.$route
|
||||
return hash == "#Setting" ? Setting :
|
||||
!!id ? Detail : List
|
||||
}
|
||||
},
|
||||
components: {
|
||||
List,
|
||||
Detail,
|
||||
Setting
|
||||
},
|
||||
|
||||
methods: {
|
||||
onChange(data) {
|
||||
this.$router.push({query: data.params, hash: data.type == "Setting" ? "#Setting" : ""})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.AppReportAtWill {
|
||||
height: 100%;
|
||||
background: #F3F6F9;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user