Files
dvcp_v2_webapp/packages/bigscreen/designer/AppDesigner.vue

84 lines
1.7 KiB
Vue
Raw Normal View History

2021-12-14 18:36:19 +08:00
<template>
2022-06-28 09:15:10 +08:00
<section class="AppDesigner">
<component :is="currentPage" v-bind="$props"/>
</section>
2021-12-14 18:36:19 +08:00
</template>
<script>
import List from './components/List.vue'
import Add from './components/Add'
import SourceData from './components/SourceData'
2022-06-28 09:15:10 +08:00
import Preview from "./components/preview";
2022-11-09 11:54:15 +08:00
import DesignDashboard from "./components/Layout";
2022-06-28 09:15:10 +08:00
2021-12-14 18:36:19 +08:00
export default {
2022-06-28 09:15:10 +08:00
name: 'AppDesigner',
2021-12-14 18:36:19 +08:00
label: '大屏设计',
2022-11-09 11:54:15 +08:00
components: {DesignDashboard, Preview, List, Add, SourceData},
2021-12-14 18:36:19 +08:00
props: {
instance: Function,
dict: Object,
permissions: Function,
urlPrefix: {
type: String,
default: '/app'
}
},
computed: {
2022-06-28 09:15:10 +08:00
currentPage() {
const {hash} = this.$route
return hash == "#sourceData" ? SourceData :
hash == "#add" ? Add :
2022-11-09 11:54:15 +08:00
hash == "#preview" ? Preview :
hash == "#design" ? DesignDashboard : List
2022-06-28 09:15:10 +08:00
},
2021-12-14 18:36:19 +08:00
tabs() {
return [
{label: '大屏列表', name: 'FormList', comp: List, permission: ''}
].filter(() => {
return true
})
}
},
data() {
return {
currIndex: '0',
componentName: '',
params: {},
areaId: '',
isShowDetail: false
}
},
methods: {
onChange(data) {
if (data.type === 'list') {
this.componentName = 'List'
this.isShowDetail = false
this.params = data.params
}
if (data.type === 'add') {
this.componentName = 'Add'
this.isShowDetail = true
this.params = data.params
}
if (data.type === 'SourceData') {
this.componentName = 'SourceData'
this.isShowDetail = true
this.params = data.params
}
}
},
}
</script>
<style lang="scss" scoped>
2022-06-30 10:17:05 +08:00
.AppDesigner {
height: 100%;
}
2021-12-14 18:36:19 +08:00
</style>