大屏应用位置整合
This commit is contained in:
@@ -1,34 +1,19 @@
|
||||
<template>
|
||||
<ai-list v-if="!isShowDetail">
|
||||
<template slot="title">
|
||||
<ai-title title="大屏列表" :isShowBottomBorder="false" :instance="instance"></ai-title>
|
||||
</template>
|
||||
<template slot="tabs">
|
||||
<el-tabs v-model="currIndex">
|
||||
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
|
||||
<component :urlPrefix="urlPrefix" :areaId="areaId" :ref="tab.name" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance"
|
||||
:dict="dict" :permissions="permissions"/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
</ai-list>
|
||||
<Add v-else-if="componentName === 'Add'" :urlPrefix="urlPrefix" :areaId="areaId" :params="params" :instance="instance" :dict="dict" :permissions="permissions"
|
||||
@change="onChange"></Add>
|
||||
<SourceData v-else-if="componentName === 'SourceData'" :urlPrefix="urlPrefix" :params="params" :instance="instance" :dict="dict" :permissions="permissions"
|
||||
@change="onChange"></SourceData>
|
||||
<section class="AppDesigner">
|
||||
<component :is="currentPage" v-bind="$props"/>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import List from './components/List.vue'
|
||||
import Add from './components/Add'
|
||||
import SourceData from './components/SourceData'
|
||||
import Preview from "./components/preview";
|
||||
|
||||
export default {
|
||||
name: 'AppDesigner',
|
||||
label: '大屏设计',
|
||||
|
||||
components: {List, Add, SourceData},
|
||||
|
||||
components: {Preview, List, Add, SourceData},
|
||||
props: {
|
||||
instance: Function,
|
||||
dict: Object,
|
||||
@@ -40,6 +25,12 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
currentPage() {
|
||||
const {hash} = this.$route
|
||||
return hash == "#sourceData" ? SourceData :
|
||||
hash == "#add" ? Add :
|
||||
hash == "#preview" ? Preview : List
|
||||
},
|
||||
tabs() {
|
||||
return [
|
||||
{label: '大屏列表', name: 'FormList', comp: List, permission: ''}
|
||||
|
||||
Reference in New Issue
Block a user