管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2022-12-14 ea52386a7c7b3ef91784280e3033f190ac39caee
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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<template>
  <div class="archive">
    <div class="top_header">
      <div class="top_left">
        <label>{{ $t('synthesis.synthesis') }}</label>
        <span>/</span>
        <label>{{ $t('synthesis.archive') }}</label>
      </div>
      <div class="top_right">
        <el-form :inline="true" :model="formInline" class="demo-form-inline">
          <el-form-item>
            <el-input
              v-model="formInline.user"
              suffix-icon="el-icon-search"
              :placeholder="$t('common.pleaseInput')"
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-button class="primaries">{{ $t('common.iquery') }}</el-button>
          </el-form-item>
          <el-form-item>
            <el-button class="primaries">{{ $t('common.download') }}</el-button>
          </el-form-item>
          <el-form-item>
            <el-button class="primaries">{{ $t('common.iquery') }}</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
    <div class="bottom_content">
      <div class="left_bottom">
        <div class="left_tree">
          <el-tree
            :data="tree"
            :props="defaultProps"
            :default-expanded-keys="[1]"
            node-key="id"
            @node-click="handleNodeClick"
          ></el-tree>
        </div>
      </div>
      <div class="right_bottom"></div>
    </div>
  </div>
</template>
 
<script>
import { dataLib_selectTabs, dataLib_selectTabFields } from '../../api/api';
 
import MyBread from '../../components/MyBread.vue';
export default {
  components: {
    MyBread,
  },
  data() {
    return {
      listdata: {
        name: null,
        pageSize: 10,
        pageIndex: 1,
      },
      count: 0,
      formInline: {},
      tree: [
        {
          tabDesc: '基础数据',
          label: '基础数据',
          value: 'BD',
          children: [],
        },
        {
          tabDesc: '业务数据',
          label: '业务数据',
          value: 'BS',
          children: [],
        },
      ],
      defaultProps: {
        children: 'children',
        label: 'label',
      },
    };
  },
  methods: {
    //树节点点击事件
    handleNodeClick(data) {
      if (data.children != null) return;
      this.listData.name = data.entity; //要查询表格类型;
      this.filedsLayer = this.getDataLibSelectTabFields(data); //获取每个表字段名称及阈值
    },
    async getDataLibSelectTabFields(res) {
      const data = await dataLib_selectTabFields({
        ns: res.ns,
        tab: res.entity,
      });
      if (data.code != 200) {
        this.$message.error('列表调用失败');
        return;
      }
      debugger;
    },
    //获取所有表格数据
    async getDataLibSelectTabs() {
      const data = await dataLib_selectTabs();
      if (data.code != 200) {
        this.$message.error('列表调用失败');
        return;
      }
      var option = data.result;
      for (var i in option) {
        var val_Data = option[i];
        val_Data.id = '1' + i;
        val_Data.label = val_Data.tabDesc + '(' + val_Data.tab + ')';
        if (option[i].ns == 'bd') {
          this.tree[0].children.push(val_Data);
        } else {
          this.tree[1].children.push(val_Data);
        }
      }
    },
  },
  mounted() {
    this.getDataLibSelectTabs();
  },
};
</script>
 
<style lang="less" scoped>
.archive {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: black;
  .top_header {
    width: calc(100% - 60px);
    height: 70px;
    background: #353539;
    display: flex;
    padding: 0 30px;
    justify-content: space-between;
 
    label {
      font-size: 21px;
      font-family: Source Han Sans SC;
      font-weight: 400;
      color: #009cff;
      line-height: 70px;
    }
    span {
      color: gray;
      margin: 0 5px;
    }
    /deep/.el-form--inline .el-form-item__content {
      line-height: 70px;
    }
    /deep/.el-form--inline .el-form-item__label {
      line-height: 70px;
    }
  }
  .bottom_content {
    width: 100%;
    height: calc(100% - 70px);
    display: flex;
    justify-content: space-between;
    .left_bottom {
      width: 224px;
      height: calc(100% - 64px);
      background: #303030;
      padding: 32px 23px;
      .left_tree {
        width: 100%;
        height: 100%;
        overflow: auto;
      }
    }
    .right_bottom {
      width: calc(100% - 20px);
      height: calc(100% - 20px);
      padding: 10px;
    }
  }
  .primaries {
    background: linear-gradient(180deg, #002992, #080472);
    border: 1px solid #000000;
    box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.21);
    color: white;
  }
}
</style>