田源
2023-06-15 859a64b36d107b147f44eccd0c0a76471c5e49ea
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
<template>
    <el-container>
      <el-aside>
        <basic-container style="height: 85vh; max-height: 155vh; overflow-y: scroll;">
<!--          树组件-->
          <master-tree @codeClassifyOid="codeClassifyOidList"
                       @coderuleoid="coderuleoidList"
                       :pageSize="this.pageSize"
                       :currentPage="this.currentPage"
                       @tableDataArray="tableDataArrays"
                       @tableHeadDataFateher="tableHeadDatas"
                       @total="totals"
                       @nodeClick="nodeClick"
                        ></master-tree>
        </basic-container>
      </el-aside>
      <el-main>
<!--        表格组件-->
      <TableCrud :page="this.page"
                 :codeClassifyOid="this.codeClassifyOid"
                 :coderuleoid="this.coderuleoid"
                 @pageSize="pageSizes"
                 @currentPage="currentPages"
                 :tableDataArray="tableDataArray"
                 :total="this.total"
                 :tableHeadDataFateher="this.tableHeadDataFateher"
                 :isLoading="isLoading"
                 :templateOid="templateOid"
      ></TableCrud>
      </el-main>
    </el-container>
</template>
 
<script>
export default {
  name: "items.vue",
  data(){
    return{
      // 分页
      page: {
        total: 0,
        currentPage: 1,
        pageSize: 10,
        pageSizes: [10, 30, 50, 100, 200],
      },
      pageSize:"10",
      currentPage:"1",
      codeClassifyOid:"",
      coderuleoid:"",
      templateOid:"",
      tableDataArray:[],
      tableHeadDataFateher:[],
      total:"",
      isLoading: false,
 
    }
  },
  created() {
  },
  methods:{
    codeClassifyOidList(val){
      this.codeClassifyOid=val;
      console.log(val)
    },
    coderuleoidList(val){
      this.coderuleoid=val;
    },
    pageSizes(val){
      this.pageSize=val
    },
    currentPages(val){
      this.currentPage=val
    },
    tableDataArrays(val){
      this.tableDataArray=val
    },
    totals(val){
      this.total=val
    },
    tableHeadDatas(val){
      this.tableHeadDataFateher=val
    },
    nodeClick(val){
      this.templateOid=val;
      console.log('val',val)
      this.isLoading=true;
      setTimeout(() => {
        this.isLoading = false;
      }, 2000);
}
  }
}
</script>
 
<style scoped>
 
</style>