wangting
2024-03-14 dc056a2a0e4fb7e3c3115bd2f8a97dbe204c8909
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<template>
  <!--UI上下文的展示器-->
  <div style="height:calc(100% - 4px) ">
    <el-header v-if="uiDefineVO.northAreas && uiDefineVO.northAreas.length>0">
      <basic-container>
        <el-tabs v-if="uiDefineVO.northAreas.length>1" v-model="northActiveName" type="card" @tab-click="northHandleClick">
          <el-tab-pane v-for="(areaItem,index) in uiDefineVO.northAreas" :key="areaItem.oid" :label="areaItem.name" :name="'northTab'+index">
            <div class="componentVO" v-for="(componentVO,index) in areaItem.componentVOs" >
              <dynamic-table v-if="componentVO.uiComponentType=='table'" :componentVO="componentVO"  :sourceData="sourceData"></dynamic-table>
            </div>
          </el-tab-pane>
        </el-tabs>
        <div v-else>
          <div class="componentVO" v-for="(componentVO,index) in uiDefineVO.northAreas[0].componentVOs" >
            <dynamic-table v-if="componentVO.uiComponentType=='table'" :componentVO="componentVO" :sourceData="sourceData"></dynamic-table>
          </div>
        </div>
      </basic-container>
    </el-header>
    <el-container :style="'height: '+(uiDefineVO.northAreas && uiDefineVO.northAreas.length>0?'calc(100% - 70px)':'100%')">
      <el-aside v-if="uiDefineVO.westAreas && uiDefineVO.westAreas.length>0" width="320px" height="100%">
        <basic-container cradStyle="height:100%">
          <el-tabs v-if="uiDefineVO.westAreas.length>1" v-model="westActiveName" type="card" @tab-click="westHandleClick">
            <el-tab-pane v-for="(areaItem,index) in uiDefineVO.westAreas" :key="areaItem.oid" :label="areaItem.name" :name="'westTab'+index">
              <div class="componentVO" v-for="(componentVO,index) in areaItem.componentVOs" >
                <dynamic-table v-if="componentVO.uiComponentType=='table'" :componentVO="componentVO" :sourceData="sourceData"></dynamic-table>
              </div>
            </el-tab-pane>
          </el-tabs>
          <div v-else>
            <div class="componentVO" v-for="(componentVO,index) in uiDefineVO.westAreas[0].componentVOs" >
              <dynamic-table v-if="componentVO.uiComponentType=='table'" :componentVO="componentVO" :sourceData="sourceData"></dynamic-table>
            </div>
          </div>
        </basic-container>
      </el-aside>
      <el-container>
        <el-main v-if="uiDefineVO.centerAreas && uiDefineVO.centerAreas.length>0" style="min-height: calc(100% - 310px)">
          <basic-container cradStyle="height:100%">
            <el-tabs v-if="uiDefineVO.centerAreas.length>1" v-model="centerActiveName" type="card" @tab-click="centerHandleClick">
              <el-tab-pane v-for="(areaItem,index) in uiDefineVO.centerAreas" :key="areaItem.oid" :label="areaItem.name" :name="'centerTab'+index">
                <div class="componentVO" v-for="(componentVO,index) in areaItem.componentVOs" >
                  <dynamic-table v-if="componentVO.uiComponentType=='table'" :componentVO="componentVO" :sourceData="checkedData.westAreas[0]"></dynamic-table>
                </div>
              </el-tab-pane>
            </el-tabs>
            <div v-else>
              <div class="componentVO" v-for="(componentVO,index) in uiDefineVO.centerAreas[0].componentVOs" >
                <dynamic-table v-if="componentVO.uiComponentType=='table'" :componentVO="componentVO" :sourceData="checkedData.westAreas[0]"></dynamic-table>
              </div>
            </div>
          </basic-container>
        </el-main>
        <el-footer v-if="uiDefineVO.southAreas && uiDefineVO.southAreas.length>0" height="500px" style="max-height: 300px">
          <basic-container cradStyle="height:100%">
            <el-tabs v-if="uiDefineVO.southAreas.length>1" v-model="southActiveName" type="card" @tab-click="southHandleClick">
              <el-tab-pane v-for="(areaItem,index) in uiDefineVO.southAreas" :key="areaItem.oid" :label="areaItem.name" :name="'southTab'+index">
                <div class="componentVO" v-for="(componentVO,index) in areaItem.componentVOs" >
                  <dynamic-table v-if="componentVO.uiComponentType=='table'" :componentVO="componentVO" :sourceData="checkedData.centerAreas[0]"></dynamic-table>
                </div>
              </el-tab-pane>
            </el-tabs>
            <div v-else>
              <div class="componentVO" v-for="(componentVO,index) in uiDefineVO.southAreas[0].componentVOs" >
                <dynamic-table v-if="componentVO.uiComponentType=='table'" :componentVO="componentVO" :sourceData="checkedData.centerAreas[0]"></dynamic-table>
              </div>
            </div>
          </basic-container>
        </el-footer>
      </el-container>
    </el-container>
  </div>
</template>
 
<script>
import dynamicTable from "@/components/dynamic-components/dynamic-table"
import {uiDefineVOData} from "@/views/base/uiDefineVO"
 
export default {
  components:{dynamicTable},
  props:{
    inDialog: {
      type: Boolean,
      default: false
    },
    sourceData:{
      //菜单源数据或者弹窗时按钮所属区域的上一区域选中数据
      type:Object,
      default: {}
    },
    dataStore:{
      //弹窗时按钮所属区域选中数据
      type:Array,
      default: []
    },
    paramVOS:{
      type:Object,
      default: {}
    }
  },
  data() {
    return {
      btmType:'',//业务类型(或链接类型)
      content:'',//UI上下文的名称
      checkedData:{
        //各区域选中数据
        westAreas:[],
        centerAreas:[],
        southAreas:[]
      },
      northActiveName: 'northTab0',
      westActiveName: 'westTab0',
      centerActiveName: 'centerTab0',
      southActiveName: 'southTab0',
      uiDefineVO: uiDefineVOData
    }
  },
  watch: {
 
  },
  computed: {
 
  },
  methods: {
    initUI(){
 
    },
    showContent(){
 
    },
    initContent(){
 
    },
    northHandleClick(tab, event) {
      console.log(tab, event);
    },
    westHandleClick(tab, event) {
      console.log(tab, event);
    },
    centerHandleClick(tab, event) {
      console.log(tab, event);
    },
    southHandleClick(tab, event) {
      console.log(tab, event);
    },
  }
}
</script>
 
<style scoped>
.el-container{
  padding: 0 !important;
}
.el-header,.el-aside,.el-main,.el-footer{
  padding: 0;
}
.el-header{
  margin-bottom: 10px;
}
</style>