Files
dvcp_v2_webapp/project/lulong/AppEventReporting/AppEventReporting.vue

56 lines
1.1 KiB
Vue
Raw Normal View History

2023-08-24 09:47:22 +08:00
<template>
2023-10-17 13:42:24 +08:00
<section class="AppEventReporting">
2023-08-24 09:47:22 +08:00
<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 {
2023-10-17 13:42:24 +08:00
name: 'AppEventReporting',
2023-08-24 09:47:22 +08:00
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">
2023-10-17 13:42:24 +08:00
.AppEventReporting {
2023-08-24 09:47:22 +08:00
height: 100%;
background: #F3F6F9;
overflow: auto;
}
</style>