Files
dvcp_v2_webapp/packages/conv/AppReportAiWill/AppReportAtWill.vue

56 lines
1.0 KiB
Vue
Raw Normal View History

2022-01-06 17:06:19 +08:00
<template>
2022-06-13 14:32:40 +08:00
<section class="AppReportAtWill">
2023-03-17 09:36:36 +08:00
<component ref="component" :is="currentPage" @change="onChange" :params="params" :instance="instance" :dict="dict" :menuName="menuName" />
2022-06-13 14:32:40 +08:00
</section>
2022-01-06 17:06:19 +08:00
</template>
<script>
2022-06-13 14:32:40 +08:00
import List from './components/List'
import Detail from './components/Detail'
import Setting from './components/Setting'
export default {
name: 'AppReportAtWill',
label: '随手拍',
props: {
instance: Function,
2023-03-17 09:36:36 +08:00
dict: Object,
menuName: {default: '随手拍'}
2022-06-13 14:32:40 +08:00
},
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" : ""})
2022-01-06 17:06:19 +08:00
}
}
2022-06-13 14:32:40 +08:00
}
2022-01-06 17:06:19 +08:00
</script>
<style lang="scss">
2022-06-13 14:32:40 +08:00
.AppReportAtWill {
height: 100%;
background: #F3F6F9;
overflow: auto;
}
2022-01-06 17:06:19 +08:00
</style>